example.conf revision 307729
1145256Sjkoshy#
2177107Sjkoshy# Example configuration file.
3145256Sjkoshy#
4145256Sjkoshy# See unbound.conf(5) man page, version 1.5.10.
5145256Sjkoshy#
6145256Sjkoshy# this is a comment.
7145256Sjkoshy
8145256Sjkoshy#Use this to include other text into the file.
9145256Sjkoshy#include: "otherfile.conf"
10145256Sjkoshy
11145256Sjkoshy# The server clause sets the main parameters.
12145256Sjkoshyserver:
13145256Sjkoshy	# whitespace is not necessary, but looks cleaner.
14145256Sjkoshy
15145256Sjkoshy	# verbosity number, 0 is least verbose. 1 is default.
16145256Sjkoshy	verbosity: 1
17145256Sjkoshy
18145256Sjkoshy	# print statistics to the log (for every thread) every N seconds.
19145256Sjkoshy	# Set to "" or 0 to disable. Default is disabled.
20145256Sjkoshy	# statistics-interval: 0
21145256Sjkoshy
22145256Sjkoshy	# enable cumulative statistics, without clearing them after printing.
23145256Sjkoshy	# statistics-cumulative: no
24145256Sjkoshy
25145256Sjkoshy	# enable extended statistics (query types, answer codes, status)
26145256Sjkoshy	# printed from unbound-control. default off, because of speed.
27145256Sjkoshy	# extended-statistics: no
28145256Sjkoshy
29145256Sjkoshy	# number of threads to create. 1 disables threading.
30145256Sjkoshy	# num-threads: 1
31261342Sjhibbits
32145256Sjkoshy	# specify the interfaces to answer queries from by ip-address.
33145256Sjkoshy	# The default is to listen to localhost (127.0.0.1 and ::1).
34145256Sjkoshy	# specify 0.0.0.0 and ::0 to bind to all available interfaces.
35145256Sjkoshy	# specify every interface[@port] on a new 'interface:' labelled line.
36145256Sjkoshy	# The listen interfaces are not changed on reload, only on restart.
37145256Sjkoshy	# interface: 192.0.2.153
38145256Sjkoshy	# interface: 192.0.2.154
39145256Sjkoshy	# interface: 192.0.2.154@5003
40145256Sjkoshy	# interface: 2001:DB8::5
41145256Sjkoshy
42145256Sjkoshy	# enable this feature to copy the source address of queries to reply.
43145256Sjkoshy	# Socket options are not supported on all platforms. experimental.
44145256Sjkoshy	# interface-automatic: no
45145256Sjkoshy
46185363Sjkoshy	# port to answer queries from
47185363Sjkoshy	# port: 53
48145256Sjkoshy
49145340Smarcel	# specify the interfaces to send outgoing queries to authoritative
50145256Sjkoshy	# server from by ip-address. If none, the default (all) interface
51145256Sjkoshy	# is used. Specify every interface on a 'outgoing-interface:' line.
52147191Sjkoshy	# outgoing-interface: 192.0.2.153
53147759Sjkoshy	# outgoing-interface: 2001:DB8::5
54185363Sjkoshy	# outgoing-interface: 2001:DB8::6
55185363Sjkoshy	
56185363Sjkoshy	# Specify a netblock to use remainder 64 bits as random bits for
57185363Sjkoshy	# upstream queries.  Uses freebind option (Linux).
58206089Sfabient	# outgoing-interface: 2001:DB8::/64
59206089Sfabient	# Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo
60206089Sfabient	# And: ip -6 route add local 2001:db8::/64 dev lo
61206089Sfabient	# And set prefer-ip6: yes to use the ip6 randomness from a netblock.
62147191Sjkoshy	# Set this to yes to prefer ipv6 upstream servers over ipv4.
63145256Sjkoshy	# prefer-ip6: no
64147759Sjkoshy
65147759Sjkoshy	# number of ports to allocate per thread, determines the size of the
66147191Sjkoshy	# port range that can be open simultaneously.  About double the
67147191Sjkoshy	# num-queries-per-thread, or, use as many as the OS will allow you.
68145256Sjkoshy	# outgoing-range: 4096
69145256Sjkoshy
70147191Sjkoshy	# permit unbound to use this port number or port range for
71145256Sjkoshy	# making outgoing queries, using an outgoing interface.
72145256Sjkoshy	# outgoing-port-permit: 32768
73183725Sjkoshy
74183725Sjkoshy	# deny unbound the use this of port number or port range for
75183725Sjkoshy	# making outgoing queries, using an outgoing interface.
76183725Sjkoshy	# Use this to make sure unbound does not grab a UDP port that some
77277835Sbr	# other server on this computer needs. The default is to avoid
78200928Srpaulo	# IANA-assigned port numbers.
79200928Srpaulo	# If multiple outgoing-port-permit and outgoing-port-avoid options
80200928Srpaulo	# are present, they are processed in order.
81200928Srpaulo	# outgoing-port-avoid: "3200-3208"
82277835Sbr
83277835Sbr	# number of outgoing simultaneous tcp buffers to hold per thread.
84277835Sbr	# outgoing-num-tcp: 10
85283112Sbr
86283112Sbr	# number of incoming simultaneous tcp buffers to hold per thread.
87283112Sbr	# incoming-num-tcp: 10
88283112Sbr
89204635Sgnn	# buffer size for UDP port 53 incoming (SO_RCVBUF socket option).
90233320Sgonzo	# 0 is system default.  Use 4m to catch query spikes for busy servers.
91204635Sgnn	# so-rcvbuf: 0
92204635Sgnn
93233628Sfabient	# buffer size for UDP port 53 outgoing (SO_SNDBUF socket option).
94233628Sfabient	# 0 is system default.  Use 4m to handle spikes on very busy servers.
95204635Sgnn	# so-sndbuf: 0
96228869Sjhibbits
97261342Sjhibbits	# use SO_REUSEPORT to distribute queries over threads.
98228869Sjhibbits	# so-reuseport: no
99228869Sjhibbits
100204635Sgnn	# use IP_TRANSPARENT so the interface: addresses can be non-local
101145256Sjkoshy	# and you can config non-existing IPs that are going to work later on
102145256Sjkoshy	# (uses IP_BINDANY on FreeBSD).
103145256Sjkoshy	# ip-transparent: no
104145256Sjkoshy
105145256Sjkoshy	# use IP_FREEBIND so the interface: addresses can be non-local
106145256Sjkoshy	# and you can bind to nonexisting IPs and interfaces that are down.
107145256Sjkoshy	# Linux only.  On Linux you also have ip-transparent that is similar.
108145256Sjkoshy	# ip-freebind: no
109145256Sjkoshy
110145256Sjkoshy	# EDNS reassembly buffer to advertise to UDP peers (the actual buffer
111145256Sjkoshy	# is set with msg-buffer-size). 1480 can solve fragmentation (timeouts).
112145256Sjkoshy	# edns-buffer-size: 4096
113145256Sjkoshy
114145256Sjkoshy	# Maximum UDP response size (not applied to TCP response).
115145256Sjkoshy	# Suggested values are 512 to 4096. Default is 4096. 65536 disables it.
116145256Sjkoshy	# max-udp-size: 4096
117145256Sjkoshy
118183725Sjkoshy	# buffer size for handling DNS data. No messages larger than this
119145256Sjkoshy	# size can be sent or received, by UDP or TCP. In bytes.
120145256Sjkoshy	# msg-buffer-size: 65552
121145256Sjkoshy
122145256Sjkoshy	# the amount of memory to use for the message cache.
123145256Sjkoshy	# plain value in bytes or you can append k, m or G. default is "4Mb".
124145256Sjkoshy	# msg-cache-size: 4m
125145256Sjkoshy
126183725Sjkoshy	# the number of slabs to use for the message cache.
127183725Sjkoshy	# the number of slabs must be a power of 2.
128183725Sjkoshy	# more slabs reduce lock contention, but fragment memory usage.
129183725Sjkoshy	# msg-cache-slabs: 4
130183725Sjkoshy
131183725Sjkoshy	# the number of queries that a thread gets to service.
132183725Sjkoshy	# num-queries-per-thread: 1024
133183725Sjkoshy
134183725Sjkoshy	# if very busy, 50% queries run to completion, 50% get timeout in msec
135183725Sjkoshy	# jostle-timeout: 200
136183725Sjkoshy
137183725Sjkoshy	# msec to wait before close of port on timeout UDP. 0 disables.
138183725Sjkoshy	# delay-close: 0
139183725Sjkoshy
140183725Sjkoshy	# the amount of memory to use for the RRset cache.
141183725Sjkoshy	# plain value in bytes or you can append k, m or G. default is "4Mb".
142183725Sjkoshy	# rrset-cache-size: 4m
143183725Sjkoshy
144183725Sjkoshy	# the number of slabs to use for the RRset cache.
145183725Sjkoshy	# the number of slabs must be a power of 2.
146183725Sjkoshy	# more slabs reduce lock contention, but fragment memory usage.
147185363Sjkoshy	# rrset-cache-slabs: 4
148183725Sjkoshy
149185363Sjkoshy	# the time to live (TTL) value lower bound, in seconds. Default 0.
150183725Sjkoshy	# If more than an hour could easily give trouble due to stale data.
151185363Sjkoshy	# cache-min-ttl: 0
152183725Sjkoshy
153183725Sjkoshy	# the time to live (TTL) value cap for RRsets and messages in the
154183725Sjkoshy	# cache. Items are not cached for longer. In seconds.
155185363Sjkoshy	# cache-max-ttl: 86400
156185363Sjkoshy
157185363Sjkoshy	# the time to live (TTL) value cap for negative responses in the cache
158185363Sjkoshy	# cache-max-negative-ttl: 3600
159185363Sjkoshy
160185363Sjkoshy	# the time to live (TTL) value for cached roundtrip times, lameness and
161185363Sjkoshy	# EDNS version information for hosts. In seconds.
162185363Sjkoshy	# infra-host-ttl: 900
163200928Srpaulo
164277835Sbr	# minimum wait time for responses, increase if uplink is long. In msec.
165283112Sbr	# infra-cache-min-rtt: 50
166204635Sgnn
167281098Sadrian	# the number of slabs to use for the Infrastructure cache.
168233335Sgonzo	# the number of slabs must be a power of 2.
169206089Sfabient	# more slabs reduce lock contention, but fragment memory usage.
170228869Sjhibbits	# infra-cache-slabs: 4
171261342Sjhibbits
172281713Sjhibbits	# the maximum number of hosts that are cached (roundtrip, EDNS, lame).
173185363Sjkoshy	# infra-cache-numhosts: 10000
174233628Sfabient	
175233628Sfabient	# define a number of tags here, use with local-zone, access-control.
176185363Sjkoshy	# repeat the define-tag statement to add additional tags.
177185363Sjkoshy	# define-tag: "tag1 tag2 tag3"
178185363Sjkoshy
179185363Sjkoshy	# Enable IPv4, "yes" or "no".
180185363Sjkoshy	# do-ip4: yes
181185363Sjkoshy
182185363Sjkoshy	# Enable IPv6, "yes" or "no".
183185363Sjkoshy	# do-ip6: yes
184263446Shiren
185263446Shiren	# Enable UDP, "yes" or "no".
186263446Shiren	# do-udp: yes
187263446Shiren
188263446Shiren	# Enable TCP, "yes" or "no".
189185363Sjkoshy	# do-tcp: yes
190185363Sjkoshy
191185363Sjkoshy	# upstream connections use TCP only (and no UDP), "yes" or "no"
192185363Sjkoshy	# useful for tunneling scenarios, default no.
193185363Sjkoshy	# tcp-upstream: no
194185363Sjkoshy
195185363Sjkoshy	# Maximum segment size (MSS) of TCP socket on which the server
196185363Sjkoshy	# responds to queries. Default is 0, system default MSS.
197185363Sjkoshy	# tcp-mss: 0
198185363Sjkoshy
199185363Sjkoshy	# Maximum segment size (MSS) of TCP socket for outgoing queries.
200187761Sjeff	# Default is 0, system default MSS.
201187761Sjeff	# outgoing-tcp-mss: 0
202187761Sjeff
203187761Sjeff	# Detach from the terminal, run in background, "yes" or "no".
204187761Sjeff	# do-daemonize: yes
205267062Skib
206267062Skib	# control which clients are allowed to make (recursive) queries
207267062Skib	# to this server. Specify classless netblocks with /size and action.
208267062Skib	# By default everything is refused, except for localhost.
209267062Skib	# Choose deny (drop message), refuse (polite error reply),
210248842Ssbruno	# allow (recursive ok), allow_snoop (recursive and nonrecursive ok)
211248842Ssbruno	# deny_non_local (drop queries unless can be answered from local-data)
212248842Ssbruno	# refuse_non_local (like deny_non_local but polite error reply).
213248842Ssbruno	# access-control: 0.0.0.0/0 refuse
214248842Ssbruno	# access-control: 127.0.0.0/8 allow
215277177Srrs	# access-control: ::0/0 refuse
216277177Srrs	# access-control: ::1 allow
217277177Srrs	# access-control: ::ffff:127.0.0.1 allow
218277177Srrs
219277177Srrs	# tag access-control with list of tags (in "" with spaces between)
220291494Srrs	# Clients using this access control element use localzones that
221291494Srrs	# are tagged with one of these tags.
222291494Srrs	# access-control-tag: 192.0.2.0/24 "tag2 tag3"
223291494Srrs
224277177Srrs	# set action for particular tag for given access control element
225291494Srrs	# if you have multiple tag values, the tag used to lookup the action
226291494Srrs	# is the first tag match between access-control-tag and local-zone-tag
227291494Srrs	# where "first" comes from the order of the define-tag values.
228291494Srrs	# access-control-tag-action: 192.0.2.0/24 tag3 refuse
229291494Srrs
230291494Srrs	# set redirect data for particular tag for access control element
231291494Srrs	# access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1"
232291494Srrs
233291494Srrs	# if given, a chroot(2) is done to the given directory.
234291494Srrs	# i.e. you can chroot to the working directory, for example,
235240164Sfabient	# for extra security, but make sure all files are in that directory.
236240164Sfabient	#
237240164Sfabient	# If chroot is enabled, you should pass the configfile (from the
238240164Sfabient	# commandline) as a full path from the original root. After the
239240164Sfabient	# chroot has been performed the now defunct portion of the config
240246166Ssbruno	# file path is removed to be able to reread the config after a reload.
241246166Ssbruno	#
242246166Ssbruno	# All other file paths (working dir, logfile, roothints, and
243246166Ssbruno	# key files) can be specified in several ways:
244246166Ssbruno	# 	o as an absolute path relative to the new root.
245232366Sdavide	# 	o as a relative path to the working directory.
246232366Sdavide	# 	o as an absolute path relative to the original root.
247232366Sdavide	# In the last case the path is adjusted to remove the unused portion.
248232366Sdavide	#
249232366Sdavide	# The pid file can be absolute and outside of the chroot, it is
250241738Ssbruno	# written just prior to performing the chroot and dropping permissions.
251241738Ssbruno	#
252241738Ssbruno	# Additionally, unbound may need to access /dev/random (for entropy).
253241738Ssbruno	# How to do this is specific to your OS.
254241738Ssbruno	#
255206089Sfabient	# If you give "" no chroot is performed. The path must not end in a /.
256206089Sfabient	# chroot: "/var/unbound"
257206089Sfabient
258206089Sfabient	# if given, user privileges are dropped (after binding port),
259206089Sfabient	# and the given username is assumed. Default is user "unbound".
260267062Skib	# If you give "" no privileges are dropped.
261267062Skib	# username: "unbound"
262267062Skib
263267062Skib	# the working directory. The relative files in this config are
264267062Skib	# relative to this directory. If you give "" the working directory
265206089Sfabient	# is not changed.
266206089Sfabient	# If you give a server: directory: dir before include: file statements
267206089Sfabient	# then those includes can be relative to the working directory.
268206089Sfabient	# directory: "/var/unbound"
269206089Sfabient
270248842Ssbruno	# the log file, "" means log to stderr.
271248842Ssbruno	# Use of this option sets use-syslog to "no".
272248842Ssbruno	# logfile: ""
273248842Ssbruno
274248842Ssbruno	# Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
275291494Srrs	# log to, with identity "unbound". If yes, it overrides the logfile.
276291494Srrs	# use-syslog: yes
277291494Srrs
278291494Srrs	# print UTC timestamp in ascii to logfile, default is epoch in seconds.
279291494Srrs	# log-time-ascii: no
280232366Sdavide
281232366Sdavide	# print one line with time, IP, name, type, class for every query.
282232366Sdavide	# log-queries: no
283232366Sdavide
284232366Sdavide	# the pid file. Can be an absolute path outside of chroot/work dir.
285206089Sfabient	# pidfile: "/var/unbound/unbound.pid"
286206089Sfabient
287206089Sfabient	# file to read root hints from.
288206089Sfabient	# get one from https://www.internic.net/domain/named.cache
289206089Sfabient	# root-hints: ""
290284218Sbr
291284218Sbr	# enable to not answer id.server and hostname.bind queries.
292284218Sbr	# hide-identity: no
293284218Sbr
294284218Sbr	# enable to not answer version.server and version.bind queries.
295284218Sbr	# hide-version: no
296284218Sbr
297284218Sbr	# the identity to report. Leave "" or default to return hostname.
298284218Sbr	# identity: ""
299284218Sbr
300283112Sbr	# the version to report. Leave "" or default to return package version.
301283112Sbr	# version: ""
302283112Sbr
303283112Sbr	# the target fetch policy.
304283112Sbr	# series of integers describing the policy per dependency depth.
305283112Sbr	# The number of values in the list determines the maximum dependency
306283112Sbr	# depth the recursor will pursue before giving up. Each integer means:
307283112Sbr	# 	-1 : fetch all targets opportunistically,
308283112Sbr	# 	0: fetch on demand,
309283112Sbr	#	positive value: fetch that many targets opportunistically.
310185363Sjkoshy	# Enclose the list of numbers between quotes ("").
311185363Sjkoshy	# target-fetch-policy: "3 2 1 0 0"
312185363Sjkoshy
313185363Sjkoshy	# Harden against very small EDNS buffer sizes.
314185363Sjkoshy	# harden-short-bufsize: no
315185363Sjkoshy
316183725Sjkoshy	# Harden against unseemly large queries.
317183725Sjkoshy	# harden-large-queries: no
318183725Sjkoshy
319183725Sjkoshy	# Harden against out of zone rrsets, to avoid spoofing attempts.
320233628Sfabient	# harden-glue: yes
321263446Shiren
322233628Sfabient	# Harden against receiving dnssec-stripped data. If you turn it
323233628Sfabient	# off, failing to validate dnskey data for a trustanchor will
324233628Sfabient	# trigger insecure mode for that zone (like without a trustanchor).
325267062Skib	# Default on, which insists on dnssec data for trust-anchored zones.
326248842Ssbruno	# harden-dnssec-stripped: yes
327277177Srrs
328291494Srrs	# Harden against queries that fall under dnssec-signed nxdomain names.
329291494Srrs	# harden-below-nxdomain: no
330291494Srrs
331240164Sfabient        # Harden the referral path by performing additional queries for
332246166Ssbruno	# infrastructure data.  Validates the replies (if possible).
333233628Sfabient	# Default off, because the lookups burden the server.  Experimental
334241738Ssbruno	# implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
335233628Sfabient	# harden-referral-path: no
336267062Skib
337233628Sfabient	# Harden against algorithm downgrade when multiple algorithms are
338233628Sfabient	# advertised in the DS record.  If no, allows the weakest algorithm
339233628Sfabient	# to validate the zone.
340233628Sfabient	# harden-algo-downgrade: no
341233628Sfabient
342233628Sfabient	# Sent minimum amount of information to upstream servers to enhance
343284218Sbr	# privacy. Only sent minimum required labels of the QNAME and set QTYPE
344284218Sbr	# to NS when possible.
345283112Sbr	# qname-minimisation: no
346283112Sbr
347233628Sfabient	# Use 0x20-encoded random bits in the query to foil spoof attempts.
348281098Sadrian	# This feature is an experimental implementation of draft dns-0x20.
349233628Sfabient	# use-caps-for-id: no
350281713Sjhibbits
351281713Sjhibbits	# Domains (and domains in them) without support for dns-0x20 and
352281713Sjhibbits	# the fallback fails because they keep sending different answers.
353233628Sfabient	# caps-whitelist: "licdn.com"
354183725Sjkoshy	# caps-whitelist: "senderbase.org"
355183725Sjkoshy
356145256Sjkoshy	# Enforce privacy of these addresses. Strips them away from answers.
357183725Sjkoshy	# It may cause DNSSEC validation to additionally mark it as bogus.
358145256Sjkoshy	# Protects against 'DNS Rebinding' (uses browser as network proxy).
359145256Sjkoshy	# Only 'private-domain' and 'local-data' names are allowed to have
360183725Sjkoshy	# these private addresses. No default.
361185363Sjkoshy	# private-address: 10.0.0.0/8
362185363Sjkoshy	# private-address: 172.16.0.0/12
363185363Sjkoshy	# private-address: 192.168.0.0/16
364185363Sjkoshy	# private-address: 169.254.0.0/16
365185363Sjkoshy	# private-address: fd00::/8
366185363Sjkoshy	# private-address: fe80::/10
367185363Sjkoshy	# private-address: ::ffff:0:0/96
368183725Sjkoshy
369185363Sjkoshy	# Allow the domain (and its subdomains) to contain private addresses.
370185363Sjkoshy	# local-data statements are allowed to contain private addresses too.
371183725Sjkoshy	# private-domain: "example.com"
372183725Sjkoshy
373185363Sjkoshy	# If nonzero, unwanted replies are not only reported in statistics,
374185363Sjkoshy	# but also a running total is kept per thread. If it reaches the
375185363Sjkoshy	# threshold, a warning is printed and a defensive action is taken,
376263446Shiren	# the cache is cleared to flush potential poison out of it.
377185363Sjkoshy	# A suggested value is 10000000, the default is 0 (turned off).
378185363Sjkoshy	# unwanted-reply-threshold: 0
379187761Sjeff
380267062Skib	# Do not query the following addresses. No DNS queries are sent there.
381248842Ssbruno	# List one address per entry. List classless netblocks with /size,
382279833Srstone	# do-not-query-address: 127.0.0.1/8
383291494Srrs	# do-not-query-address: ::1
384291494Srrs
385291494Srrs	# if yes, the above default do-not-query-address entries are present.
386240164Sfabient	# if no, localhost can be queried (for testing and debugging).
387246166Ssbruno	# do-not-query-localhost: yes
388232366Sdavide
389241738Ssbruno	# if yes, perform prefetching of almost expired message cache entries.
390206089Sfabient	# prefetch: no
391267062Skib
392206089Sfabient	# if yes, perform key lookups adjacent to normal lookups.
393206089Sfabient	# prefetch-key: no
394248842Ssbruno
395291494Srrs	# if yes, Unbound rotates RRSet order in response.
396232366Sdavide	# rrset-roundrobin: no
397206089Sfabient
398185363Sjkoshy	# if yes, Unbound doesn't insert authority/additional sections
399183725Sjkoshy	# into response messages when those sections are not required.
400185363Sjkoshy	# minimal-responses: no
401183725Sjkoshy
402183725Sjkoshy	# true to disable DNSSEC lameness check in iterator.
403185363Sjkoshy	# disable-dnssec-lame-check: no
404185363Sjkoshy
405183725Sjkoshy	# module configuration of the server. A string with identifiers
406183725Sjkoshy	# separated by spaces. Syntax: "[dns64] [validator] iterator"
407185363Sjkoshy	# module-config: "validator iterator"
408185363Sjkoshy
409183725Sjkoshy	# File with trusted keys, kept uptodate using RFC5011 probes,
410183725Sjkoshy	# initial file like trust-anchor-file, then it stores metadata.
411185363Sjkoshy	# Use several entries, one per domain name, to track multiple zones.
412183725Sjkoshy	#
413277835Sbr	# If you want to perform DNSSEC validation, run unbound-anchor before
414200928Srpaulo	# you start unbound (i.e. in the system boot scripts).  And enable:
415200928Srpaulo	# Please note usage of unbound-anchor root anchor is at your own risk
416200928Srpaulo	# and under the terms of our LICENSE (see that file in the source).
417289317Sbz	# auto-trust-anchor-file: "/var/unbound/root.key"
418284218Sbr
419277835Sbr	# File with DLV trusted keys. Same format as trust-anchor-file.
420283112Sbr	# There can be only one DLV configured, it is trusted from root down.
421283112Sbr	# DLV is going to be decommissioned.  Please do not use it any more.
422283112Sbr	# dlv-anchor-file: "dlv.isc.org.key"
423283112Sbr
424204635Sgnn	# File with trusted keys for validation. Specify more than one file
425233320Sgonzo	# with several entries, one file per entry.
426281098Sadrian	# Zone file format, with DS and DNSKEY entries.
427233335Sgonzo	# Note this gets out of date, use auto-trust-anchor-file please.
428204635Sgnn	# trust-anchor-file: ""
429228869Sjhibbits
430261342Sjhibbits	# Trusted key for validation. DS or DNSKEY. specify the RR on a
431261342Sjhibbits	# single line, surrounded by "". TTL is ignored. class is IN default.
432281713Sjhibbits	# Note this gets out of date, use auto-trust-anchor-file please.
433228869Sjhibbits	# (These examples are from August 2007 and may not be valid anymore).
434228869Sjhibbits	# trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
435233628Sfabient	# trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
436233628Sfabient
437233628Sfabient	# File with trusted keys for validation. Specify more than one file
438233628Sfabient	# with several entries, one file per entry. Like trust-anchor-file
439233628Sfabient	# but has a different file format. Format is BIND-9 style format,
440233628Sfabient	# the trusted-keys { name flag proto algo "key"; }; clauses are read.
441233628Sfabient	# you need external update procedures to track changes in keys.
442233628Sfabient	# trusted-keys-file: ""
443233628Sfabient
444233628Sfabient	# Ignore chain of trust. Domain is treated as insecure.
445183725Sjkoshy	# domain-insecure: "example.com"
446183725Sjkoshy
447185363Sjkoshy	# Override the date for validation with a specific fixed date.
448185363Sjkoshy	# Do not set this unless you are debugging signature inception
449185363Sjkoshy	# and expiration. "" or "0" turns the feature off. -1 ignores date.
450183725Sjkoshy	# val-override-date: ""
451183725Sjkoshy
452183725Sjkoshy	# The time to live for bogus data, rrsets and messages. This avoids
453145256Sjkoshy	# some of the revalidation, until the time interval expires. in secs.
454145256Sjkoshy	# val-bogus-ttl: 60
455145256Sjkoshy
456145256Sjkoshy	# The signature inception and expiration dates are allowed to be off
457145256Sjkoshy	# by 10% of the signature lifetime (expir-incep) from our local clock.
458145256Sjkoshy	# This leeway is capped with a minimum and a maximum.  In seconds.
459145256Sjkoshy	# val-sig-skew-min: 3600
460145256Sjkoshy	# val-sig-skew-max: 86400
461145256Sjkoshy
462145256Sjkoshy	# Should additional section of secure message also be kept clean of
463145256Sjkoshy	# unsecure data. Useful to shield the users of this validator from
464283120Sjhb	# potential bogus data in the additional section. All unsigned data
465283120Sjhb	# in the additional section is removed from secure messages.
466283120Sjhb	# val-clean-additional: yes
467283120Sjhb
468283120Sjhb	# Turn permissive mode on to permit bogus messages. Thus, messages
469283120Sjhb	# for which security checks failed will be returned to clients,
470145256Sjkoshy	# instead of SERVFAIL. It still performs the security checks, which
471283120Sjhb	# result in interesting log files and possibly the AD bit in
472145256Sjkoshy	# replies if the message is found secure. The default is off.
473145256Sjkoshy	# val-permissive-mode: no
474145256Sjkoshy
475183725Sjkoshy	# Ignore the CD flag in incoming queries and refuse them bogus data.
476228557Sdim	# Enable it if the only clients of unbound are legacy servers (w2008)
477183725Sjkoshy	# that set CD but cannot validate themselves.
478183725Sjkoshy	# ignore-cd-flag: no
479183725Sjkoshy
480183725Sjkoshy	# Have the validator log failed validations for your diagnosis.
481145256Sjkoshy	# 0: off. 1: A line per failed user query. 2: With reason and bad IP.
482183725Sjkoshy	# val-log-level: 0
483145256Sjkoshy
484145256Sjkoshy	# It is possible to configure NSEC3 maximum iteration counts per
485145256Sjkoshy	# keysize. Keep this table very short, as linear search is done.
486145256Sjkoshy	# A message with an NSEC3 with larger count is marked insecure.
487145256Sjkoshy	# List in ascending order the keysize and count values.
488145256Sjkoshy	# val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
489145256Sjkoshy
490145256Sjkoshy	# instruct the auto-trust-anchor-file probing to add anchors after ttl.
491145256Sjkoshy	# add-holddown: 2592000 # 30 days
492145256Sjkoshy
493145256Sjkoshy	# instruct the auto-trust-anchor-file probing to del anchors after ttl.
494145256Sjkoshy	# del-holddown: 2592000 # 30 days
495145256Sjkoshy
496145256Sjkoshy	# auto-trust-anchor-file probing removes missing anchors after ttl.
497145256Sjkoshy	# If the value 0 is given, missing anchors are not removed.
498145256Sjkoshy	# keep-missing: 31622400 # 366 days
499145256Sjkoshy
500145256Sjkoshy	# debug option that allows very small holddown times for key rollover,
501145256Sjkoshy	# otherwise the RFC mandates probe intervals must be at least 1 hour.
502145256Sjkoshy	# permit-small-holddown: no
503145256Sjkoshy
504233628Sfabient	# the amount of memory to use for the key cache.
505233628Sfabient	# plain value in bytes or you can append k, m or G. default is "4Mb".
506233628Sfabient	# key-cache-size: 4m
507233628Sfabient
508233628Sfabient	# the number of slabs to use for the key cache.
509233628Sfabient	# the number of slabs must be a power of 2.
510145256Sjkoshy	# more slabs reduce lock contention, but fragment memory usage.
511145256Sjkoshy	# key-cache-slabs: 4
512145256Sjkoshy
513145256Sjkoshy	# the amount of memory to use for the negative cache (used for DLV).
514240164Sfabient	# plain value in bytes or you can append k, m or G. default is "1Mb".
515145256Sjkoshy	# neg-cache-size: 1m
516145256Sjkoshy
517206089Sfabient	# By default, for a number of zones a small default 'nothing here'
518145256Sjkoshy	# reply is built-in.  Query traffic is thus blocked.  If you
519147759Sjkoshy	# wish to serve such zone you can unblock them by uncommenting one
520145256Sjkoshy	# of the nodefault statements below.
521240164Sfabient	# You may also have to use domain-insecure: zone to make DNSSEC work,
522145256Sjkoshy	# unless you have your own trust anchors for this zone.
523145256Sjkoshy	# local-zone: "localhost." nodefault
524145256Sjkoshy	# local-zone: "127.in-addr.arpa." nodefault
525145256Sjkoshy	# 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
526145256Sjkoshy	# local-zone: "onion." nodefault
527145256Sjkoshy	# local-zone: "10.in-addr.arpa." nodefault
528174406Sjkoshy	# local-zone: "16.172.in-addr.arpa." nodefault
529183107Sjkoshy	# local-zone: "17.172.in-addr.arpa." nodefault
530145256Sjkoshy	# local-zone: "18.172.in-addr.arpa." nodefault
531174406Sjkoshy	# local-zone: "19.172.in-addr.arpa." nodefault
532145256Sjkoshy	# local-zone: "20.172.in-addr.arpa." nodefault
533145256Sjkoshy	# local-zone: "21.172.in-addr.arpa." nodefault
534183725Sjkoshy	# local-zone: "22.172.in-addr.arpa." nodefault
535183725Sjkoshy	# local-zone: "23.172.in-addr.arpa." nodefault
536145256Sjkoshy	# local-zone: "24.172.in-addr.arpa." nodefault
537145256Sjkoshy	# local-zone: "25.172.in-addr.arpa." nodefault
538174406Sjkoshy	# local-zone: "26.172.in-addr.arpa." nodefault
539145256Sjkoshy	# local-zone: "27.172.in-addr.arpa." nodefault
540145256Sjkoshy	# local-zone: "28.172.in-addr.arpa." nodefault
541145256Sjkoshy	# local-zone: "29.172.in-addr.arpa." nodefault
542174406Sjkoshy	# local-zone: "30.172.in-addr.arpa." nodefault
543145256Sjkoshy	# local-zone: "31.172.in-addr.arpa." nodefault
544145340Smarcel	# local-zone: "168.192.in-addr.arpa." nodefault
545145256Sjkoshy	# local-zone: "0.in-addr.arpa." nodefault
546145256Sjkoshy	# local-zone: "254.169.in-addr.arpa." nodefault
547145256Sjkoshy	# local-zone: "2.0.192.in-addr.arpa." nodefault
548145256Sjkoshy	# local-zone: "100.51.198.in-addr.arpa." nodefault
549145256Sjkoshy	# local-zone: "113.0.203.in-addr.arpa." nodefault
550145340Smarcel	# local-zone: "255.255.255.255.in-addr.arpa." nodefault
551145256Sjkoshy	# 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
552145256Sjkoshy	# local-zone: "d.f.ip6.arpa." nodefault
553145256Sjkoshy	# local-zone: "8.e.f.ip6.arpa." nodefault
554145256Sjkoshy	# local-zone: "9.e.f.ip6.arpa." nodefault
555145256Sjkoshy	# local-zone: "a.e.f.ip6.arpa." nodefault
556145256Sjkoshy	# local-zone: "b.e.f.ip6.arpa." nodefault
557145351Sjkoshy	# local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
558145351Sjkoshy	# And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa.
559145351Sjkoshy
560183075Sjkoshy	# If unbound is running service for the local host then it is useful
561145351Sjkoshy	# to perform lan-wide lookups to the upstream, and unblock the
562145351Sjkoshy	# long list of local-zones above.  If this unbound is a dns server
563145351Sjkoshy	# for a network of computers, disabled is better and stops information
564145351Sjkoshy	# leakage of local lan information.
565145256Sjkoshy	# unblock-lan-zones: no
566145256Sjkoshy
567145256Sjkoshy	# The insecure-lan-zones option disables validation for
568145256Sjkoshy	# these zones, as if they were all listed as domain-insecure.
569145256Sjkoshy	# insecure-lan-zones: no
570145256Sjkoshy
571145256Sjkoshy	# a number of locally served zones can be configured.
572145256Sjkoshy	# 	local-zone: <zone> <type>
573145256Sjkoshy	# 	local-data: "<resource record string>"
574145256Sjkoshy	# o deny serves local data (if any), else, drops queries.
575145256Sjkoshy	# o refuse serves local data (if any), else, replies with error.
576145256Sjkoshy	# o static serves local data, else, nxdomain or nodata answer.
577145256Sjkoshy	# o transparent gives local data, but resolves normally for other names
578183107Sjkoshy	# o redirect serves the zone data for any subdomain in the zone.
579183107Sjkoshy	# o nodefault can be used to normally resolve AS112 zones.
580145256Sjkoshy	# o typetransparent resolves normally for other types and other names
581145256Sjkoshy	# o inform resolves normally, but logs client IP address
582147191Sjkoshy	# o inform_deny drops queries and logs client IP address
583183725Sjkoshy	# o always_transparent, always_refuse, always_nxdomain, resolve in
584145256Sjkoshy	#   that way but ignore local data for that name.
585145256Sjkoshy	#
586145256Sjkoshy	# defaults are localhost address, reverse for 127.0.0.1 and ::1
587145256Sjkoshy	# and nxdomain for AS112 zones. If you configure one of these zones
588145256Sjkoshy	# the default content is omitted, or you can omit it with 'nodefault'.
589147191Sjkoshy	#
590145256Sjkoshy	# If you configure local-data without specifying local-zone, by
591145256Sjkoshy	# default a transparent local-zone is created for the data.
592145256Sjkoshy	#
593145256Sjkoshy	# You can add locally served data with
594145256Sjkoshy	# local-zone: "local." static
595145256Sjkoshy	# local-data: "mycomputer.local. IN A 192.0.2.51"
596145256Sjkoshy	# local-data: 'mytext.local TXT "content of text record"'
597174406Sjkoshy	#
598145256Sjkoshy	# You can override certain queries with
599145256Sjkoshy	# local-data: "adserver.example.com A 127.0.0.1"
600145256Sjkoshy	#
601174406Sjkoshy	# You can redirect a domain to a fixed address with
602145256Sjkoshy	# (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
603145256Sjkoshy	# local-zone: "example.com" redirect
604147191Sjkoshy	# local-data: "example.com A 192.0.2.3"
605147191Sjkoshy	#
606145256Sjkoshy	# Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
607145256Sjkoshy	# You can also add PTR records using local-data directly, but then
608145256Sjkoshy	# you need to do the reverse notation yourself.
609145256Sjkoshy	# local-data-ptr: "192.0.2.3 www.example.com"
610145256Sjkoshy
611145256Sjkoshy	# tag a localzone with a list of tag names (in "" with spaces between)
612145256Sjkoshy	# local-zone-tag: "example.com" "tag2 tag3"
613145256Sjkoshy
614145256Sjkoshy	# add a netblock specific override to a localzone, with zone type
615174406Sjkoshy	# local-zone-override: "example.com" 192.0.2.0/24 refuse
616145256Sjkoshy
617145256Sjkoshy	# service clients over SSL (on the TCP sockets), with plain DNS inside
618145256Sjkoshy	# the SSL stream.  Give the certificate to use and private key.
619174406Sjkoshy	# default is "" (disabled).  requires restart to take effect.
620145256Sjkoshy	# ssl-service-key: "path/to/privatekeyfile.key"
621145256Sjkoshy	# ssl-service-pem: "path/to/publiccertfile.pem"
622145256Sjkoshy	# ssl-port: 853
623147191Sjkoshy
624145256Sjkoshy	# request upstream over SSL (with plain DNS inside the SSL stream).
625147191Sjkoshy	# Default is no.  Can be turned on and off with unbound-control.
626145256Sjkoshy	# ssl-upstream: no
627147191Sjkoshy
628145256Sjkoshy	# DNS64 prefix. Must be specified when DNS64 is use.
629147191Sjkoshy	# Enable dns64 in module-config.  Used to synthesize IPv6 from IPv4.
630145256Sjkoshy	# dns64-prefix: 64:ff9b::0/96
631147191Sjkoshy
632145256Sjkoshy	# ratelimit for uncached, new queries, this limits recursion effort.
633145256Sjkoshy	# ratelimiting is experimental, and may help against randomqueryflood.
634145256Sjkoshy	# if 0(default) it is disabled, otherwise state qps allowed per zone.
635174406Sjkoshy	# ratelimit: 0
636145256Sjkoshy
637145256Sjkoshy	# ratelimits are tracked in a cache, size in bytes of cache (or k,m).
638174406Sjkoshy	# ratelimit-size: 4m
639145256Sjkoshy	# ratelimit cache slabs, reduces lock contention if equal to cpucount.
640145256Sjkoshy	# ratelimit-slabs: 4
641145256Sjkoshy
642145256Sjkoshy	# 0 blocks when ratelimited, otherwise let 1/xth traffic through
643174406Sjkoshy	# ratelimit-factor: 10
644145256Sjkoshy
645145256Sjkoshy	# override the ratelimit for a specific domain name.
646145256Sjkoshy	# give this setting multiple times to have multiple overrides.
647145256Sjkoshy	# ratelimit-for-domain: example.com 1000
648147191Sjkoshy	# override the ratelimits for all domains below a domain name
649147191Sjkoshy	# can give this multiple times, the name closest to the zone is used.
650145256Sjkoshy	# ratelimit-below-domain: com 1000
651145256Sjkoshy
652174406Sjkoshy# Python config section. To enable:
653145256Sjkoshy# o use --with-pythonmodule to configure before compiling.
654145256Sjkoshy# o list python in the module-config string (above) to enable.
655145256Sjkoshy# o and give a python-script to run.
656147191Sjkoshypython:
657147191Sjkoshy	# Script file to load
658147759Sjkoshy	# python-script: "/var/unbound/ubmodule-tst.py"
659147191Sjkoshy
660145256Sjkoshy# Remote control config section.
661185363Sjkoshyremote-control:
662185363Sjkoshy	# Enable remote control with unbound-control(8) here.
663185363Sjkoshy	# set up the keys and certificates with unbound-control-setup.
664185363Sjkoshy	# control-enable: no
665185363Sjkoshy
666185363Sjkoshy	# Set to no and use an absolute path as control-interface to use
667185363Sjkoshy	# a unix local named pipe for unbound-control.
668185363Sjkoshy	# control-use-cert: yes
669185363Sjkoshy
670185363Sjkoshy	# what interfaces are listened to for remote control.
671185363Sjkoshy	# give 0.0.0.0 and ::0 to listen to all interfaces.
672185363Sjkoshy	# control-interface: 127.0.0.1
673185363Sjkoshy	# control-interface: ::1
674185363Sjkoshy
675185363Sjkoshy	# port number for remote control operations.
676185363Sjkoshy	# control-port: 8953
677185363Sjkoshy
678198433Sjkoshy	# unbound server key file.
679198433Sjkoshy	# server-key-file: "/var/unbound/unbound_server.key"
680198433Sjkoshy
681198433Sjkoshy	# unbound server certificate file.
682185363Sjkoshy	# server-cert-file: "/var/unbound/unbound_server.pem"
683185363Sjkoshy
684185363Sjkoshy	# unbound-control key file.
685185363Sjkoshy	# control-key-file: "/var/unbound/unbound_control.key"
686185363Sjkoshy
687185363Sjkoshy	# unbound-control certificate file.
688185363Sjkoshy	# control-cert-file: "/var/unbound/unbound_control.pem"
689185363Sjkoshy
690185363Sjkoshy# Stub zones.
691185363Sjkoshy# Create entries like below, to make all queries for 'example.com' and
692185363Sjkoshy# 'example.org' go to the given list of nameservers. list zero or more
693185363Sjkoshy# nameservers by hostname or by ipaddress. If you set stub-prime to yes,
694185363Sjkoshy# the list is treated as priming hints (default is no).
695198433Sjkoshy# With stub-first yes, it attempts without the stub if it fails.
696198433Sjkoshy# Consider adding domain-insecure: name and local-zone: name nodefault
697198433Sjkoshy# to the server: section if the stub is a locally served zone.
698198433Sjkoshy# stub-zone:
699198433Sjkoshy#	name: "example.com"
700198433Sjkoshy#	stub-addr: 192.0.2.68
701198433Sjkoshy#	stub-prime: no
702198433Sjkoshy#	stub-first: no
703198433Sjkoshy# stub-zone:
704198433Sjkoshy#	name: "example.org"
705198433Sjkoshy#	stub-host: ns.example.com.
706198433Sjkoshy
707198433Sjkoshy# Forward zones
708263446Shiren# Create entries like below, to make all queries for 'example.com' and
709263446Shiren# 'example.org' go to the given list of servers. These servers have to handle
710198433Sjkoshy# recursion to other nameservers. List zero or more nameservers by hostname
711198433Sjkoshy# or by ipaddress. Use an entry with name "." to forward all queries.
712267062Skib# If you enable forward-first, it attempts without the forward if it fails.
713267062Skib# forward-zone:
714248842Ssbruno# 	name: "example.com"
715248842Ssbruno# 	forward-addr: 192.0.2.68
716277177Srrs# 	forward-addr: 192.0.2.73@5355  # forward to port 5355.
717277177Srrs# 	forward-first: no
718291494Srrs# forward-zone:
719291494Srrs# 	name: "example.org"
720291494Srrs# 	forward-host: fwd.example.com
721291494Srrs