I have set a static local ip on a raspberry pi and I can reach it on my lan by ssh email@example.com.
I am also sure that the rpi has access to the internet because I am able to run wget command without error.
Now, I would like to make a script to email my public ip when it changes, but when running ifconfig command or ip address I can't find it. Only when doing things like curl ifconfig.me I am able to retrieve it. Do you have any idea why ?