Tuesday, 25 November 2008

OpenDNS and Ubuntu

I have been using OpenDNS for a few months now and it's about time that I wrote it up.

If you want to be able to use all the facilities that OpenDNS offer, then ideally you need to setup a DynDNS account and an OpenDNS account.

First things first, I have configured my router to use the OpenDNS nameservers and

Configuring DynDNS

You may wish to use my own DNS-O-Matic updater, which I have written about here.

Having created a free account with DynDNS, I needed to install ddclient on my home server.

Installing ddclient on the server

If your router can talk to dyndns, ignore this section.
sudo apt-get install ddclient
Configuring ddclient

Edit the contents of /etc/ddclient.conf using sudo

The contents of my file looks something like this:
use=web, web=checkip.dyndns.com/, web-skip='IP Address'

It is worth checking file /etc/default/ddclient to see if ddclient is run as a daemon.
# Configuration for ddclient scripts
# generated from debconf on Tue Oct 14 15:19:15 BST 2008
# /etc/default/ddclient

# Set to "true" if ddclient should be run every time a
# new ppp connection is
# established. This might be useful, if you are using
# dial-on-demand

# Set to "true" if ddclient should run in daemon mode

# Set the time interval between the updates of the
# dynamic DNS name in seconds.
# This option only takes effect if the ddclient runs in
# daemon mode.

Configuring OpenDNS

Having created an OpenDNS account, visit https://www.opendns.com/dashboard/networks/ and click the ADD THIS NETWORK button.

Updating OpenDNS

Now that your two accounts are up and running, your need to periodically notify OpenDNS of your current IP address and your account name. This can be done using a script that I took from the OpenDNS forum here. I have a tidy and slightly different script on my home server here. Simply follow the instructions at the top of the file and away you go.

To check that OpenDNS is working, visit this link for a report: http://www.opendns.com/welcome/

No comments: