0

I recently set up a web server on my office network with a domain let's say example.net

Everything works perfect outside of the network when I visit example.net, it connects to the webpage just fine.

Although when I visit example.net while on the same network as the webserver it pulls up my Comcast Business router's configuration page.

What would I need to do in order to have example.net route to the proper IP and pull up the web server and not the router.

Thank you.

3 Answers3

2

The DNS name probably resolves to the external IP-address of the router, where port-forwarding rules forward the traffic to the internal IP-address of your web-server.

You need to use the internal IP-address or an internal name when on the web-server LAN or you need to implement split-DNS - configure your LAN DNS service to resolve www.example.net to the internal IP-address.

UPDATE: Or, as Joseph mentions in a comment, add an entry to the hosts file on any PC on your office LAN that needs access to the webserver. Usually C:\Windows\System32\drivers\etc\hosts

0

Your DNS is resolving to the IP of your router which in turn is forwarding the connections to the web server. When you attempt to access it from inside the network, it's going to the configuration page because you are part of the network. To access the web server from inside your network, you need to use the internal IP of the web server.

UPDATE:

This question attempts to answer your problem: Access internal IP using public IP

paradd0x
  • 9,351
0

This effect is due to hairpin NAT. https://serverfault.com/search?q=hairpin+nat

Externally the firewall/router handles it fine, but internally, you need to point at the local internal IP address.

KCotreau
  • 25,622