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 d4d9ab3f9f Add examples to README 2021-12-18 10:36:12 -05:00
.cargo deploy_binary.sh 2021-12-06 17:49:04 +01:00
debian Change to JSONRPC server 2021-05-22 19:36:34 +02: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
templates Integration between bind and dns is working 2021-05-17 20:15:36 +02:00
.gitignore deploy_binary.sh 2021-12-06 17:49:04 +01:00
Cargo.lock Add examples to README 2021-12-18 10:36:12 -05:00
Cargo.toml Add examples to README 2021-12-18 10:36:12 -05:00
README.md Add examples to README 2021-12-18 10:36:12 -05:00
Rocket.toml Add rocket.toml and peach-dyndns-server.service 2021-05-19 11:55:33 +02:00
cross_compile.sh Add examples to README 2021-12-18 10:36:12 -05:00
deploy_binary.sh Add examples to README 2021-12-18 10:36:12 -05:00
deploy_prod.sh Add is_domain_available endpoint 2021-05-25 15:05:24 +02:00

README.md

peach-dyndns-host

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

Setup

The code in this repo assumes the existence of an installed and running bind9 server on the same server as is running peach-dyndns-server. Documentation for setting up bind9 can be found here.

The peach-dyndns-server code can be compiled with

cargo deb; sudo dpkg -i target/debian/peach-dyndns-server_0.1.0_amd64.deb

Development

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

Prod Deployment

prod is deployed to /srv/peachcloud/peach-dyndns-server/prod-peach-dyndns

Staging Deployment

staging is deployed to /srv/peachcloud/peach-dyndns-server/dev-peach-dyndns

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

test peach-bind9 is running,

nslookup blue.dyn.peachcloud.org ns.peachcloud.org