summarylogtreecommitdiffstats
path: root/corefile.example
blob: dd44a145ade9f7223a12ea18343a247282dc48d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## https://github.com/coredns/coredns.io/tree/master/content/manual

# Start a server listening on port 1053
.:1053 {

	# Forward all queries to Google OR Quad9
    forward . 8.8.8.8 9.9.9.9:53
    # Forward all requests to 9.9.9.9 using DNS-over-TLS
    forward . tls://9.9.9.9 {
       tls_servername dns.quad9.net
       health_check 5s
    }

    # Write query/errors logs to stdout
    log
    errors

    # Enable caching for all zones, keep a
    # positive cache size of 5000 and a negative cache size of 2500
    cache {
         success 5000
         denial 2500
    }
    # Only cache responses for example.org 
    cache example.org
}

# Forward all queries about example.org to a server from an environment variable
# or servers from a file
example.org {
    forward . {$DNS_SERVER} /etc/resolv.conf
    log
}