Wednesday, 26 November 2008

DNS-O-Matic Updater

News: update-dnsomatic stable version 0.1 released 29 November 2008 at 13:00 GMT. I have moved the project to Goggle Code as my home server is only up 90% as a rule.

As I am a user of both opendns and dyndns I realized a while ago that it was a bit of a chore to keep them both up-to-date with my ever fluctuating home IP address. On discovering that DNS-O-Matic will update them at one fell swoop, I was hooked.

Time passed and as I was writing up installing ddclient, I was inspired to see if I could knock up a client of my own which would be designed specifically with DNS-O-Matic in mind.

Well, 24 hours and one abuse report from dyndns (sorry guys) later and it is done.


It's written in Perl and doesn't use any fancy modules so should work out of the box once installed.

It is written very much with Unix/Linux in mind but is simple enough to amend for other operating systems.

It only perfoms update notifications if your IP address has changed since it was last run.


The whole package complete with README, a sample configuration file and script can be found here.


After downloading, extract the file update-dnsomatic-0.1.2.tar.gz and then edit the file config with a minimum of your DNS-O-Matic user id and password.tar xvzf update-dnsomatic-0.1.2.tar.gz
cd update-dnsomatic-0.1.2/

# edit ./config with your editor of choice
# A sample config file:
user = my_user_id
pass = my_password

# as root or sudo:

You may wish to assign the myhost configuration item with your domain name if you only wish to update that domain. If you don't assign myhost then all your DNS-O-Matic services will be updated.

A picture of the DNS-O-Matic status information. One update done by me and two by them.


tim said...

Thanks a lot for this code, I find it works much better for dns-o-matic than ddclient. Looking forward to further work from you!

Edward said...

Does it pass your username and password securely?

prawn said...

Hi, Edward. Yes, it does. It uses the https scheme so no clear password is sent over the network.

pelox said...
This comment has been removed by the author.
pelox said...

OMG! aptitude purge ddclient!!... Thanks a lot for this piece of software.

P.D. I have to install two perl libs (Debian):

* liblwp-useragent-determined-perl
* libcrypt-ssleay-perl

Thanks again :)

Robbie said...

Will this work with OpenDNS as well? Or can you modify it to?

prawn said...


Yes, it should work with OpenDNS on it's own though I have not tried it.

The configuration should be:

user = your OpenDNS account name
pass = your password
myhost = your OpenDNS account name
host =

I know there is redundancy with having the the OpenDNS account name entered twice but that's because the update API for OpenDNS works that way.

Give it a go and see if it works.

prawn said...

Robbie, part 2

I have had a re-read of OpenDNS API again and can put a null value for myhost thus:

user = your OpenDNS account name
pass = your password
myhost =
host =

Either of my suggested myhost values should work though.

prawn said...

Robbie part 3.

Yes it *will* work with OpenDNS with one minor code change on line 176 of update-dnsomatic.


these values are the titles of the authorization prompts of the https session.

In the long run, I'll make this a configurable value and will apply it in the next release.

That said, why not just create a DNS-O-Matic account and update OpenDNS from there ;-)

prawn said...

Right, I have made an amendment to the code and version 0.2.0 is downloadable from the google code repository.

It's a minor change to allow user authentication without needing to know the realm that you are connecting to - making it easier to use the code for other services with a similar API.

As an example, to update OpenDNS without using the DNS-O-Matic service, your config file should read like this...

user = opendns user
pass = password
myhost =
host =

That's it.

I'll update the blog-proper later on in the week.

Jason Roysdon said...
This comment has been removed by the author.
Jason Roysdon said...

Thank you for a great piece of software! One suggestion I have is that folks may want to add > /dev/null to the end of the cron. Or perhaps you might add a -q flag to make it quiet when there are no errors, and perhaps a -Q to make it quiet even with errors (internet down, whatever). The point of both is so that cron isn't spamming the inbox of the account it is running as.

I installed it on Fedora 12. I needed to install two perl RPMs via yum (whicn in turn yum installed one more perl RPM to resolve a dependency automatically, perl-Net-LibIDN):
sudo -c 'yum install perl-Net-SSLeay perl-IO-Socket-SSL'

Jason Roysdon

prawn said...

Cheers for the comments, Jason.

I will get round to doing some up-to-date documenting "soon" ;-)

prawn said...


I have taken your comments aboout -q and -Q args on board and will have a look to implementing it in the next week or so.

I have done a quick-and-dirty version that I will use for the next week and see if any horrors emerge while writing it all up.

Expect a release of version 0.2.1 sometime in a week to ten days.



prawn said...

Ahem. I have been a little distracted, recently.

Shall make some changes /soon/.