A Local Resolver That Validates What It Answers
Unbound on loopback: DNSSEC validated locally against the root anchor, query names minimised, version hidden, and upstream over DNS-over-TLS by default because many networks reset TCP 53 to anything but a known resolver, which breaks full recursion the moment a DNSKEY answer outgrows UDP. Recursion is one setting away. Original role, live-tested on Rocky Linux 10.
Verification
Live-testedReally deployed to a container sandbox, proven idempotent (a second run changes nothing), verified against the role’s assertions, then torn down.
Conformance
- Static validation (yamllint · ansible-lint)
Provenance
- SHA-256 checksum
- Signature (pending)
Functional
- Live-tested - applied, verified, destroyed
Last verified 2026-09-19 · podman 4.9.3 · ansible 2.21.4 · how we verify
Documentation
unbound-resolver
A local Unbound resolver: DNSSEC-validating, caching, name-minimising, and answering on loopback only. Original role for EL 9 and 10, live-tested with podman on Rocky Linux 10.
The package ignores its own drop-in directories. EL's unbound.conf
ships conf.d/ and local.d/ beside it but no active include: of either -
only commented examples - so a file dropped into conf.d changes nothing. This
role writes the whole unbound.conf, validated by unbound-checkconf before it
is installed, and includes both directories from it so your additions work.
Answers are validated, not just cached. With auto-trust-anchor-file
pointing at the root key the package keeps current, a forged or stripped answer
is refused rather than served for a day. The verify step asks for example.com
with DNSSEC and asserts the ad flag came back.
It says as little as possible. Query-name minimisation sends each upstream
only the labels it needs, hide-identity and hide-version refuse
version.bind, and minimal-responses keeps additional data out.
Encrypted forwarding is the default; recursion is the switch. Queries go
to Quad9 over DNS-over-TLS, with the certificate checked against the system
bundle, and every answer is validated locally all the same. Set
unbound_resolver_forwarders: [] for full recursion from the root servers -
with one thing measured rather than assumed while building this role: on a
network that resets TCP 53 to anything but a known resolver (the one this was
tested from does), recursion fails outright, because the root DNSKEY answer is
larger than the 1232-byte EDNS buffer, is truncated, falls back to TCP, and
the TCP connection is reset. "No servers could be reached" is the whole
symptom. Over DNS-over-TLS the same answer arrives whole.
License
Commercial - IaC Bazaar EULA. (c) IaC Bazaar.
Usage code & full reference need an account
The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.
- Variables
- Test