Nat – Can’t access a URL with custom port from inside the LAN, but can from outside

nat;networkingport-forwardingwifi

I need to access a page in my dev server via internet. Since my ISP provides me a dynamic IP, I set this POC scenario:

  • I'm using NO-IP to translate the url to the actual IP.
  • I set a SERVA64 portable server up, with a plain html sample page, in
    the 8055 port.
  • I set a FileZilla Server up, in the 21 port.
  • I turn my firewall off, to minimize access problems.
  • I configure my router (DLINK DI-524) to port-forward the 8055 port to
    my dev server.

Since I can't upload images yet, you can see this question in my Stack Overflow question here: https://stackoverflow.com/questions/9915133/strange-portforward-behavior

All set, I tried to access the test page using the url: when I used my 3G modem (red path), I could reach the page, but when I used my LAN (blue path), I could only reach the page using the internal IP/name.
The interesting thing: when I access the FileZilla service, I can connect in both ways!!!

Added: I run SmartSniff to capture the UDP/TCP traffic, and in both requests the behavior is exactly the same: there is an UDP call to resolve the DNS (google 8.8.8.8), and a TCP call to the public IP of my server. The call made for the Filezilla Server runs ok, the call made for the Serva64 web server can't reach the sample page.

Best Answer

Your router doesn't support hairpin routing. This is normal for consumer grade networking equipment. Nothing you can do about it, sadly.

Related Topic