Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
82ac70f1
Commit
82ac70f1
authored
Aug 22, 2016
by
Miek Gieben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc updates
Remove miek.nl in favor of example.org and other smaller cleanups.
parent
26f52a99
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
26 deletions
+31
-26
README.md
README.md
+23
-18
middleware/cache/README.md
middleware/cache/README.md
+4
-5
middleware/chaos/README.md
middleware/chaos/README.md
+2
-2
middleware/loadbalance/README.md
middleware/loadbalance/README.md
+2
-1
No files found.
README.md
View file @
82ac70f1
...
@@ -30,6 +30,8 @@ Currently CoreDNS is able to:
...
@@ -30,6 +30,8 @@ Currently CoreDNS is able to:
*
Has support for the CH class:
`version.bind`
and friends (middleware/chaos).
*
Has support for the CH class:
`version.bind`
and friends (middleware/chaos).
*
Profiling support (middleware/pprof).
*
Profiling support (middleware/pprof).
Each of the middlewares has a README.md of their own.
## Status
## Status
I'm using CoreDNS is my primary, authoritative, nameserver for my domains (
`miek.nl`
,
`atoom.net`
I'm using CoreDNS is my primary, authoritative, nameserver for my domains (
`miek.nl`
,
`atoom.net`
...
@@ -49,7 +51,7 @@ Caddyfile when I forked it).
...
@@ -49,7 +51,7 @@ Caddyfile when I forked it).
## Compilation
## Compilation
CoreDNS (as a servertype plugin for Caddy) has a
hard
dependency on Caddy - this is
*almost*
like
CoreDNS (as a servertype plugin for Caddy) has a dependency on Caddy - this is
*almost*
like
the normal Go dependencies, but with a small twist, caddy (the source) need to know that CoreDNS
the normal Go dependencies, but with a small twist, caddy (the source) need to know that CoreDNS
exists and for this we need to add 1 line
`_ "github.com/miekg/coredns/core"`
to file in caddy.
exists and for this we need to add 1 line
`_ "github.com/miekg/coredns/core"`
to file in caddy.
...
@@ -58,8 +60,8 @@ dependencies:
...
@@ -58,8 +60,8 @@ dependencies:
go get ./...
go get ./...
Then, execute
`go generate`
, this will patch Caddy to add CoreDNS
, and then
`go build`
as you would
Then, execute
`go generate`
, this will patch Caddy to add CoreDNS
(and remove the HTTP server
normally do:
plugin), and then
`go build`
as you would
normally do:
go generate
go generate
go build
go build
...
@@ -68,34 +70,36 @@ Should yield a `coredns` binary.
...
@@ -68,34 +70,36 @@ Should yield a `coredns` binary.
## Examples
## Examples
Start a simple proxy
:
Start a simple proxy
, you'll need to be root to start listening on port 53.
`Corefile`
contains:
`Corefile`
contains:
~~~
txt
~~~
txt
.:
10
53 {
.:53 {
proxy . 8.8.8.8:53
proxy . 8.8.8.8:53
log stdout
}
}
~~~
~~~
Just start CoreDNS:
`./coredns`
.
Just start CoreDNS:
`./coredns`
.
And then just query on that port (
10
53), the query should be forwarded to 8.8.8.8 and the response
And then just query on that port (53), the query should be forwarded to 8.8.8.8 and the response
will be returned.
will be returned.
Each query should also show up in the log.
Serve the (NSEC) DNSSEC signed
`
miek.nl
`
on port 1053, errors and logging to stdout. Allow zone
Serve the (NSEC) DNSSEC signed
`
example.org
`
on port 1053, errors and logging to stdout. Allow zone
transfers to everybody.
transfers to everybody
, but specically mention 1 IP address so that CoreDNS can send notifies to it
.
~~~
txt
~~~
txt
miek.nl
:1053 {
example.org
:1053 {
file /var/lib/
bind/miek.nl
.signed {
file /var/lib/
coredns/example.org
.signed {
transfer to *
transfer to *
transfer to 2001:500:8f::53
}
}
errors stdout
errors stdout
log stdout
log stdout
}
}
~~~
~~~
Serve
`
miek.nl`
on port 1053, but forward everything that does
*not*
match
`miek.nl
`
to a recursive
Serve
`
example.org`
on port 1053, but forward everything that does
*not*
match
`example.org
`
to a recursive
nameserver
*and*
rewrite ANY queries to HINFO.
nameserver
*and*
rewrite ANY queries to HINFO.
~~~
txt
~~~
txt
...
@@ -103,22 +107,23 @@ nameserver *and* rewrite ANY queries to HINFO.
...
@@ -103,22 +107,23 @@ nameserver *and* rewrite ANY queries to HINFO.
rewrite ANY HINFO
rewrite ANY HINFO
proxy . 8.8.8.8:53
proxy . 8.8.8.8:53
file /var/lib/
bind/miek.nl.signed miek.nl
{
file /var/lib/
coredns/example.org.signed example.org
{
transfer to *
transfer to *
transfer to 2001:500:8f::53
}
}
errors stdout
errors stdout
log stdout
log stdout
}
}
~~~
~~~
All the above examples are possible with the
*current*
CoreDNS.
## What
remains to be d
one
## What
Remains To Be D
one
*
Optimizations.
*
Optimizations.
*
Load testing.
*
Load testing.
*
The
[
issues
](
https://github.com/miekg/coredns/issues
)
.
*
The
[
issues
](
https://github.com/miekg/coredns/issues
)
.
## Blog and Contact
## Blog and Contact
Website:
<https://coredns.io>
Website:
<https://coredns.io>
...
@@ -127,15 +132,15 @@ Docs: <https://miek.nl/tags/coredns/>
...
@@ -127,15 +132,15 @@ Docs: <https://miek.nl/tags/coredns/>
Github:
<https://github.com/miekg/coredns>
Github:
<https://github.com/miekg/coredns>
## Systemd
service f
ile
## Systemd
Service F
ile
Use this as a systemd service file. It defaults to a coredns wich a homedir of /home/coredns
Use this as a systemd service file. It defaults to a coredns wich a homedir of /home/coredns
and the binary lives in /opt/bin:
and the binary lives in /opt/bin
and the config in
`/etc/coredns/Corefile`
:
~~~
txt
~~~
txt
[Unit]
[Unit]
Description=CoreDNS DNS server
Description=CoreDNS DNS server
Documentation=https://
miek.nl/tags/coredns
Documentation=https://
coredns.io
After=network.target
After=network.target
[Service]
[Service]
...
...
middleware/cache/README.md
View file @
82ac70f1
...
@@ -12,17 +12,16 @@ cache [ttl] [zones...]
...
@@ -12,17 +12,16 @@ cache [ttl] [zones...]
answer section) will be used.
answer section) will be used.
*
`zones`
zones it should should cache for. If empty the zones from the configuration block are used.
*
`zones`
zones it should should cache for. If empty the zones from the configuration block are used.
Each element in the cache is cached according to its TTL, for the negative cache the SOA's MinTTL
Each element in the cache is cached according to its TTL, for the negative cache the SOA's MinTTL
value is used.
value is used.
A cache mostly makes sense with a middleware that is potentially slow, i.e. a proxy that retrieves
A cache mostly makes sense with a middleware that is potentially slow, i.e. a proxy that retrieves
answer, or to minimize backend queries for middleware like etcd. Using a cache with the file
answer, or to minimize backend queries for middleware like etcd. Using a cache with the file
middleware essentially doubles the memory load with no conce
al
able increase of query speed.
middleware essentially doubles the memory load with no conce
iv
able increase of query speed.
The minimum TTL allowed on resource records is 5 seconds.
The minimum TTL allowed on resource records is 5 seconds.
If monitoring is enabled (
`prometheus`
directive) then the following metrics are added:
If monitoring is enabled (
`prometheus`
directive) then the following
extra
metrics are added:
*
coredns_cache_hit_count_total, and
*
coredns_cache_hit_count_total, and
*
coredns_cache_miss_count_total
*
coredns_cache_miss_count_total
...
@@ -38,7 +37,7 @@ Enable caching for all zones, but cap everything to a TTL of 10 seconds.
...
@@ -38,7 +37,7 @@ Enable caching for all zones, but cap everything to a TTL of 10 seconds.
~~~
~~~
proxy . 8.8.8.8:53
proxy . 8.8.8.8:53
cache
miek.nl
cache
example.org
~~~
~~~
Proxy to Google Public DNS and only cache responses for
miek.nl
(or below).
Proxy to Google Public DNS and only cache responses for
example.org
(or below).
middleware/chaos/README.md
View file @
82ac70f1
# chaos
# chaos
The
`chaos`
middleware allows CoreDNS to response to TXT queries in CH class.
The
`chaos`
middleware allows CoreDNS to response to TXT queries in CH class.
Useful for retrieving version or author information from the server.
If
Useful for retrieving version or author information from the server.
## Syntax
## Syntax
...
@@ -9,7 +9,7 @@ Useful for retrieving version or author information from the server. If
...
@@ -9,7 +9,7 @@ Useful for retrieving version or author information from the server. If
chaos [version] [authors...]
chaos [version] [authors...]
~~~
~~~
*
`version`
the version to return, defaults to CoreDNS.
*
`version`
the version to return, defaults to CoreDNS
-
<version>
, if not set
.
*
`authors`
what authors to return. No default.
*
`authors`
what authors to return. No default.
Note that you have to make sure that this middleware will get actual queries for the
Note that you have to make sure that this middleware will get actual queries for the
...
...
middleware/loadbalance/README.md
View file @
82ac70f1
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
message. See
[
Wikipedia
](
https://en.wikipedia.org/wiki/Round-robin_DNS
)
about the pros and cons
message. See
[
Wikipedia
](
https://en.wikipedia.org/wiki/Round-robin_DNS
)
about the pros and cons
on this setup.
on this setup.
It will take care to sort any CNAMEs before any address records.
It will take care to sort any CNAMEs before any address records, because some stub resolver
implementation (like glibc) can't handle that.
## Syntax
## Syntax
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment