Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to forward some ports (1666 for perforce, 8081 for Hudson) on my Internet Gateway machine. This machine is running Windows 7 (64 Bit, legal, user-account) and connected to the Internet via cable modem (it's not a router). The Windows machine is sharing its Internet Connection via ICS and that works fine on all connected computers.

I can access the services via the gateway's public IP (95.x.x.x) on the given ports if they are running on the gateway machine itself. I've added the ports and destination IP address (192.168.0.18) in the Internet network adapter's Advanced Settings dialog (Sharing tab). That's the same dialog where you have a list of preconfigured services like HTTP, FTP and other incoming services. When I do that I can't connect to the services anymore. For some reason port forwarding isn't working.

I have uninstalled Bitdefender because I wanted to check if the Firewall interferes. I've also disabled the Windows Firewall and Defender to no avail. I tried a freeware tool that helps to setup port forwarding but that didn't work either.

The target machine is a Mac OS X computer whose Firewall is disabled. The IP is static. I can successfully connect to the services using the local IP address (192.168.0.18) from two different machines, including the gateway computer. So internally and externally it seems to me that the ports are open and not blocked, and the issue is with port forwarding itself.

From what I understand it should be enough to add an entry to the Advanced Settings dialog to enable port forwarding when there are no firewalls interfering. How can I troubleshoot why port forwarding isn't working for me? What steps should I follow to alleviate the issue?

PS: I gladly accept command line solutions.

Other things I've tried:

  • adding an Inbound Rule to Windows Firewall for the 1666, 8081 ports
  • trying with Windows Firewall enabled and disabled
  • disabling/enabling the network adapter
  • double-checked that the IP addresses are correct
  • mapping a different incoming port to the service's actual port
  • followed or checked the misc tips in this article

What I haven't dared trying yet (let me know if it's worth a shot):

  • disable/enable ICS
  • remove all network adapters (via Control Panel), then re-install and re-configure them
share|improve this question
add comment

2 Answers

Solved.

After resetting the Windows Firewall to default settings, and disabling ICS and re-enabling it, I was able to get port forwarding to work but not without using the Passport tool which installs port forwarding as a Windows service (you have to run it with Admin privileges).

The good thing about Passport is that you can port forward DNS addresses as well, not just IP addresses. So something like this is possible through Passport's interface:

myserver.no-ip.org:8081 --> 192.168.0.18:8081
share|improve this answer
add comment

In Windows 7, you can manually set up port forwarding from the command-line like this:

netsh interface portproxy add v4tov4 listenport=1666 listenaddress=95.x.x.x connectport=1666 connectaddress=192.168.0.18 protocol=tcp
  • even though you are only using IPv4, you do have to make sure IPv6 is installed for this to work.
  • if you need to forward UDP as well, then I would use this great small open source utility, as netsh int portproxy only works with TCP
share|improve this answer
    
edited answer to make correction about forwarding UDP packets –  johnL Jan 13 at 19:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.