Connecting to home nginx server through outside (public ip)

October 17, 2014 2.9k views

Hi all. A week ago I had Ubuntu with an nginx server running on my virtualbox on my laptop. You could access it through the public ip of our house, everything was great. Then I bought a raspberry pi, and got everything set up the same way on it but with Raspbian, Debian, nginx. The problem is that I can't access the website outside the home network. I can while on the house wifi. And I can even putty in from outside of the home network (and from inside too). But not the website. I'm forwarding ports 80 and 22 to the raspberry pi which is connected through wifi with a dynamic ip. So the 22 port forwarding is working for ssh, putty. And probably 80 too is working? but the website won't load from outside of the home network.

That the web page will load from inside says that the server stuff on the raspberry pi is working. And I don't know how the port forwarding could be messed up for just port 80, pretty straight forward. And I'm going to the right public ip address.

note: i was messing around with setting a static ip for the pi before starting the server and was making the private ip = .... that wouldn't mess up anything right? Not using that now and I changed everything back to the initial settings.

Thank you very much.

1 Answer

I've faced similar problems before with self-hosting web stuff. Some internet service providers use port blocking to prevent users from hosting web/email servers (the user still can, however traffic directed at them on port 80 (web)/25 (email) will be dropped). It's a precautionary measure apparently.

If that could be the case, contact your ISP and ask if they have port blocking/block port 80 from their end and if so, is it possible for it to be disabled?

It might work while you're on the network and try browsing to the public IP, but that would be the router allowing loopback, the traffic isn't actually going externally to the ISP then back.

  • Solved. For some reason, I thought the router and isp were the same. Cox was blocking port 80. Perfect. Thank you.

Have another answer? Share your knowledge.