B.3. Updating more than one Dynamic DNS hostname with ddclient

SmallWall updates the dynamic hostname of the external interface with the program ez-ipupdate which is lightweight and does its job. However, it is not capable of updating more than one hostname (like if you host your domain at DynDNS). If you want or need to do this, your best bet is using another system (you'll probably have a server running in the background anyway).

The ddclient project website can be found here.

DynDNS has a list of supported clients. Most of these will work with any dynamic DNS provider, not only with DynDNS.

See what DynDNS offers as services. This is vital in understanding the config file of ddclient.

This document describes the setup for updating several hostnames with ddclient. I chose that particular beast because it can read the external address from status pages of several hardware and software firewalls and routers so I thought I might check if it works out of the box with the SmallWall status_interfaces.php page. It does.

The config is pretty easy:

# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf
    
pid=/var/run/ddclient.pid 
protocol=dyndns2 
server=members.dyndns.org 
login=YourDynDNSLogin
password=YourDynDNSPassword 
fw-login=admin 
fw-password=Yourm0n0Password
use=fw,  fw=http://Yourm0n0IPOrHostname/status_interfaces.php 
custom=yes
yourdomain.org,mail.yourdomain.org,somehost.yourdomain.org,yourdomain.com

If you only want to update Dynamic DNS entries with DynDNS, remove the

custom=yes

directive. If you want to update a DynDNS Static DNS record, replace the

custom=yes

with

static=yes

If you manage your SmallWall with TLS, the setup is slightly different as you should run an external command to access the status page:

# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf
    
pid=/var/run/ddclient.pid 
protocol=dyndns2 
server=members.dyndns.org 
login=YourDynDNSLogin
password=YourDynDNSPassword 
# fw-login=admin 
# fw-password=Password
# use=fw,  fw=http://Yourm0n0IPOrHostname/status_interfaces.php 
use=cmd
cmd='curl -k -s https://admin:Yourm0n0Password@Yourm0n0IPOrPassword/status_interfaces.php'
custom=yes
yourdomain.org,mail.yourdomain.org,somehost.yourdomain.org,yourdomain.com

Now setup ddclient to run as a daemon. Mine checks the status page every 5 minutes and updates the DynDNS records if necessary.

/usr/sbin/ddclient -daemon 300 -syslog