A dynamic DNS service allows you to keep a domain name pointing to your network even when your network’s IP address changes. Most ISPs will dynamically allocate IPs, so if you want to reliably reach your home network remotely, a dynamic DNS service is a good idea.
ddclient is a dynamic DNS update client which runs in the background periodically checking your external IP address and sending an update to your dynamic DNS provider if it changes. I was ready to edit configuration files and set up a cron job, but none of that was needed because ddclient has a graphical install interface that makes the setup very easy.
I’m using the free version of DynDNS but ddclient also has build-in support for easyDNS, DSLReports, and ZoneEdit.
Search for and install the package
ddclient from the Ubuntu Software Center.
During installation, you will be prompted for your dynamic DNS provider,
credentials for that provider, and the hostname to update. Once ddclient is
installed, it should be set up and working.
You can check that ddclient successfully updated your IP by opening Log Viewer,
selecting syslog, and looking for a line like
If you want to rerun the install configuration you can do so by running this command:
sudo dpkg-reconfigure ddclient
To change the update period you need to edit
/etc/default/ddclient, and change
daemon_interval line for the number of seconds you want between updates:
gksu gedit /etc/default/ddclient
Restart ddclient to make the change take effect:
sudo service ddclient restart
I changed the update period from 300 seconds (5 minutes) to 3600 seconds (1 hour) since my IP address rarely changes. However, there shouldn’t be any problem with frequent updates because ddclient will not make an unnecessary update request when your IP address has not changed.
The main ddclient configuration file is located at
gksu gedit /etc/ddclient.conf
See the ddclient site for more configuration options. The Ubuntu wiki has an extensive page on dynamic DNS.