Your External IP Address

To see your external IP address, use this subdomain that I’m providing for your usage free of charge:

http://extip.gaborhargitai.hu

To use it in a script (for instance to mail yourself the rotation of an IP address change on a remote server) use a nice little shell script like this (preferably in a crontab):

#!/bin/bash
IPFILE=~/ipaddress
CURRENT_IP=$(curl -s http://extip.gaborhargitai.hu | awk '{print $1}')
if [ -f $IPFILE ]; then
KNOWN_IP=$(cat $IPFILE)
else
KNOWN_IP=
fi
if [ "$CURRENT_IP" != "$KNOWN_IP" ]; then
echo $CURRENT_IP > $IPFILE
echo $CURRENT_IP | mutt -s "New External IP: $CURRENT_IP" your_email_address
fi

It is also available thru my GitHub repository.