powerDNS with SQLite backend as a slave for BIND

(powerDNS)[https://www.powerdns.com] it’s a great alternative for huge and bulky BIND server. Light footprint, and quick setup made that server as my obvious choice for slave server for primary BIND server. So let’s config begins:

Let’s download software first:

sudo yum install pdns-backend-sqlite

Then we have to pull schema which PDNS will use to store records:

wget https://raw.githubusercontent.com/PowerDNS/pdns/master/modules/gsqlite3backend/schema.sqlite3.sql

Let’s create some some sqlite database:

mkdir /var/db/pdns
sqlite3 /var/db/pdns/pdns.db
.read schema.sqlite3.sql

If we are setting up slave – we need tell who is supermaster:

sqlite3 /var/db/pdns/pdns.db 'insert into supermasters values ('x.x.x.x', 'ns1.domain.com', 'admin');'

Let’s make sure that pdns.db is writeable:

chown -R pdns:pdns /var/db/pdns

pdns.conf it’s also straight forward:

nano /etc/pdns/pdns.conf


finaly we can check if master allows us to make tranfer:

dig @ns1.gex.pl spidersoft.com.au AXFR

On bind end config is super simple:

options {
    notify explicit;
    also-notify { x.x.x.x; y.y.y.y; };
    allow-notify { x.x.x.x; y.y.y.y; };
    allow-transfer { x.x.x.x; y.y.y.y; };