mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
Update README.md (#668)
* Update README.md Minor cosmetic fixes, including one broken comment in a sample Corefile. * Fix verb tense
This commit is contained in:
committed by
John Belamaric
parent
d2268d3030
commit
2f2c90f391
@@ -1,6 +1,6 @@
|
||||
# reverse
|
||||
|
||||
The *reverse* middleware allows CoreDNS to respond dynamicly to an PTR request and the related A/AAAA request.
|
||||
The *reverse* middleware allows CoreDNS to respond dynamically to a PTR request and the related A/AAAA request.
|
||||
|
||||
## Syntax
|
||||
|
||||
@@ -12,27 +12,27 @@ reverse NETWORK... {
|
||||
~~~
|
||||
|
||||
* **NETWORK** one or more CIDR formatted networks to respond on.
|
||||
* `hostname` inject the IP and zone to an template for the hostname. Defaults to "ip-{IP}.{zone[1]}". See below for template.
|
||||
* `hostname` injects the IP and zone to a template for the hostname. Defaults to "ip-{IP}.{zone[1]}". See below for template.
|
||||
* `ttl` defaults to 60
|
||||
* `fallthrough` If zone matches and no record can be generated, pass request to the next middleware.
|
||||
|
||||
### Template Syntax
|
||||
|
||||
The template for the hostname is used for generating the PTR for an reverse lookup and matching the
|
||||
The template for the hostname is used for generating the PTR for a reverse lookup and matching the
|
||||
forward lookup back to an IP.
|
||||
|
||||
#### `{ip}`
|
||||
|
||||
The `{ip}` symbol is **required** to make reverse work.
|
||||
For IPv4 lookups the "." is replaced with an "-", i.e.: 10.1.1.1 results in "10-1-1-1"
|
||||
With IPv6 lookups the ":" is removed, and any zero ranged are expanded, i.e.:
|
||||
For IPv4 lookups the "." is replaced with a "-", e.g., 10.1.1.1 results in "10-1-1-1"
|
||||
With IPv6 lookups the ":" is removed, and any zero ranged are expanded, e.g.,
|
||||
"ffff::ffff" results in "ffff000000000000000000000000ffff"
|
||||
|
||||
#### `{zone[i]}`
|
||||
|
||||
The `{zone[i]}` symbol is **optional** and can be replaced by a fixed (zone) string.
|
||||
The zone will be matched by the zones listed in *this* configuration stanza.
|
||||
`i` needs to be replaced to the index of the configured listener zones, starting with 1.
|
||||
`i` needs to be replaced with the index of the configured listener zones, starting with 1.
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -41,7 +41,7 @@ arpa compute.internal {
|
||||
# proxy unmatched requests
|
||||
proxy . 8.8.8.8
|
||||
|
||||
# answer requests for IPs in this networks
|
||||
# answer requests for IPs in this network
|
||||
# PTR 1.0.32.10.in-addr.arpa. 3600 ip-10-0-32-1.compute.internal.
|
||||
# A ip-10-0-32-1.compute.internal. 3600 10.0.32.1
|
||||
# v6 is also possible
|
||||
@@ -53,8 +53,8 @@ arpa compute.internal {
|
||||
|
||||
ttl 3600
|
||||
|
||||
# Forward unanswered or unmatched requests to proxy # without this flag, requesting A/AAAA
|
||||
records on compute.internal. will end here.
|
||||
# Forward unanswered or unmatched requests to proxy
|
||||
# without this flag, requesting A/AAAA records on compute.internal. will end here.
|
||||
fallthrough
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user