OpenDNS markets itself as the fastest growing internet security and DNS service. OpenDNS is the leading provider of security and infrastructure services that make the Internet safer through integrated Web content filtering, anti-phishing and DNS. OpenDNS services enable consumers and network administrators to secure their networks from online threats, reduce costs and enforce Internet-use policies.
For OpenDNS to work the service needs to know which IP address your network resides on. If like me your internet service provider assigns you a dynamic IP address then you have to setup a dynamic updating service that keeps OpenDNS updated with your current IP address. This posts walks through the steps I used to set up ddclient (a linux dynamic dns updating tool) with OpenDNS. Read on...
Ideally ddclient needs to be running on a machine which is run 24/7 so that OpenDNS is always aware of your networks current IP.
Under Ubuntu 10.04 I used the following command to install ddclient and its dependencies:
sudo apt-get install ddclient
Edit the configuration file for ddclient using the command below:
sudo gedit /etc/ddclient.conf
Add the lines:
# Configuration file for ddclient generated by debconfSet the config file permissions
ssl=yes # use ssl-support
yourOpenDNSnetworkname #this is as per the OpenDNS account setting on the web interface
ddclient requires the config file to be readable only by the file owner (root by default):
sudo chmod 600 /etc/ddclient.conf
Set up the ddclient daemon
To get ddclient to run as a service, you need to make some additional changes to get the service daemon up and running:
sudo gedit /etc/default/ddclient
Add the lines:
# Configuration for ddclient scriptsSet the ddclient daemon to run at boot
# generated from debconf on Sat Jul 16 14:16:54 BST 2011
# 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
# If tis is changed to true, run_ipup must be set to false.
# 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.
To run the daemon at boot time I edited the rc.local file, you should probably use System V init scripts instead but I was being lazy:
sudo gedit /etc/rc.local
Add the line:
sudo /etc/init.d/ddclient startRun the ddclient to test it works
From a terminal run:
sudo /etc/init.d/ddclient start
Enable Dynamic IP Update on your OpenDNS account
1. Log in to OpenDNS
2. Select your network and click "Advanced Settings"
3. Check "Dynamic IP Update"
4. Click "Apply"
You're done! OpenDNS should now update whilst the ddclient daemon is working and your DNS services from OpenDNS should now follow your IP address.