0

So, my situation is that I have one Windows PC and one PC with Kali Linux. On Windows PC I've opened a netcat listener on port 4444. Then on my router I've opened port 4444.

Finally when I go on kali and, using my mobile data hotspot, I want to connect to my Windows. But when I try it doesn't work, and when I check ports using:

nc -vn HOSTNAME PORT

it says:

Connection timed out.

Could anyone help me please? I've already tried using netcat between the two PCs in the same network and it works perfectly, so I thinks it's a network problem. My router is an Asus DSL-N12E_C1.

kenorb
  • 26,615
Alex Rily
  • 1
  • 1
  • 1
  • 1

1 Answers1

0

On Windows PC I've opened a netcat listener on port 4444.

Make sure your netcat binds and listens on all IP addresses, not only on localhost, e.g.

nc -v -l 0.0.0.0 4444

See: Netcat for Windows.

Then make sure you can connect to that port on the same machine. Then try remotely.


Then on my router I've opened port 4444.

Apart of opening the port, make sure that you've also forwarding that port into the right host like:

  • PUBLIC_ROUTER_IP:4444 <-> INTERNAL_WINDOWS_IP:4444

To connect to the remote port, run:

nc -v example.com 80

or use telnet command, e.g.

telnet PUBLICIP PORT

See also: Why is "nc -l xxxx" not opening a port?

kenorb
  • 26,615