COREDNS-AUTO(7)

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

πŸ¦‹ COREDNS-AUTO πŸ¦‹

okay so bestie, this is the auto manual page from the CoreDNS plugins collection β€” and no cap, it's lowkey one of the most "set it and forget it" plugins out there πŸ’…


✨ NAME ✨

auto β€” it enables serving zone data from an RFC 1035-style master file, and the whole vibe is that this file gets automatically picked up from disk 🌸


πŸ’– DESCRIPTION πŸ’–

The auto plugin is your "old-style" DNS server era πŸŽ€ It serves from a preloaded file that exists on disk β€” very main character, very reliable.

If the zone file contains signatures (i.e. it's signed, i.e. it's using DNSSEC), then correct DNSSEC answers are returned 🫢 But listen β€” only NSEC is supported! Not NSEC3, bestie, NSEC. If you go with this setup, you are the responsible one for re-signing the zonefile. That's your job, not the plugin's πŸ™ˆ

New or changed zones get automatically picked up from disk only when SOA's serial changes ⭐ And if the zones aren't being updated via a zone transfer, then the serial must be manually changed. Like, by hand. With your own hands. 😭


🌈 SYNTAX 🌈

auto [ZONES...] {
    directory DIR [REGEXP ORIGIN_TEMPLATE]
    reload DURATION
}
  • ZONES β€” the zones it should be authoritative for πŸ‘‘ If it's empty, the zones from the configuration block are used instead.
  • directory β€” loads zones from the specified DIR πŸ“ If a file name matches REGEXP, then that regex is used to extract the origin. ORIGIN_TEMPLATE gets used as a template for the origin. Strings like {<number>} are replaced with the respective matches in the file name β€” so {1} is the first match, {2} is the second, etc. ✨

The default is: db.(.*) {1} β€” meaning from a file named db.example.com, the extracted origin will be example.com. So cute, so convenient πŸ’–

⚠️ REGEXP must not be longer than 10000 characters. That's the limit, bestie. Also REGEXP is unanchored 🫠 so use ^ and $ if you need the match to cover the full file name β€” for example ^(.*).zone$ to avoid matching backup files like example.org.zone.bak. Protect yourself πŸ’€
  • reload β€” the interval for performing reloads of zones when the SOA version changes, and of zonefiles πŸ“š It specifies how often CoreDNS should scan the directory to watch for file removal and addition. Default is one minute ⏰ A value of 0 means don't scan for changes and don't reload, periodt. e.g. 30s checks the zonefile every 30 seconds and reloads the zone when the serial changes πŸ”₯

For enabling zone transfers, go look at the transfer plugin πŸ‘€

All the directives from the file plugin are supported πŸŽ€ Note that auto will load all the zones it finds, even though the directive might only receive queries for a specific zone. I.e:

. {
    auto example.org {
        directory /etc/coredns/zones
    }
}

This will happily pick up a zone for example.COM β€” except it will never be queried, because the auto directive is only authoritative for example.ORG πŸ™ˆ slay, but also, oops.


πŸŽ€ EXAMPLES πŸŽ€

Load org domains from /etc/coredns/zones/org and allow transfers to the internet, but send notifies to 10.240.1.1 πŸ’Œ

org {
    auto {
        directory /etc/coredns/zones/org
    }
    transfer {
        to *
        to 10.240.1.1
    }
}

Load org domains from /etc/coredns/zones/org and look for file names like www.db.example.org, where example.org is the origin. Scan every 45 seconds. ⏱️

org {
    auto {
        directory /etc/coredns/zones/org www\.db\.(.*) {1}
        reload 45s
    }
}

🌟 ALSO 🌟

Use the root plugin to help you specify the location of the zone files πŸ—‚οΈ And see the transfer plugin to enable outgoing zone transfers πŸ¦‹


okay that's the whole page bestie, you ate that πŸ’…βœ¨

this little icon was brought to you by CoreDNS, October 2026, and the manual page COREDNS-AUTO(7) β€” go forth and serve those zones πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from