Improvements in the documentation (README.md) (#3907)
* Added suggestions by @yongtang Signed-off-by: Chanakya-Ekbote <ca10@iitbbs.ac.in> * Removed trailing whitespaces Signed-off-by: Chanakya-Ekbote <ca10@iitbbs.ac.in>
This commit is contained in:
parent
c9c212703a
commit
f382c72e95
1 changed files with 26 additions and 3 deletions
29
README.md
29
README.md
|
@ -87,15 +87,38 @@ CoreDNS-1.6.6
|
||||||
linux/amd64, go1.13.5, aa8c32
|
linux/amd64, go1.13.5, aa8c32
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
The following could be used to query the CoreDNS server that is running now:
|
||||||
|
|
||||||
|
~~~ txt
|
||||||
|
dig @127.0.0.1 -p 53 www.example.com
|
||||||
|
~~~
|
||||||
|
|
||||||
Any query sent to port 53 should return some information; your sending address, port and protocol
|
Any query sent to port 53 should return some information; your sending address, port and protocol
|
||||||
used. The query should also be logged to standard output.
|
used. The query should also be logged to standard output.
|
||||||
|
|
||||||
|
The configuration of CoreDNS is done through a file named `Corefile`. When CoreDNS starts, it will
|
||||||
|
look for the `Corefile` from the current working directory. A `Corefile` for CoreDNS server that listens
|
||||||
|
on port `53` and enables `whoami` plugin is:
|
||||||
|
|
||||||
|
~~~ corefile
|
||||||
|
.:53 {
|
||||||
|
whoami
|
||||||
|
}
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Sometimes port number 53 is occupied by system processes. In that case you can start the CoreDNS server
|
||||||
|
while modifying the Corefile as given below so that the CoreDNS server starts on port 1053.
|
||||||
|
|
||||||
|
~~~ corefile
|
||||||
|
.:1053 {
|
||||||
|
whoami
|
||||||
|
}
|
||||||
|
~~~
|
||||||
|
|
||||||
If you have a Corefile without a port number specified it will, by default, use port 53, but you can
|
If you have a Corefile without a port number specified it will, by default, use port 53, but you can
|
||||||
override the port with the `-dns.port` flag: `coredns -dns.port 1053`, runs the server on port 1053.
|
override the port with the `-dns.port` flag: `coredns -dns.port 1053`, runs the server on port 1053.
|
||||||
|
|
||||||
Start a simple proxy. You'll need to be root to start listening on port 53.
|
A Corefile for a CoreDNS server that forward any queries to an upstream DNS (e.g., `8.8.8.8`) is as follows:
|
||||||
|
|
||||||
`Corefile` contains:
|
|
||||||
|
|
||||||
~~~ corefile
|
~~~ corefile
|
||||||
.:53 {
|
.:53 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue