My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Monday, September 29, 2008

Configuring automatic update of IP address in DynDNS and OpenDNS

Updated March 29, 2009: Removed '-daemon 300' flag from /etc/cron.daily/ddclient script.

I wanted to configure automatic updating of the dynamic IP address assigned by my ISP to both OpenDNS and DynDNS. I did this using ddclient.

Directions for configuring ddclient for OpenDNS can be found here and directions for DynDNS can be found here.

Here's what I did:

# apt-get install ddclient
I went ahead and entered configuration for DynDNS during the install when prompted.
# vi /etc/ddclient.conf
# cat ddclient.conf
# Configuration file for ddclient
#
# /etc/ddclient.conf

pid=/var/run/ddclient.pid
ssl=yes
protocol=dyndns2
use=web
server=members.dyndns.org
login=dyndns-login
password=dyndns-password
my-addr.dyndns.org

##
## OpenDNS.com account-configuration
##
use=web, web=whatismyip.org
server=updates.opendns.com
protocol=dyndns2
login=opendns-login
password=opendns-password
OpenDNS-Network-Label

# chmod 600 /etc/ddclient.conf
# vi /etc/cron.daily/ddclient
# cat /etc/cron.daily/ddclient
#!/bin/sh
/usr/sbin/ddclient -syslog

# chmod +x /etc/cron.daily/ddclient

3 comments:

manish mahabir said...

instead of tinkering with the configuration file...would you tell me what to enter in different fields which appear during installation of ddclient in Ubuntu. I want to configure ddclient for opendns.

Von Welch said...

Manish: I didn't do that myself, but a quick google turns up this page, which looks like what you want:

manish mahabir said...

Thank you very much.It was a great help!