mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
Core: convert IP addresses to reverse zone (#838)
* Core: convert IP addresses to reverse zone If we see IP/mask syntax and the mask mod 8 == 0 we assume a reverse zone and convert to in-addr or .arpa. * typos * integration test * Addr is not used * core: clean up normalize Create a SplitHostPort function that can be used both from normalize.go and address.go. This removes some (not all!) duplication between the both and makes it work with reverse address notations. * More tests
This commit is contained in:
13
README.md
13
README.md
@@ -168,6 +168,19 @@ example.org {
|
||||
}
|
||||
~~~
|
||||
|
||||
IP addresses are also allowed. They are automatically converted to reverse zones:
|
||||
|
||||
~~~ txt
|
||||
10.0.0.0/24 {
|
||||
# ...
|
||||
}
|
||||
~~~
|
||||
Means you are authoritative for `0.0.10.in-addr.arpa.`.
|
||||
|
||||
The netmask must be dividable by 8, if it is not the reverse conversion is not done. This also works
|
||||
for IPv6 addresses. If for some reason you want to serve a zone named `10.0.0.0/24` add the closing
|
||||
dot: `10.0.0.0/24.` as this also stops the conversion.
|
||||
|
||||
Listening on TLS and for gRPC? Use:
|
||||
|
||||
~~~ txt
|
||||
|
||||
Reference in New Issue
Block a user