[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Freedombox-discuss] distributed DNS

On Tue, Mar 15, 2011 at 12:36 PM, <bertagaz at ptitcanardnoir.org> wrote:

> > I've implemented a dynamic DNS service, on top of powerdns and redis.
>  It's
> > part of the infrastructure behind pagekite.net.  I wouldn't mind sharing
> > that code, I am sure some peer review would do it good. :-)
> Nice, sure I'd like to see/test that. I'm not a lot in redis and all, but
> might be usefull in the futur.

OK.  Putting my code where my mouth is:


This code can do three things:

   1. Function as a PowerDNS pipe-backend, pulling data from Redis.
   2. Function as a command-line tool, for adding to or removing records
from Redis.
   3. Function as a Python library, for doing the same through code.

PowerDNS takes care of speaking the DNS protocol, and Redis takes care of
replication (so no need for zone transfers etc.)

I'm sorry I haven't included the dynamic DNS update CGI itself, but it is
pretty intricately tied to how I handle pagekite.net user accounts and
passwords etc.  Honestly, thats about all it does - parse the CGI arguments,
check if the credentials match and then use the library above to update DNS.

Please let me know if you find any use for this - or any bugs! :-)

It's kinda fun to sub-class PdnsChatter and wrap/rewrite the Lookup function
- that's a really easy way to generate programmatic replies to DNS lookups,
as opposed to plain just static database lookups.  The only magic it
supports today is if you set an IP address to 'self', the DNS server will
respond with its own IP address, whatever that happens to be.

Have fun!

Bjarni R. Einarsson
The Beanstalks Project ehf.

Making personal web-pages fly: http://pagekite.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/freedombox-discuss/attachments/20110317/f25b9ca8/attachment-0001.htm>

Reply to: