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.

3
  • Yes, it's a network problem that means the port forwarding rules are incorrect or there's a problem with the router or the way you're trying to establish the connection. You know you'd need to use the public IP when accessing from outside, don't you?
    – user772515
    Feb 27, 2018 at 0:21
  • Which version of nc you've got, can you paste it? And the exact output of the error?
    – kenorb
    Feb 27, 2018 at 12:25
  • I don't understand your network setup: You have a home network connected with a router to the Internet (cable or ADSL), right? To this internal network is your Windows PC connected, right? How did you start the netcat-Listener? netcat -l -p 4444? How is your Kali connected to the Internet? How did you configure your portforwarding? Did you verify it somehow? Feb 27, 2018 at 12:27

1 Answer 1

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?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .