xref: /freebsd/contrib/unbound/doc/example.conf.in (revision 57bddd215c419a01611bca0d1b1d545a64a7e731)
1b7579f77SDag-Erling Smørgrav#
2b7579f77SDag-Erling Smørgrav# Example configuration file.
3b7579f77SDag-Erling Smørgrav#
4*57bddd21SDag-Erling Smørgrav# See unbound.conf(5) man page, version 1.7.0.
5b7579f77SDag-Erling Smørgrav#
6b7579f77SDag-Erling Smørgrav# this is a comment.
7b7579f77SDag-Erling Smørgrav
8b7579f77SDag-Erling Smørgrav#Use this to include other text into the file.
9b7579f77SDag-Erling Smørgrav#include: "otherfile.conf"
10b7579f77SDag-Erling Smørgrav
11b7579f77SDag-Erling Smørgrav# The server clause sets the main parameters.
12b7579f77SDag-Erling Smørgravserver:
13b7579f77SDag-Erling Smørgrav	# whitespace is not necessary, but looks cleaner.
14b7579f77SDag-Erling Smørgrav
15b7579f77SDag-Erling Smørgrav	# verbosity number, 0 is least verbose. 1 is default.
16b7579f77SDag-Erling Smørgrav	verbosity: 1
17b7579f77SDag-Erling Smørgrav
18b7579f77SDag-Erling Smørgrav	# print statistics to the log (for every thread) every N seconds.
19b7579f77SDag-Erling Smørgrav	# Set to "" or 0 to disable. Default is disabled.
20b7579f77SDag-Erling Smørgrav	# statistics-interval: 0
21b7579f77SDag-Erling Smørgrav
2265b390aaSDag-Erling Smørgrav	# enable shm for stats, default no.  if you enable also enable
2365b390aaSDag-Erling Smørgrav	# statistics-interval, every time it also writes stats to the
2465b390aaSDag-Erling Smørgrav	# shared memory segment keyed with shm-key.
2565b390aaSDag-Erling Smørgrav	# shm-enable: no
2665b390aaSDag-Erling Smørgrav
2765b390aaSDag-Erling Smørgrav	# shm for stats uses this key, and key+1 for the shared mem segment.
2865b390aaSDag-Erling Smørgrav	# shm-key: 11777
2965b390aaSDag-Erling Smørgrav
30b7579f77SDag-Erling Smørgrav	# enable cumulative statistics, without clearing them after printing.
31b7579f77SDag-Erling Smørgrav	# statistics-cumulative: no
32b7579f77SDag-Erling Smørgrav
33b7579f77SDag-Erling Smørgrav	# enable extended statistics (query types, answer codes, status)
34b7579f77SDag-Erling Smørgrav	# printed from unbound-control. default off, because of speed.
35b7579f77SDag-Erling Smørgrav	# extended-statistics: no
36b7579f77SDag-Erling Smørgrav
37b7579f77SDag-Erling Smørgrav	# number of threads to create. 1 disables threading.
38b7579f77SDag-Erling Smørgrav	# num-threads: 1
39b7579f77SDag-Erling Smørgrav
40b7579f77SDag-Erling Smørgrav	# specify the interfaces to answer queries from by ip-address.
41b7579f77SDag-Erling Smørgrav	# The default is to listen to localhost (127.0.0.1 and ::1).
42b7579f77SDag-Erling Smørgrav	# specify 0.0.0.0 and ::0 to bind to all available interfaces.
43b7579f77SDag-Erling Smørgrav	# specify every interface[@port] on a new 'interface:' labelled line.
44b7579f77SDag-Erling Smørgrav	# The listen interfaces are not changed on reload, only on restart.
45b7579f77SDag-Erling Smørgrav	# interface: 192.0.2.153
46b7579f77SDag-Erling Smørgrav	# interface: 192.0.2.154
47b7579f77SDag-Erling Smørgrav	# interface: 192.0.2.154@5003
48b7579f77SDag-Erling Smørgrav	# interface: 2001:DB8::5
49b7579f77SDag-Erling Smørgrav
50b7579f77SDag-Erling Smørgrav	# enable this feature to copy the source address of queries to reply.
51b7579f77SDag-Erling Smørgrav	# Socket options are not supported on all platforms. experimental.
52b7579f77SDag-Erling Smørgrav	# interface-automatic: no
53b7579f77SDag-Erling Smørgrav
54b7579f77SDag-Erling Smørgrav	# port to answer queries from
55b7579f77SDag-Erling Smørgrav	# port: 53
56b7579f77SDag-Erling Smørgrav
57b7579f77SDag-Erling Smørgrav	# specify the interfaces to send outgoing queries to authoritative
58b7579f77SDag-Erling Smørgrav	# server from by ip-address. If none, the default (all) interface
59b7579f77SDag-Erling Smørgrav	# is used. Specify every interface on a 'outgoing-interface:' line.
60b7579f77SDag-Erling Smørgrav	# outgoing-interface: 192.0.2.153
61b7579f77SDag-Erling Smørgrav	# outgoing-interface: 2001:DB8::5
62b7579f77SDag-Erling Smørgrav	# outgoing-interface: 2001:DB8::6
63b7579f77SDag-Erling Smørgrav
64b5663de9SDag-Erling Smørgrav	# Specify a netblock to use remainder 64 bits as random bits for
65b5663de9SDag-Erling Smørgrav	# upstream queries.  Uses freebind option (Linux).
66b5663de9SDag-Erling Smørgrav	# outgoing-interface: 2001:DB8::/64
67b5663de9SDag-Erling Smørgrav	# Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo
68b5663de9SDag-Erling Smørgrav	# And: ip -6 route add local 2001:db8::/64 dev lo
69b5663de9SDag-Erling Smørgrav	# And set prefer-ip6: yes to use the ip6 randomness from a netblock.
70b5663de9SDag-Erling Smørgrav	# Set this to yes to prefer ipv6 upstream servers over ipv4.
71b5663de9SDag-Erling Smørgrav	# prefer-ip6: no
72b5663de9SDag-Erling Smørgrav
73b7579f77SDag-Erling Smørgrav	# number of ports to allocate per thread, determines the size of the
74b7579f77SDag-Erling Smørgrav	# port range that can be open simultaneously.  About double the
75b7579f77SDag-Erling Smørgrav	# num-queries-per-thread, or, use as many as the OS will allow you.
76b7579f77SDag-Erling Smørgrav	# outgoing-range: 4096
77b7579f77SDag-Erling Smørgrav
78b7579f77SDag-Erling Smørgrav	# permit unbound to use this port number or port range for
79b7579f77SDag-Erling Smørgrav	# making outgoing queries, using an outgoing interface.
80b7579f77SDag-Erling Smørgrav	# outgoing-port-permit: 32768
81b7579f77SDag-Erling Smørgrav
82b7579f77SDag-Erling Smørgrav	# deny unbound the use this of port number or port range for
83b7579f77SDag-Erling Smørgrav	# making outgoing queries, using an outgoing interface.
84b7579f77SDag-Erling Smørgrav	# Use this to make sure unbound does not grab a UDP port that some
85b7579f77SDag-Erling Smørgrav	# other server on this computer needs. The default is to avoid
86b7579f77SDag-Erling Smørgrav	# IANA-assigned port numbers.
878ed2b524SDag-Erling Smørgrav	# If multiple outgoing-port-permit and outgoing-port-avoid options
888ed2b524SDag-Erling Smørgrav	# are present, they are processed in order.
89b7579f77SDag-Erling Smørgrav	# outgoing-port-avoid: "3200-3208"
90b7579f77SDag-Erling Smørgrav
91b7579f77SDag-Erling Smørgrav	# number of outgoing simultaneous tcp buffers to hold per thread.
92b7579f77SDag-Erling Smørgrav	# outgoing-num-tcp: 10
93b7579f77SDag-Erling Smørgrav
94b7579f77SDag-Erling Smørgrav	# number of incoming simultaneous tcp buffers to hold per thread.
95b7579f77SDag-Erling Smørgrav	# incoming-num-tcp: 10
96b7579f77SDag-Erling Smørgrav
97b7579f77SDag-Erling Smørgrav	# buffer size for UDP port 53 incoming (SO_RCVBUF socket option).
98b7579f77SDag-Erling Smørgrav	# 0 is system default.  Use 4m to catch query spikes for busy servers.
99b7579f77SDag-Erling Smørgrav	# so-rcvbuf: 0
100b7579f77SDag-Erling Smørgrav
101b7579f77SDag-Erling Smørgrav	# buffer size for UDP port 53 outgoing (SO_SNDBUF socket option).
102b7579f77SDag-Erling Smørgrav	# 0 is system default.  Use 4m to handle spikes on very busy servers.
103b7579f77SDag-Erling Smørgrav	# so-sndbuf: 0
104b7579f77SDag-Erling Smørgrav
105ff825849SDag-Erling Smørgrav	# use SO_REUSEPORT to distribute queries over threads.
10617d15b25SDag-Erling Smørgrav	# so-reuseport: no
10717d15b25SDag-Erling Smørgrav
10809a3aaf3SDag-Erling Smørgrav	# use IP_TRANSPARENT so the interface: addresses can be non-local
10909a3aaf3SDag-Erling Smørgrav	# and you can config non-existing IPs that are going to work later on
110f61ef7f6SDag-Erling Smørgrav	# (uses IP_BINDANY on FreeBSD).
11109a3aaf3SDag-Erling Smørgrav	# ip-transparent: no
11209a3aaf3SDag-Erling Smørgrav
113e2d15004SDag-Erling Smørgrav	# use IP_FREEBIND so the interface: addresses can be non-local
114e2d15004SDag-Erling Smørgrav	# and you can bind to nonexisting IPs and interfaces that are down.
115e2d15004SDag-Erling Smørgrav	# Linux only.  On Linux you also have ip-transparent that is similar.
116e2d15004SDag-Erling Smørgrav	# ip-freebind: no
117e2d15004SDag-Erling Smørgrav
118b7579f77SDag-Erling Smørgrav	# EDNS reassembly buffer to advertise to UDP peers (the actual buffer
119971980c3SDag-Erling Smørgrav	# is set with msg-buffer-size). 1472 can solve fragmentation (timeouts)
120b7579f77SDag-Erling Smørgrav	# edns-buffer-size: 4096
121b7579f77SDag-Erling Smørgrav
12217d15b25SDag-Erling Smørgrav	# Maximum UDP response size (not applied to TCP response).
12317d15b25SDag-Erling Smørgrav	# Suggested values are 512 to 4096. Default is 4096. 65536 disables it.
12417d15b25SDag-Erling Smørgrav	# max-udp-size: 4096
12517d15b25SDag-Erling Smørgrav
126b7579f77SDag-Erling Smørgrav	# buffer size for handling DNS data. No messages larger than this
127b7579f77SDag-Erling Smørgrav	# size can be sent or received, by UDP or TCP. In bytes.
128b7579f77SDag-Erling Smørgrav	# msg-buffer-size: 65552
129b7579f77SDag-Erling Smørgrav
130b7579f77SDag-Erling Smørgrav	# the amount of memory to use for the message cache.
131b7579f77SDag-Erling Smørgrav	# plain value in bytes or you can append k, m or G. default is "4Mb".
132b7579f77SDag-Erling Smørgrav	# msg-cache-size: 4m
133b7579f77SDag-Erling Smørgrav
134b7579f77SDag-Erling Smørgrav	# the number of slabs to use for the message cache.
135b7579f77SDag-Erling Smørgrav	# the number of slabs must be a power of 2.
136b7579f77SDag-Erling Smørgrav	# more slabs reduce lock contention, but fragment memory usage.
137b7579f77SDag-Erling Smørgrav	# msg-cache-slabs: 4
138b7579f77SDag-Erling Smørgrav
139b7579f77SDag-Erling Smørgrav	# the number of queries that a thread gets to service.
140b7579f77SDag-Erling Smørgrav	# num-queries-per-thread: 1024
141b7579f77SDag-Erling Smørgrav
142b7579f77SDag-Erling Smørgrav	# if very busy, 50% queries run to completion, 50% get timeout in msec
143b7579f77SDag-Erling Smørgrav	# jostle-timeout: 200
144b7579f77SDag-Erling Smørgrav
14517d15b25SDag-Erling Smørgrav	# msec to wait before close of port on timeout UDP. 0 disables.
14617d15b25SDag-Erling Smørgrav	# delay-close: 0
14717d15b25SDag-Erling Smørgrav
148b7579f77SDag-Erling Smørgrav	# the amount of memory to use for the RRset cache.
149b7579f77SDag-Erling Smørgrav	# plain value in bytes or you can append k, m or G. default is "4Mb".
150b7579f77SDag-Erling Smørgrav	# rrset-cache-size: 4m
151b7579f77SDag-Erling Smørgrav
152b7579f77SDag-Erling Smørgrav	# the number of slabs to use for the RRset cache.
153b7579f77SDag-Erling Smørgrav	# the number of slabs must be a power of 2.
154b7579f77SDag-Erling Smørgrav	# more slabs reduce lock contention, but fragment memory usage.
155b7579f77SDag-Erling Smørgrav	# rrset-cache-slabs: 4
156b7579f77SDag-Erling Smørgrav
157b7579f77SDag-Erling Smørgrav	# the time to live (TTL) value lower bound, in seconds. Default 0.
158b7579f77SDag-Erling Smørgrav	# If more than an hour could easily give trouble due to stale data.
159b7579f77SDag-Erling Smørgrav	# cache-min-ttl: 0
160b7579f77SDag-Erling Smørgrav
161b7579f77SDag-Erling Smørgrav	# the time to live (TTL) value cap for RRsets and messages in the
162b7579f77SDag-Erling Smørgrav	# cache. Items are not cached for longer. In seconds.
163b7579f77SDag-Erling Smørgrav	# cache-max-ttl: 86400
164b7579f77SDag-Erling Smørgrav
16509a3aaf3SDag-Erling Smørgrav	# the time to live (TTL) value cap for negative responses in the cache
16609a3aaf3SDag-Erling Smørgrav	# cache-max-negative-ttl: 3600
16709a3aaf3SDag-Erling Smørgrav
168b7579f77SDag-Erling Smørgrav	# the time to live (TTL) value for cached roundtrip times, lameness and
169b7579f77SDag-Erling Smørgrav	# EDNS version information for hosts. In seconds.
170b7579f77SDag-Erling Smørgrav	# infra-host-ttl: 900
171b7579f77SDag-Erling Smørgrav
1726480faa8SDag-Erling Smørgrav	# minimum wait time for responses, increase if uplink is long. In msec.
1736480faa8SDag-Erling Smørgrav	# infra-cache-min-rtt: 50
1746480faa8SDag-Erling Smørgrav
175b7579f77SDag-Erling Smørgrav	# the number of slabs to use for the Infrastructure cache.
176b7579f77SDag-Erling Smørgrav	# the number of slabs must be a power of 2.
177b7579f77SDag-Erling Smørgrav	# more slabs reduce lock contention, but fragment memory usage.
178b7579f77SDag-Erling Smørgrav	# infra-cache-slabs: 4
179b7579f77SDag-Erling Smørgrav
180b7579f77SDag-Erling Smørgrav	# the maximum number of hosts that are cached (roundtrip, EDNS, lame).
181b7579f77SDag-Erling Smørgrav	# infra-cache-numhosts: 10000
182b7579f77SDag-Erling Smørgrav
183b5663de9SDag-Erling Smørgrav	# define a number of tags here, use with local-zone, access-control.
184b5663de9SDag-Erling Smørgrav	# repeat the define-tag statement to add additional tags.
185b5663de9SDag-Erling Smørgrav	# define-tag: "tag1 tag2 tag3"
186b5663de9SDag-Erling Smørgrav
187b7579f77SDag-Erling Smørgrav	# Enable IPv4, "yes" or "no".
188b7579f77SDag-Erling Smørgrav	# do-ip4: yes
189b7579f77SDag-Erling Smørgrav
190b7579f77SDag-Erling Smørgrav	# Enable IPv6, "yes" or "no".
191b7579f77SDag-Erling Smørgrav	# do-ip6: yes
192b7579f77SDag-Erling Smørgrav
193b7579f77SDag-Erling Smørgrav	# Enable UDP, "yes" or "no".
194b7579f77SDag-Erling Smørgrav	# do-udp: yes
195b7579f77SDag-Erling Smørgrav
196b7579f77SDag-Erling Smørgrav	# Enable TCP, "yes" or "no".
197b7579f77SDag-Erling Smørgrav	# do-tcp: yes
198b7579f77SDag-Erling Smørgrav
199b7579f77SDag-Erling Smørgrav	# upstream connections use TCP only (and no UDP), "yes" or "no"
200b7579f77SDag-Erling Smørgrav	# useful for tunneling scenarios, default no.
201b7579f77SDag-Erling Smørgrav	# tcp-upstream: no
202b7579f77SDag-Erling Smørgrav
2038a384985SDag-Erling Smørgrav	# upstream connections also use UDP (even if do-udp is no).
2048a384985SDag-Erling Smørgrav	# useful if if you want UDP upstream, but don't provide UDP downstream.
2058a384985SDag-Erling Smørgrav	# udp-upstream-without-downstream: no
2068a384985SDag-Erling Smørgrav
207f61ef7f6SDag-Erling Smørgrav	# Maximum segment size (MSS) of TCP socket on which the server
208f61ef7f6SDag-Erling Smørgrav	# responds to queries. Default is 0, system default MSS.
209f61ef7f6SDag-Erling Smørgrav	# tcp-mss: 0
210f61ef7f6SDag-Erling Smørgrav
211f61ef7f6SDag-Erling Smørgrav	# Maximum segment size (MSS) of TCP socket for outgoing queries.
212f61ef7f6SDag-Erling Smørgrav	# Default is 0, system default MSS.
213f61ef7f6SDag-Erling Smørgrav	# outgoing-tcp-mss: 0
214f61ef7f6SDag-Erling Smørgrav
2153005e0a3SDag-Erling Smørgrav	# Use systemd socket activation for UDP, TCP, and control sockets.
2163005e0a3SDag-Erling Smørgrav	# use-systemd: no
2173005e0a3SDag-Erling Smørgrav
218b7579f77SDag-Erling Smørgrav	# Detach from the terminal, run in background, "yes" or "no".
2193005e0a3SDag-Erling Smørgrav	# Set the value to "no" when unbound runs as systemd service.
220b7579f77SDag-Erling Smørgrav	# do-daemonize: yes
221b7579f77SDag-Erling Smørgrav
222b7579f77SDag-Erling Smørgrav	# control which clients are allowed to make (recursive) queries
223b7579f77SDag-Erling Smørgrav	# to this server. Specify classless netblocks with /size and action.
224b7579f77SDag-Erling Smørgrav	# By default everything is refused, except for localhost.
225b7579f77SDag-Erling Smørgrav	# Choose deny (drop message), refuse (polite error reply),
226b7579f77SDag-Erling Smørgrav	# allow (recursive ok), allow_snoop (recursive and nonrecursive ok)
22717d15b25SDag-Erling Smørgrav	# deny_non_local (drop queries unless can be answered from local-data)
22817d15b25SDag-Erling Smørgrav	# refuse_non_local (like deny_non_local but polite error reply).
229b7579f77SDag-Erling Smørgrav	# access-control: 0.0.0.0/0 refuse
230b7579f77SDag-Erling Smørgrav	# access-control: 127.0.0.0/8 allow
231b7579f77SDag-Erling Smørgrav	# access-control: ::0/0 refuse
232b7579f77SDag-Erling Smørgrav	# access-control: ::1 allow
233b7579f77SDag-Erling Smørgrav	# access-control: ::ffff:127.0.0.1 allow
234b7579f77SDag-Erling Smørgrav
235b5663de9SDag-Erling Smørgrav	# tag access-control with list of tags (in "" with spaces between)
236b5663de9SDag-Erling Smørgrav	# Clients using this access control element use localzones that
237b5663de9SDag-Erling Smørgrav	# are tagged with one of these tags.
238b5663de9SDag-Erling Smørgrav	# access-control-tag: 192.0.2.0/24 "tag2 tag3"
239b5663de9SDag-Erling Smørgrav
240b5663de9SDag-Erling Smørgrav	# set action for particular tag for given access control element
241b5663de9SDag-Erling Smørgrav	# if you have multiple tag values, the tag used to lookup the action
242b5663de9SDag-Erling Smørgrav	# is the first tag match between access-control-tag and local-zone-tag
243b5663de9SDag-Erling Smørgrav	# where "first" comes from the order of the define-tag values.
244b5663de9SDag-Erling Smørgrav	# access-control-tag-action: 192.0.2.0/24 tag3 refuse
245b5663de9SDag-Erling Smørgrav
246b5663de9SDag-Erling Smørgrav	# set redirect data for particular tag for access control element
247b5663de9SDag-Erling Smørgrav	# access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1"
248b5663de9SDag-Erling Smørgrav
249bc892140SDag-Erling Smørgrav	# Set view for access control element
250bc892140SDag-Erling Smørgrav	# access-control-view: 192.0.2.0/24 viewname
251bc892140SDag-Erling Smørgrav
252b7579f77SDag-Erling Smørgrav	# if given, a chroot(2) is done to the given directory.
253b7579f77SDag-Erling Smørgrav	# i.e. you can chroot to the working directory, for example,
254b7579f77SDag-Erling Smørgrav	# for extra security, but make sure all files are in that directory.
255b7579f77SDag-Erling Smørgrav	#
256b7579f77SDag-Erling Smørgrav	# If chroot is enabled, you should pass the configfile (from the
257b7579f77SDag-Erling Smørgrav	# commandline) as a full path from the original root. After the
258b7579f77SDag-Erling Smørgrav	# chroot has been performed the now defunct portion of the config
259b7579f77SDag-Erling Smørgrav	# file path is removed to be able to reread the config after a reload.
260b7579f77SDag-Erling Smørgrav	#
261b7579f77SDag-Erling Smørgrav	# All other file paths (working dir, logfile, roothints, and
262b7579f77SDag-Erling Smørgrav	# key files) can be specified in several ways:
263b7579f77SDag-Erling Smørgrav	# 	o as an absolute path relative to the new root.
264b7579f77SDag-Erling Smørgrav	# 	o as a relative path to the working directory.
265b7579f77SDag-Erling Smørgrav	# 	o as an absolute path relative to the original root.
266b7579f77SDag-Erling Smørgrav	# In the last case the path is adjusted to remove the unused portion.
267b7579f77SDag-Erling Smørgrav	#
268b7579f77SDag-Erling Smørgrav	# The pid file can be absolute and outside of the chroot, it is
269b7579f77SDag-Erling Smørgrav	# written just prior to performing the chroot and dropping permissions.
270b7579f77SDag-Erling Smørgrav	#
271b7579f77SDag-Erling Smørgrav	# Additionally, unbound may need to access /dev/random (for entropy).
272b7579f77SDag-Erling Smørgrav	# How to do this is specific to your OS.
273b7579f77SDag-Erling Smørgrav	#
274b7579f77SDag-Erling Smørgrav	# If you give "" no chroot is performed. The path must not end in a /.
275b7579f77SDag-Erling Smørgrav	# chroot: "@UNBOUND_CHROOT_DIR@"
276b7579f77SDag-Erling Smørgrav
277b7579f77SDag-Erling Smørgrav	# if given, user privileges are dropped (after binding port),
278b7579f77SDag-Erling Smørgrav	# and the given username is assumed. Default is user "unbound".
279b7579f77SDag-Erling Smørgrav	# If you give "" no privileges are dropped.
280b7579f77SDag-Erling Smørgrav	# username: "@UNBOUND_USERNAME@"
281b7579f77SDag-Erling Smørgrav
282b7579f77SDag-Erling Smørgrav	# the working directory. The relative files in this config are
283b7579f77SDag-Erling Smørgrav	# relative to this directory. If you give "" the working directory
284b7579f77SDag-Erling Smørgrav	# is not changed.
285b5663de9SDag-Erling Smørgrav	# If you give a server: directory: dir before include: file statements
286b5663de9SDag-Erling Smørgrav	# then those includes can be relative to the working directory.
287b7579f77SDag-Erling Smørgrav	# directory: "@UNBOUND_RUN_DIR@"
288b7579f77SDag-Erling Smørgrav
289b7579f77SDag-Erling Smørgrav	# the log file, "" means log to stderr.
290b7579f77SDag-Erling Smørgrav	# Use of this option sets use-syslog to "no".
291b7579f77SDag-Erling Smørgrav	# logfile: ""
292b7579f77SDag-Erling Smørgrav
293b7579f77SDag-Erling Smørgrav	# Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
294bc892140SDag-Erling Smørgrav	# log to. If yes, it overrides the logfile.
295b7579f77SDag-Erling Smørgrav	# use-syslog: yes
296b7579f77SDag-Erling Smørgrav
297bc892140SDag-Erling Smørgrav	# Log identity to report. if empty, defaults to the name of argv[0]
298bc892140SDag-Erling Smørgrav	# (usually "unbound").
299bc892140SDag-Erling Smørgrav	# log-identity: ""
300bc892140SDag-Erling Smørgrav
301b7579f77SDag-Erling Smørgrav	# print UTC timestamp in ascii to logfile, default is epoch in seconds.
302b7579f77SDag-Erling Smørgrav	# log-time-ascii: no
303b7579f77SDag-Erling Smørgrav
304b7579f77SDag-Erling Smørgrav	# print one line with time, IP, name, type, class for every query.
305b7579f77SDag-Erling Smørgrav	# log-queries: no
306b7579f77SDag-Erling Smørgrav
3073005e0a3SDag-Erling Smørgrav	# print one line per reply, with time, IP, name, type, class, rcode,
3083005e0a3SDag-Erling Smørgrav	# timetoresolve, fromcache and responsesize.
3093005e0a3SDag-Erling Smørgrav	# log-replies: no
3103005e0a3SDag-Erling Smørgrav
311b7579f77SDag-Erling Smørgrav	# the pid file. Can be an absolute path outside of chroot/work dir.
312b7579f77SDag-Erling Smørgrav	# pidfile: "@UNBOUND_PIDFILE@"
313b7579f77SDag-Erling Smørgrav
314b7579f77SDag-Erling Smørgrav	# file to read root hints from.
31505ab2901SDag-Erling Smørgrav	# get one from https://www.internic.net/domain/named.cache
316b7579f77SDag-Erling Smørgrav	# root-hints: ""
317b7579f77SDag-Erling Smørgrav
318b7579f77SDag-Erling Smørgrav	# enable to not answer id.server and hostname.bind queries.
319b7579f77SDag-Erling Smørgrav	# hide-identity: no
320b7579f77SDag-Erling Smørgrav
321b7579f77SDag-Erling Smørgrav	# enable to not answer version.server and version.bind queries.
322b7579f77SDag-Erling Smørgrav	# hide-version: no
323b7579f77SDag-Erling Smørgrav
32465b390aaSDag-Erling Smørgrav	# enable to not answer trustanchor.unbound queries.
32565b390aaSDag-Erling Smørgrav	# hide-trustanchor: no
32665b390aaSDag-Erling Smørgrav
327b7579f77SDag-Erling Smørgrav	# the identity to report. Leave "" or default to return hostname.
328b7579f77SDag-Erling Smørgrav	# identity: ""
329b7579f77SDag-Erling Smørgrav
330b7579f77SDag-Erling Smørgrav	# the version to report. Leave "" or default to return package version.
331b7579f77SDag-Erling Smørgrav	# version: ""
332b7579f77SDag-Erling Smørgrav
333b7579f77SDag-Erling Smørgrav	# the target fetch policy.
334b7579f77SDag-Erling Smørgrav	# series of integers describing the policy per dependency depth.
335b7579f77SDag-Erling Smørgrav	# The number of values in the list determines the maximum dependency
336b7579f77SDag-Erling Smørgrav	# depth the recursor will pursue before giving up. Each integer means:
337b7579f77SDag-Erling Smørgrav	# 	-1 : fetch all targets opportunistically,
338b7579f77SDag-Erling Smørgrav	# 	0: fetch on demand,
339b7579f77SDag-Erling Smørgrav	#	positive value: fetch that many targets opportunistically.
340b7579f77SDag-Erling Smørgrav	# Enclose the list of numbers between quotes ("").
341b7579f77SDag-Erling Smørgrav	# target-fetch-policy: "3 2 1 0 0"
342b7579f77SDag-Erling Smørgrav
343b7579f77SDag-Erling Smørgrav	# Harden against very small EDNS buffer sizes.
344b7579f77SDag-Erling Smørgrav	# harden-short-bufsize: no
345b7579f77SDag-Erling Smørgrav
346b7579f77SDag-Erling Smørgrav	# Harden against unseemly large queries.
347b7579f77SDag-Erling Smørgrav	# harden-large-queries: no
348b7579f77SDag-Erling Smørgrav
349b7579f77SDag-Erling Smørgrav	# Harden against out of zone rrsets, to avoid spoofing attempts.
350b7579f77SDag-Erling Smørgrav	# harden-glue: yes
351b7579f77SDag-Erling Smørgrav
352b7579f77SDag-Erling Smørgrav	# Harden against receiving dnssec-stripped data. If you turn it
353b7579f77SDag-Erling Smørgrav	# off, failing to validate dnskey data for a trustanchor will
354b7579f77SDag-Erling Smørgrav	# trigger insecure mode for that zone (like without a trustanchor).
355b7579f77SDag-Erling Smørgrav	# Default on, which insists on dnssec data for trust-anchored zones.
356b7579f77SDag-Erling Smørgrav	# harden-dnssec-stripped: yes
357b7579f77SDag-Erling Smørgrav
358b7579f77SDag-Erling Smørgrav	# Harden against queries that fall under dnssec-signed nxdomain names.
359b7579f77SDag-Erling Smørgrav	# harden-below-nxdomain: no
360b7579f77SDag-Erling Smørgrav
361b7579f77SDag-Erling Smørgrav	# Harden the referral path by performing additional queries for
362b7579f77SDag-Erling Smørgrav	# infrastructure data.  Validates the replies (if possible).
363b7579f77SDag-Erling Smørgrav	# Default off, because the lookups burden the server.  Experimental
364b7579f77SDag-Erling Smørgrav	# implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
365b7579f77SDag-Erling Smørgrav	# harden-referral-path: no
366b7579f77SDag-Erling Smørgrav
36709a3aaf3SDag-Erling Smørgrav	# Harden against algorithm downgrade when multiple algorithms are
36809a3aaf3SDag-Erling Smørgrav	# advertised in the DS record.  If no, allows the weakest algorithm
36909a3aaf3SDag-Erling Smørgrav	# to validate the zone.
370b75612f8SDag-Erling Smørgrav	# harden-algo-downgrade: no
37109a3aaf3SDag-Erling Smørgrav
37205ab2901SDag-Erling Smørgrav	# Sent minimum amount of information to upstream servers to enhance
37305ab2901SDag-Erling Smørgrav	# privacy. Only sent minimum required labels of the QNAME and set QTYPE
374*57bddd21SDag-Erling Smørgrav	# to A when possible.
37505ab2901SDag-Erling Smørgrav	# qname-minimisation: no
37605ab2901SDag-Erling Smørgrav
377bc892140SDag-Erling Smørgrav	# QNAME minimisation in strict mode. Do not fall-back to sending full
378bc892140SDag-Erling Smørgrav	# QNAME to potentially broken nameservers. A lot of domains will not be
379bc892140SDag-Erling Smørgrav	# resolvable when this option in enabled.
380bc892140SDag-Erling Smørgrav	# This option only has effect when qname-minimisation is enabled.
381bc892140SDag-Erling Smørgrav	# qname-minimisation-strict: no
382bc892140SDag-Erling Smørgrav
383*57bddd21SDag-Erling Smørgrav	# Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN
384*57bddd21SDag-Erling Smørgrav	# and other denials, using information from previous NXDOMAINs answers.
385*57bddd21SDag-Erling Smørgrav	# aggressive-nsec: no
386*57bddd21SDag-Erling Smørgrav
387b7579f77SDag-Erling Smørgrav	# Use 0x20-encoded random bits in the query to foil spoof attempts.
388b7579f77SDag-Erling Smørgrav	# This feature is an experimental implementation of draft dns-0x20.
389b7579f77SDag-Erling Smørgrav	# use-caps-for-id: no
390b7579f77SDag-Erling Smørgrav
39109a3aaf3SDag-Erling Smørgrav	# Domains (and domains in them) without support for dns-0x20 and
39209a3aaf3SDag-Erling Smørgrav	# the fallback fails because they keep sending different answers.
39309a3aaf3SDag-Erling Smørgrav	# caps-whitelist: "licdn.com"
394b5663de9SDag-Erling Smørgrav	# caps-whitelist: "senderbase.org"
39509a3aaf3SDag-Erling Smørgrav
396b7579f77SDag-Erling Smørgrav	# Enforce privacy of these addresses. Strips them away from answers.
397b7579f77SDag-Erling Smørgrav	# It may cause DNSSEC validation to additionally mark it as bogus.
398b7579f77SDag-Erling Smørgrav	# Protects against 'DNS Rebinding' (uses browser as network proxy).
399b7579f77SDag-Erling Smørgrav	# Only 'private-domain' and 'local-data' names are allowed to have
400b7579f77SDag-Erling Smørgrav	# these private addresses. No default.
401b7579f77SDag-Erling Smørgrav	# private-address: 10.0.0.0/8
402b7579f77SDag-Erling Smørgrav	# private-address: 172.16.0.0/12
403b7579f77SDag-Erling Smørgrav	# private-address: 192.168.0.0/16
404b7579f77SDag-Erling Smørgrav	# private-address: 169.254.0.0/16
405b7579f77SDag-Erling Smørgrav	# private-address: fd00::/8
406b7579f77SDag-Erling Smørgrav	# private-address: fe80::/10
40705ab2901SDag-Erling Smørgrav	# private-address: ::ffff:0:0/96
408b7579f77SDag-Erling Smørgrav
409b7579f77SDag-Erling Smørgrav	# Allow the domain (and its subdomains) to contain private addresses.
410b7579f77SDag-Erling Smørgrav	# local-data statements are allowed to contain private addresses too.
411b7579f77SDag-Erling Smørgrav	# private-domain: "example.com"
412b7579f77SDag-Erling Smørgrav
413b7579f77SDag-Erling Smørgrav	# If nonzero, unwanted replies are not only reported in statistics,
414b7579f77SDag-Erling Smørgrav	# but also a running total is kept per thread. If it reaches the
415b7579f77SDag-Erling Smørgrav	# threshold, a warning is printed and a defensive action is taken,
416b7579f77SDag-Erling Smørgrav	# the cache is cleared to flush potential poison out of it.
417b7579f77SDag-Erling Smørgrav	# A suggested value is 10000000, the default is 0 (turned off).
418b7579f77SDag-Erling Smørgrav	# unwanted-reply-threshold: 0
419b7579f77SDag-Erling Smørgrav
420b7579f77SDag-Erling Smørgrav	# Do not query the following addresses. No DNS queries are sent there.
421b7579f77SDag-Erling Smørgrav	# List one address per entry. List classless netblocks with /size,
422b7579f77SDag-Erling Smørgrav	# do-not-query-address: 127.0.0.1/8
423b7579f77SDag-Erling Smørgrav	# do-not-query-address: ::1
424b7579f77SDag-Erling Smørgrav
425b7579f77SDag-Erling Smørgrav	# if yes, the above default do-not-query-address entries are present.
426b7579f77SDag-Erling Smørgrav	# if no, localhost can be queried (for testing and debugging).
427b7579f77SDag-Erling Smørgrav	# do-not-query-localhost: yes
428b7579f77SDag-Erling Smørgrav
429b7579f77SDag-Erling Smørgrav	# if yes, perform prefetching of almost expired message cache entries.
430b7579f77SDag-Erling Smørgrav	# prefetch: no
431b7579f77SDag-Erling Smørgrav
432b7579f77SDag-Erling Smørgrav	# if yes, perform key lookups adjacent to normal lookups.
433b7579f77SDag-Erling Smørgrav	# prefetch-key: no
434b7579f77SDag-Erling Smørgrav
435b7579f77SDag-Erling Smørgrav	# if yes, Unbound rotates RRSet order in response.
436b7579f77SDag-Erling Smørgrav	# rrset-roundrobin: no
437b7579f77SDag-Erling Smørgrav
438b7579f77SDag-Erling Smørgrav	# if yes, Unbound doesn't insert authority/additional sections
439b7579f77SDag-Erling Smørgrav	# into response messages when those sections are not required.
440b7579f77SDag-Erling Smørgrav	# minimal-responses: no
441b7579f77SDag-Erling Smørgrav
442e2d15004SDag-Erling Smørgrav	# true to disable DNSSEC lameness check in iterator.
443e2d15004SDag-Erling Smørgrav	# disable-dnssec-lame-check: no
444e2d15004SDag-Erling Smørgrav
445b7579f77SDag-Erling Smørgrav	# module configuration of the server. A string with identifiers
446ff825849SDag-Erling Smørgrav	# separated by spaces. Syntax: "[dns64] [validator] iterator"
447b7579f77SDag-Erling Smørgrav	# module-config: "validator iterator"
448b7579f77SDag-Erling Smørgrav
449b7579f77SDag-Erling Smørgrav	# File with trusted keys, kept uptodate using RFC5011 probes,
450b7579f77SDag-Erling Smørgrav	# initial file like trust-anchor-file, then it stores metadata.
451b7579f77SDag-Erling Smørgrav	# Use several entries, one per domain name, to track multiple zones.
452b7579f77SDag-Erling Smørgrav	#
453b7579f77SDag-Erling Smørgrav	# If you want to perform DNSSEC validation, run unbound-anchor before
454b7579f77SDag-Erling Smørgrav	# you start unbound (i.e. in the system boot scripts).  And enable:
455b7579f77SDag-Erling Smørgrav	# Please note usage of unbound-anchor root anchor is at your own risk
456b7579f77SDag-Erling Smørgrav	# and under the terms of our LICENSE (see that file in the source).
457b7579f77SDag-Erling Smørgrav	# auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
458b7579f77SDag-Erling Smørgrav
459c7f4d7adSDag-Erling Smørgrav	# trust anchor signaling sends a RFC8145 key tag query after priming.
4608a384985SDag-Erling Smørgrav	# trust-anchor-signaling: yes
461c7f4d7adSDag-Erling Smørgrav
462b7579f77SDag-Erling Smørgrav	# File with DLV trusted keys. Same format as trust-anchor-file.
463b7579f77SDag-Erling Smørgrav	# There can be only one DLV configured, it is trusted from root down.
46409a3aaf3SDag-Erling Smørgrav	# DLV is going to be decommissioned.  Please do not use it any more.
465b7579f77SDag-Erling Smørgrav	# dlv-anchor-file: "dlv.isc.org.key"
466b7579f77SDag-Erling Smørgrav
467b7579f77SDag-Erling Smørgrav	# File with trusted keys for validation. Specify more than one file
468b7579f77SDag-Erling Smørgrav	# with several entries, one file per entry.
469b7579f77SDag-Erling Smørgrav	# Zone file format, with DS and DNSKEY entries.
470b7579f77SDag-Erling Smørgrav	# Note this gets out of date, use auto-trust-anchor-file please.
471b7579f77SDag-Erling Smørgrav	# trust-anchor-file: ""
472b7579f77SDag-Erling Smørgrav
473b7579f77SDag-Erling Smørgrav	# Trusted key for validation. DS or DNSKEY. specify the RR on a
474b7579f77SDag-Erling Smørgrav	# single line, surrounded by "". TTL is ignored. class is IN default.
475b7579f77SDag-Erling Smørgrav	# Note this gets out of date, use auto-trust-anchor-file please.
476b7579f77SDag-Erling Smørgrav	# (These examples are from August 2007 and may not be valid anymore).
477b7579f77SDag-Erling Smørgrav	# trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
478b7579f77SDag-Erling Smørgrav	# trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
479b7579f77SDag-Erling Smørgrav
480b7579f77SDag-Erling Smørgrav	# File with trusted keys for validation. Specify more than one file
481b7579f77SDag-Erling Smørgrav	# with several entries, one file per entry. Like trust-anchor-file
482b7579f77SDag-Erling Smørgrav	# but has a different file format. Format is BIND-9 style format,
483b7579f77SDag-Erling Smørgrav	# the trusted-keys { name flag proto algo "key"; }; clauses are read.
484b7579f77SDag-Erling Smørgrav	# you need external update procedures to track changes in keys.
485b7579f77SDag-Erling Smørgrav	# trusted-keys-file: ""
486b7579f77SDag-Erling Smørgrav
487b7579f77SDag-Erling Smørgrav	# Ignore chain of trust. Domain is treated as insecure.
488b7579f77SDag-Erling Smørgrav	# domain-insecure: "example.com"
489b7579f77SDag-Erling Smørgrav
490b7579f77SDag-Erling Smørgrav	# Override the date for validation with a specific fixed date.
491b7579f77SDag-Erling Smørgrav	# Do not set this unless you are debugging signature inception
492b7579f77SDag-Erling Smørgrav	# and expiration. "" or "0" turns the feature off. -1 ignores date.
493b7579f77SDag-Erling Smørgrav	# val-override-date: ""
494b7579f77SDag-Erling Smørgrav
495b7579f77SDag-Erling Smørgrav	# The time to live for bogus data, rrsets and messages. This avoids
496b7579f77SDag-Erling Smørgrav	# some of the revalidation, until the time interval expires. in secs.
497b7579f77SDag-Erling Smørgrav	# val-bogus-ttl: 60
498b7579f77SDag-Erling Smørgrav
499b7579f77SDag-Erling Smørgrav	# The signature inception and expiration dates are allowed to be off
500b7579f77SDag-Erling Smørgrav	# by 10% of the signature lifetime (expir-incep) from our local clock.
501b7579f77SDag-Erling Smørgrav	# This leeway is capped with a minimum and a maximum.  In seconds.
502b7579f77SDag-Erling Smørgrav	# val-sig-skew-min: 3600
503b7579f77SDag-Erling Smørgrav	# val-sig-skew-max: 86400
504b7579f77SDag-Erling Smørgrav
505b7579f77SDag-Erling Smørgrav	# Should additional section of secure message also be kept clean of
506b7579f77SDag-Erling Smørgrav	# unsecure data. Useful to shield the users of this validator from
507b7579f77SDag-Erling Smørgrav	# potential bogus data in the additional section. All unsigned data
508b7579f77SDag-Erling Smørgrav	# in the additional section is removed from secure messages.
509b7579f77SDag-Erling Smørgrav	# val-clean-additional: yes
510b7579f77SDag-Erling Smørgrav
511b7579f77SDag-Erling Smørgrav	# Turn permissive mode on to permit bogus messages. Thus, messages
512b7579f77SDag-Erling Smørgrav	# for which security checks failed will be returned to clients,
513b7579f77SDag-Erling Smørgrav	# instead of SERVFAIL. It still performs the security checks, which
514b7579f77SDag-Erling Smørgrav	# result in interesting log files and possibly the AD bit in
515b7579f77SDag-Erling Smørgrav	# replies if the message is found secure. The default is off.
516b7579f77SDag-Erling Smørgrav	# val-permissive-mode: no
517b7579f77SDag-Erling Smørgrav
518b7579f77SDag-Erling Smørgrav	# Ignore the CD flag in incoming queries and refuse them bogus data.
519b7579f77SDag-Erling Smørgrav	# Enable it if the only clients of unbound are legacy servers (w2008)
520b7579f77SDag-Erling Smørgrav	# that set CD but cannot validate themselves.
521b7579f77SDag-Erling Smørgrav	# ignore-cd-flag: no
522b7579f77SDag-Erling Smørgrav
5238a384985SDag-Erling Smørgrav	# Serve expired responses from cache, with TTL 0 in the response,
524bc892140SDag-Erling Smørgrav	# and then attempt to fetch the data afresh.
525bc892140SDag-Erling Smørgrav	# serve-expired: no
526bc892140SDag-Erling Smørgrav
527b7579f77SDag-Erling Smørgrav	# Have the validator log failed validations for your diagnosis.
528b7579f77SDag-Erling Smørgrav	# 0: off. 1: A line per failed user query. 2: With reason and bad IP.
529b7579f77SDag-Erling Smørgrav	# val-log-level: 0
530b7579f77SDag-Erling Smørgrav
531b7579f77SDag-Erling Smørgrav	# It is possible to configure NSEC3 maximum iteration counts per
532b7579f77SDag-Erling Smørgrav	# keysize. Keep this table very short, as linear search is done.
533b7579f77SDag-Erling Smørgrav	# A message with an NSEC3 with larger count is marked insecure.
534b7579f77SDag-Erling Smørgrav	# List in ascending order the keysize and count values.
535b7579f77SDag-Erling Smørgrav	# val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
536b7579f77SDag-Erling Smørgrav
537b7579f77SDag-Erling Smørgrav	# instruct the auto-trust-anchor-file probing to add anchors after ttl.
538b7579f77SDag-Erling Smørgrav	# add-holddown: 2592000 # 30 days
539b7579f77SDag-Erling Smørgrav
540b7579f77SDag-Erling Smørgrav	# instruct the auto-trust-anchor-file probing to del anchors after ttl.
541b7579f77SDag-Erling Smørgrav	# del-holddown: 2592000 # 30 days
542b7579f77SDag-Erling Smørgrav
543b7579f77SDag-Erling Smørgrav	# auto-trust-anchor-file probing removes missing anchors after ttl.
544b7579f77SDag-Erling Smørgrav	# If the value 0 is given, missing anchors are not removed.
545b7579f77SDag-Erling Smørgrav	# keep-missing: 31622400 # 366 days
546b7579f77SDag-Erling Smørgrav
547e2d15004SDag-Erling Smørgrav	# debug option that allows very small holddown times for key rollover,
548e2d15004SDag-Erling Smørgrav	# otherwise the RFC mandates probe intervals must be at least 1 hour.
549b75612f8SDag-Erling Smørgrav	# permit-small-holddown: no
550b75612f8SDag-Erling Smørgrav
551b7579f77SDag-Erling Smørgrav	# the amount of memory to use for the key cache.
552b7579f77SDag-Erling Smørgrav	# plain value in bytes or you can append k, m or G. default is "4Mb".
553b7579f77SDag-Erling Smørgrav	# key-cache-size: 4m
554b7579f77SDag-Erling Smørgrav
555b7579f77SDag-Erling Smørgrav	# the number of slabs to use for the key cache.
556b7579f77SDag-Erling Smørgrav	# the number of slabs must be a power of 2.
557b7579f77SDag-Erling Smørgrav	# more slabs reduce lock contention, but fragment memory usage.
558b7579f77SDag-Erling Smørgrav	# key-cache-slabs: 4
559b7579f77SDag-Erling Smørgrav
560b7579f77SDag-Erling Smørgrav	# the amount of memory to use for the negative cache (used for DLV).
561b7579f77SDag-Erling Smørgrav	# plain value in bytes or you can append k, m or G. default is "1Mb".
562b7579f77SDag-Erling Smørgrav	# neg-cache-size: 1m
563b7579f77SDag-Erling Smørgrav
56417d15b25SDag-Erling Smørgrav	# By default, for a number of zones a small default 'nothing here'
56517d15b25SDag-Erling Smørgrav	# reply is built-in.  Query traffic is thus blocked.  If you
56617d15b25SDag-Erling Smørgrav	# wish to serve such zone you can unblock them by uncommenting one
56717d15b25SDag-Erling Smørgrav	# of the nodefault statements below.
56817d15b25SDag-Erling Smørgrav	# You may also have to use domain-insecure: zone to make DNSSEC work,
56917d15b25SDag-Erling Smørgrav	# unless you have your own trust anchors for this zone.
57017d15b25SDag-Erling Smørgrav	# local-zone: "localhost." nodefault
57117d15b25SDag-Erling Smørgrav	# local-zone: "127.in-addr.arpa." nodefault
57217d15b25SDag-Erling Smørgrav	# 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
573f61ef7f6SDag-Erling Smørgrav	# local-zone: "onion." nodefault
574971980c3SDag-Erling Smørgrav	# local-zone: "test." nodefault
575971980c3SDag-Erling Smørgrav	# local-zone: "invalid." nodefault
57617d15b25SDag-Erling Smørgrav	# local-zone: "10.in-addr.arpa." nodefault
57717d15b25SDag-Erling Smørgrav	# local-zone: "16.172.in-addr.arpa." nodefault
57817d15b25SDag-Erling Smørgrav	# local-zone: "17.172.in-addr.arpa." nodefault
57917d15b25SDag-Erling Smørgrav	# local-zone: "18.172.in-addr.arpa." nodefault
58017d15b25SDag-Erling Smørgrav	# local-zone: "19.172.in-addr.arpa." nodefault
58117d15b25SDag-Erling Smørgrav	# local-zone: "20.172.in-addr.arpa." nodefault
58217d15b25SDag-Erling Smørgrav	# local-zone: "21.172.in-addr.arpa." nodefault
58317d15b25SDag-Erling Smørgrav	# local-zone: "22.172.in-addr.arpa." nodefault
58417d15b25SDag-Erling Smørgrav	# local-zone: "23.172.in-addr.arpa." nodefault
58517d15b25SDag-Erling Smørgrav	# local-zone: "24.172.in-addr.arpa." nodefault
58617d15b25SDag-Erling Smørgrav	# local-zone: "25.172.in-addr.arpa." nodefault
58717d15b25SDag-Erling Smørgrav	# local-zone: "26.172.in-addr.arpa." nodefault
58817d15b25SDag-Erling Smørgrav	# local-zone: "27.172.in-addr.arpa." nodefault
58917d15b25SDag-Erling Smørgrav	# local-zone: "28.172.in-addr.arpa." nodefault
59017d15b25SDag-Erling Smørgrav	# local-zone: "29.172.in-addr.arpa." nodefault
59117d15b25SDag-Erling Smørgrav	# local-zone: "30.172.in-addr.arpa." nodefault
59217d15b25SDag-Erling Smørgrav	# local-zone: "31.172.in-addr.arpa." nodefault
59317d15b25SDag-Erling Smørgrav	# local-zone: "168.192.in-addr.arpa." nodefault
59417d15b25SDag-Erling Smørgrav	# local-zone: "0.in-addr.arpa." nodefault
59517d15b25SDag-Erling Smørgrav	# local-zone: "254.169.in-addr.arpa." nodefault
59617d15b25SDag-Erling Smørgrav	# local-zone: "2.0.192.in-addr.arpa." nodefault
59717d15b25SDag-Erling Smørgrav	# local-zone: "100.51.198.in-addr.arpa." nodefault
59817d15b25SDag-Erling Smørgrav	# local-zone: "113.0.203.in-addr.arpa." nodefault
59917d15b25SDag-Erling Smørgrav	# local-zone: "255.255.255.255.in-addr.arpa." nodefault
60017d15b25SDag-Erling Smørgrav	# 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
60117d15b25SDag-Erling Smørgrav	# local-zone: "d.f.ip6.arpa." nodefault
60217d15b25SDag-Erling Smørgrav	# local-zone: "8.e.f.ip6.arpa." nodefault
60317d15b25SDag-Erling Smørgrav	# local-zone: "9.e.f.ip6.arpa." nodefault
60417d15b25SDag-Erling Smørgrav	# local-zone: "a.e.f.ip6.arpa." nodefault
60517d15b25SDag-Erling Smørgrav	# local-zone: "b.e.f.ip6.arpa." nodefault
60617d15b25SDag-Erling Smørgrav	# local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
607ff825849SDag-Erling Smørgrav	# And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa.
608ff825849SDag-Erling Smørgrav
6090de4f1bfSDag-Erling Smørgrav	# If unbound is running service for the local host then it is useful
610ff825849SDag-Erling Smørgrav	# to perform lan-wide lookups to the upstream, and unblock the
611ff825849SDag-Erling Smørgrav	# long list of local-zones above.  If this unbound is a dns server
612ff825849SDag-Erling Smørgrav	# for a network of computers, disabled is better and stops information
613ff825849SDag-Erling Smørgrav	# leakage of local lan information.
614ff825849SDag-Erling Smørgrav	# unblock-lan-zones: no
61517d15b25SDag-Erling Smørgrav
6160de4f1bfSDag-Erling Smørgrav	# The insecure-lan-zones option disables validation for
6170de4f1bfSDag-Erling Smørgrav	# these zones, as if they were all listed as domain-insecure.
6180de4f1bfSDag-Erling Smørgrav	# insecure-lan-zones: no
6190de4f1bfSDag-Erling Smørgrav
620b7579f77SDag-Erling Smørgrav	# a number of locally served zones can be configured.
621b7579f77SDag-Erling Smørgrav	# 	local-zone: <zone> <type>
622b7579f77SDag-Erling Smørgrav	# 	local-data: "<resource record string>"
623b7579f77SDag-Erling Smørgrav	# o deny serves local data (if any), else, drops queries.
624b7579f77SDag-Erling Smørgrav	# o refuse serves local data (if any), else, replies with error.
625b7579f77SDag-Erling Smørgrav	# o static serves local data, else, nxdomain or nodata answer.
626b7579f77SDag-Erling Smørgrav	# o transparent gives local data, but resolves normally for other names
627b7579f77SDag-Erling Smørgrav	# o redirect serves the zone data for any subdomain in the zone.
628b7579f77SDag-Erling Smørgrav	# o nodefault can be used to normally resolve AS112 zones.
629b7579f77SDag-Erling Smørgrav	# o typetransparent resolves normally for other types and other names
630bc892140SDag-Erling Smørgrav	# o inform acts like transparent, but logs client IP address
63109a3aaf3SDag-Erling Smørgrav	# o inform_deny drops queries and logs client IP address
632b5663de9SDag-Erling Smørgrav	# o always_transparent, always_refuse, always_nxdomain, resolve in
633b5663de9SDag-Erling Smørgrav	#   that way but ignore local data for that name.
634*57bddd21SDag-Erling Smørgrav	# o noview breaks out of that view towards global local-zones.
635b7579f77SDag-Erling Smørgrav	#
636b7579f77SDag-Erling Smørgrav	# defaults are localhost address, reverse for 127.0.0.1 and ::1
637b7579f77SDag-Erling Smørgrav	# and nxdomain for AS112 zones. If you configure one of these zones
638b7579f77SDag-Erling Smørgrav	# the default content is omitted, or you can omit it with 'nodefault'.
639b7579f77SDag-Erling Smørgrav	#
640b7579f77SDag-Erling Smørgrav	# If you configure local-data without specifying local-zone, by
641b7579f77SDag-Erling Smørgrav	# default a transparent local-zone is created for the data.
642b7579f77SDag-Erling Smørgrav	#
643b7579f77SDag-Erling Smørgrav	# You can add locally served data with
644b7579f77SDag-Erling Smørgrav	# local-zone: "local." static
645b7579f77SDag-Erling Smørgrav	# local-data: "mycomputer.local. IN A 192.0.2.51"
646b7579f77SDag-Erling Smørgrav	# local-data: 'mytext.local TXT "content of text record"'
647b7579f77SDag-Erling Smørgrav	#
648b7579f77SDag-Erling Smørgrav	# You can override certain queries with
649b7579f77SDag-Erling Smørgrav	# local-data: "adserver.example.com A 127.0.0.1"
650b7579f77SDag-Erling Smørgrav	#
651b7579f77SDag-Erling Smørgrav	# You can redirect a domain to a fixed address with
652b7579f77SDag-Erling Smørgrav	# (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
653b7579f77SDag-Erling Smørgrav	# local-zone: "example.com" redirect
654b7579f77SDag-Erling Smørgrav	# local-data: "example.com A 192.0.2.3"
655b7579f77SDag-Erling Smørgrav	#
656b7579f77SDag-Erling Smørgrav	# Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
657b7579f77SDag-Erling Smørgrav	# You can also add PTR records using local-data directly, but then
658b7579f77SDag-Erling Smørgrav	# you need to do the reverse notation yourself.
659b7579f77SDag-Erling Smørgrav	# local-data-ptr: "192.0.2.3 www.example.com"
660b7579f77SDag-Erling Smørgrav
661b5663de9SDag-Erling Smørgrav	# tag a localzone with a list of tag names (in "" with spaces between)
662b5663de9SDag-Erling Smørgrav	# local-zone-tag: "example.com" "tag2 tag3"
663b5663de9SDag-Erling Smørgrav
664b5663de9SDag-Erling Smørgrav	# add a netblock specific override to a localzone, with zone type
665b5663de9SDag-Erling Smørgrav	# local-zone-override: "example.com" 192.0.2.0/24 refuse
666b5663de9SDag-Erling Smørgrav
667b7579f77SDag-Erling Smørgrav	# service clients over SSL (on the TCP sockets), with plain DNS inside
668b7579f77SDag-Erling Smørgrav	# the SSL stream.  Give the certificate to use and private key.
669b7579f77SDag-Erling Smørgrav	# default is "" (disabled).  requires restart to take effect.
670*57bddd21SDag-Erling Smørgrav	# tls-service-key: "path/to/privatekeyfile.key"
671*57bddd21SDag-Erling Smørgrav	# tls-service-pem: "path/to/publiccertfile.pem"
672*57bddd21SDag-Erling Smørgrav	# tls-port: 853
673b7579f77SDag-Erling Smørgrav
674b7579f77SDag-Erling Smørgrav	# request upstream over SSL (with plain DNS inside the SSL stream).
675b7579f77SDag-Erling Smørgrav	# Default is no.  Can be turned on and off with unbound-control.
676*57bddd21SDag-Erling Smørgrav	# tls-upstream: no
677*57bddd21SDag-Erling Smørgrav
678*57bddd21SDag-Erling Smørgrav	# Certificates used to authenticate connections made upstream.
679*57bddd21SDag-Erling Smørgrav	# tls-cert-bundle: ""
680b7579f77SDag-Erling Smørgrav
681ff825849SDag-Erling Smørgrav	# DNS64 prefix. Must be specified when DNS64 is use.
682ff825849SDag-Erling Smørgrav	# Enable dns64 in module-config.  Used to synthesize IPv6 from IPv4.
683ff825849SDag-Erling Smørgrav	# dns64-prefix: 64:ff9b::0/96
684ff825849SDag-Erling Smørgrav
68509a3aaf3SDag-Erling Smørgrav	# ratelimit for uncached, new queries, this limits recursion effort.
68609a3aaf3SDag-Erling Smørgrav	# ratelimiting is experimental, and may help against randomqueryflood.
68709a3aaf3SDag-Erling Smørgrav	# if 0(default) it is disabled, otherwise state qps allowed per zone.
68809a3aaf3SDag-Erling Smørgrav	# ratelimit: 0
68909a3aaf3SDag-Erling Smørgrav
69009a3aaf3SDag-Erling Smørgrav	# ratelimits are tracked in a cache, size in bytes of cache (or k,m).
69109a3aaf3SDag-Erling Smørgrav	# ratelimit-size: 4m
69209a3aaf3SDag-Erling Smørgrav	# ratelimit cache slabs, reduces lock contention if equal to cpucount.
69309a3aaf3SDag-Erling Smørgrav	# ratelimit-slabs: 4
69409a3aaf3SDag-Erling Smørgrav
69509a3aaf3SDag-Erling Smørgrav	# 0 blocks when ratelimited, otherwise let 1/xth traffic through
69609a3aaf3SDag-Erling Smørgrav	# ratelimit-factor: 10
69709a3aaf3SDag-Erling Smørgrav
69809a3aaf3SDag-Erling Smørgrav	# override the ratelimit for a specific domain name.
69909a3aaf3SDag-Erling Smørgrav	# give this setting multiple times to have multiple overrides.
70009a3aaf3SDag-Erling Smørgrav	# ratelimit-for-domain: example.com 1000
70109a3aaf3SDag-Erling Smørgrav	# override the ratelimits for all domains below a domain name
70209a3aaf3SDag-Erling Smørgrav	# can give this multiple times, the name closest to the zone is used.
703b5663de9SDag-Erling Smørgrav	# ratelimit-below-domain: com 1000
70409a3aaf3SDag-Erling Smørgrav
7053005e0a3SDag-Erling Smørgrav	# global query ratelimit for all ip addresses.
7063005e0a3SDag-Erling Smørgrav	# feature is experimental.
7073005e0a3SDag-Erling Smørgrav	# if 0(default) it is disabled, otherwise states qps allowed per ip address
7083005e0a3SDag-Erling Smørgrav	# ip-ratelimit: 0
7093005e0a3SDag-Erling Smørgrav
7103005e0a3SDag-Erling Smørgrav	# ip ratelimits are tracked in a cache, size in bytes of cache (or k,m).
7113005e0a3SDag-Erling Smørgrav	# ip-ratelimit-size: 4m
7123005e0a3SDag-Erling Smørgrav	# ip ratelimit cache slabs, reduces lock contention if equal to cpucount.
7133005e0a3SDag-Erling Smørgrav	# ip-ratelimit-slabs: 4
7143005e0a3SDag-Erling Smørgrav
7153005e0a3SDag-Erling Smørgrav	# 0 blocks when ip is ratelimited, otherwise let 1/xth traffic through
7163005e0a3SDag-Erling Smørgrav	# ip-ratelimit-factor: 10
7173005e0a3SDag-Erling Smørgrav
718c7f4d7adSDag-Erling Smørgrav	# Specific options for ipsecmod. unbound needs to be configured with
719c7f4d7adSDag-Erling Smørgrav	# --enable-ipsecmod for these to take effect.
720c7f4d7adSDag-Erling Smørgrav	#
721c7f4d7adSDag-Erling Smørgrav	# Enable or disable ipsecmod (it still needs to be defined in
722c7f4d7adSDag-Erling Smørgrav	# module-config above). Can be used when ipsecmod needs to be
723c7f4d7adSDag-Erling Smørgrav	# enabled/disabled via remote-control(below).
724c7f4d7adSDag-Erling Smørgrav	# ipsecmod-enabled: yes
725c7f4d7adSDag-Erling Smørgrav	#
726c7f4d7adSDag-Erling Smørgrav	# Path to executable external hook. It must be defined when ipsecmod is
727c7f4d7adSDag-Erling Smørgrav	# listed in module-config (above).
728c7f4d7adSDag-Erling Smørgrav	# ipsecmod-hook: "./my_executable"
729c7f4d7adSDag-Erling Smørgrav	#
730c7f4d7adSDag-Erling Smørgrav	# When enabled unbound will reply with SERVFAIL if the return value of
731c7f4d7adSDag-Erling Smørgrav	# the ipsecmod-hook is not 0.
732c7f4d7adSDag-Erling Smørgrav	# ipsecmod-strict: no
733c7f4d7adSDag-Erling Smørgrav	#
734c7f4d7adSDag-Erling Smørgrav	# Maximum time to live (TTL) for cached A/AAAA records with IPSECKEY.
735c7f4d7adSDag-Erling Smørgrav	# ipsecmod-max-ttl: 3600
736c7f4d7adSDag-Erling Smørgrav	#
737c7f4d7adSDag-Erling Smørgrav	# Reply with A/AAAA even if the relevant IPSECKEY is bogus. Mainly used for
738c7f4d7adSDag-Erling Smørgrav	# testing.
739c7f4d7adSDag-Erling Smørgrav	# ipsecmod-ignore-bogus: no
740c7f4d7adSDag-Erling Smørgrav	#
741c7f4d7adSDag-Erling Smørgrav	# Domains for which ipsecmod will be triggered. If not defined (default)
742c7f4d7adSDag-Erling Smørgrav	# all domains are treated as being whitelisted.
743c7f4d7adSDag-Erling Smørgrav	# ipsecmod-whitelist: "example.com"
744c7f4d7adSDag-Erling Smørgrav	# ipsecmod-whitelist: "nlnetlabs.nl"
745c7f4d7adSDag-Erling Smørgrav
7463005e0a3SDag-Erling Smørgrav
747b7579f77SDag-Erling Smørgrav# Python config section. To enable:
748b7579f77SDag-Erling Smørgrav# o use --with-pythonmodule to configure before compiling.
749b7579f77SDag-Erling Smørgrav# o list python in the module-config string (above) to enable.
750b7579f77SDag-Erling Smørgrav# o and give a python-script to run.
751b7579f77SDag-Erling Smørgravpython:
752b7579f77SDag-Erling Smørgrav	# Script file to load
753b7579f77SDag-Erling Smørgrav	# python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py"
754b7579f77SDag-Erling Smørgrav
755b7579f77SDag-Erling Smørgrav# Remote control config section.
756b7579f77SDag-Erling Smørgravremote-control:
757b7579f77SDag-Erling Smørgrav	# Enable remote control with unbound-control(8) here.
758b7579f77SDag-Erling Smørgrav	# set up the keys and certificates with unbound-control-setup.
759b7579f77SDag-Erling Smørgrav	# control-enable: no
760b7579f77SDag-Erling Smørgrav
7616480faa8SDag-Erling Smørgrav	# Set to no and use an absolute path as control-interface to use
7626480faa8SDag-Erling Smørgrav	# a unix local named pipe for unbound-control.
7636480faa8SDag-Erling Smørgrav	# control-use-cert: yes
7646480faa8SDag-Erling Smørgrav
765b7579f77SDag-Erling Smørgrav	# what interfaces are listened to for remote control.
766b7579f77SDag-Erling Smørgrav	# give 0.0.0.0 and ::0 to listen to all interfaces.
767b7579f77SDag-Erling Smørgrav	# control-interface: 127.0.0.1
768b7579f77SDag-Erling Smørgrav	# control-interface: ::1
769b7579f77SDag-Erling Smørgrav
770b7579f77SDag-Erling Smørgrav	# port number for remote control operations.
771b7579f77SDag-Erling Smørgrav	# control-port: 8953
772b7579f77SDag-Erling Smørgrav
773b7579f77SDag-Erling Smørgrav	# unbound server key file.
774b7579f77SDag-Erling Smørgrav	# server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key"
775b7579f77SDag-Erling Smørgrav
776b7579f77SDag-Erling Smørgrav	# unbound server certificate file.
777b7579f77SDag-Erling Smørgrav	# server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem"
778b7579f77SDag-Erling Smørgrav
779b7579f77SDag-Erling Smørgrav	# unbound-control key file.
780b7579f77SDag-Erling Smørgrav	# control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key"
781b7579f77SDag-Erling Smørgrav
782b7579f77SDag-Erling Smørgrav	# unbound-control certificate file.
783b7579f77SDag-Erling Smørgrav	# control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem"
784b7579f77SDag-Erling Smørgrav
785b7579f77SDag-Erling Smørgrav# Stub zones.
786b7579f77SDag-Erling Smørgrav# Create entries like below, to make all queries for 'example.com' and
787b7579f77SDag-Erling Smørgrav# 'example.org' go to the given list of nameservers. list zero or more
788b7579f77SDag-Erling Smørgrav# nameservers by hostname or by ipaddress. If you set stub-prime to yes,
789b7579f77SDag-Erling Smørgrav# the list is treated as priming hints (default is no).
790b7579f77SDag-Erling Smørgrav# With stub-first yes, it attempts without the stub if it fails.
791b75612f8SDag-Erling Smørgrav# Consider adding domain-insecure: name and local-zone: name nodefault
792b75612f8SDag-Erling Smørgrav# to the server: section if the stub is a locally served zone.
793b7579f77SDag-Erling Smørgrav# stub-zone:
794b7579f77SDag-Erling Smørgrav#	name: "example.com"
795b7579f77SDag-Erling Smørgrav#	stub-addr: 192.0.2.68
796b7579f77SDag-Erling Smørgrav#	stub-prime: no
797b7579f77SDag-Erling Smørgrav#	stub-first: no
798*57bddd21SDag-Erling Smørgrav#	stub-tls-upstream: no
799b7579f77SDag-Erling Smørgrav# stub-zone:
800b7579f77SDag-Erling Smørgrav#	name: "example.org"
801b7579f77SDag-Erling Smørgrav#	stub-host: ns.example.com.
802b7579f77SDag-Erling Smørgrav
803b7579f77SDag-Erling Smørgrav# Forward zones
804b7579f77SDag-Erling Smørgrav# Create entries like below, to make all queries for 'example.com' and
805b7579f77SDag-Erling Smørgrav# 'example.org' go to the given list of servers. These servers have to handle
806b7579f77SDag-Erling Smørgrav# recursion to other nameservers. List zero or more nameservers by hostname
807b7579f77SDag-Erling Smørgrav# or by ipaddress. Use an entry with name "." to forward all queries.
808b7579f77SDag-Erling Smørgrav# If you enable forward-first, it attempts without the forward if it fails.
809b7579f77SDag-Erling Smørgrav# forward-zone:
810b7579f77SDag-Erling Smørgrav# 	name: "example.com"
811b7579f77SDag-Erling Smørgrav# 	forward-addr: 192.0.2.68
812b7579f77SDag-Erling Smørgrav# 	forward-addr: 192.0.2.73@5355  # forward to port 5355.
813b7579f77SDag-Erling Smørgrav# 	forward-first: no
814*57bddd21SDag-Erling Smørgrav# 	forward-tls-upstream: no
815b7579f77SDag-Erling Smørgrav# forward-zone:
816b7579f77SDag-Erling Smørgrav# 	name: "example.org"
817b7579f77SDag-Erling Smørgrav# 	forward-host: fwd.example.com
818bc892140SDag-Erling Smørgrav
819*57bddd21SDag-Erling Smørgrav# Authority zones
820*57bddd21SDag-Erling Smørgrav# The data for these zones is kept locally, from a file or downloaded.
821*57bddd21SDag-Erling Smørgrav# The data can be served to downstream clients, or used instead of the
822*57bddd21SDag-Erling Smørgrav# upstream (which saves a lookup to the upstream).  The first example
823*57bddd21SDag-Erling Smørgrav# has a copy of the root for local usage.  The second serves example.org
824*57bddd21SDag-Erling Smørgrav# authoritatively.  zonefile: reads from file (and writes to it if you also
825*57bddd21SDag-Erling Smørgrav# download it), master: fetches with AXFR and IXFR, or url to zonefile.
826*57bddd21SDag-Erling Smørgrav# auth-zone:
827*57bddd21SDag-Erling Smørgrav#	name: "."
828*57bddd21SDag-Erling Smørgrav#	for-downstream: no
829*57bddd21SDag-Erling Smørgrav#	for-upstream: yes
830*57bddd21SDag-Erling Smørgrav#	fallback-enabled: yes
831*57bddd21SDag-Erling Smørgrav#	master: b.root-servers.net
832*57bddd21SDag-Erling Smørgrav#	master: c.root-servers.net
833*57bddd21SDag-Erling Smørgrav#	master: e.root-servers.net
834*57bddd21SDag-Erling Smørgrav#	master: f.root-servers.net
835*57bddd21SDag-Erling Smørgrav#	master: g.root-servers.net
836*57bddd21SDag-Erling Smørgrav#	master: k.root-servers.net
837*57bddd21SDag-Erling Smørgrav# auth-zone:
838*57bddd21SDag-Erling Smørgrav#	name: "example.org"
839*57bddd21SDag-Erling Smørgrav#	for-downstream: yes
840*57bddd21SDag-Erling Smørgrav#	for-upstream: yes
841*57bddd21SDag-Erling Smørgrav#	zonefile: "example.org.zone"
842*57bddd21SDag-Erling Smørgrav
843bc892140SDag-Erling Smørgrav# Views
844bc892140SDag-Erling Smørgrav# Create named views. Name must be unique. Map views to requests using
845bc892140SDag-Erling Smørgrav# the access-control-view option. Views can contain zero or more local-zone
846bc892140SDag-Erling Smørgrav# and local-data options. Options from matching views will override global
847bc892140SDag-Erling Smørgrav# options. Global options will be used if no matching view is found.
848bc892140SDag-Erling Smørgrav# With view-first yes, it will try to answer using the global local-zone and
849bc892140SDag-Erling Smørgrav# local-data elements if there is no view specific match.
850bc892140SDag-Erling Smørgrav# view:
851bc892140SDag-Erling Smørgrav#	name: "viewname"
852bc892140SDag-Erling Smørgrav#	local-zone: "example.com" redirect
853bc892140SDag-Erling Smørgrav#	local-data: "example.com A 192.0.2.3"
85465b390aaSDag-Erling Smørgrav# 	local-data-ptr: "192.0.2.3 www.example.com"
855bc892140SDag-Erling Smørgrav#	view-first: no
856bc892140SDag-Erling Smørgrav# view:
857bc892140SDag-Erling Smørgrav#	name: "anotherview"
858bc892140SDag-Erling Smørgrav#	local-zone: "example.com" refuse
85965b390aaSDag-Erling Smørgrav
86065b390aaSDag-Erling Smørgrav# DNSCrypt
86165b390aaSDag-Erling Smørgrav# Caveats:
86265b390aaSDag-Erling Smørgrav# 1. the keys/certs cannot be produced by unbound. You can use dnscrypt-wrapper
86365b390aaSDag-Erling Smørgrav#   for this: https://github.com/cofyc/dnscrypt-wrapper/blob/master/README.md#usage
86465b390aaSDag-Erling Smørgrav# 2. dnscrypt channel attaches to an interface. you MUST set interfaces to
86565b390aaSDag-Erling Smørgrav#   listen on `dnscrypt-port` with the follo0wing snippet:
86665b390aaSDag-Erling Smørgrav# server:
86765b390aaSDag-Erling Smørgrav#     interface: 0.0.0.0@443
86865b390aaSDag-Erling Smørgrav#     interface: ::0@443
86965b390aaSDag-Erling Smørgrav#
87065b390aaSDag-Erling Smørgrav# Finally, `dnscrypt` config has its own section.
87165b390aaSDag-Erling Smørgrav# dnscrypt:
87265b390aaSDag-Erling Smørgrav#     dnscrypt-enable: yes
87365b390aaSDag-Erling Smørgrav#     dnscrypt-port: 443
87465b390aaSDag-Erling Smørgrav#     dnscrypt-provider: 2.dnscrypt-cert.example.com.
87565b390aaSDag-Erling Smørgrav#     dnscrypt-secret-key: /path/unbound-conf/keys1/1.key
87665b390aaSDag-Erling Smørgrav#     dnscrypt-secret-key: /path/unbound-conf/keys2/1.key
87765b390aaSDag-Erling Smørgrav#     dnscrypt-provider-cert: /path/unbound-conf/keys1/1.cert
87865b390aaSDag-Erling Smørgrav#     dnscrypt-provider-cert: /path/unbound-conf/keys2/1.cert
879971980c3SDag-Erling Smørgrav
880971980c3SDag-Erling Smørgrav# CacheDB
881971980c3SDag-Erling Smørgrav# Enable external backend DB as auxiliary cache.  Specify the backend name
882971980c3SDag-Erling Smørgrav# (default is "testframe", which has no use other than for debugging and
883971980c3SDag-Erling Smørgrav# testing) and backend-specific options.  The 'cachedb' module must be
884971980c3SDag-Erling Smørgrav# included in module-config.
885971980c3SDag-Erling Smørgrav# cachedb:
886971980c3SDag-Erling Smørgrav#     backend: "testframe"
887971980c3SDag-Erling Smørgrav#     # secret seed string to calculate hashed keys
888971980c3SDag-Erling Smørgrav#     secret-seed: "default"
889