Skip to main content
Programs can change records with standard DNS UPDATE messages (RFC 2136) signed with a TSIG key (RFC 8945). This is what DHCP servers (Kea, ISC DHCP), Kubernetes ExternalDNS, certbot-dns-rfc2136, lego and Traefik’s rfc2136 provider, and nsupdate speak. They send updates to DNZ’s DNS port, the same one clients query. Keys belong to a division and live under Settings → API tokens → DNS update keys, next to API tokens. Managing them needs the tokens.manage permission (Owner by default).
For tools that speak HTTP instead, use an API token with the ACME or DynDNS2 endpoints. See ACME certificates and Dynamic DNS.

Create a key

Click Create update key. The Kea DHCP, ExternalDNS and certbot / ACME buttons fill in a sensible scope. The form asks for:In Names, * matches anything, dots included: *.dhcp.example.com covers every name below dhcp.example.com, and _acme-challenge.* covers every ACME challenge.
The secret is shown once, together with ready-to-paste settings for nsupdate, Kea, ExternalDNS and certbot. If it gets lost, revoke the key and create a new one. Edit scope changes zones, names, types, networks, AXFR and expiry. The name and secret stay the same.

What a key may do

A key never has more rights than the person who created it. Every update is checked again:
  • The key hasn’t expired.
  • Its creator is still active and still has records.write in the division. For AXFR they need zones.read too.
  • The zone is a primary zone of the key’s division and is switched on. Secondary zones are refused: update their primary instead.
  • Every name and type in the update is inside the key’s scope. Deleting everything at a name is allowed only when the key covers every type there.
  • The update comes from an allowed address.
If any of these fails, the whole update is refused (REFUSED). Unsigned updates, or updates signed with an unknown key or a wrong secret, are refused as well (NOTAUTH with a TSIG error). Clocks may differ by up to 5 minutes.

How updates are applied

DNZ follows RFC 2136:
  1. Prerequisites are checked first: name in use / not in use, RRset exists / doesn’t exist, and RRset exists with exactly these values. If one fails, nothing changes and the answer says which (YXDOMAIN, NXDOMAIN, YXRRSET, NXRRSET).
  2. Then the updates run in order: add RRs, delete an RRset, delete everything at a name, or delete one RR.
  3. The whole message is one transaction. The zone’s serial goes up once, secondaries get a NOTIFY, and the change is written to the audit log as changed records by DNS UPDATE, by <creator> via <key>. An update that changes nothing leaves the serial alone.
  • DNZ writes the zone’s SOA itself, so SOA updates are ignored. The apex NS records and the SOA survive “delete everything at the apex”, as the RFC requires.
  • CNAME rules follow the RFC: a CNAME next to other data, or data next to a CNAME, is silently ignored. A new CNAME target replaces the old one. The apex never gets a CNAME.
  • Adding a value that is already there only updates its TTL. All records of an RRset get the TTL of the newest addition. TTLs are kept between 1 second and 7 days.
  • Only a zone’s default records are touched, never records of a split-horizon view.
  • Records that are turned off count as absent. Prerequisites don’t see them, adding the same value turns the record back on, and deletes remove them.
  • DNSSEC records (RRSIG, NSEC, DNSKEY…) are made by DNZ and can’t be updated. DS records can.
  • New records get the comment Added by DNS UPDATE (key).
Records of the editor’s types (A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, PTR, HTTPS, SVCB, TLSA, SSHFP, NAPTR, DS, URI, DNAME, LOC) are stored the normal way and stay editable in the UI. Anything else is stored exactly as received and served as is. That covers DHCID (Kea) and TXT records split into several strings (DKIM).These records show Read-only in the zone editor: they can be turned off, tagged or deleted there, but not edited. Types DNZ’s DNS library has no name for are kept in RFC 3597’s generic form (\# 4 0a000001).

Clients

In the examples, DNZ answers DNS at dns.example.com (or 192.0.2.53) on port 53. Use your server’s address and DNS port, which is shown under the key list.
dnz.key

Troubleshooting

Last used in the key list shows when and from where each key last made an update.