I bought a Raspberry Pi 2 in order to host a web server off my ASUS RT-N66U router running the latest Merlin firmware.

I have the LAMP stack running, and also changed AllowOverride to All for <Directory /var/www/html/> in my Apache config, and have FTPed the site to that directory.

ipconfig = 192.168.x.x

CanYouSeeMe.org says IP = 24.245.x.x but that it cannot see service at port 80

On the, router I have forwarded port 80/TCP to 192.168.x.x

I own a .com which is directed to 192.168.x.x

On any computer connected to my LAN, I can access the site from both the external address and my .com address. As soon as I disconnect from LAN (say disconnecting Wi-Fi), I can no longer access any of them.

I have confirmed with ISP (COX) they allow port 80 (after I forward port). I understand that dynamic IPs will provide issues down the road.

Disregarding that issue does anyone have any idea as to why my web server cannot be connected to from the outside world?

  • What do you mean by ipconfig = 192.168.x.x? – JakeGould Feb 12 '16 at 20:30

I own a .com which is directed to 192.168.x.x.

The 192.168.x.x network range is reserved internally for private LAN networks and not for publicly accessible WAN addresses. What you need to do is set the .com address to point to 24.245.x.x.

That said, once you do that you need to also make sure your ASUS RT-N66U router can do NAT loopback/hairpinning where it will be smart enough to understand that requests for the .com address that come from within your LAN should go to the 192.168.x.x address instead of the 24.245.x.x address.

But checking the documentation for the ASUS RT-N66U router, nothing in there appears to make any reference to NAT loopback/hairpinning. So if you want to test out the website internally on your LAN you might have to manually edit your hosts file to point the .com to that 192.168.x.x address.

Regardless, there’s just no way the 192.168.x.x address will ever be reachable directly for anyone in the outside world if you connect that to your .com domain. It has to be connected to the 24.245.x.x address.

  • I updated my domain to forward to 24.245.x.x and rechecked every setting in my router. The merlin firmware github.com/RMerl/asuswrt-merlin/wiki does have NAT (actually two forms: ASUS, Merlin). I've disabled firewalls, enabled NAT, enabled port forwarding, forwarded port 80 and 100 to 192.168.x.x and still I'm getting connection errors. I've even tried 24.245.x.x:80 and 24.245.x.x:100 but no luck. Any ideas on what I should try next? Thank you for the help by the way. – Alex Kio Feb 11 '16 at 1:54
  • @AlexKio When you say, “does have NAT” pretty much any/every router in the world has NAT. That is not what you need; you need a router that supports NAT loopback/hairpinning. Past that, everything I have described should work as expected. The only thing I can think of is your Apache config is explicitly tied to the 192.168.x.x address and that should be changed. But I really have not much other advice I can provide to help you. – JakeGould Feb 12 '16 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.