OPNsense Forum

English Forums => 24.1 Production Series => Topic started by: Joe on February 12, 2024, 04:31:53 pm

Title: 24.1.1 and dynamic dns
Post by: Joe on February 12, 2024, 04:31:53 pm
Hi all.

did a fresh 24.1 install these days and updated to 24.1.1.

Unfortunately, I could not get freedns working with new os-ddclient implementation.

Tried virtually all permutations of:

Backend: native/ddclient
Service: custom
Username: freedns-account/token/domainname
Password: freedns-pwd/token
Hostname: domainname/token/update-url
Check-IP-Method:

Keep getting errors like this:
Code: [Select]
2024-02-12T02:37:10  Error  ddclient  Account xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx [custom - ] failed to set new ip XX.XX.XX.XX [401 - Unable to authenticate with that user/pass combo]   
2024-02-12T02:35:06  Error  ddclient  Account xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx [custom - ] failed to set new ip XX.XX.XX.XX [401 - Unable to authenticate with that user/pass combo]   
2024-02-12T02:20:39  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T02:20:29  Notice ddclient  WARNING: Wait at least 5 minutes between update attempts.       
2024-02-12T02:20:29  Notice ddclient  WARNING: last updated <never> but last attempt on Mon Feb 12 02:15:48 2024 failed.     
2024-02-12T02:20:29  Notice ddclient  WARNING: skipping update of sub.do.main from <nothing> to XX.XX.XX.XX.       
2024-02-12T02:15:52  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T02:10:48  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T02:05:45  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T02:00:42  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:55:39  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:50:36  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:45:33  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:40:30  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:35:26  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:30:23  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:25:20  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:20:17  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:15:11  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:10:07  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:10:07  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:05:03  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T01:00:00  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:54:55  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:49:52  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:44:49  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:39:47  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:34:45  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:29:41  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:24:38  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:19:32  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:14:30  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:09:27  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-12T00:04:25  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-11T23:59:21  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-11T23:54:18  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-11T23:49:16  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-11T23:44:14  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-11T23:39:12  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 
2024-02-11T23:34:07  Notice ddclient  FAILED: updating sub.do.main: unexpected status (ERROR: Unable to locate this record (changed password recently? deleted and re-created this dns entry?) (double check username/password are correct)) 

Any hints?
Title: Re: 24.1.1 and dynamic dns
Post by: wirefall on February 12, 2024, 09:45:25 pm
I have it working with these settings:

Backend: ddclient
Service: freedns
Username: yours
Password: yours
Hostname: your freedns domain/url
Check-IP-Method: freedns
interface to monitor: WAN
Force SSL: Checked

Flawlessly!
Title: Re: 24.1.1 and dynamic dns
Post by: Joe on February 12, 2024, 10:22:58 pm
Thanks for your suggestion, @wirefall!

Unfortunately, this also don't work:

Code: [Select]
2024-02-12T22:10:47 Notice ddclient FAILED: updating my.do.main: failed to get record list from https://freedns.afraid.org/api/?action=getdyndns&v=2&sha=<credentials>: ERROR: Could not authenticate.
2024-02-12T22:05:44 Notice ddclient FAILED: updating my.do.main: failed to get record list from https://freedns.afraid.org/api/?action=getdyndns&v=2&sha=<credentials>: ERROR: Could not authenticate.
2024-02-12T22:00:37 Notice ddclient WARNING: Wait at least 5 minutes between update attempts.
2024-02-12T22:00:37 Notice ddclient WARNING: last updated <never> but last attempt on Mon Feb 12 21:57:47 2024 failed.
2024-02-12T22:00:37 Notice ddclient WARNING: skipping update of my.do.main from <nothing> to xx.xxx.xx.xxx.

Tried both, version 1 and version 2
Title: Re: 24.1.1 and dynamic dns
Post by: wirefall on February 13, 2024, 12:53:07 pm
hmmm...

had it worked ever before?

Other question, your log reads "Could not authenticate", maybe wrong password, username, typo, ...? Also try to put in your username instead of your email address (freedns account). Could you log in at freedns?
Title: Re: 24.1.1 and dynamic dns
Post by: Joe on February 13, 2024, 03:27:40 pm
had it worked ever before?
It was working a long time ago with an old install of opnsense

It is still working with fully upgraded pfsense

It also works when I invoke the url with wget/curl

It does NOT work with this fresh opnsense 24.1.1 install.

Quote
Other question, your log reads "Could not authenticate", maybe wrong password, username, typo, ...?
I copy+paste user and password from keepassx. So I don't see how a typo could hit me.

Quote
Also try to put in your username instead of your email address (freedns account).
Tried both

Quote
Could you log in at freedns?
Had to log into freedns to change from v1 to v2 and back again.

So yes, the credentials are correct.
Title: Re: 24.1.1 and dynamic dns
Post by: wirefall on February 13, 2024, 05:48:46 pm
quite interesting indeed...

Everything you do seems to be exactly correct, so the fault must be somewhere else...

Maybe just try to uninstall (+reboot) and reinstall ddclient?

Another thing: Maybe your firewall blocks something regarding freedns? Try Live View, maybe you could find something.

One more thing ;-) > Zenarmor blocking "Dynamic DNS Sites" (in Policy > Security > Advanced Security)
Title: Re: 24.1.1 and dynamic dns
Post by: Joe on February 21, 2024, 01:28:22 pm
quite interesting indeed...

Everything you do seems to be exactly correct, so the fault must be somewhere else...

According to this thread (https://forum.opnsense.org/index.php?topic=26446.0), I am not the only one having this issue. And freedns is not the only service affected.

The old (working) os-dyndns has been deprecated two years ago and was finally removed. But nobody cared to get the new replacement os-ddclient to work properly.

Finally, (having two provider) I ended up with:

Code: [Select]
cat <<__EOF__  | sudo tee /etc/cron.d/dyndns >/dev/null
*/5 * * * * joe curl                 https://freedns.afraid.org/dynamic/update.php?<token0> # main dns, whatever can get out
*/5 * * * * joe curl --interface re1 https://freedns.afraid.org/dynamic/update.php?<token1> # dns1, WAN,  vodafone
*/5 * * * * joe curl --interface re0 https://freedns.afraid.org/dynamic/update.php?<token2> # dns2, OPT1, telekom
__EOF__

This has the disadvantage, that it won't catch up if interface goes down/up, but needs up to 5 minutes to catch up.
Another disadvantage is that it puts unnecessary load onto the dns provider, since it will do the update even if the address has not changed.

But at least, it WORKS.