ddclient
ddclient is used for dynamic DNS updates over http.
Install
Install without the configuration dialog.
apt install -y ddclient
Stop
systemctl stop ddclient
Configure
Generic dyndns2 protocol server configuration.
IPv4
daemon=3600 foreground=no protocol=dyndns2 use=web, web=freedns login=XXX password=XXX server=example.com script=/ ssl=yes hostname.example.com
This requires port forwarding on the router to access internal services.
IPv6
daemon=3600 foreground=no protocol=dyndns2 login=XXX password=XXX server=example.com script=/ ssl=yes usev6=ifv6, ifv6=eth0, usev4=disabled hostname.example.com
This requires IPV6 pin-holing on the router to access internal services.
Start
systemctl start ddclient
Nextcloud Office
When using Collabora with Nextcloud office a WOPI allow list must be configured to allow access from Collabora to Nextcloud to access files.
When using IPv4 this can be fixed but for IPv6 this may be dynamic.
Configuration
The addition of the postscript option to ddclient will run an external script on IPv6 address change of the local host machine.
postscript=/usr/local/bin/wopi_allowlist
Script
This script will update the allow list.
#! /bin/bash
IPADDR=$1
if test -z "$IPADDR"; then
echo "try: wopi_allowlist IPADDR"
exit 1
fi
cd /var/www/htdocs/hostname.example.com
sudo -u www-data php occ config:app:set richdocuments wopi_allowlist --value "$IPADDR" 2>&1 1>/dev/null

