Feature request (sort of): dynamic DNS - NoIP over IPv6?

Started by jonf, February 12, 2021, 11:28:37 AM

Previous topic - Next topic
Not sure if this is the right part of the forum to ask but here we go...

I recently signed up to NoIP's dynamic DNS service so I could link it up to my OPNsense box.  I notice that OPNsense currently supports linking your IPv4 address to your NoIP hostname, but not the IPv6 address.  I don't know if NoIP's IPv6 service wasn't available at the time NoIP was initially added to the list of providers, or if it's been tested before but not included because of some issues.

In case it's the former I wanted to ask if it could be added, so I guess this thread is sort of a feature request.  If it helps the developers here's a link I found to the details required for integrating their update service into 3rd party products, including the IPv6 related stuff:

https://www.noip.com/integrate/request

I tested this with my own hostname by resetting my broadband connection to get new IP addresses (I have both v4 and v6 enabled), then I copied/pasted their HTTPS update request link (modified with my account details, hostname, and the IPv6 address to be linked) into my browser to see if it updated my hostname's IP address.  It gave a message that said "good <newipv4address>,<newipv6address>".  I then logged into my NoIP account and both the v4 and v6 addresses got updated (maybe because I have both running on my network).

The plugin is old, and the No-IP part was no doubt written long before it provided IPv6 support. Only a few providers are given IPv6 support in the plugin (https://github.com/opnsense/plugins/blob/master/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc).

Judging from this thread (https://github.com/opnsense/plugins/issues/1611#issuecomment-706129596) it seems unlikely that it will be updated any time soon.

Quote from: Greelan on February 12, 2021, 04:27:14 PM
The plugin is old, and the No-IP part was no doubt written long before it provided IPv6 support. Only a few providers are given IPv6 support in the plugin (https://github.com/opnsense/plugins/blob/master/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc).

Judging from this thread (https://github.com/opnsense/plugins/issues/1611#issuecomment-706129596) it seems unlikely that it will be updated any time soon.

Blimey:

*  No-IP                       - Last Tested: 20 July 2008

I guess I can settle for manual IPv6 updates as and when needed... :-[


Probably though a better long term solution is for the plugin to switch to using an actively maintained client like ddclient. There is a FreeBSD port for it: https://www.freshports.org/dns/ddclient. ddclient is meant to have IPv6 support. The plugin would then I imagine largely be just a frontend for configuring the required parameters

OK I decided last night to experiment with creating a custom shell script which I could then schedule via cron.  I know the command I want to invoke, which I ran manually via a shell session:

curl "https://<username>:<password>@dynupdate.no-ip.com/nic/update?hostname=<hostname>&myipv6=<ipv6address>&myip=<ipv4address>"

I discovered that putting the URL inside double quotes updates both the v6 and v4 addresses, but without them it only updates the v4 address for some reason.  But if I try to put this into a script I get the following error from curl after running the script:

curl: (3) URL using bad/illegal format or missing URL

I tried "escaping the double quotes", as the Internet calls it, but I get the same error.  I even tried changing the shell that gets invoked after the shebang (I had it set to /bin/sh initially) - no difference.  Here's how the script currently looks:

#!/usr/local/sbin/opnsense-shell

IPV4=`curl https://ipv4.icanhazip.com/`
IPV6=`curl https://ipv6.icanhazip.com/`

curl \"https://<username>:<password>@dynupdate.no-ip.com/nic/update?hostname=<hostname>&myipv6=${IPV6}&myip=${IPV4}\"


Any ideas?

February 13, 2021, 07:11:21 PM #6 Last Edit: February 13, 2021, 07:19:03 PM by marjohn56
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

I think I finally got it working (ran it twice in the OPNsense console to make sure)! Here's the final script I have:

#!/bin/sh

# just in case the other shell doesn't work: /usr/local/sbin/opnsense-shell

ipv6=`curl https://ipv6.icanhazip.com`

curl -X POST -u "<username>:<password>" https://dynupdate.no-ip.com/nic/update?hostname=<hostname> -d myipv6=${ipv6}


It would also have helped if I thought to check the file encoding before saving so many failed versions of my script - it was set to Windows, not Unix... :-[

Thanks to everyone who chipped in :).