1

So I bought a Raspberry Pi the other day, and was hoping to set up a (tiny) public LAMP web server, as proof-of-concept to myself.

I've done everything online. Literally everything. The Pi works great as a local server. Can access my website and everything. But trying to access it publicly poses tons of problems. Here's what I've done so far:

  1. I've set up port forwarding on port 80 to the Pi's router-assigned static IP-address.
  2. I've tried using my local IP 192.168.8.111, but obviously that was a stupid idea. Then tried using my public IP, but to no avail.
  3. Pointed my domain to my public IP (27.31.1X.XXX), but no luck. Get a "1.1.1.1:81" could no be reached error.
  4. I think one other thing but can't think of it. Perhaps you fellas will jog my mind.

I've not used any DynDNS or other static-IP service since I'm just working with a proof-of-concept right now. Don't need it to actually work forever.

Any ideas?

2
  • Not all routers are capable of port forwarding traffic on the public interface when it originates from their internal network. This NAT routing problem is called hairpinning. Try to test your port forwarding from a different network.
    – HBruijn
    Jun 23, 2014 at 7:45
  • possible duplicate of Hosting a web site at home: ISP Blocking port 80?
    – tombull89
    Jun 23, 2014 at 15:07

3 Answers 3

0

Sometimes router has firewalls that blocks port 80, please check that. Also sometimes ISP's tend to block port 80 to prevent their subscribers from running web servers, to reduce bandwidth of course. If your ISP does block port 80, try forward it to different port, say port 87. You would need to set up your router to forward traffic on port 87, and you would need to configure your web server to host your website port 87. If both fails try see if your PI can access the internet, sometimes wrong network setup is done and causes such problems.

0

Your ISP might be blocking the port-forwarding to your IP. its common practice by ISP's to do this to prevent user from running their own servers. I suspect that also you a using sharing an ip with several user therefore cannot forward to your server.

try using http://www.canyouseeme.org/ to confirm if port 80 is open to the world

0

First, double check your Apache configuration on the RPi and make sure it's not listening on 127.0.0.1 or localhost.

Check your port forwarding on your router and make sure you forwarded TCP port 80 and not UDP port 80.

Ensure you don't have any iptables rules on the RPi possibly filtering traffic. Try flushing all iptables rules. Also double check your router's configuration to ensure there's no weird firewall or filtering options configured. (You may consider connecting your RPi directly to your home Internet connection if possible and not go through your router as an additional troubleshooting step if needed.)

Try http://{your PUBLIC ip} from a system outside of your network (e.g. try accessing on your phone while only connected to cellular or have a friend try to access from their home). Worry about your domain name after you can confirm connecting to it with the IP specified.

If that doesn't work, try changing your Apache and port forwarding configuration to a different port such as 8888 or 48888, and try to go http://{your public ip}:8888 or similar from your phone. If an alternate port works, your ISP is blocking incoming requests on port 80.

If that still doesn't work, your ISP may be blocking all incoming traffic to you, this is common if your main ISP is a cellular service. You will need to look into setting up or using an existing VPN that's accessible outside of your home network to work around this.

You must log in to answer this question.