i Have created a local web app hosted on my raspberry pi. I want to access the web app from outside so outside the local network. To do that, I have configured dmz and I have added my raspberry local ip address.
Now how can I get the raspberry public ip address?
I have tried to use the bash commands: curl checkip.amazonaws.com
. But the ip address i get is the same as my computer
How can I solve it? how can i access the raspberry from outside?
P.S: I control my raspberry via ssh
thank you :)
Your public address is the same for every device on your network because it's the IP address devices OUTSIDE of your local network see as illustrated by this quick diagram I've made.
If you want to access your local webserver you need to tell your router to forward requests to a given port to a local network address. So assuming your webserver is running on port 80 you need to tell your router to forward requests to 192.168.1.50 (assuming your RPi local address matches the diagram's)