Use a Gandi.Net subdomain you own as a replacement for a DynDNS host.
- Every hour (by default), it will run a script.
- That script will determine your externally-facing IPv4 and/or IPv6 address.
- It will create or update A or AAAA records for a subdomain under a domain you have registered at Gandi.Net.
I got a renewal notice for DynDNS.com and noticed that the cost had shot up precipitously. I thought there had to be a better way. I went searching at my registrar, Gandi.Net, and saw that they had an example of how to do this, using an older API. So I created a new version based on that with their v5 API.
- Installs a
systemd
user timer and user service. - Accepts necessary parameters (API key, domain name, subdomain)
- Determines your IPv4 and/or IPv6 address
- Submits those 4 pieces of information to Gandi.Net to create or update an A and/or AAAA record with a TTL of 30m
git clone https://github.com/KlfJoat/gandi.net-dns-dynamic.git
cd gandi.net-dns-dynamic
make install
(stub)
Prerequisite: Pay for a domain hosted by Gandi.Net.
- Go to Gandi.Net
- Create an API key
- Configure the API key in the
systemd
service or in the script itself - Configure the domain in the
systemd
service or in the script itself - Choose a subdomain (defaults to
hostname --short
) and configure it if necessary
See the script itself for all configuration options at the top.
- I should really create a dotfile for the configuration of this.
- I should make the Setup section above clearer and more step-by-step.
I might accept PRs, I might not. I'm trying to keep this relatively simple. But give it a shot if you have something to add!