Networking – Access external IP from inside the network

dnsnetworkingport-forwardingrouter

I have setup a subdomain sub.example.com in the DNS-records of my domainname-provider that I linked to my external IP. I then forwarded port 80 in the router (Sitecom Broadband Router 54G) to the IP of my computer in the network. Now I can access the Apache server on my computer from outside using the subdomain.

But from inside the network, I can't access the subdomain. I guess this has to do wih the fact that I simply can't access the external IP from within the network, the router seems to block these requests.

I don't want to use the internal IP, since using the subdomain in all cases is easier to setup (I use my laptop inside and outside the network).
I also don't want to change the hosts file, since this wouldn't work both inside and outside the network, I guess.

Any way to fix this, or should I get a new router?

Best Answer

Most SOHO routers don't support hairpin NAT (AKA NAT loopback), which is accessing an internal machine via the external IP, from inside the same LAN.

You need a better router. If your router supports the 3rd party DD-WRT firmware, you may want to try that. To configure hairpin NAT in DD-WRT, you can consult other SU questions such as:

DD-WRT: How to allow port forwarding to apply to requests originating from inside the LAN?

Related Question