OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: almodovaris on January 22, 2023, 08:05:53 pm

Title: ddclient-devel is broken
Post by: almodovaris on January 22, 2023, 08:05:53 pm
It says:

Code: [Select]
Use of uninitialized value $h in hash element at /usr/local/sbin/ddclient line 4                                                                                                                                                                                                                                             105.
Use of uninitialized value $h in hash element at /usr/local/sbin/ddclient line 4                                                                                                                                                                                                                                             107.
Use of uninitialized value $h in hash element at /usr/local/sbin/ddclient line 4                                                                                                                                                                                                                                             108.
Use of uninitialized value $_[0] in sprintf at /usr/local/sbin/ddclient line 216                                                                                                                                                                                                                                             3.
SUCCESS:  updating : good: IP address set to xx.xx.xxx.xx
Use of uninitialized value $h in hash element at /usr/local/sbin/ddclient line 4                                                                                                                                                                                                                                             105.
Use of uninitialized value $_[0] in sprintf at /usr/local/sbin/ddclient line 216                                                                                                                                                                                                                                             3.
FAILED:   updating : unexpected status (0)
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
Use of uninitialized value in string ne at /usr/local/sbin/ddclient line 1157.
FAILED:    was not updated because protocol <undefined> is not supported.

Reverting to stable ddclient (ddclient-3.9.1.pkg) solves the problem (but you should backup the folder /usr/local/opnsense/scripts/ddclient beforehand and then restore it).
Title: Re: ddclient-devel is broken
Post by: franco on January 22, 2023, 09:06:57 pm
Please report it to upstream. We're not having any more complaints either way: https://github.com/ddclient/ddclient


Cheers,
Franco
Title: Re: ddclient-devel is broken
Post by: gertfriend on April 19, 2023, 09:21:48 am
Hello devteam,

do you still want to switch to the program, despite the very poor supports?
If someone has several firewalls with ddclient active and his dnydns-provider changes method to update IP he will be unable to use it until the ddclient-master will update it, seen, that i added regfish.de early october an until now it has not been released a new release with service integrated i think ddclient can not be the solution for such a important service.
I know it its possible to use custom but if the service does not work after a while you have to access a lot of firewalls to move from configured service to custom but this can not be a solution.

Greeting
Title: Re: ddclient-devel is broken
Post by: franco on April 19, 2023, 03:25:35 pm
One thing I want to avoid is discuss upstream issues here in the forum. We are not at liberty to impose quality requirements on third party software that was actively being asked for by community in the past either indirectly or directly. Just be careful what you wish for. ;)


Cheers,
Franco
Title: Re: ddclient-devel is broken
Post by: chemlud on April 19, 2023, 04:40:23 pm
Hi Franco, maybe you can elaborate a little on the state of OPNsense internal discussion on the future of dynamic DNS with 23.7 and beyound?
Title: Re: ddclient-devel is broken
Post by: franco on April 20, 2023, 03:45:43 pm
This incremental change was released today:

https://github.com/opnsense/plugins/blob/94d04f74c8481ea58a09aa707bde6245c9a1ef49/dns/ddclient/pkg-descr#L9-L14

We will keep doing these as requests and contributions come in. os-dyndns is scheduled for final removal in 23.7.


Cheers,
Franco
Title: Re: ddclient-devel is broken
Post by: Chaosphere64 on April 21, 2023, 08:36:17 am
As soon as I change the backend to OPNSense the ddclient service does not start any longer, even without ANY config. Can anyone confirm?

Edit: running OPNSense 23.1.6
Title: Re: ddclient-devel is broken
Post by: franco on April 21, 2023, 10:01:46 am
Yes, because it doesn't use ddclient. There might be a problem with the PID file lookup. I'll try to fix.


Cheers,
Franco
Title: Re: ddclient-devel is broken
Post by: franco on April 21, 2023, 10:12:17 am
Here we go... thanks for the report!

https://github.com/opnsense/plugins/commit/f920b48a94
Title: Re: ddclient-devel is broken
Post by: Chaosphere64 on April 21, 2023, 10:21:45 am
How can I patch it into my system?

Thanks!
Title: Re: ddclient-devel is broken
Post by: franco on April 21, 2023, 10:25:20 am
# opnsense-patch -c plugins f920b48a94
# service configd restart


Cheers,
Franco
Title: Re: ddclient-devel is broken
Post by: Chaosphere64 on April 21, 2023, 10:37:24 am
Patching worked as well as the Cloudflare DNS updates now (dual stack).

Thanks, franco!
Title: Re: ddclient-devel is broken
Post by: franco on April 21, 2023, 10:43:25 am
Ok prefect, thanks for testing! 8)
Title: Re: ddclient-devel is broken
Post by: gstyle on April 21, 2023, 04:34:18 pm
Hi,

can anybody explain the "OPNsense backend"?

I was using ddclient and the backend was selected to ddclient.
My domain was updated, however ddclient could not understand the response code from the provider, so I also never saw the IP in the OPNsense GUI. Also ddclient always retried to set the IP, although it was already set.

I now changed the backend to "OPNsense".
I see now, that the ddclient service is not running anymore.
However, in the Dynamic DNS settings, I now see my IP and the time of the latest update.
Also in the log-file I see a notice "execute" for my account every 10min.
I have to verify it with a change of the IP, but for now it seems to work.

What I do not really understand:
What happens if I change the backend to "OPNsense"?
Is this an alternative to os-ddclient and os-dyndns?
Or is this a part of ddclient?

I am especially curious, as my ddclient service now is not running anymore.
Title: Re: ddclient-devel is broken
Post by: franco on April 21, 2023, 09:08:25 pm
It's a rewrite to leverage the "ddclient" frontend handling without actually having to use the ddclient software on the backend.


Cheers,
Franco
Title: Re: ddclient-devel is broken
Post by: gstyle on April 21, 2023, 11:05:28 pm
Ah interesting.

Can I then uninstall the os-ddclient plugin (when using the OPNsense backend)?
Or will I then lose my config or the complete Dynamic DNS Service?
Title: Re: ddclient-devel is broken
Post by: tidarp5 on April 22, 2023, 06:11:45 am
Anyone able to use OPNsense backend in 23.1.6 with DuckDNS?

I've tried to use 'custom' and 'DynDns2' protocol with DuckDNS domain (as they also host a DynDns compatible endpoint). Always got this error as ddclient service always fail to start:

Code: [Select]
Error ddclient Unable to read file /var/tmp/ddclient_opn.status
seems to be the same issue mentioned here with no solution: https://forum.opnsense.org/index.php?topic=32355.msg160279#msg160279

Title: Re: ddclient-devel is broken
Post by: snippem on April 23, 2023, 03:20:48 pm
Anybody a idea?
Want to use cloudflare ddns with ipv6.
I setup a aaaa record in cloudflare to point to. As a password I used the global API. 
See pictures for the settings this is with the mentioned patch and opnsense backend.
When I check the logs ddclient is trying to write an a record. This results in a error see the screen capture. Obviously the record that it should write is a aaaa record.


Okay my fault i didn't read the topic well. I have the same error with os-ddclient. I have opnsense as the backend and cloudflare setup as ipv4. I see one update of my ip-adres on cloudflare and then i get this error:
Error   ddclient   Unable to read file /var/tmp/ddclient_opn.status

For now using the os-dyndns hope there will be a solution as this is legacy and usable untill 23.7 arrives :-\


Verstuurd vanaf mijn CPH2449 met Tapatalk
Title: Re: ddclient-devel is broken
Post by: guest36947 on April 23, 2023, 07:31:54 pm
Anyone able to use OPNsense backend in 23.1.6 with DuckDNS?

I've tried to use 'custom' and 'DynDns2' protocol with DuckDNS domain (as they also host a DynDns compatible endpoint). Always got this error as ddclient service always fail to start:

Code: [Select]
Error ddclient Unable to read file /var/tmp/ddclient_opn.status
seems to be the same issue mentioned here with no solution: https://forum.opnsense.org/index.php?topic=32355.msg160279#msg160279

Yes there was a bug that I fixed, I am guessing you are using the interface as the IP source, change it to one of the web based ip sources for now and it should work

https://github.com/opnsense/plugins/pull/3406
Title: Re: ddclient-devel is broken
Post by: tidarp5 on April 24, 2023, 06:23:57 am
Ah yes, I used the interface as the IP source. So that's why it's broken. After trying some other web based source, I found it works correctly with ipify-ipv4. Thanks!

And also for anyone else who use duckdns, the Hostnames needs to have only the sub-domain part of duckdns. For example, if your domain is 'my-domain.duckdns.org' , then just put 'my-domain' in Hostnames field.
Title: Re: ddclient-devel is broken
Post by: gpb on April 24, 2023, 03:18:27 pm
Ah yes, I used the interface as the IP source. So that's why it's broken. After trying some other web based source, I found it works correctly with ipify-ipv4. Thanks!

And also for anyone else who use duckdns, the Hostnames needs to have only the sub-domain part of duckdns. For example, if your domain is 'my-domain.duckdns.org' , then just put 'my-domain' in Hostnames field.

Thanks for this.  Just to confirm settings, you're using backend:opnsense, service:dyndns2, both username and password (token), hostname (sub-domain segment only as noted above), check ip method:ipify-ipv4, interface to monitor:WAN, forcessl:checked.

I tried using dyndns as the check ip method and didn't get an error, but also no success message.  To confirm the log messages, this is what I'm seeing now.  (It's confusing I still see ddclient running as I thought backend:opnsense negated the need for that...confirm...?)

Code: [Select]
2023-04-24T09:02:39-04:00 Notice ddclient Flush dyndns status to disk
2023-04-24T09:02:39-04:00 Notice ddclient Account xxxxxxxxxxxxxxxxxxxxxxxxxx [dyndns2 - ] changed
Title: Re: ddclient-devel is broken
Post by: tidarp5 on April 24, 2023, 04:01:55 pm
Quote
Thanks for this.  Just to confirm settings, you're using backend:opnsense, service:dyndns2, both username and password (token), hostname (sub-domain segment only as noted above), check ip method:ipify-ipv4, interface to monitor:WAN, forcessl:checked.

You need to use the custom service to call to duckdns with dyndns protocol, service:dyndns2 will not do update to duckdns endpoint.

So backend is opnsense, but service:custom, protocol:dyndns2, server: www.duckdns.org. Username can be blank and password is token, check ip method:ipify-ipv4. See my attached image for screenshot.

These are the log messages when I get the success update:
Code: [Select]
2023-04-24T10:58:40 Notice ddclient Account [custom - Duck DNS DynDns] changed
2023-04-24T10:58:40 Notice ddclient Account [custom - Duck DNS DynDns] set new ip xxx.xx.xx.xxx [good]
2023-04-24T10:58:38 Notice ddclient Account [custom - Duck DNS DynDns] execute
Note that you might need to turn on verbose logging in General setting to get these debug logs.
Title: Re: ddclient-devel is broken
Post by: gpb on April 24, 2023, 04:05:36 pm
@tidarp5 Thank you!  Much easier than trial and error.  :)
Title: Re: ddclient-devel is broken
Post by: CJ on April 27, 2023, 01:55:45 pm
Ah yes, I used the interface as the IP source. So that's why it's broken. After trying some other web based source, I found it works correctly with ipify-ipv4. Thanks!

And also for anyone else who use duckdns, the Hostnames needs to have only the sub-domain part of duckdns. For example, if your domain is 'my-domain.duckdns.org' , then just put 'my-domain' in Hostnames field.

That's only the case for the OPNSense backend.  I'm still using ddclient and full hostname and interface checking still works.
Title: Re: ddclient-devel is broken
Post by: tidarp5 on April 27, 2023, 03:54:42 pm
@ CJRoss Yes, I should clarify that this is only for when you want to use OPNSense backend, custom service and dyndns2 protocol with duckdns.
Title: Re: ddclient-devel is broken
Post by: chemlud on April 27, 2023, 05:03:14 pm
This incremental change was released today:

https://github.com/opnsense/plugins/blob/94d04f74c8481ea58a09aa707bde6245c9a1ef49/dns/ddclient/pkg-descr#L9-L14

We will keep doing these as requests and contributions come in. os-dyndns is scheduled for final removal in 23.7.


Cheers,
Franco

...was busy lately, just saw it today. Many thanks for clarification, so any kind of dynDNS service will be functional in 23.7 and onwards. Hope the ddlient will get some fixes, wouldn't like to switch to something new again on all installs...

The wrong update-status shown in logs for ddclient are not vary handy, have to play around with pind and stuff to test, if IP updates have been successful...