Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 577 Bytes

README.md

File metadata and controls

38 lines (24 loc) · 577 Bytes

Dynamic nameserver

You can add entries via a HTTP endpoint.

Running

  1. Run the server as root:
sudo node server.js
  1. Add the nameserver to resolv.conf as the primary nameserver
vim /etc/resolv.conf
  1. To add new entries, make a POST request with the IP and the "serial" as json body:
curl -X POST -H 'Content-Type: application/json' -d '{"ip": 172.30.0.4, "serial": "raspberry-pi-123"}'
  1. Test it:
ping raspberry-pi-123

Should output:

PING raspberry-pi-123 (172.30.0.4) 56(84) bytes of data.
...