Seconds, really.
First, why stop using BIND? For me it just happened because I couldn’t understand why BIND wasn’t working (again). However there are many other reasons to make the switch before it’s too late. BIND has a bad security history, PowerDNS‘s code is more “modern” and its various parts are well-separated (for example, you are not obligated to even install the recursor, it’s another daemon).
PowerDNS now has a BIND zone backend, and it works with both primary (master) and secondary (slave) zones. Before that, only database or other fancy backends were available; for hosting only some small domains it would be overkill and a pain to manage.
However the documentation wasn’t really clear. Here is how to do it.
How to do it
You should have this in your pdns.conf
file:
# Start the bind backend (you can load multiple backends) launch=bind # Path to your BIND named.conf bind-config=/etc/bind/named.conf # PowerDNS will check if the zones are modified automatically. No need to reload the daemon! bind-check-interval=300 |
And… that’s it, you’re done.
But don’t forget to set allow-axfr-ips
with the IPs of the secondary DNS servers of your primary domains in pdns.conf
(that’s allow-transfer
in named.conf
).
More details
The only thing needed in named.conf
are zone
entries, anything else is ignored. For example:
zone "example.com" IN { type slave; file "/etc/bind/sec/example.com.zone"; masters { 1.3.3.7; }; }; zone "example.net" IN { type master; file "/etc/bind/pri/example.net.zone"; }; |
If you want to create your first zone file, you can use the BIND zone file creator.
I also encourage you to try out the pdns_control
tool that is bundled with PowerDNS.