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