Waganawa

Download

Repository hosted on GitHub

KHI End User License Agreement:

I’m sure you don’t like reading these stupid things any more than I like writing them, so we’ll keep it short and sweet:

  1. This software is provided to you, for your own personal, private use, without any kind of warranty or promise of support whatsoever.
  2. You are licensed to use this software, not to distribute it or sell it. I ask that you please not mirror any files which I have not explicitly relinquished my exclusive copyright to anywhere without prior authorization.

Sound cool to you?

Tired of paying for dynamic DNS services just to work around your lack of a static IP? I certainly was, so I configured my own nameserver to do it for me and wrote this here Sinatra-based JSON web service to provide a public interface for it that my router firmware could handle talking to.

Everything is laid out under the assumption that you’ll be deploying via Passenger (and if you’re not then there’s probably something really wrong with you). The deploy.rb file is left blank as an exercise for the experienced Capistrano user.

The dig and nsupdate tools must be available on your server, and you’ll also have to, you know, configure BIND to allow this sort of thing, too. If you’ve never done that before, then I’d very strongly recommend picking up a copy of this book by Cricket Liu, as it’s not something that can be summarized easily.

As it is, this application will blindly try to update any zone it’s asked to. If you plan on making this a public service, you may want to add some sort of whitelisting to it to restrict its activities to zones you actually control.

Example Usage:

Updating an RR (POST)
curl -kid "key=plaintextkey" https://host/ddns/foo.ddns.mydomain.com

Querying an RR (GET)
curl -i http://host/ddns/foo.ddns.mydomain.com

Base64 Key Generation (GET)
curl -i http://host/ddns/keygen/plaintextkey