Zoneedit.com Dynamic DNS update script
June 13th, 2008 | by Sean |We use both DynDNS and ZoneEdit for our Dynamic DNS. We use inadyn for our Dynamic DNS Custom Zones, but since inadyn uses DynDNS’s checkip service, it doesn’t seem fair to use it for our ZoneEdit zones too.
zoneeditscript is freshly written as of 12th June 2008, so maybe there will still be a few bugs! Installation is simple – just copy the 2 files to wherever you want them on your system (we have them in /etc). Configuration is fairly straightforward – see the notes in the files zoneeditscript and zoneedit.hosts:
The script checks a router’s WAN IP address by SNMP or by using whatismyip.org. It defaults to whatismyip.org, changing it is a matter of moving the comment symbol. Use SNMP if your router supports it, then your IP-change check only uses LAN traffic, but be warned – neither of the cheapo routers I tested it on could cope with repeated SNMP traffic! There’s plenty of output from the script, both to stdout (we redirect it to a file, for stats) and to the system log for actual IP changes and error conditions.
If you are hosting many domains on a Dynamic IP address, you can list them all in zoneedit.hosts:
Other features… not many. After updating the zoneedit.com zones, it goes to sleep for an extra long time. This is an effort to reduce the effect of any error in the script that causes repeated queries to zoneedit.com. If you’re in the bizarre situation of needing to make repeated updates of your WAN IP address (maybe you’ve got intermittent connection / testing your router’s power switch?), you can killall -s SIGHUP zoneeditscript and the update should run immediately. If you’re adding sites to the zoneedit.hosts file (did I say it could cope with lots of domains, not just one?) you can also force an update this way.
What else do you need to know? No licence, none needed. If you’re home hosting, I hope it saves you some time. Maybe our paths will cross one day and you can buy me a coffee. I like Bakewell tarts.
Happy hosting!
Edit: My el-cheapo Caremo router has become unresponsive, possibly as a result of all the SNMP queries. I’ve emailed telogy.com (now TI?) to ask why. It was still routing effectively, but not responding to SNMP, telnet, ssh! And further edit: I plugged in an unreliable D-Link G604T the Caremo replaced (I have terrible taste in routers), and got no further than 90 queries before it too stopped responding. They both come back after a ‘rest’, so perhaps the ‘query as fast as you like’ needs to take into account how awful your router is under load.
4 Responses to “Zoneedit.com Dynamic DNS update script”
By website design on Jun 13, 2008 | Reply
What’s wrong with ez-ipupdate?
By Sean on Jun 25, 2008 | Reply
Not much, probably. For fairly trivial admin tasks, I prefer to use shell scripts – I don’t need a development environment to maintain them! As much as anything else, zoneeditscript is a way of testing all the WAN IP discovery methods in the What’s my IP address article. Ping route recording works best for us, ez-ipupdate doesn’t offer that. We haven’t used ez-ipupdate, but we do use inadyn for our DynDNS.com service. That has terminated on network errors in the past – a severe problem in a Dynamic DNS updater.