python3 webservice providing a simple API to change nsd nameserver records
Dependencies
none
Rename and edit the tokens in config.json
cp configs/config.example.json configs/config.json
cp configs/nsd-api.service /etc/systemd/system/
Give the nsd-api user permissions to modify the zones you want
cd /etc/nsd/nsd.conf.d/
chgrp nsd-api domain.com
chmod 664 domain.com
Give the nsd-api user pemissions to reload nsd
echo "nsd-api ALL=(ALL) NOPASSWD: /usr/bin/systemctl reload nsd" >> /etc/sudoers
Put Nginx or whatever you want in front as reverse proxy to provide TLS connections
Don't forget to add:
proxy_set_header X-Real-IP $remote_addr;
Because python3 http service can't speak duelstack
DynDNS
localhost:8080/mahkey/domain.net/lxd/A/update
v6.localhost:8080/mahkey/domain.net/lxd/AAAA/update
Add Record
localhost:8080/mahkey/domain.net/lxd/A/add/127.0.0.1
localhost:8080/mahkey/domain.net/lxd/AAAA/add/::1
Delete Record
localhost:8080/mahkey/domain.net/lxd/A/delete
localhost:8080/mahkey/domain.net/lxd/AAAA/delete