ddclient / ddclient

Ddclient updates dynamic DNS entries for accounts on a wide range of dynamic DNS services.

Home Page:https://ddclient.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Split dyndns2-request for different domains into different requests?

JavaChriss opened this issue · comments

Hi all,

I got stuck with ddclient version 3.10.0. As I used it to update a single domain it worked like cream.

Then I decided to get different URLs to the same Pi and enhanced ddclient.conf accordingly.

But that did not work and my service provider replied:

... That suggests that ddclient attempts to update several domains in one request, with an update URL path like /nic/update?system=dyndns&hostname=domain1.com,domain2.net,domain3.de&myip=1.2.3.4. This syntax is not supported: only one domain can be updated per request.

Reading ddclient's doc I did not find any way to send six single requests for six single domains.

Did I miss it or does ddclient in general not support this one-request-per-domain-way?

I assume you're using protocol=dyndns2? Who is your service provider?

In that case, the current implementation will group all hosts that share certain attributes (see here)

Other provider implementations do not do this kind of grouping, so there is certainly the possibility of doing one-request-per-domain. Right now there is no way to disable the grouping of a provider implementation though, no.

Provider is https://desec.io/ and my way to solve this is a bash-script that utilizes curl instead. Looks like this:

current_ip=$( curl https://checkipv4.dedyn.io/ )

ip_file="/home/pi/ip.txt"

old_ip=$( cat $ip_file )

if [ "$current_ip" = "$old_ip" ]; then
    echo "no change, still got $old_ip"
else
    echo "updating to $current_ip ..."

    curl --ipv4 https://update.dedyn.io/?hostname=domain1.social --header "Authorization: Token 1234"
    curl --ipv4 https://update.dedyn.io/?hostname=domain2.de --header "Authorization: Token 1234"
    curl --ipv4 https://update.dedyn.io/?hostname=domain3.de --header "Authorization: Token 1234"

    echo "saving $current_ip to $ip_file"

    echo "$current_ip" > $ip_file
fi