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