Bosse_B
Posts: 1086
Joined: Thu Jan 30, 2014 9:53 am

Ddclient on Raspbian Buster seems not to run....

Tue Mar 03, 2020 5:39 pm

I have used ddclient on several RPi units and it has always worked well, except now on a pair of new RPi4 units running Raspbian Buster I discovered that they do not update the DNS addresses...
Is there a difference in how dynamic dns is configured/installed on Raspbian Buster compared to older distributions?

So this is what I have done:

Code: Select all

sudo apt install ddclient #disregarded the prompts, I set up the conf later:
sudo nano /etc/ddclient.conf  #Configure the ddclient target
Put this into the conf file:

Code: Select all

daemon=300
ssl=yes
custom=yes

protocol=dyndns2
use=web, web=dns.loopia.se/checkip/checkip.php, web-skip='Current IP Address:'
server=dns.loopia.se/XDynDNSServer/XDynDNS.php
login=********
password=*******
#List of domains to set, one per line:
xxxxx.boberglund.com
I thought that this would be enough but even though the two RPi4 units have been running for several days the DNS address is incorrect, it remains the same as when I created the dynamic dns domains a week ago at my provider (Loopia in Sweden).

What could have been going wrong?
Is there some way to check if ddclient is even running? (It is supposed to kick in every 5 minutes...)

I don't know if it runs continuously as a service or if it sets up some kind of timer to run every 300 s....
The content for ddclient.conf is what I have used on several systems successfully both Ubuntu 16 & 18 as well as Raspbian...
Bo Berglund
Sweden

Bosse_B
Posts: 1086
Joined: Thu Jan 30, 2014 9:53 am

Re: Ddclient on Raspbian Buster seems not to run....

Mon Mar 09, 2020 7:12 pm

What I did in the end was that I uninstalled ddclient and its dependencies, then again installed and this time I entered the requested information in the installation dialog.
After it was done I opened the ddclient.conf file in nano and modified the settings according to my needs.
I also made sure there would be verbose system logging.
Then I restarted the service and inspected the log file.
It turns out that ddclient does NOT check the current DNS setting for its domain(s)!!!
It looks like it only ever sends a request to the dynamic dns server when it sees the external IP change!
In my case the IP never changed but the initial DNS setting on the DNS servers was wrong! It pointed to something from way back when.....

Even running ddclient with the -force flag does not work, it does not send the update command to my Dynamic DNS provider....

One would assume that one of the main functions in a ddclient software would be to look up the address of the domain it is configured for and compare the response to what it reads as the external IP address. Then if there is a difference it would send the update command to the dynamic dns server.
Apparently this is NOT what it does and so the update will only happen if the external IP address changes (it seems to cache the IP address somewhere on first startup).
So if you are on a line with a very long lease on the address you are out of luck with ddclient to get an update sent out until the lease expires and is renewed with a different IP address...

Why is it working this way and is there something better that can be used?
And where is the cached IP address stored (so it can be modified and thus force a renewal)?
Bo Berglund
Sweden

Return to “General discussion”