Replication Setup
Goal of this lab is to setup replication between primary (e.g a01) and secondary (e.g b01).
Security note: This lab is based on pre-established wireguard vpn tunnels between primary and secondary. Remember to set these up in the real production environment or else use TSIG for the security.
Add following in /etc/powerdns/pdns.conf
primary=yes
also-notify=192.168.1.2
only-notify=192.168.1.2
allow-axfr-ips=192.168.1.2/32
Add following in /etc/powerdns/pdns.conf
secondary=yes
autosecondary=yes
allow-notify-from=192.168.1.1
loglevel=5
sudo systemctl restart pdns
At this point we have PowerDNS running on both primary and secondary with notfications and zone transfers enabled from primary to secondary.
Setup secondary to use primary as “autoprimary” for automatic domain provisioning.
On your secondary (b01), use following command
anurag@b01:~$ sudo pdnsutil add-autoprimary 192.168.1.1 a01.learndns.info
anurag@b01:~$
You can list and verify this change:
anurag@b01:~$ sudo pdnsutil list-autoprimaries
IP=192.168.1.1, NS=a01.learndns.info, account=
anurag@b01:~$
Next, proceed to PowerDNS Admin setup.