Skip to content →

How to use ddclient on Ubuntu

I have a few DNS domains which are pointing to a network with a single IP address. The internet side had changed to a dynamic WAN IP address and now I have to update the DNS addresses with my DNS provider. I tried to do this with my Unifi USG router but the current firmware allows only one protocol at a time. In this case I could use dyndns protocol only once while I need to update three DNS domains.

This is what I have come up with.

The first domain which is the most important is updated by the Unifi USG itself. The other two are updated by the Unifi Controller host with a client tool called ddclient. Also on the USG Unifi uses ddclient to do the job.

Let’s concentrate on the ddclient on the Ubuntu server:

I have installed the ddclient package on a Ubuntu server with the following command:

apt-get install ddclient -y

During the installation you will receive some setup questions about your first Dynamic DNS provider. You can safely answer those questions.

After the installation you have access to the following files:

/etc/init.d/ddclient – The daemon file which can run the ddclient as a daemon (service)
/etc/default/ddclient – The global parameter file
/etc/ddclient.conf – Your personal configuration where your setup questions went to. Use this file to setup other dynamic DNS providers
/usr/share/doc/ddclient/examples/sample-etc_rc.d_init.d_ddclient.ubuntu – Some documentation which came with the package

I will not go into detail how to edit ddclient.conf. There is a lot of information available on the internet. But here is some helpful commands:

To start the ddclient daemon use service ddclient start

To stop the ddclient daemon use service ddclient stop

To force a DNS update and log to the syslog use ddclient -syslog -noquiet -verbose -force

To see the logging in the syslog use tail -f /var/log/syslog

Published in Ubuntu


Leave a Reply

Your email address will not be published. Required fields are marked *