os-ddclient

Started by dirtyfreebooter, January 20, 2022, 10:39:42 PM

Previous topic - Next topic
Hello,

I have upgraded my opnsense instance to the latest 22.1.1_1. But is there a way to enter '@' (without quotes) as the hostname in the GUI setting?

Services: Dynamic DNS: Settings -> Edit account: hostname

Currently, if I use @, then I could not save because an error message pops up

'please specify a valid address (IPv4/IPv6) or hostname'

I can log into the console and edit ddclient.conf manually to use @ as the hostname but that won't persist after a reboot.

Thanks,
AG

@mueller: can you change your log file severity filter to "notice"... that should give the relevant messages.


Cheers,
Franco

Thanks for your help:

34862 - [meta sequenceId="1"] WARNING: file /usr/local/etc/ddclient.conf: file /usr/local/etc/ddclient.conf must be accessible only by its owner (fixed).

Quote from: franco on February 17, 2022, 01:04:18 PM
@mueller: can you change your log file severity filter to "notice"... that should give the relevant messages.


Cheers,
Franco

It seems that NOTICE is logged as ERROR? Im getting successful dynamic dns updates but they are logged as ERROR.  This is the same actually across all the logs, ERROR is logging incorrectly, some are errors some are not...

@ jclendineng I think that's an issue with ddclient specifically. it writes "ERROR" but it's just a string, not a priority.

@mueller it's not trying to update, did you apply config? everything in /usr/local/etc/ddclient.conf ?

@mueller - this bug persisted for me after the 22.1.1 update, too. i had to uninstall and reinstall the plugin for the username field to accept my google-provided usernames.

Hello,

yes, of course I pressed "apply".
And I have installed and uninstalled the plugin several times.

# nano /usr/local/etc/ddclient.conf (OPNsense)
results:
Quotedaemon=300
syslog=yes                  # log update msgs to syslog
pid=/var/run/ddclient.pid   # record PID in file.
ssl=yes

#
# setup how we expect to retrieve an IP address
#
use=if, if=igb1

use=if, if=igb1, \
protocol=dyndns2, \
server=update6.dedyn.io, \
login=yyy.dedyn.io, \
password=xxx \
yyy.dedyn.io

I installed ddclient under Debian (with the same task) on a server once, there the ddclient.conf looked like this:

Quoteprotocol=dyndns2
usev6=if, if=enp3s0
ssl=yes
use=cmd, cmd='curl https://checkipv6.dedyn.io/'
server=update6.dedyn.io
login=yyy.dedyn.io
password='xxx'
yyy.dedyn.io

run_dhclient="false"
...
run_ipup="false"
...
run_daemon="true"
...
daemon_interval="300"

Just a Heads up to anyone doing this migration right now (like me)... Dyn is currently experiencing a widespread outage.. its not dd-client.

I tried it and works well it seems like.  Still missing Cloudflare API access so had to move back to the old one. Its progress though! We have 6 months so no need to rush it.

Quote from: franco on February 17, 2022, 03:35:45 PM
@ jclendineng I think that's an issue with ddclient specifically. it writes "ERROR" but it's just a string, not a priority.

@mueller it's not trying to update, did you apply config? everything in /usr/local/etc/ddclient.conf ?

Its not, Error messages for benign items happen with a lot of the modules, looks to be a logging issue. lightpd and suricata throw the same Error logs for normal INFO level stuff at times. So its not limited to os-ddclient its something introduces in the update.

When using dd-client, can I get some clarity on "Use interface IP"?  If your in a multi-wan environment, and set this to none, will it use the IP of the WAN interface with the highest priority?

February 18, 2022, 02:05:13 AM #146 Last Edit: February 18, 2022, 02:31:24 AM by bubbagump
Quote from: tracerrx on February 17, 2022, 10:40:43 PM
When using dd-client, can I get some clarity on "Use interface IP"?  If your in a multi-wan environment, and set this to none, will it use the IP of the WAN interface with the highest priority?

I have been playing a bit and it seems the "General Settings" selection is the global default. Then, you can override this in the Account configuration. If you do not choose anything, I believe it will be the source IP that contacts the service under "Check ip method" which will depend on how your multi-WAN is configured which in your example, yes, the interface with the highest priority. If you have Round Robin, I would expect unpredictable results.

EDIT: This was somewhat helpful to compare what the OPNSense GUI was doing compared to what shows up in /usr/local/etc/ddclient.conf. I think this may help others using Cloudflare wanting to use a Global API key. https://github.com/ddclient/ddclient/blob/master/ddclient.conf.in and https://sourceforge.net/p/ddclient/mailman/message/20383414/  < this discusses the local IP overrides.

Quote from: jclendineng on February 17, 2022, 10:39:44 PM
Its not, Error messages for benign items happen with a lot of the modules, looks to be a logging issue. lightpd and suricata throw the same Error logs for normal INFO level stuff at times. So its not limited to os-ddclient its something introduces in the update.

This is way off topic and uninformed, see https://github.com/opnsense/changelog/blob/9b4d433fa80a0540c5271181bfb3998806de5141/community/22.1/22.1#L12

Quote from: bubbagump on February 18, 2022, 02:05:13 AM

I have been playing a bit and it seems the "General Settings" selection is the global default. Then, you can override this in the Account configuration. If you do not choose anything, I believe it will be the source IP that contacts the service under "Check ip method" which will depend on how your multi-WAN is configured which in your example, yes, the interface with the highest priority. If you have Round Robin, I would expect unpredictable results.

EDIT: This was somewhat helpful to compare what the OPNSense GUI was doing compared to what shows up in /usr/local/etc/ddclient.conf. I think this may help others using Cloudflare wanting to use a Global API key. https://github.com/ddclient/ddclient/blob/master/ddclient.conf.in and https://sourceforge.net/p/ddclient/mailman/message/20383414/  < this discusses the local IP overrides.

@bubbagump thanks... This helps!

Quote from: franco on February 18, 2022, 08:12:57 AM
Quote from: jclendineng on February 17, 2022, 10:39:44 PM
Its not, Error messages for benign items happen with a lot of the modules, looks to be a logging issue. lightpd and suricata throw the same Error logs for normal INFO level stuff at times. So its not limited to os-ddclient its something introduces in the update.

This is way off topic and uninformed, see https://github.com/opnsense/changelog/blob/9b4d433fa80a0540c5271181bfb3998806de5141/community/22.1/22.1#L12

:) helpful!