Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm encountering this strange problem which has baffled me to the ground, and which I haven't encountered even after years of doing port forwarding .. ! I am hoping somebody here can help me solve this mystery .. :)

My network configuration is as follows:

I have a DSL modem (custom made and branded by my ISP) which is receiving a DSL stream ... it has an external IP which is visible to the world, say, ... This modem has DHCP enabled, has an internal IP for itself, which is .. it is connected to 2 laptops via and ethernet cable .. Laptop 1 has IP, and Laptop 2 has IP ...

On Laptop 1, two applications are running, jDownloader and Media Player Classic, which have their web interfaces on ports 8765 and 13579, respectively ... I can access both of these web interfaces from Laptop 2 by opening these addresses: 192.1681.2:8765 and ... both of their web interfaces open up, meaning the web interfaces are working fine ..

Moving on, I now want to access these web interfaces from outside my network as well, and so I've configured port forwarding in my PTCL modem to forward all traffic on ports between 8000 and 14000 (both TCP and UDP) to IP ... I have verified that port forwarding is working by testing it using's port checker tool, and this website too: [URL][/URL]

When I use the website, if I'm running the applications on Laptop 2, the website reports that the port is open .. if I then close the application, the website reports the port is closed ... This makes sense as nothing is listening on my machine in the latter case .. Also, if I disable port forwarding in my modem, again, the website reports the port is closed ... so, the website's results seem to be okay ...

Same of the above can be said when I'm used's port checker tool ... So again, everything okay so far ...

Now, here comes the problem !! ... Despite the above tools reporting that port forwarding is working, I am unable to open the web interfaces from outside my network ... So for example, if I tried to browse or, nothing opens in my browser ... But if I accessed these web server's locally from Laptop 3, by typing in or, they opened ...

So where is the problem here ?? The tools report unanimously that port forwarding is working, and yet I am unable to open the web interfaces from outside the network ..

Also note that I have disabled the firewall from my computer, and have also made sure that any option in the above programs (whose web interfaces I am trying to open) that says only local connections are to be accepted, is disabled ...

So whats the problem ... ?!! Any ideas ??

share|improve this question
Maybe try installing custom web server, check if you can visit it from internet and examine its logs if you can't. – Anton Barkovsky Jun 23 '11 at 20:51
Are you really trying from outside your network, or are you just going to your router's public IP address from inside your network? – Spiff Jun 24 '11 at 3:42
Well I have a dynDNS dymanic hostname which redirects me to my public IP ... I assume that when I type in my hostname in a browser, I'm technically coming from outside my own network .. – Ahmad Jun 24 '11 at 11:52
Also, I tried telnetting to the two ports ... could not connect, so according to this, the ports are closed .. – Ahmad Jun 24 '11 at 11:53

The NAT gateway code in your router isn't doing "hairpin NAT" correctly. Many NAT gateways don't get this right.

When have an internal machine request a connection to a port on the public IP address of your NAT gateway, the NAT has to first do "outbound NAT", translating the packet as if it's going to go to an external host, then realize that the NAT gateway itself is the "external" host that's being requested, and then look at its port mapping table and turn that packet right back around and do "inbound NAT", sending it to the port-mapped host.

This idea of a packet going mostly out through the NAT, then being turned right back around and sent back in, is likened to the tight, doubled-back-on-itself curve in a traditional hair pin (much the same way a tight switch-back turn in a road is called a "hairpin turn" or "hairpin curve").

Possible solutions:

  • Get a firmware update for your NAT gateway box that fixes this bug.
  • See if you can configure this in your NAT gateway box.
  • Load a third-party firmware distro on your NAT gateway box that doesn't have this problem, or that can be configured to not have this problem.
  • Buy a different home gateway product that doesn't have this problem, have the new box be your NAT gateway, and make your DSL modem act as just a simple modem/bridge, not a NAT gateway.
  • Live with it. You can actually connect to your port-mapped services when you are truly outside your network, so maybe you can live with the fact that you can't fake it from inside the network.
share|improve this answer

Your Answer


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.