1unbound.conf(5)                 unbound 1.13.2                 unbound.conf(5)
2
3
4

NAME

6       unbound.conf - Unbound configuration file.
7

SYNOPSIS

9       unbound.conf
10

DESCRIPTION

12       unbound.conf  is used to configure unbound(8).  The file format has at‐
13       tributes and values. Some attributes have attributes inside them.   The
14       notation is: attribute: value.
15
16       Comments  start with # and last to the end of line. Empty lines are ig‐
17       nored as is whitespace at the beginning of a line.
18
19       The utility unbound-checkconf(8) can  be  used  to  check  unbound.conf
20       prior to usage.
21

EXAMPLE

23       An  example  config  file is shown below. Copy this to /etc/unbound/un‐
24       bound.conf and start the server with:
25
26            $ unbound -c /etc/unbound/unbound.conf
27
28       Most settings are the defaults. Stop the server with:
29
30            $ kill `cat /etc/unbound/unbound.pid`
31
32       Below is a minimal config file. The source distribution contains an ex‐
33       tensive example.conf file with all the options.
34
35       # unbound.conf(5) config file for unbound(8).
36       server:
37            directory: "/etc/unbound"
38            username: unbound
39            # make sure unbound can access entropy from inside the chroot.
40            # e.g. on linux the use these commands (on BSD, devfs(8) is used):
41            #      mount --bind -n /dev/urandom /etc/unbound/dev/urandom
42            # and  mount --bind -n /dev/log /etc/unbound/dev/log
43            chroot: "/etc/unbound"
44            # logfile: "/etc/unbound/unbound.log"  #uncomment to use logfile.
45            pidfile: "/etc/unbound/unbound.pid"
46            # verbosity: 1      # uncomment and increase to get more logging.
47            # listen on all interfaces, answer queries from the local subnet.
48            interface: 0.0.0.0
49            interface: ::0
50            access-control: 10.0.0.0/8 allow
51            access-control: 2001:DB8::/64 allow
52

FILE FORMAT

54       There must be whitespace between keywords.  Attribute keywords end with
55       a colon ':'.  An attribute is followed by a value,  or  its  containing
56       attributes in which case it is referred to as a clause.  Clauses can be
57       repeated throughout the file (or included files)  to  group  attributes
58       under the same clause.
59
60       Files  can be included using the include: directive. It can appear any‐
61       where, it accepts a single file name as argument.  Processing continues
62       as  if  the text from the included file was copied into the config file
63       at that point.  If also using chroot, using full path names for the in‐
64       cluded  files  works, relative pathnames for the included names work if
65       the directory where the daemon is started equals its chroot/working di‐
66       rectory  or  is  specified before the include statement with directory:
67       dir.  Wildcards can be used to include multiple files, see glob(7).
68
69       For a more structural include option, the  include-toplevel:  directive
70       can  be used.  This closes whatever clause is currently active (if any)
71       and forces the use of clauses in the included  files  and  right  after
72       this directive.
73
74   Server Options
75       These options are part of the server: clause.
76
77       verbosity: <number>
78              The  verbosity  number, level 0 means no verbosity, only errors.
79              Level 1 gives operational information.  Level 2  gives  detailed
80              operational  information  including short information per query.
81              Level 3 gives query level information, output per query.   Level
82              4  gives algorithm level information.  Level 5 logs client iden‐
83              tification for cache misses.  Default is level 1.  The verbosity
84              can also be increased from the commandline, see unbound(8).
85
86       statistics-interval: <seconds>
87              The number of seconds between printing statistics to the log for
88              every thread.  Disable with value 0 or "". Default is  disabled.
89              The  histogram  statistics are only printed if replies were sent
90              during  the  statistics  interval,  requestlist  statistics  are
91              printed  for every interval (but can be 0).  This is because the
92              median calculation requires data to be present.
93
94       statistics-cumulative: <yes or no>
95              If enabled, statistics are cumulative  since  starting  unbound,
96              without  clearing the statistics counters after logging the sta‐
97              tistics. Default is no.
98
99       extended-statistics: <yes or no>
100              If enabled, extended statistics are  printed  from  unbound-con‐
101              trol(8).   Default is off, because keeping track of more statis‐
102              tics takes time.  The counters are listed in unbound-control(8).
103
104       num-threads: <number>
105              The number of threads to create to serve clients. Use 1  for  no
106              threading.
107
108       port: <port number>
109              The  port  number,  default  53, on which the server responds to
110              queries.
111
112       interface: <ip address[@port]>
113              Interface to use to connect to the network.  This  interface  is
114              listened to for queries from clients, and answers to clients are
115              given from it.  Can be given multiple times to work  on  several
116              interfaces. If none are given the default is to listen to local‐
117              host.  If an interface name is used instead of  an  ip  address,
118              the list of ip addresses on that interface are used.  The inter‐
119              faces are not changed on  a  reload  (kill  -HUP)  but  only  on
120              restart.   A  port  number  can be specified with @port (without
121              spaces between interface and port number), if not specified  the
122              default port (from port) is used.
123
124       ip-address: <ip address[@port]>
125              Same as interface: (for ease of compatibility with nsd.conf).
126
127       interface-automatic: <yes or no>
128              Listen  on all addresses on all (current and future) interfaces,
129              detect the source interface on UDP  queries  and  copy  them  to
130              replies.   This  is  a  lot like ip-transparent, but this option
131              services all interfaces whilst with ip-transparent you  can  se‐
132              lect  which  (future)  interfaces  unbound  provides service on.
133              This feature is experimental, and needs support in your  OS  for
134              particular socket options.  Default value is no.
135
136       outgoing-interface: <ip address or ip6 netblock>
137              Interface  to  use  to connect to the network. This interface is
138              used to send queries to authoritative servers and receive  their
139              replies.  Can  be given multiple times to work on several inter‐
140              faces. If none are given the default  (all)  is  used.  You  can
141              specify  the  same  interfaces in interface: and outgoing-inter‐
142              face: lines, the interfaces are then  used  for  both  purposes.
143              Outgoing  queries  are  sent  via a random outgoing interface to
144              counter spoofing.
145
146              If an IPv6 netblock is specified instead of an  individual  IPv6
147              address,  outgoing  UDP queries will use a randomised source ad‐
148              dress taken from the netblock to counter spoofing. Requires  the
149              IPv6  netblock to be routed to the host running unbound, and re‐
150              quires OS support for unprivileged  non-local  binds  (currently
151              only  supported  on  Linux).  Several netblocks may be specified
152              with multiple outgoing-interface: options, but  do  not  specify
153              both  an  individual  IPv6  address and an IPv6 netblock, or the
154              randomisation will be compromised.  Consider combining with pre‐
155              fer-ip6:  yes to increase the likelihood of IPv6 nameservers be‐
156              ing selected for queries.  On Linux you need these two  commands
157              to  be able to use the freebind socket option to receive traffic
158              for the ip6 netblock: ip -6 addr add mynetblock/64 dev lo &&  ip
159              -6 route add local mynetblock/64 dev lo
160
161       outgoing-range: <number>
162              Number  of ports to open. This number of file descriptors can be
163              opened per thread. Must be at least 1. Default depends  on  com‐
164              pile options. Larger numbers need extra resources from the oper‐
165              ating system.  For performance a very large value is  best,  use
166              libevent to make this possible.
167
168       outgoing-port-permit: <port number or range>
169              Permit  unbound  to  open this port or range of ports for use to
170              send queries.  A larger number of permitted outgoing  ports  in‐
171              creases  resilience  against  spoofing attempts. Make sure these
172              ports are not needed by other daemons.  By  default  only  ports
173              above 1024 that have not been assigned by IANA are used.  Give a
174              port number or a range of the form "low-high", without spaces.
175
176              The outgoing-port-permit and outgoing-port-avoid statements  are
177              processed  in the line order of the config file, adding the per‐
178              mitted ports and subtracting the avoided ports from the  set  of
179              allowed  ports.   The  processing starts with the non IANA allo‐
180              cated ports above 1024 in the set of allowed ports.
181
182       outgoing-port-avoid: <port number or range>
183              Do not permit unbound to open this port or range  of  ports  for
184              use to send queries. Use this to make sure unbound does not grab
185              a port that another daemon needs. The port  is  avoided  on  all
186              outgoing  interfaces,  both  IP4 and IP6.  By default only ports
187              above 1024 that have not been assigned by IANA are used.  Give a
188              port number or a range of the form "low-high", without spaces.
189
190       outgoing-num-tcp: <number>
191              Number  of  outgoing TCP buffers to allocate per thread. Default
192              is 10. If set to 0, or if do-tcp is "no", no TCP queries to  au‐
193              thoritative servers are done.  For larger installations increas‐
194              ing this value is a good idea.
195
196       incoming-num-tcp: <number>
197              Number of incoming TCP buffers to allocate per  thread.  Default
198              is  10.  If  set to 0, or if do-tcp is "no", no TCP queries from
199              clients are accepted. For larger installations  increasing  this
200              value is a good idea.
201
202       edns-buffer-size: <number>
203              Number  of bytes size to advertise as the EDNS reassembly buffer
204              size.  This is the value put into  datagrams  over  UDP  towards
205              peers.   The actual buffer size is determined by msg-buffer-size
206              (both for TCP and UDP).  Do not set higher than that value.  De‐
207              fault  is  1232  which  is the DNS Flag Day 2020 recommendation.
208              Setting to 512 bypasses even the most stringent path  MTU  prob‐
209              lems,  but  is seen as extreme, since the amount of TCP fallback
210              generated is excessive (probably also for  this  resolver,  con‐
211              sider tuning the outgoing tcp number).
212
213       max-udp-size: <number>
214              Maximum  UDP response size (not applied to TCP response).  65536
215              disables the udp response size maximum, and uses the choice from
216              the  client,  always.  Suggested values are 512 to 4096. Default
217              is 4096.
218
219       stream-wait-size: <number>
220              Number of bytes size maximum to use for waiting stream  buffers.
221              Default is 4 megabytes.  A plain number is in bytes, append 'k',
222              'm' or 'g' for  kilobytes,  megabytes  or  gigabytes  (1024*1024
223              bytes  in a megabyte).  As TCP and TLS streams queue up multiple
224              results, the amount of memory used for these  buffers  does  not
225              exceed  this  number, otherwise the responses are dropped.  This
226              manages the total memory usage of the server (under heavy  use),
227              the  number  of requests that can be queued up per connection is
228              also limited, with further requests waiting in TCP buffers.
229
230       msg-buffer-size: <number>
231              Number of bytes size of the message buffers.  Default  is  65552
232              bytes,  enough  for 64 Kb packets, the maximum DNS message size.
233              No message larger than this can be sent or received. Can be  re‐
234              duced  to  use less memory, but some requests for DNS data, such
235              as for huge resource records, will result in a SERVFAIL reply to
236              the client.
237
238       msg-cache-size: <number>
239              Number  of  bytes  size  of  the  message  cache.  Default  is 4
240              megabytes.  A plain number is in bytes, append 'k', 'm'  or  'g'
241              for  kilobytes,  megabytes  or  gigabytes  (1024*1024 bytes in a
242              megabyte).
243
244       msg-cache-slabs: <number>
245              Number of slabs in the message cache.  Slabs  reduce  lock  con‐
246              tention  by  threads.   Must  be  set  to  a power of 2. Setting
247              (close) to the number of cpus is a reasonable guess.
248
249       num-queries-per-thread: <number>
250              The number of queries that every thread will service  simultane‐
251              ously.   If  more  queries  arrive  that  need servicing, and no
252              queries can  be  jostled  out  (see  jostle-timeout),  then  the
253              queries  are  dropped.  This forces the client to resend after a
254              timeout; allowing the  server  time  to  work  on  the  existing
255              queries. Default depends on compile options, 512 or 1024.
256
257       jostle-timeout: <msec>
258              Timeout  used when the server is very busy.  Set to a value that
259              usually results in one roundtrip to the authority  servers.   If
260              too  many queries arrive, then 50% of the queries are allowed to
261              run to completion, and the other 50% are replaced with  the  new
262              incoming  query  if  they have already spent more than their al‐
263              lowed time.  This protects against denial  of  service  by  slow
264              queries or high query rates.  Default 200 milliseconds.  The ef‐
265              fect is that the qps for long-lasting  queries  is  about  (num‐
266              queriesperthread  /  2)  /  (average time for such long queries)
267              qps.  The qps  for  short  queries  can  be  about  (numqueries‐
268              perthread  /  2)  /  (jostletimeout  in  whole  seconds) qps per
269              thread, about (1024/2)*5 = 2560 qps by default.
270
271       delay-close: <msec>
272              Extra delay for timeouted UDP ports before they are  closed,  in
273              msec.   Default  is 0, and that disables it.  This prevents very
274              delayed answer packets from  the  upstream  (recursive)  servers
275              from  bouncing  against closed ports and setting off all sort of
276              close-port counters, with eg. 1500 msec.  When  timeouts  happen
277              you  need extra sockets, it checks the ID and remote IP of pack‐
278              ets, and unwanted packets  are  added  to  the  unwanted  packet
279              counter.
280
281       udp-connect: <yes or no>
282              Perform connect for UDP sockets that mitigates ICMP side channel
283              leakage.  Default is yes.
284
285       unknown-server-time-limit: <msec>
286              The wait time in msec for waiting for an unknown server  to  re‐
287              ply.   Increase this if you are behind a slow satellite link, to
288              eg. 1128.  That would then avoid re-querying every initial query
289              because it times out.  Default is 376 msec.
290
291       so-rcvbuf: <number>
292              If  not 0, then set the SO_RCVBUF socket option to get more buf‐
293              fer space on UDP port 53 incoming queries.  So that short spikes
294              on  busy  servers  do  not  drop packets (see counter in netstat
295              -su).  Default is 0 (use system value).  Otherwise,  the  number
296              of  bytes to ask for, try "4m" on a busy server.  The OS caps it
297              at a maximum, on linux unbound needs root permission  to  bypass
298              the  limit,  or  the admin can use sysctl net.core.rmem_max.  On
299              BSD change kern.ipc.maxsockbuf in /etc/sysctl.conf.  On  OpenBSD
300              change header and recompile kernel. On Solaris ndd -set /dev/udp
301              udp_max_buf 8388608.
302
303       so-sndbuf: <number>
304              If not 0, then set the SO_SNDBUF socket option to get more  buf‐
305              fer  space  on UDP port 53 outgoing queries.  This for very busy
306              servers handles spikes in answer traffic, otherwise  'send:  re‐
307              source temporarily unavailable' can get logged, the buffer over‐
308              run is also visible by netstat -su.  Default is  0  (use  system
309              value).   Specify  the number of bytes to ask for, try "4m" on a
310              very busy server.  The OS caps it at a maximum, on linux unbound
311              needs  root permission to bypass the limit, or the admin can use
312              sysctl net.core.wmem_max.  On BSD, Solaris changes  are  similar
313              to so-rcvbuf.
314
315       so-reuseport: <yes or no>
316              If  yes,  then  open  dedicated  listening  sockets for incoming
317              queries for each thread and try to set the  SO_REUSEPORT  socket
318              option  on  each  socket.   May  distribute  incoming queries to
319              threads more evenly.  Default is yes.  On Linux it is  supported
320              in  kernels  >= 3.9.  On other systems, FreeBSD, OSX it may also
321              work.  You can enable it (on any platform and kernel),  it  then
322              attempts to open the port and passes the option if it was avail‐
323              able at compile time, if that works it is used, if it fails,  it
324              continues  silently (unless verbosity 3) without the option.  At
325              extreme load it could be better to turn it off to distribute the
326              queries evenly, reported for Linux systems (4.4.x).
327
328       ip-transparent: <yes or no>
329              If  yes,  then use IP_TRANSPARENT socket option on sockets where
330              unbound is listening for incoming traffic.  Default no.   Allows
331              you  to bind to non-local interfaces.  For example for non-exis‐
332              tent IP addresses that are going to exist later  on,  with  host
333              failover configuration.  This is a lot like interface-automatic,
334              but that one services all interfaces and with  this  option  you
335              can  select  which  (future) interfaces unbound provides service
336              on.  This option needs unbound to be started with  root  permis‐
337              sions  on  some  systems.  The option uses IP_BINDANY on FreeBSD
338              systems and SO_BINDANY on OpenBSD systems.
339
340       ip-freebind: <yes or no>
341              If yes, then use IP_FREEBIND socket option on sockets where  un‐
342              bound is listening to incoming traffic.  Default no.  Allows you
343              to bind to IP addresses that are nonlocal or do not exist,  like
344              when  the  network interface or IP address is down.  Exists only
345              on Linux, where the similar ip-transparent option is also avail‐
346              able.
347
348       ip-dscp: <number>
349              The value of the Differentiated Services Codepoint (DSCP) in the
350              differentiated services field (DS) of  the  outgoing  IP  packet
351              headers.   The  field replaces the outdated IPv4 Type-Of-Service
352              field and the IPV6 traffic class field.
353
354       rrset-cache-size: <number>
355              Number of bytes size of the RRset cache. Default is 4 megabytes.
356              A  plain  number  is  in bytes, append 'k', 'm' or 'g' for kilo‐
357              bytes, megabytes or gigabytes (1024*1024 bytes in a megabyte).
358
359       rrset-cache-slabs: <number>
360              Number of slabs in the RRset cache. Slabs reduce lock contention
361              by threads.  Must be set to a power of 2.
362
363       cache-max-ttl: <seconds>
364              Time  to  live maximum for RRsets and messages in the cache. De‐
365              fault is 86400 seconds (1 day).  When the TTL expires, the cache
366              item  has  expired.   Can  be set lower to force the resolver to
367              query for data often, and not trust  (very  large)  TTL  values.
368              Downstream clients also see the lower TTL.
369
370       cache-min-ttl: <seconds>
371              Time  to  live minimum for RRsets and messages in the cache. De‐
372              fault is 0.  If the minimum kicks in, the  data  is  cached  for
373              longer than the domain owner intended, and thus less queries are
374              made to look up the data.  Zero makes sure the data in the cache
375              is  as the domain owner intended, higher values, especially more
376              than an hour or so, can lead to trouble as the data in the cache
377              does not match up with the actual data any more.
378
379       cache-max-negative-ttl: <seconds>
380              Time to live maximum for negative responses, these have a SOA in
381              the authority section that is limited in time.  Default is 3600.
382              This applies to nxdomain and nodata answers.
383
384       infra-host-ttl: <seconds>
385              Time  to live for entries in the host cache. The host cache con‐
386              tains roundtrip timing, lameness and EDNS  support  information.
387              Default is 900.
388
389       infra-cache-slabs: <number>
390              Number  of  slabs in the infrastructure cache. Slabs reduce lock
391              contention by threads. Must be set to a power of 2.
392
393       infra-cache-numhosts: <number>
394              Number of hosts for which  information  is  cached.  Default  is
395              10000.
396
397       infra-cache-min-rtt: <msec>
398              Lower limit for dynamic retransmit timeout calculation in infra‐
399              structure cache. Default is 50 milliseconds. Increase this value
400              if using forwarders needing more time to do recursive name reso‐
401              lution.
402
403       infra-keep-probing: <yes or no>
404              If enabled the server keeps probing hosts that are down, in  the
405              one  probe  at  a  time  regime.  Default is no.  Hosts that are
406              down, eg. they did not respond during the one probe  at  a  time
407              period,  are  marked as down and it may take infra-host-ttl time
408              to get probed again.
409
410       define-tag: <"list of tags">
411              Define the tags that can be used with local-zone and access-con‐
412              trol.   Enclose  the list between quotes ("") and put spaces be‐
413              tween tags.
414
415       do-ip4: <yes or no>
416              Enable or disable whether ip4 queries are  answered  or  issued.
417              Default is yes.
418
419       do-ip6: <yes or no>
420              Enable  or  disable  whether ip6 queries are answered or issued.
421              Default is yes.  If disabled, queries are not answered on  IPv6,
422              and  queries  are  not sent on IPv6 to the internet nameservers.
423              With this option you can disable the ipv6 transport for  sending
424              DNS traffic, it does not impact the contents of the DNS traffic,
425              which may have ip4 and ip6 addresses in it.
426
427       prefer-ip4: <yes or no>
428              If enabled, prefer IPv4 transport for sending DNS queries to in‐
429              ternet  nameservers. Default is no.  Useful if the IPv6 netblock
430              the server has, the entire /64 of that is not owned by one oper‐
431              ator  and  the reputation of the netblock /64 is an issue, using
432              IPv4 then uses the IPv4 filters that the upstream servers have.
433
434       prefer-ip6: <yes or no>
435              If enabled, prefer IPv6 transport for sending DNS queries to in‐
436              ternet nameservers. Default is no.
437
438       do-udp: <yes or no>
439              Enable  or  disable  whether UDP queries are answered or issued.
440              Default is yes.
441
442       do-tcp: <yes or no>
443              Enable or disable whether TCP queries are  answered  or  issued.
444              Default is yes.
445
446       tcp-mss: <number>
447              Maximum segment size (MSS) of TCP socket on which the server re‐
448              sponds to queries. Value lower than common MSS on Ethernet (1220
449              for  example)  will address path MTU problem.  Note that not all
450              platform supports socket option to set  MSS  (TCP_MAXSEG).   De‐
451              fault  is system default MSS determined by interface MTU and ne‐
452              gotiation between server and client.
453
454       outgoing-tcp-mss: <number>
455              Maximum segment size (MSS) of TCP socket  for  outgoing  queries
456              (from  Unbound to other servers). Value lower than common MSS on
457              Ethernet (1220 for example) will address path MTU problem.  Note
458              that  not  all  platform  supports  socket  option  to  set  MSS
459              (TCP_MAXSEG).  Default is system default MSS determined  by  in‐
460              terface MTU and negotiation between Unbound and other servers.
461
462       tcp-idle-timeout: <msec>
463              The  period  Unbound  will wait for a query on a TCP connection.
464              If this timeout expires Unbound closes the connection.  This op‐
465              tion  defaults  to  30000 milliseconds.  When the number of free
466              incoming TCP buffers falls below 50% of the total number config‐
467              ured,  the  option value used is progressively reduced, first to
468              1% of the configured value, then to 0.2% of the configured value
469              if  the number of free buffers falls below 35% of the total num‐
470              ber configured, and finally to 0 if the number of  free  buffers
471              falls  below 20% of the total number configured. A minimum time‐
472              out of 200 milliseconds is observed  regardless  of  the  option
473              value used.
474
475       tcp-reuse-timeout: <msec>
476              The  period Unbound will keep TCP persistent connections open to
477              authority servers. This option defaults to 60000 milliseconds.
478
479       max-reuse-tcp-queries: <number>
480              The maximum number of queries that can be sent on  a  persistent
481              TCP connection.  This option defaults to 200 queries.
482
483       tcp-auth-query-timeout: <number>
484              Timeout  in  milliseconds for TCP queries to auth servers.  This
485              option defaults to 3000 milliseconds.
486
487       edns-tcp-keepalive: <yes or no>
488              Enable or disable EDNS TCP Keepalive. Default is no.
489
490       edns-tcp-keepalive-timeout: <msec>
491              The period Unbound will wait for a query  on  a  TCP  connection
492              when  EDNS  TCP Keepalive is active. If this timeout expires Un‐
493              bound closes the connection. If the client supports the EDNS TCP
494              Keepalive  option, Unbound sends the timeout value to the client
495              to encourage it to close the connection before the server  times
496              out.   This  option  defaults  to 120000 milliseconds.  When the
497              number of free incoming TCP buffers falls below 50% of the total
498              number  configured,  the advertised timeout is progressively re‐
499              duced to 1% of the configured value, then to 0.2% of the config‐
500              ured  value if the number of free buffers falls below 35% of the
501              total number configured, and finally to 0 if the number of  free
502              buffers falls below 20% of the total number configured.  A mini‐
503              mum actual timeout of 200 milliseconds is observed regardless of
504              the advertised timeout.
505
506       tcp-upstream: <yes or no>
507              Enable  or disable whether the upstream queries use TCP only for
508              transport.  Default is no.  Useful in tunneling scenarios.
509
510       udp-upstream-without-downstream: <yes or no>
511              Enable udp upstream even if do-udp is no.  Default  is  no,  and
512              this   does   not  change  anything.   Useful  for  TLS  service
513              providers, that want no udp downstream but use udp to fetch data
514              upstream.
515
516       tls-upstream: <yes or no>
517              Enabled or disable whether the upstream queries use TLS only for
518              transport.  Default is no.  Useful in tunneling scenarios.   The
519              TLS contains plain DNS in TCP wireformat.  The other server must
520              support this (see tls-service-key).  If you  enable  this,  also
521              configure  a  tls-cert-bundle  or  use  tls-win-cert  to load CA
522              certs, otherwise the connections cannot be authenticated.   This
523              option  enables  TLS for all of them, but if you do not set this
524              you can configure TLS specifically for some forward  zones  with
525              forward-tls-upstream.  And also with stub-tls-upstream.
526
527       ssl-upstream: <yes or no>
528              Alternate  syntax  for tls-upstream.  If both are present in the
529              config file the last is used.
530
531       tls-service-key: <file>
532              If enabled, the server provides DNS-over-TLS  or  DNS-over-HTTPS
533              service  on  the  TCP  ports marked implicitly or explicitly for
534              these services with tls-port or https-port. The file  must  con‐
535              tain the private key for the TLS session, the public certificate
536              is in the tls-service-pem file and it must also be specified  if
537              tls-service-key  is  specified.   The default is "", turned off.
538              Enabling or disabling this service requires a restart (a  reload
539              is  not  enough), because the key is read while root permissions
540              are held and before chroot (if any).  The ports enabled  implic‐
541              itly  or explicitly via tls-port: and https-port: do not provide
542              normal DNS TCP service. Unbound needs to be compiled  with  lib‐
543              nghttp2 in order to provide DNS-over-HTTPS.
544
545       ssl-service-key: <file>
546              Alternate syntax for tls-service-key.
547
548       tls-service-pem: <file>
549              The  public  key  certificate pem file for the tls service.  De‐
550              fault is "", turned off.
551
552       ssl-service-pem: <file>
553              Alternate syntax for tls-service-pem.
554
555       tls-port: <number>
556              The port number on which to provide  TCP  TLS  service,  default
557              853, only interfaces configured with that port number as @number
558              get the TLS service.
559
560       ssl-port: <number>
561              Alternate syntax for tls-port.
562
563       tls-cert-bundle: <file>
564              If null or "", no file is used.  Set it to the certificate  bun‐
565              dle file, for example "/etc/pki/tls/certs/ca-bundle.crt".  These
566              certificates are used for  authenticating  connections  made  to
567              outside  peers.   For  example auth-zone urls, and also DNS over
568              TLS connections.  It is read at start up before permission  drop
569              and chroot.
570
571       ssl-cert-bundle: <file>
572              Alternate syntax for tls-cert-bundle.
573
574       tls-win-cert: <yes or no>
575              Add  the system certificates to the cert bundle certificates for
576              authentication.  If no cert bundle, it uses only these  certifi‐
577              cates.  Default is no.  On windows this option uses the certifi‐
578              cates from the cert store.  Use the  tls-cert-bundle  option  on
579              other systems.
580
581       tls-additional-port: <portnr>
582              List portnumbers as tls-additional-port, and when interfaces are
583              defined, eg. with the @port suffix, as this  port  number,  they
584              provide  dns over TLS service.  Can list multiple, each on a new
585              statement.
586
587       tls-session-ticket-keys: <file>
588              If not "", lists files with 80 bytes of random contents that are
589              used to perform TLS session resumption for clients using the un‐
590              bound server.  These files contain the secret key  for  the  TLS
591              session  tickets.  First key use to encrypt and decrypt TLS ses‐
592              sion tickets.  Other keys use to decrypt only.   With  this  you
593              can  roll  over  to new keys, by generating a new first file and
594              allowing decrypt of the old file by listing it after  the  first
595              file for some time, after the wait clients are not using the old
596              key any more and the old key can be removed.  One way to  create
597              the  file  is  dd if=/dev/random bs=1 count=80 of=ticket.dat The
598              first 16 bytes should be different from the old one if you  cre‐
599              ate  a  second  key,  that is the name used to identify the key.
600              Then there is 32 bytes random data for an AES key  and  then  32
601              bytes random data for the HMAC key.
602
603       tls-ciphers: <string with cipher list>
604              Set  the  list of ciphers to allow when serving TLS.  Use "" for
605              defaults, and that is the default.
606
607       tls-ciphersuites: <string with ciphersuites list>
608              Set the list of ciphersuites to allow when serving TLS.  This is
609              for newer TLS 1.3 connections.  Use "" for defaults, and that is
610              the default.
611
612       pad-responses: <yes or no>
613              If enabled, TLS serviced queries that contained an EDNS  Padding
614              option  will  cause  responses padded to the closest multiple of
615              the size specified in pad-responses-block-size.  Default is yes.
616
617       pad-responses-block-size: <number>
618              The block size with which to pad responses  serviced  over  TLS.
619              Only  responses  to  padded  queries will be padded.  Default is
620              468.
621
622       pad-queries: <yes or no>
623              If enabled, all queries sent over TLS upstreams will  be  padded
624              to   the   closest   multiple   of   the   size   specified   in
625              pad-queries-block-size.  Default is yes.
626
627       pad-queries-block-size: <number>
628              The block size with which to  pad  queries  sent  over  TLS  up‐
629              streams.  Default is 128.
630
631       tls-use-sni: <yes or no>
632              Enable  or disable sending the SNI extension on TLS connections.
633              Default is yes.  Changing the value requires a reload.
634
635       https-port: <number>
636              The port number on which to provide DNS-over-HTTPS service,  de‐
637              fault  443,  only interfaces configured with that port number as
638              @number get the HTTPS service.
639
640       http-endpoint: <endpoint string>
641              The HTTP endpoint to provide DNS-over-HTTPS service on.  Default
642              "/dns-query".
643
644       http-max-streams: <number of streams>
645              Number  used in the SETTINGS_MAX_CONCURRENT_STREAMS parameter in
646              the HTTP/2 SETTINGS frame for  DNS-over-HTTPS  connections.  De‐
647              fault 100.
648
649       http-query-buffer-size: <size in bytes>
650              Maximum  number  of bytes used for all HTTP/2 query buffers com‐
651              bined. These buffers contain (partial) DNS queries  waiting  for
652              request  stream completion.  An RST_STREAM frame will be send to
653              streams exceeding this limit. Default is 4  megabytes.  A  plain
654              number  is  in  bytes,  append  'k',  'm'  or 'g' for kilobytes,
655              megabytes or gigabytes (1024*1024 bytes in a megabyte).
656
657       http-response-buffer-size: <size in bytes>
658              Maximum number of bytes used for  all  HTTP/2  response  buffers
659              combined.  These  buffers  contain  DNS  responses waiting to be
660              written back to the clients.  An RST_STREAM frame will  be  send
661              to streams exceeding this limit. Default is 4 megabytes. A plain
662              number is in bytes,  append  'k',  'm'  or  'g'  for  kilobytes,
663              megabytes or gigabytes (1024*1024 bytes in a megabyte).
664
665       http-nodelay: <yes or no>
666              Set  TCP_NODELAY  socket  option on sockets used to provide DNS-
667              over-HTTPS service.  Ignored if the option is not available. De‐
668              fault is yes.
669
670       http-notls-downstream: <yes or no>
671              Disable use of TLS for the downstream DNS-over-HTTP connections.
672              Useful for local back end servers.  Default is no.
673
674       use-systemd: <yes or no>
675              Enable or disable systemd socket activation.  Default is no.
676
677       do-daemonize: <yes or no>
678              Enable or disable whether the  unbound  server  forks  into  the
679              background  as  a daemon.  Set the value to no when unbound runs
680              as systemd service.  Default is yes.
681
682       tcp-connection-limit: <IP netblock> <limit>
683              Allow up to limit simultaneous TCP connections  from  the  given
684              netblock.   When  at the limit, further connections are accepted
685              but closed immediately.  This option  is  experimental  at  this
686              time.
687
688       access-control: <IP netblock> <action>
689              The  netblock  is  given as an IP4 or IP6 address with /size ap‐
690              pended for a classless network block. The action  can  be  deny,
691              refuse,   allow,  allow_setrd,  allow_snoop,  deny_non_local  or
692              refuse_non_local.  The most specific netblock match is used,  if
693              none match deny is used.  The order of the access-control state‐
694              ments therefore does not matter.
695
696              The action deny stops queries from hosts from that netblock.
697
698              The action refuse stops queries too, but sends a DNS  rcode  RE‐
699              FUSED error message back.
700
701              The action allow gives access to clients from that netblock.  It
702              gives only access for recursion clients (which  is  what  almost
703              all clients need).  Nonrecursive queries are refused.
704
705              The  allow  action does allow nonrecursive queries to access the
706              local-data that is configured.  The reason is that this does not
707              involve  the  unbound  server  recursive  lookup  algorithm, and
708              static data is served in the reply.  This supports normal opera‐
709              tions  where nonrecursive queries are made for the authoritative
710              data.  For nonrecursive queries any  replies  from  the  dynamic
711              cache are refused.
712
713              The  allow_setrd  action  ignores the recursion desired (RD) bit
714              and treats all requests as if the recursion desired bit is  set.
715              Note  that  this  behavior violates RFC 1034 which states that a
716              name server should never perform recursive service unless  asked
717              via  the  RD  bit since this interferes with trouble shooting of
718              name servers and their databases. This prohibited  behavior  may
719              be  useful  if another DNS server must forward requests for spe‐
720              cific zones to a resolver DNS server, but only supports stub do‐
721              mains  and  sends queries to the resolver DNS server with the RD
722              bit cleared.
723
724              The action allow_snoop gives nonrecursive access too.  This give
725              both  recursive  and non recursive access.  The name allow_snoop
726              refers to  cache  snooping,  a  technique  to  use  nonrecursive
727              queries  to  examine  the  cache  contents (for malicious acts).
728              However, nonrecursive queries can also be a  valuable  debugging
729              tool (when you want to examine the cache contents). In that case
730              use allow_snoop for your administration host.
731
732              By default only localhost is allowed, the rest is refused.   The
733              default  is  refused, because that is protocol-friendly. The DNS
734              protocol is not designed to handle dropped packets due  to  pol‐
735              icy,  and  dropping  may  result in (possibly excessive) retried
736              queries.
737
738              The deny_non_local and refuse_non_local settings are  for  hosts
739              that are only allowed to query for the authoritative local-data,
740              they are not allowed full recursion but only  the  static  data.
741              With  deny_non_local,  messages that are disallowed are dropped,
742              with refuse_non_local they receive error code REFUSED.
743
744       access-control-tag: <IP netblock> <"list of tags">
745              Assign tags to access-control elements. Clients using  this  ac‐
746              cess  control element use localzones that are tagged with one of
747              these tags. Tags must be defined in define-tags.   Enclose  list
748              of  tags  in  quotes  ("")  and  put spaces between tags. If ac‐
749              cess-control-tag is configured for a netblock that does not have
750              an  access-control,  an access-control element with action allow
751              is configured for this netblock.
752
753       access-control-tag-action: <IP netblock> <tag> <action>
754              Set action for particular tag for given access control  element.
755              If  you have multiple tag values, the tag used to lookup the ac‐
756              tion is the first tag match between access-control-tag  and  lo‐
757              cal-zone-tag  where  "first" comes from the order of the define-
758              tag values.
759
760       access-control-tag-data: <IP netblock> <tag> <"resource record string">
761              Set redirect data for particular tag for  given  access  control
762              element.
763
764       access-control-view: <IP netblock> <view name>
765              Set view for given access control element.
766
767       chroot: <directory>
768              If  chroot  is enabled, you should pass the configfile (from the
769              commandline) as a full path from the original  root.  After  the
770              chroot  has been performed the now defunct portion of the config
771              file path is removed to be able to reread  the  config  after  a
772              reload.
773
774              All  other  file paths (working dir, logfile, roothints, and key
775              files) can be specified in several ways:  as  an  absolute  path
776              relative  to the new root, as a relative path to the working di‐
777              rectory, or as an absolute path relative to the  original  root.
778              In  the last case the path is adjusted to remove the unused por‐
779              tion.
780
781              The pidfile can be either a relative path to the working  direc‐
782              tory,  or  an absolute path relative to the original root. It is
783              written just prior to chroot and dropping permissions. This  al‐
784              lows the pidfile to be /var/run/unbound.pid and the chroot to be
785              /var/unbound, for example. Note that Unbound is not able to  re‐
786              move the pidfile after termination when it is located outside of
787              the chroot directory.
788
789              Additionally, unbound may need to access /dev/urandom  (for  en‐
790              tropy) from inside the chroot.
791
792              If given a chroot is done to the given directory. By default ch‐
793              root is enabled and the default is "/etc/unbound". If  you  give
794              "" no chroot is performed.
795
796       username: <name>
797              If  given,  after  binding  the  port  the  user  privileges are
798              dropped. Default is "unbound". If you give username: "" no  user
799              change is performed.
800
801              If  this  user  is  not capable of binding the port, reloads (by
802              signal HUP) will still retain the opened ports.  If  you  change
803              the port number in the config file, and that new port number re‐
804              quires privileges, then a reload will fail; a restart is needed.
805
806       directory: <directory>
807              Sets the working directory for the program. Default is "/etc/un‐
808              bound".  On Windows the string "%EXECUTABLE%" tries to change to
809              the directory that  unbound.exe  resides  in.   If  you  give  a
810              server:  directory:  dir  before  include:  file statements then
811              those includes can be relative to the working directory.
812
813       logfile: <filename>
814              If "" is given, logging goes to stderr, or nowhere  once  daemo‐
815              nized.  The logfile is appended to, in the following format:
816              [seconds since 1970] unbound[pid:tid]: type: message.
817              If  this  option  is  given,  the use-syslog is option is set to
818              "no".  The logfile is reopened (for append) when the config file
819              is reread, on SIGHUP.
820
821       use-syslog: <yes or no>
822              Sets  unbound  to  send  log messages to the syslogd, using sys‐
823              log(3).  The log facility LOG_DAEMON is used, with identity "un‐
824              bound".   The  logfile  setting is overridden when use-syslog is
825              turned on.  The default is to log to syslog.
826
827       log-identity: <string>
828              If "" is given (default), then the name of the executable,  usu‐
829              ally  "unbound" is used to report to the log.  Enter a string to
830              override it with that, which is useful on systems that run  more
831              than  one instance of unbound, with different configurations, so
832              that the logs can be easily distinguished against.
833
834       log-time-ascii: <yes or no>
835              Sets logfile lines to use a timestamp in UTC ascii.  Default  is
836              no,  which  prints the seconds since 1970 in brackets. No effect
837              if using syslog, in  that  case  syslog  formats  the  timestamp
838              printed into the log files.
839
840       log-queries: <yes or no>
841              Prints one line per query to the log, with the log timestamp and
842              IP address, name, type and class.  Default is no.  Note that  it
843              takes time to print these lines which makes the server (signifi‐
844              cantly) slower.  Odd  (nonprintable)  characters  in  names  are
845              printed as '?'.
846
847       log-replies: <yes or no>
848              Prints one line per reply to the log, with the log timestamp and
849              IP address, name, type, class, return  code,  time  to  resolve,
850              from  cache  and  response  size.   Default is no.  Note that it
851              takes time to print these lines which makes the server (signifi‐
852              cantly)  slower.   Odd  (nonprintable)  characters  in names are
853              printed as '?'.
854
855       log-tag-queryreply: <yes or no>
856              Prints  the  word  'query'  and  'reply'  with  log-queries  and
857              log-replies.   This makes filtering logs easier.  The default is
858              off (for backwards compatibility).
859
860       log-local-actions: <yes or no>
861              Print log lines to inform about local zone actions.  These lines
862              are  like  the  local-zone  type inform prints out, but they are
863              also printed for the other types of local zones.
864
865       log-servfail: <yes or no>
866              Print log lines that say why queries return SERVFAIL to clients.
867              This  is  separate  from the verbosity debug logs, much smaller,
868              and printed at the error level, not the info level of debug info
869              from verbosity.
870
871       pidfile: <filename>
872              The  process  id  is  written  to the file. Default is "/run/un‐
873              bound/unbound.pid".  So,
874              kill -HUP `cat /run/unbound/unbound.pid`
875              triggers a reload,
876              kill -TERM `cat /run/unbound/unbound.pid`
877              gracefully terminates.
878
879       root-hints: <filename>
880              Read the root hints from this file. Default  is  nothing,  using
881              builtin  hints for the IN class. The file has the format of zone
882              files, with root nameserver names and addresses  only.  The  de‐
883              fault  may become outdated, when servers change, therefore it is
884              good practice to use a root-hints file.
885
886       hide-identity: <yes or no>
887              If enabled id.server and hostname.bind queries are refused.
888
889       identity: <string>
890              Set the identity to report. If set to "", the default, then  the
891              hostname of the server is returned.
892
893       hide-version: <yes or no>
894              If enabled version.server and version.bind queries are refused.
895
896       version: <string>
897              Set  the  version to report. If set to "", the default, then the
898              package version is returned.
899
900       hide-http-user-agent: <yes or no>
901              If enabled the HTTP header User-Agent is not set. Use with  cau‐
902              tion  as  some webserver configurations may reject HTTP requests
903              lacking this header.  If needed, it is better to explicitly  set
904              the http-user-agent below.
905
906       http-user-agent: <string>
907              Set  the  HTTP  User-Agent header for outgoing HTTP requests. If
908              set to "", the default, then the package name  and  version  are
909              used.
910
911       nsid: <string>
912              Add  the  specified  nsid to the EDNS section of the answer when
913              queried with an NSID EDNS enabled packet.  As a sequence of  hex
914              characters or with ascii_ prefix and then an ascii string.
915
916       hide-trustanchor: <yes or no>
917              If enabled trustanchor.unbound queries are refused.
918
919       target-fetch-policy: <"list of numbers">
920              Set  the  target fetch policy used by unbound to determine if it
921              should fetch nameserver target addresses opportunistically.  The
922              policy is described per dependency depth.
923
924              The  number  of  values  determines the maximum dependency depth
925              that unbound will pursue in answering a query.  A  value  of  -1
926              means to fetch all targets opportunistically for that dependency
927              depth. A value of 0 means to fetch on demand  only.  A  positive
928              value fetches that many targets opportunistically.
929
930              Enclose the list between quotes ("") and put spaces between num‐
931              bers.  The default is "3 2 1 0 0". Setting all zeroes, "0 0 0  0
932              0"  gives  behaviour closer to that of BIND 9, while setting "-1
933              -1 -1 -1 -1" gives behaviour rumoured to be closer  to  that  of
934              BIND 8.
935
936       harden-short-bufsize: <yes or no>
937              Very  small  EDNS buffer sizes from queries are ignored. Default
938              is on, as described in the standard.
939
940       harden-large-queries: <yes or no>
941              Very large queries are ignored. Default is off, since it is  le‐
942              gal  protocol wise to send these, and could be necessary for op‐
943              eration if TSIG or EDNS payload is very large.
944
945       harden-glue: <yes or no>
946              Will trust glue only if it is within the servers authority.  De‐
947              fault is yes.
948
949       harden-dnssec-stripped: <yes or no>
950              Require  DNSSEC  data  for trust-anchored zones, if such data is
951              absent, the zone becomes bogus. If turned  off,  and  no  DNSSEC
952              data  is  received  (or the DNSKEY data fails to validate), then
953              the zone is made insecure, this behaves like there is  no  trust
954              anchor.  You  could turn this off if you are sometimes behind an
955              intrusive firewall (of some sort) that removes DNSSEC data  from
956              packets,  or  a  zone  changes  from signed to unsigned to badly
957              signed often. If turned off you run the risk of a downgrade  at‐
958              tack that disables security for a zone. Default is yes.
959
960       harden-below-nxdomain: <yes or no>
961              From RFC 8020 (with title "NXDOMAIN: There Really Is Nothing Un‐
962              derneath"), returns nxdomain to queries for a name below another
963              name  that is already known to be nxdomain.  DNSSEC mandates no‐
964              error for empty nonterminals, hence this is possible.  Very  old
965              software might return nxdomain for empty nonterminals (that usu‐
966              ally happen for reverse IP address lookups), and thus may be in‐
967              compatible  with  this.  To try to avoid this only DNSSEC-secure
968              nxdomains are used, because  the  old  software  does  not  have
969              DNSSEC.   Default  is  yes.   The  nxdomain must be secure, this
970              means nsec3 with optout is insufficient.
971
972       harden-referral-path: <yes or no>
973              Harden the referral path by performing  additional  queries  for
974              infrastructure data.  Validates the replies if trust anchors are
975              configured and the zones are signed.  This enforces DNSSEC vali‐
976              dation  on  nameserver NS sets and the nameserver addresses that
977              are encountered on the referral path to the answer.  Default no,
978              because  it  burdens  the  authority  servers, and it is not RFC
979              standard, and could lead to performance problems because of  the
980              extra  query  load  that is generated.  Experimental option.  If
981              you enable it  consider  adding  more  numbers  after  the  tar‐
982              get-fetch-policy to increase the max depth that is checked to.
983
984       harden-algo-downgrade: <yes or no>
985              Harden  against algorithm downgrade when multiple algorithms are
986              advertised in the DS record.  If no, allows  the  weakest  algo‐
987              rithm  to  validate the zone.  Default is no.  Zone signers must
988              produce zones that allow this feature  to  work,  but  sometimes
989              they  do not, and turning this option off avoids that validation
990              failure.
991
992       use-caps-for-id: <yes or no>
993              Use 0x20-encoded random bits in the  query  to  foil  spoof  at‐
994              tempts.   This  perturbs  the  lowercase  and uppercase of query
995              names sent to authority servers and checks if  the  reply  still
996              has  the  correct casing.  Disabled by default.  This feature is
997              an experimental implementation of draft dns-0x20.
998
999       caps-exempt: <domain>
1000              Exempt the domain so that it does not receive  caps-for-id  per‐
1001              turbed  queries.   For domains that do not support 0x20 and also
1002              fail with fallback because they keep sending different  answers,
1003              like some load balancers.  Can be given multiple times, for dif‐
1004              ferent domains.
1005
1006       caps-whitelist: <yes or no>
1007              Alternate syntax for caps-exempt.
1008
1009       qname-minimisation: <yes or no>
1010              Send minimum amount of information to upstream  servers  to  en‐
1011              hance  privacy.   Only send minimum required labels of the QNAME
1012              and set QTYPE to A when possible.  Best  effort  approach;  full
1013              QNAME and original QTYPE will be sent when upstream replies with
1014              a RCODE other than NOERROR, except when receiving NXDOMAIN  from
1015              a DNSSEC signed zone. Default is yes.
1016
1017       qname-minimisation-strict: <yes or no>
1018              QNAME  minimisation  in strict mode. Do not fall-back to sending
1019              full QNAME to potentially broken nameservers. A lot  of  domains
1020              will  not be resolvable when this option in enabled. Only use if
1021              you know what you are doing.  This option only has  effect  when
1022              qname-minimisation is enabled. Default is no.
1023
1024       aggressive-nsec: <yes or no>
1025              Aggressive  NSEC  uses the DNSSEC NSEC chain to synthesize NXDO‐
1026              MAIN and other denials, using information  from  previous  NXDO‐
1027              MAINs  answers.   Default  is  no.  It helps to reduce the query
1028              rate towards targets that  get  a  very  high  nonexistent  name
1029              lookup rate.
1030
1031       private-address: <IP address or subnet>
1032              Give  IPv4 of IPv6 addresses or classless subnets. These are ad‐
1033              dresses on your private network, and are not allowed to  be  re‐
1034              turned  for  public  internet names.  Any occurrence of such ad‐
1035              dresses are removed from DNS answers. Additionally,  the  DNSSEC
1036              validator  may  mark  the  answers  bogus. This protects against
1037              so-called DNS Rebinding, where a user browser is turned  into  a
1038              network  proxy,  allowing  remote  access through the browser to
1039              other parts of your private network.  Some names can be  allowed
1040              to contain your private addresses, by default all the local-data
1041              that you configured is allowed to, and  you  can  specify  addi‐
1042              tional names using private-domain.  No private addresses are en‐
1043              abled by default.  We consider to enable this  for  the  RFC1918
1044              private  IP  address  space  by  default in later releases. That
1045              would enable  private  addresses  for  10.0.0.0/8  172.16.0.0/12
1046              192.168.0.0/16  169.254.0.0/16 fd00::/8 and fe80::/10, since the
1047              RFC standards say these addresses should not be visible  on  the
1048              public internet.  Turning on 127.0.0.0/8 would hinder many spam‐
1049              blocklists  as  they  use  that.   Adding  ::ffff:0:0/96   stops
1050              IPv4-mapped IPv6 addresses from bypassing the filter.
1051
1052       private-domain: <domain name>
1053              Allow this domain, and all its subdomains to contain private ad‐
1054              dresses.  Give multiple times to allow multiple domain names  to
1055              contain private addresses. Default is none.
1056
1057       unwanted-reply-threshold: <number>
1058              If  set,  a total number of unwanted replies is kept track of in
1059              every thread.  When it reaches the threshold, a defensive action
1060              is taken and a warning is printed to the log.  The defensive ac‐
1061              tion is to clear the rrset and message caches, hopefully  flush‐
1062              ing  away  any poison.  A value of 10 million is suggested.  De‐
1063              fault is 0 (turned off).
1064
1065       do-not-query-address: <IP address>
1066              Do not query the given IP address. Can be  IP4  or  IP6.  Append
1067              /num  to  indicate  a classless delegation netblock, for example
1068              like 10.2.3.4/24 or 2001::11/64.
1069
1070       do-not-query-localhost: <yes or no>
1071              If yes, localhost is added to the do-not-query-address  entries,
1072              both  IP6  ::1 and IP4 127.0.0.1/8. If no, then localhost can be
1073              used to send queries to. Default is yes.
1074
1075       prefetch: <yes or no>
1076              If yes, message cache elements are prefetched before they expire
1077              to  keep  the  cache  up to date.  Default is no.  Turning it on
1078              gives about 10 percent more traffic and load on the machine, but
1079              popular items do not expire from the cache.
1080
1081       prefetch-key: <yes or no>
1082              If  yes,  fetch  the  DNSKEYs earlier in the validation process,
1083              when a DS record is encountered.  This lowers the latency of re‐
1084              quests.   It  does  use a little more CPU.  Also if the cache is
1085              set to 0, it is no use. Default is no.
1086
1087       deny-any: <yes or no>
1088              If yes, deny queries of type ANY with an  empty  response.   De‐
1089              fault is no.  If disabled, unbound responds with a short list of
1090              resource records if some can be found in the cache and makes the
1091              upstream type ANY query if there are none.
1092
1093       rrset-roundrobin: <yes or no>
1094              If yes, Unbound rotates RRSet order in response (the random num‐
1095              ber is taken from the query ID, for speed  and  thread  safety).
1096              Default is yes.
1097
1098       minimal-responses: <yes or no>
1099              If  yes,  Unbound  does not insert authority/additional sections
1100              into response messages when those  sections  are  not  required.
1101              This  reduces  response  size  significantly,  and may avoid TCP
1102              fallback for some responses.  This may cause a  slight  speedup.
1103              The  default  is  yes, even though the DNS protocol RFCs mandate
1104              these sections, and the additional content could be of  use  and
1105              save roundtrips for clients.  Because they are not used, and the
1106              saved roundtrips are easier saved with prefetch, whilst this  is
1107              faster.
1108
1109       disable-dnssec-lame-check: <yes or no>
1110              If  true,  disables  the  DNSSEC lameness check in the iterator.
1111              This check sees if RRSIGs are present in the answer, when dnssec
1112              is  expected,  and retries another authority if RRSIGs are unex‐
1113              pectedly missing.  The  validator  will  insist  in  RRSIGs  for
1114              DNSSEC signed domains regardless of this setting, if a trust an‐
1115              chor is loaded.
1116
1117       module-config: <"module names">
1118              Module configuration, a list of module names separated  by  spa‐
1119              ces,  surround  the  string with quotes (""). The modules can be
1120              respip, validator, or iterator (and possibly more,  see  below).
1121              Setting  this to just "iterator" will result in a non-validating
1122              server.  Setting this  to  "validator  iterator"  will  turn  on
1123              DNSSEC  validation.  The ordering of the modules is significant,
1124              the order decides the order of processing.  You  must  also  set
1125              trust-anchors for validation to be useful.  Adding respip to the
1126              front will cause RPZ processing to be done on all queries.   The
1127              default is "validator iterator".
1128
1129              When the server is built with EDNS client subnet support the de‐
1130              fault is "subnetcache validator iterator".   Most  modules  that
1131              need to be listed here have to be listed at the beginning of the
1132              line.  The subnetcachedb module has to be listed just before the
1133              iterator.   The python module can be listed in different places,
1134              it then processes the output of the module it  is  just  before.
1135              The dynlib module can be listed pretty much anywhere, it is only
1136              a very thin wrapper that allows dynamic libraries to run in  its
1137              place.
1138
1139       trust-anchor-file: <filename>
1140              File  with  trusted  keys for validation. Both DS and DNSKEY en‐
1141              tries can appear in the file. The format  of  the  file  is  the
1142              standard  DNS  Zone file format.  Default is "", or no trust an‐
1143              chor file.
1144
1145       auto-trust-anchor-file: <filename>
1146              File with trust anchor for  one  zone,  which  is  tracked  with
1147              RFC5011  probes.   The  probes  are run several times per month,
1148              thus the machine must be online frequently.   The  initial  file
1149              can be one with contents as described in trust-anchor-file.  The
1150              file is written to when the anchor is updated,  so  the  unbound
1151              user  must have write permission.  Write permission to the file,
1152              but also to the directory it is in (to create a temporary  file,
1153              which is necessary to deal with filesystem full events), it must
1154              also be inside the chroot (if that is used).
1155
1156       trust-anchor: <"Resource Record">
1157              A DS or DNSKEY RR for a key to use for validation. Multiple  en‐
1158              tries can be given to specify multiple trusted keys, in addition
1159              to the trust-anchor-files.  The resource record  is  entered  in
1160              the same format as 'dig' or 'drill' prints them, the same format
1161              as in the zone file. Has to be on a single line, with ""  around
1162              it. A TTL can be specified for ease of cut and paste, but is ig‐
1163              nored.  A class can be specified, but class IN is default.
1164
1165       trusted-keys-file: <filename>
1166              File with trusted keys for validation.  Specify  more  than  one
1167              file  with  several  entries, one file per entry. Like trust-an‐
1168              chor-file but has a different  file  format.  Format  is  BIND-9
1169              style  format, the trusted-keys { name flag proto algo "key"; };
1170              clauses are read.  It is possible to  use  wildcards  with  this
1171              statement, the wildcard is expanded on start and on reload.
1172
1173       trust-anchor-signaling: <yes or no>
1174              Send  RFC8145  key tag query after trust anchor priming. Default
1175              is yes.
1176
1177       root-key-sentinel: <yes or no>
1178              Root key trust anchor sentinel. Default is yes.
1179
1180       domain-insecure: <domain name>
1181              Sets domain name to be insecure, DNSSEC chain of  trust  is  ig‐
1182              nored  towards the domain name.  So a trust anchor above the do‐
1183              main name can not make the domain secure with a DS record,  such
1184              a  DS  record  is  then ignored.  Can be given multiple times to
1185              specify multiple domains that are treated as  if  unsigned.   If
1186              you  set trust anchors for the domain they override this setting
1187              (and the domain is secured).
1188
1189              This can be useful if you want to make sure a trust  anchor  for
1190              external  lookups does not affect an (unsigned) internal domain.
1191              A DS record externally can create validation failures  for  that
1192              internal domain.
1193
1194       val-override-date: <rrsig-style date spec>
1195              Default  is "" or "0", which disables this debugging feature. If
1196              enabled by giving a RRSIG style date, that date is used for ver‐
1197              ifying RRSIG inception and expiration dates, instead of the cur‐
1198              rent date. Do not set this unless you  are  debugging  signature
1199              inception  and  expiration.  The value -1 ignores the date alto‐
1200              gether, useful for some special applications.
1201
1202       val-sig-skew-min: <seconds>
1203              Minimum number of seconds of clock skew to  apply  to  validated
1204              signatures.   A  value of 10% of the signature lifetime (expira‐
1205              tion - inception) is used, capped by this setting.   Default  is
1206              3600  (1  hour)  which  allows for daylight savings differences.
1207              Lower this value for more strict checking of short lived  signa‐
1208              tures.
1209
1210       val-sig-skew-max: <seconds>
1211              Maximum  number  of  seconds of clock skew to apply to validated
1212              signatures.  A value of 10% of the signature  lifetime  (expira‐
1213              tion  -  inception) is used, capped by this setting.  Default is
1214              86400 (24 hours) which allows for timezone setting  problems  in
1215              stable  domains.  Setting both min and max very low disables the
1216              clock skew allowances.  Setting both min and max very high makes
1217              the validator check the signature timestamps less strictly.
1218
1219       val-max-restart: <number>
1220              The  maximum number the validator should restart validation with
1221              another authority in case of failed validation. Default is 5.
1222
1223       val-bogus-ttl: <number>
1224              The time to live for bogus data. This is data  that  has  failed
1225              validation;  due  to invalid signatures or other checks. The TTL
1226              from that data cannot be trusted, and this  value  is  used  in‐
1227              stead.  The  value is in seconds, default 60.  The time interval
1228              prevents repeated revalidation of bogus data.
1229
1230       val-clean-additional: <yes or no>
1231              Instruct the validator to remove data from the  additional  sec‐
1232              tion  of  secure messages that are not signed properly. Messages
1233              that are insecure, bogus, indeterminate or unchecked are not af‐
1234              fected.  Default  is  yes. Use this setting to protect the users
1235              that rely on this validator for authentication from  potentially
1236              bad data in the additional section.
1237
1238       val-log-level: <number>
1239              Have  the  validator  print validation failures to the log.  Re‐
1240              gardless of the verbosity setting.  Default is 0,  off.   At  1,
1241              for  every  user query that fails a line is printed to the logs.
1242              This way you can monitor what happens with  validation.   Use  a
1243              diagnosis tool, such as dig or drill, to find out why validation
1244              is failing for these queries.  At 2, not  only  the  query  that
1245              failed is printed but also the reason why unbound thought it was
1246              wrong and which server sent the faulty data.
1247
1248       val-permissive-mode: <yes or no>
1249              Instruct the validator to mark bogus messages as  indeterminate.
1250              The  security  checks  are performed, but if the result is bogus
1251              (failed security), the reply is not  withheld  from  the  client
1252              with  SERVFAIL as usual. The client receives the bogus data. For
1253              messages that are found to be  secure  the  AD  bit  is  set  in
1254              replies.  Also logging is performed as for full validation.  The
1255              default value is "no".
1256
1257       ignore-cd-flag: <yes or no>
1258              Instruct unbound to ignore the CD flag from clients  and  refuse
1259              to  return  bogus  answers to them.  Thus, the CD (Checking Dis‐
1260              abled) flag does not disable checking any more.  This is  useful
1261              if  legacy (w2008) servers that set the CD flag but cannot vali‐
1262              date DNSSEC themselves are the clients, and  then  unbound  pro‐
1263              vides them with DNSSEC protection.  The default value is "no".
1264
1265       serve-expired: <yes or no>
1266              If  enabled,  unbound attempts to serve old responses from cache
1267              with a TTL of serve-expired-reply-ttl in  the  response  without
1268              waiting for the actual resolution to finish.  The actual resolu‐
1269              tion answer ends up in the cache later on.  Default is "no".
1270
1271       serve-expired-ttl: <seconds>
1272              Limit serving of expired responses to configured  seconds  after
1273              expiration. 0 disables the limit.  This option only applies when
1274              serve-expired is enabled.  A suggested value per RFC 8767 is be‐
1275              tween 86400 (1 day) and 259200 (3 days).  The default is 0.
1276
1277       serve-expired-ttl-reset: <yes or no>
1278              Set  the  TTL  of expired records to the serve-expired-ttl value
1279              after a failed attempt to retrieve  the  record  from  upstream.
1280              This  makes sure that the expired records will be served as long
1281              as there are queries for it.  Default is "no".
1282
1283       serve-expired-reply-ttl: <seconds>
1284              TTL value to use when replying with expired data.  If  serve-ex‐
1285              pired-client-timeout  is also used then it is RECOMMENDED to use
1286              30 as the value (RFC 8767).  The default is 30.
1287
1288       serve-expired-client-timeout: <msec>
1289              Time in milliseconds before replying to the client with  expired
1290              data.   This  essentially  enables  the  serve-stale behavior as
1291              specified in RFC 8767 that first tries to resolve before immedi‐
1292              ately responding with expired data.  A recommended value per RFC
1293              8767 is 1800.  Setting this to 0  will  disable  this  behavior.
1294              Default is 0.
1295
1296       serve-original-ttl: <yes or no>
1297              If  enabled,  unbound will always return the original TTL as re‐
1298              ceived from the upstream name server rather than the  decrement‐
1299              ing  TTL  as stored in the cache.  This feature may be useful if
1300              unbound serves as a front-end to  a  hidden  authoritative  name
1301              server.  Enabling  this feature does not impact cache expiry, it
1302              only changes the TTL unbound embeds  in  responses  to  queries.
1303              Note  that enabling this feature implicitly disables enforcement
1304              of the configured minimum and maximum  TTL,  as  it  is  assumed
1305              users  who enable this feature do not want unbound to change the
1306              TTL obtained from an upstream server.  Thus, the values set  us‐
1307              ing  cache-min-ttl  and  cache-max-ttl  are ignored.  Default is
1308              "no".
1309
1310       val-nsec3-keysize-iterations: <"list of values">
1311              List of keysize and iteration count values, separated by spaces,
1312              surrounded  by  quotes. Default is "1024 150 2048 150 4096 150".
1313              This determines the maximum allowed NSEC3 iteration count before
1314              a  message  is  simply marked insecure instead of performing the
1315              many hashing iterations. The list must be in ascending order and
1316              have  at least one entry. If you set it to "1024 65535" there is
1317              no restriction to NSEC3 iteration values.  This  table  must  be
1318              kept short; a very long list could cause slower operation.
1319
1320       zonemd-permissive-mode: <yes or no>
1321              If  enabled the ZONEMD verification failures are only logged and
1322              do not cause the zone to be blocked and  only  return  servfail.
1323              Useful  for  testing  out  if  it works, or if the operator only
1324              wants to be notified of a problem  without  disrupting  service.
1325              Default is no.
1326
1327       add-holddown: <seconds>
1328              Instruct  the auto-trust-anchor-file probe mechanism for RFC5011
1329              autotrust updates to add new trust anchors only after they  have
1330              been visible for this time.  Default is 30 days as per the RFC.
1331
1332       del-holddown: <seconds>
1333              Instruct  the auto-trust-anchor-file probe mechanism for RFC5011
1334              autotrust updates to remove revoked  trust  anchors  after  they
1335              have been kept in the revoked list for this long.  Default is 30
1336              days as per the RFC.
1337
1338       keep-missing: <seconds>
1339              Instruct the auto-trust-anchor-file probe mechanism for  RFC5011
1340              autotrust  updates  to  remove  missing trust anchors after they
1341              have been unseen for this long.  This cleans up the  state  file
1342              if  the target zone does not perform trust anchor revocation, so
1343              this makes the auto probe mechanism work with zones that perform
1344              regular  (non-5011)  rollovers.   The  default is 366 days.  The
1345              value 0 does not remove missing anchors, as per the RFC.
1346
1347       permit-small-holddown: <yes or no>
1348              Debug option that allows the autotrust 5011 rollover  timers  to
1349              assume very small values.  Default is no.
1350
1351       key-cache-size: <number>
1352              Number  of  bytes size of the key cache. Default is 4 megabytes.
1353              A plain number is in bytes, append 'k', 'm'  or  'g'  for  kilo‐
1354              bytes, megabytes or gigabytes (1024*1024 bytes in a megabyte).
1355
1356       key-cache-slabs: <number>
1357              Number  of  slabs in the key cache. Slabs reduce lock contention
1358              by threads.  Must be set to a power of 2. Setting (close) to the
1359              number of cpus is a reasonable guess.
1360
1361       neg-cache-size: <number>
1362              Number  of  bytes size of the aggressive negative cache. Default
1363              is 1 megabyte.  A plain number is in bytes, append 'k',  'm'  or
1364              'g'  for kilobytes, megabytes or gigabytes (1024*1024 bytes in a
1365              megabyte).
1366
1367       unblock-lan-zones: <yes or no>
1368              Default is disabled.   If  enabled,  then  for  private  address
1369              space,  the reverse lookups are no longer filtered.  This allows
1370              unbound when running as dns service on a host where it  provides
1371              service  for  that  host,  to put out all of the queries for the
1372              'lan' upstream.  When enabled, only localhost, 127.0.0.1 reverse
1373              and  ::1  reverse zones are configured with default local zones.
1374              Disable the option when unbound is running as a (DHCP-) DNS net‐
1375              work resolver for a group of machines, where such lookups should
1376              be filtered (RFC compliance), this  also  stops  potential  data
1377              leakage about the local network to the upstream DNS servers.
1378
1379       insecure-lan-zones: <yes or no>
1380              Default  is  disabled.  If enabled, then reverse lookups in pri‐
1381              vate address space are not validated.  This is usually  required
1382              whenever unblock-lan-zones is used.
1383
1384       local-zone: <zone> <type>
1385              Configure  a  local zone. The type determines the answer to give
1386              if there is no  match  from  local-data.  The  types  are  deny,
1387              refuse,  static, transparent, redirect, nodefault, typetranspar‐
1388              ent, inform, inform_deny,  inform_redirect,  always_transparent,
1389              always_refuse, always_nxdomain, always_null, noview, and are ex‐
1390              plained below. After that the default settings are  listed.  Use
1391              local-data: to enter data into the local zone. Answers for local
1392              zones are authoritative DNS answers. By default  the  zones  are
1393              class IN.
1394
1395              If you need more complicated authoritative data, with referrals,
1396              wildcards, CNAME/DNAME support, or DNSSEC authoritative service,
1397              setup  a  stub-zone  for it as detailed in the stub zone section
1398              below.
1399
1400            deny Do not send an answer, drop the query.  If there is  a  match
1401                 from local data, the query is answered.
1402
1403            refuse
1404                 Send an error message reply, with rcode REFUSED.  If there is
1405                 a match from local data, the query is answered.
1406
1407            static
1408                 If there is a match from local data, the query  is  answered.
1409                 Otherwise,  the  query  is  answered with nodata or nxdomain.
1410                 For a negative answer a SOA is  included  in  the  answer  if
1411                 present as local-data for the zone apex domain.
1412
1413            transparent
1414                 If  there  is a match from local data, the query is answered.
1415                 Otherwise if the query has a different name, the query is re‐
1416                 solved  normally.  If the query is for a name given in local‐
1417                 data but no such type of data is given in localdata,  then  a
1418                 noerror nodata answer is returned.  If no local-zone is given
1419                 local-data causes a transparent zone to  be  created  by  de‐
1420                 fault.
1421
1422            typetransparent
1423                 If  there  is a match from local data, the query is answered.
1424                 If the query is for a different name, or for  the  same  name
1425                 but  for  a  different  type, the query is resolved normally.
1426                 So, similar to transparent but types that are not  listed  in
1427                 local data are resolved normally, so if an A record is in the
1428                 local data that does  not  cause  a  nodata  reply  for  AAAA
1429                 queries.
1430
1431            redirect
1432                 The  query is answered from the local data for the zone name.
1433                 There may be no local data beneath the zone name.   This  an‐
1434                 swers  queries  for  the zone, and all subdomains of the zone
1435                 with the local data for the zone.  It can be used to redirect
1436                 a  domain  to  return  a  different address record to the end
1437                 user,  with  local-zone:  "example.com."  redirect  and   lo‐
1438                 cal-data:  "example.com.  A  127.0.0.1" queries for www.exam‐
1439                 ple.com and www.foo.example.com are redirected, so that users
1440                 with  web  browsers  cannot  access  sites  with suffix exam‐
1441                 ple.com.
1442
1443            inform
1444                 The query is answered normally,  same  as  transparent.   The
1445                 client  IP  address  (@portnumber) is printed to the logfile.
1446                 The log message is: timestamp,  unbound-pid,  info:  zonename
1447                 inform IP@port queryname type class.  This option can be used
1448                 for normal resolution, but machines looking up infected names
1449                 are logged, eg. to run antivirus on them.
1450
1451            inform_deny
1452                 The query is dropped, like 'deny', and logged, like 'inform'.
1453                 Ie. find infected machines without answering the queries.
1454
1455            inform_redirect
1456                 The query is redirected, like 'redirect',  and  logged,  like
1457                 'inform'.   Ie.  answer  queries with fixed data and also log
1458                 the machines that ask.
1459
1460            always_transparent
1461                 Like transparent, but ignores local data  and  resolves  nor‐
1462                 mally.
1463
1464            always_refuse
1465                 Like refuse, but ignores local data and refuses the query.
1466
1467            always_nxdomain
1468                 Like  static, but ignores local data and returns nxdomain for
1469                 the query.
1470
1471            always_nodata
1472                 Like static, but ignores local data and  returns  nodata  for
1473                 the query.
1474
1475            always_deny
1476                 Like deny, but ignores local data and drops the query.
1477
1478            always_null
1479                 Always  returns  0.0.0.0  or  ::0 for every name in the zone.
1480                 Like redirect with zero data for A and AAAA.   Ignores  local
1481                 data in the zone.  Used for some block lists.
1482
1483            noview
1484                 Breaks  out  of  that view and moves towards the global local
1485                 zones for answer to the query.  If  the  view  first  is  no,
1486                 it'll  resolve  normally.   If  view  first is enabled, it'll
1487                 break perform that step and check the  global  answers.   For
1488                 when  the  view has view specific overrides but some zone has
1489                 to be answered from global local zone contents.
1490
1491            nodefault
1492                 Used to turn off default contents for AS112 zones. The  other
1493                 types also turn off default contents for the zone. The 'node‐
1494                 fault' option has no other effect than  turning  off  default
1495                 contents  for  the  given zone.  Use nodefault if you use ex‐
1496                 actly that zone, if you want to use a subzone, use  transpar‐
1497                 ent.
1498
1499       The  default zones are localhost, reverse 127.0.0.1 and ::1, the onion,
1500       test, invalid and the AS112 zones. The  AS112  zones  are  reverse  DNS
1501       zones  for  private use and reserved IP addresses for which the servers
1502       on the internet cannot provide correct answers. They are configured  by
1503       default to give nxdomain (no reverse information) answers. The defaults
1504       can be turned off by specifying your own local-zone of  that  name,  or
1505       using  the  'nodefault'  type. Below is a list of the default zone con‐
1506       tents.
1507
1508            localhost
1509                 The IP4 and IP6 localhost information is given.  NS  and  SOA
1510                 records are provided for completeness and to satisfy some DNS
1511                 update tools. Default content:
1512                 local-zone: "localhost." redirect
1513                 local-data: "localhost. 10800 IN NS localhost."
1514                 local-data: "localhost. 10800 IN
1515                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1516                 local-data: "localhost. 10800 IN A 127.0.0.1"
1517                 local-data: "localhost. 10800 IN AAAA ::1"
1518
1519            reverse IPv4 loopback
1520                 Default content:
1521                 local-zone: "127.in-addr.arpa." static
1522                 local-data: "127.in-addr.arpa. 10800 IN NS localhost."
1523                 local-data: "127.in-addr.arpa. 10800 IN
1524                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1525                 local-data: "1.0.0.127.in-addr.arpa. 10800 IN
1526                     PTR localhost."
1527
1528            reverse IPv6 loopback
1529                 Default content:
1530                 local-zone: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1531                     0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." static
1532                 local-data: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1533                     0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. 10800 IN
1534                     NS localhost."
1535                 local-data: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1536                     0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. 10800 IN
1537                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1538                 local-data: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1539                     0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. 10800 IN
1540                     PTR localhost."
1541
1542            onion (RFC 7686)
1543                 Default content:
1544                 local-zone: "onion." static
1545                 local-data: "onion. 10800 IN NS localhost."
1546                 local-data: "onion. 10800 IN
1547                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1548
1549            test (RFC 6761)
1550                 Default content:
1551                 local-zone: "test." static
1552                 local-data: "test. 10800 IN NS localhost."
1553                 local-data: "test. 10800 IN
1554                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1555
1556            invalid (RFC 6761)
1557                 Default content:
1558                 local-zone: "invalid." static
1559                 local-data: "invalid. 10800 IN NS localhost."
1560                 local-data: "invalid. 10800 IN
1561                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1562
1563            reverse RFC1918 local use zones
1564                 Reverse data for zones  10.in-addr.arpa,  16.172.in-addr.arpa
1565                 to   31.172.in-addr.arpa,   168.192.in-addr.arpa.    The  lo‐
1566                 cal-zone: is set static and as local-data: SOA and NS records
1567                 are provided.
1568
1569            reverse RFC3330 IP4 this, link-local, testnet and broadcast
1570                 Reverse  data for zones 0.in-addr.arpa, 254.169.in-addr.arpa,
1571                 2.0.192.in-addr.arpa (TEST  NET  1),  100.51.198.in-addr.arpa
1572                 (TEST   NET   2),   113.0.203.in-addr.arpa   (TEST   NET  3),
1573                 255.255.255.255.in-addr.arpa.  And  from  64.100.in-addr.arpa
1574                 to 127.100.in-addr.arpa (Shared Address Space).
1575
1576            reverse RFC4291 IP6 unspecified
1577                 Reverse data for zone
1578                 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1579                 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.
1580
1581            reverse RFC4193 IPv6 Locally Assigned Local Addresses
1582                 Reverse data for zone D.F.ip6.arpa.
1583
1584            reverse RFC4291 IPv6 Link Local Addresses
1585                 Reverse data for zones 8.E.F.ip6.arpa to B.E.F.ip6.arpa.
1586
1587            reverse IPv6 Example Prefix
1588                 Reverse  data for zone 8.B.D.0.1.0.0.2.ip6.arpa. This zone is
1589                 used for tutorials and examples. You can remove the block  on
1590                 this zone with:
1591                   local-zone: 8.B.D.0.1.0.0.2.ip6.arpa. nodefault
1592                 You can also selectively unblock a part of the zone by making
1593                 that part transparent with a local-zone statement.  This also
1594                 works with the other default zones.
1595
1596       local-data: "<resource record string>"
1597            Configure  local data, which is served in reply to queries for it.
1598            The query has to match exactly unless you configure the local-zone
1599            as  redirect.  If  not matched exactly, the local-zone type deter‐
1600            mines further processing. If local-data is configured that is  not
1601            a  subdomain  of a local-zone, a transparent local-zone is config‐
1602            ured.  For record types such as TXT, use single quotes, as in  lo‐
1603            cal-data: 'example. TXT "text"'.
1604
1605            If  you  need more complicated authoritative data, with referrals,
1606            wildcards, CNAME/DNAME support, or DNSSEC  authoritative  service,
1607            setup  a stub-zone for it as detailed in the stub zone section be‐
1608            low.
1609
1610       local-data-ptr: "IPaddr name"
1611            Configure local data shorthand for a PTR record with the  reversed
1612            IPv4  or  IPv6  address and the host name.  For example "192.0.2.4
1613            www.example.com".  TTL can be  inserted  like  this:  "2001:DB8::4
1614            7200 www.example.com"
1615
1616       local-zone-tag: <zone> <"list of tags">
1617            Assign  tags to localzones. Tagged localzones will only be applied
1618            when the used access-control element has a matching tag. Tags must
1619            be  defined  in  define-tags.  Enclose list of tags in quotes ("")
1620            and put spaces between tags.  When  there  are  multiple  tags  it
1621            checks  if  the intersection of the list of tags for the query and
1622            local-zone-tag is non-empty.
1623
1624       local-zone-override: <zone> <IP netblock> <type>
1625            Override the localzone type for queries  from  addresses  matching
1626            netblock.  Use this localzone type, regardless the type configured
1627            for the local-zone (both tagged and untagged) and  regardless  the
1628            type configured using access-control-tag-action.
1629
1630       response-ip: <IP-netblock> <action>
1631            This requires use of the "respip" module.
1632
1633            If  the  IP  address in an AAAA or A RR in the answer section of a
1634            response matches the specified IP netblock, the  specified  action
1635            will apply.  <action> has generally the same semantics as that for
1636            access-control-tag-action, but there are some exceptions.
1637
1638            Actions for response-ip are different from those for local-zone in
1639            that in case of the former there is no point of such conditions as
1640            "the query matches it but there is no  local  data".   Because  of
1641            this difference, the semantics of response-ip actions are modified
1642            or simplified as follows: The static, refuse,  transparent,  type‐
1643            transparent,  and  nodefault  actions are invalid for response-ip.
1644            Using any of these will cause the configuration to be rejected  as
1645            faulty. The deny action is non-conditional, i.e. it always results
1646            in dropping the corresponding query.  The resolution result before
1647            applying the deny action is still cached and can be used for other
1648            queries.
1649
1650       response-ip-data: <IP-netblock> <"resource record string">
1651            This requires use of the "respip" module.
1652
1653            This specifies the action data for response-ip with  action  being
1654            to  redirect  as specified by "resource record string".  "Resource
1655            record string" is similar to  that  of  access-control-tag-action,
1656            but  it  must be of either AAAA, A or CNAME types.  If the IP-net‐
1657            block is an IPv6/IPV4 prefix, the record must  be  AAAA/A  respec‐
1658            tively,  unless it is a CNAME (which can be used for both versions
1659            of IP netblocks).  If it is CNAME there must not be more than  one
1660            response-ip-data  for the same IP-netblock.  Also, CNAME and other
1661            types of records must not coexist for the same  IP-netblock,  fol‐
1662            lowing  the  normal  rules  for CNAME records.  The textual domain
1663            name for the CNAME does not have to be explicitly terminated  with
1664            a  dot  (".");  the  root name is assumed to be the origin for the
1665            name.
1666
1667       response-ip-tag: <IP-netblock> <"list of tags">
1668            This requires use of the "respip" module.
1669
1670            Assign tags to response IP-netblocks.  If the  IP  address  in  an
1671            AAAA or A RR in the answer section of a response matches the spec‐
1672            ified IP-netblock, the specified tags are assigned to the  IP  ad‐
1673            dress.   Then,  if an access-control-tag is defined for the client
1674            and it includes one of the tags for the response  IP,  the  corre‐
1675            sponding  access-control-tag-action will apply.  Tag matching rule
1676            is the same as that for access-control-tag and  local-zones.   Un‐
1677            like local-zone-tag, response-ip-tag can be defined for an IP-net‐
1678            block even if no response-ip is defined  for  that  netblock.   If
1679            multiple  response-ip-tag  options  are specified for the same IP-
1680            netblock in different statements, all but the first  will  be  ig‐
1681            nored.   However,  this will not be flagged as a configuration er‐
1682            ror, but the result is probably not what was intended.
1683
1684            Actions specified  in  an  access-control-tag-action  that  has  a
1685            matching  tag with response-ip-tag can be those that are "invalid"
1686            for response-ip listed above, since access-control-tag-actions can
1687            be  shared  with  local  zones.  For these actions, if they behave
1688            differently depending on whether local data exists or not in  case
1689            of  local  zones, the behavior for response-ip-data will generally
1690            result in NOERROR/NODATA instead of NXDOMAIN, since the  response-
1691            ip  data  are  inherently type specific, and non-existence of data
1692            does not indicate anything about the existence or non-existence of
1693            the  qname  itself.   For  example,  if the matching tag action is
1694            static but there is no data for the corresponding response-ip con‐
1695            figuration, then the result will be NOERROR/NODATA.  The only case
1696            where NXDOMAIN is returned is when an always_nxdomain  action  ap‐
1697            plies.
1698
1699       ratelimit: <number or 0>
1700            Enable  ratelimiting  of queries sent to nameserver for performing
1701            recursion.  If 0, the default, it is disabled.  This option is ex‐
1702            perimental  at  this time.  The ratelimit is in queries per second
1703            that are allowed.  More queries are  turned  away  with  an  error
1704            (servfail).   This stops recursive floods, eg. random query names,
1705            but not spoofed reflection floods.  Cached responses are not rate‐
1706            limited  by  this setting.  The zone of the query is determined by
1707            examining the nameservers for it, the zone name is  used  to  keep
1708            track  of  the rate.  For example, 1000 may be a suitable value to
1709            stop the server from being overloaded with random names, and keeps
1710            unbound from sending traffic to the nameservers for those zones.
1711
1712       ratelimit-size: <memory size>
1713            Give  the  size of the data structure in which the current ongoing
1714            rates are kept track in.  Default 4m.  In bytes  or  use  m(mega),
1715            k(kilo),  g(giga).  The ratelimit structure is small, so this data
1716            structure likely does not need to be large.
1717
1718       ratelimit-slabs: <number>
1719            Give power of 2 number of slabs, this is used to reduce lock  con‐
1720            tention  in  the  ratelimit tracking data structure.  Close to the
1721            number of cpus is a fairly good setting.
1722
1723       ratelimit-factor: <number>
1724            Set the amount of queries to rate limit  when  the  limit  is  ex‐
1725            ceeded.   If  set  to 0, all queries are dropped for domains where
1726            the limit is exceeded.  If set to another value, 1 in that  number
1727            is  allowed  through  to  complete.   Default is 10, allowing 1/10
1728            traffic to flow normally.  This can make ordinary queries complete
1729            (if repeatedly queried for), and enter the cache, whilst also mit‐
1730            igating the traffic flow by the factor given.
1731
1732       ratelimit-for-domain: <domain> <number qps or 0>
1733            Override the global ratelimit for an exact match domain name  with
1734            the  listed  number.   You  can give this for any number of names.
1735            For example, for a top-level-domain you may want to have a  higher
1736            limit  than  other  names.  A value of 0 will disable ratelimiting
1737            for that domain.
1738
1739       ratelimit-below-domain: <domain> <number qps or 0>
1740            Override the global ratelimit for a domain name that ends in  this
1741            name.  You can give this multiple times, it then describes differ‐
1742            ent settings in different parts of  the  namespace.   The  closest
1743            matching  suffix is used to determine the qps limit.  The rate for
1744            the  exact  matching  domain  name  is  not  changed,  use   rate‐
1745            limit-for-domain to set that, you might want to use different set‐
1746            tings for a top-level-domain and subdomains.  A value  of  0  will
1747            disable ratelimiting for domain names that end in this name.
1748
1749       ip-ratelimit: <number or 0>
1750            Enable global ratelimiting of queries accepted per ip address.  If
1751            0, the default, it is disabled.  This option  is  experimental  at
1752            this  time.   The  ratelimit is in queries per second that are al‐
1753            lowed.  More queries are completely dropped and will not receive a
1754            reply,  SERVFAIL  or  otherwise.   IP  ratelimiting happens before
1755            looking in the cache. This may be useful for mitigating amplifica‐
1756            tion attacks.
1757
1758       ip-ratelimit-size: <memory size>
1759            Give  the  size of the data structure in which the current ongoing
1760            rates are kept track in.  Default 4m.  In bytes  or  use  m(mega),
1761            k(kilo),  g(giga).   The  ip ratelimit structure is small, so this
1762            data structure likely does not need to be large.
1763
1764       ip-ratelimit-slabs: <number>
1765            Give power of 2 number of slabs, this is used to reduce lock  con‐
1766            tention in the ip ratelimit tracking data structure.  Close to the
1767            number of cpus is a fairly good setting.
1768
1769       ip-ratelimit-factor: <number>
1770            Set the amount of queries to rate limit  when  the  limit  is  ex‐
1771            ceeded.   If set to 0, all queries are dropped for addresses where
1772            the limit is exceeded.  If set to another value, 1 in that  number
1773            is  allowed  through  to  complete.   Default is 10, allowing 1/10
1774            traffic to flow normally.  This can make ordinary queries complete
1775            (if repeatedly queried for), and enter the cache, whilst also mit‐
1776            igating the traffic flow by the factor given.
1777
1778       fast-server-permil: <number>
1779            Specify how many times out of 1000 to pick from the set of fastest
1780            servers.  0 turns the feature off.  A value of 900 would pick from
1781            the fastest servers 90 percent of the time, and would perform nor‐
1782            mal  exploration  of  random  servers for the remaining time. When
1783            prefetch is enabled (or serve-expired), such  prefetches  are  not
1784            sped up, because there is no one waiting for it, and it presents a
1785            good moment to perform server exploration. The fast-server-num op‐
1786            tion  can  be used to specify the size of the fastest servers set.
1787            The default for fast-server-permil is 0.
1788
1789       fast-server-num: <number>
1790            Set the number of servers that should be used for fast server  se‐
1791            lection. Only use the fastest specified number of servers with the
1792            fast-server-permil option, that turns this on or off. The  default
1793            is to use the fastest 3 servers.
1794
1795       edns-client-string: <IP netblock> <string>
1796            Include  an  EDNS0  option  containing  configured ascii string in
1797            queries with destination address matching the configured  IP  net‐
1798            block.   This configuration option can be used multiple times. The
1799            most specific match will be used.
1800
1801       edns-client-string-opcode: <opcode>
1802            EDNS0 option code for the edns-client-string  option,  from  0  to
1803            65535.   A  value from the `Reserved for Local/Experimental` range
1804            (65001-65534) should be used.  Default is 65001.
1805
1806   Remote Control Options
1807       In the remote-control: clause are the declarations for the remote  con‐
1808       trol  facility.  If this is enabled, the unbound-control(8) utility can
1809       be used to send commands to the running  unbound  server.   The  server
1810       uses these clauses to setup TLSv1 security for the connection.  The un‐
1811       bound-control(8) utility also reads the remote-control section for  op‐
1812       tions.   To  setup  the  correct  self-signed  certificates use the un‐
1813       bound-control-setup(8) utility.
1814
1815       control-enable: <yes or no>
1816            The option is used to enable remote control, default is "no".   If
1817            turned off, the server does not listen for control commands.
1818
1819       control-interface: <ip address or path>
1820            Give  IPv4 or IPv6 addresses or local socket path to listen on for
1821            control commands.  By default localhost  (127.0.0.1  and  ::1)  is
1822            listened to.  Use 0.0.0.0 and ::0 to listen to all interfaces.  If
1823            you change this  and  permissions  have  been  dropped,  you  must
1824            restart the server for the change to take effect.
1825
1826            If  you  set  it to an absolute path, a local socket is used.  The
1827            local socket does not use the  certificates  and  keys,  so  those
1828            files  need not be present.  To restrict access, unbound sets per‐
1829            missions on the file to the user and group that is configured, the
1830            access  bits are set to allow the group members to access the con‐
1831            trol socket file.  Put users that need to access the socket in the
1832            that group.  To restrict access further, create a directory to put
1833            the control socket in and restrict access to that directory.
1834
1835       control-port: <port number>
1836            The port number to listen on for IPv4 or IPv6 control  interfaces,
1837            default  is  8953.   If  you change this and permissions have been
1838            dropped, you must restart the server for the change  to  take  ef‐
1839            fect.
1840
1841       control-use-cert: <yes or no>
1842            For  localhost control-interface you can disable the use of TLS by
1843            setting this option to "no", default is "yes".  For local sockets,
1844            TLS is disabled and the value of this option is ignored.
1845
1846       server-key-file: <private key file>
1847            Path  to  the  server  private key, by default unbound_server.key.
1848            This file is generated by the unbound-control-setup utility.  This
1849            file is used by the unbound server, but not by unbound-control.
1850
1851       server-cert-file: <certificate file.pem>
1852            Path  to  the  server  self  signed  certificate,  by  default un‐
1853            bound_server.pem.  This file  is  generated  by  the  unbound-con‐
1854            trol-setup  utility.  This file is used by the unbound server, and
1855            also by unbound-control.
1856
1857       control-key-file: <private key file>
1858            Path to the control client private key,  by  default  unbound_con‐
1859            trol.key.   This  file  is  generated by the unbound-control-setup
1860            utility.  This file is used by unbound-control.
1861
1862       control-cert-file: <certificate file.pem>
1863            Path to the control client certificate,  by  default  unbound_con‐
1864            trol.pem.   This certificate has to be signed with the server cer‐
1865            tificate.  This file is  generated  by  the  unbound-control-setup
1866            utility.  This file is used by unbound-control.
1867
1868   Stub Zone Options
1869       There may be multiple stub-zone: clauses. Each with a name: and zero or
1870       more hostnames or IP addresses.  For the stub zone this list  of  name‐
1871       servers  is used. Class IN is assumed.  The servers should be authority
1872       servers, not recursors; unbound performs the recursive  processing  it‐
1873       self for stub zones.
1874
1875       The stub zone can be used to configure authoritative data to be used by
1876       the resolver that cannot be accessed using the public internet servers.
1877       This  is  useful  for company-local data or private zones. Setup an au‐
1878       thoritative server on a different host (or  different  port).  Enter  a
1879       config  entry  for unbound with stub-addr: <ip address of host[@port]>.
1880       The unbound resolver can then access the data, without referring to the
1881       public internet for it.
1882
1883       This  setup  allows DNSSEC signed zones to be served by that authorita‐
1884       tive server, in which case a trusted key entry with the public key  can
1885       be  put in config, so that unbound can validate the data and set the AD
1886       bit on replies for the private zone (authoritative servers do  not  set
1887       the AD bit).  This setup makes unbound capable of answering queries for
1888       the private zone, and can even set the AD bit ('authentic'), but the AA
1889       ('authoritative') bit is not set on these replies.
1890
1891       Consider  adding  server:  statements  for domain-insecure: and for lo‐
1892       cal-zone: name nodefault for the zone if it is a locally  served  zone.
1893       The insecure clause stops DNSSEC from invalidating the zone.  The local
1894       zone nodefault (or transparent) clause makes the (reverse-) zone bypass
1895       unbound's filtering of RFC1918 zones.
1896
1897       name: <domain name>
1898              Name of the stub zone.
1899
1900       stub-host: <domain name>
1901              Name  of  stub  zone nameserver. Is itself resolved before it is
1902              used.
1903
1904       stub-addr: <IP address>
1905              IP address of stub zone nameserver. Can be IP 4 or IP 6.  To use
1906              a nondefault port for DNS communication append '@' with the port
1907              number.  If tls is enabled, then you can  append  a  '#'  and  a
1908              name,  then it'll check the tls authentication certificates with
1909              that name.  If you combine the '@' and '#', the '@' comes first.
1910
1911       stub-prime: <yes or no>
1912              This option is by default no.  If enabled  it  performs  NS  set
1913              priming,  which  is similar to root hints, where it starts using
1914              the list of nameservers currently published by the zone.   Thus,
1915              if  the  hint list is slightly outdated, the resolver picks up a
1916              correct list online.
1917
1918       stub-first: <yes or no>
1919              If enabled, a query is attempted without the stub clause  if  it
1920              fails.   The  data  could not be retrieved and would have caused
1921              SERVFAIL because the servers  are  unreachable,  instead  it  is
1922              tried without this clause.  The default is no.
1923
1924       stub-tls-upstream: <yes or no>
1925              Enabled  or disable whether the queries to this stub use TLS for
1926              transport.  Default is no.
1927
1928       stub-ssl-upstream: <yes or no>
1929              Alternate syntax for stub-tls-upstream.
1930
1931       stub-no-cache: <yes or no>
1932              Default is no.  If enabled, data inside the stub is not  cached.
1933              This is useful when you want immediate changes to be visible.
1934
1935   Forward Zone Options
1936       There may be multiple forward-zone: clauses. Each with a name: and zero
1937       or more hostnames or IP addresses.  For the forward zone this  list  of
1938       nameservers  is  used  to forward the queries to. The servers listed as
1939       forward-host: and forward-addr: have to handle  further  recursion  for
1940       the  query.   Thus,  those  servers  are not authority servers, but are
1941       (just like unbound is) recursive servers too; unbound does not  perform
1942       recursion itself for the forward zone, it lets the remote server do it.
1943       Class IN is assumed.  CNAMEs are chased by unbound itself,  asking  the
1944       remote  server  for every name in the indirection chain, to protect the
1945       local cache from illegal indirect referenced items.  A forward-zone en‐
1946       try with name "." and a forward-addr target will forward all queries to
1947       that other server (unless it can answer from the cache).
1948
1949       name: <domain name>
1950              Name of the forward zone.
1951
1952       forward-host: <domain name>
1953              Name of server to forward to. Is itself resolved  before  it  is
1954              used.
1955
1956       forward-addr: <IP address>
1957              IP address of server to forward to. Can be IP 4 or IP 6.  To use
1958              a nondefault port for DNS communication append '@' with the port
1959              number.   If  tls  is  enabled,  then you can append a '#' and a
1960              name, then it'll check the tls authentication certificates  with
1961              that name.  If you combine the '@' and '#', the '@' comes first.
1962
1963              At high verbosity it logs the TLS certificate, with TLS enabled.
1964              If you leave out the '#' and auth name  from  the  forward-addr,
1965              any  name  is  accepted.  The cert must also match a CA from the
1966              tls-cert-bundle.
1967
1968       forward-first: <yes or no>
1969              If a forwarded query is met with a SERVFAIL error, and this  op‐
1970              tion is enabled, unbound will fall back to normal recursive res‐
1971              olution for this query as if no query forwarding had been speci‐
1972              fied.  The default is "no".
1973
1974       forward-tls-upstream: <yes or no>
1975              Enabled or disable whether the queries to this forwarder use TLS
1976              for transport.  Default is no.  If you enable this, also config‐
1977              ure a tls-cert-bundle or use tls-win-cert to load CA certs, oth‐
1978              erwise the connections cannot be authenticated.
1979
1980       forward-ssl-upstream: <yes or no>
1981              Alternate syntax for forward-tls-upstream.
1982
1983       forward-no-cache: <yes or no>
1984              Default is no.  If enabled,  data  inside  the  forward  is  not
1985              cached.   This  is  useful when you want immediate changes to be
1986              visible.
1987
1988   Authority Zone Options
1989       Authority zones are configured with auth-zone:, and each one must  have
1990       a  name:.   There  can  be multiple ones, by listing multiple auth-zone
1991       clauses, each with a different name, pertaining to  that  part  of  the
1992       namespace.  The authority zone with the name closest to the name looked
1993       up is used.  Authority zones are processed after local-zones and before
1994       cache  (for-downstream: yes), and when used in this manner make unbound
1995       respond like an authority server.  Authority zones are  also  processed
1996       after  cache, just before going to the network to fetch information for
1997       recursion (for-upstream: yes), and when used in this manner  provide  a
1998       local copy of an authority server that speeds up lookups of that data.
1999
2000       Authority zones can be read from zonefile.  And can be kept updated via
2001       AXFR and IXFR.  After update the zonefile  is  rewritten.   The  update
2002       mechanism uses the SOA timer values and performs SOA UDP queries to de‐
2003       tect zone changes.
2004
2005       If the update fetch fails, the timers in the SOA  record  are  used  to
2006       time  another  fetch  attempt.   Until the SOA expiry timer is reached.
2007       Then the zone is expired.  When a zone is expired,  queries  are  SERV‐
2008       FAIL,  and  any new serial number is accepted from the primary (even if
2009       older), and if fallback is enabled, the  fallback  activates  to  fetch
2010       from the upstream instead of the SERVFAIL.
2011
2012       name: <zone name>
2013              Name of the authority zone.
2014
2015       primary: <IP address or host name>
2016              Where  to  download a copy of the zone from, with AXFR and IXFR.
2017              Multiple primaries can be specified.  They are all tried if  one
2018              fails.   To  use  a nondefault port for DNS communication append
2019              '@' with the port number.  You can append a '#' and a name, then
2020              AXFR  over  TLS  can be used and the tls authentication certifi‐
2021              cates will be checked with that name.  If you  combine  the  '@'
2022              and  '#',  the  '@' comes first.  If you point it at another Un‐
2023              bound instance, it would not work because that does not  support
2024              AXFR/IXFR  for  the  zone,  but if you used url: to download the
2025              zonefile as a text file from a webserver that  would  work.   If
2026              you  specify  the  hostname,  you cannot use the domain from the
2027              zonefile, because it may not  have  that  when  retrieving  that
2028              data,  instead use a plain IP address to avoid a circular depen‐
2029              dency on retrieving that IP address.
2030
2031       master: <IP address or host name>
2032              Alternate syntax for primary.
2033
2034       url: <url to zonefile>
2035              Where to download a zonefile for the zone.  With http or  https.
2036              An   example   for   the  url  is  "http://www.example.com/exam
2037              ple.org.zone".  Multiple url statements can be given,  they  are
2038              tried  in turn.  If only urls are given the SOA refresh timer is
2039              used to wait for making new downloads.  If  also  primaries  are
2040              listed,  the  primaries are first probed with UDP SOA queries to
2041              see if the SOA serial number has changed, reducing the number of
2042              downloads.   If  none  of the urls work, the primaries are tried
2043              with IXFR and AXFR.  For  https,  the  tls-cert-bundle  and  the
2044              hostname  from  the url are used to authenticate the connection.
2045              If you specify a hostname in the URL, you cannot use the  domain
2046              from  the zonefile, because it may not have that when retrieving
2047              that data, instead use a plain IP address to  avoid  a  circular
2048              dependency on retrieving that IP address.  Avoid dependencies on
2049              name lookups by using a notation like "http://192.0.2.1/unbound-
2050              primaries/example.com.zone", with an explicit IP address.
2051
2052       allow-notify: <IP address or host name or netblockIP/prefix>
2053              With  allow-notify  you  can specify additional sources of noti‐
2054              fies.  When notified, the server attempts  to  first  probe  and
2055              then  zone  transfer.  If the notify is from a primary, it first
2056              attempts that primary.  Otherwise other primaries are attempted.
2057              If there are no primaries, but only urls, the file is downloaded
2058              when notified.  The primaries from primary: statements  are  al‐
2059              lowed notify by default.
2060
2061       fallback-enabled: <yes or no>
2062              Default  no.  If enabled, unbound falls back to querying the in‐
2063              ternet as a resolver for this zone when lookups fail.  For exam‐
2064              ple for DNSSEC validation failures.
2065
2066       for-downstream: <yes or no>
2067              Default  yes.  If enabled, unbound serves authority responses to
2068              downstream clients for this zone.  This option makes unbound be‐
2069              have,  for  the queries with names in this zone, like one of the
2070              authority servers for that zone.  Turn it off if  you  want  un‐
2071              bound to provide recursion for the zone but have a local copy of
2072              zone data.  If for-downstream is no  and  for-upstream  is  yes,
2073              then  unbound  will DNSSEC validate the contents of the zone be‐
2074              fore serving the zone contents to clients and  store  validation
2075              results in the cache.
2076
2077       for-upstream: <yes or no>
2078              Default  yes.   If  enabled, unbound fetches data from this data
2079              collection for answering recursion queries.  Instead of  sending
2080              queries  over  the  internet  to  the authority servers for this
2081              zone, it'll fetch the data directly from the zone data.  Turn it
2082              on  when  you  want  unbound to provide recursion for downstream
2083              clients, and use the zone data as  a  local  copy  to  speed  up
2084              lookups.
2085
2086       zonemd-check: <yes or no>
2087              Enable  this option to check ZONEMD records in the zone. Default
2088              is disabled.  The ZONEMD record is  a  checksum  over  the  zone
2089              data.  This  includes  glue  in  the zone and data from the zone
2090              file, and excludes comments from the zone file.  When there is a
2091              DNSSEC chain of trust, DNSSEC signatures are checked too.
2092
2093       zonemd-reject-absence: <yes or no>
2094              Enable  this  option to reject the absence of the ZONEMD record.
2095              Without it, when zonemd is not there it is not checked.   It  is
2096              useful  to enable for a nonDNSSEC signed zone where the operator
2097              wants to require the verification of a ZONEMD, hence  a  missing
2098              ZONEMD  is  a failure.  The action upon failure is controlled by
2099              the zonemd-permissive-mode option, for log only  or  also  block
2100              the zone.  The default is no.
2101
2102              Without  the  option  absence of a ZONEMD is only a failure when
2103              the zone is DNSSEC signed, and we have a trust anchor,  and  the
2104              DNSSEC  verification  of  the absence of the ZONEMD fails.  With
2105              the option enabled, the absence of a ZONEMD is always a failure,
2106              also for nonDNSSEC signed zones.
2107
2108       zonefile: <filename>
2109              The  filename  where  the  zone is stored.  If not given then no
2110              zonefile is used.  If the file does not exist or is  empty,  un‐
2111              bound  will  attempt  to  fetch  zone data (eg. from the primary
2112              servers).
2113
2114   View Options
2115       There may be multiple view: clauses. Each with a name: and zero or more
2116       local-zone  and local-data elements. Views can also contain view-first,
2117       response-ip, response-ip-data and local-data-ptr elements.  View can be
2118       mapped  to  requests  by  specifying  the  view  name in an access-con‐
2119       trol-view element. Options from matching views will override global op‐
2120       tions.  Global  options  will  be used if no matching view is found, or
2121       when the matching view does not have the option specified.
2122
2123       name: <view name>
2124              Name of the view. Must be unique.  This  name  is  used  in  ac‐
2125              cess-control-view elements.
2126
2127       local-zone: <zone> <type>
2128              View specific local-zone elements. Has the same types and behav‐
2129              iour as the global local-zone elements. When there is  at  least
2130              one  local-zone  specified and view-first is no, the default lo‐
2131              cal-zones will be added to this view.  Defaults can be  disabled
2132              using  the nodefault type. When view-first is yes or when a view
2133              does not have a local-zone, the global local-zone will  be  used
2134              including it's default zones.
2135
2136       local-data: "<resource record string>"
2137              View specific local-data elements. Has the same behaviour as the
2138              global local-data elements.
2139
2140       local-data-ptr: "IPaddr name"
2141              View specific local-data-ptr elements. Has the same behaviour as
2142              the global local-data-ptr elements.
2143
2144       view-first: <yes or no>
2145              If  enabled,  it  attempts  to use the global local-zone and lo‐
2146              cal-data if there is no match in the view specific options.  The
2147              default is no.
2148
2149   Python Module Options
2150       The  python: clause gives the settings for the python(1) script module.
2151       This module acts like the iterator and validator modules do, on queries
2152       and  answers.   To  enable the script module it has to be compiled into
2153       the daemon, and the word "python" has to be put in  the  module-config:
2154       option (usually first, or between the validator and iterator). Multiple
2155       instances of the  python  module  are  supported  by  adding  the  word
2156       "python" more than once.
2157
2158       If the chroot: option is enabled, you should make sure Python's library
2159       directory structure is bind mounted in the new  root  environment,  see
2160       mount(8).  Also the python-script: path should be specified as an abso‐
2161       lute path relative to the new root, or as a relative path to the  work‐
2162       ing directory.
2163
2164       python-script: <python file>
2165              The  script  file  to  load. Repeat this option for every python
2166              module instance added to the module-config: option.
2167
2168   Dynamic Library Module Options
2169       The dynlib: clause gives the settings for the dynlib module.  This mod‐
2170       ule  is  only  a  very  small wrapper that allows dynamic modules to be
2171       loaded on runtime instead of being compiled into  the  application.  To
2172       enable the dynlib module it has to be compiled into the daemon, and the
2173       word "dynlib" has to be put in the module-config: option. Multiple  in‐
2174       stances  of dynamic libraries are supported by adding the word "dynlib"
2175       more than once.
2176
2177       The dynlib-file: path should be specified as an absolute path  relative
2178       to  the  new  path  set by chroot: option, or as a relative path to the
2179       working directory.
2180
2181       dynlib-file: <dynlib file>
2182              The dynamic library file to load. Repeat this option  for  every
2183              dynlib module instance added to the module-config: option.
2184
2185   DNS64 Module Options
2186       The  dns64  module must be configured in the module-config: "dns64 val‐
2187       idator iterator" directive and be compiled into the daemon  to  be  en‐
2188       abled.  These settings go in the server: section.
2189
2190       dns64-prefix: <IPv6 prefix>
2191              This  sets  the  DNS64  prefix to use to synthesize AAAA records
2192              with.  It must  be  /96  or  shorter.   The  default  prefix  is
2193              64:ff9b::/96.
2194
2195       dns64-synthall: <yes or no>
2196              Debug  option,  default  no.   If  enabled,  synthesize all AAAA
2197              records despite the presence of actual AAAA records.
2198
2199       dns64-ignore-aaaa: <name>
2200              List domain for which the AAAA records are  ignored  and  the  A
2201              record is used by dns64 processing instead.  Can be entered mul‐
2202              tiple times, list a new domain for which  it  applies,  one  per
2203              line.  Applies also to names underneath the name given.
2204
2205   DNSCrypt Options
2206       The  dnscrypt: clause gives the settings of the dnscrypt channel. While
2207       those options are available, they are only meaningful  if  unbound  was
2208       compiled with --enable-dnscrypt.  Currently certificate and secret/pub‐
2209       lic keys cannot be generated by unbound.  You can use  dnscrypt-wrapper
2210       to  generate those: https://github.com/cofyc/dnscrypt-wrapper/blob/mas
2211       ter/README.md#usage
2212
2213       dnscrypt-enable: <yes or no>
2214              Whether or not the dnscrypt config should be  enabled.  You  may
2215              define configuration but not activate it.  The default is no.
2216
2217       dnscrypt-port: <port number>
2218              On which port should dnscrypt should be activated. Note that you
2219              should have a matching interface option defined  in  the  server
2220              section for this port.
2221
2222       dnscrypt-provider: <provider name>
2223              The  provider name to use to distribute certificates. This is of
2224              the form: 2.dnscrypt-cert.example.com.. The name MUST end with a
2225              dot.
2226
2227       dnscrypt-secret-key: <path to secret key file>
2228              Path  to  the  time  limited secret key file. This option may be
2229              specified multiple times.
2230
2231       dnscrypt-provider-cert: <path to cert file>
2232              Path to the certificate  related  to  the  dnscrypt-secret-keys.
2233              This option may be specified multiple times.
2234
2235       dnscrypt-provider-cert-rotated: <path to cert file>
2236              Path  to  a certificate that we should be able to serve existing
2237              connection  from   but   do   not   want   to   advertise   over
2238              dnscrypt-provider's  TXT  record  certs distribution.  A typical
2239              use case is when rotating  certificates,  existing  clients  may
2240              still  use  the  client magic from the old cert in their queries
2241              until they fetch and update the new cert. Likewise, it would al‐
2242              low  one  to prime the new cert/key without distributing the new
2243              cert yet, this can be useful when using a network of servers us‐
2244              ing  anycast  and on which the configuration may not get updated
2245              at the exact same time. By priming the  cert,  the  servers  can
2246              handle  both  old  and new certs traffic while distributing only
2247              one.  This option may be specified multiple times.
2248
2249       dnscrypt-shared-secret-cache-size: <memory size>
2250              Give the size of the data structure in which the  shared  secret
2251              keys  are  kept  in.   Default  4m.   In  bytes  or use m(mega),
2252              k(kilo), g(giga).  The shared secret cache is used when  a  same
2253              client  is making multiple queries using the same public key. It
2254              saves a substantial amount of CPU.
2255
2256       dnscrypt-shared-secret-cache-slabs: <number>
2257              Give power of 2 number of slabs, this is  used  to  reduce  lock
2258              contention  in  the dnscrypt shared secrets cache.  Close to the
2259              number of cpus is a fairly good setting.
2260
2261       dnscrypt-nonce-cache-size: <memory size>
2262              Give the size of the data structure in which the  client  nonces
2263              are  kept  in.   Default  4m.  In bytes or use m(mega), k(kilo),
2264              g(giga).  The nonce cache is used to  prevent  dnscrypt  message
2265              replaying.  Client nonce should be unique for any pair of client
2266              pk/server sk.
2267
2268       dnscrypt-nonce-cache-slabs: <number>
2269              Give power of 2 number of slabs, this is  used  to  reduce  lock
2270              contention  in the dnscrypt nonce cache.  Close to the number of
2271              cpus is a fairly good setting.
2272
2273   EDNS Client Subnet Module Options
2274       The ECS module must be configured in  the  module-config:  "subnetcache
2275       validator iterator" directive and be compiled into the daemon to be en‐
2276       abled.  These settings go in the server: section.
2277
2278       If the destination address is allowed in the configuration Unbound will
2279       add  the  EDNS0 option to the query containing the relevant part of the
2280       client's address.  When an answer contains the ECS option the  response
2281       and  the option are placed in a specialized cache. If the authority in‐
2282       dicated no support, the response is stored in the regular cache.
2283
2284       Additionally, when a client includes the option in its queries, Unbound
2285       will  forward  the  option when sending the query to addresses that are
2286       explicitly allowed in the configuration using  send-client-subnet.  The
2287       option  will  always be forwarded, regardless the allowed addresses, if
2288       client-subnet-always-forward is set to yes. In this case the lookup  in
2289       the regular cache is skipped.
2290
2291       The  maximum size of the ECS cache is controlled by 'msg-cache-size' in
2292       the configuration file. On top of that, for each query only 100 differ‐
2293       ent subnets are allowed to be stored for each address family. Exceeding
2294       that number, older entries will be purged from cache.
2295
2296       send-client-subnet: <IP address>
2297              Send client source address to this authority. Append /num to in‐
2298              dicate   a  classless  delegation  netblock,  for  example  like
2299              10.2.3.4/24 or 2001::11/64. Can be given multiple times. Author‐
2300              ities  not  listed will not receive edns-subnet information, un‐
2301              less domain in query is specified in client-subnet-zone.
2302
2303       client-subnet-zone: <domain>
2304              Send client source address in queries for this  domain  and  its
2305              subdomains.  Can  be given multiple times. Zones not listed will
2306              not receive edns-subnet information, unless hosted by  authority
2307              specified in send-client-subnet.
2308
2309       client-subnet-always-forward: <yes or no>
2310              Specify   whether   the  ECS  address  check  (configured  using
2311              send-client-subnet) is applied for  all  queries,  even  if  the
2312              triggering query contains an ECS record, or only for queries for
2313              which the ECS record is generated using the querier address (and
2314              therefore  did not contain ECS data in the client query). If en‐
2315              abled, the address check is skipped when the client  query  con‐
2316              tains  an  ECS  record.  And  the lookup in the regular cache is
2317              skipped.  Default is no.
2318
2319       max-client-subnet-ipv6: <number>
2320              Specifies the maximum prefix length of the client source address
2321              we are willing to expose to third parties for IPv6.  Defaults to
2322              56.
2323
2324       max-client-subnet-ipv4: <number>
2325              Specifies the maximum prefix length of the client source address
2326              we  are willing to expose to third parties for IPv4. Defaults to
2327              24.
2328
2329       min-client-subnet-ipv6: <number>
2330              Specifies the minimum prefix length of the IPv6 source  mask  we
2331              are willing to accept in queries. Shorter source masks result in
2332              REFUSED answers. Source mask of 0 is always accepted. Default is
2333              0.
2334
2335       min-client-subnet-ipv4: <number>
2336              Specifies  the  minimum prefix length of the IPv4 source mask we
2337              are willing to accept in queries. Shorter source masks result in
2338              REFUSED answers. Source mask of 0 is always accepted. Default is
2339              0.
2340
2341       max-ecs-tree-size-ipv4: <number>
2342              Specifies the maximum number of subnets ECS answers kept in  the
2343              ECS radix tree.  This number applies for each qname/qclass/qtype
2344              tuple. Defaults to 100.
2345
2346       max-ecs-tree-size-ipv6: <number>
2347              Specifies the maximum number of subnets ECS answers kept in  the
2348              ECS radix tree.  This number applies for each qname/qclass/qtype
2349              tuple. Defaults to 100.
2350
2351   Opportunistic IPsec Support Module Options
2352       The IPsec module must be configured  in  the  module-config:  "ipsecmod
2353       validator iterator" directive and be compiled into the daemon to be en‐
2354       abled.  These settings go in the server: section.
2355
2356       When unbound receives an A/AAAA query that is  not  in  the  cache  and
2357       finds a valid answer, it will withhold returning the answer and instead
2358       will generate an IPSECKEY subquery for the same domain name.  If an an‐
2359       swer  was found, unbound will call an external hook passing the follow‐
2360       ing arguments:
2361
2362            QNAME
2363                 Domain name of the A/AAAA and IPSECKEY query.  In string for‐
2364                 mat.
2365
2366            IPSECKEY TTL
2367                 TTL of the IPSECKEY RRset.
2368
2369            A/AAAA
2370                 String  of space separated IP addresses present in the A/AAAA
2371                 RRset.  The IP addresses are in string format.
2372
2373            IPSECKEY
2374                 String of space  separated  IPSECKEY  RDATA  present  in  the
2375                 IPSECKEY  RRset.   The IPSECKEY RDATA are in DNS presentation
2376                 format.
2377
2378       The A/AAAA answer is then cached and returned to the  client.   If  the
2379       external  hook  was called the TTL changes to ensure it doesn't surpass
2380       ipsecmod-max-ttl.
2381
2382       The same procedure is also followed when prefetch:  is  used,  but  the
2383       A/AAAA answer is given to the client before the hook is called.  ipsec‐
2384       mod-max-ttl ensures that the A/AAAA answer given from  cache  is  still
2385       relevant for opportunistic IPsec.
2386
2387       ipsecmod-enabled: <yes or no>
2388              Specifies whether the IPsec module is enabled or not.  The IPsec
2389              module still needs to be defined in  the  module-config:  direc‐
2390              tive.  This option facilitates turning on/off the module without
2391              restarting/reloading unbound.  Defaults to yes.
2392
2393       ipsecmod-hook: <filename>
2394              Specifies the external hook that unbound  will  call  with  sys‐
2395              tem(3).  The file can be specified as an absolute/relative path.
2396              The file needs the proper permissions to be able to be  executed
2397              by the same user that runs unbound.  It must be present when the
2398              IPsec module is defined in the module-config: directive.
2399
2400       ipsecmod-strict: <yes or no>
2401              If enabled unbound requires the external hook to return  a  suc‐
2402              cess value of 0.  Failing to do so unbound will reply with SERV‐
2403              FAIL.  The A/AAAA answer will also not be cached.   Defaults  to
2404              no.
2405
2406       ipsecmod-max-ttl: <seconds>
2407              Time to live maximum for A/AAAA cached records after calling the
2408              external hook.  Defaults to 3600.
2409
2410       ipsecmod-ignore-bogus: <yes or no>
2411              Specifies the behaviour of unbound when the IPSECKEY  answer  is
2412              bogus.   If  set  to yes, the hook will be called and the A/AAAA
2413              answer will be returned to the client.  If set to no,  the  hook
2414              will  not  be  called and the answer to the A/AAAA query will be
2415              SERVFAIL.  Mainly used for testing.  Defaults to no.
2416
2417       ipsecmod-allow: <domain>
2418              Allow the ipsecmod functionality for the domain so that the mod‐
2419              ule  logic  will  be executed.  Can be given multiple times, for
2420              different domains.  If the option is not specified, all  domains
2421              are treated as being allowed (default).
2422
2423       ipsecmod-whitelist: <yes or no>
2424              Alternate syntax for ipsecmod-allow.
2425
2426   Cache DB Module Options
2427       The Cache DB module must be configured in the module-config: "validator
2428       cachedb iterator" directive and be compiled into the daemon with  --en‐
2429       able-cachedb.   If this module is enabled and configured, the specified
2430       backend database works as a second level  cache:  When  Unbound  cannot
2431       find  an answer to a query in its built-in in-memory cache, it consults
2432       the specified backend.  If it finds a valid answer in the backend,  Un‐
2433       bound  uses it to respond to the query without performing iterative DNS
2434       resolution.  If Unbound cannot even find an answer in the  backend,  it
2435       resolves the query as usual, and stores the answer in the backend.
2436
2437       This  module  interacts with the serve-expired-* options and will reply
2438       with expired data if unbound is configured for that.  Currently the use
2439       of  serve-expired-client-timeout:  and  serve-expired-reply-ttl: is not
2440       consistent for data originating from the external cache as  these  will
2441       result  in  a reply with 0 TTL without trying to update the data first,
2442       ignoring the configured values.
2443
2444       If Unbound was built with --with-libhiredis on a system  that  has  in‐
2445       stalled the hiredis C client library of Redis, then the "redis" backend
2446       can be used.  This backend communicates with the specified Redis server
2447       over a TCP connection to store and retrieve cache data.  It can be used
2448       as a persistent and/or shared cache backend.  It should be  noted  that
2449       Unbound  never  removes  data  stored in the Redis server, even if some
2450       data have expired in terms of DNS TTL or the Redis  server  has  cached
2451       too  much  data;  if  necessary  the Redis server must be configured to
2452       limit the cache size, preferably with some kind of  least-recently-used
2453       eviction  policy.  Additionally, the redis-expire-records option can be
2454       used in order to set the relative DNS TTL of the message as timeout  to
2455       the Redis records; keep in mind that some additional memory is used per
2456       key and that the expire information is stored as  absolute  Unix  time‐
2457       stamps in Redis (computer time must be stable).  This backend uses syn‐
2458       chronous communication with the Redis server based  on  the  assumption
2459       that  the  communication  is  stable and sufficiently fast.  The thread
2460       waiting for a response from the Redis server cannot  handle  other  DNS
2461       queries.   Although  the  backend  has  the ability to reconnect to the
2462       server when the connection is closed unexpectedly and there is  a  con‐
2463       figurable  timeout in case the server is overly slow or hangs up, these
2464       cases are assumed to be very rare.  If connection close or timeout hap‐
2465       pens too often, Unbound will be effectively unusable with this backend.
2466       It's the administrator's responsibility to make the assumption hold.
2467
2468       The cachedb: clause gives custom settings of the cache DB module.
2469
2470       backend: <backend name>
2471              Specify the backend database name.  The default database is  the
2472              in-memory  backend  named  "testframe",  which, as the name sug‐
2473              gests, is not of any practical use.  Depending on the build-time
2474              configuration,  "redis"  backend  may  also be used as described
2475              above.
2476
2477       secret-seed: <"secret string">
2478              Specify a seed to calculate a hash value from query information.
2479              This  value  will be used as the key of the corresponding answer
2480              for the backend database and  can  be  customized  if  the  hash
2481              should  not  be predictable operationally.  If the backend data‐
2482              base is shared by multiple Unbound instances, all instances must
2483              use the same secret seed.  This option defaults to "default".
2484
2485       The following cachedb otions are specific to the redis backend.
2486
2487       redis-server-host: <server address or name>
2488              The  IP  (either  v6  or v4) address or domain name of the Redis
2489              server.  In general an IP address should be specified as  other‐
2490              wise  Unbound  will have to resolve the name of the server every
2491              time it establishes a connection to the server.  This option de‐
2492              faults to "127.0.0.1".
2493
2494       redis-server-port: <port number>
2495              The  TCP  port number of the Redis server.  This option defaults
2496              to 6379.
2497
2498       redis-timeout: <msec>
2499              The period until when Unbound waits for a response from the  Re‐
2500              dis  sever.   If this timeout expires Unbound closes the connec‐
2501              tion, treats it as if the Redis server does  not  have  the  re‐
2502              quested  data,  and  will  try  to re-establish a new connection
2503              later.  This option defaults to 100 milliseconds.
2504
2505       redis-expire-records: <yes or no>
2506              If Redis record expiration is enabled.   If  yes,  unbound  sets
2507              timeout for Redis records so that Redis can evict keys that have
2508              expired automatically.  If unbound is configured with  serve-ex‐
2509              pired  and serve-expired-ttl is 0, this option is internally re‐
2510              verted to "no".  Redis SETEX support is required for this option
2511              (Redis >= 2.0.0).  This option defaults to no.
2512
2513   DNSTAP Logging Options
2514       DNSTAP  support,  when  compiled in, is enabled in the dnstap: section.
2515       This starts an extra thread (when compiled with threading) that  writes
2516       the log information to the destination.  If unbound is compiled without
2517       threading it does not spawn a thread, but connects per-process  to  the
2518       destination.
2519
2520       dnstap-enable: <yes or no>
2521              If  dnstap  is enabled.  Default no.  If yes, it connects to the
2522              dnstap server and if any of the  dnstap-log-..-messages  options
2523              is enabled it sends logs for those messages to the server.
2524
2525       dnstap-bidirectional: <yes or no>
2526              Use  frame streams in bidirectional mode to transfer DNSTAP mes‐
2527              sages. Default is yes.
2528
2529       dnstap-socket-path: <file name>
2530              Sets the unix socket file name for connecting to the server that
2531              is   listening   on   that   socket.    Default   is   "/etc/un‐
2532              bound/dnstap.sock".
2533
2534       dnstap-ip: <IPaddress[@port]>
2535              If "", the unix socket is used, if set with an IP address  (IPv4
2536              or IPv6) that address is used to connect to the server.
2537
2538       dnstap-tls: <yes or no>
2539              Set  this  to  use  TLS  to  connect  to the server specified in
2540              dnstap-ip.  The default is yes.  If set to no, TCP  is  used  to
2541              connect to the server.
2542
2543       dnstap-tls-server-name: <name of TLS authentication>
2544              The  TLS server name to authenticate the server with.  Used when
2545              dnstap-tls is enabled.  If "" it is ignored, default "".
2546
2547       dnstap-tls-cert-bundle: <file name of cert bundle>
2548              The pem file with certs to verify the TLS server certificate. If
2549              ""  the  server default cert bundle is used, or the windows cert
2550              bundle on windows.  Default is "".
2551
2552       dnstap-tls-client-key-file: <file name>
2553              The client key file for TLS client authentication. If ""  client
2554              authentication is not used.  Default is "".
2555
2556       dnstap-tls-client-cert-file: <file name>
2557              The  client cert file for TLS client authentication.  Default is
2558              "".
2559
2560       dnstap-send-identity: <yes or no>
2561              If enabled, the server identity is included in the log messages.
2562              Default is no.
2563
2564       dnstap-send-version: <yes or no>
2565              If  enabled, the server version if included in the log messages.
2566              Default is no.
2567
2568       dnstap-identity: <string>
2569              The identity to send with messages, if "" the hostname is  used.
2570              Default is "".
2571
2572       dnstap-version: <string>
2573              The  version to send with messages, if "" the package version is
2574              used.  Default is "".
2575
2576       dnstap-log-resolver-query-messages: <yes or no>
2577              Enable to log resolver query messages.  Default  is  no.   These
2578              are messages from unbound to upstream servers.
2579
2580       dnstap-log-resolver-response-messages: <yes or no>
2581              Enable to log resolver response messages.  Default is no.  These
2582              are replies from upstream servers to unbound.
2583
2584       dnstap-log-client-query-messages: <yes or no>
2585              Enable to log client query messages.  Default is no.  These  are
2586              client queries to unbound.
2587
2588       dnstap-log-client-response-messages: <yes or no>
2589              Enable  to  log client response messages.  Default is no.  These
2590              are responses from unbound to clients.
2591
2592       dnstap-log-forwarder-query-messages: <yes or no>
2593              Enable to log forwarder query messages.  Default is no.
2594
2595       dnstap-log-forwarder-response-messages: <yes or no>
2596              Enable to log forwarder response messages.  Default is no.
2597
2598   Response Policy Zone Options
2599       Response Policy Zones are configured with rpz:, and each one must  have
2600       a  name:.  There can be multiple ones, by listing multiple rpz clauses,
2601       each with a different name. RPZ clauses are applied in order of config‐
2602       uration.  The  respip  module  needs  to be added to the module-config,
2603       e.g.: module-config: "respip validator iterator".
2604
2605       Only the QNAME and Response IP Address triggers are supported. The sup‐
2606       ported  RPZ  actions  are:  NXDOMAIN,  NODATA, PASSTHRU, DROP and Local
2607       Data. RPZ QNAME triggers are applied after local-zones and before auth-
2608       zones.
2609
2610       name: <zone name>
2611              Name of the authority zone.
2612
2613       primary: <IP address or host name>
2614              Where  to  download a copy of the zone from, with AXFR and IXFR.
2615              Multiple primaries can be specified.  They are all tried if  one
2616              fails.   To  use  a nondefault port for DNS communication append
2617              '@' with the port number.  You can append a '#' and a name, then
2618              AXFR  over  TLS  can be used and the tls authentication certifi‐
2619              cates will be checked with that name.  If you  combine  the  '@'
2620              and  '#',  the  '@' comes first.  If you point it at another Un‐
2621              bound instance, it would not work because that does not  support
2622              AXFR/IXFR  for  the  zone,  but if you used url: to download the
2623              zonefile as a text file from a webserver that  would  work.   If
2624              you  specify  the  hostname,  you cannot use the domain from the
2625              zonefile, because it may not  have  that  when  retrieving  that
2626              data,  instead use a plain IP address to avoid a circular depen‐
2627              dency on retrieving that IP address.
2628
2629       master: <IP address or host name>
2630              Alternate syntax for primary.
2631
2632       url: <url to zonefile>
2633              Where to download a zonefile for the zone.  With http or  https.
2634              An   example   for   the  url  is  "http://www.example.com/exam
2635              ple.org.zone".  Multiple url statements can be given,  they  are
2636              tried  in turn.  If only urls are given the SOA refresh timer is
2637              used to wait for making new downloads.  If  also  primaries  are
2638              listed,  the  primaries are first probed with UDP SOA queries to
2639              see if the SOA serial number has changed, reducing the number of
2640              downloads.   If  none  of the urls work, the primaries are tried
2641              with IXFR and AXFR.  For  https,  the  tls-cert-bundle  and  the
2642              hostname from the url are used to authenticate the connection.
2643
2644       allow-notify: <IP address or host name or netblockIP/prefix>
2645              With  allow-notify  you  can specify additional sources of noti‐
2646              fies.  When notified, the server attempts  to  first  probe  and
2647              then  zone  transfer.  If the notify is from a primary, it first
2648              attempts that primary.  Otherwise other primaries are attempted.
2649              If there are no primaries, but only urls, the file is downloaded
2650              when notified.  The primaries from primary: statements  are  al‐
2651              lowed notify by default.
2652
2653       zonefile: <filename>
2654              The  filename  where  the  zone is stored.  If not given then no
2655              zonefile is used.  If the file does not exist or is  empty,  un‐
2656              bound  will  attempt  to  fetch  zone data (eg. from the primary
2657              servers).
2658
2659       rpz-action-override: <action>
2660              Always use this RPZ action for matching triggers from this zone.
2661              Possible  action are: nxdomain, nodata, passthru, drop, disabled
2662              and cname.
2663
2664       rpz-cname-override: <domain>
2665              The CNAME target domain to use if the cname action is configured
2666              for rpz-action-override.
2667
2668       rpz-log: <yes or no>
2669              Log all applied RPZ actions for this RPZ zone. Default is no.
2670
2671       rpz-log-name: <name>
2672              Specify  a string to be part of the log line, for easy referenc‐
2673              ing.
2674
2675       tags: <list of tags>
2676              Limit the policies from this RPZ clause to clients with a match‐
2677              ing  tag.  Tags  need to be defined in define-tag and can be as‐
2678              signed to client  addresses  using  access-control-tag.  Enclose
2679              list  of  tags in quotes ("") and put spaces between tags. If no
2680              tags are specified the policies from this clause will be applied
2681              for all clients.
2682

MEMORY CONTROL EXAMPLE

2684       In the example config settings below memory usage is reduced. Some ser‐
2685       vice levels are lower, notable very large data and a high TCP load  are
2686       no longer supported. Very large data and high TCP loads are exceptional
2687       for the DNS.  DNSSEC validation is enabled, just add trust anchors.  If
2688       you do not have to worry about programs using more than 3 Mb of memory,
2689       the below example is not for you. Use the defaults to receive full ser‐
2690       vice, which on BSD-32bit tops out at 30-40 Mb after heavy usage.
2691
2692       # example settings that reduce memory usage
2693       server:
2694            num-threads: 1
2695            outgoing-num-tcp: 1 # this limits TCP service, uses less buffers.
2696            incoming-num-tcp: 1
2697            outgoing-range: 60  # uses less memory, but less performance.
2698            msg-buffer-size: 8192   # note this limits service, 'no huge stuff'.
2699            msg-cache-size: 100k
2700            msg-cache-slabs: 1
2701            rrset-cache-size: 100k
2702            rrset-cache-slabs: 1
2703            infra-cache-numhosts: 200
2704            infra-cache-slabs: 1
2705            key-cache-size: 100k
2706            key-cache-slabs: 1
2707            neg-cache-size: 10k
2708            num-queries-per-thread: 30
2709            target-fetch-policy: "2 1 0 0 0 0"
2710            harden-large-queries: "yes"
2711            harden-short-bufsize: "yes"
2712

FILES

2714       /etc/unbound
2715              default unbound working directory.
2716
2717       /etc/unbound
2718              default chroot(2) location.
2719
2720       /etc/unbound/unbound.conf
2721              unbound configuration file.
2722
2723       /run/unbound/unbound.pid
2724              default unbound pidfile with process ID of the running daemon.
2725
2726       unbound.log
2727              unbound log file. default is to log to syslog(3).
2728

SEE ALSO

2730       unbound(8), unbound-checkconf(8).
2731

AUTHORS

2733       Unbound  was written by NLnet Labs. Please see CREDITS file in the dis‐
2734       tribution for further details.
2735
2736
2737
2738NLnet Labs                       Aug 12, 2021                  unbound.conf(5)
Impressum