plugins icon indicating copy to clipboard operation
plugins copied to clipboard

dns/ddclient: no-ip broken

Open theepan007 opened this issue 2 years ago • 11 comments

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

  • [x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
  • [x] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
  • [x] The title contains the plugin to which this issue belongs

Describe the bug IP address changes to WAN interface are not detected and sent to No-IP service, and ddclient logs the following messages:

ddclient[43123]	60634 - [meta sequenceId="2"] WARNING: unable to determine IP address	
ddclient[43123]	59557 - [meta sequenceId="1"] WARNING: found neither ipv4 nor ipv6 address

Doesn't matter what combination of Check ip method and Interface to monitor I use:

Check ip method: Interface, Interface to monitor: WAN Check ip method: noip-ipv4, Interface to monitor: WAN Check ip method: noip-ipv4, Interface to monitor: none

I prefer the Interface/WAN method as this keeps detection local and only sends data to no-ip when there are changes.

The generated ddclient.conf is:

daemon=300
syslog=yes                  # log update msgs to syslog
pid=/var/run/ddclient.pid   # record PID in file.
verbose=yes
ssl=yes

use=if, if=vtnet1, \
protocol=noip, \
login=xxxx, \
password=yyyy \
my.no-ip-name.net

I started using ddclient late last year, and this has "always" been an issue for me.

To Reproduce Steps to reproduce the behavior:

  1. Add a Noip service
  2. Choose Check IP method = Interface
  3. Choose Interface to monitor = WAN

As mentioned I have also tried using Check IP method = noip-ipv4, same result.

Expected behavior The public IP is correctly detected, change sent to No-IP service if update is needed.

Relevant log files

ddclient[43123]	60634 - [meta sequenceId="2"] WARNING: unable to determine IP address	
ddclient[43123]	59557 - [meta sequenceId="1"] WARNING: found neither ipv4 nor ipv6 address

Workaround Modifying the ddclient.conf as follows:

From:

use=if, if=vtnet1, \

To:

use=if, if=vtnet1

And restarting the service - but this only persists until next reboot or update.

Environment OPNsense 22.1.9 (amd64, OpenSSL) Proxmox VM Host CPU pass-through: Intel(R) Core(TM) i3-8109U CPU @ 3.00GHz (2 cores, 2 threads) Network: VirtIO

theepan007 avatar Jun 24 '22 18:06 theepan007

See the workaround I'm using in the above - I just modified the command called to use curl and icanhazip.com - checkip is the script that is failing for some reason.

ilikenwf avatar Jul 27 '22 04:07 ilikenwf

I was able to successfully update IPs for no-ip hostnames by configuring the service type 'custom'. Screenshot_2022-08-04_19-05-34

maxkratz avatar Aug 04 '22 17:08 maxkratz

Interesting. I may have to try it.

ilikenwf avatar Aug 04 '22 17:08 ilikenwf

@maxkratz, nicely done, thank you. Your workaround solved my issue as well - now my ddclient can detect the WAN IP address and update if needed.

theepan007 avatar Aug 05 '22 00:08 theepan007

I had this same issue, the problem was the python script /usr/local/opnsense/scripts/ddclient/checkip always returning None. This script calls the various services via curl, which is hard coded to timeout after 10 seconds. Updating the script to timeout after 15 seconds fixed the issue for me...

christian-schulze avatar Aug 26 '22 18:08 christian-schulze

What does 10 to 15 seconds fundamentally change about this? This is something about your setup, maybe DNS timeout.

fichtner avatar Aug 26 '22 18:08 fichtner

@fichtner its absolutely a timeout:

$ /usr/local/bin/curl -m 10 http://ip1.dynupdate.no-ip.com/
curl: (28) Resolving timed out after 10010 milliseconds

and with a longer timeout:

$ /usr/local/bin/curl -m 15 http://ip1.dynupdate.no-ip.com/
202.xx.xx.xxx

christian-schulze avatar Aug 26 '22 18:08 christian-schulze

I don’t think this is a technical problem we can solve by fiddling with a timeout. 10 seconds is more than enough for a healthy connection.

fichtner avatar Aug 26 '22 19:08 fichtner

The timeout wasn't my issue either, since I was using interface detection method.

So far the only thing that worked for me is described in the workaround section of the initial post, as well as changing 'Service' to 'Custom' as described by @maxkratz. The latter being what I ended up doing, since it survives a reinstall/reboot.

theepan007 avatar Aug 26 '22 19:08 theepan007

Fair enough. In my particular instance its a timeout issue, so adding to the collective knowledge in case it helps someone else.

christian-schulze avatar Aug 26 '22 19:08 christian-schulze

I was able to successfully update IPs for no-ip hostnames by configuring the service type 'custom'. Screenshot_2022-08-04_19-05-34

Worked for me!! Thanks

wholtii avatar Sep 17 '22 22:09 wholtii

same here solved by using custom config and interface as source for Ip opnsense 22.1.8 installed

Keldandorin avatar Nov 18 '22 16:11 Keldandorin

In my case the new timeout field fixes it, also like having the use of icanhazip as it seems to resolve faster here.

ilikenwf avatar Nov 18 '22 16:11 ilikenwf

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.

OPNsense-bot avatar Dec 21 '22 18:12 OPNsense-bot

I know this timed out, but this is 'still' a problem. I have tried many different configurations, and cannot get no-ip to work.

francismiles1 avatar Sep 13 '23 11:09 francismiles1

I have tried many different configurations, and cannot get no-ip to work.

Have you tried this way? For my setup, it worked.

maxkratz avatar Sep 13 '23 11:09 maxkratz

I have tried many different configurations, and cannot get no-ip to work.

Have you tried this way? For my setup, it worked.

Yup. Still not happy.. Its a shame really, as duckdns works well, but my organisation block it on my work laptop unfortunately, so need no-ip for wireguard access.

francismiles1 avatar Sep 13 '23 12:09 francismiles1

Yup. Still not happy..

What exactly is the problem? Could you elaborate a bit more? The configuration above works fine for me since I posted it here.

maxkratz avatar Sep 13 '23 12:09 maxkratz

Hmm, you have me second-guessing myself now. am 'actually' now not sure the service is 'Not' working.. The logs however tell me nothing of any relevance, and for sure, the updated IP address etc. is not being populated etc., but I think this is a known issue. Will fiddle further; The No-Ip web interface does not help much either as it gives no real indication of any firm IP updates (ie login logs)

3 2 1

francismiles1 avatar Sep 13 '23 12:09 francismiles1