Initial checkin

This commit is contained in:
Pim van Pelt
2017-12-22 16:42:32 +01:00
commit 530888899a
5 changed files with 420 additions and 0 deletions

42
README.md Normal file
View File

@ -0,0 +1,42 @@
# Source
http://mkaczanowski.com/golang-build-dynamic-dns-service-go/
# Compiling
```
go get github.com/miekg/dns/...
go get github.com/boltdb/bolt/...
go build dyndns-server.go
ls -la dyndns-server
```
# Deploying
MACH=dyn.paphosting.net
scp dyndns-server root@$MACH:/usr/local/sbin
scp systemd/dyndns-server.service root@$MACH:/etc/systemd/system/
# Running
ssh root@$MACH
adduser dyndns
mkdir /var/dyndns
chown dyndns /var/dyndns
service dyndns-server start
# Testing
cat << EOL > update.txt
server $MACH 53
debug yes
key key bWFyaWVsbGU=
zone dyn.ipng.nl.
update delete test.dyn.ipng.nl. A
update delete test.dyn.ipng.nl. AAAA
update add test.dyn.ipng.nl. 120 A 192.0.2.1
update add test.dyn.ipng.nl. 120 AAAA 2001:db8::1
show
send
EOL
nsupdate update.txt