powertiny

Powertiny is a simple script to push all the dns zones published by a powerdns server to one or more tinydns slave servers.

It works by connecting to the local powerdns database to retrieve a list of published zones. For each zone it uses axfrdns to retrieve a copy of the zone in tinydns format. It then compiles them into a single cdb database file suitable for tinydns and uses scp to copy that to each slave server.

As a performance enhancement it uses an MD5 hash of the combination of zones and checks whether each slave is already up to date before pushing out a new copy. This makes it suitable to run regularly from cron, even for large, mostly static dns.

Out of the box it will work with Postgresql-backed PowerDNS, but with minor modifications it could be used with any master dns server that supports AXFR.

It's configured by editing the script. The main prerequisites are

  1. having tcpclient, axfr-get and tinydns-data installed
  2. configuring the master dns server to allow zone transfers
  3. passwordless scp to each tinydns slave, to an account that can write to /etc/tinydns/root/data.cdb

Download powertiny.pl