PowerDNS pdnsutil cheat sheet
This is an extremely simple tutorial on how to manage data in the PowerDNS Authoritative Server using the command line "pdnsutil" tool. The guide is written in the "walk through" format: create zone - add data - update serial.
CREATE ZONE
pdnsutil create-zone example.com
ADD DATA TO ZONE // Let's start by adding the root A-record and AAAA for IPv6 (cloud1.anyplanet.org)
pdnsutil add-record example.com @ A 192.168.1.2
pdnsutil add-record example.com @ AAAA 2a01:4f9:c011:8571::1
ADD DATA TO ZONE // adding a subdomain (www)
pdnsutil add-record example.com www A 192.168.1.2
ADD DATA TO ZONE // every domain needs name servers
pdnsutil add-record example.com @ NS ns1.example.com
ADD DATA TO ZONE
pdnsutil add-record example.com @ MX "10 example.com"
pdnsutil add-record example.com 3600 TXT "google-site-verification=example-id"
SET KIND OF THE ZONE // primary as default (primary, secondary, native, producer, consumer)
pdnsutil set-kind exsample.com primary
MANAGE ZONES // check the information provided
pdnsutil list-zone example.com
MANAGE ZONES // modify the zone (if changes do not miss update serial -> UPDATE SERIAL)
pdnsutil edit-zone example.com
MANAGE ZONES
pdnsutil check-all-zones
pdnsutil show-zone example.com
DELETE A SPECIFIC ZONE
pdnsutil delete-zone example.com
UPDATE SERIAL
pdnsutil increase-serial example.com
UPDATE THE CONNECTED DNS SERVERS
pdns_control notify example.com
START THE POWERDNS SERVER IN UBUNTU
service pdns start
Questions
Where do I enter a SOA-record? - No, you don't have to enter it. PowerDNS generates it automatically when you update the serial. However, specify initialization values in the /etc/powerdns/pdns.conf file.