PDNSUTIL(1)
π pdnsutil β PowerDNS Authoritative Server π
okay bestie, welcome to pdnsutil(1) from the PowerDNS Authoritative Server era. this is the group chat you wanna be in.
β¨ NAME β¨
pdnsutil β PowerDNS record and DNSSEC command and control. she does records, she does DNSSEC, she does zone management, she does it all. periodt.
πΈ SYNOPSIS πΈ
pdnsutil [OPTION]... COMMAND
that's it. options, then a command. iconic structure honestly.
π¦ DESCRIPTION π¦
so pdnsutil (and yes, she used to go by pdnssec, she rebranded, we love a glow-up π
) is a powerful command that is literally your operator-friendly gateway into DNSSEC and zone management for PowerDNS.
behind the scenes, pdnsutil manipulates a PowerDNS backend database. and the way that matters is: for many databases, you can run pdnsutil remotely, and you can configure key material on different servers. like, she's not picky about location. she's flexible like that. β¨
π OPTIONS π
-h,--helpβ show summary of options. when you're lost, she's there. π«Ά-v,--verboseβ be more verbose. more words, more info, more everything.-f,--forceβ force an action. she will do the thing even if the thing is being stubborn.-q,--quietβ be quiet. shhh. π€«--config-name <NAME>β virtual configuration name.--config-dir <DIR>β location ofpdns.conf. default is/etc/powerdns.
π COMMANDS π
there are many available commands, and most of them follow this pattern:
pdnsutil <object> <action> [arguments...]
where <object> is a noun and <action> is a verb. it's giving grammar lesson but make it DNS. π
a few commands which do not apply to any particular object kind use only the verb. those ones are the independent main characters. π
π AUTOPRIMARY COMMANDS π
autoprimary add IP NAMESERVER [ACCOUNT]β add a autoprimary entry into the backend. this enables receiving zone updates from other servers. you're letting other servers slide into your zone updates. πautoprimary listβ list all autoprimaries. the whole roster. πautoprimary remove IP NAMESERVERβ remove an autoprimary from backend. not supported by BIND backend. so if you're on BIND, this one's not for you bestie, sorry. π
π CATALOG ZONE COMMANDS π
catalog list-members CATALOGβ list all members of catalog zoneCATALOG" (yes, that quote is in the original, she's got a little typo and we're keeping her exactly as she is, no notes π)catalog set ZONE [CATALOG]β change the catalog ofZONEtoCATALOG. ifCATALOGis omitted, removesZONEfrom the catalog it is in. so you can either move her or yeet her, your call. β¨
π ZONE METADATA COMMANDS π
metadata add ZONE KIND VALUE [VALUE]...β appendVALUEto the existingKINDmetadata forZONE. will return an error ifKINDdoes not support multiple values, usemetadata setfor these values. she said one value only and she meant it. πmetadata get ZONE [KIND]...β get zone metadata. if noKINDgiven, lists all known.metadata set ZONE KIND [VALUE]...β set zone metadataKINDforZONEtoVALUE, replacing all existing values ofKIND. an omitted value clears it. out with the old, in with the new. π₯
π§ NETWORK COMMANDS π§
network listβ list all defined networks with their chosen views.network set NET [VIEW]β set theVIEWfor a theNETnetwork, or delete if noVIEWargument. (again, "a the" is the original's wording, we are not editing her, she's perfect as she is π«Ά)
π ZONE RECORD COMMANDS π
in these commands, the rrset object name may also be written as record. so either one, same energy. π
rrset add ZONE NAME TYPE [TTL] CONTENTβ add one or more records ofNAMEandTYPEtoZONEwithCONTENTand optionalTTL. ifTTLis not set, the configureddefault-ttlwill be used.NAMEmust be absolute.rrset delete ZONE NAME TYPEβ delete named RRSET from zone.NAMEmust be absolute.rrset hash ZONE RNAMEβ this convenience command hashes the nameRNAMEaccording to the NSEC3 settings ofZONE. refuses to hash for zones with no NSEC3 settings. she will simply not do it. not her problem. π βοΈrrset replace ZONE NAME TYPE [TTL] CONTENT [CONTENT...]β replace existingNAMEin zoneZONEwith a new set.
β TSIG RELATED COMMANDS β
these commands manipulate TSIG key information in the database. some commands require an ALGORITHM, which can be any of the following:
hmac-md5hmac-sha1hmac-sha224hmac-sha256hmac-sha384hmac-sha512
pick your fighter. π₯
tsigkey activate ZONE NAME {primary,secondary,producer,consumer}β enable TSIG authenticated AXFR using the keyNAMEfor zoneZONE. this sets theTSIG-ALLOW-AXFR(primary/producer) orAXFR-MASTER-TSIG(secondary/consumer) zone metadata.tsigkey deactivate ZONE NAME {primary,secondary,producer,consumer}β disable TSIG authenticated AXFR using the keyNAMEfor zoneZONE.tsigkey delete NAMEβ delete the TSIG keyNAME.
β οΈ Warning: this does not deactivate said key. like, she'll delete the key but she will NOT clean up after it. that's on you bestie. π
tsigkey generate NAME ALGORITHMβ generate new TSIG key with nameNAMEand the specified algorithm.tsigkey import NAME ALGORITHM KEYβ importKEYof the specified algorithm asNAME.tsigkey listβ show a list of all configured TSIG keys.
π¦ VIEWS COMMANDS π¦
views add-zone VIEW ZONE..VARIANTβ add the givenZONEVARIANTto aVIEW.views del-zone VIEW ZONE..VARIANTβ remove aZONEVARIANTfrom aVIEW.views list VIEWβ list all zones withinVIEW.views list-allβ list all view names.
πΈ ZONE MANIPULATION COMMANDS πΈ
zone check ZONEβ check zoneZONEfor correctness. vibe check, but for your zone. βzone check-all [exit-on-error]β check all zones for correctness, aborting upon finding the first error in any zone if "exit-on-error" is specified. she's thorough but she will absolutely stop at the first mess if you tell her to.zone clear ZONEβ clear the records in zoneZONE, but leave actual zone and settings unchanged. records gone, settings stay. the outfit changes, the girl does not. πzone create ZONEβ create an empty zone namedZONE.zone delete ZONEβ delete the zone namedZONE.zone edit ZONEβ opensZONEin zonefile format (regardless of backend it was loaded from) in the editor set in the environment variableEDITOR. ifEDITORis empty,pdnsutilfalls back to usingeditor.zone increase-serial ZONEβ increases the SOA-serial by 1. usesSOA-EDIT.zone list ZONEβ show all records forZONE.zone list-all KINDβ list all active zone names of the givenKIND(primary,secondary,native,producer,consumer), or all if none given. passing--verboseor-vwill also include disabled or empty zones.zone load ZONE FILEβ load records forZONEfromFILE. ifZONEalready exists, all records are overwritten, this operation is atomic. ifZONEdoesn't exist, it is created. either way, she handles it. β¨zone set-account ZONE ACCOUNTβ change the account (owner) ofZONEtoACCOUNT.zone set-kind ZONE KINDβ change the kind ofZONEtoKIND(primary,secondary,native,producer,consumer).zone set-option ZONE [producer | consumer] [coo | unique | group] VALUE [VALUE ...]β set or remove an option forZONE. providing an empty value removes an option.zone set-options-json ZONE JSONFILEβ change the options ofZONEto the contents ofJSONFILE.zone zonemd-verify-file ZONE FILEβ validate ZONEMD forZONEread fromFILE.
π SECONDARY ZONE COMMANDS π
zone change-primary ZONE PRIMARY [PRIMARY]...β change the primaries for secondary zoneZONEto new primariesPRIMARY. allPRIMARYs need to to be space-separated IP addresses with an optional port. (yep, "to to" β original says it, we're keeping it, she's got a stutter and she's adorable π«Ά)zone create-secondary ZONE PRIMARY [PRIMARY]...β create a new secondary zoneZONEwith primariesPRIMARY. allPRIMARYs need to to be space-separated IP addresses with an optional port.
okay bestie that's part one, and there is so much more coming, so don't go anywhere π
β¨ DNSSEC-RELATED COMMANDS β¨
okay bestie this is the section where things get β¨secureβ¨. Several commands down here mess with the DNSSEC keys and options for zones. Some of them need an ALGORITHM set, and here's the whole list of what's supported, no gatekeeping:
rsasha1rsasha1-nsec3-sha1rsasha256rsasha512ecdsa256ecdsa384ed25519ed448
NOTE:ed25519anded448are only gonna be available if the right cryptographic libraries were chillin' around while PowerDNS got compiled on your particular system. So if they're missing, it's not you, it's your build. π
So besides the algorithm, some of the commands below might ask you for a key size in bits. Here's the tea: for ECC algorithms you can just omit the key size entirely, because each one only supports a single valid size. For ECDSA256 and ED25519, it's 256; for ECDSA384, it's 384; and for ED448, it is... 456. yes really. iconic of it. π
zone dnssec-disable ZONEβ deactivates every single key and unsetsPRESIGNEDin ZONE. bye keys πzone export-dnskey ZONE KEY_IDβ exports the DNSKEY and DS of the key with key id KEY_ID inside zone ZONE, straight to standard output.zone export-ds ZONEβ exports all the KSK DS records for ZONE to standard output. all of them. periodt.zone list-keys [ZONE]β lists DNSSEC info for every key, or just for ZONE if you pass one. Throw in--verboseor-vand it'll also include the keys for disabled or empty zones. sneaky little bonus β¨zone rectify ZONEβ calculates the'ordername'and'auth'fields for a zone called ZONE so they comply with DNSSEC settings. super useful for fixing up migrated data, fr fr.zone rectify-allβ same thing but for all the zones, so they all comply with DNSSEC settings. also great for fixing up migrated data. go off.zone secure ZONEβ configures a zone called ZONE with reasonable DNSSEC settings. > bestie, you should manually runpdnsutil zone rectifyafterwards, don't forget. πzone secure-all [increase-serial]β configures all zones that aren't currently signed with reasonable DNSSEC settings. If you setincrease-serialit'll bump the serial of those zones too. > and yes, you should manually runpdnsutil zone rectify-allafterwards. no skipping. πzone set-nsec3 ZONE ['HASH-ALGORITHM FLAGS ITERATIONS SALT'] [narrow]β sets NSEC3 parameters for this zone. The quoted params are4values used for the NSEC3PARAM record, and they decide how NSEC3 records get created. The NSEC3 parameters must be quoted on the command line. HASH-ALGORITHM has to be1(SHA-1). Setting FLAGS to1enables NSEC3 opt-out operation β only do this if you know you actually need it. For ITERATIONS, please go consult RFC 5155, iykyk.
And lowkey be aware that a high number might overload validating resolvers, and that a limit can be set with max-nsec3-iterations in pdns.conf. The SALT is a hexadecimal string encoding the bits for the salt, or - to use no salt.
Setting narrow makes PowerDNS send out "white lies" (RFC 7129) about the next secure record to prevent zone enumeration. Instead of looking it up in the database, it'll send out the hash + 1 as the next secure record. Narrow mode requires online signing capabilities by the nameserver and therefore zone transfers are denied. no transfers for you π«
If you only pass the zone as argument, the 4-parameter quoted string defaults to '1 0 0 -', as recommended by RFC 9276. slay.
A sample commandline would be:
pdnsutil zone set-nsec3 powerdnssec.org '1 1 1 ab' narrow
WARNING: If running in RSASHA1 mode (algorithm5or7), switching from NSEC to NSEC3 will require a DS update in the parent zone. β οΈ
zone set-presigned ZONEβ switches ZONE to presigned operation, utilizing in-zone RRSIGs.zone set-publish-cdnskey ZONE [delete]β sets ZONE to publish CDNSKEY records. Add'delete'to publish a CDNSKEY with a DNSSEC delete algorithm. cute.zone set-publish-cds ZONE [DIGESTALGOS]β sets ZONE to respond to queries for its CDS records. The optional argument DIGESTALGOS should be a comma-separated list of DS algorithms to use. By default this is2(SHA-256).0will publish a CDS with a DNSSEC delete algorithm.zone show ZONEβ shows various details of the zone called ZONE, including all its DNSSEC related settings. the vibes check πzone unset-nsec3 ZONEβ converts ZONE to NSEC operations. > WARNING: If running in RSASHA1 mode (algorithm5or7), switching from NSEC to NSEC3 will require a DS update at the parent zone! β οΈzone unset-presigned ZONEβ disables presigned operation for ZONE.zone unset-publish-cdnskey ZONEβ sets ZONE to stop publishing CDNSKEY records.zone unset-publish-cds ZONEβ sets ZONE to stop responding to queries for its CDS records.
π ZONE KEY COMMANDS π
the key management era. let's go.
zone activate-key ZONE KEY_IDβ activates a key with id KEY_ID within a zone called ZONE.zone add-key ZONE [KSK,ZSK] [active,inactive] [published,unpublished] ALGORITHM [KEYBITS]β creates a new key for zone ZONE, and makes it aKSK(that's the default) or aZSK, with the specified ALGORITHM and KEYBITS. If KEYBITS is omitted, the value ofsetting-default-ksk-sizeorsetting-default-zsk-sizegets used instead.
The key is inactive by default, so set it to active if you want it to immediately start signing ZONE. The key is published in the zone by default, so set it to unpublished to keep it from being returned in a DNSKEY query β which is super useful for algorithm rollovers. β¨
It prints the id of the added key.
zone deactivate-key ZONE KEY_IDβ deactivates a key with id KEY_ID within a zone called ZONE.zone export-key ZONE KEY_IDβ exports the full (private) key with key id KEY_ID inside zone ZONE to standard output. The format used is compatible with BIND and NSD/LDNS. π₯zone export-key-pem ZONE KEY_IDβ exports the full (private) key with key id KEY_ID inside zone ZONE to standard output in the PEM file format. That format is compatible with many non-DNS software products, so it plays nice with the outside world. π«Άzone generate-key {KSK,ZSK} [ALGORITHM] [KEYBITS]β generates a ZSK or KSK with the specified algorithm and bits and prints it on standard output. If ALGORITHM isn't set,ECDSA256is used. If KEYBITS isn't set, an appropriate keysize gets picked for the ALGORITHM: for RSA keys that's2048bits for KSK and1024bits for ZSK; for ECC keys it's the algorithm-required size mentioned above. so hands-off, it handles it.zone import-key ZONE FILE [KSK,ZSK] [active,inactive] [published,unpublished]β imports from FILE a full (private) key for the zone ZONE. The format used is compatible with BIND and NSD/LDNS.KSKorZSKspecifies the flags this key should have on import. Defaults toKSK,activeandpublished. Prints the id of the added key. πzone import-key-pem ZONE FILE ALGORITHM {KSK,ZSK}β imports from PEM FILE a full (private) key for the zone ZONE with a specified ALGORITHM. The format used is compatible with many non-DNS software products.KSKorZSKspecifies the flags this key should have on import. Prints the id of the added key.zone publish-key ZONE KEY_IDβ publishes the key with id KEY_ID within zone ZONE.zone remove-key ZONE KEY_IDβ removes a key with id KEY_ID from zone ZONE. bye bestie πzone unpublish-key ZONE KEY_IDβ unpublishes the key with id KEY_ID within zone ZONE.
π OTHER/MISCELLANEOUS COMMANDS π
the little grab bag of randomness. every friend group has one.
b2b-migrate OLD NEWβ migrates data from one backend to another. Needslaunch=OLD,NEWin the configuration. don't forget that part or it's giving nothing. πbackend-cmd BACKEND CMD [CMD...]β sends a text command to a backend for execution. GSQL backends will take SQL commands, other backends may take different things. > Be careful! β οΈ like actually. this one has main character energy and not always in a good way.backend-lookup BACKEND NAME [TYPE [CLIENT_IP_SUBNET]]β performs a backend record lookup.bench-db [FILE]β performs a benchmark of the backend-database. FILE can be a file with a list, one per line, of zone names to use for this. If FILE isn't specified,powerdns.comis used.create-bind-db FILENAMEβ creates a DNSSEC database (sqlite3) at FILENAME for the BIND backend. > Remember to setbind-dnssec-db=*FILE*in yourpdns.conf. πhash-password [WORK_FACTOR]β this convenience command reads a password (not echoed, so nobody's watching π) from standard input and returns a hashed and salted version, for use as a webserver password or api key. You can optionally specify an scrypt work factor, in powers of two β otherwise it defaults to1024.ipdecrypt IP_ADDRESS PASSPHRASE_OR_KEY [key]β decrypts an IP address according to the'ipcipher'standard. If the passphrase is a base64 key, add the word"key"after it.ipencrypt IP_ADDRESS PASSPHRASE_OR_KEY [key]β encrypts an IP address according to the'ipcipher'standard. If the passphrase is a base64 key, add the word"key"after it. same deal, opposite direction β¨list-algorithms [with-backend]β lists all DNSSEC algorithms supported, and optionally also lists the cryptographic library used if"with-backend"is specified. very demure, very mindful. πΈtest-schema ZONEβ tests the database schema, and this creates the zone ZONE. (yes it does both, that's the vibe.)raw-lua-from-content TYPE CONTENTβ displays record contents in a form suitable for dnsdist'sSpoofRawAction.
π SEE ALSO π
pdns_server (1), pdns_control (1)
π AUTHOR π
PowerDNS.COM BV
π COPYRIGHT π
PowerDNS.COM BV
and that's the whole page bestie!! π¦ this one was brought to you by version vibes dated Aug 05, 2026, from your favorite PDNSUTIL(1) girlie β go forth and manage those zones, you absolute legend π
π
π¦ where this page comes from
- alpine 3.24: pdns-doc 5.0.7-r0 Β· GPL-2.0-only WITH OpenSSL-Exception
- epel 10: pdns 5.0.7-1.el10_3 Β· GPL-2.0-only
- epel 9: pdns 5.0.7-1.el9 Β· GPL-2.0-only
- fedora 43: pdns 5.0.7-1.fc43 Β· GPL-2.0-only
- fedora 44: pdns 5.0.7-1.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms