Dynamic DNS on Ubuntu 16.04

With these settings I can plug my RPi into a router and it will configure a web URL to it’s routers IP address.

I’m using Namecheap so I simply combine this with this..
and it works! 🙂

from here,

sudo apt-get install ddclient

I edited


like this:

# Configuration for ddclient scripts
# generated from debconf on Tue Jul 25 19:02:55 ACST 2017
# /etc/default/ddclient

# Set to "true" if ddclient should be run every time DHCP client ('dhclient'
# from package isc-dhcp-client) updates the systems IP address.

# 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
# If this is changed to true, run_ipup and run_dhclient must be set to false.

# 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.



like this:

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

use=web, protocol=namecheap
host, host2

I tested with

 sudo ddclient -daemon=0 -debug -verbose -noquiet

Returns this at the bottom (before clearing the cache)

SUCCESS:  rpi: skipped: IP address was already set to 'My WAN IP'.

also using sudo rm /var/cache/ddclient/ddclient.cache before testing will allow me to force an update.

getting this to run as a service I used

sudo update-rc.d ddclient enable

Also I edited my SSH config since apparently my home NAT router didn’t like keeping the connections alive. These settings went at the bottom of sshd_config – initially I used ServerAlive, which stopped SSH from working :/

ClientAliveInterval 300
ClientAliveCountMax 24

Leave a Reply

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