With these settings I can plug my RPi into a router and it will configure a web URL to it’s routers IP address.
EDIT: updated for Ubuntu 18.04
sudo apt-get install ddclient
For NameCheap the onscreen installer ui is redundant, after it finishes just manually edit the config files
sudo nano "/etc/ddclient.conf"
Edit this file as here.
Test with the following:
sudo ddclient -daemon=0 -debug -verbose -noquiet
SUCCESS: rpi: skipped: IP address was already set to 'My WAN IP'.
Then set as a service:
sudo systemctl enable ddclient
EDIT: perhaps ^ this is redundant. at the very least the following is required in ubuntu 18.04:
(sudo nano “/etc/ddclient.conf”)
#ddclient configuration for Dyn # #/etc/ddclient.conf daemon=300 # Check every 60 seconds. syslog=yes # Log update msgs to syslog. mail=root # Mail all msgs to root. mail-failure=root # Mail failed update msgs to root.
Here’s my config in ubuntu 18.04:
Configuration file for ddclient # /etc/ddclient.conf ssl=yes mail=root use=web, web=dynamicdns.park-your-domain.com/getip protocol=namecheap server=dynamicdns.park-your-domain.com login=DOMAIN_HERE password=DOMAIN_PASSWORD HOST protocol=namecheap server=dynamicdns.park-your-domain.com login=DOMAIN_HERE password=DOMAIN_PASSWORD @.DOMAIN_HERE, www.DOMAIN_HERE protocol=namecheap server=dynamicdns.park-your-domain.com login=DOMAIN_HERE password=DOMAIN_PASSWORD @.DOMAIN_HERE, www.DOMAIN_HERE daemon=100 check every 100 seconds, DNS record has ttl 5 mins
After adding the above, I get a sleeping timer here:
sudo systemctl status ddclient.
The below is likely redundant in new versions of Ubuntu
sudo rm /var/cache/ddclient/ddclient.cache before testing will allow me to force an update.
I needed to install this for SSL (/ssh or whatever..??)
sudo apt-get install ssh libio-socket-ssl-perl
getting this to run as a service (with systemd) I used
sudo update-rc.d ddclient enable
sudo systemd start ddclient
sudo systemd enable ddclient
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