Why can't i access my public IP-Adress from outside my LAN?

I'm setting up a webserver on my Raspberry PI and I want to make the webserver available on the internet.

I have Portforwarded incoming requests on mypublicip:80 to be forwarded to myraspberrypiip:80 and that should be it right? but it does not work.

In the configuration file of the apache server it says that it is listening to port 80. I have tried to turn off the firewall on my router but nothing changes. I have tried to access the webserver trough SSH (with PuTTY) and added a portforwarding rule that it should forward requests on mypublicip:22 to myraspberrypiip:22 (when i sat in my local publiclibrary and studied and used its wifi) nothing happend i probably did that wrong or something. My IP address for the raspberry pi is static. I can however access the website when im connected to the same wifi and entering its ipv4 adress in the webbrowser.

I saw this answer on another post of a similar problem at Server Fault.

I think he is on to something here that is relevant to me but do you guys have any suggestions?

8

2 Answers

I suspect that you are behind carrier-grade NAT (CGNAT). As one user said, the public IP address your router reports is not a public address in the common sense of the term at all. Traffic from outside your ISP's network will not reach the address.

The address "appears" to work because you are attempting to access it from inside the ISP's network. That is why accessing from the local library doesn't work.

I suggest using the tool CanYouSeeMe and probing the ports. I suspect you will get a time-out error. If that is the case, you are indeed behind CGNAT.

You cannot do anything to resolve this issue yourself. You must contact your ISP and inquire whether they can remediate the situation. Often, extra monthly payment is necessary.

3

Solved

I turned on DMZ on my WiFi's GUI and added my Raspberry pi´s Local ip adress and the webserver is now accessible on the internet. Thanks for all the answers!!!!!

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like