Page 1 of 1

Can't access Pi over WAN

Posted: Mon Sep 16, 2019 3:01 am
by rclason
I am pretty novice. I have a Raspberry Pi 3 and am running it for a webserver. I'm running Raspbian, PhP, Apache, and MySQL. I watched a tutorial on how to set all of this up.

I can SSH in locally and ping locally. I have it plugged in through the ethernet port. I use Comcast and have port forwarding set to 22, 80, and 443 and have the IP address locked (it says reserved).

I cannot ping or ssh in over a WAN. I can connect to the pie over WiFi (LAN). I use a Comcast hotspot to test all of this.

Re: Can't access Pi over WAN

Posted: Mon Sep 16, 2019 10:14 am
by neilgl
Ah, the address reserved in your router is only reserved in your house, the outside world can not see it.
You probably need some sort of dynamic DNS service running, so that from the internet (WAN) you can use a Domain name for your pi e.g. for apache2, http://www.myapache2.org
That DNS service links the IP address of your router (which can change) to the name. There are some free dns services around.

Re: Can't access Pi over WAN

Posted: Mon Sep 16, 2019 4:36 pm
by rclason
neilgl wrote:
Mon Sep 16, 2019 10:14 am
Ah, the address reserved in your router is only reserved in your house, the outside world can not see it.
You probably need some sort of dynamic DNS service running, so that from the internet (WAN) you can use a Domain name for your pi e.g. for apache2, http://www.myapache2.org
That DNS service links the IP address of your router (which can change) to the name. There are some free dns services around.
I must not have Apache running right. I tried reading up on how to check to see if it is running right. Do you know of any good sources to check? Probably these forums....

Re: Can't access Pi over WAN

Posted: Mon Sep 16, 2019 4:51 pm
by drgeoff
I would defer meddling with Apache until you have remote ssh working.

Re: Can't access Pi over WAN

Posted: Mon Sep 16, 2019 7:04 pm
by neilgl
Yes what drgeoff said and for apache2, the completely standard install with no mucking about will get you a basic html page you can look at on your local LAN. Then you need that other stuff to port forward port 80, have a DNS address etc.

Re: Can't access Pi over WAN

Posted: Mon Sep 16, 2019 7:11 pm
by Fraoch
Be careful here, as soon as these ports are exposed, they'll start getting hammered constantly. Make sure everything is secure before you do this - it may not be a big deal if your Pi gets owned, but it could provide a gateway to the rest of your network that might have much juicier targets.

Secure SSH first. Look into public key authentication and maybe Fail2ban as a start.

Re: Can't access Pi over WAN

Posted: Mon Sep 16, 2019 8:29 pm
by TideMan
I had this problem with a previous router. It would not allow "hairpin routing", so to access my website using its external IP address, I had to use a machine outside of my LAN. When I replaced my router, the problem went away.