DynDNS DIY

Created: — modified: — tags: net bind

Why use someone else's Dynamic DNS server, if you can easily run your own?

Over the time, I grew dissatisfied with free DynDNS services:

Best of all is freedns.afraid.org, which asked me to confirm my account only once so far.

But I still wandered how hard is it to implement that. Turns out, not at all! Basically, you need to have a bind server running as an authoritative server for a zone, tell it to accept commands to change it, and give proper commands to nsupdate utility.

All the changes lives basically it two files:

Note that currently this script is tightly coupled with my containers infrastructure: it expects to be located behind an nginx reverse-proxy which checks authentification and sets proper headers with username (which becomes subdomain) and remote IP address. Also note the location of key.conf file which is expected to be shared between "bind" and "dyndns" containers.

Installation is pretty easy, and the result lives at dyn.shpakovsky.ru.