A dynamic DNS server to host the names of guests with changing IP addresses by providing an HTTP API for updating bind9 configurations.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
notplants 216c29ef02 Merge pull request 'Fix regression of peach-dyndns-server' (#14) from fix-regression into master 5 months ago
.cargo Working devops 5 months ago
debian Change to JSONRPC server 1 year ago
devops Working cross-compile 5 months ago
docs Add documentation 1 year ago
src Working cross-compile 5 months ago
.gitignore Working devops 5 months ago
Cargo.lock Add examples to README 5 months ago
Cargo.toml Fix README 5 months ago
README.md Switch to using allow-update 5 months ago
Rocket.toml Working ansible recipe 5 months ago
cross_compile.sh Working cross-compile 5 months ago
deploy_binary.sh Working devops 5 months ago
deploy_prod.sh Add is_domain_available endpoint 1 year ago
setup_server.sh Working devops 5 months ago

README.md

peach-dyndns-server

a dynamic DNS server to host the names of guests with changing IP addresses by providing an http API for updating bind9 configurations.

Deployment

The bind9 server and peach-dyndns-server can be deployed with ansible vis setup_server.sh

Development

sudo su peach-dyndns; ./target/release/main -vv

Test

ping

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "ping", "id":1 }' 127.0.0.1:3002

register_domain

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "register_domain", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002

is_domain_available

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "is_domain_available", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002

register_domain

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "register_domain", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002

is_domain_available

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "is_domain_available", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002

test peach-bind9 is running,

# this returns version of bind running
dig -t txt -c chaos VERSION.BIND @IP_ADDRESS_OF_SERVER 

# this returns records for blue.dyn.peachcloud.org
nslookup blue.dyn.peachcloud.org YOUR_SERVER_IP_ADDRESS

# this returns records for blue.dyn.peachcloud.org
nslookup blue.dyn.peachcloud.org ns.peachcloud.org

test nsupdate is working

/usr/bin/nsupdate -k /var/lib/peachcloud/peach-dyndns/tsig.key -v <<EOF
server ns.peachcloud.org
zone bluemirage889.dyn.peachcloud.org
update delete bluemirage889.dyn.peachcloud.org
update add bluemirage889.dyn.peachcloud.org 30 A 174.76.52.101
send
EOF
cat <<EOF |  /usr/bin/nsupdate -k /var/lib/peachcloud/peach-dyndns/tsig.key -v 
server ns.peachcloud.org
zone bluemirage889.dyn.peachcloud.org
update delete bluemirage889.dyn.peachcloud.org
update add bluemirage889.dyn.peachcloud.org 30 A 174.76.52.101
send
EOF