Dynamic DNS

From ALSwiki
Jump to: navigation, search

Create an account with DynDNS

Sign up for an account at this address. Choose a host name set it to point to your current ip address:


Make sure you have ssh and libio-socket-ssl-perl installed

 $ sudo apt-get install ssh libio-socket-ssl-perl

Install ddclient

 $ sudo apt-get install ddclient

The installation will ask some questions.

  • For your dynamic DNS provider, select www.dyndns.com
  • Enter your fully qualified domain name as created at dyndns.com
  • Enter your DynDNS requistered username and password
  • Enter "web" as the DynDNS interface to use

Change the ddclient configuration file to use ssh

$ sudo emacs /etc/ddclient.conf

The config file will look something like this:

 # Configuration file for ddclient generated by debconf
 # /etc/ddclient.conf

 use=if, if=web

Change the line:

 use=if, if=web


 use=web, web=checkip.dyndns.com/, web-skip='IP Address'

Add just after the initial comments:


These two lines tells ddclient to use ssl to connect and to update your public IP address every 5 minutes (300 seconds).

Confirm that it's set to run as a daemon



It should look like:

 # Configuration for ddclient scripts
 # generated from debconf on Fri Jul 18 13:43:20 EST 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.

Restart your ddclient

 sudo /etc/init.d/ddclient restart

Confirm there are no errors.

Confirm the daemon is running

 ps -ax
 23741 pts/0    S      0:00 ddclient - sleeping for 300 seconds

Sign up for the premium account

Dynamic DNS is a good company. Pay the $11.50 per year and help them keep providing a great service.