Static DNS Records¶
Static records (Solo #598) let Nexus host a whole zone, not just steered service names: fixed, non-health-checked RRs served alongside GSLB services from the same authoritative server.
Supported types: A, AAAA, CNAME, MX, SRV, CAA, PTR, HTTPS, SVCB, TLSA,
SSHFP, NAPTR, DNAME, NS, DS and the ALIAS pseudo-type. TXT is not here — it predates this feature and
keeps its own table and endpoints (/api/v1/dns/txt-records, ACME DNS-01).
NS is manageable only below a zone apex, where it delegates a subzone
(see Delegating a subzone); apex NS still comes from
dns.nsNames or the zone's own nsNames override. DNAME is stored like
any other record but is not merely served: it rewrites the whole subtree below
its owner (see DNAME).
Records may only be created inside a verified zone¶
A record's name must fall inside a delegated domain that is verified. The same rule has always applied to services; it now applies to static records and TXT records, because a name outside every zone this cluster answers for is stored, served to nobody, and quietly missing from the zone the operator meant to edit — which is exactly what a mistyped FQDN produced.
The rejection says which mistake was made:
| Situation | Response |
|---|---|
| Name inside a verified zone | Created |
| Name inside a zone that is declared but not verified | … is inside <zone>, which is declared but not verified yet — finish the delegation and verify it first |
| Name outside every zone | … is not inside any verified zone (verified: a, b) |
| Zones exist, none verified | no verified zones: declare the zone under Domains and complete its delegation first |
| No delegated domains at all | Created — open mode, unchanged for a fresh install |
| Name inside another tenant's zone | … is inside a zone that belongs to another tenant — in open mode too |
| Name inside a secondary zone | … is inside <zone>, a secondary zone: it is served from its primary's data and cannot hold records here |
The WebUI reflects this: Admin → Records and Admin → TXT Records take a name
relative to a zone plus a zone picker (verified zones only), and show the
resulting FQDN before you commit it. A blank name — or @ — means the zone
apex. gslbctl records create --name still takes a full FQDN; the server
applies the same rule and returns the same message.
Value format¶
value is standard zone-file presentation format — exactly what you would
write after the type in a BIND zone file. It is validated at create time by
parsing it into a real RR; malformed data is rejected with a 400.
| Type | Example value |
|---|---|
| A | 192.0.2.10 |
| AAAA | 2001:db8::10 |
| CNAME | target.example.com. |
| MX | 10 mail.example.com. |
| SRV | 10 5 5060 sip.example.com. |
| CAA | 0 issue "letsencrypt.org" |
| PTR | host.example.com. |
| HTTPS | 1 . alpn=h2 |
| SVCB | 1 svc.example.com. |
| TLSA | 3 1 1 <64-hex-digit cert digest> |
| SSHFP | 2 1 <40-hex-digit fingerprint> |
| NAPTR | 100 10 "u" "sip+E2U" "!^.*$!sip:info@example.com!" . |
| DNAME | new.example.net. |
| NS | ns1.child.example.com. |
| DS | 12345 13 2 <64-hex-digit digest> |
| ALIAS | steered-service.example.com. |
Owner names are normalized to lowercase FQDN (trailing dot) on write. Query matching is case-insensitive (RFC 4343); responses echo the queried case (DNS 0x20 compatible).
ALIAS¶
A CNAME is forbidden at a zone apex and at any name that holds other data
(RFC 1034 §3.6.2). ALIAS breaks that limitation safely: at query time the
server resolves the target through the normal steering pipeline
(health-filtered, geo-aware, filter chains — whatever the target service is
configured with) and answers with the resulting A/AAAA set owned by the
queried name. This is how the zone apex (example.com) fronts a steered
service.
The target should be a Nexus service domain. External targets are not recursed (v1); an ALIAS whose target is not a local service answers NODATA.
Precedence at one name¶
- A steered service always wins over static records at the same name.
- Static A/AAAA records.
- ALIAS (flattened onto its target's steered answer).
- CNAME — returned for any queried type at the name (the resolver chases the target itself).
Write-time rules enforce RFC 1034 §3.6.2: a CNAME must be the only record at its name (no coexistence with other static records, TXT records, or services — the API suggests ALIAS instead), and only one ALIAS per name. An NS record below the apex is exclusive in the same way: see Delegating a subzone.
Delegating a subzone¶
An NS record at a name below the zone apex hands that name — and everything
under it — to another server. This is how you carve eu.example.com out of a
zone Nexus is authoritative for and point it at someone else's nameservers.
# Glue first: the nameserver lives inside the subtree being delegated, so
# nothing can find it unless this zone answers for its address.
gslbctl records create --name ns1.eu.example.com --type A --value 192.0.2.53
gslbctl records create --name eu.example.com --type NS --value ns1.eu.example.com.
Four write-time rules keep a delegation from producing a zone that is subtly broken rather than obviously rejected:
| Rule | Why |
|---|---|
| NS is rejected at a zone apex | The apex nameserver set comes from dns.nsNames or the zone's nsNames override and is served from the prebuilt zone snapshot. A record here would be silently shadowed. |
| A delegation point holds only NS records | Any other data at that name is occluded by the delegation, so a zone carrying both answers inconsistently depending on which server is asked. |
| A nameserver inside the delegated subtree requires A/AAAA glue | Otherwise a resolver looking for ns1.eu.example.com is referred back to the server it is trying to find. Glue is an ordinary A/AAAA record, so it can always be created first. |
| A delegated name may not also be a steered service | Both would claim the name. |
A nameserver outside the delegated subtree (ns1.example.net., or even
ns1.example.com. in the parent zone) resolves on its own and needs no glue.
Delegation NS records and their glue are included in AXFR, which is what a secondary needs to reproduce the referral.
The referral¶
A query at or below a delegation point is answered with an RFC 1034 §4.3.2 referral rather than resolved here:
;; flags: qr; AUTHORITY: 1, ADDITIONAL: 1 <- note: no "aa"
;; QUESTION
www.eu.example.com. IN A
;; AUTHORITY
eu.example.com. 300 IN NS ns1.eu.example.com.
;; ADDITIONAL
ns1.eu.example.com. 300 IN A 192.0.2.53
AAis clear — this is not our data, we are pointing at whoever holds it.- The ANSWER section is empty; the child's NS RRset goes in AUTHORITY and the glue in ADDITIONAL.
- The deepest delegation point wins, matched on label boundaries.
- A query for the delegation point itself, of any type including
NS, is also a referral — it is the child's RRset, not ours to serve authoritatively. - Glue names themselves still answer normally. That is the whole point of glue: they sit in the parent's own data.
Precedence over a zone we serve: if the delegation point is also the apex of a zone Nexus is authoritative for, we answer and do not refer. Longest zone match is resolved first, so the deeper zone wins and its own NS rows are never reachable as a delegation.
Signed zones and DS records¶
A delegation out of a DNSSEC-signed zone must tell the validator which kind of delegation it is, or the referral is bogus. Nexus does that both ways:
| AUTHORITY carries | Meaning | |
|---|---|---|
| Insecure (no DS) | NS + an NSEC3 matching the delegation point, bitmap has NS and not DS |
The child is provably unsigned; validation stops here cleanly |
| Secure (DS present) | NS + the DS RRset + its RRSIG | The chain of trust continues into the child |
The delegation's NS RRset is never signed (RFC 4035 §2.2) — it is the child's data, not ours. The DS is, because it is authoritative data in this zone. No SOA appears in either case.
Add a DS with the child's KSK digest, after the NS exists:
Two rules the API enforces:
- DS only at an existing delegation point. A DS with no NS under it secures nothing and is never served — the referral is what carries it.
- DS is never valid at a zone apex. A zone's own DS belongs in its parent,
published at the registrar. Get yours with
gslbctl dnssec ds.
A DS query at the delegation point is answered from this zone, not referred (RFC 4035 §3.1.4.1) — the child does not hold its own DS, so referring it would strand the validator. With no DS the answer is an authoritative NODATA plus the NSEC3 denying it, which is what "provably insecure" looks like on the wire.
NSEC3 opt-out (RFC 5155 §6) is deliberately not implemented, and is not needed. Opt-out exists to spare a pre-signer from generating NSEC3 records for every insecure delegation in a large zone. Nexus signs online, so the matching NSEC3 is generated per query — there is nothing to skip.
Unlike other static records, delegations are read from the zone snapshot rather than per query — walking the label chain against the database would put one read per label on exactly the path a random-subdomain flood exercises. Writes refresh the serving node immediately; other nodes converge within 5s.
If the delegated subzone is one Nexus itself serves, do not use NS: declare it as a delegated domain instead (see DelegatedDomains.md) and Nexus is authoritative for both zones directly.
DNAME¶
A DNAME (RFC 6672) redirects a subtree. With
old.example.com. DNAME new.example.net., a query for
a.b.old.example.com is answered with the DNAME itself plus a synthesised
CNAME a.b.old.example.com. -> a.b.new.example.net.; the resolver chases the
target on its own. Every query type is redirected, not just address queries.
Three consequences worth knowing before you create one:
- The owner name itself is not redirected.
old.example.comis ordinary zone data — put an A or ALIAS there if the apex of the old name needs to answer. - Nothing may exist below it. A record under a DNAME could never be answered, so creating one is rejected in both directions ("a DNAME at X already rewrites Y", "a DNAME at X would shadow the A record at Y").
- One per name. Like CNAME, a DNAME is a singleton.
On a signed zone the DNAME is signed and the synthesised CNAME is not
(RFC 4035 §2.2 / RFC 6672 §5.3.1) — validators regenerate the CNAME from the
DNAME themselves. If the substitution would produce a name longer than 255
bytes the answer is YXDOMAIN with the DNAME alone, as RFC 6672 §2.2 requires.
The DNAME set rides on the same 5s zone snapshot as delegations (finding one is a label walk, not a lookup) and a record write refreshes the serving node immediately.
NXDOMAIN / NODATA / DNSSEC¶
A name that exists only in the static table returns NODATA (not NXDOMAIN) for absent types, with the NSEC3 type bitmap including the types actually present (ALIAS asserts A and AAAA). All static answers are DNSSEC-signed like any other RRset; new types need no special handling because signing is per-RRset generic.
AXFR¶
Static records are included in zone transfers. ALIAS is flattened to the target service's enabled member addresses — the point of a secondary is that it can serve the apex when Nexus is down, so it receives real A/AAAA records rather than an untransferable pseudo-type.
API¶
| Method | Path | Permission |
|---|---|---|
| GET | /api/v1/dns/records |
record:read |
| POST | /api/v1/dns/records |
record:write |
| PUT | /api/v1/dns/records/{id} |
record:write |
| DELETE | /api/v1/dns/records/{id} |
record:write |
Create body: {"name": "gslb.cc.", "type": "MX", "value": "10 mail.gslb.cc.", "ttl": 300}
(ttl defaults to 300). Records are tenant-scoped like TXT records.
PUT takes the same body and replaces the record in place, keeping its ID, so
a Terraform resource or a bookmarked row survives a value or TTL change. It
runs the same validation as create, with the record itself excluded from the
CNAME-exclusivity and duplicate checks.
gslbctl¶
gslbctl records list
gslbctl records create --name mail.gslb.cc. --type A --value 192.0.2.10
gslbctl records create --name gslb.cc. --type MX --value "10 mail.gslb.cc."
gslbctl records create --name gslb.cc. --type ALIAS --value app.gslb.cc.
gslbctl records create --name old.gslb.cc. --type DNAME --value new.example.net.
gslbctl records update <id> --value 192.0.2.11 # unset flags stay unchanged
gslbctl records update <id> --ttl 60
gslbctl records delete <id>
WebUI¶
Admin → DNS → DNS Records (/admin/records): create/edit/delete with a
type selector and per-type value placeholders. The pencil on a row loads it
into the form above (which becomes "Edit Record"); Cancel returns the form to
create mode.
Terraform¶
nexus_record manages all four attributes in place — changing name, type,
value or ttl is an update, not a destroy-and-recreate.
Not in v1 (deliberate)¶
- Wildcard owner names — Solo #599.
- External ALIAS targets (recursing to the internet) — targets must be local services.
- NSEC3 opt-out — not applicable to an online signer; see Delegating a subzone.
- Per-query caching — static lookups are a direct DB read with a 200 ms budget, same contract as TXT; add a cache layer only if profiling demands it.