Networking – Why can’t I access the own web server from the local network

domaindynamic-dnsnetworking

I have a web server in my home network and I'm using ZoneEdit for dynamic DNS. It's accessible perfectly to everyone outside of my local network, but since I switched to a Gateway 2Wire DSL modem/router I'm unable to use the domain to access the server from my network. I can access it via a local IP or by putting it in my Windows hosts file but this is annoying to do on every computer and for every subdomain.

Any idea how I can fix this? Thanks!

Best Answer

This question should not have been migrated from serverfault.com, as it is a common system administration issue faced by admins and IT guys every day.

In short, certain router setups/network topologies prevent you from accessing the external address of the network from within the internal network, especially when traffic from the external address is sent back to the internal network anyway. Look at the following topology:

[A] Web --> [b]External ip address ---> [c]Router/firewall/gateway[d] ---> [e]Actual server ip address

The problem is that while users from [A] can see [e] by going to www.imaginaryplace.com, people inside the lan going to that address really want to go straight to [e] - and the router/firewall/gateway setup isn't bright enough to send traffic coming from [e]s local network all the way to [b] and then back to [e], where it would become confused by the [d] to [c] to [d] path and likely drop the traffic.

The fix is to a) use a different URL for internal traffic, like inside.domain.tld or b) use split DNS where the name server knows that requests coming from certain addresses get handed addresses on the [e] network, or using hosts files on the internal workstations which override the external DNS requests. On small windows networks, this is a job for batch files.

In most events, the way to fix it is to a) use split dns, where you hand out a different IP address

Related Question