I can’t exactly remember when it was I stumbled over dig.jsondns.org, but
it was a while back. What I saw made a bit of an impression, and it’s been in
the back of my mind ever since. If you look at one of the samples, say, an A
record, you see basically a DNS response wrapped up in a JSON object.
This is quite easy to do, and as far as returning queries only, rather boring
as well, so why talk about it?
It occurred to me that there may be a case for providing an API to DNS
updates via HTTP for scenarios in which DDNS is not allowed or possible
(e.g. due to firewall restrictions). I discussed updating your DNS via RFC
2136 Dynamic updates recently: dynamic updates on your DNS and securing
ddns updates with SIG(0). Now there’s little wrong with nsupdate(1), but
it requires DNS “connectivity” to a server. If I’m sitting behind a firewall
which, say, allows HTTP only, I’d be stuck.
Back to the JSON object. Why not use a JSON object to update the DNS? I rather
liked the (crazy) idea and went in search of something Perl’y with which I
could easily implement a REST service. (I wanted to use Perl because the
the only decent scripting API with DNS support I know of is Net::DNS in
Perl, and it has support for dynamic updates – I’ve showed you that