]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unbound/doc/example.conf
Upgrade Unbound to 1.6.4. More to follow.
[FreeBSD/FreeBSD.git] / contrib / unbound / doc / example.conf
1 #
2 # Example configuration file.
3 #
4 # See unbound.conf(5) man page, version 1.6.4.
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: no
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). 1480 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         # buffer size for handling DNS data. No messages larger than this
127         # size can be sent or received, by UDP or TCP. In bytes.
128         # msg-buffer-size: 65552
129
130         # the amount of memory to use for the message cache.
131         # plain value in bytes or you can append k, m or G. default is "4Mb".
132         # msg-cache-size: 4m
133
134         # the number of slabs to use for the message cache.
135         # the number of slabs must be a power of 2.
136         # more slabs reduce lock contention, but fragment memory usage.
137         # msg-cache-slabs: 4
138
139         # the number of queries that a thread gets to service.
140         # num-queries-per-thread: 1024
141
142         # if very busy, 50% queries run to completion, 50% get timeout in msec
143         # jostle-timeout: 200
144
145         # msec to wait before close of port on timeout UDP. 0 disables.
146         # delay-close: 0
147
148         # the amount of memory to use for the RRset cache.
149         # plain value in bytes or you can append k, m or G. default is "4Mb".
150         # rrset-cache-size: 4m
151
152         # the number of slabs to use for the RRset cache.
153         # the number of slabs must be a power of 2.
154         # more slabs reduce lock contention, but fragment memory usage.
155         # rrset-cache-slabs: 4
156
157         # the time to live (TTL) value lower bound, in seconds. Default 0.
158         # If more than an hour could easily give trouble due to stale data.
159         # cache-min-ttl: 0
160
161         # the time to live (TTL) value cap for RRsets and messages in the
162         # cache. Items are not cached for longer. In seconds.
163         # cache-max-ttl: 86400
164
165         # the time to live (TTL) value cap for negative responses in the cache
166         # cache-max-negative-ttl: 3600
167
168         # the time to live (TTL) value for cached roundtrip times, lameness and
169         # EDNS version information for hosts. In seconds.
170         # infra-host-ttl: 900
171
172         # minimum wait time for responses, increase if uplink is long. In msec.
173         # infra-cache-min-rtt: 50
174
175         # the number of slabs to use for the Infrastructure cache.
176         # the number of slabs must be a power of 2.
177         # more slabs reduce lock contention, but fragment memory usage.
178         # infra-cache-slabs: 4
179
180         # the maximum number of hosts that are cached (roundtrip, EDNS, lame).
181         # infra-cache-numhosts: 10000
182
183         # define a number of tags here, use with local-zone, access-control.
184         # repeat the define-tag statement to add additional tags.
185         # define-tag: "tag1 tag2 tag3"
186
187         # Enable IPv4, "yes" or "no".
188         # do-ip4: yes
189
190         # Enable IPv6, "yes" or "no".
191         # do-ip6: yes
192
193         # Enable UDP, "yes" or "no".
194         # do-udp: yes
195
196         # Enable TCP, "yes" or "no".
197         # do-tcp: yes
198
199         # upstream connections use TCP only (and no UDP), "yes" or "no"
200         # useful for tunneling scenarios, default no.
201         # tcp-upstream: no
202
203         # Maximum segment size (MSS) of TCP socket on which the server
204         # responds to queries. Default is 0, system default MSS.
205         # tcp-mss: 0
206
207         # Maximum segment size (MSS) of TCP socket for outgoing queries.
208         # Default is 0, system default MSS.
209         # outgoing-tcp-mss: 0
210
211         # Use systemd socket activation for UDP, TCP, and control sockets.
212         # use-systemd: no
213
214         # Detach from the terminal, run in background, "yes" or "no".
215         # Set the value to "no" when unbound runs as systemd service.
216         # do-daemonize: yes
217
218         # control which clients are allowed to make (recursive) queries
219         # to this server. Specify classless netblocks with /size and action.
220         # By default everything is refused, except for localhost.
221         # Choose deny (drop message), refuse (polite error reply),
222         # allow (recursive ok), allow_snoop (recursive and nonrecursive ok)
223         # deny_non_local (drop queries unless can be answered from local-data)
224         # refuse_non_local (like deny_non_local but polite error reply).
225         # access-control: 0.0.0.0/0 refuse
226         # access-control: 127.0.0.0/8 allow
227         # access-control: ::0/0 refuse
228         # access-control: ::1 allow
229         # access-control: ::ffff:127.0.0.1 allow
230
231         # tag access-control with list of tags (in "" with spaces between)
232         # Clients using this access control element use localzones that
233         # are tagged with one of these tags.
234         # access-control-tag: 192.0.2.0/24 "tag2 tag3"
235
236         # set action for particular tag for given access control element
237         # if you have multiple tag values, the tag used to lookup the action
238         # is the first tag match between access-control-tag and local-zone-tag
239         # where "first" comes from the order of the define-tag values.
240         # access-control-tag-action: 192.0.2.0/24 tag3 refuse
241
242         # set redirect data for particular tag for access control element
243         # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1"
244
245         # Set view for access control element
246         # access-control-view: 192.0.2.0/24 viewname
247
248         # if given, a chroot(2) is done to the given directory.
249         # i.e. you can chroot to the working directory, for example,
250         # for extra security, but make sure all files are in that directory.
251         #
252         # If chroot is enabled, you should pass the configfile (from the
253         # commandline) as a full path from the original root. After the
254         # chroot has been performed the now defunct portion of the config
255         # file path is removed to be able to reread the config after a reload.
256         #
257         # All other file paths (working dir, logfile, roothints, and
258         # key files) can be specified in several ways:
259         #       o as an absolute path relative to the new root.
260         #       o as a relative path to the working directory.
261         #       o as an absolute path relative to the original root.
262         # In the last case the path is adjusted to remove the unused portion.
263         #
264         # The pid file can be absolute and outside of the chroot, it is
265         # written just prior to performing the chroot and dropping permissions.
266         #
267         # Additionally, unbound may need to access /dev/random (for entropy).
268         # How to do this is specific to your OS.
269         #
270         # If you give "" no chroot is performed. The path must not end in a /.
271         # chroot: "/var/unbound"
272
273         # if given, user privileges are dropped (after binding port),
274         # and the given username is assumed. Default is user "unbound".
275         # If you give "" no privileges are dropped.
276         # username: "unbound"
277
278         # the working directory. The relative files in this config are
279         # relative to this directory. If you give "" the working directory
280         # is not changed.
281         # If you give a server: directory: dir before include: file statements
282         # then those includes can be relative to the working directory.
283         # directory: "/var/unbound"
284
285         # the log file, "" means log to stderr.
286         # Use of this option sets use-syslog to "no".
287         # logfile: ""
288
289         # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
290         # log to. If yes, it overrides the logfile.
291         # use-syslog: yes
292
293         # Log identity to report. if empty, defaults to the name of argv[0]
294         # (usually "unbound").
295         # log-identity: ""
296
297         # print UTC timestamp in ascii to logfile, default is epoch in seconds.
298         # log-time-ascii: no
299
300         # print one line with time, IP, name, type, class for every query.
301         # log-queries: no
302
303         # print one line per reply, with time, IP, name, type, class, rcode,
304         # timetoresolve, fromcache and responsesize.
305         # log-replies: no
306
307         # the pid file. Can be an absolute path outside of chroot/work dir.
308         # pidfile: "/var/unbound/unbound.pid"
309
310         # file to read root hints from.
311         # get one from https://www.internic.net/domain/named.cache
312         # root-hints: ""
313
314         # enable to not answer id.server and hostname.bind queries.
315         # hide-identity: no
316
317         # enable to not answer version.server and version.bind queries.
318         # hide-version: no
319         
320         # enable to not answer trustanchor.unbound queries.
321         # hide-trustanchor: no
322
323         # the identity to report. Leave "" or default to return hostname.
324         # identity: ""
325
326         # the version to report. Leave "" or default to return package version.
327         # version: ""
328
329         # the target fetch policy.
330         # series of integers describing the policy per dependency depth.
331         # The number of values in the list determines the maximum dependency
332         # depth the recursor will pursue before giving up. Each integer means:
333         #       -1 : fetch all targets opportunistically,
334         #       0: fetch on demand,
335         #       positive value: fetch that many targets opportunistically.
336         # Enclose the list of numbers between quotes ("").
337         # target-fetch-policy: "3 2 1 0 0"
338
339         # Harden against very small EDNS buffer sizes.
340         # harden-short-bufsize: no
341
342         # Harden against unseemly large queries.
343         # harden-large-queries: no
344
345         # Harden against out of zone rrsets, to avoid spoofing attempts.
346         # harden-glue: yes
347
348         # Harden against receiving dnssec-stripped data. If you turn it
349         # off, failing to validate dnskey data for a trustanchor will
350         # trigger insecure mode for that zone (like without a trustanchor).
351         # Default on, which insists on dnssec data for trust-anchored zones.
352         # harden-dnssec-stripped: yes
353
354         # Harden against queries that fall under dnssec-signed nxdomain names.
355         # harden-below-nxdomain: no
356
357         # Harden the referral path by performing additional queries for
358         # infrastructure data.  Validates the replies (if possible).
359         # Default off, because the lookups burden the server.  Experimental
360         # implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
361         # harden-referral-path: no
362
363         # Harden against algorithm downgrade when multiple algorithms are
364         # advertised in the DS record.  If no, allows the weakest algorithm
365         # to validate the zone.
366         # harden-algo-downgrade: no
367
368         # Sent minimum amount of information to upstream servers to enhance
369         # privacy. Only sent minimum required labels of the QNAME and set QTYPE
370         # to NS when possible.
371         # qname-minimisation: no
372
373         # QNAME minimisation in strict mode. Do not fall-back to sending full
374         # QNAME to potentially broken nameservers. A lot of domains will not be
375         # resolvable when this option in enabled.
376         # This option only has effect when qname-minimisation is enabled.
377         # qname-minimisation-strict: no
378
379         # Use 0x20-encoded random bits in the query to foil spoof attempts.
380         # This feature is an experimental implementation of draft dns-0x20.
381         # use-caps-for-id: no
382
383         # Domains (and domains in them) without support for dns-0x20 and
384         # the fallback fails because they keep sending different answers.
385         # caps-whitelist: "licdn.com"
386         # caps-whitelist: "senderbase.org"
387
388         # Enforce privacy of these addresses. Strips them away from answers.
389         # It may cause DNSSEC validation to additionally mark it as bogus.
390         # Protects against 'DNS Rebinding' (uses browser as network proxy).
391         # Only 'private-domain' and 'local-data' names are allowed to have
392         # these private addresses. No default.
393         # private-address: 10.0.0.0/8
394         # private-address: 172.16.0.0/12
395         # private-address: 192.168.0.0/16
396         # private-address: 169.254.0.0/16
397         # private-address: fd00::/8
398         # private-address: fe80::/10
399         # private-address: ::ffff:0:0/96
400
401         # Allow the domain (and its subdomains) to contain private addresses.
402         # local-data statements are allowed to contain private addresses too.
403         # private-domain: "example.com"
404
405         # If nonzero, unwanted replies are not only reported in statistics,
406         # but also a running total is kept per thread. If it reaches the
407         # threshold, a warning is printed and a defensive action is taken,
408         # the cache is cleared to flush potential poison out of it.
409         # A suggested value is 10000000, the default is 0 (turned off).
410         # unwanted-reply-threshold: 0
411
412         # Do not query the following addresses. No DNS queries are sent there.
413         # List one address per entry. List classless netblocks with /size,
414         # do-not-query-address: 127.0.0.1/8
415         # do-not-query-address: ::1
416
417         # if yes, the above default do-not-query-address entries are present.
418         # if no, localhost can be queried (for testing and debugging).
419         # do-not-query-localhost: yes
420
421         # if yes, perform prefetching of almost expired message cache entries.
422         # prefetch: no
423
424         # if yes, perform key lookups adjacent to normal lookups.
425         # prefetch-key: no
426
427         # if yes, Unbound rotates RRSet order in response.
428         # rrset-roundrobin: no
429
430         # if yes, Unbound doesn't insert authority/additional sections
431         # into response messages when those sections are not required.
432         # minimal-responses: no
433
434         # true to disable DNSSEC lameness check in iterator.
435         # disable-dnssec-lame-check: no
436
437         # module configuration of the server. A string with identifiers
438         # separated by spaces. Syntax: "[dns64] [validator] iterator"
439         # module-config: "validator iterator"
440
441         # File with trusted keys, kept uptodate using RFC5011 probes,
442         # initial file like trust-anchor-file, then it stores metadata.
443         # Use several entries, one per domain name, to track multiple zones.
444         #
445         # If you want to perform DNSSEC validation, run unbound-anchor before
446         # you start unbound (i.e. in the system boot scripts).  And enable:
447         # Please note usage of unbound-anchor root anchor is at your own risk
448         # and under the terms of our LICENSE (see that file in the source).
449         # auto-trust-anchor-file: "/var/unbound/root.key"
450
451         # trust anchor signaling sends a RFC8145 key tag query after priming.
452         # trust-anchor-signaling: no
453
454         # File with DLV trusted keys. Same format as trust-anchor-file.
455         # There can be only one DLV configured, it is trusted from root down.
456         # DLV is going to be decommissioned.  Please do not use it any more.
457         # dlv-anchor-file: "dlv.isc.org.key"
458
459         # File with trusted keys for validation. Specify more than one file
460         # with several entries, one file per entry.
461         # Zone file format, with DS and DNSKEY entries.
462         # Note this gets out of date, use auto-trust-anchor-file please.
463         # trust-anchor-file: ""
464
465         # Trusted key for validation. DS or DNSKEY. specify the RR on a
466         # single line, surrounded by "". TTL is ignored. class is IN default.
467         # Note this gets out of date, use auto-trust-anchor-file please.
468         # (These examples are from August 2007 and may not be valid anymore).
469         # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
470         # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
471
472         # File with trusted keys for validation. Specify more than one file
473         # with several entries, one file per entry. Like trust-anchor-file
474         # but has a different file format. Format is BIND-9 style format,
475         # the trusted-keys { name flag proto algo "key"; }; clauses are read.
476         # you need external update procedures to track changes in keys.
477         # trusted-keys-file: ""
478
479         # Ignore chain of trust. Domain is treated as insecure.
480         # domain-insecure: "example.com"
481
482         # Override the date for validation with a specific fixed date.
483         # Do not set this unless you are debugging signature inception
484         # and expiration. "" or "0" turns the feature off. -1 ignores date.
485         # val-override-date: ""
486
487         # The time to live for bogus data, rrsets and messages. This avoids
488         # some of the revalidation, until the time interval expires. in secs.
489         # val-bogus-ttl: 60
490
491         # The signature inception and expiration dates are allowed to be off
492         # by 10% of the signature lifetime (expir-incep) from our local clock.
493         # This leeway is capped with a minimum and a maximum.  In seconds.
494         # val-sig-skew-min: 3600
495         # val-sig-skew-max: 86400
496
497         # Should additional section of secure message also be kept clean of
498         # unsecure data. Useful to shield the users of this validator from
499         # potential bogus data in the additional section. All unsigned data
500         # in the additional section is removed from secure messages.
501         # val-clean-additional: yes
502
503         # Turn permissive mode on to permit bogus messages. Thus, messages
504         # for which security checks failed will be returned to clients,
505         # instead of SERVFAIL. It still performs the security checks, which
506         # result in interesting log files and possibly the AD bit in
507         # replies if the message is found secure. The default is off.
508         # val-permissive-mode: no
509
510         # Ignore the CD flag in incoming queries and refuse them bogus data.
511         # Enable it if the only clients of unbound are legacy servers (w2008)
512         # that set CD but cannot validate themselves.
513         # ignore-cd-flag: no
514
515         # Serve expired reponses from cache, with TTL 0 in the response,
516         # and then attempt to fetch the data afresh.
517         # serve-expired: no
518
519         # Have the validator log failed validations for your diagnosis.
520         # 0: off. 1: A line per failed user query. 2: With reason and bad IP.
521         # val-log-level: 0
522
523         # It is possible to configure NSEC3 maximum iteration counts per
524         # keysize. Keep this table very short, as linear search is done.
525         # A message with an NSEC3 with larger count is marked insecure.
526         # List in ascending order the keysize and count values.
527         # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
528
529         # instruct the auto-trust-anchor-file probing to add anchors after ttl.
530         # add-holddown: 2592000 # 30 days
531
532         # instruct the auto-trust-anchor-file probing to del anchors after ttl.
533         # del-holddown: 2592000 # 30 days
534
535         # auto-trust-anchor-file probing removes missing anchors after ttl.
536         # If the value 0 is given, missing anchors are not removed.
537         # keep-missing: 31622400 # 366 days
538
539         # debug option that allows very small holddown times for key rollover,
540         # otherwise the RFC mandates probe intervals must be at least 1 hour.
541         # permit-small-holddown: no
542
543         # the amount of memory to use for the key cache.
544         # plain value in bytes or you can append k, m or G. default is "4Mb".
545         # key-cache-size: 4m
546
547         # the number of slabs to use for the key cache.
548         # the number of slabs must be a power of 2.
549         # more slabs reduce lock contention, but fragment memory usage.
550         # key-cache-slabs: 4
551
552         # the amount of memory to use for the negative cache (used for DLV).
553         # plain value in bytes or you can append k, m or G. default is "1Mb".
554         # neg-cache-size: 1m
555
556         # By default, for a number of zones a small default 'nothing here'
557         # reply is built-in.  Query traffic is thus blocked.  If you
558         # wish to serve such zone you can unblock them by uncommenting one
559         # of the nodefault statements below.
560         # You may also have to use domain-insecure: zone to make DNSSEC work,
561         # unless you have your own trust anchors for this zone.
562         # local-zone: "localhost." nodefault
563         # local-zone: "127.in-addr.arpa." nodefault
564         # 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
565         # local-zone: "onion." nodefault
566         # local-zone: "10.in-addr.arpa." nodefault
567         # local-zone: "16.172.in-addr.arpa." nodefault
568         # local-zone: "17.172.in-addr.arpa." nodefault
569         # local-zone: "18.172.in-addr.arpa." nodefault
570         # local-zone: "19.172.in-addr.arpa." nodefault
571         # local-zone: "20.172.in-addr.arpa." nodefault
572         # local-zone: "21.172.in-addr.arpa." nodefault
573         # local-zone: "22.172.in-addr.arpa." nodefault
574         # local-zone: "23.172.in-addr.arpa." nodefault
575         # local-zone: "24.172.in-addr.arpa." nodefault
576         # local-zone: "25.172.in-addr.arpa." nodefault
577         # local-zone: "26.172.in-addr.arpa." nodefault
578         # local-zone: "27.172.in-addr.arpa." nodefault
579         # local-zone: "28.172.in-addr.arpa." nodefault
580         # local-zone: "29.172.in-addr.arpa." nodefault
581         # local-zone: "30.172.in-addr.arpa." nodefault
582         # local-zone: "31.172.in-addr.arpa." nodefault
583         # local-zone: "168.192.in-addr.arpa." nodefault
584         # local-zone: "0.in-addr.arpa." nodefault
585         # local-zone: "254.169.in-addr.arpa." nodefault
586         # local-zone: "2.0.192.in-addr.arpa." nodefault
587         # local-zone: "100.51.198.in-addr.arpa." nodefault
588         # local-zone: "113.0.203.in-addr.arpa." nodefault
589         # local-zone: "255.255.255.255.in-addr.arpa." nodefault
590         # 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
591         # local-zone: "d.f.ip6.arpa." nodefault
592         # local-zone: "8.e.f.ip6.arpa." nodefault
593         # local-zone: "9.e.f.ip6.arpa." nodefault
594         # local-zone: "a.e.f.ip6.arpa." nodefault
595         # local-zone: "b.e.f.ip6.arpa." nodefault
596         # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
597         # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa.
598
599         # If unbound is running service for the local host then it is useful
600         # to perform lan-wide lookups to the upstream, and unblock the
601         # long list of local-zones above.  If this unbound is a dns server
602         # for a network of computers, disabled is better and stops information
603         # leakage of local lan information.
604         # unblock-lan-zones: no
605
606         # The insecure-lan-zones option disables validation for
607         # these zones, as if they were all listed as domain-insecure.
608         # insecure-lan-zones: no
609
610         # a number of locally served zones can be configured.
611         #       local-zone: <zone> <type>
612         #       local-data: "<resource record string>"
613         # o deny serves local data (if any), else, drops queries.
614         # o refuse serves local data (if any), else, replies with error.
615         # o static serves local data, else, nxdomain or nodata answer.
616         # o transparent gives local data, but resolves normally for other names
617         # o redirect serves the zone data for any subdomain in the zone.
618         # o nodefault can be used to normally resolve AS112 zones.
619         # o typetransparent resolves normally for other types and other names
620         # o inform acts like transparent, but logs client IP address
621         # o inform_deny drops queries and logs client IP address
622         # o always_transparent, always_refuse, always_nxdomain, resolve in
623         #   that way but ignore local data for that name.
624         #
625         # defaults are localhost address, reverse for 127.0.0.1 and ::1
626         # and nxdomain for AS112 zones. If you configure one of these zones
627         # the default content is omitted, or you can omit it with 'nodefault'.
628         #
629         # If you configure local-data without specifying local-zone, by
630         # default a transparent local-zone is created for the data.
631         #
632         # You can add locally served data with
633         # local-zone: "local." static
634         # local-data: "mycomputer.local. IN A 192.0.2.51"
635         # local-data: 'mytext.local TXT "content of text record"'
636         #
637         # You can override certain queries with
638         # local-data: "adserver.example.com A 127.0.0.1"
639         #
640         # You can redirect a domain to a fixed address with
641         # (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
642         # local-zone: "example.com" redirect
643         # local-data: "example.com A 192.0.2.3"
644         #
645         # Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
646         # You can also add PTR records using local-data directly, but then
647         # you need to do the reverse notation yourself.
648         # local-data-ptr: "192.0.2.3 www.example.com"
649
650         # tag a localzone with a list of tag names (in "" with spaces between)
651         # local-zone-tag: "example.com" "tag2 tag3"
652
653         # add a netblock specific override to a localzone, with zone type
654         # local-zone-override: "example.com" 192.0.2.0/24 refuse
655
656         # service clients over SSL (on the TCP sockets), with plain DNS inside
657         # the SSL stream.  Give the certificate to use and private key.
658         # default is "" (disabled).  requires restart to take effect.
659         # ssl-service-key: "path/to/privatekeyfile.key"
660         # ssl-service-pem: "path/to/publiccertfile.pem"
661         # ssl-port: 853
662
663         # request upstream over SSL (with plain DNS inside the SSL stream).
664         # Default is no.  Can be turned on and off with unbound-control.
665         # ssl-upstream: no
666
667         # DNS64 prefix. Must be specified when DNS64 is use.
668         # Enable dns64 in module-config.  Used to synthesize IPv6 from IPv4.
669         # dns64-prefix: 64:ff9b::0/96
670
671         # ratelimit for uncached, new queries, this limits recursion effort.
672         # ratelimiting is experimental, and may help against randomqueryflood.
673         # if 0(default) it is disabled, otherwise state qps allowed per zone.
674         # ratelimit: 0
675
676         # ratelimits are tracked in a cache, size in bytes of cache (or k,m).
677         # ratelimit-size: 4m
678         # ratelimit cache slabs, reduces lock contention if equal to cpucount.
679         # ratelimit-slabs: 4
680
681         # 0 blocks when ratelimited, otherwise let 1/xth traffic through
682         # ratelimit-factor: 10
683
684         # override the ratelimit for a specific domain name.
685         # give this setting multiple times to have multiple overrides.
686         # ratelimit-for-domain: example.com 1000
687         # override the ratelimits for all domains below a domain name
688         # can give this multiple times, the name closest to the zone is used.
689         # ratelimit-below-domain: com 1000
690
691         # global query ratelimit for all ip addresses.
692         # feature is experimental.
693         # if 0(default) it is disabled, otherwise states qps allowed per ip address
694         # ip-ratelimit: 0
695
696         # ip ratelimits are tracked in a cache, size in bytes of cache (or k,m).
697         # ip-ratelimit-size: 4m
698         # ip ratelimit cache slabs, reduces lock contention if equal to cpucount.
699         # ip-ratelimit-slabs: 4
700
701         # 0 blocks when ip is ratelimited, otherwise let 1/xth traffic through
702         # ip-ratelimit-factor: 10
703
704         # Specific options for ipsecmod. unbound needs to be configured with
705         # --enable-ipsecmod for these to take effect.
706         #
707         # Enable or disable ipsecmod (it still needs to be defined in
708         # module-config above). Can be used when ipsecmod needs to be
709         # enabled/disabled via remote-control(below).
710         # ipsecmod-enabled: yes
711         #
712         # Path to executable external hook. It must be defined when ipsecmod is
713         # listed in module-config (above).
714         # ipsecmod-hook: "./my_executable"
715         #
716         # When enabled unbound will reply with SERVFAIL if the return value of
717         # the ipsecmod-hook is not 0.
718         # ipsecmod-strict: no
719         #
720         # Maximum time to live (TTL) for cached A/AAAA records with IPSECKEY.
721         # ipsecmod-max-ttl: 3600
722         #
723         # Reply with A/AAAA even if the relevant IPSECKEY is bogus. Mainly used for
724         # testing.
725         # ipsecmod-ignore-bogus: no
726         #
727         # Domains for which ipsecmod will be triggered. If not defined (default)
728         # all domains are treated as being whitelisted.
729         # ipsecmod-whitelist: "example.com"
730         # ipsecmod-whitelist: "nlnetlabs.nl"
731
732
733 # Python config section. To enable:
734 # o use --with-pythonmodule to configure before compiling.
735 # o list python in the module-config string (above) to enable.
736 # o and give a python-script to run.
737 python:
738         # Script file to load
739         # python-script: "/var/unbound/ubmodule-tst.py"
740
741 # Remote control config section.
742 remote-control:
743         # Enable remote control with unbound-control(8) here.
744         # set up the keys and certificates with unbound-control-setup.
745         # control-enable: no
746
747         # Set to no and use an absolute path as control-interface to use
748         # a unix local named pipe for unbound-control.
749         # control-use-cert: yes
750
751         # what interfaces are listened to for remote control.
752         # give 0.0.0.0 and ::0 to listen to all interfaces.
753         # control-interface: 127.0.0.1
754         # control-interface: ::1
755
756         # port number for remote control operations.
757         # control-port: 8953
758
759         # unbound server key file.
760         # server-key-file: "/var/unbound/unbound_server.key"
761
762         # unbound server certificate file.
763         # server-cert-file: "/var/unbound/unbound_server.pem"
764
765         # unbound-control key file.
766         # control-key-file: "/var/unbound/unbound_control.key"
767
768         # unbound-control certificate file.
769         # control-cert-file: "/var/unbound/unbound_control.pem"
770
771 # Stub zones.
772 # Create entries like below, to make all queries for 'example.com' and
773 # 'example.org' go to the given list of nameservers. list zero or more
774 # nameservers by hostname or by ipaddress. If you set stub-prime to yes,
775 # the list is treated as priming hints (default is no).
776 # With stub-first yes, it attempts without the stub if it fails.
777 # Consider adding domain-insecure: name and local-zone: name nodefault
778 # to the server: section if the stub is a locally served zone.
779 # stub-zone:
780 #       name: "example.com"
781 #       stub-addr: 192.0.2.68
782 #       stub-prime: no
783 #       stub-first: no
784 #       stub-ssl-upstream: no
785 # stub-zone:
786 #       name: "example.org"
787 #       stub-host: ns.example.com.
788
789 # Forward zones
790 # Create entries like below, to make all queries for 'example.com' and
791 # 'example.org' go to the given list of servers. These servers have to handle
792 # recursion to other nameservers. List zero or more nameservers by hostname
793 # or by ipaddress. Use an entry with name "." to forward all queries.
794 # If you enable forward-first, it attempts without the forward if it fails.
795 # forward-zone:
796 #       name: "example.com"
797 #       forward-addr: 192.0.2.68
798 #       forward-addr: 192.0.2.73@5355  # forward to port 5355.
799 #       forward-first: no
800 #       forward-ssl-upstream: no
801 # forward-zone:
802 #       name: "example.org"
803 #       forward-host: fwd.example.com
804
805 # Views
806 # Create named views. Name must be unique. Map views to requests using
807 # the access-control-view option. Views can contain zero or more local-zone
808 # and local-data options. Options from matching views will override global
809 # options. Global options will be used if no matching view is found.
810 # With view-first yes, it will try to answer using the global local-zone and
811 # local-data elements if there is no view specific match.
812 # view:
813 #       name: "viewname"
814 #       local-zone: "example.com" redirect
815 #       local-data: "example.com A 192.0.2.3"
816 #       local-data-ptr: "192.0.2.3 www.example.com"
817 #       view-first: no
818 # view:
819 #       name: "anotherview"
820 #       local-zone: "example.com" refuse
821
822 # DNSCrypt
823 # Caveats:
824 # 1. the keys/certs cannot be produced by unbound. You can use dnscrypt-wrapper
825 #   for this: https://github.com/cofyc/dnscrypt-wrapper/blob/master/README.md#usage
826 # 2. dnscrypt channel attaches to an interface. you MUST set interfaces to
827 #   listen on `dnscrypt-port` with the follo0wing snippet:
828 # server:
829 #     interface: 0.0.0.0@443
830 #     interface: ::0@443
831 #
832 # Finally, `dnscrypt` config has its own section.
833 # dnscrypt:
834 #     dnscrypt-enable: yes
835 #     dnscrypt-port: 443
836 #     dnscrypt-provider: 2.dnscrypt-cert.example.com.
837 #     dnscrypt-secret-key: /path/unbound-conf/keys1/1.key
838 #     dnscrypt-secret-key: /path/unbound-conf/keys2/1.key
839 #     dnscrypt-provider-cert: /path/unbound-conf/keys1/1.cert
840 #     dnscrypt-provider-cert: /path/unbound-conf/keys2/1.cert