≡ Menu

Determining the External IP Address

Here’s how to find out your external IP address courtesy of this hint:


curl --silent http://checkip.dyndns.org
    | awk '{print $6}' | cut -f 1 -d "<"

If you are using Apple’s Airport Extreme Basestation (mine is particularly the Time Capsule and this is where I have tested this), and you have the SNMP interface enabled, you can run the following command

prompt$ snmpwalk -Os -c public -v 1 ipAdEntAddr IpAddress 
    | grep -E -v '(127.0.0|169.254|' 
    | cut -d : -f 2 | sed 's/ //g'
{ 0 comments… add one }

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Next post:

Previous post: