112 lines
3.1 KiB
Groff
112 lines
3.1 KiB
Groff
.\" Generated by Mmark Markdown Processer - mmark.miek.nl
|
|
.TH "COREDNS-AUTO" 7 "March 2021" "CoreDNS" "CoreDNS Plugins"
|
|
|
|
.SH "NAME"
|
|
.PP
|
|
\fIauto\fP - enables serving zone data from an RFC 1035-style master file, which is automatically picked up from disk.
|
|
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
The \fIauto\fP plugin is used for an "old-style" DNS server. It serves from a preloaded file that exists
|
|
on disk. If the zone file contains signatures (i.e. is signed, i.e. using DNSSEC) correct DNSSEC answers
|
|
are returned. Only NSEC is supported! If you use this setup \fIyou\fP are responsible for re-signing the
|
|
zonefile. New or changed zones are automatically picked up from disk only when SOA's serial changes. If the zones are not updated via a zone transfer, the serial must be manually changed.
|
|
|
|
.SH "SYNTAX"
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
auto [ZONES...] {
|
|
directory DIR [REGEXP ORIGIN\_TEMPLATE]
|
|
reload DURATION
|
|
}
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.PP
|
|
\fBZONES\fP zones it should be authoritative for. If empty, the zones from the configuration block
|
|
are used.
|
|
|
|
.IP \(bu 4
|
|
\fB\fCdirectory\fR loads zones from the specified \fBDIR\fP. If a file name matches \fBREGEXP\fP it will be
|
|
used to extract the origin. \fBORIGIN_TEMPLATE\fP will be used as a template for the origin. Strings
|
|
like \fB\fC{<number>}\fR are replaced with the respective matches in the file name, e.g. \fB\fC{1}\fR is the
|
|
first match, \fB\fC{2}\fR is the second. The default is: \fB\fCdb\.(.*) {1}\fR i.e. from a file with the
|
|
name \fB\fCdb.example.com\fR, the extracted origin will be \fB\fCexample.com\fR.
|
|
.IP \(bu 4
|
|
\fB\fCreload\fR interval to perform reloads of zones if SOA version changes and zonefiles. It specifies how often CoreDNS should scan the directory to watch for file removal and addition. Default is one minute.
|
|
Value of \fB\fC0\fR means to not scan for changes and reload. eg. \fB\fC30s\fR checks zonefile every 30 seconds
|
|
and reloads zone when serial changes.
|
|
|
|
|
|
.PP
|
|
For enabling zone transfers look at the \fItransfer\fP plugin.
|
|
|
|
.PP
|
|
All directives from the \fIfile\fP plugin are supported. Note that \fIauto\fP will load all zones found,
|
|
even though the directive might only receive queries for a specific zone. I.e:
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
\&. {
|
|
auto example.org {
|
|
directory /etc/coredns/zones
|
|
}
|
|
}
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.PP
|
|
Will happily pick up a zone for \fB\fCexample.COM\fR, except it will never be queried, because the \fIauto\fP
|
|
directive only is authoritative for \fB\fCexample.ORG\fR.
|
|
|
|
.SH "EXAMPLES"
|
|
.PP
|
|
Load \fB\fCorg\fR domains from \fB\fC/etc/coredns/zones/org\fR and allow transfers to the internet, but send
|
|
notifies to 10.240.1.1
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
org {
|
|
auto {
|
|
directory /etc/coredns/zones/org
|
|
}
|
|
transfer {
|
|
to *
|
|
to 10.240.1.1
|
|
}
|
|
}
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.PP
|
|
Load \fB\fCorg\fR domains from \fB\fC/etc/coredns/zones/org\fR and looks for file names as \fB\fCwww.db.example.org\fR,
|
|
where \fB\fCexample.org\fR is the origin. Scan every 45 seconds.
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
org {
|
|
auto {
|
|
directory /etc/coredns/zones/org www\\.db\\.(.*) {1}
|
|
reload 45s
|
|
}
|
|
}
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.SH "ALSO"
|
|
.PP
|
|
Use the \fIroot\fP plugin to help you specify the location of the zone files. See the \fItransfer\fP plugin
|
|
to enable outgoing zone transfers.
|
|
|