COREDNS-LOCAL(7)

πŸ“¦
version 1.15.0 Β· 3 versions
, in opensuse-leap 16.0

πŸŽ€ COREDNS-LOCAL πŸŽ€

okay so bestie, welcome to the local plugin page from the CoreDNS plugins manual β€” this is the one that goes "ohh that name? yeah that's mine, don't worry about it" πŸ’…


✨ NAME ✨

local β€” respond to local names. that's it, that's the whole vibe.


🌸 DESCRIPTION 🌸

local will respond with a basic reply to a "local request" 🫢

so like, what counts as a local request? bestie, i'm so glad you asked. local requests are defined to be names in these zones:

  • localhost
  • 0.in-addr.arpa
  • 127.in-addr.arpa
  • 255.in-addr.arpa
  • any query under .localhost.
  • and β€” by default, for backward compatibility β€” any query prefixed by localhost. πŸ”₯

when it sees one of the non-apex localhost forms, a metric counter gets increased πŸ“ˆ and, if debug is enabled, a debug log is emitted. iykyk.

with local enabled, any query falling under these zones will get a reply. this is literally the whole point: it prevents the query from "escaping" to the internet and putting strain on external infrastructure. no cap, your upstreams will thank you πŸ’–

the zones are mostly empty β€” only localhost., names under .localhost., and legacy localhost.<domain> names return loopback address records (A and AAAA), and only 1.0.0.127.in-addr.arpa. has a reverse (PTR) record. iconic behavior tbh 🌈


⭐ SYNTAX ⭐

local
local {
    localhost_prefix on|off
}

localhost_prefix controls the legacy localhost.<domain> behavior. the default is on for backward compatibility. set it to off to only treat names under .localhost. as special, which matches RFC 6761 ✨

🫢 heads up bestie: the legacy prefix behavior is deprecated and may be disabled by default in a future release. so like… plan accordingly πŸ‘€

πŸ’œ METRICS πŸ’œ

if monitoring is enabled (via the prometheus plugin) then the following metric is exported:

  • coredns_local_localhost_requests_total{} β€” a counter of the number of non-apex localhost special-case queries CoreDNS has seen. this includes .localhost. names and, when localhost_prefix is on, legacy localhost.<domain> names. it does not count localhost. queries. periodt. πŸ’…
πŸ‘‘ note that this metric does not have a server label, because it's more interesting to find the client(s) performing these queries than to see which server handled it. you'll need to inspect the debug log to get the client IP address πŸ”

πŸ¦‹ EXAMPLES πŸ¦‹

. {
    local
}

look at her. flawless. no notes πŸŽ€


πŸ’€ BUGS πŸ’€

only the in-addr.arpa. reverse zone is implemented β€” ip6.arpa. queries are not intercepted. 😭 that's the tea, sorry bestie.


🌟 SEE ALSO 🌟

  • BIND9's configuration in Debian comes with these zones preconfigured.
  • See the debug plugin for enabling debug logging.

and that's the whole page, bestie πŸ§šπŸ’– written by the CoreDNS girlies, October 2026 edition, CoreDNS plugins manual, COREDNS-LOCAL(7) β€” slay responsibly 🫢✨

πŸ“¦ where this page comes from