xref: /freebsd/contrib/unbound/doc/example.conf.in (revision b670c9bafc0e31c7609969bf374b2e80bdc00211)
1#
2# Example configuration file.
3#
4# See unbound.conf(5) man page, version 1.23.0.
5#
6# this is a comment.
7
8# Use this anywhere in the file to include other text into this file.
9#include: "otherfile.conf"
10
11# Use this anywhere in the file to include other text, that explicitly starts a
12# clause, into this file. Text after this directive needs to start a clause.
13#include-toplevel: "otherfile.conf"
14
15# The server clause sets the main parameters.
16server:
17	# whitespace is not necessary, but looks cleaner.
18
19	# verbosity number, 0 is least verbose. 1 is default.
20	# verbosity: 1
21
22	# print statistics to the log (for every thread) every N seconds.
23	# Set to "" or 0 to disable. Default is disabled.
24	# statistics-interval: 0
25
26	# enable shm for stats, default no.  if you enable also enable
27	# statistics-interval, every time it also writes stats to the
28	# shared memory segment keyed with shm-key.
29	# shm-enable: no
30
31	# shm for stats uses this key, and key+1 for the shared mem segment.
32	# shm-key: 11777
33
34	# enable cumulative statistics, without clearing them after printing.
35	# statistics-cumulative: no
36
37	# enable extended statistics (query types, answer codes, status)
38	# printed from unbound-control. Default off, because of speed.
39	# extended-statistics: no
40
41	# Inhibits selected extended statistics (qtype, qclass, qopcode, rcode,
42	# rpz-actions) from printing if their value is 0.
43	# Default on.
44	# statistics-inhibit-zero: yes
45
46	# number of threads to create. 1 disables threading.
47	# num-threads: 1
48
49	# specify the interfaces to answer queries from by ip-address.
50	# The default is to listen to localhost (127.0.0.1 and ::1).
51	# specify 0.0.0.0 and ::0 to bind to all available interfaces.
52	# specify every interface[@port] on a new 'interface:' labelled line.
53	# The listen interfaces are not changed on reload, only on restart.
54	# interface: 192.0.2.153
55	# interface: 192.0.2.154
56	# interface: 192.0.2.154@5003
57	# interface: 2001:DB8::5
58	# interface: eth0@5003
59
60	# enable this feature to copy the source address of queries to reply.
61	# Socket options are not supported on all platforms. experimental.
62	# interface-automatic: no
63
64	# instead of the default port, open additional ports separated by
65	# spaces when interface-automatic is enabled, by listing them here.
66	# interface-automatic-ports: ""
67
68	# port to answer queries from
69	# port: 53
70
71	# specify the interfaces to send outgoing queries to authoritative
72	# server from by ip-address. If none, the default (all) interface
73	# is used. Specify every interface on a 'outgoing-interface:' line.
74	# outgoing-interface: 192.0.2.153
75	# outgoing-interface: 2001:DB8::5
76	# outgoing-interface: 2001:DB8::6
77
78	# Specify a netblock to use remainder 64 bits as random bits for
79	# upstream queries.  Uses freebind option (Linux).
80	# outgoing-interface: 2001:DB8::/64
81	# Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo
82	# And: ip -6 route add local 2001:db8::/64 dev lo
83	# And set prefer-ip6: yes to use the ip6 randomness from a netblock.
84	# Set this to yes to prefer ipv6 upstream servers over ipv4.
85	# prefer-ip6: no
86
87	# Prefer ipv4 upstream servers, even if ipv6 is available.
88	# prefer-ip4: no
89
90	# number of ports to allocate per thread, determines the size of the
91	# port range that can be open simultaneously.  About double the
92	# num-queries-per-thread, or, use as many as the OS will allow you.
93	# outgoing-range: 4096
94
95	# permit Unbound to use this port number or port range for
96	# making outgoing queries, using an outgoing interface.
97	# outgoing-port-permit: 32768
98
99	# deny Unbound the use this of port number or port range for
100	# making outgoing queries, using an outgoing interface.
101	# Use this to make sure Unbound does not grab a UDP port that some
102	# other server on this computer needs. The default is to avoid
103	# IANA-assigned port numbers.
104	# If multiple outgoing-port-permit and outgoing-port-avoid options
105	# are present, they are processed in order.
106	# outgoing-port-avoid: "3200-3208"
107
108	# number of outgoing simultaneous tcp buffers to hold per thread.
109	# outgoing-num-tcp: 10
110
111	# number of incoming simultaneous tcp buffers to hold per thread.
112	# incoming-num-tcp: 10
113
114	# buffer size for UDP port 53 incoming (SO_RCVBUF socket option).
115	# 0 is system default.  Use 4m to catch query spikes for busy servers.
116	# so-rcvbuf: 0
117
118	# buffer size for UDP port 53 outgoing (SO_SNDBUF socket option).
119	# 0 is system default.  Use 4m to handle spikes on very busy servers.
120	# so-sndbuf: 0
121
122	# use SO_REUSEPORT to distribute queries over threads.
123	# at extreme load it could be better to turn it off to distribute even.
124	# so-reuseport: yes
125
126	# use IP_TRANSPARENT so the interface: addresses can be non-local
127	# and you can config non-existing IPs that are going to work later on
128	# (uses IP_BINDANY on FreeBSD).
129	# ip-transparent: no
130
131	# use IP_FREEBIND so the interface: addresses can be non-local
132	# and you can bind to nonexisting IPs and interfaces that are down.
133	# Linux only.  On Linux you also have ip-transparent that is similar.
134	# ip-freebind: no
135
136	# the value of the Differentiated Services Codepoint (DSCP)
137	# in the differentiated services field (DS) of the outgoing
138	# IP packets
139	# ip-dscp: 0
140
141	# EDNS reassembly buffer to advertise to UDP peers (the actual buffer
142	# is set with msg-buffer-size).
143	# edns-buffer-size: 1232
144
145	# Maximum UDP response size (not applied to TCP response).
146	# Suggested values are 512 to 4096. Default is 1232. 65536 disables it.
147	# max-udp-size: 1232
148
149	# max memory to use for stream(tcp and tls) waiting result buffers.
150	# stream-wait-size: 4m
151
152	# buffer size for handling DNS data. No messages larger than this
153	# size can be sent or received, by UDP or TCP. In bytes.
154	# msg-buffer-size: 65552
155
156	# the amount of memory to use for the message cache.
157	# plain value in bytes or you can append k, m or G. default is "4Mb".
158	# msg-cache-size: 4m
159
160	# the number of slabs to use for the message cache.
161	# the number of slabs must be a power of 2.
162	# more slabs reduce lock contention, but fragment memory usage.
163	# msg-cache-slabs: 4
164
165	# the number of queries that a thread gets to service.
166	# num-queries-per-thread: 1024
167
168	# if very busy, 50% queries run to completion, 50% get timeout in msec
169	# jostle-timeout: 200
170
171	# msec to wait before close of port on timeout UDP. 0 disables.
172	# delay-close: 0
173
174	# perform connect for UDP sockets to mitigate ICMP side channel.
175	# udp-connect: yes
176
177	# The number of retries, per upstream nameserver in a delegation, when
178	# a throwaway response (also timeouts) is received.
179	# outbound-msg-retry: 5
180
181	# Hard limit on the number of outgoing queries Unbound will make while
182	# resolving a name, making sure large NS sets do not loop.
183	# It resets on query restarts (e.g., CNAME) and referrals.
184	# max-sent-count: 32
185
186	# Hard limit on the number of times Unbound is allowed to restart a
187	# query upon encountering a CNAME record.
188	# max-query-restarts: 11
189
190	# Limit on number of NS records in NS RRset for incoming packets.
191	# iter-scrub-ns: 20
192
193	# Limit on number of CNAME, DNAME records for incoming packets.
194	# iter-scrub-cname: 11
195
196	# Limit on upstream queries for an incoming query and its recursion.
197	# max-global-quota: 200
198
199	# msec for waiting for an unknown server to reply.  Increase if you
200	# are behind a slow satellite link, to eg. 1128.
201	# unknown-server-time-limit: 376
202
203	# msec before recursion replies are dropped. The work item continues.
204	# discard-timeout: 1900
205
206	# Max number of replies waiting for recursion per IP address.
207	# wait-limit: 1000
208
209	# Max replies waiting for recursion for IP address with cookie.
210	# wait-limit-cookie: 10000
211
212	# Apart from the default, the wait limit can be set for a netblock.
213	# wait-limit-netblock: 192.0.2.0/24 50000
214
215	# Apart from the default, the wait limit with cookie can be adjusted.
216	# wait-limit-cookie-netblock: 192.0.2.0/24 50000
217
218	# Defaults for loopback, it has no wait limit.
219	# wait-limit-netblock: 127.0.0.0/8 -1
220	# wait-limit-netblock: ::1/128 -1
221	# wait-limit-cookie-netblock: 127.0.0.0/8 -1
222	# wait-limit-cookie-netblock: ::1/128 -1
223
224	# the amount of memory to use for the RRset cache.
225	# plain value in bytes or you can append k, m or G. default is "4Mb".
226	# rrset-cache-size: 4m
227
228	# the number of slabs to use for the RRset cache.
229	# the number of slabs must be a power of 2.
230	# more slabs reduce lock contention, but fragment memory usage.
231	# rrset-cache-slabs: 4
232
233	# the time to live (TTL) value lower bound, in seconds. Default 0.
234	# If more than an hour could easily give trouble due to stale data.
235	# cache-min-ttl: 0
236
237	# the time to live (TTL) value cap for RRsets and messages in the
238	# cache. Items are not cached for longer. In seconds.
239	# cache-max-ttl: 86400
240
241	# the time to live (TTL) value cap for negative responses in the cache
242	# cache-max-negative-ttl: 3600
243
244	# the time to live (TTL) value lower bound, in seconds. Default 0.
245	# For negative responses in the cache. If disabled, default,
246	# cache-min-ttl applies if configured.
247	# cache-min-negative-ttl: 0
248
249	# the time to live (TTL) value for cached roundtrip times, lameness and
250	# EDNS version information for hosts. In seconds.
251	# infra-host-ttl: 900
252
253	# minimum wait time for responses, increase if uplink is long. In msec.
254	# infra-cache-min-rtt: 50
255
256	# maximum wait time for responses. In msec.
257	# infra-cache-max-rtt: 120000
258
259	# enable to make server probe down hosts more frequently.
260	# infra-keep-probing: no
261
262	# the number of slabs to use for the Infrastructure cache.
263	# the number of slabs must be a power of 2.
264	# more slabs reduce lock contention, but fragment memory usage.
265	# infra-cache-slabs: 4
266
267	# the maximum number of hosts that are cached (roundtrip, EDNS, lame).
268	# infra-cache-numhosts: 10000
269
270	# define a number of tags here, use with local-zone, access-control,
271	# interface-*.
272	# repeat the define-tag statement to add additional tags.
273	# define-tag: "tag1 tag2 tag3"
274
275	# Enable IPv4, "yes" or "no".
276	# do-ip4: yes
277
278	# Enable IPv6, "yes" or "no".
279	# do-ip6: yes
280
281	# If running unbound on an IPv6-only host, domains that only have
282	# IPv4 servers would become unresolveable.  If NAT64 is available in
283	# the network, unbound can use NAT64 to reach these servers with
284	# the following option.  This is NOT needed for enabling DNS64 on a
285	# system that has IPv4 connectivity.
286	# Consider also enabling prefer-ip6 to prefer native IPv6 connections
287	# to nameservers.
288	# do-nat64: no
289
290	# NAT64 prefix.  Defaults to using dns64-prefix value.
291	# nat64-prefix: 64:ff9b::0/96
292
293	# Enable UDP, "yes" or "no".
294	# do-udp: yes
295
296	# Enable TCP, "yes" or "no".
297	# do-tcp: yes
298
299	# upstream connections use TCP only (and no UDP), "yes" or "no"
300	# useful for tunneling scenarios, default no.
301	# tcp-upstream: no
302
303	# upstream connections also use UDP (even if do-udp is no).
304	# useful if if you want UDP upstream, but don't provide UDP downstream.
305	# udp-upstream-without-downstream: no
306
307	# Maximum segment size (MSS) of TCP socket on which the server
308	# responds to queries. Default is 0, system default MSS.
309	# tcp-mss: 0
310
311	# Maximum segment size (MSS) of TCP socket for outgoing queries.
312	# Default is 0, system default MSS.
313	# outgoing-tcp-mss: 0
314
315	# Idle TCP timeout, connection closed in milliseconds
316	# tcp-idle-timeout: 30000
317
318	# Enable EDNS TCP keepalive option.
319	# edns-tcp-keepalive: no
320
321	# Timeout for EDNS TCP keepalive, in msec. Overrides tcp-idle-timeout
322	# if edns-tcp-keepalive is set.
323	# edns-tcp-keepalive-timeout: 120000
324
325	# UDP queries that have waited in the socket buffer for a long time
326	# can be dropped. Default is 0, disabled. In seconds, such as 3.
327	# sock-queue-timeout: 0
328
329	# Use systemd socket activation for UDP, TCP, and control sockets.
330	# use-systemd: no
331
332	# Detach from the terminal, run in background, "yes" or "no".
333	# Set the value to "no" when Unbound runs as systemd service.
334	# do-daemonize: yes
335
336	# control which clients are allowed to make (recursive) queries
337	# to this server. Specify classless netblocks with /size and action.
338	# By default everything is refused, except for localhost.
339	# Choose deny (drop message), refuse (polite error reply),
340	# allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on),
341	# allow_snoop (recursive and nonrecursive ok)
342	# allow_cookie (allow UDP with valid cookie or stateful transport)
343	# deny_non_local (drop queries unless can be answered from local-data)
344	# refuse_non_local (like deny_non_local but polite error reply).
345	# access-control: 127.0.0.0/8 allow
346	# access-control: ::1 allow
347	# access-control: ::ffff:127.0.0.1 allow
348
349	# tag access-control with list of tags (in "" with spaces between)
350	# Clients using this access control element use localzones that
351	# are tagged with one of these tags.
352	# access-control-tag: 192.0.2.0/24 "tag2 tag3"
353
354	# set action for particular tag for given access control element.
355	# if you have multiple tag values, the tag used to lookup the action
356	# is the first tag match between access-control-tag and local-zone-tag
357	# where "first" comes from the order of the define-tag values.
358	# access-control-tag-action: 192.0.2.0/24 tag3 refuse
359
360	# set redirect data for particular tag for access control element
361	# access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1"
362
363	# Set view for access control element
364	# access-control-view: 192.0.2.0/24 viewname
365
366	# Similar to 'access-control:' but for interfaces.
367	# Control which listening interfaces are allowed to accept (recursive)
368	# queries for this server.
369	# The specified interfaces should be the same as the ones specified in
370	# 'interface:' followed by the action.
371	# The actions are the same as 'access-control:' above.
372	# By default all the interfaces configured are refused.
373	# Note: any 'access-control*:' setting overrides all 'interface-*:'
374	# settings for targeted clients.
375	# interface-action: 192.0.2.153 allow
376	# interface-action: 192.0.2.154 allow
377	# interface-action: 192.0.2.154@5003 allow
378	# interface-action: 2001:DB8::5 allow
379	# interface-action: eth0@5003 allow
380
381	# Similar to 'access-control-tag:' but for interfaces.
382	# Tag interfaces with a list of tags (in "" with spaces between).
383	# Interfaces using these tags use localzones that are tagged with one
384	# of these tags.
385	# The specified interfaces should be the same as the ones specified in
386	# 'interface:' followed by the list of tags.
387	# Note: any 'access-control*:' setting overrides all 'interface-*:'
388	# settings for targeted clients.
389	# interface-tag: eth0@5003 "tag2 tag3"
390
391	# Similar to 'access-control-tag-action:' but for interfaces.
392	# Set action for particular tag for a given interface element.
393	# If you have multiple tag values, the tag used to lookup the action
394	# is the first tag match between interface-tag and local-zone-tag
395	# where "first" comes from the order of the define-tag values.
396	# The specified interfaces should be the same as the ones specified in
397	# 'interface:' followed by the tag and action.
398	# Note: any 'access-control*:' setting overrides all 'interface-*:'
399	# settings for targeted clients.
400	# interface-tag-action: eth0@5003 tag3 refuse
401
402	# Similar to 'access-control-tag-data:' but for interfaces.
403	# Set redirect data for a particular tag for an interface element.
404	# The specified interfaces should be the same as the ones specified in
405	# 'interface:' followed by the tag and the redirect data.
406	# Note: any 'access-control*:' setting overrides all 'interface-*:'
407	# settings for targeted clients.
408	# interface-tag-data: eth0@5003 tag2 "A 127.0.0.1"
409
410	# Similar to 'access-control-view:' but for interfaces.
411	# Set view for an interface element.
412	# The specified interfaces should be the same as the ones specified in
413	# 'interface:' followed by the view name.
414	# Note: any 'access-control*:' setting overrides all 'interface-*:'
415	# settings for targeted clients.
416	# interface-view: eth0@5003 viewname
417
418	# if given, a chroot(2) is done to the given directory.
419	# i.e. you can chroot to the working directory, for example,
420	# for extra security, but make sure all files are in that directory.
421	#
422	# If chroot is enabled, you should pass the configfile (from the
423	# commandline) as a full path from the original root. After the
424	# chroot has been performed the now defunct portion of the config
425	# file path is removed to be able to reread the config after a reload.
426	#
427	# All other file paths (working dir, logfile, roothints, and
428	# key files) can be specified in several ways:
429	# 	o as an absolute path relative to the new root.
430	# 	o as a relative path to the working directory.
431	# 	o as an absolute path relative to the original root.
432	# In the last case the path is adjusted to remove the unused portion.
433	#
434	# The pid file can be absolute and outside of the chroot, it is
435	# written just prior to performing the chroot and dropping permissions.
436	#
437	# Additionally, Unbound may need to access /dev/urandom (for entropy).
438	# How to do this is specific to your OS.
439	#
440	# If you give "" no chroot is performed. The path must not end in a /.
441	# chroot: "@UNBOUND_CHROOT_DIR@"
442
443	# if given, user privileges are dropped (after binding port),
444	# and the given username is assumed. Default is user "unbound".
445	# If you give "" no privileges are dropped.
446	# username: "@UNBOUND_USERNAME@"
447
448	# the working directory. The relative files in this config are
449	# relative to this directory. If you give "" the working directory
450	# is not changed.
451	# If you give a server: directory: dir before include: file statements
452	# then those includes can be relative to the working directory.
453	# directory: "@UNBOUND_RUN_DIR@"
454
455	# the log file, "" means log to stderr.
456	# Use of this option sets use-syslog to "no".
457	# logfile: ""
458
459	# Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
460	# log to. If yes, it overrides the logfile.
461	# use-syslog: yes
462
463	# Log identity to report. if empty, defaults to the name of argv[0]
464	# (usually "unbound").
465	# log-identity: ""
466
467	# print UTC timestamp in ascii to logfile, default is epoch in seconds.
468	# log-time-ascii: no
469
470	# log timestamp in ISO8601 format if also log-time-ascii is enabled.
471	# (y-m-dTh:m:s.msec[+-]tzhours:tzminutes)
472	# log-time-iso: no
473
474	# print one line with time, IP, name, type, class for every query.
475	# log-queries: no
476
477	# print one line per reply, with time, IP, name, type, class, rcode,
478	# timetoresolve, fromcache and responsesize.
479	# log-replies: no
480
481	# log with tag 'query' and 'reply' instead of 'info' for
482	# filtering log-queries and log-replies from the log.
483	# log-tag-queryreply: no
484
485	# log with destination address, port and type for log-replies.
486	# log-destaddr: no
487
488	# log the local-zone actions, like local-zone type inform is enabled
489	# also for the other local zone types.
490	# log-local-actions: no
491
492	# print log lines that say why queries return SERVFAIL to clients.
493	# log-servfail: no
494
495	# the pid file. Can be an absolute path outside of chroot/work dir.
496	# pidfile: "@UNBOUND_PIDFILE@"
497
498	# file to read root hints from.
499	# get one from https://www.internic.net/domain/named.cache
500	# root-hints: ""
501
502	# enable to not answer id.server and hostname.bind queries.
503	# hide-identity: no
504
505	# enable to not answer version.server and version.bind queries.
506	# hide-version: no
507
508	# enable to not answer trustanchor.unbound queries.
509	# hide-trustanchor: no
510
511	# enable to not set the User-Agent HTTP header.
512	# hide-http-user-agent: no
513
514	# the identity to report. Leave "" or default to return hostname.
515	# identity: ""
516
517	# the version to report. Leave "" or default to return package version.
518	# version: ""
519
520	# NSID identity (hex string, or "ascii_somestring"). default disabled.
521	# nsid: "aabbccdd"
522
523	# User-Agent HTTP header to use. Leave "" or default to use package name
524	# and version.
525	# http-user-agent: ""
526
527	# the target fetch policy.
528	# series of integers describing the policy per dependency depth.
529	# The number of values in the list determines the maximum dependency
530	# depth the recursor will pursue before giving up. Each integer means:
531	# 	-1 : fetch all targets opportunistically,
532	# 	0: fetch on demand,
533	#	positive value: fetch that many targets opportunistically.
534	# Enclose the list of numbers between quotes ("").
535	# target-fetch-policy: "3 2 1 0 0"
536
537	# Harden against very small EDNS buffer sizes.
538	# harden-short-bufsize: yes
539
540	# Harden against unseemly large queries.
541	# harden-large-queries: no
542
543	# Harden against out of zone rrsets, to avoid spoofing attempts.
544	# harden-glue: yes
545
546	# Harden against unverified (outside-zone, including sibling zone) glue rrsets
547	# harden-unverified-glue: no
548
549	# Harden against receiving dnssec-stripped data. If you turn it
550	# off, failing to validate dnskey data for a trustanchor will
551	# trigger insecure mode for that zone (like without a trustanchor).
552	# Default on, which insists on dnssec data for trust-anchored zones.
553	# harden-dnssec-stripped: yes
554
555	# Harden against queries that fall under dnssec-signed nxdomain names.
556	# harden-below-nxdomain: yes
557
558	# Harden the referral path by performing additional queries for
559	# infrastructure data.  Validates the replies (if possible).
560	# Default off, because the lookups burden the server.  Experimental
561	# implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
562	# harden-referral-path: no
563
564	# Harden against algorithm downgrade when multiple algorithms are
565	# advertised in the DS record.  If no, allows any algorithm
566	# to validate the zone which is the standard behavior for validators.
567	# Check the manpage for detailed information.
568	# harden-algo-downgrade: no
569
570	# Harden against unknown records in the authority section and the
571	# additional section.
572	# harden-unknown-additional: no
573
574	# Sent minimum amount of information to upstream servers to enhance
575	# privacy. Only sent minimum required labels of the QNAME and set QTYPE
576	# to A when possible.
577	# qname-minimisation: yes
578
579	# QNAME minimisation in strict mode. Do not fall-back to sending full
580	# QNAME to potentially broken nameservers. A lot of domains will not be
581	# resolvable when this option in enabled.
582	# This option only has effect when qname-minimisation is enabled.
583	# qname-minimisation-strict: no
584
585	# Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN
586	# and other denials, using information from previous NXDOMAINs answers.
587	# aggressive-nsec: yes
588
589	# Use 0x20-encoded random bits in the query to foil spoof attempts.
590	# This feature is an experimental implementation of draft dns-0x20.
591	# use-caps-for-id: no
592
593	# Domains (and domains in them) without support for dns-0x20 and
594	# the fallback fails because they keep sending different answers.
595	# caps-exempt: "licdn.com"
596	# caps-exempt: "senderbase.org"
597
598	# Enforce privacy of these addresses. Strips them away from answers.
599	# It may cause DNSSEC validation to additionally mark it as bogus.
600	# Protects against 'DNS Rebinding' (uses browser as network proxy).
601	# Only 'private-domain' and 'local-data' names are allowed to have
602	# these private addresses. No default.
603	# private-address: 10.0.0.0/8
604	# private-address: 172.16.0.0/12
605	# private-address: 192.168.0.0/16
606	# private-address: 169.254.0.0/16
607	# private-address: fd00::/8
608	# private-address: fe80::/10
609	# private-address: ::ffff:0:0/96
610
611	# Allow the domain (and its subdomains) to contain private addresses.
612	# local-data statements are allowed to contain private addresses too.
613	# private-domain: "example.com"
614
615	# If nonzero, unwanted replies are not only reported in statistics,
616	# but also a running total is kept per thread. If it reaches the
617	# threshold, a warning is printed and a defensive action is taken,
618	# the cache is cleared to flush potential poison out of it.
619	# A suggested value is 10000000, the default is 0 (turned off).
620	# unwanted-reply-threshold: 0
621
622	# Do not query the following addresses. No DNS queries are sent there.
623	# List one address per entry. List classless netblocks with /size,
624	# do-not-query-address: 127.0.0.1/8
625	# do-not-query-address: ::1
626
627	# if yes, the above default do-not-query-address entries are present.
628	# if no, localhost can be queried (for testing and debugging).
629	# do-not-query-localhost: yes
630
631	# if yes, perform prefetching of almost expired message cache entries.
632	# prefetch: no
633
634	# if yes, perform key lookups adjacent to normal lookups.
635	# prefetch-key: no
636
637	# deny queries of type ANY with an empty response.
638	# deny-any: no
639
640	# if yes, Unbound rotates RRSet order in response.
641	# rrset-roundrobin: yes
642
643	# if yes, Unbound doesn't insert authority/additional sections
644	# into response messages when those sections are not required.
645	# minimal-responses: yes
646
647	# true to disable DNSSEC lameness check in iterator.
648	# disable-dnssec-lame-check: no
649
650	# module configuration of the server. A string with identifiers
651	# separated by spaces. Syntax: "[dns64] [validator] iterator"
652	# most modules have to be listed at the beginning of the line,
653	# except cachedb(just before iterator), and python (at the beginning,
654	# or, just before the iterator).
655	# module-config: "validator iterator"
656
657	# File with trusted keys, kept uptodate using RFC5011 probes,
658	# initial file like trust-anchor-file, then it stores metadata.
659	# Use several entries, one per domain name, to track multiple zones.
660	#
661	# If you want to perform DNSSEC validation, run unbound-anchor before
662	# you start Unbound (i.e. in the system boot scripts).
663	# And then enable the auto-trust-anchor-file config item.
664	# Please note usage of unbound-anchor root anchor is at your own risk
665	# and under the terms of our LICENSE (see that file in the source).
666	# auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
667
668	# trust anchor signaling sends a RFC8145 key tag query after priming.
669	# trust-anchor-signaling: yes
670
671	# Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel)
672	# root-key-sentinel: yes
673
674	# File with trusted keys for validation. Specify more than one file
675	# with several entries, one file per entry.
676	# Zone file format, with DS and DNSKEY entries.
677	# Note this gets out of date, use auto-trust-anchor-file please.
678	# trust-anchor-file: ""
679
680	# Trusted key for validation. DS or DNSKEY. specify the RR on a
681	# single line, surrounded by "". TTL is ignored. class is IN default.
682	# Note this gets out of date, use auto-trust-anchor-file please.
683	# (These examples are from August 2007 and may not be valid anymore).
684	# trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
685	# trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
686
687	# File with trusted keys for validation. Specify more than one file
688	# with several entries, one file per entry. Like trust-anchor-file
689	# but has a different file format. Format is BIND-9 style format,
690	# the trusted-keys { name flag proto algo "key"; }; clauses are read.
691	# you need external update procedures to track changes in keys.
692	# trusted-keys-file: ""
693
694	# Ignore chain of trust. Domain is treated as insecure.
695	# domain-insecure: "example.com"
696
697	# Override the date for validation with a specific fixed date.
698	# Do not set this unless you are debugging signature inception
699	# and expiration. "" or "0" turns the feature off. -1 ignores date.
700	# val-override-date: ""
701
702	# The time to live for bogus data, rrsets and messages. This avoids
703	# some of the revalidation, until the time interval expires. in secs.
704	# val-bogus-ttl: 60
705
706	# The signature inception and expiration dates are allowed to be off
707	# by 10% of the signature lifetime (expir-incep) from our local clock.
708	# This leeway is capped with a minimum and a maximum.  In seconds.
709	# val-sig-skew-min: 3600
710	# val-sig-skew-max: 86400
711
712	# The maximum number the validator should restart validation with
713	# another authority in case of failed validation.
714	# val-max-restart: 5
715
716	# Should additional section of secure message also be kept clean of
717	# unsecure data. Useful to shield the users of this validator from
718	# potential bogus data in the additional section. All unsigned data
719	# in the additional section is removed from secure messages.
720	# val-clean-additional: yes
721
722	# Turn permissive mode on to permit bogus messages. Thus, messages
723	# for which security checks failed will be returned to clients,
724	# instead of SERVFAIL. It still performs the security checks, which
725	# result in interesting log files and possibly the AD bit in
726	# replies if the message is found secure. The default is off.
727	# val-permissive-mode: no
728
729	# Ignore the CD flag in incoming queries and refuse them bogus data.
730	# Enable it if the only clients of Unbound are legacy servers (w2008)
731	# that set CD but cannot validate themselves.
732	# ignore-cd-flag: no
733
734	# Disable the DO flag in outgoing requests. It is helpful for upstream
735	# devices that cannot handle DNSSEC information. But do not enable it
736	# otherwise, because it would stop DNSSEC validation.
737	# disable-edns-do: no
738
739	# Serve expired responses from cache, with serve-expired-reply-ttl in
740	# the response. By default it first tries to refresh an expired answer.
741	# Can be configured with serve-expired-client-timeout.
742	# serve-expired: no
743	#
744	# Limit serving of expired responses to configured seconds after
745	# expiration. 0 disables the limit.
746	# serve-expired-ttl: 86400
747	#
748	# Set the TTL of expired records to the serve-expired-ttl value after a
749	# failed attempt to retrieve the record from upstream. This makes sure
750	# that the expired records will be served as long as there are queries
751	# for it.
752	# serve-expired-ttl-reset: no
753	#
754	# TTL value to use when replying with expired data.
755	# serve-expired-reply-ttl: 30
756	#
757	# Time in milliseconds before replying to the client with expired data.
758	# This essentially enables the serve-stale behavior as specified in
759	# RFC 8767 that first tries to resolve before immediately responding
760	# with expired data.  0 disables this behavior.
761	# serve-expired-client-timeout: 1800
762
763	# Return the original TTL as received from the upstream name server rather
764	# than the decrementing TTL as stored in the cache.  Enabling this feature
765	# does not impact cache expiry, it only changes the TTL Unbound embeds in
766	# responses to queries. Note that enabling this feature implicitly disables
767	# enforcement of the configured minimum and maximum TTL.
768	# serve-original-ttl: no
769
770	# Have the validator log failed validations for your diagnosis.
771	# 0: off. 1: A line per failed user query. 2: With reason and bad IP.
772	# val-log-level: 0
773
774	# It is possible to configure NSEC3 maximum iteration counts per
775	# keysize. Keep this table very short, as linear search is done.
776	# A message with an NSEC3 with larger count is marked insecure.
777	# List in ascending order the keysize and count values.
778	# val-nsec3-keysize-iterations: "1024 150 2048 150 4096 150"
779
780	# if enabled, ZONEMD verification failures do not block the zone.
781	# zonemd-permissive-mode: no
782
783	# instruct the auto-trust-anchor-file probing to add anchors after ttl.
784	# add-holddown: 2592000 # 30 days
785
786	# instruct the auto-trust-anchor-file probing to del anchors after ttl.
787	# del-holddown: 2592000 # 30 days
788
789	# auto-trust-anchor-file probing removes missing anchors after ttl.
790	# If the value 0 is given, missing anchors are not removed.
791	# keep-missing: 31622400 # 366 days
792
793	# debug option that allows very small holddown times for key rollover,
794	# otherwise the RFC mandates probe intervals must be at least 1 hour.
795	# permit-small-holddown: no
796
797	# the amount of memory to use for the key cache.
798	# plain value in bytes or you can append k, m or G. default is "4Mb".
799	# key-cache-size: 4m
800
801	# the number of slabs to use for the key cache.
802	# the number of slabs must be a power of 2.
803	# more slabs reduce lock contention, but fragment memory usage.
804	# key-cache-slabs: 4
805
806	# the amount of memory to use for the negative cache.
807	# plain value in bytes or you can append k, m or G. default is "1Mb".
808	# neg-cache-size: 1m
809
810	# By default, for a number of zones a small default 'nothing here'
811	# reply is built-in.  Query traffic is thus blocked.  If you
812	# wish to serve such zone you can unblock them by uncommenting one
813	# of the nodefault statements below.
814	# You may also have to use domain-insecure: zone to make DNSSEC work,
815	# unless you have your own trust anchors for this zone.
816	# local-zone: "localhost." nodefault
817	# local-zone: "127.in-addr.arpa." nodefault
818	# 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
819	# local-zone: "home.arpa." nodefault
820	# local-zone: "resolver.arpa." nodefault
821	# local-zone: "service.arpa." nodefault
822	# local-zone: "onion." nodefault
823	# local-zone: "test." nodefault
824	# local-zone: "invalid." nodefault
825	# local-zone: "10.in-addr.arpa." nodefault
826	# local-zone: "16.172.in-addr.arpa." nodefault
827	# local-zone: "17.172.in-addr.arpa." nodefault
828	# local-zone: "18.172.in-addr.arpa." nodefault
829	# local-zone: "19.172.in-addr.arpa." nodefault
830	# local-zone: "20.172.in-addr.arpa." nodefault
831	# local-zone: "21.172.in-addr.arpa." nodefault
832	# local-zone: "22.172.in-addr.arpa." nodefault
833	# local-zone: "23.172.in-addr.arpa." nodefault
834	# local-zone: "24.172.in-addr.arpa." nodefault
835	# local-zone: "25.172.in-addr.arpa." nodefault
836	# local-zone: "26.172.in-addr.arpa." nodefault
837	# local-zone: "27.172.in-addr.arpa." nodefault
838	# local-zone: "28.172.in-addr.arpa." nodefault
839	# local-zone: "29.172.in-addr.arpa." nodefault
840	# local-zone: "30.172.in-addr.arpa." nodefault
841	# local-zone: "31.172.in-addr.arpa." nodefault
842	# local-zone: "168.192.in-addr.arpa." nodefault
843	# local-zone: "0.in-addr.arpa." nodefault
844	# local-zone: "254.169.in-addr.arpa." nodefault
845	# local-zone: "2.0.192.in-addr.arpa." nodefault
846	# local-zone: "100.51.198.in-addr.arpa." nodefault
847	# local-zone: "113.0.203.in-addr.arpa." nodefault
848	# local-zone: "255.255.255.255.in-addr.arpa." nodefault
849	# 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
850	# local-zone: "d.f.ip6.arpa." nodefault
851	# local-zone: "8.e.f.ip6.arpa." nodefault
852	# local-zone: "9.e.f.ip6.arpa." nodefault
853	# local-zone: "a.e.f.ip6.arpa." nodefault
854	# local-zone: "b.e.f.ip6.arpa." nodefault
855	# local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
856	# And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa.
857
858	# Add example.com into ipset
859	# local-zone: "example.com" ipset
860
861	# If Unbound is running service for the local host then it is useful
862	# to perform lan-wide lookups to the upstream, and unblock the
863	# long list of local-zones above.  If this Unbound is a dns server
864	# for a network of computers, disabled is better and stops information
865	# leakage of local lan information.
866	# unblock-lan-zones: no
867
868	# The insecure-lan-zones option disables validation for
869	# these zones, as if they were all listed as domain-insecure.
870	# insecure-lan-zones: no
871
872	# a number of locally served zones can be configured.
873	# 	local-zone: <zone> <type>
874	# 	local-data: "<resource record string>"
875	# o deny serves local data (if any), else, drops queries.
876	# o refuse serves local data (if any), else, replies with error.
877	# o static serves local data, else, nxdomain or nodata answer.
878	# o transparent gives local data, but resolves normally for other names
879	# o redirect serves the zone data for any subdomain in the zone.
880	# o nodefault can be used to normally resolve AS112 zones.
881	# o typetransparent resolves normally for other types and other names
882	# o inform acts like transparent, but logs client IP address
883	# o inform_deny drops queries and logs client IP address
884	# o inform_redirect redirects queries and logs client IP address
885	# o always_transparent, always_refuse, always_nxdomain, always_nodata,
886	#   always_deny resolve in that way but ignore local data for
887	#   that name
888	# o block_a resolves all records normally but returns
889	#   NODATA for A queries and ignores local data for that name
890	# o always_null returns 0.0.0.0 or ::0 for any name in the zone.
891	# o noview breaks out of that view towards global local-zones.
892	#
893	# defaults are localhost address, reverse for 127.0.0.1 and ::1
894	# and nxdomain for AS112 zones. If you configure one of these zones
895	# the default content is omitted, or you can omit it with 'nodefault'.
896	#
897	# If you configure local-data without specifying local-zone, by
898	# default a transparent local-zone is created for the data.
899	#
900	# You can add locally served data with
901	# local-zone: "local." static
902	# local-data: "mycomputer.local. IN A 192.0.2.51"
903	# local-data: 'mytext.local TXT "content of text record"'
904	#
905	# You can override certain queries with
906	# local-data: "adserver.example.com A 127.0.0.1"
907	#
908	# You can redirect a domain to a fixed address with
909	# (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
910	# local-zone: "example.com" redirect
911	# local-data: "example.com A 192.0.2.3"
912	#
913	# Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
914	# You can also add PTR records using local-data directly, but then
915	# you need to do the reverse notation yourself.
916	# local-data-ptr: "192.0.2.3 www.example.com"
917
918	# tag a localzone with a list of tag names (in "" with spaces between)
919	# local-zone-tag: "example.com" "tag2 tag3"
920
921	# add a netblock specific override to a localzone, with zone type
922	# local-zone-override: "example.com" 192.0.2.0/24 refuse
923
924	# service clients over TLS (on the TCP sockets) with plain DNS inside
925	# the TLS stream, and over HTTPS using HTTP/2 as specified in RFC8484.
926	# Give the certificate to use and private key.
927	# default is "" (disabled).  requires restart to take effect.
928	# tls-service-key: "path/to/privatekeyfile.key"
929	# tls-service-pem: "path/to/publiccertfile.pem"
930	# tls-port: 853
931	# https-port: 443
932	# quic-port: 853
933
934	# cipher setting for TLSv1.2
935	# 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"
936	# cipher setting for TLSv1.3
937	# 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"
938
939	# Pad responses to padded queries received over TLS
940	# pad-responses: yes
941
942	# Padded responses will be padded to the closest multiple of this size.
943	# pad-responses-block-size: 468
944
945	# Use the SNI extension for TLS connections.  Default is yes.
946	# Changing the value requires a reload.
947	# tls-use-sni: yes
948
949	# Add the secret file for TLS Session Ticket.
950	# Secret file must be 80 bytes of random data.
951	# First key use to encrypt and decrypt TLS session tickets.
952	# Other keys use to decrypt only.
953	# requires restart to take effect.
954	# tls-session-ticket-keys: "path/to/secret_file1"
955	# tls-session-ticket-keys: "path/to/secret_file2"
956
957	# request upstream over TLS (with plain DNS inside the TLS stream).
958	# Default is no.  Can be turned on and off with unbound-control.
959	# tls-upstream: no
960
961	# Certificates used to authenticate connections made upstream.
962	# tls-cert-bundle: ""
963
964	# Add system certs to the cert bundle, from the Windows Cert Store
965	# tls-win-cert: no
966	# and on other systems, the default openssl certificates
967	# tls-system-cert: no
968
969	# Pad queries over TLS upstreams
970	# pad-queries: yes
971
972	# Padded queries will be padded to the closest multiple of this size.
973	# pad-queries-block-size: 128
974
975	# Also serve tls on these port numbers (eg. 443, ...), by listing
976	# tls-additional-port: portno for each of the port numbers.
977
978	# HTTP endpoint to provide DNS-over-HTTPS service on.
979	# http-endpoint: "/dns-query"
980
981	# HTTP/2 SETTINGS_MAX_CONCURRENT_STREAMS value to use.
982	# http-max-streams: 100
983
984	# Maximum number of bytes used for all HTTP/2 query buffers.
985	# http-query-buffer-size: 4m
986
987	# Maximum number of bytes used for all HTTP/2 response buffers.
988	# http-response-buffer-size: 4m
989
990	# Set TCP_NODELAY socket option on sockets used for DNS-over-HTTPS
991	# service.
992	# http-nodelay: yes
993
994	# Disable TLS for DNS-over-HTTP downstream service.
995	# http-notls-downstream: no
996
997	# Maximum number of bytes used for QUIC buffers.
998	# quic-size: 8m
999
1000	# The interfaces that use these listed port numbers will support and
1001	# expect PROXYv2. For UDP and TCP/TLS interfaces.
1002	# proxy-protocol-port: portno for each of the port numbers.
1003
1004	# DNS64 prefix. Must be specified when DNS64 is use.
1005	# Enable dns64 in module-config.  Used to synthesize IPv6 from IPv4.
1006	# dns64-prefix: 64:ff9b::0/96
1007
1008	# DNS64 ignore AAAA records for these domains and use A instead.
1009	# dns64-ignore-aaaa: "example.com"
1010
1011	# ratelimit for uncached, new queries, this limits recursion effort.
1012	# ratelimiting is experimental, and may help against randomqueryflood.
1013	# if 0(default) it is disabled, otherwise state qps allowed per zone.
1014	# ratelimit: 0
1015
1016	# ratelimits are tracked in a cache, size in bytes of cache (or k,m).
1017	# ratelimit-size: 4m
1018	# ratelimit cache slabs, reduces lock contention if equal to cpucount.
1019	# ratelimit-slabs: 4
1020
1021	# 0 blocks when ratelimited, otherwise let 1/xth traffic through
1022	# ratelimit-factor: 10
1023
1024	# Aggressive rate limit when the limit is reached and until demand has
1025	# decreased in a 2 second rate window.
1026	# ratelimit-backoff: no
1027
1028	# override the ratelimit for a specific domain name.
1029	# give this setting multiple times to have multiple overrides.
1030	# ratelimit-for-domain: example.com 1000
1031	# override the ratelimits for all domains below a domain name
1032	# can give this multiple times, the name closest to the zone is used.
1033	# ratelimit-below-domain: com 1000
1034
1035	# global query ratelimit for all ip addresses.
1036	# feature is experimental.
1037	# if 0(default) it is disabled, otherwise states qps allowed per ip address
1038	# ip-ratelimit: 0
1039
1040	# global query ratelimit for all ip addresses with a valid DNS Cookie.
1041	# feature is experimental.
1042	# if 0(default) it is disabled, otherwise states qps allowed per ip address
1043	# useful in combination with 'allow_cookie'.
1044	# If used, suggested to be higher than ip-ratelimit, tenfold.
1045	# ip-ratelimit-cookie: 0
1046
1047	# ip ratelimits are tracked in a cache, size in bytes of cache (or k,m).
1048	# ip-ratelimit-size: 4m
1049	# ip ratelimit cache slabs, reduces lock contention if equal to cpucount.
1050	# ip-ratelimit-slabs: 4
1051
1052	# 0 blocks when ip is ratelimited, otherwise let 1/xth traffic through
1053	# ip-ratelimit-factor: 10
1054
1055	# Aggressive rate limit when the limit is reached and until demand has
1056	# decreased in a 2 second rate window.
1057	# ip-ratelimit-backoff: no
1058
1059	# Limit the number of connections simultaneous from a netblock
1060	# tcp-connection-limit: 192.0.2.0/24 12
1061
1062	# select from the fastest servers this many times out of 1000. 0 means
1063	# the fast server select is disabled. prefetches are not sped up.
1064	# fast-server-permil: 0
1065	# the number of servers that will be used in the fast server selection.
1066	# fast-server-num: 3
1067
1068	# reply to requests containing DNS Cookies as specified in RFC 7873 and RFC 9018.
1069	# answer-cookie: no
1070
1071	# secret for DNS Cookie generation.
1072	# useful for anycast deployments.
1073	# example value "000102030405060708090a0b0c0d0e0f".
1074	# cookie-secret: <128 bit random hex string>
1075
1076	# File with cookie secrets, the 'cookie-secret:' option is ignored
1077	# and the file can be managed to have staging and active secrets
1078	# with remote control commands. Disabled with "". Default is "".
1079	# cookie-secret-file: "/usr/local/etc/unbound_cookiesecrets.txt"
1080
1081	# Enable to attach Extended DNS Error codes (RFC8914) to responses.
1082	# ede: no
1083
1084	# Enable to attach an Extended DNS Error (RFC8914) Code 3 - Stale
1085	# Answer as EDNS0 option to expired responses.
1086	# Note that the ede option above needs to be enabled for this to work.
1087	# ede-serve-expired: no
1088
1089	# Enable DNS Error Reporting (RFC9567).
1090	# qname-minimisation is advised to be turned on as well to increase
1091	# privacy on the outgoing reports.
1092	# dns-error-reporting: no
1093
1094	# Specific options for ipsecmod. Unbound needs to be configured with
1095	# --enable-ipsecmod for these to take effect.
1096	#
1097	# Enable or disable ipsecmod (it still needs to be defined in
1098	# module-config above). Can be used when ipsecmod needs to be
1099	# enabled/disabled via remote-control(below).
1100	# ipsecmod-enabled: yes
1101	#
1102	# Path to executable external hook. It must be defined when ipsecmod is
1103	# listed in module-config (above).
1104	# ipsecmod-hook: "./my_executable"
1105	#
1106	# When enabled Unbound will reply with SERVFAIL if the return value of
1107	# the ipsecmod-hook is not 0.
1108	# ipsecmod-strict: no
1109	#
1110	# Maximum time to live (TTL) for cached A/AAAA records with IPSECKEY.
1111	# ipsecmod-max-ttl: 3600
1112	#
1113	# Reply with A/AAAA even if the relevant IPSECKEY is bogus. Mainly used for
1114	# testing.
1115	# ipsecmod-ignore-bogus: no
1116	#
1117	# Domains for which ipsecmod will be triggered. If not defined (default)
1118	# all domains are treated as being allowed.
1119	# ipsecmod-allow: "example.com"
1120	# ipsecmod-allow: "nlnetlabs.nl"
1121
1122	# Timeout for REUSE entries in milliseconds.
1123	# tcp-reuse-timeout: 60000
1124	# Max number of queries on a reuse connection.
1125	# max-reuse-tcp-queries: 200
1126	# Timeout in milliseconds for TCP queries to auth servers.
1127	# tcp-auth-query-timeout: 3000
1128
1129
1130# Python config section. To enable:
1131# o use --with-pythonmodule to configure before compiling.
1132# o list python in the module-config string (above) to enable.
1133#   It can be at the start, it gets validated results, or just before
1134#   the iterator and process before DNSSEC validation.
1135# o and give a python-script to run.
1136python:
1137	# Script file to load
1138	# python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py"
1139
1140# Dynamic library config section. To enable:
1141# o use --with-dynlibmodule to configure before compiling.
1142# o list dynlib in the module-config string (above) to enable.
1143#   It can be placed anywhere, the dynlib module is only a very thin wrapper
1144#   to load modules dynamically.
1145# o and give a dynlib-file to run. If more than one dynlib entry is listed in
1146#   the module-config then you need one dynlib-file per instance.
1147dynlib:
1148	# Script file to load
1149	# dynlib-file: "@UNBOUND_SHARE_DIR@/dynlib.so"
1150
1151# Remote control config section.
1152remote-control:
1153	# Enable remote control with unbound-control(8) here.
1154	# set up the keys and certificates with unbound-control-setup.
1155	# control-enable: no
1156
1157	# what interfaces are listened to for remote control.
1158	# give 0.0.0.0 and ::0 to listen to all interfaces.
1159	# set to an absolute path to use a unix local name pipe, certificates
1160	# are not used for that, so key and cert files need not be present.
1161	# control-interface: 127.0.0.1
1162	# control-interface: ::1
1163
1164	# port number for remote control operations.
1165	# control-port: 8953
1166
1167	# for localhost, you can disable use of TLS by setting this to "no"
1168	# For local sockets this option is ignored, and TLS is not used.
1169	# control-use-cert: "yes"
1170
1171	# Unbound server key file.
1172	# server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key"
1173
1174	# Unbound server certificate file.
1175	# server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem"
1176
1177	# unbound-control key file.
1178	# control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key"
1179
1180	# unbound-control certificate file.
1181	# control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem"
1182
1183# Stub zones.
1184# Create entries like below, to make all queries for 'example.com' and
1185# 'example.org' go to the given list of nameservers. list zero or more
1186# nameservers by hostname or by ipaddress. If you set stub-prime to yes,
1187# the list is treated as priming hints (default is no).
1188# With stub-first yes, it attempts without the stub if it fails.
1189# Consider adding domain-insecure: name and local-zone: name nodefault
1190# to the server: section if the stub is a locally served zone.
1191# stub-zone:
1192#	name: "example.com"
1193#	stub-addr: 192.0.2.68
1194#	stub-prime: no
1195#	stub-first: no
1196#	stub-tcp-upstream: no
1197#	stub-tls-upstream: no
1198#	stub-no-cache: no
1199# stub-zone:
1200#	name: "example.org"
1201#	stub-host: ns.example.com.
1202
1203# Forward zones
1204# Create entries like below, to make all queries for 'example.com' and
1205# 'example.org' go to the given list of servers. These servers have to handle
1206# recursion to other nameservers. List zero or more nameservers by hostname
1207# or by ipaddress. Use an entry with name "." to forward all queries.
1208# If you enable forward-first, it attempts without the forward if it fails.
1209# forward-zone:
1210# 	name: "example.com"
1211# 	forward-addr: 192.0.2.68
1212# 	forward-addr: 192.0.2.73@5355  # forward to port 5355.
1213# 	forward-first: no
1214# 	forward-tcp-upstream: no
1215# 	forward-tls-upstream: no
1216#	forward-no-cache: no
1217# forward-zone:
1218# 	name: "example.org"
1219# 	forward-host: fwd.example.com
1220
1221# Authority zones
1222# The data for these zones is kept locally, from a file or downloaded.
1223# The data can be served to downstream clients, or used instead of the
1224# upstream (which saves a lookup to the upstream).  The first example
1225# has a copy of the root for local usage.  The second serves example.org
1226# authoritatively.  zonefile: reads from file (and writes to it if you also
1227# download it), primary: fetches with AXFR and IXFR, or url to zonefile.
1228# With allow-notify: you can give additional (apart from primaries and urls)
1229# sources of notifies.
1230# auth-zone:
1231#	name: "."
1232#	primary: 170.247.170.2        # b.root-servers.net
1233#	primary: 192.33.4.12          # c.root-servers.net
1234#	primary: 199.7.91.13          # d.root-servers.net
1235#	primary: 192.5.5.241          # f.root-servers.net
1236#	primary: 192.112.36.4         # g.root-servers.net
1237#	primary: 193.0.14.129         # k.root-servers.net
1238#	primary: 192.0.47.132         # xfr.cjr.dns.icann.org
1239#	primary: 192.0.32.132         # xfr.lax.dns.icann.org
1240#	primary: 2801:1b8:10::b       # b.root-servers.net
1241#	primary: 2001:500:2::c        # c.root-servers.net
1242#	primary: 2001:500:2d::d       # d.root-servers.net
1243#	primary: 2001:500:2f::f       # f.root-servers.net
1244#	primary: 2001:500:12::d0d     # g.root-servers.net
1245#	primary: 2001:7fd::1          # k.root-servers.net
1246#	primary: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org
1247#	primary: 2620:0:2d0:202::132  # xfr.lax.dns.icann.org
1248#	fallback-enabled: yes
1249#	for-downstream: no
1250#	for-upstream: yes
1251# auth-zone:
1252#	name: "example.org"
1253#	for-downstream: yes
1254#	for-upstream: yes
1255#	zonemd-check: no
1256#	zonemd-reject-absence: no
1257#	zonefile: "example.org.zone"
1258
1259# Views
1260# Create named views. Name must be unique. Map views to requests using
1261# the access-control-view option. Views can contain zero or more local-zone
1262# and local-data options. Options from matching views will override global
1263# options. Global options will be used if no matching view is found.
1264# With view-first yes, it will try to answer using the global local-zone and
1265# local-data elements if there is no view specific match.
1266# view:
1267#	name: "viewname"
1268#	local-zone: "example.com" redirect
1269#	local-data: "example.com A 192.0.2.3"
1270#	local-data-ptr: "192.0.2.3 www.example.com"
1271#	view-first: no
1272# view:
1273#	name: "anotherview"
1274#	local-zone: "example.com" refuse
1275
1276# DNSCrypt
1277# To enable, use --enable-dnscrypt to configure before compiling.
1278# Caveats:
1279# 1. the keys/certs cannot be produced by Unbound. You can use dnscrypt-wrapper
1280#   for this: https://github.com/cofyc/dnscrypt-wrapper/blob/master/README.md#usage
1281# 2. dnscrypt channel attaches to an interface. you MUST set interfaces to
1282#   listen on `dnscrypt-port` with the follo0wing snippet:
1283# server:
1284#     interface: 0.0.0.0@443
1285#     interface: ::0@443
1286#
1287# Finally, `dnscrypt` config has its own section.
1288# dnscrypt:
1289#     dnscrypt-enable: yes
1290#     dnscrypt-port: 443
1291#     dnscrypt-provider: 2.dnscrypt-cert.example.com.
1292#     dnscrypt-secret-key: /path/unbound-conf/keys1/1.key
1293#     dnscrypt-secret-key: /path/unbound-conf/keys2/1.key
1294#     dnscrypt-provider-cert: /path/unbound-conf/keys1/1.cert
1295#     dnscrypt-provider-cert: /path/unbound-conf/keys2/1.cert
1296
1297# CacheDB
1298# External backend DB as auxiliary cache.
1299# To enable, use --enable-cachedb to configure before compiling.
1300# Specify the backend name
1301# (default is "testframe", which has no use other than for debugging and
1302# testing) and backend-specific options.  The 'cachedb' module must be
1303# included in module-config, just before the iterator module.
1304# cachedb:
1305#     backend: "testframe"
1306#     # secret seed string to calculate hashed keys
1307#     secret-seed: "default"
1308#     # if the backend should be read from, but not written to.
1309#     cachedb-no-store: no
1310#     # if the cachedb should be checked before a serve-expired response is
1311#     # given, when serve-expired is enabled.
1312#     cachedb-check-when-serve-expired: yes
1313#
1314#     # For "redis" backend:
1315#     # (to enable, use --with-libhiredis to configure before compiling)
1316#     # redis server's IP address or host name
1317#     redis-server-host: 127.0.0.1
1318#     # redis server's TCP port
1319#     redis-server-port: 6379
1320#     # if the server uses a unix socket, set its path, or "" when not used.
1321#     redis-server-path: "/var/lib/redis/redis-server.sock"
1322#     # if the server uses an AUTH password, specify here, or "" when not used.
1323#     redis-server-password: ""
1324#     # timeout (in ms) for communication with the redis server
1325#     redis-timeout: 100
1326#     # timeout (in ms) for commands, if 0, uses redis-timeout.
1327#     redis-command-timeout: 0
1328#     # timeout (in ms) for connection set up, if 0, uses redis-timeout.
1329#     redis-connect-timeout: 0
1330#     # set timeout on redis records based on DNS response TTL
1331#     redis-expire-records: no
1332#     # redis logical database to use, 0 is the default database.
1333#     redis-logical-db: 0
1334#     # redis replica server's IP address or host name
1335#     redis-replica-server-host: 127.0.0.1
1336#     # redis replica server's TCP port
1337#     redis-replica-server-port: 6379
1338#     # if the replica server uses a unix socket, set its path, or "" when not used.
1339#     redis-replica-server-path: "/var/lib/redis/redis-server.sock"
1340#     # if the replica server uses an AUTH password, specify here, or "" when not used.
1341#     redis-replica-server-password: ""
1342#     # timeout (in ms) for communication with the redis replica server
1343#     redis-replica-timeout: 100
1344#     # timeout (in ms) for redis replica commands, if 0, uses redis-replica-timeout.
1345#     redis-replica-command-timeout: 0
1346#     # timeout (in ms) for redis replica connection set up, if 0, uses redis-replica-timeout.
1347#     redis-replica-connect-timeout: 0
1348#     # redis logical database to use for the replica server, 0 is the default database.
1349#     redis-replica-logical-db: 0
1350
1351# IPSet
1352# Add specify domain into set via ipset.
1353# To enable:
1354# o use --enable-ipset to configure before compiling;
1355# o Unbound then needs to run as root user.
1356# ipset:
1357#     # set name for ip v4 addresses
1358#     name-v4: "list-v4"
1359#     # set name for ip v6 addresses
1360#     name-v6: "list-v6"
1361#
1362
1363# Dnstap logging support, if compiled in by using --enable-dnstap to configure.
1364# To enable, set the dnstap-enable to yes and also some of
1365# dnstap-log-..-messages to yes.  And select an upstream log destination, by
1366# socket path, TCP or TLS destination.
1367# dnstap:
1368# 	dnstap-enable: no
1369# 	# if set to yes frame streams will be used in bidirectional mode
1370# 	dnstap-bidirectional: yes
1371# 	dnstap-socket-path: "@DNSTAP_SOCKET_PATH@"
1372# 	# if "" use the unix socket in dnstap-socket-path, otherwise,
1373# 	# set it to "IPaddress[@port]" of the destination.
1374# 	dnstap-ip: ""
1375# 	# if set to yes if you want to use TLS to dnstap-ip, no for TCP.
1376# 	dnstap-tls: yes
1377# 	# name for authenticating the upstream server. or "" disabled.
1378# 	dnstap-tls-server-name: ""
1379# 	# if "", it uses the cert bundle from the main Unbound config.
1380# 	dnstap-tls-cert-bundle: ""
1381# 	# key file for client authentication, or "" disabled.
1382# 	dnstap-tls-client-key-file: ""
1383# 	# cert file for client authentication, or "" disabled.
1384# 	dnstap-tls-client-cert-file: ""
1385# 	dnstap-send-identity: no
1386# 	dnstap-send-version: no
1387# 	# if "" it uses the hostname.
1388# 	dnstap-identity: ""
1389# 	# if "" it uses the package version.
1390# 	dnstap-version: ""
1391# 	# log only 1/N messages, if 0 it is disabled. default 0.
1392# 	dnstap-sample-rate: 0
1393# 	dnstap-log-resolver-query-messages: no
1394# 	dnstap-log-resolver-response-messages: no
1395# 	dnstap-log-client-query-messages: no
1396# 	dnstap-log-client-response-messages: no
1397# 	dnstap-log-forwarder-query-messages: no
1398# 	dnstap-log-forwarder-response-messages: no
1399
1400# Response Policy Zones
1401# RPZ policies. Applied in order of configuration. Any match from an earlier
1402# RPZ zone will terminate the RPZ lookup. QNAME, Response IP
1403# Address, nsdname, nsip and clientip triggers are supported. Supported
1404# actions are: NXDOMAIN, NODATA, PASSTHRU, DROP, Local Data, tcp-only
1405# and drop.  Policies can be loaded from a file, or using zone
1406# transfer, or using HTTP. The respip module needs to be added
1407# to the module-config, e.g.: module-config: "respip validator iterator".
1408# rpz:
1409#     name: "rpz.example.com"
1410#     zonefile: "rpz.example.com"
1411#     primary: 192.0.2.0
1412#     allow-notify: 192.0.2.0/32
1413#     url: http://www.example.com/rpz.example.org.zone
1414#     rpz-action-override: cname
1415#     rpz-cname-override: www.example.org
1416#     rpz-log: yes
1417#     rpz-log-name: "example policy"
1418#     rpz-signal-nxdomain-ra: no
1419#     for-downstream: no
1420#     tags: "example"
1421