Difference between revisions of "PowerDNS"

From Leaky
Jump to: navigation, search
(Created page with " On Debian, install the relevant packages. At time of writing, this is version 4.1.6 apt-get install pdns-server pdns-backend-sqlite3 apt-get install sqlite3 apt-get remov...")
 
 
Line 28: Line 28:
  
 
  systemctl restart pdns
 
  systemctl restart pdns
 +
 +
Set it to start automatically
 +
 +
systemctl enable pdns
  
 
Assuming it comes up ok, you can add slave zones with the following command:
 
Assuming it comes up ok, you can add slave zones with the following command:
  
 
  pdnsutil create-slave-zone bocks.com 78.129.196.11
 
  pdnsutil create-slave-zone bocks.com 78.129.196.11

Latest revision as of 15:29, 6 April 2022

On Debian, install the relevant packages. At time of writing, this is version 4.1.6

apt-get install pdns-server pdns-backend-sqlite3
apt-get install sqlite3
apt-get remove pdns-backend-bind

Remove the bind backend config (as of 4.1.6 it doesn't support slave configs managed through pdnsutil) and create one for SQLite3.

rm /etc/powerdns/pdns.d/bind.conf
cat >> /etc/powerdns/pdns.d/sqlite3.conf <<EOF
launch += gsqlite3
gsqlite3-database=/var/lib/powerdns/powerdns.sqlite3
EOF

Update the main config to enable slave mode:

(UNTESTED) perl -spi -le 's/^# slave=yes/slave=yes/' /etc/powerdns/pdns.conf

Make sure there's a line uncommented saying "slave=yes"

Create the SQLite3 database and fix permissions

sqlite3 /var/lib/powerdns/powerdns.sqlite3 < /usr/share/pdns-backend-sqlite3/schema/schema.sqlite3.sql
chown pdns: /var/lib/powerdns /var/lib/powerdns/powerdns.sqlite3

Restart the service

systemctl restart pdns

Set it to start automatically

systemctl enable pdns

Assuming it comes up ok, you can add slave zones with the following command:

pdnsutil create-slave-zone bocks.com 78.129.196.11