Friday, December 16 2005: s/No-IP/GoDaddy+ZoneEdit
So, this is what I should have done over a year ago. Total out of pocket expense was $9.20 (compared to $32.95 with No-IP) and I control the source code for the dynamic DNS client.
- Register a .net or .org domain with GoDaddy.com for US$8.95+US$0.25 ICANN fee.
- Create an account at the free dynamic DNS hosting service, ZoneEdit. Once logged in, Add a Zone for the domain you just registered with GoDaddy.
- Figure out your IP and tell ZoneEdit what it is through the "IP Addresses" section of the "Edit Zone" section.
- Note the 2 DNS servers you are assigned by ZoneEdit for your Zone.
- Once the IP is initially input, you can update ZoneEdit from a script that downloads a specified webpage any time your IP address changes. The ZoneEdit web server grabs your IP from the HTTP headers and updates your settings.
- Go back to GoDaddy.com and login to your account.
- On the "Domains" fly-out menu, choose "My Domain Names" to bring up the "Manage Domains" section.
- Click the link for your domain name from the Filter Domain List.
- Unlock the domain.
- Click the link in the "NameServers Summary" to modify your DNS servers, and input the 2 ZoneEdit DNS servers.
- In a few hours, everything will be updated and ZoneEdit will begin responding to DNS requests for your domain.
Here's the bash script, chipd, that keeps track of when my IP changes:
ipsrc="http://192.168.1.1/advstat.htm"
waitstate="5m"
datefmt="%n%Y-%m-%d %T"
if ! [ -n "$myip" ];
then
myip="127.0.0.1"
fi
date +"$datefmt"
echo "Starting $0..."
while [ -n "$myip" ]; do
date +"$datefmt"
echo "Grabbing current IP from $ipsrc..."
newip=$(lynx -source $ipsrc | grep "<td class="s5"> " | awk -F; '{print $2}' | awk -F< '{print $1}' | awk -F. '{if ($4 != "") { printf("%s.%s.%s.%s", $1, $2, $3, $4) }}')
if [ "$newip" == "$myip" ];
then
date +"$datefmt"
echo "IP hasn't change ($myip)..."
else
date +"$datefmt"
echo "New IP detected (old=$myip, new=$newip), updating..."
zedit
fi
myip="$newip"
export myip
sleep $waitstate
done
And the script, zedit, that pulls the ZoneEdit update page:
lynx -source -auth=luser:passwd 'http://dynamic.zoneedit.com/auth/dynamic.html?host=zonename'