Debian Codegraph @

cmd/atomdns/Conffile-example

raw
1 # This next block has no zone, therefore it is the _global_ block, that defines properties for the entire
2 # atomdns process.This handler block is documented in atomdns-global(7).
3 {
4 # log configures the (global) logging. Each handler can decide to log or not, but what and how things are
5 # log is mostly determined here.
6 log {
7 debug # Enable debug logging.
8 #json # Enable for JSON log output.
9 #disable # Start without logging and wait for SIGUSR1 to enable query logging.
10 }
11 health # Enable the health endpoint.
12 metrics # Enable prometheus metrics.
13 root handlers # Set the root directory to $PWD/handlers
14
15 # if you want to profile the atomdns instance, enable the next line.
16 #pprof atomdns.prof
17
18 # dns configures the DNS listener that does plain old DNS.
19 dns {
20 addr [::]:1053 # Listen on all interfaces and port 1053.
21 # limits is used to set limits on the listener.
22 limits {
23 tcp -1 # Never severe a TCP connection.
24 run numcpu()*3 # Run this many servers that all listen on the same port (re-use port).
25 }
26 }
27 # doh configures the DNS over HTTP listener.
28 doh {
29 addr [::]:1443 # Listen on all interfaces and port 1443.
30 limits {
31 run numcpu()*1 # Run only a single server per CPU.
32 inflight 100 # Allow only 100 inflight requests to stop the server from being overwhelmed.
33 }
34 }
35 # dot configures the DNS over TLS listener.
36 dot {
37 addr [::]:8053 # Listen on all interface and port 8053.
38 limits {
39 run 1 # Run a single server.
40 inflight 200 # Allow only 200 in-flight requests to stop the server from being overwhelmed.
41 }
42 }
43 # dou configures the DNS over Unix domain sockets listener.
44 dou {
45 addr ~/dns.sock # Here we use ~ to refer to our home directory.
46 }
47 # tls configures how atomdns configures TLS for doh and dot. In this case it's manual with the
48 # certificates being places on the local disk. Note that the `root` directive is applied here, so
49 # the certs can be found in handlers/global/testdata/... .
50 tls manual {
51 cert global/testdata/test_cert.pem global/testdata/test_key.pem
52 }
53 }
54
55 # This configures the first zone to and the handlers to run for that zone. The 10.0.0.0/24 syntax is
56 # automatically converted in the correct in-addr.arpa zone(s).
57 10.0.0.0/24 {
58 log # Log each query, see atomdns-log(7).
59 whoami # See atomdns-whois(7).
60 }
61
62 # Configure to be authoritative for example.org.
63 example.org {
64 id # Add a request ID, see atomdns-id(7).
65 log # Log, see atomdns-log(7).
66 # yes is an older handler this since has been removed, the setup skips these automatically.
67 yes {
68 CAA stuff
69 }
70 # kill 50s # Kill the server after 50 seconds, see atomdns-kill(7).
71 dbfile dbfile/zone/testdata/db.example.org { # Configure a zone from a file on disk, see atomdns-dbfile(7).
72 transfer # Allow transfers to everywhere.
73 }
74 }
75
76 # Configure to be authoritative for miek.nl.
77 miek.nl {
78 log # Log, as above.
79 metrics # Metrics are globally enabled, for this zone they should be actually gathered and exported.
80 # Sign the db.miek.nl zone with the keys specified. This doesn't do anything else. The next handler...
81 sign sign/testdata/db.miek.nl {
82 key sign/testdata/Kmiek.nl.+013+59725
83 zonemd
84 }
85 # randomize address in the message.
86 random
87 # ... will pick up the signed zone file and serve it.
88 dbfile sign/testdata/db.miek.nl.signed
89 }
90
91 # Configure zones for CH class queries, so the server returns some information about its own identity.
92 version.server/CH authors.server/CH id.server/CH {
93 log
94 chaos { # Chaos, see atomdns-chaos(7)
95 authors {
96 [email protected]
97 }
98 }
99 }