Home-network DNS hygiene: private reverse lookups answered locally (RFC 6303), bare names answered from local sources and kept off upstreams, and DNS-rebind protection #134

Open
opened 2026-10-31 12:42:12 -04:00 by claude · 0 comments
Owner
  • Draft: PQ-28
  • Priority: medium (privacy and security baseline home users assume)
  • Agent: none (epic)
  • Depends on: none
  • Decisions: Q-PQ-9, Q-PQ-10, Q-PQ-11, R2-BARE

Why

  • Status at HEAD: partial. The RFC 6303 / IANA "Locally-Served DNS Zones" list exists, but only as built-in DNSSEC negative trust anchors (src/dotnet/src/Ninlil.Dns.Server.Recursive/RecursiveServerOptions.cs:41-121). Nothing answers those zones locally, so PTR lookups for RFC 1918 addresses go to forwarders or the root.
  • Nothing stops single-label names or rebinding answers. A search of src/ finds no domain-needed, private-reverse or rebind logic.
  • DHCP already registers each client's host name as <label>.<zone> in the scope's DNS zone (src/dotnet/src/Ninlil.Dhcp.Server.DnsIntegration/DhcpDnsRegistrationService.cs:154-161), but a bare nas query does not find it.

Bare-name lookup order (owner, round 2, R2-BARE), for a single-label query that reaches an upstream resolver:

  1. host names DHCP registered (#137);
  2. the configured hosts files (#175, under the #173 epic);
  3. the "local domain": the bare name tried as <name>.<local domain> in Ninlil's own authoritative zones (#138);
  4. NXDOMAIN (or upstream, when single-label protection is off; #136).

Technical call: the checks live in the two resolvers that talk to upstreams, ForwarderQueryResolver and RecursiveQueryResolver, not in a new resolver ahead of them.

  • Local zones are answered first by AuthoritativeQueryResolver (DnsQueryDispatcher.cs:15-17).
  • Forwarder-type zones are passed through to forwarding (AuthoritativeQueryResolver.cs:75-79).
  • So an operator's conditional forwarder for 168.192.in-addr.arpa, or a hosted reverse zone, keeps working, and only names bound for a public upstream are affected.
  • The forwarding resolver applies them only when the chosen set is the global forwarder list, not a forwarder zone (ForwarderSetCache.cs:13-20).

What changes

Children: #135 (shared zone catalog), #136 (private reverse plus the single-label source chain), #137 (DHCP host names), #138 (local domain), #139 (rebind), #140 (settings API), #141 (api-regen), #142 (console). The hosts-file source is #175 in the "Parity: devices, DHCP and notifications" milestone; it plugs into the #136 chain.

Acceptance

  • Children closed; README section "Home network defaults", which states the defaults, the bare-name lookup order, and that upgraded installs get the defaults too.

Source

  • audit-feature-parity.md §2A #9 (gap 10); RFC 6303 §3–§4; RFC 6761; RFC 8375.
  • Owner decisions 2026-10-31: Q-PQ-9 "reverse + single-label on, rebind off"; Q-PQ-10 "strip private records"; Q-PQ-11 "answer from DHCP-registered names first, then NXDOMAIN".
  • Owner decision 2026-10-31, round 2 (R2-BARE): "DHCP names -> hosts files -> also a chosen local zone (new 'local domain' setting: bare name tried as . in Ninlil's own zones) -> NXDOMAIN".
  • DEDUPE.md §2 (bare-name overlap with #173 to #175) and A3.
- **Draft:** PQ-28 - **Priority:** medium (privacy and security baseline home users assume) - **Agent:** none (epic) - **Depends on:** none - **Decisions:** Q-PQ-9, Q-PQ-10, Q-PQ-11, R2-BARE ### Why - Status at HEAD: partial. The RFC 6303 / IANA "Locally-Served DNS Zones" list exists, but only as built-in DNSSEC negative trust anchors (`src/dotnet/src/Ninlil.Dns.Server.Recursive/RecursiveServerOptions.cs:41-121`). Nothing answers those zones locally, so PTR lookups for RFC 1918 addresses go to forwarders or the root. - Nothing stops single-label names or rebinding answers. A search of `src/` finds no domain-needed, private-reverse or rebind logic. - DHCP already registers each client's host name as `<label>.<zone>` in the scope's DNS zone (`src/dotnet/src/Ninlil.Dhcp.Server.DnsIntegration/DhcpDnsRegistrationService.cs:154-161`), but a bare `nas` query does not find it. Bare-name lookup order (owner, round 2, R2-BARE), for a single-label query that reaches an upstream resolver: 1. host names DHCP registered (#137); 2. the configured hosts files (#175, under the #173 epic); 3. the "local domain": the bare name tried as `<name>.<local domain>` in Ninlil's own authoritative zones (#138); 4. NXDOMAIN (or upstream, when single-label protection is off; #136). **Technical call:** the checks live in the two resolvers that talk to upstreams, `ForwarderQueryResolver` and `RecursiveQueryResolver`, not in a new resolver ahead of them. - Local zones are answered first by `AuthoritativeQueryResolver` (`DnsQueryDispatcher.cs:15-17`). - Forwarder-type zones are passed through to forwarding (`AuthoritativeQueryResolver.cs:75-79`). - So an operator's conditional forwarder for `168.192.in-addr.arpa`, or a hosted reverse zone, keeps working, and only names bound for a public upstream are affected. - The forwarding resolver applies them only when the chosen set is the global forwarder list, not a forwarder zone (`ForwarderSetCache.cs:13-20`). ### What changes Children: #135 (shared zone catalog), #136 (private reverse plus the single-label source chain), #137 (DHCP host names), #138 (local domain), #139 (rebind), #140 (settings API), #141 (api-regen), #142 (console). The hosts-file source is #175 in the "Parity: devices, DHCP and notifications" milestone; it plugs into the #136 chain. ### Acceptance - [ ] Children closed; README section "Home network defaults", which states the defaults, the bare-name lookup order, and that upgraded installs get the defaults too. ### Source - `audit-feature-parity.md` §2A #9 (gap 10); RFC 6303 §3–§4; RFC 6761; RFC 8375. - Owner decisions 2026-10-31: Q-PQ-9 "reverse + single-label on, rebind off"; Q-PQ-10 "strip private records"; Q-PQ-11 "answer from DHCP-registered names first, then NXDOMAIN". - Owner decision 2026-10-31, round 2 (R2-BARE): "DHCP names -> hosts files -> also a chosen local zone (new 'local domain' setting: bare name tried as <name>.<local zone> in Ninlil's own zones) -> NXDOMAIN". - DEDUPE.md §2 (bare-name overlap with #173 to #175) and A3.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#134
No description provided.