Khov
Posts: 11
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Cannot access RASPBERRY from out of local network

Mon Sep 11, 2017 9:33 pm

Hi everyone,

I want to create a little website with my PI. For this I have began with this tutorial https://readwrite.com/2014/06/27/raspbe ... e-hosting/.

All what I have done :
  • Install Apache on ma PI

    Code: Select all

    sudo apt-get install apache2 php5 libapache2-mod-php5
  • Restart Apache on ma PI

    Code: Select all

    sudo service apache2 restart
  • Test the connection to my server with the IP address of my PI on my local network and it works

    Code: Select all

    sudo service apache2 restart
  • I have turned my IP address into a fix IP adress. I have done this with my ISP OS which is FREEBOX OS (I'm in France)

    Code: Select all

    sudo service apache2 restart
  • I have created a PORT redirection to connect my PI remotely through internet
So, to summarize, I have created a server which is working. I can connect to it with the IP address (which is fixed) of the PI from the local network. But I cannot connect to my PI out of my local network. I write 192.168.0.xx:9898 and the browser never stop to run without going on my PI server.


Thank you if you can help me!

klricks
Posts: 4812
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Cannot access RASPBERRY from out of local network

Mon Sep 11, 2017 9:44 pm

192.168.0.xx:9898 is a local IP address.
You need to use the public IP address as shown in your routers status page or use an on-line port scan tool: http://www.t1shopper.com/tools/port-scan/
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://blackeagle12.net/Comp/RPi/Rpi.html Click contact icon then world icon --->

Khov
Posts: 11
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Re: Cannot access RASPBERRY from out of local network

Mon Sep 11, 2017 10:25 pm

Thanks a lot for your answer.
I have tried to connect to my public IP with the website you send me, but it responds this :
Scanning ports on 82.241.xxx.xx
82.241.xxx.xx isn't responding on port 9898 (websm).

I don't understand what I have missed to do. Thanks if you know what I have not done.

klricks
Posts: 4812
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Cannot access RASPBERRY from out of local network

Mon Sep 11, 2017 11:23 pm

Does the Internet IP address shown in your routers status page match the IP address shown in the on-line scanner (82.241.x.x)?
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://blackeagle12.net/Comp/RPi/Rpi.html Click contact icon then world icon --->

Khov
Posts: 11
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Re: Cannot access RASPBERRY from out of local network

Thu Sep 14, 2017 10:08 am

Thanks again for your help. I have finally understood my mistake. I'm a beginner in network.
  • My mistake was that I wrote on the URL browser the local IP of my Raspberry (first error). As you told me, I should have used the public IP of my router.
  • My second mistake was that I didn't have changed the listening port of my Rapsberry. It was still listening on the port 80 whereas I indicated on the OS of my router another port number.
Hope this explanation could help other ones with the same mistake...

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 8 guests