DDNS Dynamic Domain Name Service

One of the hazards of self-hosting a server which you wish to access from outside your home is that most residential internet providers do not provide a fixed IP address.

Whenever your modem disconnects from the provider's network, the next time it connects it may receive a new IP address. To circumvent this issue I use FreeDNS.

You create a subdomain on one of their domain names. When WireGuard attempts to access that domain name, it is redirected to your current IP address.

If your IP address changes, you need to correct the subdomain record. That is easily done with a cronjob that periodically runs a wget or curl script. That curl script is generated as part of the subdomain record.

It should look something like this:

curl -k https://freedns.afraid.org/dynamic/update.php?your_passkey