Ddns setup issue

in the newest rolling build, I set up ddns like before, but
sh dns dynamic status show me the result which makes no sense. in the meantime, I found it update my entry on dns.he.net.

vyos@xray:~$ sh dns dynamic status
Hostname     IPv4 address    IPv4 status    IPv6 address    IPv6 status    Last update
-----------  --------------  -------------  --------------  -------------  -------------------
host.name.tld                  noconnect                      noconnect      2023-04-15 08:56:15
Apr 16 22:05:08 vyos ddclient[1695]: WARNING:  '' is not a valid IPv4 or IPv6 address               
Apr 16 22:05:08 vyos ddclient[1695]: WARNING:  found neither IPv4 nor IPv6 address                  
Apr 16 22:05:09 vyos ddclient[1695]: WARNING:  updating host.name.tld: nochg: No update required; unnecessary attempts to change to the current address are considered abusive

I can verify this issue. This is not a setup issue but rather an opmode one. Iā€™m getting similar results from (as of this writing) the latest current source tree. This seems to be a regression introduced by a very recent commit (see dns: T5144: Improve dns dynamic status output). This update was supposed to tabulate the output, but seems to have completely broken the display.
Hereā€™s what I get in opmode. As you noted, the ddclient service is working fine.
=====================>8======================

$ sh dns dynamic status
Hostname        IPv4 address    IPv4 status    IPv6 address    IPv6 status    Last update
--------------  --------------  -------------  --------------  -------------  -------------------
123456                          noconnect                      noconnect      2023-04-16 14:27:43
hhn1.exmpl.net                  noconnect                      noconnect      2023-04-16 14:27:43
hhn2.exmpl.net                  noconnect                      noconnect      2023-04-16 14:27:43

=====================>8======================

@indrajitr, can you please review or do we need to open a phabricator ticket?

This is abnormal. There are two possibilities I can think of:

  1. ddclient either didnā€™t didnā€™t succeed in pushing a a valid IP to the upstream provider
  2. the specific protocol for the provider is still populating ip field instead of ipv4 field for the IP address.

Can you please take a look at the content of /run/ddclient/ddclient.cache? At least one of ipv4= or ipv6= should be populated if everything went well earlier.

You can also force a refresh by doing restart dns dynamic.

Either way, the source of truth for show dns dynamic status is /run/ddclient/ddclient.cache. If that file does have a valid IP address (either v4 or v6), it is a bug with the recent change. Else something else is happening within dddclient which is leading to an unpopulated ddclient.cache entry.

@debiansid, based on the log, looks like ddclient either couldnā€™t read the IP from ddclient.cache from a previous run or failed to detect the public IP from the current run.

As usual, can you please take a look at /run/ddclient/ddclient.cache. It should have an IP address somewhere in the entry for host.name.tld (likely as ipv4=). If you donā€™t see any IP address, can you please do a restart dns dynamic to force an update?

In my case, the cache contains the ā€œoldā€ syntax, I.E. ip= and status= which explains why your commit broke opmode functionality as youā€™re now looking for ipv4/6 and status-ipv4/6. Deleting ddclient.cache and restarting with restart dns dynamic generates the same cache file with the old syntax.

1 Like

Looking specifically at my setup, I have one update that uses googledomains and two that use dyndns2. Looking at the ddclient master source tree, googledomains completely lacks support for the new syntax and dyndns2 support was only recently added and is only present in master now. Isnā€™t such a breaking commit a little premature?

sudo cat /run/ddclient/ddclient.cache

## ddclient-3.10.0
## last updated at Mon Apr 17 07:21:33 2023 (1681687293)
atime=1681687293,backupmx=0,custom=0,host=host.name.tld,ip=1.2.3.4,mtime=1681687293,mx=,script=/nic/update,static=0,status=good,status-ipv4=noconnect,status-ipv6=noconnect,warned-min-error-interval=0,warned-min-interval=0,wildcard=0,wtime=0 host.name.tld

it get my public ip and pushed to ddns service provider, but seems like dns dynamic status canā€™t read the correct information.

Yep, ddclient is still populating the old field for some of the providers.

We now have two incompatible formats to process and will have to cover for both the cases it seems.

Fix coming up.

1 Like

another concern, I didnā€™t setup dynamic aaaa record on dns.he.net, and I found updating a record and aaaa record needs different key. They are 2 services for vyos ddns client. So I hope your fix would cover that too. Thanks .

1 Like

@debiansid Just curious to understand how you are achieving this. Per he.net documentation, it seems the same key would be used for both A record and AAAA record.

If you have tagged both an A and AAAA record to be dynamic, you will see the icon twice, it is only necessary to generate one key as it is bound to the name of the record and not the name/type.

Would it be possible to share either the ddclient.conf or show service dns dynamic with the sensitive info redacted? Chances are your use case will already be addressed by the new PR. But just wanted to make sure.

Thank you for the speedy update. It works fine now. Can you kindly update Phabricator (or whatever itā€™s being called these days) so I can comment on the PR as verified?

there is no option in vyos dynamic dns setup that I can set one service to update both A and AAAA record I suppose. I am not for sure, I will test it out later.

I setup A and AAAA record with same update key on dns.he.net, but the new dynamic_dns.py can only update AAAA record to dns.he.net noth both v4 and v6. it.show me noconnect for ipv4,even I have public ipv4 on pppoe0.

dynamic {
     interface pppoe0 {
         ipv6-enable
         service he {
             host-name host.name.tld
             login host.name.tld
             password updatekey
             protocol dyndns2
             server dyn.dns.he.net
         }
     }
 }

or I should add another service to update v4 seperately?

IPv6 was implemented there
https://vyos.dev/T3897
https://vyos.dev/T4743
At that time, it was possible to use either ipv4 or ipv6, but not both. So I wanted to name this option as v6-only"
When you enable IPv6, it is only using IPv6 explicitly.

Shouldnā€™t the template fail to ipv4 using usev4=ifv4 instead of the old syntax use=if that is planned for deprecation and removal?

What deprecation are you talking about?
I still see the same syntax in their examples

Multiple keywords were deprecated once the IPv6 framework was introduced in commit 24ba945 over two years ago.
The developers are following the IPv6 proposal document.
Updates to the example config are lagging, but ddclient is already emitting ā€œdeprecatedā€ warnings for the use and if keywords (among a few others) for the past two years:

@debiansid The fix for your OP issue was just merged into VyOS. If you build your own images, youā€™ll have it working correctly now. Not sure why the build-bot hasnā€™t built a nightly since the 13th.