aboutsummaryrefslogtreecommitdiff
path: root/man/coredns-rewrite.7
diff options
context:
space:
mode:
Diffstat (limited to 'man/coredns-rewrite.7')
-rw-r--r--man/coredns-rewrite.721
1 files changed, 17 insertions, 4 deletions
diff --git a/man/coredns-rewrite.7 b/man/coredns-rewrite.7
index 8e22ee0d9..417aca79c 100644
--- a/man/coredns-rewrite.7
+++ b/man/coredns-rewrite.7
@@ -1,5 +1,5 @@
.\" Generated by Mmark Markdown Processer - mmark.miek.nl
-.TH "COREDNS-REWRITE" 7 "February 2021" "CoreDNS" "CoreDNS Plugins"
+.TH "COREDNS-REWRITE" 7 "March 2021" "CoreDNS" "CoreDNS Plugins"
.SH "NAME"
.PP
@@ -239,6 +239,19 @@ ftp\-us\-west\-1.coredns.rocks. 0 IN A 10.30.30.30
.RE
.PP
+It is also possible to rewrite other values returned in the DNS response records
+(e.g. the server names returned in \fB\fCSRV\fR and \fB\fCMX\fR records). This can be enabled by adding
+the \fB\fCanswer value\fR to a name regex rule as specified below. \fB\fCanswer value\fR takes a
+regular expression and a rewrite name as parameters and works in the same way as the
+\fB\fCanswer name\fR rule.
+
+.PP
+Note that names in the \fB\fCAUTHORITY SECTION\fR and \fB\fCADDITIONAL SECTION\fR will also be
+rewritten following the specified rules. The names returned by the following
+record types: \fB\fCCNAME\fR, \fB\fCDNAME\fR, \fB\fCSOA\fR, \fB\fCSRV\fR, \fB\fCMX\fR, \fB\fCNAPTR\fR, \fB\fCNS\fR will be rewritten
+if the \fB\fCanswer value\fR rule is specified.
+
+.PP
The syntax for the rewrite of DNS request and response is as follows:
.PP
@@ -248,6 +261,7 @@ The syntax for the rewrite of DNS request and response is as follows:
rewrite [continue|stop] {
name regex STRING STRING
answer name STRING STRING
+ [answer value STRING STRING]
}
.fi
@@ -257,8 +271,7 @@ rewrite [continue|stop] {
Note that the above syntax is strict. For response rewrites, only \fB\fCname\fR
rules are allowed to match the question section, and only by match type
\fB\fCregex\fR. The answer rewrite must be after the name, as in the
-syntax example. There must only be two lines (a \fB\fCname\fR followed by an
-\fB\fCanswer\fR) in the brackets; additional rules are not supported.
+syntax example.
.PP
An alternate syntax for rewriting a DNS request and response is as
@@ -268,7 +281,7 @@ follows:
.RS
.nf
-rewrite [continue|stop] name regex STRING STRING answer name STRING STRING
+rewrite [continue|stop] name regex STRING STRING answer name STRING STRING [answer value STRING STRING]
.fi
.RE