Hallo,
I tried to configure dynamic DNS with RFC2136 / nsupdate using a keyfile:
# show service dns dynamic { interface eth3 { rfc2136 host.dyn.my-domain.org { key /config/auth/dyn.my-domain.org.key record host.dyn.my-domain.org server my-dns.org ttl 60 zone dyn.my-domain.org } } }
After some debugging I found that ddclient does not like the generated config file and could track down the problem to the commas at the end of the lines:
### Autogenerated by dynamic_dns.py ### daemon=1m syslog=yes ssl=yes pid=/var/run/ddclient/ddclient.pid cache=/var/cache/ddclient/ddclient.cache # # ddclient configuration for interface "eth3": # use=if, if=eth3 # RFC2136 dynamic DNS configuration for host.dyn.my-domain.org server=my-dns.org, protocol=nsupdate, password=/config/auth/dyn.my-domain.org.key, ttl=60, zone=dyn.my-domain.org, host.dyn.my-domain.org
After removing the commas, everything works as expected.
Seems the template for the RFC2136 config in the conf_mode/dynamic_dns.py needs to be changed:
--- /lib/live/mount/rootfs/1.2-rolling-201911030217.squashfs/usr/libexec/vyos/conf_mode/dynamic_dns.py 2019-11-02 17:13:57.000000000 +0100 +++ /boot/rw/usr/libexec/vyos/conf_mode/dynamic_dns.py 2019-11-08 02:10:18.891923048 +0100 @@ -47,11 +47,11 @@ {% for rfc in interface.rfc2136 -%} {% for record in rfc.record %} # RFC2136 dynamic DNS configuration for {{ record }}.{{ rfc.zone }} -server={{ rfc.server }}, -protocol=nsupdate, -password={{ rfc.keyfile }}, -ttl={{ rfc.ttl }}, -zone={{ rfc.zone }}, +server={{ rfc.server }} +protocol=nsupdate +password={{ rfc.keyfile }} +ttl={{ rfc.ttl }} +zone={{ rfc.zone }} {{ record }} {% endfor -%} {% endfor -%}
Works for me and I hope it will not break anything else. ;)
Cheers,
Chris