2

For years I've used Comcast and have had port 80 open to a web server at my house, without issue. I switched to CenturyLink fiber last week and port 80 forwarding works and my server is also visible to the outside world.

If I am at home and on the same local network as the web server (everything connected to the same router), I cannot access the sites by using the domain names. If I sign onto a VPN or turn wireless off on my phone, I can see the site by using the domain name.

I'm at a loss. Does anyone have any idea why this would happen?

  • CenturyLink fiber connection
  • C2100Z modem/router combo
frankiejr
  • 21
  • 2
  • Can you clarify what you mean by ‘‘I cannot access the domain name when I share an external IP with the server.’’?   Please do not respond in comments; [edit] your question to make it clearer and more complete. – G-Man Says 'Reinstate Monica' Nov 22 '17 at 02:26
  • You probably do not have an internet facing IP address and are therefor not routable without the ISPs NAT which doesn't forward back to your IP. Check the IP address that your router has on its "WAN" and check if you can what the ip address is of your Modem. – jdwolf Nov 22 '17 at 02:28
  • How do you know that your server is visible to the outside world? Check port 80 with porttest.net. – Tesseract Nov 22 '17 at 02:44
  • @G-Man I've edited my question. Let me know if I'm still not being clear - it's a tough thing to try and describe. Thanks! – frankiejr Nov 22 '17 at 02:49
  • @SpiderPig I can access the site by domain name if I sign onto a VPN or use my phone and turn off wireless (so I'm on the cellular network instead of the local wireless connection). – frankiejr Nov 22 '17 at 02:50
  • So you’re saying that, from another computer on the same LAN, you’re trying to access your server using its external address?  [kicken’s answer](https://superuser.com/q/1270649/354511#1270654) may be right; your router could be failing to handle the loopback.  The problem could also be in the ISP configuration.  Try reading the below, and then talk to your ISP.  They may be able to fix it for you, or at least tell you that it’s under their control and they won’t fix it. – G-Man Says 'Reinstate Monica' Nov 22 '17 at 04:02
  • See also [Port Forwarding from inner network to inner network (hairpin NAT)](https://superuser.com/q/663820/354511), [Port is open, but can’t access it via external IP address](https://superuser.com/q/987174/354511), [Can’t access local resource from WAN IP?](https://superuser.com/q/543219/354511), [What is Carrier Grade NAT (in human-readable language!)?](https://superuser.com/q/1120843/354511) and [Set up a web server behind a Carrier Grade NAT](https://superuser.com/q/1258093/354511). – G-Man Says 'Reinstate Monica' Nov 22 '17 at 04:02
  • This will only work if your router supports [NAT Reflection/NAT Loopback/NAT Hairpinning](https://www.nycnetworkers.com/real-world/nat-reflectionnat-loopbacknat-hairpinning/). Most consumer grade routers don't. – DavidPostill Nov 22 '17 at 11:23

1 Answers1

3

It sounds like the problem is that your router does not support or has disabled NAT Loopback.

If you can't enable this feature, then the solution is to have your domain name resolve to the proper internal IP address for machines on your network. If it's only a couple of machines, you could do this using a simple hosts file override. For a larger network you could setup your own local DNS server that resolves your domain instead of relying on upstream DNS servers.

kicken
  • 1,628
  • 10
  • 16