The fact that powerdns can recognize so called supermasters is well known. The fact that the bind-backend can act as a superslave is no common knowledge, until now 😉
In this article i will describe how to set up a bind-backend superslave server, which is surprisingly easy…
Configure your superslave server
Step one, create pdns.conf
launch=bind master=no slave=yes bind-config=/etc/powerdns/named.conf bind-supermaster-config=/var/lib/powerdns/named-superslave.conf bind-supermasters=/etc/powerdns/supermasters.conf bind-supermaster-destdir=/var/lib/powerdns/zones
Step two, create named.conf
options { directory "/var/lib/powerdns"; }; include "named-superslave.conf";
Step three, create supermasters.conf
In this file we put the ip adresses of the servers for which we act as superslave. The format is <ip-address> [accountname]. There is no authentication in the supermaster process, so the account name is just for logging.
The file should look something like this
10.0.0.1 user1 10.0.0.2 user2 ...
Step four, create named-superslave.conf
Create a empty named-superslave.conf file in /var/lib/powerdns.
Final step, create the zone directory
Create the zone directory in var/lib/powerdns
After this fire op your nameserver, sit-back, and relax…
Ps. there is one, known, bug in the experimental bind-backend superslave code. After the AXFR of the first zone to your brand new supeslave server, you must restart it before things start working as expected. If you don’t like the workaround you can also apply my patch included in issue #645 Fixed in commit 31f3d34b so a current release is a good place to start.
It turns out there was a second bug that prevented bind superslave mode to work as expected. This one is fixed in commit fb6ed6f4
Leave a Reply