Zone Transfers (AXFR / IXFR)¶
Nexus GSLB implements RFC 5936 full zone transfer (AXFR) and RFC 1995 incremental zone transfer (IXFR, served as AXFR fallback). This allows secondary nameservers, CDN providers, and monitoring tools to pull a consistent snapshot of the zone.
Overview¶
| Property | Value |
|---|---|
| Protocol | DNS QUERY, qtype AXFR (252) or IXFR (251) |
| Standards | RFC 5936 (AXFR), RFC 1995 (IXFR) |
| Transport | TCP/53 only — UDP AXFR requests receive REFUSED |
| TSIG | Optional by default; can be required via requireTsig |
| IXFR handling | Full AXFR is returned — Nexus does not track per-serial deltas |
| Default state | Disabled — must opt in via dns.axfr.enabled: true |
Configuration¶
dns:
domain: "gslb.cc"
nsNames:
- "ns1.gslb.cc"
- "ns2.gslb.cc"
axfr:
enabled: true # required — AXFR is disabled by default
requireTsig: true # recommended for public-facing zones
allowedClients: # optional source-address allowlist
- "203.0.113.10"
- "10.20.0.0/24"
notify: # secondaries told when the zone changes
- "203.0.113.10"
- "ns2.example.net:5353"
Fields¶
| Field | Type | Default | Description |
|---|---|---|---|
enabled |
bool | false |
Allow AXFR/IXFR responses. Must be true to serve any transfers. |
requireTsig |
bool | false |
Reject unsigned transfer requests with REFUSED. Recommended for public authoritative zones. When false, unsigned requests are accepted alongside TSIG-authenticated ones. |
allowedClients |
[]string | empty | IPs and CIDRs permitted to request a transfer. Empty means any client may ask. Matched against the connection address only. |
notify |
[]string | empty | Secondaries to send a DNS NOTIFY to when the zone changes. host or host:port; port defaults to 53. Empty disables NOTIFY. |
Invalid entries in either list are rejected at config load rather than at query time, so a typo cannot quietly refuse a legitimate secondary.
Zone contents¶
Each transfer response contains the following record sets, in order:
| Records | Source |
|---|---|
| SOA (opening) | Synthesised from dns.nsHostname, dns.adminEmail; serial derived from the zone's state (pools/members/services/geo rules/health), refreshed every 5s — not a per-query wall-clock timestamp |
| NS | All hostnames in dns.nsNames, TTL 3600 |
| A / AAAA | All pool members with enabled: true, using each service's configured TTL. Disabled members are excluded. Health state is not considered — all enabled members appear regardless of current health. |
| TXT | All TXT records managed via the API or RFC 2136 dynamic updates |
| SOA (closing) | Identical to the opening SOA — required bookend per RFC 5936 §2.2 |
DNSSEC-signed zones are not transferable¶
A zone with DNSSEC signing enabled is refused, not transferred. See Signed zones below.
GSLB note on A/AAAA records¶
In a standard authoritative zone, a domain name resolves to a fixed set of IPs. In a GSLB zone, the DNS server returns a single IP selected by the load-balancing algorithm on each query. Zone transfers expose the full member set rather than a single selected answer, because secondary servers have no health state.
This is intentional — secondaries should have all IPs available so that if the primary becomes unreachable, the secondary serves some answer rather than NXDOMAIN. Combine secondary serving with short TTLs (10–60s) to minimise stale-cache effects when members fail.
TSIG authentication¶
If the client request includes a TSIG record, Nexus validates it against the TSIG key store (the same store used for RFC 2136 dynamic updates). If validation fails, the server responds with an unsigned NOTAUTH (RFC 8945 §5.3.2). A valid key for a zone of a different tenant gets REFUSED.
Signed transfers work with dig -y, BIND, Knot and PowerDNS secondaries: the first message is fully signed and the rest sign timers only (RFC 8945 §5.3.1). Before 2026-09 every TSIG-signed transfer failed verification — see the changelog.
If the client request has no TSIG and requireTsig: true is set, the server responds with REFUSED.
To create a TSIG key for a secondary DNS server:
curl -X POST https://nexus-api.example.com/api/v1/dns/tsig-keys \
-H "Authorization: Bearer $GSLB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "secondary-bind9.gslb.cc.", "algorithm": "hmac-sha256."}'
Save the returned secret — it is shown once and not retrievable later. See [RFC 2136 reference(RFC2136.md) for full TSIG key management API.
Message framing¶
Records are streamed in multiple TCP messages rather than one large frame. Each message carries at most 100 RRs, keeping frames well under 16 KB. The SOA bookend is always in the final message. All messages in a single transfer share the same SOA serial, so receivers see a consistent snapshot even if DB state changes mid-transfer.
IXFR fallback¶
Nexus does not maintain per-serial zone diffs. When a secondary requests IXFR, Nexus responds with a full AXFR transfer. This is valid per RFC 1995 §4:
"If an IXFR query with the same or newer serial number is received, it MUST be treated as an AXFR query."
All major secondary DNS implementations (BIND 9, Knot DNS, NSD, CoreDNS, PowerDNS) accept AXFR in response to IXFR and handle it transparently.
True incremental transfer stays out of scope deliberately. It needs a journal of per-serial changes, and this zone has no such thing to keep: the serial is derived from a hash of replicated state rather than incremented by an edit log, and the zone is assembled on demand from pools, members, services and static records. Building a journal would mean recording every mutation on every node purely to serve deltas — real cost for a zone whose full transfer is a few kilobytes. If zones grow large enough for the difference to matter, that is the point to reconsider.
NOTIFY¶
Without NOTIFY a secondary only notices a change when its own refresh timer
fires — the SOA REFRESH field, 3600s here — so a member leaving a pool could
take an hour to reach it. List your secondaries under dns.axfr.notify and
Nexus sends an RFC 1996 NOTIFY within seconds of the zone changing.
The NOTIFY carries the current SOA in its answer section, so a secondary that already holds that serial can skip its SOA probe (RFC 1996 §3.7).
It fires when the SOA serial actually changes, detected by the same 5s refresh loop that publishes the serial — not on startup, since a restart is not news to a secondary. Delivery is fire-and-forget with one retry: a secondary that is down never holds up the serial refresh, and the next change notifies it again.
Every node notifies. All cluster nodes serve the same zone and derive the same serial from the same replicated rows, so a three-node cluster sends three NOTIFYs for one change. That is harmless — a secondary compares serials and transfers at most once — and it means secondaries stay current even when one primary is unreachable.
Permissions¶
Zone transfers are served by the DNS server directly and do not go through the REST API permission layer. Access control is via:
dns.axfr.enabled— global on/off switchdns.axfr.requireTsig— require a valid TSIG signaturedns.axfr.allowedClients— source IP/CIDR allowlist, checked before any zone data is assembled. Empty (the default) allows any source, so that upgrading does not lock out an existing secondary.- Firewall rules on port 53/TCP — restrict by source IP at the network level
These are independent: an allowlisted client still needs a valid TSIG key when
requireTsig: true. A TSIG key only transfers zones that belong to its own
tenant (dns.domain belongs to default; a delegated domain to the tenant that
added it); another tenant's zone is REFUSED. An unsigned request, where
requireTsig is off, is still limited only by allowedClients.
Signed zones¶
A DNSSEC-signed zone cannot be transferred. An AXFR/IXFR request for a
zone that Nexus signs is answered REFUSED, with the extended DNS error
Not Supported (EDE 21) and the text
zone is DNSSEC-signed; transfer of signed zones is not supported. Nothing is
handed over.
This is a property of how Nexus signs. Signing is online: signatures and denial-of-existence are produced per query, and a name that does not exist is denied with a synthesised NSEC3 record covering only that query (RFC 7129 "White Lies"). A signed zone on disk normally carries an enumerable NSEC3 chain linking every name in the zone; Nexus has no such chain to transfer, because it never builds one.
There is no correct partial answer:
- Transferring the zone unsigned would leave the secondary answering without signatures for a zone whose parent publishes a DS. Every validating resolver returns SERVFAIL for the whole zone.
- Transferring the RRsets with their RRSIGs but no denial chain would leave the secondary answering bogus for every name that does not exist, which is worse: it fails only on the queries nobody tests.
So the transfer is refused rather than quietly producing either.
What to do instead¶
| If you want | Do this |
|---|---|
| Signed answers, Nexus authoritative | Delegate the zone to Nexus directly and let it sign on the query path. This is the supported arrangement. |
| Secondaries serving the zone | Leave the zone unsigned in Nexus (dnssecEnabled: false, and it must not be the pinned dnssec.zone), and sign on the secondary if it supports its own signing. |
| Both, for different zones | Signing is per-zone. An unsigned zone still transfers normally while another zone is signed — the refusal is keyed to the zone being asked for, not to signing being enabled somewhere on the node. |
Enabling signing strands existing secondaries¶
Turning signing on for a zone that already has secondaries does not warn you and does not break resolution — the zone keeps answering, and the secondaries keep serving whatever they last transferred. Their next refresh is refused, so they quietly freeze at the serial they had.
Delegation health monitoring is what surfaces it: the zone starts reporting
secondary <addr> is N serial(s) behind, and N grows on every check. Confirmed
in a lab against a real BIND 9 secondary — after signing was enabled it logged
transfer of 'zone/IN': Transfer status: REFUSED on every attempt while
continuing to answer from its stale copy.
If a zone has secondaries, decide between signing and transferring it before enabling signing, not after.
Turning signing off for a zone makes it transferable again. Keys are retained when signing is disabled, so the DS at the parent is not invalidated — but remove the DS before serving the zone unsigned from a secondary, or resolvers will still expect signatures.
Inbound transfers — Nexus as the secondary¶
Everything above is Nexus handing its zone to somebody else. The reverse also works: Nexus can slave a zone from an external primary and answer it alongside its own steered zones.
The framing that matters: your existing DNS stays authoritative for its zone, and Nexus serves a copy. That lets you put Nexus in front of a zone — delegating to it, or adding it as one more nameserver — without moving that zone off whatever manages it today.
What a slaved zone is, and is not¶
A secondary zone is somebody else's data, so nothing of yours applies to it:
| Behaviour | |
|---|---|
| Records | Exactly what the last AXFR delivered — including types Nexus has no record editor for |
| Steering | Never applied. A service at the same name does not affect a slaved zone |
| Static records | Not merged in. nexus_record entries under a slaved apex are not served |
| SOA / NS | The primary's, verbatim. Per-zone overrides do not apply |
| DNSSEC | Never signed with this cluster's keys. See the caveat below |
| AXFR out | Allowed — re-serving a slaved zone is a normal hidden-primary chain |
A zone is either served from your own data (a delegated domain) or transferred in — never both. Declaring an apex that already exists as the other kind is refused.
Adding one¶
gslbctl domains secondary add example.com --primary 192.0.2.53
# with an authenticated transfer:
gslbctl domains secondary add example.com --primary 192.0.2.53 --tsig-key <key-id>
--primary takes a host or host:port; a bare host means port 53. Also
available on Admin → Domains → Secondary Zones in the WebUI, and as the
nexus_secondary_zone Terraform resource.
The primary must allow transfers from every Nexus node — and if you use a TSIG key, it must be the same key on both sides.
Refresh, retry and expiry¶
Timers come from the zone's own SOA, as RFC 1035 §3.3.13 requires — Nexus has no timer settings of its own for this:
| SOA field | What Nexus does |
|---|---|
| REFRESH | How long between SOA probes when everything is working |
| RETRY | How long before trying again after a failed probe or transfer |
| EXPIRE | How long the held copy may keep being answered with no successful contact |
A probe that finds the same serial is a success: it resets the EXPIRE clock without re-transferring. That is why the status shows two timestamps — when the data last changed, and when contact was last made. Only the second one drives expiry.
Transfers run on the rqlite Raft leader only. Three nodes each pulling the same zone would triple the load on someone else's primary to reach the identical state, since the result is stored in replicated rows every node reads.
NOTIFY¶
Nexus accepts RFC 1996 NOTIFY for its secondary zones, which turns "within
REFRESH" into "within seconds". Point your primary's also-notify (or
equivalent) at the Nexus nodes:
zone "example.com" {
type primary;
file "/etc/bind/db.example.com";
allow-transfer { 203.0.113.10; 203.0.113.11; };
also-notify { 203.0.113.10; 203.0.113.11; };
};
A NOTIFY is accepted only from the address the zone is configured to transfer
from, and everything else is REFUSED. NOTIFY is an unauthenticated UDP
packet, so acting on one from anywhere would let any host on the internet make
Nexus hammer your primary. The serial the packet carries is never trusted
either — it only schedules a probe, and Nexus asks the primary itself.
Status, and what is actually being answered¶
gslbctl domains secondary list
gslbctl domains secondary show example.com
gslbctl domains secondary records example.com # the copy held, in zone-file form
| Status | Answering? | Meaning |
|---|---|---|
ok |
yes | Current. |
error |
yes | The last refresh failed, but the copy held is still inside EXPIRE. This is what EXPIRE is for — a secondary rides out an unreachable primary. |
expired |
no — SERVFAIL |
Past EXPIRE with no successful contact. The records are kept, so a primary that comes back does not cause a window of NXDOMAIN. |
pending |
no — SERVFAIL |
No transfer has succeeded yet. |
An unreachable primary is never fatal and never silently drops the zone. It is
logged, retried on RETRY, and surfaced as error with the reason on all three
surfaces.
Slaving a DNSSEC-signed zone is not fully supported¶
If the primary's zone is signed, the transferred RRSIG records are stored and
positive answers are served with their signatures. Negative answers are not:
proving denial of existence needs the zone's NSEC/NSEC3 chain to be walked,
which Nexus does not yet do for transferred zones. A validating resolver will
therefore treat NXDOMAIN and NODATA from a slaved signed zone as bogus.
Nexus does not sign a slaved zone with its own keys under any circumstances — that would produce signatures under a DS nobody published, which is worse than none.
Until this is completed, slave unsigned zones. This is the mirror image of the restriction on transferring signed zones out, and for the same underlying reason: half a chain of trust fails only on the queries nobody tests.
Hidden primary¶
A hidden primary serves no public queries. It exists only to feed secondaries, which are the nameservers the parent zone delegates to. Nexus does the steering, your existing DNS estate does the serving.
The zone must be unsigned. A hidden primary feeds secondaries by zone transfer, and Nexus refuses to transfer a signed zone — see Signed zones. Sign on the secondaries, or delegate to Nexus directly instead of using a hidden primary.
- Point the delegation at the secondaries, not at Nexus. The parent zone's NS records name your BIND/Knot/NSD servers.
- Advertise those names from the zone apex so the zone agrees with the delegation:
- Restrict transfers to the secondaries and notify them:
- Create a TSIG key (
/api/v1/dns/tsig-keys, orgslbctl tsig-keys create) and configure the same key on each secondary. - On a BIND secondary:
- Firewall port 53/TCP on the Nexus node to the secondaries only.
The trade-off is inherent to the design, not to this implementation: a secondary
serves whatever it last transferred, so health-based steering only moves as fast
as the zone's TTLs and transfer cadence. Members are transferred while enabled
regardless of health (a secondary has no health data), so a failing member stays
in the secondary's copy until it is disabled or removed. Where steering must
react in seconds, delegate to Nexus directly instead.
Troubleshooting¶
REFUSED on AXFR request
- The zone is DNSSEC-signed — signed zones are not transferable. The response
carries EDE 21 (Not Supported);
dig +dnssecprints it as an; EDE:line, and the node logsaxfr: transfer refused, zone is DNSSEC-signed. See Signed zones. dns.axfr.enabledisfalse— set it totrueand restart.- The request came over UDP — AXFR requires TCP. Verify your secondary is configured for TCP transfer.
requireTsig: trueis set but the request has no TSIG key — add a TSIG key to the secondary configuration.
NOTAUTH on AXFR request
- TSIG signature validation failed. Common causes:
- Wrong key name (must match exactly, including trailing dot)
- Wrong secret value
- Clock skew greater than 5 minutes between secondary and primary
Empty zone (SOA only, no A records)
- No services are configured, or all configured services have no pool assigned (
pool_id IS NULL) - All pool members are disabled (
enabled: false) - Database is nil (DNS server started without a DB path)
Test the transfer manually
# Unsigned
dig AXFR gslb.cc @<nexus-ip> -p 53
# With TSIG (requires bind-utils / dig with TSIG support)
dig AXFR gslb.cc @<nexus-ip> -p 53 \
-y "hmac-sha256:secondary-bind9.gslb.cc.:<base64-secret>"
Code references¶
internal/dns/axfr.go:handleAXFR,buildZoneRRsinternal/dns/server.go:AXFRConfig, routing inhandleDNSRequestinternal/storage (rqlite.go + storage_*.go):ListServices,ListAllTXTRecords