0

I have two computers on my network: one Linux machine and one Windows 7 machine.

I run a

nc -l 8888

on the Windows 7 machine and I run a

nc -nv 8888

on my Linux machine to connect to my Windows 7 machine. But it doesn't work.

It works when I totally disable my firewall on the Windows 7 machine. How can I just add the specific rule for the nc my Windows machine?

For now I went to the firewall settings and created a rule for the netcat executable. I've also created a rule for the port 8888, outbound and inbound.

But it's still not working.

5
  • What have you tried and what isn't working? There are dozens of tutorials on the Internet for this specifically, and even a guide in Windows Help, to walk you through the process of opening a port in the Windows Firewall... If you have done any research on your own, let us know what you did and what didn't work. Superuser is not a site to hold your hand. :)
    – acejavelin
    Jun 10, 2018 at 14:56
  • I went to the firewall settings and created a rule for the netcat executamble. I've also created a rule for the port 8888, outbound and inbound. Jun 10, 2018 at 15:02
  • Can you append the relevant entries from the Window's firewall log? It is located at %systemroot%\system32\LogFiles\Firewall\pfirewall.log
    – acejavelin
    Jun 10, 2018 at 15:04
  • @BobReynolds - Try running from elevated command prompt: netsh advfirewall firewall add rule name="NetCat Inbound" dir=in action=allow program="C:\path\netcat,exe" remoteip=any localip=any protocol=TCP localport=8888 remoteport=8888 profile=any so you create a rule for both the exe, the port, allow access from any local or remote IP, and also from any network profile classification. Adjust the value for the full path to the NC executable file though, but this should resolve the problem for you. Jun 10, 2018 at 15:45
  • You likely just needed to add the local and remote IP addresses you allow to connect to it and to tell it what network adapter trust level /scope connections you allow to connect through it so any is like saying public,private,domain—you could be more explicit if you need and the same with the local and remote IP for just the subnet range you need. Jun 10, 2018 at 15:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.