CoreDNS Authoritative On Loopback:53, Proven By dig

CoreDNS from the upstream release (sha256-verified) as a hardened system service answering authoritatively for your zones on 127.0.0.1:53 as a system user (CAP_NET_BIND_SERVICE through the unit), forwarding only when you name upstreams. The live test digs the example zone's A record with the aa flag, an NXDOMAIN in the zone and a REFUSED outside it. Original role, live-tested on Rocky Linux 10.

Verification

Live-tested

Really 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-20 · podman 4.9.3 · ansible 2.21.4 · how we verify

Cite it in your README

badge · attribution

Paste this beside the module in the repository that uses it. The badge is rendered from this artifact's verification record, so it reads live-tested because the record says so, and the link lands on this page.

README.md, GitLab, Gitea
[![IaC Bazaar: live-tested](https://www.iac-bazaar.com/api/artifacts/ansible-coredns/badge)](https://www.iac-bazaar.com/catalog/ansible-coredns?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

Ansible role 1.0.0, live-tested on IaC Bazaar: [CoreDNS Authoritative On Loopback:53, Proven By dig](https://www.iac-bazaar.com/catalog/ansible-coredns?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

```yaml
# CoreDNS Authoritative On Loopback:53, Proven By dig: https://www.iac-bazaar.com/catalog/ansible-coredns (download from your IaC Bazaar account)
```

Preview:IaC Bazaar: live-tested

Documentation

coredns

CoreDNS from the upstream release (sha256-verified), as a hardened system service answering authoritatively for your zones on 127.0.0.1:53, with forwarding for everything else only when you name upstreams. Original role for EL 10, live-tested with podman on Rocky Linux 10.

No package, so the checksum is the whole story. EL 10 carries no coredns; CoreDNS ships a release with a checksum file beside it. The role downloads both and has Ansible's get_url refuse the asset unless its SHA-256 is the one in the vendor's file, then installs the binaries as root's in /usr/local/bin, pinned by coredns_version.

A service account, a hardened unit, a loopback listener. coredns is a system user with no shell that owns the data directory and nothing else; the unit runs with NoNewPrivileges, PrivateTmp, ProtectHome and ProtectSystem=strict. The listener is 127.0.0.1:53 by default, for a proxy that authenticates or a client on the same host; the live test reads the listening sockets and expects loopback only.

Port 53 without root. The service runs as the coredns user; the unit grants it CAP_NET_BIND_SERVICE through AmbientCapabilities (and nothing else through CapabilityBoundingSet), which is what lets a system user bind a privileged port under NoNewPrivileges. The health plugin on 127.0.0.1:8053 is the readiness endpoint.

Authoritative, and nothing else by default. Each zone in coredns_zones is a server block reading its zone file; with coredns_forwarders empty there is no catch-all block, so a name outside the zones is REFUSED. The live test proves all three answers with dig: the example zone's A record with the aa flag, NXDOMAIN for a name the zone does not hold, REFUSED for a name outside every zone. Name upstreams and the catch-all block forwards with a cache. CoreDNS has no config checker; a bad Corefile fails at start, which the live test's readiness wait catches.

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

Related modules

Live-tested

ansible-unbound-resolver

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.

View module
Live-tested

ansible-bind-authoritative

BIND as an authoritative-only server. The package is a loopback resolver; add a zone and anyone who can query can copy the whole zone, and version.bind names the 9.18 to attack. This role turns recursion off, refuses transfers to anyone not listed, hides the identity records, rate-limits responses, and renders zones from data checked before they land. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-knot

Knot DNS from EPEL as an authoritative server that signs your zones with DNSSEC, keeps your zone files as written and serves a change with no serial to bump. As installed the package cannot start. The live test validates answers with delv against the zone's own key, and is refused a transfer without the TSIG key. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-nsd

NSD from EPEL: an authoritative-only server for your zones, the configuration and every zone checked by NSD's own tools first, transfers only to the addresses and TSIG keys you name, response rate limiting, and the state directory the package leaves unwritable fixed. The live test gets the zone with the key and is refused without it. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-pdns-recursor

PowerDNS Recursor from EPEL on loopback: DNSSEC validated, and every upstream query sent over DNS-over-TLS with each forwarder's certificate checked against the name it must carry. The live test counts every upstream query as TLS, gets SERVFAIL for a broken signature, and has a copy naming the wrong certificate answer nothing. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-powerdns

PowerDNS authoritative from EPEL with its SQLite backend; the live test adds a zone through the API, gets the record from dig and NXDOMAIN for an unknown name, sees the API refuse a caller with no key, and reads the query counter. The schema is recovered when a docs-stripped host lacks it. Original role, live-tested on Rocky Linux 10.

View module