Two fixes from the step 5 re-audit:
1. The joplin/public-tool evidence blocks showed bracketed placeholders
inside function arguments ('joplin.[app-to-app zone]') - not valid
syntax, wouldn't produce the shown NXDOMAIN for the claimed reason.
Replaced with result tables showing the same real data honestly.
2. Added the real Technitium screenshot of the cleaned-up reverse zone.
Getting this screenshot caught a real methodology error: an earlier
claim of '2 real PTR records (automation, caddy)' was wrong - the
automation entry only resolved because I tested it by SSHing into
automation itself, which satisfied the lookup via its own local
/etc/hosts, never actually querying Technitium. Querying from a
different host returns NXDOMAIN, matching the screenshot's real
3-record zone (NS, SOA, one PTR) exactly. Only 1 real PTR record
exists. Same error existed in the KB, fixed there too.
86 lines
9.5 KiB
Markdown
86 lines
9.5 KiB
Markdown
# 🌐 DNS Naming Model
|
|
|
|
> [!NOTE]
|
|
> DNS isn't just naming in this fleet — it's the mechanism that decides which trust boundary a request enters. Which zone a hostname resolves in determines whether a request gets mutual-TLS-and-SSO treatment, a lighter-weight trusted-IP path, or the public internet-facing edge entirely. Get the DNS answer wrong and you've effectively picked the wrong security posture for that request.
|
|
|
|
| | |
|
|
|---|---|
|
|
| **Server** | Technitium DNS Server — self-hosted, open-source, chosen over a managed/cloud DNS provider specifically so internal zone data never leaves the LAN |
|
|
| **Zones** | Two internal zones, deliberately never merged, plus one public exception |
|
|
| **Enforcement** | Every host's resolver is pointed at this server only — direct outbound DNS to anywhere else is blocked at the firewall |
|
|
| **Depends on** | Nothing upstream for internal resolution — it's the root of trust for internal naming |
|
|
| **Depended on by** | Every system in this repo that resolves a hostname — which is effectively all of them |
|
|
|
|
## Why self-hosted DNS at all
|
|
|
|
A homelab this size could get away with a shared hosts file or a single flat zone. Two things specifically ruled that out:
|
|
|
|
1. **The two-zone trust model needs a real answer to "which front door am I behind."** Splitting traffic into a mutual-TLS-enforced browser zone and a lighter trusted-IP internal zone (see [`docs/firewall-and-network.md`](firewall-and-network.md)) only works if something authoritative decides, per-hostname, which zone a request lands in. A hosts file can't do that at scale across a dozen-plus hosts; a real DNS server with two real zones can.
|
|
2. **Every other system needs one source of truth for internal names.** The secrets platform issues a certificate to the DNS server's own admin interface (see below); the orchestration engine resolves every fleet host by name before it can SSH anywhere; the observability pipeline ships DNS query logs as their own dedicated stream. Hand-rolling internal name resolution per-app would mean N inconsistent answers instead of one.
|
|
|
|
## The two zones
|
|
|
|

|
|
|
|
| Zone | Resolves to | Enforcement | Used by |
|
|
|---|---|---|---|
|
|
| Browser-facing | The user-facing reverse proxy | Mutual TLS (client cert required) + SSO | Anything a human opens in a browser |
|
|
| App-to-app | The internal reverse proxy | Trusted-IP allowlist bypass, or SSO forward-auth for anything not on that allowlist | Webhooks, API integrations, service-to-service calls |
|
|
|
|
Most apps that need both human and machine access get **one hostname per zone** — same app, two different front doors, chosen by which zone the caller resolves it in. Not every app needs both: a purely internal API integration might only ever get the app-to-app hostname; an app nobody automates against might only get the browser-facing one. The two zones aren't kept in lockstep by policy — a periodic audit is what actually catches when they drift, not an assumption that they match. As of the last audit, the app-to-app zone actually runs slightly ahead — 58 records versus 56 — with three apps present only there and one present only on the browser-facing side, real drift a policy alone wouldn't have caught:
|
|
|
|
This is the real result of a live resolution against both zones, not a claim about what they'd return — the app-to-app hostname resolves, the browser-facing one for the same app doesn't exist at all:
|
|
|
|
| Zone | `joplin` resolves to |
|
|
|---|---|
|
|
| App-to-app | `[rocky-docker's IP]` |
|
|
| Browser-facing | `NXDOMAIN` |
|
|
|
|
Same result for `loki` and `wazuh-indexer` (caddy-zone only), and the reverse for `calibre` (browser-facing zone only).
|
|
|
|
> [!TIP]
|
|
> **The public exception, and why it's a real exception and not a bug**: a social-media scheduling tool in this fleet is genuinely meant to be reached from the open internet, routed through the edge firewall's own public reverse-proxy layer (see [`docs/firewall-and-network.md`](firewall-and-network.md)). It has **zero presence in either internal zone** — confirmed live, `NXDOMAIN` on both — not because it was forgotten, but because a third DNS entry pointing at an app that already has its own public-facing edge route would just be redundant. Apps meant for the public internet skip the internal model entirely rather than being forced into it. Same live check, same result, on both zones:
|
|
|
|
| Zone | Resolves to |
|
|
|---|---|
|
|
| App-to-app | `NXDOMAIN` |
|
|
| Browser-facing | `NXDOMAIN` |
|
|
|
|
## DNS as an enforced boundary, not just a convenience
|
|
|
|
> [!IMPORTANT]
|
|
> Every host on the LAN has its resolver pointed at this one internal DNS server — and that's enforced, not just configured. Direct outbound DNS queries to anywhere else (a public resolver, another host acting as its own resolver) are blocked at the firewall level, covered in [`docs/firewall-and-network.md`](firewall-and-network.md). This closes a real bypass: without it, any host could sidestep the internal zones entirely by just asking a public resolver instead, which would quietly undermine the whole two-zone trust model above. DNS enforcement is what makes the rest of this architecture actually load-bearing instead of advisory.
|
|
|
|
## Two things live-checking found the documentation had wrong
|
|
|
|
Trusting the KB without re-checking it against the running server would have kept both of these wrong indefinitely — so both got checked directly against the real config and the real zone data, not taken on the KB's word:
|
|
|
|
- **A reverse zone that had real broken records, not just outdated documentation.** It was described as covering just the observability host's own subnet slice. The zone's own name on the real server settles that on its own — it's the reverse zone for the entire `/24`, not a narrower delegation, which only a different naming pattern could express. A full sweep of every address in the zone — not a sample — turned up four records, and none of them held up: two were malformed PTR entries with their name and value fields reversed, structurally incapable of ever answering a real reverse lookup, not just stale; one was an orphaned leftover from a host decommissioned months earlier; and the fourth — the internal reverse-proxy host's own reverse record — resolved to the name of one specific app proxied through it instead of the host's own identity. The observability host's own IP had no record at all, despite the zone supposedly being scoped around it. All three broken entries got removed and the fourth got corrected, rather than just written up as a known gap. This is the zone's real state after the fix, not a claim about it — three records total, only one of them an actual host PTR:
|
|
|
|

|
|
- **A forwarder that was documented but never actually configured.** Technitium's upstream forwarding was written up as including a well-known public DNS-over-HTTPS provider. Reading the real config directly shows exactly two forwarders: the edge firewall and one other public resolver — the documented provider's IP and name appear nowhere in the file. It looks like it was documented as a plan and never actually implemented, then never revisited to catch the mismatch.
|
|
|
|
```
|
|
$ strings /etc/dns/dns.config | grep -E '^\d+\.\d+\.\d+\.\d+$'
|
|
[pfSense's IP]
|
|
9.9.9.9
|
|
```
|
|
|
|
Neither is a security problem — the reverse zone being broader than described doesn't leak anything, and the missing forwarder just means one less redundant upstream. What they have in common is more useful than either fact alone: documentation describing what a system does isn't the same as verifying it, and the gap between the two doesn't announce itself until something actually goes and checks.
|
|
|
|
## Where DNS shows up in every other system
|
|
|
|
DNS isn't a standalone concern in this fleet — it's a dependency almost everything else sits on top of:
|
|
|
|
| System | How it depends on DNS |
|
|
|---|---|
|
|
| [Secrets & PKI](secrets-and-pki.md) | The secrets platform issues the DNS server's own admin-UI certificate; separately, every Vault Agent across the fleet has to resolve its target before it can even open a connection |
|
|
| [SSO & Identity](sso-and-identity.md) | The OIDC redirect dance depends on the identity provider's hostname resolving correctly on the internal zone, even when the app being logged into lives on the browser-facing one |
|
|
| [Firewall & Network Segmentation](firewall-and-network.md) | DNS-bypass prevention (above) is enforced as an explicit firewall rule, not a DNS-server-side restriction |
|
|
| [Observability](observability.md) | DNS query logs are their own dedicated ingestion pipeline into the log aggregator, kept separate from general system/container logs |
|
|
| [Orchestration](orchestration.md) | Every scheduled maintenance flow resolves its target hosts by name before it can reach them over SSH |
|
|
| [Architecture Overview](architecture-overview.md) | DNS resolution is explicitly the mechanism that determines which of the fleet's routing/trust planes a given request enters |
|
|
|
|
---
|
|
Related stacks: [`stacks/platform/caddy/`](../stacks/platform/caddy/), [`stacks/platform/caddy-internal/`](../stacks/platform/caddy-internal/)
|