Skip to content

pfSense stays the only advertised resolver; Unbound forwards to AdGuard Home #125

Closed

Description

@Gerrrt

Decision

Option C. Per-client filtering rules and visibility are not wanted, which was the question the choice hinged on. Clients keep being handed pfSense as their only resolver; Unbound forwards outbound queries to AdGuard Home for filtering.

What this buys, restated as the properties to preserve when implementing:

  • Failover is server-side, where it's configurable, rather than in the client stub where it isn't.
  • Clients can't select around the filter, because they only ever have one resolver.
  • DNS from low-trust VLANs never enters the sensitive tier, preserving ADR-0008's tiering.
  • Nothing changes for the family: the runbook, the break-glass card, and Gerrrt/Lemmiwinks's DNS pages all keep pointing at pfSense.

Accepted cost: AdGuard sees every query as coming from pfSense, so per-client attribution and per-device rules are gone. That's the thing being traded away deliberately.

One sub-decision this still needs

The original write-up claimed C "degrades to unfiltered resolution instead of no resolution." That isn't automatic, and it's worth correcting before anyone implements from it — it depends on what Unbound's forwarder list contains:

  • AdGuard as the sole forwarder — strict filtering, but AdGuard is still a hard dependency for every external name. A dead AdGuard means no external resolution, which is the failure mode ADR-0008 moves DNS off the gateway, which adds a second and quieter way for the house to lose the internet #123 exists to avoid. Internal matrix.elysium names keep resolving from Unbound's host overrides, so it's less total than Option A, but the family still can't reach the internet.
  • AdGuard first, with Cloudflare/Google also listed — genuinely graceful. Unbound selects forwarders by RTT and marks unresponsive ones down, so a dead AdGuard drops out and resolution continues unfiltered.

Recommend the second. The RTT-based selection that makes it "leaky" in principle is barely leaky in practice here: AdGuard on the LAN answers in well under a millisecond against ~10–20 ms to Cloudflare, so Unbound will prefer it by a wide margin whenever it's healthy. The leak is small precisely because local is fast — and it's the right trade given that filtering here is a convenience rather than a security control.

Worth being explicit that this is not the same failure as Option B. Unbound's forwarder selection is stable, observable and tunable; a client stub's is none of those.

Implementation notes

  • pfSense → Services → DNS Resolver (Unbound): enable forwarding mode.
  • pfSense → System → General Setup → DNS Servers: AdGuard's VLAN 99 address first, then the public upstreams.
  • Keep the existing matrix.elysium host overrides in Unbound — they're what keeps internal names resolving when AdGuard is down.
  • No DHCP change: scopes keep handing out pfSense per VLAN, exactly as they do today.
  • No new inter-VLAN firewall rule — which is part of the point, and worth noting against ADR-0008's rule count.

Follow-ups

Original options analysis, kept as the rationale record

Today DHCP hands out one resolver, pfSense, co-located with the default gateway, and ADR-0008 moves that role to AdGuard Home on the Winterfell mini PC.

Option A — AdGuard alone, one resolver. Filtering is airtight. The mini PC becomes a single point of failure for the whole house's name resolution, on a non-redundant box that reboots for updates.

Option B — DHCP hands out AdGuard primary, pfSense secondary. The intuitive fix, and the weakest, because stub resolvers don't do clean primary-then-secondary failover. Behavior varies by platform: some query the first server and fall back only after a timeout, some rotate, some race them and prefer whichever answered fastest last. The secondary gets used whenever the primary is merely slow, so filtering leaks unpredictably and invisibly, since both servers return valid answers. Its one advantage over a public secondary is that Unbound holds the matrix.elysium overrides, so internal names still work.

A trust-boundary cost applies to A and B both, cutting against ADR-0008's own reasoning: making AdGuard client-facing means every VLAN needs a DNS path into the sensitive tier, including low-trust ones.

Option C — chosen. Details above.

Activity

  1. changed the title [-]Decide whether pfSense stays a resolver once AdGuard Home is in front of it[/-] [+]pfSense stays the only advertised resolver; Unbound forwards to AdGuard Home[/+] on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new capability or a change

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions