nextcloudpi icon indicating copy to clipboard operation
nextcloudpi copied to clipboard

spDYN must use "checkip4.spdyn.de" in its script

Open livinghere opened this issue 2 years ago • 2 comments

Bug and solution

Running in a dual-stack environement (IPv4 and IPv6) lead to failures in the script /usr/local/etc/spdnsupdater/spdnsUpdater.sh. This is because http://checkip.spdyn.de than returns the IPv6 address. Instead http://checkip4.spdyn.de must be called to get the IPv4 address in any case.

You need to detect a change of the IPv4 address to initiate the dynDNS update, which also works for private address ranges according to the docs of spdyn.de. Maybe (not yet tested) some additional handling for the IPv6 address has to be added to the script, but my IPv6 address changes not that often.

Important

A possible sign of a dynDNS problem is the loss of connection to the HPB service, which stops working in the default configuration when the IPv4 address changes and is not updated. For this services it should be considered to use localhost instead of the Nextcloud DNS name...

livinghere avatar Jul 27 '23 16:07 livinghere

Addional action required for IPv6

The script has to be extended to also issue an update for the IPv6 address, if this has changed. I will try to open a pull request and add the fix.

livinghere avatar Jul 28 '23 09:07 livinghere

sorry, I don't understand the pull request mechanism well enough, so I am attaching the fixed script here... spdnsUpdater.zip

livinghere avatar Jul 28 '23 10:07 livinghere