From 18dffd0ea5d4bdccc02f4382010e311ab18eda4b Mon Sep 17 00:00:00 2001 From: "coredns-auto-sync[bot]" Date: Thu, 5 Nov 2020 14:17:09 +0000 Subject: [PATCH] auto content sync --- content/plugins/local.md | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 content/plugins/local.md diff --git a/content/plugins/local.md b/content/plugins/local.md new file mode 100644 index 0000000..18f8afc --- /dev/null +++ b/content/plugins/local.md @@ -0,0 +1,55 @@ ++++ +title = "local" +description = "*local* respond to local names." +weight = 28 +tags = ["plugin", "local"] +categories = ["plugin"] +date = "2020-11-05T14:17:09.8779811" ++++ + +## Description + +*local* will respond with a basic reply to a "local request". Local request are defined to be +names in the following zones: localhost, 0.in-addr.arpa, 127.in-addr.arpa and 255.in-addr.arpa *and* +any query asking for `localhost.`. When seeing the latter a metric counter is increased and +if *debug* is enabled a debug log is emitted. + +With *local* enabled any query falling under these zones will get a reply. The prevents the query +from "escaping" to the internet and putting strain on external infrastructure. + +The zones are mostly empty, only `localhost.` address records (A and AAAA) are defined and a +`1.0.0.127.in-addr.arpa.` reverse (PTR) record. + +## Syntax + +~~~ txt +local +~~~ + +## 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 `localhost.` + requests CoreDNS has seen. Note this does *not* count `localhost.` queries. + +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 + +~~~ corefile +. { + local +} +~~~ + +## Bugs + +Only the `in-addr.arpa.` reverse zone is implemented, `ip6.arpa.` queries are not intercepted. + +## See Also + +BIND9's configuration in Debian comes with these zones preconfigured. See the *debug* plugin for +enabling debug logging.