Saturday, 1 September 2007

Grab your own wan ip from record route.

Traceroute -R can sometimes provide your external IP address.
(This should be moe efficient that fetching a remote web page.)

Here is an example line.

ping -R www.cw.net -c 2 cat -n awk '{if ($1==4) print $2}'

No comments: