I'm behind a router, I need a simple command to discover my public ip (instead of googling what's my ip and clicking one the results)
Are there any standard protocols for this? I've heard about STUN but I don't know how can I use it?
P.S. I'm planning on writing a short python script to do it
If the network has an UpNp server running on the gateway you are able to talk to the gateway and ask it for your outside IP address.
Discovering public IP programmatically