A small dynamic DNS server. Writes a hosts file with 1 IPv4 & 1 IPv6 address.
git clone https://github.com/derhuerst/dyndns-server.git
cd dyndns-server
npm install --production
Or using Docker:
docker run -d -p 3000:3000 derhuerst/dyndns-server
DOMAIN=awesome.horse
KEY=super-secret
HOSTNAME=dyndns.example.org
Start the server:
npm start
Set the IP addresses via HTTP (or use dyndns-client):
# ip4=$(curl -s 'https://api.ipify.org')
ip4='1.2.3.4'
curl -X PATCH "http://$HOSTNAME:8053/A" -u "user:$KEY" -d $ip4
# ip6=$(curl -s 'https://api6.ipify.org')
ip6='::f0'
curl -X PATCH "http://$HOSTNAME:8053/AAAA" -u "user:$KEY" -d $ip6
Verify that dyndns-server has written a correct hosts file using cat hosts:
1.2.3.4 awesome.horse
::f0 awesome.horse
Use a DNS server that picks up the hosts file, e.g. CoreDNS with the hosts plugin. Verify that it returns the correct IP addresses:
dig +short @dyndns.example.org awesome.horse A
dig -6 +short @dyndns.example.org awesome.horse AAAA
Verify that the whole dynamic DNS setup works:
ping awesome.horse
ping6 awesome.horse
If you have a question, found a bug or want to propose a feature, have a look at the issues page.
Content type
Image
Digest
Size
39.7 MB
Last updated
over 6 years ago
docker pull derhuerst/dyndns-server