nextcloud / nextcloudpi

📦 Build code for NextcloudPi: Raspberry Pi, Odroid, Rock64, curl installer...
https://nextcloudpi.com
2.49k stars 295 forks source link

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

Open livinghere opened 1 year ago

livinghere commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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