OPNsense Forum

English Forums => 23.7 Legacy Series => Topic started by: gauthig on October 28, 2023, 06:45:47 pm

Title: ddclient screen not updating
Post by: gauthig on October 28, 2023, 06:45:47 pm
Using os-ddclient.  Was having a hard time troubleshooting as the screen in service -> Dynamic DNS -> Settings never updated with an IP.  Also, under ..-> Log File, it was empty.  Restarted several times, no luck.  reinstalled, no change either. 

But it is working.  in /var/log/ddclient/latest.log (linked file) it shows it was running and being updated.  Verified with my provider and yes it was. 

So, for some reason the interface is not pulling the logged information so I cannot verify with the gui.
Title: Re: ddclient screen not updating
Post by: sja1440 on November 26, 2023, 12:13:04 pm
I have the same problem - It has been around for some time.
My OPNversion is:     OPNsense 23.7.9-amd64 FreeBSD 13.2-RELEASE-p5 OpenSSL 1.1.1w

I am using the ddclient backend. Is that correct?

The os-ddclient plugin clearly does update my provider (dns-o-matic) as I have verified with my dns-o-matic dashboard.

Looking at the plugins log I see that dns-o-matic returns "good 42.42.42.42" (not my real ipv4!) but the plugin then goes on to mark the update as failed. This means, I suppose, that it never updates the "Current IP" and "Updated" columns on the GUI.

I do not know if it is relevant but when configuring the plug-in on the GUI, I am not allowed to select a "Check ip method" of dydns2 which is what DNS-o-MATIC requires. Instead I have selected dyndns.

Does anyone know if this is a bug or have I misconfigured something?

Here is a log from today:
Code: [Select]
2023-11-26T11:54:56 Notice ddclient FAILED: updating all.dnsomatic.com: unexpected status (0)
2023-11-26T11:54:56 Notice ddclient FAILED: updating all.dnsomatic.com: unexpected status (f)
2023-11-26T11:54:56 Notice ddclient RECEIVE:
2023-11-26T11:54:56 Notice ddclient RECEIVE: 0
2023-11-26T11:54:56 Notice ddclient RECEIVE: good 42.42.42.42
2023-11-26T11:54:56 Notice ddclient RECEIVE: f
2023-11-26T11:54:56 Notice ddclient RECEIVE:
2023-11-26T11:54:56 Notice ddclient RECEIVE: transfer-encoding: chunked
2023-11-26T11:54:56 Notice ddclient RECEIVE: connection: close
2023-11-26T11:54:56 Notice ddclient RECEIVE: x-xss-protection: 1; mode=block
2023-11-26T11:54:56 Notice ddclient RECEIVE: strict-transport-security: max-age=31536000; includeSubDomains
2023-11-26T11:54:56 Notice ddclient RECEIVE: x-ingress-point: mil1
2023-11-26T11:54:56 Notice ddclient RECEIVE: x-envoy-upstream-service-time: 161
2023-11-26T11:54:56 Notice ddclient RECEIVE: server: opendns
2023-11-26T11:54:56 Notice ddclient RECEIVE: date: Sun, 26 Nov 2023 10:54:56 GMT
2023-11-26T11:54:56 Notice ddclient RECEIVE: content-type: text/html; charset=UTF-8
2023-11-26T11:54:56 Notice ddclient RECEIVE: vary: Accept-Encoding
2023-11-26T11:54:56 Notice ddclient RECEIVE: HTTP/1.1 200 OK
2023-11-26T11:54:56 Notice ddclient SENDING:
2023-11-26T11:54:56 Notice ddclient SENDING: Connection: close
2023-11-26T11:54:56 Notice ddclient SENDING: User-Agent: ddclient/3.10.0
2023-11-26T11:54:56 Notice ddclient SENDING: Authorization: Basic censoredcensoredcensored
2023-11-26T11:54:56 Notice ddclient SENDING: Host: updates.dnsomatic.com
2023-11-26T11:54:56 Notice ddclient SENDING: GET /nic/update?system=dyndns&hostname=all.dnsomatic.com&myip= HTTP/1.1
2023-11-26T11:54:56 Notice ddclient CONNECTED: using SSL
2023-11-26T11:54:56 Notice ddclient CONNECT: updates.dnsomatic.com
2023-11-26T11:54:56 Notice ddclient UPDATE: updating all.dnsomatic.com
2023-11-26T11:54:56 Notice ddclient WARNING: all.dnsomatic.com: unable to determine IP address with strategy use=cmd
2023-11-26T11:54:56 Notice ddclient WARNING: found neither IPv4 nor IPv6 address
Title: Re: ddclient screen not updating
Post by: tiermutter on November 26, 2023, 12:35:49 pm
Afaik the GUI will only show updated IP if it really was updated after IP change.
Periodically updates of dyndns without IP change will give an error by most ddns providers since they "don't like" updating without IP change, this could be the failed message from your log. Putting any IP in providers dashboard should cause a "succesful" update for next attempt and ddclient GUI should display the updated IP.

... That's what I remember...
Title: Re: ddclient screen not updating
Post by: sja1440 on November 26, 2023, 02:09:38 pm
But the problem is that over the last few months (years?) I've never seen an ip address being shown. Not even after I force a change of external ip.

Unfortunately, I cant do any testing now because it seems that all.dnsomati.com no longer resolves - they are probably doing maintenance or something.
Title: Re: ddclient screen not updating
Post by: CJ on November 26, 2023, 06:19:41 pm
Use the native backend.  The ddclient one doesn't update the UI and will eventually be removed do to all of the issues.
Title: Re: ddclient screen not updating
Post by: sja1440 on November 26, 2023, 07:03:12 pm
Use the native backend.  The ddclient one doesn't update the UI and will eventually be removed do to all of the issues.

Thankyou, I'll try it.
Title: Re: ddclient screen not updating
Post by: franco on November 27, 2023, 12:13:03 pm
> The ddclient one doesn't update the UI and will eventually be removed do to all of the issues.

That's not true. This was true for the legacy DynDNS plugin, but the ddclient project is releasing features and fixes again so it's going to stay (and improve). Only thing we will do now is switch to the native backend by default because fixing our code is quicker.


Cheers,
Franco
Title: Re: ddclient screen not updating
Post by: sja1440 on November 27, 2023, 12:37:57 pm
Use the native backend.  The ddclient one doesn't update the UI and will eventually be removed do to all of the issues.

On forcing an ip change (by toggling my pppoe WAN interface), using the native backend, I no longer see any error messages but a log saying that  my ip address has been updated.

But the "Current IP" column remains empty even though the GUI "Updated" column is now filled
Title: Re: ddclient screen not updating
Post by: CJ on November 27, 2023, 04:07:05 pm
> The ddclient one doesn't update the UI and will eventually be removed do to all of the issues.

That's not true. This was true for the legacy DynDNS plugin, but the ddclient project is releasing features and fixes again so it's going to stay (and improve). Only thing we will do now is switch to the native backend by default because fixing our code is quicker.

Ah, okay.  I was apparently conflating the two.  Thanks.

On forcing an ip change (by toggling my pppoe WAN interface), using the native backend, I no longer see any error messages but a log saying that  my ip address has been updated.

But the "Current IP" column remains empty even though the GUI "Updated" column is now filled

Unfortunately, the native backend is a little lacking in the logging department.

What are you using for IP detection?
Title: Re: ddclient screen not updating
Post by: franco on November 27, 2023, 04:19:00 pm
Regarding logging, advanced verbose mode is set? ;)


Cheers,
Franco
Title: Re: ddclient screen not updating
Post by: CJ on November 27, 2023, 04:26:03 pm
Regarding logging, advanced verbose mode is set? ;)

I've had verbose set from the beginning.  Under the old setup I would see the actual request and response that was sent to my provider.  Under the native backend the lowest level I get is Notice and that just tells if the backed executed and if the IP was changed or not.

Also, the logs show ddclient as the process even though I have the Native backend set.  Is that expected?
Title: Re: ddclient screen not updating
Post by: franco on November 27, 2023, 04:38:19 pm
Yes, because it tries to feed into the same syslog filter.

I don't mind extending the logging, but our measurement for real world relevance is a feature request. :)


Cheers,
Franco
Title: Re: ddclient screen not updating
Post by: sja1440 on November 27, 2023, 06:01:14 pm
What are you using for IP detection?

I have configured it to use dyndns
Title: Re: ddclient screen not updating
Post by: CJ on November 28, 2023, 04:14:36 pm
Yes, because it tries to feed into the same syslog filter.

Ah, makes sense.

I don't mind extending the logging, but our measurement for real world relevance is a feature request. :)

Being able to enable a debug mode and see the exact request and response for the update would be useful and a handy method for troubleshooting issues.  It's how I was able to confirm that my IP was being updated and the issue was just OPNSense incorrectly parsing the return OK as a failure.

What are you using for IP detection?
I have configured it to use dyndns

Is there a reason you're not just using the interface?
Title: Re: ddclient screen not updating
Post by: sja1440 on November 28, 2023, 05:06:10 pm
Is there a reason you're not just using the interface?

Ehm, no. How do I choose to get the ip address direct from the interface?  It doesn't seem to be available as an option.

BTW: my isp connectionb is pppoe over vlan.  When configuring Dynamic DNS I've set the to interface to monitor as "WAN" which is the interface assigned to the pppoe device
Title: Re: ddclient screen not updating
Post by: CJ on December 05, 2023, 08:12:28 pm
Is there a reason you're not just using the interface?

Ehm, no. How do I choose to get the ip address direct from the interface?  It doesn't seem to be available as an option.

BTW: my isp connectionb is pppoe over vlan.  When configuring Dynamic DNS I've set the to interface to monitor as "WAN" which is the interface assigned to the pppoe device

You changed it to use WAN or it was configured that way previously?
Title: Re: ddclient screen not updating
Post by: sja1440 on December 06, 2023, 09:02:58 am
You changed it to use WAN or it was configured that way previously?

How strange, before replying to your question I checked yet again the GUI. This time, at the bottom of the list of "Check ip method"s, I see "Interface [IPv4]".

I select it and after forcing a line reset, I now see the ipv4 address in the "current ip" column!

I really don't know hoa I could have overlooked that entry in the list.

Thanks CJ for insisting.
Title: Re: ddclient screen not updating
Post by: CJ on December 07, 2023, 03:14:23 pm
I'm glad someone appreciates my persistence. :)

Good to hear you got it working.  Rechecking your assumptions often solves a lot of problems. :D