diff options
author | 2020-05-24 00:36:16 +0530 | |
---|---|---|
committer | 2020-05-23 12:06:16 -0700 | |
commit | f382c72e9592b2defdf3c938622523a28d6df378 (patch) | |
tree | 90e562590c781f77c00dadea3be0c0b866cf2ed0 /README.md | |
parent | c9c212703a33ee6588a6b77eed71f2c7fdad577d (diff) | |
download | coredns-f382c72e9592b2defdf3c938622523a28d6df378.tar.gz coredns-f382c72e9592b2defdf3c938622523a28d6df378.tar.zst coredns-f382c72e9592b2defdf3c938622523a28d6df378.zip |
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>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 29 |
1 files changed, 26 insertions, 3 deletions
@@ -87,15 +87,38 @@ CoreDNS-1.6.6 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 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 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. - -`Corefile` contains: +A Corefile for a CoreDNS server that forward any queries to an upstream DNS (e.g., `8.8.8.8`) is as follows: ~~~ corefile .:53 { |