Need a way to get your public IP for a script? This can be tough if you’re behind NAT. Try this site, “ip.appspot.com”. It will return only the public IP that it sees your request come from.

Use “curl” to get it from the CLI or a script. (curl ip.appspot.com)

That is all. Class dismissed.