Tomtippee
Posts: 3
Joined: Fri Sep 21, 2012 1:33 pm

No Public access to my Raspberry Pi website.

Tue Oct 02, 2012 5:08 am

I did the following:

1) Installed the latest release of Debian Squeeze on my Raspberry Pi
2) apt-get Apache2 and PHP
3) wrote a small PHP app to display a single PHP page
4) set my Raspberry Pi to have a static IP address (192.168.1.2)
5) set my ADSL2+ router to have a Virtual Server with address 192.168.1.2, and permitting inboud connections on HTTP port 80 and SSH port 22
6) accessed my wesite from my LAN behind the router: "192.168.1.2/index.php" -- no problems
7) found out my public IP address and submitted "aaa.bbb.ccc.ddd/index.php" from my LAN, again no problems
8) tried "aaa.bbb.ccc.ddd/index.php" from the public Internet outside my LAN. PROBLEM: Connection timesout
9) to eliminate my router and connection as the problem, I did the following: setup a website (Apple's MAMP) on a machine on the local LAN. Submitted "aaa.bbb.ccc.ddd/mamp.html" from the public Internet and got the expected response.
10) I guess step 9 confirms it's not a router setting or my ISP blocking inbound connections... (?)

QUESTION

a) Is there anything I need to set in apache2's conf file to allow access to the public Internet?
b) Is there anything else in the website config that might be blocking inbound public internet connections?

Any help anyone can give would be greatly appreciated.

Cheers

Tim

MiErY
Posts: 2
Joined: Wed Sep 26, 2012 6:24 am

Re: No Public access to my Raspberry Pi website.

Tue Oct 02, 2012 10:56 am

a) default no
b) default no

Port Forwarding on ADSL router.

Forward outside port 80 and 22 to 192.168.1.2 LAN ports.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: No Public access to my Raspberry Pi website.

Tue Oct 02, 2012 11:12 am

Many Internet service providers throttle your upload speed some will even block commonly used TCP ports for file transfers the bottom line is they don't want you running file / web servers for personal use.
If you find that you’re still unable to access your PI web server even with a router port forwarding rule then you need to change the default port number to something else.

Richard S.

c g
Posts: 7
Joined: Thu Sep 20, 2012 5:44 am

Re: No Public access to my Raspberry Pi website.

Tue Oct 02, 2012 11:38 am

Which IP-address in the LAN does your router have (probably 192.168.1.1)? Did you set the default gateway on your PI to that address?

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: No Public access to my Raspberry Pi website.

Tue Oct 02, 2012 11:47 am

How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: No Public access to my Raspberry Pi website.

Tue Oct 02, 2012 5:36 pm

In my experience No 7 doesn't work if properly set up, it usually confuses the hell out of the router because the request is coming from the same place its supposed to be port forwarding to. I have a publicly accessible webserver setup (Not a Pi but a Arm based NAS box) and I have to use its internal LAN ip from the LAN. I put an entry in my local hosts file so I can access it from the same domain name as outside :

http://pluggy.is-a-geek.com
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

r0nnie
Posts: 49
Joined: Fri Aug 03, 2012 1:53 am

Re: No Public access to my Raspberry Pi website.

Tue Oct 02, 2012 9:16 pm

i had a problem not accessing my site from outside my network too

my problem was i had port 80 open for two diff devices on my network. soon as 1 got removed my rasp pi site could be accessed from outside my network

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: No Public access to my Raspberry Pi website.

Tue Oct 02, 2012 9:36 pm

a) Is there anything I need to set in apache2's conf file to allow access to the public Internet?
As said the default is no but check

Allow from all

search the doc for Allow from and make sure there is nothing but Allow from all

Also check Deny statements to make sure there are no conflicts

To check on the Pi if it is your router open port 80 to the Pi then go here:

http://www.whatsmyip.org/port-scanner/

And do server port test if 80 isn't open your router config is wrong
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

Return to “Troubleshooting”