8000 GitHub - ksa242/nsd-api: nsd python3 api
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ksa242/nsd-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nsd-api

python3 webservice providing a simple API to change nsd nameserver records

Dependencies
none

Setup

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

Examples

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

About

nsd python3 api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0