DDNS Update
As the name says, my home server is running at home. This implies, that every now and then my internet service provide can decide to assign new IP addresses to my home network. My domains are registered at netcup which allows to control the DNS entries via an API. So what I did is to fork the github repository dynamic-dns-netcup-api repository from Lars-Sören Steck. I enhanced the IP update script by adding the capability to only call the netcup API if either the IP4 or IP6 address has been changed. The result id provided in this repository.
With the update script, a particular subdomain’s IP address is being updated, which I reference for other subdomains on my home server via CNAME entries.
I install the update script in my local user binary directory with this script:
#!/bin/sh
mkdir -p $HOME/bin/ddns-netcup
cp config.php functions.php update.php $HOME/bin/ddns-netcupThe script is called regularly every 15 minutes by using a crontab entry:
# m h dom mon dow command
*/15 * * * * $HOME/bin/ddns-netcup/update.php > $HOME/bin/ddns-netcup/update.log 2>&1