Simple DynDNS server
This is a simple DynDNS server implementation that builds on the Knot DNS server.
Features
Register a new domain:
$ curl -4 'http://localhost:3000/register?domain=myname'
{
"domainName":"myname.test.test",
"token":"ecf43b7659fc09d81c4b55ded31d6b0b",
"message":"DNS record is not served until first DynDNS update."
}
Update DNS record:
curl -4 'http://localhost:3000/update?token=ecf43b7659fc09d81c4b55ded31d6b0b&ip=1.1.1.1'
{
"message":"Updated."
}
WARNING: You need to use a proxy that handles authentication and authorization!
Dependencies
- Knot DNS server - Open source DNS server developed by the Czech domain registrar
- MongoDB - NoSQL database (unless you use the memory database, which is NOT recommended)
Running
Setup: npm install
sudo node index.js
Configuration
This software expects config in a file called config.json
. In case this file not exists, it is copied from config.json.defaults
. For all config options, look at config.json.defaults
.
Database backend: the default database backend is "memory"
. It is volatile, the code contains a lot of linear searches, therefore it is suitable for testing only. To use MongoDB, change it to mongodb
.