I had trouble a few nights back, my ddclient stopped working. ddclient stopped updating the OpenDNS service with my home Dynamic IP.
I had to research the problem. I am going to document my steps here to successfully install ddclient for my environment (Ubuntu 18.04).
First install ddclient. (The install will ask questions, you can add any info as answers, you will will replace the info below with the correct info)
sudo apt install ddclient
Then set the ddclient run_daemon setting, so it run in the background.
sudo nano /etc/default/ddclient
1. Open above file. "/etc/default/ddclient"
2. Search for line "run_daemon="false""
3. Change the line to "run_daemon="true""
Next we configure the ddclient to update OpenDNS. Open file "/etc/ddclient.conf"
sudo nano /etc/ddclient.conf
Setup the file that it looks like the following.
protocol=dyndns2
use=web, if=myip.dnsomatic.com
ssl=yes
server=updates.opendns.com
login=This email address is being protected from spambots. You need JavaScript enabled to view it.
password='YOUR_PASSWORD'
Home
Then you restart the ddclient service with the following command.
service ddclient restart
You can see the status of the service by doing the following command.
service ddclient status
Up until this point everything is standard with all the help documents on the web. But the other night I logged into open dns and on the dashboard my ip was not updated. Thats when my research started. My ddclient timeout to the OpenDNS update server.
After some time and searching help files the following command let me to the problem. The below command print the ddclient steps on the screen for me to see.
sudo ddclient -daemon=0 -debug -verbose -noquiet
Near the bottom I see the message "RECEIVE: HTTP/1.1 426 Upgrade Required". It looks like OpenDNS changed something on there server to block HTTP/1.0 traffic while the ddclient communicate with HTTP/1.0 traffic.
The fix is to change the ddclient code to connect to OpenDNS with HTTP/1.1 and not HTTP/1.0. Open the following file.
sudo nano /usr/sbin/ddclient
1. Search for a line looking like this.
$request .= "/$url HTTP/1.0\n";
2. And Change it to this.
$request .= "/$url HTTP/1.1\n";
3. Then do a ddclient service restart.
service ddclient restart
4. Then on checking the service status it should say the ip was updated.
service ddclient status
NB: Remember the above change is a code change so you should not update ddclient with Ubuntu updates after this. Otherwise your file will be replaced with the old file with the problem.
Hope this article help. enjoy.