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