Menu

#82 Multiple hosts with zoneedit

current_version
open
nobody
zoneedit (2)
5
2019-05-14
2016-04-22
MhMM
No

I own multiple domains which are managed in Zoneedit. I configured ddclient with all hosts listed in one line, separated by a comma (e.g. www.h1.com,www.h2.com,www.h3.com)

In the above example, ddclient creates the following call: https://dynamic.zoneedit.com/auth/dynamic.html?host=www.h1.com,www.h2.com,www.h3.com&dnsto=111.11.11.11

The response I receive from zoneedit is the following:

RECEIVE: <success code="201" text="no update required for www.h1.com to 111.11.11.11" zone="www.h1.com,www.h2.com,www.h3.com">
SUCCESS: updating www.h1.com: IP address set to 111.11.11.11 (201: no update required for www.h1.com to 111.11.11.11)
FAILED: updating www.h2.com,www.h3.com: no response from dynamic.zoneedit.com</success>

The problem is that zoneedit does not process more than one h:ost. It only processes the first host in the list. I checked the source of ddclient which confirms my observations

sub nic_zoneedit1_update {
    debug("\nnic_zoneedit1_update -------------------");

    ## group hosts with identical attributes together
    my %groups = group_hosts_by([ @_ ], [ qw(login password server zone) ]);
    ...

As the zoneedit login ID is case insensitive, I created multiple entries in /etc/ddclient.conf, every single host is now configured with a different login IDs. This is how I can work around the issue. However, as ddclient officially supports multiple hosts, the processing should be changed so that for every host, a separate request is sent to zoneedit

Second observation: For every host, the public IP address is identified again. In my eyes, this is not necessary, as it can be assumed that the address won't change so quickly.

Discussion

  • Izuka Masahiro

    Izuka Masahiro - 2016-09-02

    I'm sorry. The following comment, which I posted before, seems to be wrong and the suggested solusion doesn't work even for me now. I hope that the discussion for this bug continues.

    Only one error/success code responds for each update grouped by (login password server zone). I suggest that ddclient currently assumes the error/success code as one line for each host, so it cannot distinguish that for multiple hosts. The second and after hosts always seem to "no response", but all hosts are updated in fact.[1] This time, blank addresses for ip are cached for the failed hosts and retried in the next update, until the caches of the all hosts are modified. It causes waste accesses and error outputs.

    If you have a single host for each domain, you can separate the groups by using token instead of password given in the ZoneEdit DYN setting.

    If you have multiple hosts in a domain, one solution is to edit the cache after update.
    Add the global configuration in the main ddclient.conf:
    postscript=/etc/ddclient/postscript.sh
    The modifying script postscript.sh:
    #!/bin/sh
    sed -i -e "s/,ip=,/,ip=$1,/g" /var/cache/ddclient/ddclient.cache

    [1]
    RECEIVE: <success code="201" text="no update required for aaa.com and *.aaa.com to 12.345.67.89" zone="aaa.com,aaa.com">
    SUCCESS: updating .aaa.com: IP address set to 12.345.67.89 (201: no update required for aaa.com and .aaa.com to 61.115.71.16)
    FAILED: updating aaa.com: no response from dynamic.zoneedit.com</success>

     

    Last edit: Izuka Masahiro 2017-02-16
  • Chirag Gangdev

    Chirag Gangdev - 2019-05-14

    I have prepared a patch(for 3.9.0) which will send zoneedit request 1 by 1 for each host, PFA

     

Log in to post a comment.

MongoDB Logo MongoDB