A dynamic DNS server to host the names of guests with changing IP addresses by providing an HTTP API for updating bind9 configurations.
Go to file
notplants d3fb621ca9 Fix README 2021-12-18 18:36:07 -05:00
.cargo Working devops 2021-12-18 17:58:48 -05:00
debian Change to JSONRPC server 2021-05-22 19:36:34 +02:00
devops Working ansible recipe 2021-12-18 18:33:45 -05:00
docs Add documentation 2021-05-19 11:03:16 +02:00
src Add examples to README 2021-12-18 10:36:12 -05:00
.gitignore Working devops 2021-12-18 17:58:48 -05:00
Cargo.lock Add examples to README 2021-12-18 10:36:12 -05:00
Cargo.toml Fix README 2021-12-18 18:36:07 -05:00
README.md Fix README 2021-12-18 18:36:07 -05:00
Rocket.toml Working ansible recipe 2021-12-18 18:33:45 -05:00
cross_compile.sh Working devops 2021-12-18 17:58:48 -05:00
deploy_binary.sh Working devops 2021-12-18 17:58:48 -05:00
deploy_prod.sh Add is_domain_available endpoint 2021-05-25 15:05:24 +02:00
setup_server.sh Working devops 2021-12-18 17:58:48 -05:00

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