Your External IP Address

December 30, 2011

I found myself needing to know my external IP address from a local unix script on OS X. Usually whatismyip.com works fine, but I needed a quicker way to find it programmatically. This script simply returns a string representing the IP address my webserver saw from your request. Feel free to script against this. For example, if you have curl installed try

curl http://thom-patterson.com/code/IP_Grabber/

Your External IP Address