]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - doc/example.conf.in
Vendor import of Unbound 1.9.0.
[FreeBSD/FreeBSD.git] / doc / example.conf.in
1 #
2 # Example configuration file.
3 #
4 # See unbound.conf(5) man page, version 1.9.0.
5 #
6 # this is a comment.
7
8 #Use this to include other text into the file.
9 #include: "otherfile.conf"
10
11 # The server clause sets the main parameters.
12 server:
13         # whitespace is not necessary, but looks cleaner.
14
15         # verbosity number, 0 is least verbose. 1 is default.
16         verbosity: 1
17
18         # print statistics to the log (for every thread) every N seconds.
19         # Set to "" or 0 to disable. Default is disabled.
20         # statistics-interval: 0
21
22         # enable shm for stats, default no.  if you enable also enable
23         # statistics-interval, every time it also writes stats to the
24         # shared memory segment keyed with shm-key.
25         # shm-enable: no
26
27         # shm for stats uses this key, and key+1 for the shared mem segment.
28         # shm-key: 11777
29
30         # enable cumulative statistics, without clearing them after printing.
31         # statistics-cumulative: no
32
33         # enable extended statistics (query types, answer codes, status)
34         # printed from unbound-control. default off, because of speed.
35         # extended-statistics: no
36
37         # number of threads to create. 1 disables threading.
38         # num-threads: 1
39
40         # specify the interfaces to answer queries from by ip-address.
41         # The default is to listen to localhost (127.0.0.1 and ::1).
42         # specify 0.0.0.0 and ::0 to bind to all available interfaces.
43         # specify every interface[@port] on a new 'interface:' labelled line.
44         # The listen interfaces are not changed on reload, only on restart.
45         # interface: 192.0.2.153
46         # interface: 192.0.2.154
47         # interface: 192.0.2.154@5003
48         # interface: 2001:DB8::5
49
50         # enable this feature to copy the source address of queries to reply.
51         # Socket options are not supported on all platforms. experimental.
52         # interface-automatic: no
53
54         # port to answer queries from
55         # port: 53
56
57         # specify the interfaces to send outgoing queries to authoritative
58         # server from by ip-address. If none, the default (all) interface
59         # is used. Specify every interface on a 'outgoing-interface:' line.
60         # outgoing-interface: 192.0.2.153
61         # outgoing-interface: 2001:DB8::5
62         # outgoing-interface: 2001:DB8::6
63
64         # Specify a netblock to use remainder 64 bits as random bits for
65         # upstream queries.  Uses freebind option (Linux).
66         # outgoing-interface: 2001:DB8::/64
67         # Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo
68         # And: ip -6 route add local 2001:db8::/64 dev lo
69         # And set prefer-ip6: yes to use the ip6 randomness from a netblock.
70         # Set this to yes to prefer ipv6 upstream servers over ipv4.
71         # prefer-ip6: no
72
73         # number of ports to allocate per thread, determines the size of the
74         # port range that can be open simultaneously.  About double the
75         # num-queries-per-thread, or, use as many as the OS will allow you.
76         # outgoing-range: 4096
77
78         # permit unbound to use this port number or port range for
79         # making outgoing queries, using an outgoing interface.
80         # outgoing-port-permit: 32768
81
82         # deny unbound the use this of port number or port range for
83         # making outgoing queries, using an outgoing interface.
84         # Use this to make sure unbound does not grab a UDP port that some
85         # other server on this computer needs. The default is to avoid
86         # IANA-assigned port numbers.
87         # If multiple outgoing-port-permit and outgoing-port-avoid options
88         # are present, they are processed in order.
89         # outgoing-port-avoid: "3200-3208"
90
91         # number of outgoing simultaneous tcp buffers to hold per thread.
92         # outgoing-num-tcp: 10
93
94         # number of incoming simultaneous tcp buffers to hold per thread.
95         # incoming-num-tcp: 10
96
97         # buffer size for UDP port 53 incoming (SO_RCVBUF socket option).
98         # 0 is system default.  Use 4m to catch query spikes for busy servers.
99         # so-rcvbuf: 0
100
101         # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option).
102         # 0 is system default.  Use 4m to handle spikes on very busy servers.
103         # so-sndbuf: 0
104
105         # use SO_REUSEPORT to distribute queries over threads.
106         # so-reuseport: yes
107
108         # use IP_TRANSPARENT so the interface: addresses can be non-local
109         # and you can config non-existing IPs that are going to work later on
110         # (uses IP_BINDANY on FreeBSD).
111         # ip-transparent: no
112
113         # use IP_FREEBIND so the interface: addresses can be non-local
114         # and you can bind to nonexisting IPs and interfaces that are down.
115         # Linux only.  On Linux you also have ip-transparent that is similar.
116         # ip-freebind: no
117
118         # EDNS reassembly buffer to advertise to UDP peers (the actual buffer
119         # is set with msg-buffer-size). 1472 can solve fragmentation (timeouts)
120         # edns-buffer-size: 4096
121
122         # Maximum UDP response size (not applied to TCP response).
123         # Suggested values are 512 to 4096. Default is 4096. 65536 disables it.
124         # max-udp-size: 4096
125
126         # max memory to use for stream(tcp and tls) waiting result buffers.
127         # stream-wait-size: 4m
128
129         # buffer size for handling DNS data. No messages larger than this
130         # size can be sent or received, by UDP or TCP. In bytes.
131         # msg-buffer-size: 65552
132
133         # the amount of memory to use for the message cache.
134         # plain value in bytes or you can append k, m or G. default is "4Mb".
135         # msg-cache-size: 4m
136
137         # the number of slabs to use for the message cache.
138         # the number of slabs must be a power of 2.
139         # more slabs reduce lock contention, but fragment memory usage.
140         # msg-cache-slabs: 4
141
142         # the number of queries that a thread gets to service.
143         # num-queries-per-thread: 1024
144
145         # if very busy, 50% queries run to completion, 50% get timeout in msec
146         # jostle-timeout: 200
147
148         # msec to wait before close of port on timeout UDP. 0 disables.
149         # delay-close: 0
150
151         # msec for waiting for an unknown server to reply.  Increase if you
152         # are behind a slow satellite link, to eg. 1128.
153         # unknown-server-time-limit: 376
154
155         # the amount of memory to use for the RRset cache.
156         # plain value in bytes or you can append k, m or G. default is "4Mb".
157         # rrset-cache-size: 4m
158
159         # the number of slabs to use for the RRset cache.
160         # the number of slabs must be a power of 2.
161         # more slabs reduce lock contention, but fragment memory usage.
162         # rrset-cache-slabs: 4
163
164         # the time to live (TTL) value lower bound, in seconds. Default 0.
165         # If more than an hour could easily give trouble due to stale data.
166         # cache-min-ttl: 0
167
168         # the time to live (TTL) value cap for RRsets and messages in the
169         # cache. Items are not cached for longer. In seconds.
170         # cache-max-ttl: 86400
171
172         # the time to live (TTL) value cap for negative responses in the cache
173         # cache-max-negative-ttl: 3600
174
175         # the time to live (TTL) value for cached roundtrip times, lameness and
176         # EDNS version information for hosts. In seconds.
177         # infra-host-ttl: 900
178
179         # minimum wait time for responses, increase if uplink is long. In msec.
180         # infra-cache-min-rtt: 50
181
182         # the number of slabs to use for the Infrastructure cache.
183         # the number of slabs must be a power of 2.
184         # more slabs reduce lock contention, but fragment memory usage.
185         # infra-cache-slabs: 4
186
187         # the maximum number of hosts that are cached (roundtrip, EDNS, lame).
188         # infra-cache-numhosts: 10000
189
190         # define a number of tags here, use with local-zone, access-control.
191         # repeat the define-tag statement to add additional tags.
192         # define-tag: "tag1 tag2 tag3"
193
194         # Enable IPv4, "yes" or "no".
195         # do-ip4: yes
196
197         # Enable IPv6, "yes" or "no".
198         # do-ip6: yes
199
200         # Enable UDP, "yes" or "no".
201         # do-udp: yes
202
203         # Enable TCP, "yes" or "no".
204         # do-tcp: yes
205
206         # upstream connections use TCP only (and no UDP), "yes" or "no"
207         # useful for tunneling scenarios, default no.
208         # tcp-upstream: no
209
210         # upstream connections also use UDP (even if do-udp is no).
211         # useful if if you want UDP upstream, but don't provide UDP downstream.
212         # udp-upstream-without-downstream: no
213
214         # Maximum segment size (MSS) of TCP socket on which the server
215         # responds to queries. Default is 0, system default MSS.
216         # tcp-mss: 0
217
218         # Maximum segment size (MSS) of TCP socket for outgoing queries.
219         # Default is 0, system default MSS.
220         # outgoing-tcp-mss: 0
221
222         # Idle TCP timeout, connection closed in milliseconds
223         # tcp-idle-timeout: 30000
224
225         # Enable EDNS TCP keepalive option.
226         # edns-tcp-keepalive: no
227
228         # Timeout for EDNS TCP keepalive, in msec.
229         # edns-tcp-keepalive-timeout: 120000
230
231         # Use systemd socket activation for UDP, TCP, and control sockets.
232         # use-systemd: no
233
234         # Detach from the terminal, run in background, "yes" or "no".
235         # Set the value to "no" when unbound runs as systemd service.
236         # do-daemonize: yes
237
238         # control which clients are allowed to make (recursive) queries
239         # to this server. Specify classless netblocks with /size and action.
240         # By default everything is refused, except for localhost.
241         # Choose deny (drop message), refuse (polite error reply),
242         # allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on),
243         # allow_snoop (recursive and nonrecursive ok)
244         # deny_non_local (drop queries unless can be answered from local-data)
245         # refuse_non_local (like deny_non_local but polite error reply).
246         # access-control: 0.0.0.0/0 refuse
247         # access-control: 127.0.0.0/8 allow
248         # access-control: ::0/0 refuse
249         # access-control: ::1 allow
250         # access-control: ::ffff:127.0.0.1 allow
251
252         # tag access-control with list of tags (in "" with spaces between)
253         # Clients using this access control element use localzones that
254         # are tagged with one of these tags.
255         # access-control-tag: 192.0.2.0/24 "tag2 tag3"
256
257         # set action for particular tag for given access control element
258         # if you have multiple tag values, the tag used to lookup the action
259         # is the first tag match between access-control-tag and local-zone-tag
260         # where "first" comes from the order of the define-tag values.
261         # access-control-tag-action: 192.0.2.0/24 tag3 refuse
262
263         # set redirect data for particular tag for access control element
264         # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1"
265
266         # Set view for access control element
267         # access-control-view: 192.0.2.0/24 viewname
268
269         # if given, a chroot(2) is done to the given directory.
270         # i.e. you can chroot to the working directory, for example,
271         # for extra security, but make sure all files are in that directory.
272         #
273         # If chroot is enabled, you should pass the configfile (from the
274         # commandline) as a full path from the original root. After the
275         # chroot has been performed the now defunct portion of the config
276         # file path is removed to be able to reread the config after a reload.
277         #
278         # All other file paths (working dir, logfile, roothints, and
279         # key files) can be specified in several ways:
280         #       o as an absolute path relative to the new root.
281         #       o as a relative path to the working directory.
282         #       o as an absolute path relative to the original root.
283         # In the last case the path is adjusted to remove the unused portion.
284         #
285         # The pid file can be absolute and outside of the chroot, it is
286         # written just prior to performing the chroot and dropping permissions.
287         #
288         # Additionally, unbound may need to access /dev/random (for entropy).
289         # How to do this is specific to your OS.
290         #
291         # If you give "" no chroot is performed. The path must not end in a /.
292         # chroot: "@UNBOUND_CHROOT_DIR@"
293
294         # if given, user privileges are dropped (after binding port),
295         # and the given username is assumed. Default is user "unbound".
296         # If you give "" no privileges are dropped.
297         # username: "@UNBOUND_USERNAME@"
298
299         # the working directory. The relative files in this config are
300         # relative to this directory. If you give "" the working directory
301         # is not changed.
302         # If you give a server: directory: dir before include: file statements
303         # then those includes can be relative to the working directory.
304         # directory: "@UNBOUND_RUN_DIR@"
305
306         # the log file, "" means log to stderr.
307         # Use of this option sets use-syslog to "no".
308         # logfile: ""
309
310         # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
311         # log to. If yes, it overrides the logfile.
312         # use-syslog: yes
313
314         # Log identity to report. if empty, defaults to the name of argv[0]
315         # (usually "unbound").
316         # log-identity: ""
317
318         # print UTC timestamp in ascii to logfile, default is epoch in seconds.
319         # log-time-ascii: no
320
321         # print one line with time, IP, name, type, class for every query.
322         # log-queries: no
323
324         # print one line per reply, with time, IP, name, type, class, rcode,
325         # timetoresolve, fromcache and responsesize.
326         # log-replies: no
327
328         # log with tag 'query' and 'reply' instead of 'info' for
329         # filtering log-queries and log-replies from the log.
330         # log-tag-queryreply: no
331
332         # log the local-zone actions, like local-zone type inform is enabled
333         # also for the other local zone types.
334         # log-local-actions: no
335
336         # print log lines that say why queries return SERVFAIL to clients.
337         # log-servfail: no
338
339         # the pid file. Can be an absolute path outside of chroot/work dir.
340         # pidfile: "@UNBOUND_PIDFILE@"
341
342         # file to read root hints from.
343         # get one from https://www.internic.net/domain/named.cache
344         # root-hints: ""
345
346         # enable to not answer id.server and hostname.bind queries.
347         # hide-identity: no
348
349         # enable to not answer version.server and version.bind queries.
350         # hide-version: no
351
352         # enable to not answer trustanchor.unbound queries.
353         # hide-trustanchor: no
354
355         # the identity to report. Leave "" or default to return hostname.
356         # identity: ""
357
358         # the version to report. Leave "" or default to return package version.
359         # version: ""
360
361         # the target fetch policy.
362         # series of integers describing the policy per dependency depth.
363         # The number of values in the list determines the maximum dependency
364         # depth the recursor will pursue before giving up. Each integer means:
365         #       -1 : fetch all targets opportunistically,
366         #       0: fetch on demand,
367         #       positive value: fetch that many targets opportunistically.
368         # Enclose the list of numbers between quotes ("").
369         # target-fetch-policy: "3 2 1 0 0"
370
371         # Harden against very small EDNS buffer sizes.
372         # harden-short-bufsize: no
373
374         # Harden against unseemly large queries.
375         # harden-large-queries: no
376
377         # Harden against out of zone rrsets, to avoid spoofing attempts.
378         # harden-glue: yes
379
380         # Harden against receiving dnssec-stripped data. If you turn it
381         # off, failing to validate dnskey data for a trustanchor will
382         # trigger insecure mode for that zone (like without a trustanchor).
383         # Default on, which insists on dnssec data for trust-anchored zones.
384         # harden-dnssec-stripped: yes
385
386         # Harden against queries that fall under dnssec-signed nxdomain names.
387         # harden-below-nxdomain: yes
388
389         # Harden the referral path by performing additional queries for
390         # infrastructure data.  Validates the replies (if possible).
391         # Default off, because the lookups burden the server.  Experimental
392         # implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
393         # harden-referral-path: no
394
395         # Harden against algorithm downgrade when multiple algorithms are
396         # advertised in the DS record.  If no, allows the weakest algorithm
397         # to validate the zone.
398         # harden-algo-downgrade: no
399
400         # Sent minimum amount of information to upstream servers to enhance
401         # privacy. Only sent minimum required labels of the QNAME and set QTYPE
402         # to A when possible.
403         # qname-minimisation: yes
404
405         # QNAME minimisation in strict mode. Do not fall-back to sending full
406         # QNAME to potentially broken nameservers. A lot of domains will not be
407         # resolvable when this option in enabled.
408         # This option only has effect when qname-minimisation is enabled.
409         # qname-minimisation-strict: no
410
411         # Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN
412         # and other denials, using information from previous NXDOMAINs answers.
413         # aggressive-nsec: no
414
415         # Use 0x20-encoded random bits in the query to foil spoof attempts.
416         # This feature is an experimental implementation of draft dns-0x20.
417         # use-caps-for-id: no
418
419         # Domains (and domains in them) without support for dns-0x20 and
420         # the fallback fails because they keep sending different answers.
421         # caps-whitelist: "licdn.com"
422         # caps-whitelist: "senderbase.org"
423
424         # Enforce privacy of these addresses. Strips them away from answers.
425         # It may cause DNSSEC validation to additionally mark it as bogus.
426         # Protects against 'DNS Rebinding' (uses browser as network proxy).
427         # Only 'private-domain' and 'local-data' names are allowed to have
428         # these private addresses. No default.
429         # private-address: 10.0.0.0/8
430         # private-address: 172.16.0.0/12
431         # private-address: 192.168.0.0/16
432         # private-address: 169.254.0.0/16
433         # private-address: fd00::/8
434         # private-address: fe80::/10
435         # private-address: ::ffff:0:0/96
436
437         # Allow the domain (and its subdomains) to contain private addresses.
438         # local-data statements are allowed to contain private addresses too.
439         # private-domain: "example.com"
440
441         # If nonzero, unwanted replies are not only reported in statistics,
442         # but also a running total is kept per thread. If it reaches the
443         # threshold, a warning is printed and a defensive action is taken,
444         # the cache is cleared to flush potential poison out of it.
445         # A suggested value is 10000000, the default is 0 (turned off).
446         # unwanted-reply-threshold: 0
447
448         # Do not query the following addresses. No DNS queries are sent there.
449         # List one address per entry. List classless netblocks with /size,
450         # do-not-query-address: 127.0.0.1/8
451         # do-not-query-address: ::1
452
453         # if yes, the above default do-not-query-address entries are present.
454         # if no, localhost can be queried (for testing and debugging).
455         # do-not-query-localhost: yes
456
457         # if yes, perform prefetching of almost expired message cache entries.
458         # prefetch: no
459
460         # if yes, perform key lookups adjacent to normal lookups.
461         # prefetch-key: no
462
463         # deny queries of type ANY with an empty response.
464         # deny-any: no
465
466         # if yes, Unbound rotates RRSet order in response.
467         # rrset-roundrobin: no
468
469         # if yes, Unbound doesn't insert authority/additional sections
470         # into response messages when those sections are not required.
471         # minimal-responses: yes
472
473         # true to disable DNSSEC lameness check in iterator.
474         # disable-dnssec-lame-check: no
475
476         # module configuration of the server. A string with identifiers
477         # separated by spaces. Syntax: "[dns64] [validator] iterator"
478         # module-config: "validator iterator"
479
480         # File with trusted keys, kept uptodate using RFC5011 probes,
481         # initial file like trust-anchor-file, then it stores metadata.
482         # Use several entries, one per domain name, to track multiple zones.
483         #
484         # If you want to perform DNSSEC validation, run unbound-anchor before
485         # you start unbound (i.e. in the system boot scripts).  And enable:
486         # Please note usage of unbound-anchor root anchor is at your own risk
487         # and under the terms of our LICENSE (see that file in the source).
488         # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
489
490         # trust anchor signaling sends a RFC8145 key tag query after priming.
491         # trust-anchor-signaling: yes
492         
493         # Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel)
494         # root-key-sentinel: yes
495
496         # File with DLV trusted keys. Same format as trust-anchor-file.
497         # There can be only one DLV configured, it is trusted from root down.
498         # DLV is going to be decommissioned.  Please do not use it any more.
499         # dlv-anchor-file: "dlv.isc.org.key"
500
501         # File with trusted keys for validation. Specify more than one file
502         # with several entries, one file per entry.
503         # Zone file format, with DS and DNSKEY entries.
504         # Note this gets out of date, use auto-trust-anchor-file please.
505         # trust-anchor-file: ""
506
507         # Trusted key for validation. DS or DNSKEY. specify the RR on a
508         # single line, surrounded by "". TTL is ignored. class is IN default.
509         # Note this gets out of date, use auto-trust-anchor-file please.
510         # (These examples are from August 2007 and may not be valid anymore).
511         # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
512         # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
513
514         # File with trusted keys for validation. Specify more than one file
515         # with several entries, one file per entry. Like trust-anchor-file
516         # but has a different file format. Format is BIND-9 style format,
517         # the trusted-keys { name flag proto algo "key"; }; clauses are read.
518         # you need external update procedures to track changes in keys.
519         # trusted-keys-file: ""
520
521         # Ignore chain of trust. Domain is treated as insecure.
522         # domain-insecure: "example.com"
523
524         # Override the date for validation with a specific fixed date.
525         # Do not set this unless you are debugging signature inception
526         # and expiration. "" or "0" turns the feature off. -1 ignores date.
527         # val-override-date: ""
528
529         # The time to live for bogus data, rrsets and messages. This avoids
530         # some of the revalidation, until the time interval expires. in secs.
531         # val-bogus-ttl: 60
532
533         # The signature inception and expiration dates are allowed to be off
534         # by 10% of the signature lifetime (expir-incep) from our local clock.
535         # This leeway is capped with a minimum and a maximum.  In seconds.
536         # val-sig-skew-min: 3600
537         # val-sig-skew-max: 86400
538
539         # Should additional section of secure message also be kept clean of
540         # unsecure data. Useful to shield the users of this validator from
541         # potential bogus data in the additional section. All unsigned data
542         # in the additional section is removed from secure messages.
543         # val-clean-additional: yes
544
545         # Turn permissive mode on to permit bogus messages. Thus, messages
546         # for which security checks failed will be returned to clients,
547         # instead of SERVFAIL. It still performs the security checks, which
548         # result in interesting log files and possibly the AD bit in
549         # replies if the message is found secure. The default is off.
550         # val-permissive-mode: no
551
552         # Ignore the CD flag in incoming queries and refuse them bogus data.
553         # Enable it if the only clients of unbound are legacy servers (w2008)
554         # that set CD but cannot validate themselves.
555         # ignore-cd-flag: no
556
557         # Serve expired responses from cache, with TTL 0 in the response,
558         # and then attempt to fetch the data afresh.
559         # serve-expired: no
560         #
561         # Limit serving of expired responses to configured seconds after
562         # expiration. 0 disables the limit.
563         # serve-expired-ttl: 0
564         #
565         # Set the TTL of expired records to the serve-expired-ttl value after a
566         # failed attempt to retrieve the record from upstream. This makes sure
567         # that the expired records will be served as long as there are queries
568         # for it.
569         # serve-expired-ttl-reset: no
570
571         # Have the validator log failed validations for your diagnosis.
572         # 0: off. 1: A line per failed user query. 2: With reason and bad IP.
573         # val-log-level: 0
574
575         # It is possible to configure NSEC3 maximum iteration counts per
576         # keysize. Keep this table very short, as linear search is done.
577         # A message with an NSEC3 with larger count is marked insecure.
578         # List in ascending order the keysize and count values.
579         # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
580
581         # instruct the auto-trust-anchor-file probing to add anchors after ttl.
582         # add-holddown: 2592000 # 30 days
583
584         # instruct the auto-trust-anchor-file probing to del anchors after ttl.
585         # del-holddown: 2592000 # 30 days
586
587         # auto-trust-anchor-file probing removes missing anchors after ttl.
588         # If the value 0 is given, missing anchors are not removed.
589         # keep-missing: 31622400 # 366 days
590
591         # debug option that allows very small holddown times for key rollover,
592         # otherwise the RFC mandates probe intervals must be at least 1 hour.
593         # permit-small-holddown: no
594
595         # the amount of memory to use for the key cache.
596         # plain value in bytes or you can append k, m or G. default is "4Mb".
597         # key-cache-size: 4m
598
599         # the number of slabs to use for the key cache.
600         # the number of slabs must be a power of 2.
601         # more slabs reduce lock contention, but fragment memory usage.
602         # key-cache-slabs: 4
603
604         # the amount of memory to use for the negative cache (used for DLV).
605         # plain value in bytes or you can append k, m or G. default is "1Mb".
606         # neg-cache-size: 1m
607
608         # By default, for a number of zones a small default 'nothing here'
609         # reply is built-in.  Query traffic is thus blocked.  If you
610         # wish to serve such zone you can unblock them by uncommenting one
611         # of the nodefault statements below.
612         # You may also have to use domain-insecure: zone to make DNSSEC work,
613         # unless you have your own trust anchors for this zone.
614         # local-zone: "localhost." nodefault
615         # local-zone: "127.in-addr.arpa." nodefault
616         # local-zone: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault
617         # local-zone: "onion." nodefault
618         # local-zone: "test." nodefault
619         # local-zone: "invalid." nodefault
620         # local-zone: "10.in-addr.arpa." nodefault
621         # local-zone: "16.172.in-addr.arpa." nodefault
622         # local-zone: "17.172.in-addr.arpa." nodefault
623         # local-zone: "18.172.in-addr.arpa." nodefault
624         # local-zone: "19.172.in-addr.arpa." nodefault
625         # local-zone: "20.172.in-addr.arpa." nodefault
626         # local-zone: "21.172.in-addr.arpa." nodefault
627         # local-zone: "22.172.in-addr.arpa." nodefault
628         # local-zone: "23.172.in-addr.arpa." nodefault
629         # local-zone: "24.172.in-addr.arpa." nodefault
630         # local-zone: "25.172.in-addr.arpa." nodefault
631         # local-zone: "26.172.in-addr.arpa." nodefault
632         # local-zone: "27.172.in-addr.arpa." nodefault
633         # local-zone: "28.172.in-addr.arpa." nodefault
634         # local-zone: "29.172.in-addr.arpa." nodefault
635         # local-zone: "30.172.in-addr.arpa." nodefault
636         # local-zone: "31.172.in-addr.arpa." nodefault
637         # local-zone: "168.192.in-addr.arpa." nodefault
638         # local-zone: "0.in-addr.arpa." nodefault
639         # local-zone: "254.169.in-addr.arpa." nodefault
640         # local-zone: "2.0.192.in-addr.arpa." nodefault
641         # local-zone: "100.51.198.in-addr.arpa." nodefault
642         # local-zone: "113.0.203.in-addr.arpa." nodefault
643         # local-zone: "255.255.255.255.in-addr.arpa." nodefault
644         # local-zone: "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault
645         # local-zone: "d.f.ip6.arpa." nodefault
646         # local-zone: "8.e.f.ip6.arpa." nodefault
647         # local-zone: "9.e.f.ip6.arpa." nodefault
648         # local-zone: "a.e.f.ip6.arpa." nodefault
649         # local-zone: "b.e.f.ip6.arpa." nodefault
650         # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
651         # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa.
652
653         # If unbound is running service for the local host then it is useful
654         # to perform lan-wide lookups to the upstream, and unblock the
655         # long list of local-zones above.  If this unbound is a dns server
656         # for a network of computers, disabled is better and stops information
657         # leakage of local lan information.
658         # unblock-lan-zones: no
659
660         # The insecure-lan-zones option disables validation for
661         # these zones, as if they were all listed as domain-insecure.
662         # insecure-lan-zones: no
663
664         # a number of locally served zones can be configured.
665         #       local-zone: <zone> <type>
666         #       local-data: "<resource record string>"
667         # o deny serves local data (if any), else, drops queries.
668         # o refuse serves local data (if any), else, replies with error.
669         # o static serves local data, else, nxdomain or nodata answer.
670         # o transparent gives local data, but resolves normally for other names
671         # o redirect serves the zone data for any subdomain in the zone.
672         # o nodefault can be used to normally resolve AS112 zones.
673         # o typetransparent resolves normally for other types and other names
674         # o inform acts like transparent, but logs client IP address
675         # o inform_deny drops queries and logs client IP address
676         # o always_transparent, always_refuse, always_nxdomain, resolve in
677         #   that way but ignore local data for that name
678         # o noview breaks out of that view towards global local-zones.
679         #
680         # defaults are localhost address, reverse for 127.0.0.1 and ::1
681         # and nxdomain for AS112 zones. If you configure one of these zones
682         # the default content is omitted, or you can omit it with 'nodefault'.
683         #
684         # If you configure local-data without specifying local-zone, by
685         # default a transparent local-zone is created for the data.
686         #
687         # You can add locally served data with
688         # local-zone: "local." static
689         # local-data: "mycomputer.local. IN A 192.0.2.51"
690         # local-data: 'mytext.local TXT "content of text record"'
691         #
692         # You can override certain queries with
693         # local-data: "adserver.example.com A 127.0.0.1"
694         #
695         # You can redirect a domain to a fixed address with
696         # (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
697         # local-zone: "example.com" redirect
698         # local-data: "example.com A 192.0.2.3"
699         #
700         # Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
701         # You can also add PTR records using local-data directly, but then
702         # you need to do the reverse notation yourself.
703         # local-data-ptr: "192.0.2.3 www.example.com"
704
705         # tag a localzone with a list of tag names (in "" with spaces between)
706         # local-zone-tag: "example.com" "tag2 tag3"
707
708         # add a netblock specific override to a localzone, with zone type
709         # local-zone-override: "example.com" 192.0.2.0/24 refuse
710
711         # service clients over TLS (on the TCP sockets), with plain DNS inside
712         # the TLS stream.  Give the certificate to use and private key.
713         # default is "" (disabled).  requires restart to take effect.
714         # tls-service-key: "path/to/privatekeyfile.key"
715         # tls-service-pem: "path/to/publiccertfile.pem"
716         # tls-port: 853
717
718         # cipher setting for TLSv1.2
719         # tls-ciphers: "DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256"
720         # cipher setting for TLSv1.3 
721         # tls-ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256"
722
723         # Add the secret file for TLS Session Ticket.
724         # Secret file must be 80 bytes of random data.
725         # First key use to encrypt and decrypt TLS session tickets.
726         # Other keys use to decrypt only.
727         # requires restart to take effect.
728         # tls-session-ticket-keys: "path/to/secret_file1"
729         # tls-session-ticket-keys: "path/to/secret_file2"
730
731         # request upstream over TLS (with plain DNS inside the TLS stream).
732         # Default is no.  Can be turned on and off with unbound-control.
733         # tls-upstream: no
734
735         # Certificates used to authenticate connections made upstream.
736         # tls-cert-bundle: ""
737
738         # Add system certs to the cert bundle, from the Windows Cert Store
739         # tls-win-cert: no
740
741         # Also serve tls on these port numbers (eg. 443, ...), by listing
742         # tls-additional-port: portno for each of the port numbers.
743
744         # DNS64 prefix. Must be specified when DNS64 is use.
745         # Enable dns64 in module-config.  Used to synthesize IPv6 from IPv4.
746         # dns64-prefix: 64:ff9b::0/96
747
748         # DNS64 ignore AAAA records for these domains and use A instead.
749         # dns64-ignore-aaaa: "example.com"
750
751         # ratelimit for uncached, new queries, this limits recursion effort.
752         # ratelimiting is experimental, and may help against randomqueryflood.
753         # if 0(default) it is disabled, otherwise state qps allowed per zone.
754         # ratelimit: 0
755
756         # ratelimits are tracked in a cache, size in bytes of cache (or k,m).
757         # ratelimit-size: 4m
758         # ratelimit cache slabs, reduces lock contention if equal to cpucount.
759         # ratelimit-slabs: 4
760
761         # 0 blocks when ratelimited, otherwise let 1/xth traffic through
762         # ratelimit-factor: 10
763
764         # override the ratelimit for a specific domain name.
765         # give this setting multiple times to have multiple overrides.
766         # ratelimit-for-domain: example.com 1000
767         # override the ratelimits for all domains below a domain name
768         # can give this multiple times, the name closest to the zone is used.
769         # ratelimit-below-domain: com 1000
770
771         # global query ratelimit for all ip addresses.
772         # feature is experimental.
773         # if 0(default) it is disabled, otherwise states qps allowed per ip address
774         # ip-ratelimit: 0
775
776         # ip ratelimits are tracked in a cache, size in bytes of cache (or k,m).
777         # ip-ratelimit-size: 4m
778         # ip ratelimit cache slabs, reduces lock contention if equal to cpucount.
779         # ip-ratelimit-slabs: 4
780
781         # 0 blocks when ip is ratelimited, otherwise let 1/xth traffic through
782         # ip-ratelimit-factor: 10
783
784         # Limit the number of connections simultaneous from a netblock
785         # tcp-connection-limit: 192.0.2.0/24 12
786
787         # select from the fastest servers this many times out of 1000. 0 means
788         # the fast server select is disabled. prefetches are not sped up.
789         # fast-server-permil: 0
790         # the number of servers that will be used in the fast server selection.
791         # fast-server-num: 3
792         
793         # Specific options for ipsecmod. unbound needs to be configured with
794         # --enable-ipsecmod for these to take effect.
795         #
796         # Enable or disable ipsecmod (it still needs to be defined in
797         # module-config above). Can be used when ipsecmod needs to be
798         # enabled/disabled via remote-control(below).
799         # ipsecmod-enabled: yes
800         #
801         # Path to executable external hook. It must be defined when ipsecmod is
802         # listed in module-config (above).
803         # ipsecmod-hook: "./my_executable"
804         #
805         # When enabled unbound will reply with SERVFAIL if the return value of
806         # the ipsecmod-hook is not 0.
807         # ipsecmod-strict: no
808         #
809         # Maximum time to live (TTL) for cached A/AAAA records with IPSECKEY.
810         # ipsecmod-max-ttl: 3600
811         #
812         # Reply with A/AAAA even if the relevant IPSECKEY is bogus. Mainly used for
813         # testing.
814         # ipsecmod-ignore-bogus: no
815         #
816         # Domains for which ipsecmod will be triggered. If not defined (default)
817         # all domains are treated as being whitelisted.
818         # ipsecmod-whitelist: "example.com"
819         # ipsecmod-whitelist: "nlnetlabs.nl"
820
821
822 # Python config section. To enable:
823 # o use --with-pythonmodule to configure before compiling.
824 # o list python in the module-config string (above) to enable.
825 # o and give a python-script to run.
826 python:
827         # Script file to load
828         # python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py"
829
830 # Remote control config section.
831 remote-control:
832         # Enable remote control with unbound-control(8) here.
833         # set up the keys and certificates with unbound-control-setup.
834         # control-enable: no
835
836         # what interfaces are listened to for remote control.
837         # give 0.0.0.0 and ::0 to listen to all interfaces.
838         # set to an absolute path to use a unix local name pipe, certificates
839         # are not used for that, so key and cert files need not be present.
840         # control-interface: 127.0.0.1
841         # control-interface: ::1
842
843         # port number for remote control operations.
844         # control-port: 8953
845
846         # for localhost, you can disable use of TLS by setting this to "no"
847         # For local sockets this option is ignored, and TLS is not used.
848         # control-use-cert: "yes"
849
850         # unbound server key file.
851         # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key"
852
853         # unbound server certificate file.
854         # server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem"
855
856         # unbound-control key file.
857         # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key"
858
859         # unbound-control certificate file.
860         # control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem"
861
862 # Stub zones.
863 # Create entries like below, to make all queries for 'example.com' and
864 # 'example.org' go to the given list of nameservers. list zero or more
865 # nameservers by hostname or by ipaddress. If you set stub-prime to yes,
866 # the list is treated as priming hints (default is no).
867 # With stub-first yes, it attempts without the stub if it fails.
868 # Consider adding domain-insecure: name and local-zone: name nodefault
869 # to the server: section if the stub is a locally served zone.
870 # stub-zone:
871 #       name: "example.com"
872 #       stub-addr: 192.0.2.68
873 #       stub-prime: no
874 #       stub-first: no
875 #       stub-tls-upstream: no
876 #       stub-no-cache: no
877 # stub-zone:
878 #       name: "example.org"
879 #       stub-host: ns.example.com.
880
881 # Forward zones
882 # Create entries like below, to make all queries for 'example.com' and
883 # 'example.org' go to the given list of servers. These servers have to handle
884 # recursion to other nameservers. List zero or more nameservers by hostname
885 # or by ipaddress. Use an entry with name "." to forward all queries.
886 # If you enable forward-first, it attempts without the forward if it fails.
887 # forward-zone:
888 #       name: "example.com"
889 #       forward-addr: 192.0.2.68
890 #       forward-addr: 192.0.2.73@5355  # forward to port 5355.
891 #       forward-first: no
892 #       forward-tls-upstream: no
893 #       forward-no-cache: no
894 # forward-zone:
895 #       name: "example.org"
896 #       forward-host: fwd.example.com
897
898 # Authority zones
899 # The data for these zones is kept locally, from a file or downloaded.
900 # The data can be served to downstream clients, or used instead of the
901 # upstream (which saves a lookup to the upstream).  The first example
902 # has a copy of the root for local usage.  The second serves example.org
903 # authoritatively.  zonefile: reads from file (and writes to it if you also
904 # download it), master: fetches with AXFR and IXFR, or url to zonefile.
905 # With allow-notify: you can give additional (apart from masters) sources of
906 # notifies.
907 # auth-zone:
908 #       name: "."
909 #       master: 199.9.14.201         # b.root-servers.net       
910 #       master: 192.33.4.12          # c.root-servers.net       
911 #       master: 199.7.91.13          # d.root-servers.net       
912 #       master: 192.5.5.241          # f.root-servers.net       
913 #       master: 192.112.36.4         # g.root-servers.net       
914 #       master: 193.0.14.129         # k.root-servers.net       
915 #       master: 192.0.47.132         # xfr.cjr.dns.icann.org    
916 #       master: 192.0.32.132         # xfr.lax.dns.icann.org    
917 #       master: 2001:500:200::b      # b.root-servers.net       
918 #       master: 2001:500:2::c        # c.root-servers.net       
919 #       master: 2001:500:2d::d       # d.root-servers.net       
920 #       master: 2001:500:2f::f       # f.root-servers.net       
921 #       master: 2001:500:12::d0d     # g.root-servers.net       
922 #       master: 2001:7fd::1          # k.root-servers.net       
923 #       master: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org    
924 #       master: 2620:0:2d0:202::132  # xfr.lax.dns.icann.org    
925 #       fallback-enabled: yes   
926 #       for-downstream: no      
927 #       for-upstream: yes
928 # auth-zone:
929 #       name: "example.org"
930 #       for-downstream: yes
931 #       for-upstream: yes
932 #       zonefile: "example.org.zone"
933
934 # Views
935 # Create named views. Name must be unique. Map views to requests using
936 # the access-control-view option. Views can contain zero or more local-zone
937 # and local-data options. Options from matching views will override global
938 # options. Global options will be used if no matching view is found.
939 # With view-first yes, it will try to answer using the global local-zone and
940 # local-data elements if there is no view specific match.
941 # view:
942 #       name: "viewname"
943 #       local-zone: "example.com" redirect
944 #       local-data: "example.com A 192.0.2.3"
945 #       local-data-ptr: "192.0.2.3 www.example.com"
946 #       view-first: no
947 # view:
948 #       name: "anotherview"
949 #       local-zone: "example.com" refuse
950
951 # DNSCrypt
952 # Caveats:
953 # 1. the keys/certs cannot be produced by unbound. You can use dnscrypt-wrapper
954 #   for this: https://github.com/cofyc/dnscrypt-wrapper/blob/master/README.md#usage
955 # 2. dnscrypt channel attaches to an interface. you MUST set interfaces to
956 #   listen on `dnscrypt-port` with the follo0wing snippet:
957 # server:
958 #     interface: 0.0.0.0@443
959 #     interface: ::0@443
960 #
961 # Finally, `dnscrypt` config has its own section.
962 # dnscrypt:
963 #     dnscrypt-enable: yes
964 #     dnscrypt-port: 443
965 #     dnscrypt-provider: 2.dnscrypt-cert.example.com.
966 #     dnscrypt-secret-key: /path/unbound-conf/keys1/1.key
967 #     dnscrypt-secret-key: /path/unbound-conf/keys2/1.key
968 #     dnscrypt-provider-cert: /path/unbound-conf/keys1/1.cert
969 #     dnscrypt-provider-cert: /path/unbound-conf/keys2/1.cert
970
971 # CacheDB
972 # Enable external backend DB as auxiliary cache.  Specify the backend name
973 # (default is "testframe", which has no use other than for debugging and
974 # testing) and backend-specific options.  The 'cachedb' module must be
975 # included in module-config.
976 # cachedb:
977 #     backend: "testframe"
978 #     # secret seed string to calculate hashed keys
979 #     secret-seed: "default"
980 #
981 #     # For "redis" backend:
982 #     # redis server's IP address or host name
983 #     redis-server-host: 127.0.0.1
984 #     # redis server's TCP port
985 #     redis-server-port: 6379
986 #     # timeout (in ms) for communication with the redis server
987 #     redis-timeout: 100