1unbound.conf(5)                  unbound 1.8.3                 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
13       attributes and values. Some attributes  have  attributes  inside  them.
14       The notation is: attribute: value.
15
16       Comments  start  with  #  and  last to the end of line. Empty lines are
17       ignored 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
24       /etc/unbound/unbound.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
33       extensive 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/random /etc/unbound/dev/random
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 its containing attributes, or
56       a value.
57
58       Files  can be included using the include: directive. It can appear any‐
59       where, it accepts a single file name as argument.  Processing continues
60       as  if  the text from the included file was copied into the config file
61       at that point.  If also using chroot, using full  path  names  for  the
62       included files works, relative pathnames for the included names work if
63       the directory where the daemon is  started  equals  its  chroot/working
64       directory  or is specified before the include statement with directory:
65       dir.  Wildcards can be used to include multiple files, see glob(7).
66
67   Server Options
68       These options are part of the server: clause.
69
70       verbosity: <number>
71              The verbosity number, level 0 means no verbosity,  only  errors.
72              Level  1  gives  operational information. Level 2 gives detailed
73              operational information. Level 3 gives query level  information,
74              output  per  query.   Level 4 gives algorithm level information.
75              Level 5 logs client identification for cache misses.  Default is
76              level  1.  The verbosity can also be increased from the command‐
77              line, see unbound(8).
78
79       statistics-interval: <seconds>
80              The number of seconds between printing statistics to the log for
81              every  thread.  Disable with value 0 or "". Default is disabled.
82              The histogram statistics are only printed if replies  were  sent
83              during  the  statistics  interval,  requestlist  statistics  are
84              printed for every interval (but can be 0).  This is because  the
85              median calculation requires data to be present.
86
87       statistics-cumulative: <yes or no>
88              If  enabled,  statistics  are cumulative since starting unbound,
89              without clearing the statistics counters after logging the  sta‐
90              tistics. Default is no.
91
92       extended-statistics: <yes or no>
93              If  enabled,  extended  statistics are printed from unbound-con‐
94              trol(8).  Default is off, because keeping track of more  statis‐
95              tics takes time.  The counters are listed in unbound-control(8).
96
97       num-threads: <number>
98              The  number  of threads to create to serve clients. Use 1 for no
99              threading.
100
101       port: <port number>
102              The port number, default 53, on which  the  server  responds  to
103              queries.
104
105       interface: <ip address[@port]>
106              Interface  to  use  to connect to the network. This interface is
107              listened to for queries from clients, and answers to clients are
108              given  from  it.  Can be given multiple times to work on several
109              interfaces. If none are given the default is to listen to local‐
110              host.   The  interfaces  are not changed on a reload (kill -HUP)
111              but only on restart.  A port number can be specified with  @port
112              (without spaces between interface and port number), if not spec‐
113              ified the default port (from port) is used.
114
115       ip-address: <ip address[@port]>
116              Same as interface: (for ease of compatibility with nsd.conf).
117
118       interface-automatic: <yes or no>
119              Detect source interface on UDP queries and copy them to replies.
120              This  feature  is experimental, and needs support in your OS for
121              particular socket options.  Default value is no.
122
123       outgoing-interface: <ip address or ip6 netblock>
124              Interface to use to connect to the network.  This  interface  is
125              used  to send queries to authoritative servers and receive their
126              replies. Can be given multiple times to work on  several  inter‐
127              faces.  If  none  are  given  the default (all) is used. You can
128              specify the same interfaces in  interface:  and  outgoing-inter‐
129              face:  lines,  the  interfaces  are then used for both purposes.
130              Outgoing queries are sent via a  random  outgoing  interface  to
131              counter spoofing.
132
133              If  an  IPv6 netblock is specified instead of an individual IPv6
134              address, outgoing UDP  queries  will  use  a  randomised  source
135              address  taken  from  the netblock to counter spoofing. Requires
136              the IPv6 netblock to be routed to the host running unbound,  and
137              requires  OS support for unprivileged non-local binds (currently
138              only supported on Linux). Several  netblocks  may  be  specified
139              with  multiple  outgoing-interface:  options, but do not specify
140              both an individual IPv6 address and an  IPv6  netblock,  or  the
141              randomisation will be compromised.  Consider combining with pre‐
142              fer-ip6: yes to increase  the  likelihood  of  IPv6  nameservers
143              being  selected  for  queries.  On Linux you need these two com‐
144              mands to be able to use the freebind socket  option  to  receive
145              traffic  for  the ip6 netblock: ip -6 addr add mynetblock/64 dev
146              lo && ip -6 route add local mynetblock/64 dev lo
147
148       outgoing-range: <number>
149              Number of ports to open. This number of file descriptors can  be
150              opened  per  thread. Must be at least 1. Default depends on com‐
151              pile options. Larger numbers need extra resources from the oper‐
152              ating  system.   For performance a very large value is best, use
153              libevent to make this possible.
154
155       outgoing-port-permit: <port number or range>
156              Permit unbound to open this port or range of ports  for  use  to
157              send  queries.   A  larger  number  of  permitted outgoing ports
158              increases resilience against spoofing attempts. Make sure  these
159              ports  are  not  needed by other daemons.  By default only ports
160              above 1024 that have not been assigned by IANA are used.  Give a
161              port number or a range of the form "low-high", without spaces.
162
163              The  outgoing-port-permit and outgoing-port-avoid statements are
164              processed in the line order of the config file, adding the  per‐
165              mitted  ports  and subtracting the avoided ports from the set of
166              allowed ports.  The processing starts with the  non  IANA  allo‐
167              cated ports above 1024 in the set of allowed ports.
168
169       outgoing-port-avoid: <port number or range>
170              Do  not  permit  unbound to open this port or range of ports for
171              use to send queries. Use this to make sure unbound does not grab
172              a  port  that  another  daemon needs. The port is avoided on all
173              outgoing interfaces, both IP4 and IP6.  By  default  only  ports
174              above 1024 that have not been assigned by IANA are used.  Give a
175              port number or a range of the form "low-high", without spaces.
176
177       outgoing-num-tcp: <number>
178              Number of outgoing TCP buffers to allocate per  thread.  Default
179              is  10.  If  set  to  0, or if do-tcp is "no", no TCP queries to
180              authoritative  servers  are  done.   For  larger   installations
181              increasing this value is a good idea.
182
183       incoming-num-tcp: <number>
184              Number  of  incoming TCP buffers to allocate per thread. Default
185              is 10. If set to 0, or if do-tcp is "no", no  TCP  queries  from
186              clients  are  accepted. For larger installations increasing this
187              value is a good idea.
188
189       edns-buffer-size: <number>
190              Number of bytes size to advertise as the EDNS reassembly  buffer
191              size.   This  is  the  value put into datagrams over UDP towards
192              peers.  The actual buffer size is determined by  msg-buffer-size
193              (both  for  TCP  and  UDP).   Do not set higher than that value.
194              Default is 4096 which is RFC recommended.  If you have  fragmen‐
195              tation  reassembly  problems,  usually  seen as timeouts, then a
196              value of 1472 can fix it.  Setting to 512 bypasses even the most
197              stringent  path  MTU problems, but is seen as extreme, since the
198              amount of TCP fallback generated is excessive (probably also for
199              this resolver, consider tuning the outgoing tcp number).
200
201       max-udp-size: <number>
202              Maximum  UDP response size (not applied to TCP response).  65536
203              disables the udp response size maximum, and uses the choice from
204              the  client,  always.  Suggested values are 512 to 4096. Default
205              is 4096.
206
207       msg-buffer-size: <number>
208              Number of bytes size of the message buffers.  Default  is  65552
209              bytes,  enough  for 64 Kb packets, the maximum DNS message size.
210              No message larger than this can be  sent  or  received.  Can  be
211              reduced to use less memory, but some requests for DNS data, such
212              as for huge resource records, will result in a SERVFAIL reply to
213              the client.
214
215       msg-cache-size: <number>
216              Number  of  bytes  size  of  the  message  cache.  Default  is 4
217              megabytes.  A plain number is in bytes, append 'k', 'm'  or  'g'
218              for  kilobytes,  megabytes  or  gigabytes  (1024*1024 bytes in a
219              megabyte).
220
221       msg-cache-slabs: <number>
222              Number of slabs in the message cache.  Slabs  reduce  lock  con‐
223              tention  by  threads.   Must  be  set  to  a power of 2. Setting
224              (close) to the number of cpus is a reasonable guess.
225
226       num-queries-per-thread: <number>
227              The number of queries that every thread will service  simultane‐
228              ously.   If  more  queries  arrive  that  need servicing, and no
229              queries can  be  jostled  out  (see  jostle-timeout),  then  the
230              queries  are  dropped.  This forces the client to resend after a
231              timeout; allowing the  server  time  to  work  on  the  existing
232              queries. Default depends on compile options, 512 or 1024.
233
234       jostle-timeout: <msec>
235              Timeout  used when the server is very busy.  Set to a value that
236              usually results in one roundtrip to the authority  servers.   If
237              too  many queries arrive, then 50% of the queries are allowed to
238              run to completion, and the other 50% are replaced with  the  new
239              incoming  query  if  they  have  already  spent  more than their
240              allowed time.  This protects against denial of service  by  slow
241              queries  or  high  query  rates.  Default 200 milliseconds.  The
242              effect is that the qps for long-lasting queries is  about  (num‐
243              queriesperthread  /  2)  /  (average time for such long queries)
244              qps.  The qps  for  short  queries  can  be  about  (numqueries‐
245              perthread  /  2)  /  (jostletimeout  in  whole  seconds) qps per
246              thread, about (1024/2)*5 = 2560 qps by default.
247
248       delay-close: <msec>
249              Extra delay for timeouted UDP ports before they are  closed,  in
250              msec.   Default  is 0, and that disables it.  This prevents very
251              delayed answer packets from  the  upstream  (recursive)  servers
252              from  bouncing  against closed ports and setting off all sort of
253              close-port counters, with eg. 1500 msec.  When  timeouts  happen
254              you  need extra sockets, it checks the ID and remote IP of pack‐
255              ets, and unwanted packets  are  added  to  the  unwanted  packet
256              counter.
257
258       unknown-server-time-limit: <msec>
259              The  wait  time  in  msec  for  waiting for an unknown server to
260              reply.  Increase this if you are behind a slow  satellite  link,
261              to  eg.  1128.   That would then avoid re-querying every initial
262              query because it times out.  Default is 376 msec.
263
264       so-rcvbuf: <number>
265              If not 0, then set the SO_RCVBUF socket option to get more  buf‐
266              fer space on UDP port 53 incoming queries.  So that short spikes
267              on busy servers do not drop  packets  (see  counter  in  netstat
268              -su).   Default  is 0 (use system value).  Otherwise, the number
269              of bytes to ask for, try "4m" on a busy server.  The OS caps  it
270              at  a  maximum, on linux unbound needs root permission to bypass
271              the limit, or the admin can use  sysctl  net.core.rmem_max.   On
272              BSD  change kern.ipc.maxsockbuf in /etc/sysctl.conf.  On OpenBSD
273              change header and recompile kernel. On Solaris ndd -set /dev/udp
274              udp_max_buf 8388608.
275
276       so-sndbuf: <number>
277              If  not 0, then set the SO_SNDBUF socket option to get more buf‐
278              fer space on UDP port 53 outgoing queries.  This for  very  busy
279              servers  handles  spikes  in  answer  traffic,  otherwise 'send:
280              resource temporarily unavailable' can  get  logged,  the  buffer
281              overrun  is also visible by netstat -su.  Default is 0 (use sys‐
282              tem value).  Specify the number of bytes to ask for, try "4m" on
283              a  very  busy  server.   The  OS  caps it at a maximum, on linux
284              unbound needs root permission to bypass the limit, or the  admin
285              can  use  sysctl net.core.wmem_max.  On BSD, Solaris changes are
286              similar to so-rcvbuf.
287
288       so-reuseport: <yes or no>
289              If yes, then  open  dedicated  listening  sockets  for  incoming
290              queries  for  each thread and try to set the SO_REUSEPORT socket
291              option on each  socket.   May  distribute  incoming  queries  to
292              threads  more evenly.  Default is yes.  On Linux it is supported
293              in kernels >= 3.9.  On other systems, FreeBSD, OSX it  may  also
294              work.   You  can enable it (on any platform and kernel), it then
295              attempts to open the port and passes the option if it was avail‐
296              able  at compile time, if that works it is used, if it fails, it
297              continues silently (unless verbosity 3) without the option.
298
299       ip-transparent: <yes or no>
300              If yes, then use IP_TRANSPARENT socket option on  sockets  where
301              unbound  is listening for incoming traffic.  Default no.  Allows
302              you to bind to non-local interfaces.  For example for  non-exis‐
303              tent  IP  addresses  that are going to exist later on, with host
304              failover configuration.  This is a lot like interface-automatic,
305              but  that  one  services all interfaces and with this option you
306              can select which (future) interfaces  unbound  provides  service
307              on.   This  option needs unbound to be started with root permis‐
308              sions on some systems.  The option uses  IP_BINDANY  on  FreeBSD
309              systems and SO_BINDANY on OpenBSD systems.
310
311       ip-freebind: <yes or no>
312              If  yes,  then  use  IP_FREEBIND  socket option on sockets where
313              unbound is listening to incoming traffic.  Default  no.   Allows
314              you  to  bind to IP addresses that are nonlocal or do not exist,
315              like when the network interface or IP address is  down.   Exists
316              only  on  Linux, where the similar ip-transparent option is also
317              available.
318
319       rrset-cache-size: <number>
320              Number of bytes size of the RRset cache. Default is 4 megabytes.
321              A  plain  number  is  in bytes, append 'k', 'm' or 'g' for kilo‐
322              bytes, megabytes or gigabytes (1024*1024 bytes in a megabyte).
323
324       rrset-cache-slabs: <number>
325              Number of slabs in the RRset cache. Slabs reduce lock contention
326              by threads.  Must be set to a power of 2.
327
328       cache-max-ttl: <seconds>
329              Time  to  live  maximum  for  RRsets  and messages in the cache.
330              Default is 86400 seconds (1  day).  If  the  maximum  kicks  in,
331              responses  to  clients  still get decrementing TTLs based on the
332              original (larger) values.  When the internal  TTL  expires,  the
333              cache  item has expired.  Can be set lower to force the resolver
334              to query for data often, and not trust (very large) TTL values.
335
336       cache-min-ttl: <seconds>
337              Time to live minimum for  RRsets  and  messages  in  the  cache.
338              Default  is  0.  If the minimum kicks in, the data is cached for
339              longer than the domain owner intended, and thus less queries are
340              made to look up the data.  Zero makes sure the data in the cache
341              is as the domain owner intended, higher values, especially  more
342              than an hour or so, can lead to trouble as the data in the cache
343              does not match up with the actual data any more.
344
345       cache-max-negative-ttl: <seconds>
346              Time to live maximum for negative responses, these have a SOA in
347              the authority section that is limited in time.  Default is 3600.
348              This applies to nxdomain and nodata answers.
349
350       infra-host-ttl: <seconds>
351              Time to live for entries in the host cache. The host cache  con‐
352              tains  roundtrip  timing, lameness and EDNS support information.
353              Default is 900.
354
355       infra-cache-slabs: <number>
356              Number of slabs in the infrastructure cache. Slabs  reduce  lock
357              contention by threads. Must be set to a power of 2.
358
359       infra-cache-numhosts: <number>
360              Number  of  hosts  for  which  information is cached. Default is
361              10000.
362
363       infra-cache-min-rtt: <msec>
364              Lower limit for dynamic retransmit timeout calculation in infra‐
365              structure cache. Default is 50 milliseconds. Increase this value
366              if using forwarders needing more time to do recursive name reso‐
367              lution.
368
369       define-tag: <"list of tags">
370              Define the tags that can be used with local-zone and access-con‐
371              trol.  Enclose the list  between  quotes  ("")  and  put  spaces
372              between tags.
373
374       do-ip4: <yes or no>
375              Enable  or  disable  whether ip4 queries are answered or issued.
376              Default is yes.
377
378       do-ip6: <yes or no>
379              Enable or disable whether ip6 queries are  answered  or  issued.
380              Default  is yes.  If disabled, queries are not answered on IPv6,
381              and queries are not sent on IPv6 to  the  internet  nameservers.
382              With  this option you can disable the ipv6 transport for sending
383              DNS traffic, it does not impact the contents of the DNS traffic,
384              which may have ip4 and ip6 addresses in it.
385
386       prefer-ip6: <yes or no>
387              If  enabled,  prefer  IPv6  transport for sending DNS queries to
388              internet nameservers. Default is no.
389
390       do-udp: <yes or no>
391              Enable or disable whether UDP queries are  answered  or  issued.
392              Default is yes.
393
394       do-tcp: <yes or no>
395              Enable  or  disable  whether TCP queries are answered or issued.
396              Default is yes.
397
398       tcp-mss: <number>
399              Maximum segment size (MSS) of TCP socket  on  which  the  server
400              responds  to  queries.  Value  lower than common MSS on Ethernet
401              (1220 for example) will address path MTU problem.  Note that not
402              all  platform  supports  socket  option to set MSS (TCP_MAXSEG).
403              Default is system default MSS determined by  interface  MTU  and
404              negotiation between server and client.
405
406       outgoing-tcp-mss: <number>
407              Maximum  segment  size  (MSS) of TCP socket for outgoing queries
408              (from Unbound to other servers). Value lower than common MSS  on
409              Ethernet (1220 for example) will address path MTU problem.  Note
410              that  not  all  platform  supports  socket  option  to  set  MSS
411              (TCP_MAXSEG).   Default  is  system  default  MSS  determined by
412              interface MTU and negotiation between Unbound and other servers.
413
414       tcp-idle-timeout: <msec>
415              The period Unbound will wait for a query on  a  TCP  connection.
416              If  this  timeout  expires  Unbound closes the connection.  This
417              option defaults to 30000 milliseconds.  When the number of  free
418              incoming TCP buffers falls below 50% of the total number config‐
419              ured, the option value used is progressively reduced,  first  to
420              1% of the configured value, then to 0.2% of the configured value
421              if the number of free buffers falls below 35% of the total  num‐
422              ber  configured,  and finally to 0 if the number of free buffers
423              falls below 20% of the total number configured. A minimum  time‐
424              out  of  200  milliseconds  is observed regardless of the option
425              value used.
426
427       edns-tcp-keepalive: <yes or no>
428              Enable or disable EDNS TCP Keepalive. Default is no.
429
430       edns-tcp-keepalive-timeout: <msec>
431              The period Unbound will wait for a query  on  a  TCP  connection
432              when  EDNS  TCP  Keepalive  is  active.  If this timeout expires
433              Unbound closes the connection. If the client supports  the  EDNS
434              TCP  Keepalive  option,  Unbound  sends the timeout value to the
435              client to encourage it to close the connection before the server
436              times  out.   This option defaults to 120000 milliseconds.  When
437              the number of free incoming TCP buffers falls below 50%  of  the
438              total number configured, the advertised timeout is progressively
439              reduced to 1% of the configured value, then to 0.2% of the  con‐
440              figured  value  if the number of free buffers falls below 35% of
441              the total number configured, and finally to 0 if the  number  of
442              free  buffers falls below 20% of the total number configured.  A
443              minimum actual timeout of 200 milliseconds is  observed  regard‐
444              less of the advertised timeout.
445
446       tcp-upstream: <yes or no>
447              Enable  or disable whether the upstream queries use TCP only for
448              transport.  Default is no.  Useful in tunneling scenarios.
449
450       udp-upstream-without-downstream: <yes or no>
451              Enable udp upstream even if do-udp is no.  Default  is  no,  and
452              this   does   not  change  anything.   Useful  for  TLS  service
453              providers, that want no udp downstream but use udp to fetch data
454              upstream.
455
456       tls-upstream: <yes or no>
457              Enabled or disable whether the upstream queries use TLS only for
458              transport.  Default is no.  Useful in tunneling scenarios.   The
459              TLS contains plain DNS in TCP wireformat.  The other server must
460              support this (see tls-service-key).  If you  enable  this,  also
461              configure  a  tls-cert-bundle  or  use  tls-win-cert  to load CA
462              certs, otherwise the connections cannot be authenticated.
463
464       ssl-upstream: <yes or no>
465              Alternate syntax for tls-upstream.  If both are present  in  the
466              config file the last is used.
467
468       tls-service-key: <file>
469              If  enabled, the server provider TLS service on its TCP sockets.
470              The clients have to use tls-upstream: yes.  The file is the pri‐
471              vate  key for the TLS session.  The public certificate is in the
472              tls-service-pem file.  Default is "", turned  off.   Requires  a
473              restart (a reload is not enough) if changed, because the private
474              key is read while root permissions are held  and  before  chroot
475              (if  any).   Normal  DNS  TCP  service is not provided and gives
476              errors, this service is best run with a different  port:  config
477              or @port suffixes in the interface config.
478
479       ssl-service-key: <file>
480              Alternate syntax for tls-service-key.
481
482       tls-service-pem: <file>
483              The  public  key  certificate  pem  file  for  the  tls service.
484              Default is "", turned off.
485
486       ssl-service-pem: <file>
487              Alternate syntax for tls-service-pem.
488
489       tls-port: <number>
490              The port number on which to provide  TCP  TLS  service,  default
491              853, only interfaces configured with that port number as @number
492              get the TLS service.
493
494       ssl-port: <number>
495              Alternate syntax for tls-port.
496
497       tls-cert-bundle: <file>
498              If null or "", no file is used.  Set it to the certificate  bun‐
499              dle file, for example "/etc/pki/tls/certs/ca-bundle.crt".  These
500              certificates are used for  authenticating  connections  made  to
501              outside  peers.   For  example auth-zone urls, and also DNS over
502              TLS connections.
503
504       ssl-cert-bundle: <file>
505              Alternate syntax for tls-cert-bundle.
506
507       tls-win-cert: <yes or no>
508              Add the system certificates to the cert bundle certificates  for
509              authentication.   If no cert bundle, it uses only these certifi‐
510              cates.  Default is no.  On windows this option uses the certifi‐
511              cates  from  the  cert store.  Use the tls-cert-bundle option on
512              other systems.
513
514       tls-additional-port: <portnr>
515              List portnumbers as tls-additional-port, and when interfaces are
516              defined,  eg.  with  the @port suffix, as this port number, they
517              provide dns over TLS service.  Can list multiple, each on a  new
518              statement.
519
520       use-systemd: <yes or no>
521              Enable or disable systemd socket activation.  Default is no.
522
523       do-daemonize: <yes or no>
524              Enable  or  disable  whether  the  unbound server forks into the
525              background as a daemon.  Set the value to no when  unbound  runs
526              as systemd service.  Default is yes.
527
528       tcp-connection-limit: <IP netblock> <limit>
529              Allow  up  to  limit simultaneous TCP connections from the given
530              netblock.  When at the limit, further connections  are  accepted
531              but  closed  immediately.   This  option is experimental at this
532              time.
533
534       access-control: <IP netblock> <action>
535              The netblock is given as  an  IP4  or  IP6  address  with  /size
536              appended  for a classless network block. The action can be deny,
537              refuse,  allow,  allow_setrd,  allow_snoop,  deny_non_local   or
538              refuse_non_local.   The most specific netblock match is used, if
539              none match deny is used.
540
541              The action deny stops queries from hosts from that netblock.
542
543              The action refuse stops queries  too,  but  sends  a  DNS  rcode
544              REFUSED error message back.
545
546              The action allow gives access to clients from that netblock.  It
547              gives only access for recursion clients (which  is  what  almost
548              all clients need).  Nonrecursive queries are refused.
549
550              The  allow  action does allow nonrecursive queries to access the
551              local-data that is configured.  The reason is that this does not
552              involve  the  unbound  server  recursive  lookup  algorithm, and
553              static data is served in the reply.  This supports normal opera‐
554              tions  where nonrecursive queries are made for the authoritative
555              data.  For nonrecursive queries any  replies  from  the  dynamic
556              cache are refused.
557
558              The  allow_setrd  action  ignores the recursion desired (RD) bit
559              and treats all requests as if the recursion desired bit is  set.
560              Note  that  this  behavior violates RFC 1034 which states that a
561              name server should never perform recursive service unless  asked
562              via  the  RD  bit since this interferes with trouble shooting of
563              name servers and their databases. This prohibited  behavior  may
564              be  useful  if another DNS server must forward requests for spe‐
565              cific zones to a resolver DNS server,  but  only  supports  stub
566              domains and sends queries to the resolver DNS server with the RD
567              bit cleared.
568
569              The action allow_snoop gives nonrecursive access too.  This give
570              both  recursive  and non recursive access.  The name allow_snoop
571              refers to  cache  snooping,  a  technique  to  use  nonrecursive
572              queries  to  examine  the  cache  contents (for malicious acts).
573              However, nonrecursive queries can also be a  valuable  debugging
574              tool (when you want to examine the cache contents). In that case
575              use allow_snoop for your administration host.
576
577              By default only localhost is allowed, the rest is refused.   The
578              default  is  refused, because that is protocol-friendly. The DNS
579              protocol is not designed to handle dropped packets due  to  pol‐
580              icy,  and  dropping  may  result in (possibly excessive) retried
581              queries.
582
583              The deny_non_local and refuse_non_local settings are  for  hosts
584              that are only allowed to query for the authoritative local-data,
585              they are not allowed full recursion but only  the  static  data.
586              With  deny_non_local,  messages that are disallowed are dropped,
587              with refuse_non_local they receive error code REFUSED.
588
589       access-control-tag: <IP netblock> <"list of tags">
590              Assign tags  to  access-control  elements.  Clients  using  this
591              access  control  element use localzones that are tagged with one
592              of these tags. Tags must be  defined  in  define-tags.   Enclose
593              list  of  tags  in  quotes  ("") and put spaces between tags. If
594              access-control-tag is configured for a netblock  that  does  not
595              have  an  access-control,  an access-control element with action
596              allow is configured for this netblock.
597
598       access-control-tag-action: <IP netblock> <tag> <action>
599              Set action for particular tag for given access control  element.
600              If  you  have  multiple  tag  values, the tag used to lookup the
601              action is the first tag  match  between  access-control-tag  and
602              local-zone-tag where "first" comes from the order of the define-
603              tag values.
604
605       access-control-tag-data: <IP netblock> <tag> <"resource record string">
606              Set redirect data for particular tag for  given  access  control
607              element.
608
609       access-control-view: <IP netblock> <view name>
610              Set view for given access control element.
611
612       chroot: <directory>
613              If  chroot  is enabled, you should pass the configfile (from the
614              commandline) as a full path from the original  root.  After  the
615              chroot  has been performed the now defunct portion of the config
616              file path is removed to be able to reread  the  config  after  a
617              reload.
618
619              All  other  file paths (working dir, logfile, roothints, and key
620              files) can be specified in several ways:  as  an  absolute  path
621              relative  to  the  new  root,  as a relative path to the working
622              directory, or as an absolute path relative to the original root.
623              In  the last case the path is adjusted to remove the unused por‐
624              tion.
625
626              The pidfile can be either a relative path to the working  direc‐
627              tory,  or  an absolute path relative to the original root. It is
628              written just prior to  chroot  and  dropping  permissions.  This
629              allows  the pidfile to be /var/run/unbound.pid and the chroot to
630              be /var/unbound, for example.
631
632              Additionally,  unbound  may  need  to  access  /dev/random  (for
633              entropy) from inside the chroot.
634
635              If  given  a  chroot  is done to the given directory. By default
636              chroot is enabled and the default is "/etc/unbound". If you give
637              "" no chroot is performed.
638
639       username: <name>
640              If  given,  after  binding  the  port  the  user  privileges are
641              dropped. Default is "unbound". If you give username: "" no  user
642              change is performed.
643
644              If  this  user  is  not capable of binding the port, reloads (by
645              signal HUP) will still retain the opened ports.  If  you  change
646              the  port  number  in  the config file, and that new port number
647              requires privileges, then a  reload  will  fail;  a  restart  is
648              needed.
649
650       directory: <directory>
651              Sets   the   working  directory  for  the  program.  Default  is
652              "/etc/unbound".  On Windows the string "%EXECUTABLE%"  tries  to
653              change  to  the  directory  that unbound.exe resides in.  If you
654              give a server: directory: dir before  include:  file  statements
655              then those includes can be relative to the working directory.
656
657       logfile: <filename>
658              If  ""  is given, logging goes to stderr, or nowhere once daemo‐
659              nized.  The logfile is appended to, in the following format:
660              [seconds since 1970] unbound[pid:tid]: type: message.
661              If this option is given, the use-syslog  is  option  is  set  to
662              "no".  The logfile is reopened (for append) when the config file
663              is reread, on SIGHUP.
664
665       use-syslog: <yes or no>
666              Sets unbound to send log messages to  the  syslogd,  using  sys‐
667              log(3).   The  log  facility  LOG_DAEMON  is used, with identity
668              "unbound".  The logfile setting is overridden when use-syslog is
669              turned on.  The default is to log to syslog.
670
671       log-identity: <string>
672              If  "" is given (default), then the name of the executable, usu‐
673              ally "unbound" is used to report to the log.  Enter a string  to
674              override  it with that, which is useful on systems that run more
675              than one instance of unbound, with different configurations,  so
676              that the logs can be easily distinguished against.
677
678       log-time-ascii: <yes or no>
679              Sets  logfile  lines to use a timestamp in UTC ascii. Default is
680              no, which prints the seconds since 1970 in brackets.  No  effect
681              if  using  syslog,  in  that  case  syslog formats the timestamp
682              printed into the log files.
683
684       log-queries: <yes or no>
685              Prints one line per query to the log, with the log timestamp and
686              IP  address, name, type and class.  Default is no.  Note that it
687              takes time to print these lines which makes the server (signifi‐
688              cantly)  slower.   Odd  (nonprintable)  characters  in names are
689              printed as '?'.
690
691       log-replies: <yes or no>
692              Prints one line per reply to the log, with the log timestamp and
693              IP  address,  name,  type,  class, return code, time to resolve,
694              from cache and response size.  Default  is  no.   Note  that  it
695              takes time to print these lines which makes the server (signifi‐
696              cantly) slower.  Odd  (nonprintable)  characters  in  names  are
697              printed as '?'.
698
699       log-local-actions: <yes or no>
700              Print log lines to inform about local zone actions.  These lines
701              are like the local-zone type inform prints  out,  but  they  are
702              also printed for the other types of local zones.
703
704       log-servfail: <yes or no>
705              Print log lines that say why queries return SERVFAIL to clients.
706              This is separate from the verbosity debug  logs,  much  smaller,
707              and printed at the error level, not the info level of debug info
708              from verbosity.
709
710       pidfile: <filename>
711              The  process  id  is   written   to   the   file.   Default   is
712              "/var/run/unbound/unbound.pid".  So,
713              kill -HUP `cat /var/run/unbound/unbound.pid`
714              triggers a reload,
715              kill -TERM `cat /var/run/unbound/unbound.pid`
716              gracefully terminates.
717
718       root-hints: <filename>
719              Read  the  root  hints from this file. Default is nothing, using
720              builtin hints for the IN class. The file has the format of  zone
721              files,  with  root  nameserver  names  and  addresses  only. The
722              default may become outdated, when servers change,  therefore  it
723              is good practice to use a root-hints file.
724
725       hide-identity: <yes or no>
726              If enabled id.server and hostname.bind queries are refused.
727
728       identity: <string>
729              Set  the identity to report. If set to "", the default, then the
730              hostname of the server is returned.
731
732       hide-version: <yes or no>
733              If enabled version.server and version.bind queries are refused.
734
735       version: <string>
736              Set the version to report. If set to "", the default,  then  the
737              package version is returned.
738
739       hide-trustanchor: <yes or no>
740              If enabled trustanchor.unbound queries are refused.
741
742       target-fetch-policy: <"list of numbers">
743              Set  the  target fetch policy used by unbound to determine if it
744              should fetch nameserver target addresses opportunistically.  The
745              policy is described per dependency depth.
746
747              The  number  of  values  determines the maximum dependency depth
748              that unbound will pursue in answering a query.  A  value  of  -1
749              means to fetch all targets opportunistically for that dependency
750              depth. A value of 0 means to fetch on demand  only.  A  positive
751              value fetches that many targets opportunistically.
752
753              Enclose the list between quotes ("") and put spaces between num‐
754              bers.  The default is "3 2 1 0 0". Setting all zeroes, "0 0 0  0
755              0"  gives  behaviour closer to that of BIND 9, while setting "-1
756              -1 -1 -1 -1" gives behaviour rumoured to be closer  to  that  of
757              BIND 8.
758
759       harden-short-bufsize: <yes or no>
760              Very  small  EDNS buffer sizes from queries are ignored. Default
761              is off, since it is legal  protocol  wise  to  send  these,  and
762              unbound tries to give very small answers to these queries, where
763              possible.
764
765       harden-large-queries: <yes or no>
766              Very large queries are ignored. Default  is  off,  since  it  is
767              legal  protocol  wise  to send these, and could be necessary for
768              operation if TSIG or EDNS payload is very large.
769
770       harden-glue: <yes or no>
771              Will trust glue only if it  is  within  the  servers  authority.
772              Default is on.
773
774       harden-dnssec-stripped: <yes or no>
775              Require  DNSSEC  data  for trust-anchored zones, if such data is
776              absent, the zone becomes bogus. If turned  off,  and  no  DNSSEC
777              data  is  received  (or the DNSKEY data fails to validate), then
778              the zone is made insecure, this behaves like there is  no  trust
779              anchor.  You  could turn this off if you are sometimes behind an
780              intrusive firewall (of some sort) that removes DNSSEC data  from
781              packets,  or  a  zone  changes  from signed to unsigned to badly
782              signed often. If turned off you run  the  risk  of  a  downgrade
783              attack that disables security for a zone. Default is on.
784
785       harden-below-nxdomain: <yes or no>
786              From  RFC  8020  (with  title "NXDOMAIN: There Really Is Nothing
787              Underneath"), returns nxdomain  to  queries  for  a  name  below
788              another  name that is already known to be nxdomain.  DNSSEC man‐
789              dates noerror for empty nonterminals, hence  this  is  possible.
790              Very  old  software might return nxdomain for empty nonterminals
791              (that usually happen for reverse IP address lookups),  and  thus
792              may  be  incompatible  with  this.   To  try  to avoid this only
793              DNSSEC-secure nxdomains are used, because the old software  does
794              not  have  DNSSEC.  Default is on.  The nxdomain must be secure,
795              this means nsec3 with optout is insufficient.
796
797       harden-referral-path: <yes or no>
798              Harden the referral path by performing  additional  queries  for
799              infrastructure data.  Validates the replies if trust anchors are
800              configured and the zones are signed.  This enforces DNSSEC vali‐
801              dation  on  nameserver NS sets and the nameserver addresses that
802              are encountered on the referral path to the answer.  Default no,
803              because  it  burdens  the  authority  servers, and it is not RFC
804              standard, and could lead to performance problems because of  the
805              extra  query  load  that is generated.  Experimental option.  If
806              you enable it  consider  adding  more  numbers  after  the  tar‐
807              get-fetch-policy to increase the max depth that is checked to.
808
809       harden-algo-downgrade: <yes or no>
810              Harden  against algorithm downgrade when multiple algorithms are
811              advertised in the DS record.  If no, allows  the  weakest  algo‐
812              rithm  to  validate the zone.  Default is no.  Zone signers must
813              produce zones that allow this feature  to  work,  but  sometimes
814              they  do not, and turning this option off avoids that validation
815              failure.
816
817       use-caps-for-id: <yes or no>
818              Use  0x20-encoded  random  bits  in  the  query  to  foil  spoof
819              attempts.   This  perturbs  the lowercase and uppercase of query
820              names sent to authority servers and checks if  the  reply  still
821              has  the  correct casing.  Disabled by default.  This feature is
822              an experimental implementation of draft dns-0x20.
823
824       caps-whitelist: <domain>
825              Whitelist the domain so that it  does  not  receive  caps-for-id
826              perturbed  queries.   For  domains  that do not support 0x20 and
827              also fail with fallback  because  they  keep  sending  different
828              answers, like some load balancers.  Can be given multiple times,
829              for different domains.
830
831       qname-minimisation: <yes or no>
832              Send minimum  amount  of  information  to  upstream  servers  to
833              enhance privacy.  Only sent minimum required labels of the QNAME
834              and set QTYPE to A when possible.  Best  effort  approach;  full
835              QNAME and original QTYPE will be sent when upstream replies with
836              a RCODE other than NOERROR, except when receiving NXDOMAIN  from
837              a DNSSEC signed zone. Default is yes.
838
839       qname-minimisation-strict: <yes or no>
840              QNAME  minimisation  in strict mode. Do not fall-back to sending
841              full QNAME to potentially broken nameservers. A lot  of  domains
842              will  not be resolvable when this option in enabled. Only use if
843              you know what you are doing.  This option only has  effect  when
844              qname-minimisation is enabled. Default is off.
845
846       aggressive-nsec: <yes or no>
847              Aggressive  NSEC  uses the DNSSEC NSEC chain to synthesize NXDO‐
848              MAIN and other denials, using information  from  previous  NXDO‐
849              MAINs  answers.   Default  is  no.  It helps to reduce the query
850              rate towards targets that  get  a  very  high  nonexistent  name
851              lookup rate.
852
853       private-address: <IP address or subnet>
854              Give  IPv4  of  IPv6  addresses  or classless subnets. These are
855              addresses on your private network, and are  not  allowed  to  be
856              returned  for  public  internet  names.   Any occurrence of such
857              addresses are removed from DNS answers. Additionally, the DNSSEC
858              validator  may  mark  the  answers  bogus. This protects against
859              so-called DNS Rebinding, where a user browser is turned  into  a
860              network  proxy,  allowing  remote  access through the browser to
861              other parts of your private network.  Some names can be  allowed
862              to contain your private addresses, by default all the local-data
863              that you configured is allowed to, and  you  can  specify  addi‐
864              tional  names  using  private-domain.   No private addresses are
865              enabled by default.  We consider to enable this for the  RFC1918
866              private  IP  address  space  by  default in later releases. That
867              would enable  private  addresses  for  10.0.0.0/8  172.16.0.0/12
868              192.168.0.0/16  169.254.0.0/16 fd00::/8 and fe80::/10, since the
869              RFC standards say these addresses should not be visible  on  the
870              public internet.  Turning on 127.0.0.0/8 would hinder many spam‐
871              blocklists  as  they  use  that.   Adding  ::ffff:0:0/96   stops
872              IPv4-mapped IPv6 addresses from bypassing the filter.
873
874       private-domain: <domain name>
875              Allow  this  domain,  and  all its subdomains to contain private
876              addresses.  Give multiple times to allow multiple  domain  names
877              to contain private addresses. Default is none.
878
879       unwanted-reply-threshold: <number>
880              If  set,  a total number of unwanted replies is kept track of in
881              every thread.  When it reaches the threshold, a defensive action
882              is  taken  and  a  warning is printed to the log.  The defensive
883              action is to clear  the  rrset  and  message  caches,  hopefully
884              flushing  away  any poison.  A value of 10 million is suggested.
885              Default is 0 (turned off).
886
887       do-not-query-address: <IP address>
888              Do not query the given IP address. Can be  IP4  or  IP6.  Append
889              /num  to  indicate  a classless delegation netblock, for example
890              like 10.2.3.4/24 or 2001::11/64.
891
892       do-not-query-localhost: <yes or no>
893              If yes, localhost is added to the do-not-query-address  entries,
894              both  IP6  ::1 and IP4 127.0.0.1/8. If no, then localhost can be
895              used to send queries to. Default is yes.
896
897       prefetch: <yes or no>
898              If yes, message cache elements are prefetched before they expire
899              to  keep  the  cache  up to date.  Default is no.  Turning it on
900              gives about 10 percent more traffic and load on the machine, but
901              popular items do not expire from the cache.
902
903       prefetch-key: <yes or no>
904              If  yes,  fetch  the  DNSKEYs earlier in the validation process,
905              when a DS record is encountered.  This  lowers  the  latency  of
906              requests.   It does use a little more CPU.  Also if the cache is
907              set to 0, it is no use. Default is no.
908
909       deny-any: <yes or no>
910              If yes, deny  queries  of  type  ANY  with  an  empty  response.
911              Default  is no.  If disabled, unbound responds with a short list
912              of resource records if some can be found in the cache and  makes
913              the upstream type ANY query if there are none.
914
915       rrset-roundrobin: <yes or no>
916              If yes, Unbound rotates RRSet order in response (the random num‐
917              ber is taken from the query ID, for speed  and  thread  safety).
918              Default is no.
919
920       minimal-responses: <yes or no>
921              If  yes,  Unbound  doesn't  insert authority/additional sections
922              into response messages when those  sections  are  not  required.
923              This  reduces  response  size  significantly,  and may avoid TCP
924              fallback for some responses.  This may cause a  slight  speedup.
925              The  default  is  yes, even though the DNS protocol RFCs mandate
926              these sections, and the additional content could be of  use  and
927              save roundtrips for clients.  Because they are not used, and the
928              saved roundtrips are easier saved with prefetch, whilst this  is
929              faster.
930
931       disable-dnssec-lame-check: <yes or no>
932              If  true,  disables  the  DNSSEC lameness check in the iterator.
933              This check sees if RRSIGs are present in the answer, when dnssec
934              is  expected,  and retries another authority if RRSIGs are unex‐
935              pectedly missing.  The  validator  will  insist  in  RRSIGs  for
936              DNSSEC  signed  domains  regardless  of this setting, if a trust
937              anchor is loaded.
938
939       module-config: <"module names">
940              Module configuration, a list of module names separated  by  spa‐
941              ces,  surround  the  string with quotes (""). The modules can be
942              validator, iterator.  Setting this to "iterator" will result  in
943              a  non-validating  server.  Setting this to "validator iterator"
944              will turn on DNSSEC validation.  The ordering of the modules  is
945              important.  You must also set trust-anchors for validation to be
946              useful.
947
948       trust-anchor-file: <filename>
949              File with trusted  keys  for  validation.  Both  DS  and  DNSKEY
950              entries  can  appear  in the file. The format of the file is the
951              standard DNS Zone file format.   Default  is  "",  or  no  trust
952              anchor file.
953
954       auto-trust-anchor-file: <filename>
955              File  with  trust  anchor  for  one  zone, which is tracked with
956              RFC5011 probes.  The probes are several times  per  month,  thus
957              the  machine must be online frequently.  The initial file can be
958              one with contents as described in trust-anchor-file.   The  file
959              is  written  to  when the anchor is updated, so the unbound user
960              must have write permission.  Write permission to the  file,  but
961              also  to  the  directory  it  is in (to create a temporary file,
962              which is necessary to deal with filesystem full events), it must
963              also be inside the chroot (if that is used).
964
965       trust-anchor: <"Resource Record">
966              A  DS  or  DNSKEY  RR  for a key to use for validation. Multiple
967              entries can be given to specify multiple trusted keys, in  addi‐
968              tion  to the trust-anchor-files.  The resource record is entered
969              in the same format as 'dig' or 'drill'  prints  them,  the  same
970              format  as in the zone file. Has to be on a single line, with ""
971              around it. A TTL can be specified for ease of cut and paste, but
972              is ignored.  A class can be specified, but class IN is default.
973
974       trusted-keys-file: <filename>
975              File  with  trusted  keys  for validation. Specify more than one
976              file  with  several  entries,   one   file   per   entry.   Like
977              trust-anchor-file  but  has  a  different file format. Format is
978              BIND-9 style format, the trusted-keys {  name  flag  proto  algo
979              "key";  };  clauses  are  read.  It is possible to use wildcards
980              with this statement, the wildcard is expanded on  start  and  on
981              reload.
982
983       trust-anchor-signaling: <yes or no>
984              Send  RFC8145  key tag query after trust anchor priming. Default
985              is on.
986
987       root-key-sentinel: <yes or no>
988              Root key trust anchor sentinel. Default is on.
989
990       dlv-anchor-file: <filename>
991              This option was used during early days DNSSEC deployment when no
992              parent-side  DS  record  registrations  were  easily  available.
993              Nowadays, it is best to have DS records registered with the par‐
994              ent  zone  (many top level zones are signed).  File with trusted
995              keys for DLV (DNSSEC Lookaside Validation). Both DS  and  DNSKEY
996              entries  can  be  used  in  the  file, in the same format as for
997              trust-anchor-file: statements. Only one DLV can  be  configured,
998              more would be slow. The DLV configured is used as a root trusted
999              DLV, this means that it is a lookaside for the root. Default  is
1000              "",  or  no  dlv anchor file. DLV is going to be decommissioned.
1001              Please do not use it any more.
1002
1003       dlv-anchor: <"Resource Record">
1004              Much like trust-anchor, this is a DLV  anchor  with  the  DS  or
1005              DNSKEY  inline.   DLV  is going to be decommissioned.  Please do
1006              not use it any more.
1007
1008       domain-insecure: <domain name>
1009              Sets domain name to  be  insecure,  DNSSEC  chain  of  trust  is
1010              ignored  towards  the  domain name.  So a trust anchor above the
1011              domain name can not make the domain secure  with  a  DS  record,
1012              such  a  DS  record  is  then  ignored.   Also keys from DLV are
1013              ignored for the domain.  Can be given multiple times to  specify
1014              multiple  domains  that  are treated as if unsigned.  If you set
1015              trust anchors for the domain they override this setting (and the
1016              domain is secured).
1017
1018              This  can  be useful if you want to make sure a trust anchor for
1019              external lookups does not affect an (unsigned) internal  domain.
1020              A  DS  record externally can create validation failures for that
1021              internal domain.
1022
1023       val-override-date: <rrsig-style date spec>
1024              Default is "" or "0", which disables this debugging feature.  If
1025              enabled by giving a RRSIG style date, that date is used for ver‐
1026              ifying RRSIG inception and expiration dates, instead of the cur‐
1027              rent  date.  Do  not set this unless you are debugging signature
1028              inception and expiration. The value -1 ignores  the  date  alto‐
1029              gether, useful for some special applications.
1030
1031       val-sig-skew-min: <seconds>
1032              Minimum  number  of  seconds of clock skew to apply to validated
1033              signatures.  A value of 10% of the signature  lifetime  (expira‐
1034              tion  -  inception) is used, capped by this setting.  Default is
1035              3600 (1 hour) which allows  for  daylight  savings  differences.
1036              Lower  this value for more strict checking of short lived signa‐
1037              tures.
1038
1039       val-sig-skew-max: <seconds>
1040              Maximum number of seconds of clock skew to  apply  to  validated
1041              signatures.   A  value of 10% of the signature lifetime (expira‐
1042              tion - inception) is used, capped by this setting.   Default  is
1043              86400  (24  hours) which allows for timezone setting problems in
1044              stable domains.  Setting both min and max very low disables  the
1045              clock skew allowances.  Setting both min and max very high makes
1046              the validator check the signature timestamps less strictly.
1047
1048       val-bogus-ttl: <number>
1049              The time to live for bogus data. This is data  that  has  failed
1050              validation;  due  to invalid signatures or other checks. The TTL
1051              from that data  cannot  be  trusted,  and  this  value  is  used
1052              instead. The value is in seconds, default 60.  The time interval
1053              prevents repeated revalidation of bogus data.
1054
1055       val-clean-additional: <yes or no>
1056              Instruct the validator to remove data from the  additional  sec‐
1057              tion  of  secure messages that are not signed properly. Messages
1058              that are insecure, bogus, indeterminate  or  unchecked  are  not
1059              affected.  Default is yes. Use this setting to protect the users
1060              that rely on this validator for authentication from  potentially
1061              bad data in the additional section.
1062
1063       val-log-level: <number>
1064              Have  the  validator  print  validation  failures  to  the  log.
1065              Regardless of the verbosity setting.  Default is 0, off.  At  1,
1066              for  every  user query that fails a line is printed to the logs.
1067              This way you can monitor what happens with  validation.   Use  a
1068              diagnosis tool, such as dig or drill, to find out why validation
1069              is failing for these queries.  At 2, not  only  the  query  that
1070              failed is printed but also the reason why unbound thought it was
1071              wrong and which server sent the faulty data.
1072
1073       val-permissive-mode: <yes or no>
1074              Instruct the validator to mark bogus messages as  indeterminate.
1075              The  security  checks  are performed, but if the result is bogus
1076              (failed security), the reply is not  withheld  from  the  client
1077              with  SERVFAIL as usual. The client receives the bogus data. For
1078              messages that are found to be  secure  the  AD  bit  is  set  in
1079              replies.  Also logging is performed as for full validation.  The
1080              default value is "no".
1081
1082       ignore-cd-flag: <yes or no>
1083              Instruct unbound to ignore the CD flag from clients  and  refuse
1084              to  return  bogus  answers to them.  Thus, the CD (Checking Dis‐
1085              abled) flag does not disable checking any more.  This is  useful
1086              if  legacy (w2008) servers that set the CD flag but cannot vali‐
1087              date DNSSEC themselves are the clients, and  then  unbound  pro‐
1088              vides them with DNSSEC protection.  The default value is "no".
1089
1090       serve-expired: <yes or no>
1091              If  enabled,  unbound attempts to serve old responses from cache
1092              with a TTL of 0 in the response without waiting for  the  actual
1093              resolution  to  finish.  The actual resolution answer ends up in
1094              the cache later on.  Default is "no".
1095
1096       serve-expired-ttl: <seconds>
1097              Limit serving of expired responses to configured  seconds  after
1098              expiration.  0 disables the limit. This option only applies when
1099              serve-expired is enabled. The default is 0.
1100
1101       serve-expired-ttl-reset: <yes or no>
1102              Set the TTL of expired records to  the  serve-expired-ttl  value
1103              after  a  failed  attempt  to retrieve the record from upstream.
1104              This makes sure that the expired records will be served as  long
1105              as there are queries for it. Default is "no".
1106
1107       val-nsec3-keysize-iterations: <"list of values">
1108              List of keysize and iteration count values, separated by spaces,
1109              surrounded by quotes. Default is "1024 150 2048 500 4096  2500".
1110              This determines the maximum allowed NSEC3 iteration count before
1111              a message is simply marked insecure instead  of  performing  the
1112              many hashing iterations. The list must be in ascending order and
1113              have at least one entry. If you set it to "1024 65535" there  is
1114              no  restriction  to  NSEC3 iteration values.  This table must be
1115              kept short; a very long list could cause slower operation.
1116
1117       add-holddown: <seconds>
1118              Instruct the auto-trust-anchor-file probe mechanism for  RFC5011
1119              autotrust  updates to add new trust anchors only after they have
1120              been visible for this time.  Default is 30 days as per the RFC.
1121
1122       del-holddown: <seconds>
1123              Instruct the auto-trust-anchor-file probe mechanism for  RFC5011
1124              autotrust  updates  to  remove  revoked trust anchors after they
1125              have been kept in the revoked list for this long.  Default is 30
1126              days as per the RFC.
1127
1128       keep-missing: <seconds>
1129              Instruct  the auto-trust-anchor-file probe mechanism for RFC5011
1130              autotrust updates to remove missing  trust  anchors  after  they
1131              have  been  unseen for this long.  This cleans up the state file
1132              if the target zone does not perform trust anchor revocation,  so
1133              this makes the auto probe mechanism work with zones that perform
1134              regular (non-5011) rollovers.  The default  is  366  days.   The
1135              value 0 does not remove missing anchors, as per the RFC.
1136
1137       permit-small-holddown: <yes or no>
1138              Debug  option  that allows the autotrust 5011 rollover timers to
1139              assume very small values.  Default is no.
1140
1141       key-cache-size: <number>
1142              Number of bytes size of the key cache. Default is  4  megabytes.
1143              A  plain  number  is  in bytes, append 'k', 'm' or 'g' for kilo‐
1144              bytes, megabytes or gigabytes (1024*1024 bytes in a megabyte).
1145
1146       key-cache-slabs: <number>
1147              Number of slabs in the key cache. Slabs reduce  lock  contention
1148              by threads.  Must be set to a power of 2. Setting (close) to the
1149              number of cpus is a reasonable guess.
1150
1151       neg-cache-size: <number>
1152              Number of bytes size of the aggressive negative  cache.  Default
1153              is  1  megabyte.  A plain number is in bytes, append 'k', 'm' or
1154              'g' for kilobytes, megabytes or gigabytes (1024*1024 bytes in  a
1155              megabyte).
1156
1157       unblock-lan-zones: <yes or no>
1158              Default  is  disabled.   If  enabled,  then  for private address
1159              space, the reverse lookups are no longer filtered.  This  allows
1160              unbound  when running as dns service on a host where it provides
1161              service for that host, to put out all of  the  queries  for  the
1162              'lan' upstream.  When enabled, only localhost, 127.0.0.1 reverse
1163              and ::1 reverse zones are configured with default  local  zones.
1164              Disable the option when unbound is running as a (DHCP-) DNS net‐
1165              work resolver for a group of machines, where such lookups should
1166              be  filtered  (RFC  compliance),  this also stops potential data
1167              leakage about the local network to the upstream DNS servers.
1168
1169       insecure-lan-zones: <yes or no>
1170              Default is disabled.  If enabled, then reverse lookups  in  pri‐
1171              vate  address space are not validated.  This is usually required
1172              whenever unblock-lan-zones is used.
1173
1174       local-zone: <zone> <type>
1175              Configure a local zone. The type determines the answer  to  give
1176              if  there  is  no  match  from  local-data.  The types are deny,
1177              refuse, static, transparent, redirect, nodefault,  typetranspar‐
1178              ent,  inform,  inform_deny,  always_transparent,  always_refuse,
1179              always_nxdomain, noview, and are explained below. After that the
1180              default  settings are listed. Use local-data: to enter data into
1181              the local zone. Answers for local zones  are  authoritative  DNS
1182              answers. By default the zones are class IN.
1183
1184              If you need more complicated authoritative data, with referrals,
1185              wildcards, CNAME/DNAME support, or DNSSEC authoritative service,
1186              setup  a  stub-zone  for it as detailed in the stub zone section
1187              below.
1188
1189            deny Do not send an answer, drop the query.  If there is  a  match
1190                 from local data, the query is answered.
1191
1192            refuse
1193                 Send an error message reply, with rcode REFUSED.  If there is
1194                 a match from local data, the query is answered.
1195
1196            static
1197                 If there is a match from local data, the query  is  answered.
1198                 Otherwise,  the  query  is  answered with nodata or nxdomain.
1199                 For a negative answer a SOA is  included  in  the  answer  if
1200                 present as local-data for the zone apex domain.
1201
1202            transparent
1203                 If  there  is a match from local data, the query is answered.
1204                 Otherwise if the query has a different  name,  the  query  is
1205                 resolved  normally.   If  the  query  is  for a name given in
1206                 localdata but no such type of data  is  given  in  localdata,
1207                 then  a  noerror nodata answer is returned.  If no local-zone
1208                 is given local-data causes a transparent zone to  be  created
1209                 by default.
1210
1211            typetransparent
1212                 If  there  is a match from local data, the query is answered.
1213                 If the query is for a different name, or for  the  same  name
1214                 but  for  a  different  type, the query is resolved normally.
1215                 So, similar to transparent but types that are not  listed  in
1216                 local data are resolved normally, so if an A record is in the
1217                 local data that does  not  cause  a  nodata  reply  for  AAAA
1218                 queries.
1219
1220            redirect
1221                 The  query is answered from the local data for the zone name.
1222                 There may be no local  data  beneath  the  zone  name.   This
1223                 answers  queries for the zone, and all subdomains of the zone
1224                 with the local data for the zone.  It can be used to redirect
1225                 a  domain  to  return  a  different address record to the end
1226                 user,   with   local-zone:   "example.com."   redirect    and
1227                 local-data:  "example.com. A 127.0.0.1" queries for www.exam‐
1228                 ple.com and www.foo.example.com are redirected, so that users
1229                 with  web  browsers  cannot  access  sites  with suffix exam‐
1230                 ple.com.
1231
1232            inform
1233                 The query is answered normally,  same  as  transparent.   The
1234                 client  IP  address  (@portnumber) is printed to the logfile.
1235                 The log message is: timestamp,  unbound-pid,  info:  zonename
1236                 inform IP@port queryname type class.  This option can be used
1237                 for normal resolution, but machines looking up infected names
1238                 are logged, eg. to run antivirus on them.
1239
1240            inform_deny
1241                 The query is dropped, like 'deny', and logged, like 'inform'.
1242                 Ie. find infected machines without answering the queries.
1243
1244            always_transparent
1245                 Like transparent, but ignores local data  and  resolves  nor‐
1246                 mally.
1247
1248            always_refuse
1249                 Like refuse, but ignores local data and refuses the query.
1250
1251            always_nxdomain
1252                 Like  static, but ignores local data and returns nxdomain for
1253                 the query.
1254
1255            noview
1256                 Breaks out of that view and moves towards  the  global  local
1257                 zones  for  answer  to  the  query.  If the view first is no,
1258                 it'll resolve normally.  If  view  first  is  enabled,  it'll
1259                 break  perform  that  step and check the global answers.  For
1260                 when the view has view specific overrides but some  zone  has
1261                 to be answered from global local zone contents.
1262
1263            nodefault
1264                 Used  to turn off default contents for AS112 zones. The other
1265                 types also turn off default contents for the zone. The 'node‐
1266                 fault'  option  has  no other effect than turning off default
1267                 contents for the  given  zone.   Use  nodefault  if  you  use
1268                 exactly  that  zone, if you want to use a subzone, use trans‐
1269                 parent.
1270
1271       The default zones are localhost, reverse 127.0.0.1 and ::1, the  onion,
1272       test,  invalid  and  the  AS112  zones. The AS112 zones are reverse DNS
1273       zones for private use and reserved IP addresses for which  the  servers
1274       on  the internet cannot provide correct answers. They are configured by
1275       default to give nxdomain (no reverse information) answers. The defaults
1276       can  be  turned  off by specifying your own local-zone of that name, or
1277       using the 'nodefault' type. Below is a list of the  default  zone  con‐
1278       tents.
1279
1280            localhost
1281                 The  IP4  and  IP6 localhost information is given. NS and SOA
1282                 records are provided for completeness and to satisfy some DNS
1283                 update tools. Default content:
1284                 local-zone: "localhost." redirect
1285                 local-data: "localhost. 10800 IN NS localhost."
1286                 local-data: "localhost. 10800 IN
1287                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1288                 local-data: "localhost. 10800 IN A 127.0.0.1"
1289                 local-data: "localhost. 10800 IN AAAA ::1"
1290
1291            reverse IPv4 loopback
1292                 Default content:
1293                 local-zone: "127.in-addr.arpa." static
1294                 local-data: "127.in-addr.arpa. 10800 IN NS localhost."
1295                 local-data: "127.in-addr.arpa. 10800 IN
1296                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1297                 local-data: "1.0.0.127.in-addr.arpa. 10800 IN
1298                     PTR localhost."
1299
1300            reverse IPv6 loopback
1301                 Default content:
1302                 local-zone: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1303                     0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." static
1304                 local-data: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1305                     0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. 10800 IN
1306                     NS localhost."
1307                 local-data: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1308                     0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. 10800 IN
1309                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1310                 local-data: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1311                     0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. 10800 IN
1312                     PTR localhost."
1313
1314            onion (RFC 7686)
1315                 Default content:
1316                 local-zone: "onion." static
1317                 local-data: "onion. 10800 IN NS localhost."
1318                 local-data: "onion. 10800 IN
1319                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1320
1321            test (RFC 2606)
1322                 Default content:
1323                 local-zone: "test." static
1324                 local-data: "test. 10800 IN NS localhost."
1325                 local-data: "test. 10800 IN
1326                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1327
1328            invalid (RFC 2606)
1329                 Default content:
1330                 local-zone: "invalid." static
1331                 local-data: "invalid. 10800 IN NS localhost."
1332                 local-data: "invalid. 10800 IN
1333                     SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
1334
1335            reverse RFC1918 local use zones
1336                 Reverse  data  for zones 10.in-addr.arpa, 16.172.in-addr.arpa
1337                 to    31.172.in-addr.arpa,     168.192.in-addr.arpa.      The
1338                 local-zone:  is  set  static  and  as  local-data: SOA and NS
1339                 records are provided.
1340
1341            reverse RFC3330 IP4 this, link-local, testnet and broadcast
1342                 Reverse data for zones 0.in-addr.arpa,  254.169.in-addr.arpa,
1343                 2.0.192.in-addr.arpa  (TEST  NET  1), 100.51.198.in-addr.arpa
1344                 (TEST  NET   2),   113.0.203.in-addr.arpa   (TEST   NET   3),
1345                 255.255.255.255.in-addr.arpa.   And  from 64.100.in-addr.arpa
1346                 to 127.100.in-addr.arpa (Shared Address Space).
1347
1348            reverse RFC4291 IP6 unspecified
1349                 Reverse data for zone
1350                 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
1351                 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.
1352
1353            reverse RFC4193 IPv6 Locally Assigned Local Addresses
1354                 Reverse data for zone D.F.ip6.arpa.
1355
1356            reverse RFC4291 IPv6 Link Local Addresses
1357                 Reverse data for zones 8.E.F.ip6.arpa to B.E.F.ip6.arpa.
1358
1359            reverse IPv6 Example Prefix
1360                 Reverse data for zone 8.B.D.0.1.0.0.2.ip6.arpa. This zone  is
1361                 used  for tutorials and examples. You can remove the block on
1362                 this zone with:
1363                   local-zone: 8.B.D.0.1.0.0.2.ip6.arpa. nodefault
1364                 You can also selectively unblock a part of the zone by making
1365                 that part transparent with a local-zone statement.  This also
1366                 works with the other default zones.
1367
1368       local-data: "<resource record string>"
1369            Configure local data, which is served in reply to queries for  it.
1370            The query has to match exactly unless you configure the local-zone
1371            as redirect. If not matched exactly, the  local-zone  type  deter‐
1372            mines  further processing. If local-data is configured that is not
1373            a subdomain of a local-zone, a transparent local-zone  is  config‐
1374            ured.   For  record  types  such  as TXT, use single quotes, as in
1375            local-data: 'example. TXT "text"'.
1376
1377            If you need more complicated authoritative data,  with  referrals,
1378            wildcards,  CNAME/DNAME  support, or DNSSEC authoritative service,
1379            setup a stub-zone for it as detailed  in  the  stub  zone  section
1380            below.
1381
1382       local-data-ptr: "IPaddr name"
1383            Configure  local data shorthand for a PTR record with the reversed
1384            IPv4 or IPv6 address and the host name.   For  example  "192.0.2.4
1385            www.example.com".   TTL  can  be  inserted like this: "2001:DB8::4
1386            7200 www.example.com"
1387
1388       local-zone-tag: <zone> <"list of tags">
1389            Assign tags to localzones. Tagged localzones will only be  applied
1390            when the used access-control element has a matching tag. Tags must
1391            be defined in define-tags.  Enclose list of tags  in  quotes  ("")
1392            and put spaces between tags.
1393
1394       local-zone-override: <zone> <IP netblock> <type>
1395            Override  the  localzone  type for queries from addresses matching
1396            netblock.  Use this localzone type, regardless the type configured
1397            for  the  local-zone (both tagged and untagged) and regardless the
1398            type configured using access-control-tag-action.
1399
1400       ratelimit: <number or 0>
1401            Enable ratelimiting of queries sent to nameserver  for  performing
1402            recursion.   If  0,  the  default, it is disabled.  This option is
1403            experimental at this time.  The ratelimit is in queries per second
1404            that  are  allowed.   More  queries  are turned away with an error
1405            (servfail).  This stops recursive floods, eg. random query  names,
1406            but not spoofed reflection floods.  Cached responses are not rate‐
1407            limited by this setting.  The zone of the query is  determined  by
1408            examining  the  nameservers  for it, the zone name is used to keep
1409            track of the rate.  For example, 1000 may be a suitable  value  to
1410            stop the server from being overloaded with random names, and keeps
1411            unbound from sending traffic to the nameservers for those zones.
1412
1413       ratelimit-size: <memory size>
1414            Give the size of the data structure in which the  current  ongoing
1415            rates  are  kept  track in.  Default 4m.  In bytes or use m(mega),
1416            k(kilo), g(giga).  The ratelimit structure is small, so this  data
1417            structure likely does not need to be large.
1418
1419       ratelimit-slabs: <number>
1420            Give  power of 2 number of slabs, this is used to reduce lock con‐
1421            tention in the ratelimit tracking data structure.   Close  to  the
1422            number of cpus is a fairly good setting.
1423
1424       ratelimit-factor: <number>
1425            Set  the  amount  of  queries  to  rate  limit  when  the limit is
1426            exceeded.  If set to 0, all queries are dropped for domains  where
1427            the  limit is exceeded.  If set to another value, 1 in that number
1428            is allowed through to complete.   Default  is  10,  allowing  1/10
1429            traffic to flow normally.  This can make ordinary queries complete
1430            (if repeatedly queried for), and enter the cache, whilst also mit‐
1431            igating the traffic flow by the factor given.
1432
1433       ratelimit-for-domain: <domain> <number qps or 0>
1434            Override  the global ratelimit for an exact match domain name with
1435            the listed number.  You can give this for  any  number  of  names.
1436            For  example, for a top-level-domain you may want to have a higher
1437            limit than other names.  A value of 0  will  disable  ratelimiting
1438            for that domain.
1439
1440       ratelimit-below-domain: <domain> <number qps or 0>
1441            Override  the global ratelimit for a domain name that ends in this
1442            name.  You can give this multiple times, it then describes differ‐
1443            ent  settings  in  different  parts of the namespace.  The closest
1444            matching suffix is used to determine the qps limit.  The rate  for
1445            the   exact  matching  domain  name  is  not  changed,  use  rate‐
1446            limit-for-domain to set that, you might want to use different set‐
1447            tings  for  a  top-level-domain and subdomains.  A value of 0 will
1448            disable ratelimiting for domain names that end in this name.
1449
1450       ip-ratelimit: <number or 0>
1451            Enable global ratelimiting of queries accepted per ip address.  If
1452            0,  the  default,  it is disabled.  This option is experimental at
1453            this time.  The ratelimit  is  in  queries  per  second  that  are
1454            allowed.  More queries are completely dropped and will not receive
1455            a reply, SERVFAIL or otherwise.  IP  ratelimiting  happens  before
1456            looking in the cache. This may be useful for mitigating amplifica‐
1457            tion attacks.
1458
1459       ip-ratelimit-size: <memory size>
1460            Give the size of the data structure in which the  current  ongoing
1461            rates  are  kept  track in.  Default 4m.  In bytes or use m(mega),
1462            k(kilo), g(giga).  The ip ratelimit structure is  small,  so  this
1463            data structure likely does not need to be large.
1464
1465       ip-ratelimit-slabs: <number>
1466            Give  power of 2 number of slabs, this is used to reduce lock con‐
1467            tention in the ip ratelimit tracking data structure.  Close to the
1468            number of cpus is a fairly good setting.
1469
1470       ip-ratelimit-factor: <number>
1471            Set  the  amount  of  queries  to  rate  limit  when  the limit is
1472            exceeded.  If set to 0, all  queries  are  dropped  for  addresses
1473            where  the  limit is exceeded.  If set to another value, 1 in that
1474            number is allowed through to complete.  Default  is  10,  allowing
1475            1/10  traffic  to  flow  normally.  This can make ordinary queries
1476            complete (if repeatedly queried for), and enter the cache,  whilst
1477            also mitigating the traffic flow by the factor given.
1478
1479       fast-server-permil: <number>
1480            Specify how many times out of 1000 to pick from the set of fastest
1481            servers.  0 turns the feature off.  A value of 900 would pick from
1482            the fastest servers 90 percent of the time, and would perform nor‐
1483            mal exploration of random servers for  the  remaining  time.  When
1484            prefetch  is  enabled  (or serve-expired), such prefetches are not
1485            sped up, because there is no one waiting for it, and it presents a
1486            good  moment  to  perform  server exploration. The fast-server-num
1487            option can be used to specify the size of the fastest servers set.
1488            The default for fast-server-permil is 0.
1489
1490       fast-server-num: <number>
1491            Set  the  number  of  servers  that should be used for fast server
1492            selection. Only use the fastest specified number of  servers  with
1493            the  fast-server-permil  option,  that  turns  this on or off. The
1494            default is to use the fastest 3 servers.
1495
1496   Remote Control Options
1497       In the remote-control: clause are the declarations for the remote  con‐
1498       trol  facility.  If this is enabled, the unbound-control(8) utility can
1499       be used to send commands to the running  unbound  server.   The  server
1500       uses  these  clauses  to  setup TLSv1 security for the connection.  The
1501       unbound-control(8) utility also reads the  remote-control  section  for
1502       options.   To  setup  the  correct  self-signed  certificates  use  the
1503       unbound-control-setup(8) utility.
1504
1505       control-enable: <yes or no>
1506            The option is used to enable remote control, default is "no".   If
1507            turned off, the server does not listen for control commands.
1508
1509       control-interface: <ip address or path>
1510            Give  IPv4 or IPv6 addresses or local socket path to listen on for
1511            control commands.  By default localhost  (127.0.0.1  and  ::1)  is
1512            listened to.  Use 0.0.0.0 and ::0 to listen to all interfaces.  If
1513            you change this  and  permissions  have  been  dropped,  you  must
1514            restart the server for the change to take effect.
1515
1516            If  you  set  it to an absolute path, a local socket is used.  The
1517            local socket does not use the  certificates  and  keys,  so  those
1518            files  need not be present.  To restrict access, unbound sets per‐
1519            missions on the file to the user and group that is configured, the
1520            access  bits are set to allow the group members to access the con‐
1521            trol socket file.  Put users that need to access the socket in the
1522            that group.  To restrict access further, create a directory to put
1523            the control socket in and restrict access to that directory.
1524
1525       control-port: <port number>
1526            The port number to listen on for IPv4 or IPv6 control  interfaces,
1527            default  is  8953.   If  you change this and permissions have been
1528            dropped, you must restart  the  server  for  the  change  to  take
1529            effect.
1530
1531       control-use-cert: <yes or no>
1532            For  localhost control-interface you can disable the use of TLS by
1533            setting this option to "no", default is "yes".  For local sockets,
1534            TLS is disabled and the value of this option is ignored.
1535
1536       server-key-file: <private key file>
1537            Path  to  the  server  private key, by default unbound_server.key.
1538            This file is generated by the unbound-control-setup utility.  This
1539            file is used by the unbound server, but not by unbound-control.
1540
1541       server-cert-file: <certificate file.pem>
1542            Path   to   the   server   self  signed  certificate,  by  default
1543            unbound_server.pem.  This file is generated  by  the  unbound-con‐
1544            trol-setup  utility.  This file is used by the unbound server, and
1545            also by unbound-control.
1546
1547       control-key-file: <private key file>
1548            Path to the control client private key,  by  default  unbound_con‐
1549            trol.key.   This  file  is  generated by the unbound-control-setup
1550            utility.  This file is used by unbound-control.
1551
1552       control-cert-file: <certificate file.pem>
1553            Path to the control client certificate,  by  default  unbound_con‐
1554            trol.pem.   This certificate has to be signed with the server cer‐
1555            tificate.  This file is  generated  by  the  unbound-control-setup
1556            utility.  This file is used by unbound-control.
1557
1558   Stub Zone Options
1559       There may be multiple stub-zone: clauses. Each with a name: and zero or
1560       more hostnames or IP addresses.  For the stub zone this list  of  name‐
1561       servers  is used. Class IN is assumed.  The servers should be authority
1562       servers, not  recursors;  unbound  performs  the  recursive  processing
1563       itself for stub zones.
1564
1565       The stub zone can be used to configure authoritative data to be used by
1566       the resolver that cannot be accessed using the public internet servers.
1567       This  is  useful  for  company-local  data  or  private zones. Setup an
1568       authoritative server on a different host (or different port).  Enter  a
1569       config  entry  for unbound with stub-addr: <ip address of host[@port]>.
1570       The unbound resolver can then access the data, without referring to the
1571       public internet for it.
1572
1573       This  setup  allows DNSSEC signed zones to be served by that authorita‐
1574       tive server, in which case a trusted key entry with the public key  can
1575       be  put in config, so that unbound can validate the data and set the AD
1576       bit on replies for the private zone (authoritative servers do  not  set
1577       the AD bit).  This setup makes unbound capable of answering queries for
1578       the private zone, and can even set the AD bit ('authentic'), but the AA
1579       ('authoritative') bit is not set on these replies.
1580
1581       Consider   adding  server:  statements  for  domain-insecure:  and  for
1582       local-zone: name nodefault for the zone if it is a locally served zone.
1583       The insecure clause stops DNSSEC from invalidating the zone.  The local
1584       zone nodefault (or transparent) clause makes the (reverse-) zone bypass
1585       unbound's filtering of RFC1918 zones.
1586
1587       name: <domain name>
1588              Name of the stub zone.
1589
1590       stub-host: <domain name>
1591              Name  of  stub  zone nameserver. Is itself resolved before it is
1592              used.
1593
1594       stub-addr: <IP address>
1595              IP address of stub zone nameserver. Can be IP 4 or IP 6.  To use
1596              a nondefault port for DNS communication append '@' with the port
1597              number.
1598
1599       stub-prime: <yes or no>
1600              This option is by default no.  If enabled  it  performs  NS  set
1601              priming,  which  is similar to root hints, where it starts using
1602              the list of nameservers currently published by the zone.   Thus,
1603              if  the  hint list is slightly outdated, the resolver picks up a
1604              correct list online.
1605
1606       stub-first: <yes or no>
1607              If enabled, a query is attempted without the stub clause  if  it
1608              fails.   The  data  could not be retrieved and would have caused
1609              SERVFAIL because the servers  are  unreachable,  instead  it  is
1610              tried without this clause.  The default is no.
1611
1612       stub-tls-upstream: <yes or no>
1613              Enabled  or disable whether the queries to this stub use TLS for
1614              transport.  Default is no.
1615
1616       stub-ssl-upstream: <yes or no>
1617              Alternate syntax for stub-tls-upstream.
1618
1619       stub-no-cache: <yes or no>
1620              Default is no.  If enabled, data inside the stub is not  cached.
1621              This is useful when you want immediate changes to be visible.
1622
1623   Forward Zone Options
1624       There may be multiple forward-zone: clauses. Each with a name: and zero
1625       or more hostnames or IP addresses.  For the forward zone this  list  of
1626       nameservers  is  used  to forward the queries to. The servers listed as
1627       forward-host: and forward-addr: have to handle  further  recursion  for
1628       the  query.   Thus,  those  servers  are not authority servers, but are
1629       (just like unbound is) recursive servers too; unbound does not  perform
1630       recursion itself for the forward zone, it lets the remote server do it.
1631       Class IN is assumed.  CNAMEs are chased by unbound itself,  asking  the
1632       remote  server  for every name in the indirection chain, to protect the
1633       local cache from illegal indirect  referenced  items.   A  forward-zone
1634       entry  with name "." and a forward-addr target will forward all queries
1635       to that other server (unless it can answer from the cache).
1636
1637       name: <domain name>
1638              Name of the forward zone.
1639
1640       forward-host: <domain name>
1641              Name of server to forward to. Is itself resolved  before  it  is
1642              used.
1643
1644       forward-addr: <IP address>
1645              IP address of server to forward to. Can be IP 4 or IP 6.  To use
1646              a nondefault port for DNS communication append '@' with the port
1647              number.   If  tls  is  enabled,  then you can append a '#' and a
1648              name, then it'll check the tls authentication certificates  with
1649              that name.  If you combine the '@' and '#', the '@' comes first.
1650
1651              At high verbosity it logs the TLS certificate, with TLS enabled.
1652              If you leave out the '#' and auth name  from  the  forward-addr,
1653              any  name  is  accepted.  The cert must also match a CA from the
1654              tls-cert-bundle.  The cert name match code needs  OpenSSL  1.1.0
1655              or later to be enabled.
1656
1657       forward-first: <yes or no>
1658              If  enabled,  a query is attempted without the forward clause if
1659              it fails.  The data could not be retrieved and would have caused
1660              SERVFAIL  because  the  servers  are  unreachable, instead it is
1661              tried without this clause.  The default is no.
1662
1663       forward-tls-upstream: <yes or no>
1664              Enabled or disable whether the queries to this forwarder use TLS
1665              for transport.  Default is no.  If you enable this, also config‐
1666              ure a tls-cert-bundle or use tls-win-cert to load CA certs, oth‐
1667              erwise the connections cannot be authenticated.
1668
1669       forward-ssl-upstream: <yes or no>
1670              Alternate syntax for forward-tls-upstream.
1671
1672       forward-no-cache: <yes or no>
1673              Default  is  no.   If  enabled,  data  inside the forward is not
1674              cached.  This is useful when you want immediate  changes  to  be
1675              visible.
1676
1677   Authority Zone Options
1678       Authority  zones are configured with auth-zone:, and each one must have
1679       a name:.  There can be multiple ones,  by  listing  multiple  auth-zone
1680       clauses,  each  with  a  different name, pertaining to that part of the
1681       namespace.  The authority zone with the name closest to the name looked
1682       up is used.  Authority zones are processed after local-zones and before
1683       cache (for-downstream: yes), and when used in this manner make  unbound
1684       respond  like  an authority server.  Authority zones are also processed
1685       after cache, just before going to the network to fetch information  for
1686       recursion  (for-upstream:  yes), and when used in this manner provide a
1687       local copy of an authority server that speeds up lookups of that data.
1688
1689       Authority zones can be read from zonefile.  And can be kept updated via
1690       AXFR  and  IXFR.   After  update the zonefile is rewritten.  The update
1691       mechanism uses the SOA timer values and performs  SOA  UDP  queries  to
1692       detect zone changes.
1693
1694       If  the  update  fetch  fails, the timers in the SOA record are used to
1695       time another fetch attempt.  Until the SOA  expiry  timer  is  reached.
1696       Then  the  zone  is expired.  When a zone is expired, queries are SERV‐
1697       FAIL, and any new serial number is accepted from the  master  (even  if
1698       older),  and  if  fallback  is enabled, the fallback activates to fetch
1699       from the upstream instead of the SERVFAIL.
1700
1701       name: <zone name>
1702              Name of the authority zone.
1703
1704       master: <IP address or host name>
1705              Where to download a copy of the zone from, with AXFR  and  IXFR.
1706              Multiple  masters  can  be specified.  They are all tried if one
1707              fails.
1708
1709       url: <url to zonefile>
1710              Where to download a zonefile for the zone.  With http or  https.
1711              An   example   for   the  url  is  "http://www.example.com/exam
1712              ple.org.zone".  Multiple url statements can be given,  they  are
1713              tried  in turn.  If only urls are given the SOA refresh timer is
1714              used to wait for making new  downloads.   If  also  masters  are
1715              listed, the masters are first probed with UDP SOA queries to see
1716              if the SOA serial number has changed,  reducing  the  number  of
1717              downloads.  If none of the urls work, the masters are tried with
1718              IXFR and AXFR.  For https, the tls-cert-bundle and the  hostname
1719              from the url are used to authenticate the connection.
1720
1721       allow-notify: <IP address or host name or netblockIP/prefix>
1722              With  allow-notify  you  can specify additional sources of noti‐
1723              fies.  When notified, the server attempts  to  first  probe  and
1724              then  zone  transfer.   If the notify is from a master, it first
1725              attempts that master.  Otherwise other  masters  are  attempted.
1726              If  there  are no masters, but only urls, the file is downloaded
1727              when notified.  The masters from master: statements are  allowed
1728              notify by default.
1729
1730       fallback-enabled: <yes or no>
1731              Default  no.   If  enabled,  unbound  falls back to querying the
1732              internet as a resolver for this zone  when  lookups  fail.   For
1733              example for DNSSEC validation failures.
1734
1735       for-downstream: <yes or no>
1736              Default  yes.  If enabled, unbound serves authority responses to
1737              downstream clients for this zone.   This  option  makes  unbound
1738              behave, for the queries with names in this zone, like one of the
1739              authority servers for that  zone.   Turn  it  off  if  you  want
1740              unbound  to provide recursion for the zone but have a local copy
1741              of zone data.  If for-downstream is no and for-upstream is  yes,
1742              then  unbound  will  DNSSEC  validate  the  contents of the zone
1743              before serving the zone contents to clients and store validation
1744              results in the cache.
1745
1746       for-upstream: <yes or no>
1747              Default  yes.   If  enabled, unbound fetches data from this data
1748              collection for answering recursion queries.  Instead of  sending
1749              queries  over  the  internet  to  the authority servers for this
1750              zone, it'll fetch the data directly from the zone data.  Turn it
1751              on  when  you  want  unbound to provide recursion for downstream
1752              clients, and use the zone data as  a  local  copy  to  speed  up
1753              lookups.
1754
1755       zonefile: <filename>
1756              The  filename  where  the  zone is stored.  If not given then no
1757              zonefile is used.  If the file  does  not  exist  or  is  empty,
1758              unbound  will  attempt  to  fetch zone data (eg. from the master
1759              servers).
1760
1761   View Options
1762       There may be multiple view: clauses. Each with a name: and zero or more
1763       local-zone  and  local-data elements. View can be mapped to requests by
1764       specifying the view name in  an  access-control-view  element.  Options
1765       from  matching  views will override global options. Global options will
1766       be used if no matching view is found, or when the  matching  view  does
1767       not have the option specified.
1768
1769       name: <view name>
1770              Name  of  the  view.  Must  be  unique.  This  name  is  used in
1771              access-control-view elements.
1772
1773       local-zone: <zone> <type>
1774              View specific local-zone elements. Has the same types and behav‐
1775              iour  as  the global local-zone elements. When there is at least
1776              one local-zone specified  and  view-first  is  no,  the  default
1777              local-zones  will  be  added to this view.  Defaults can be dis‐
1778              abled using the nodefault type. When view-first is yes or when a
1779              view  does  not have a local-zone, the global local-zone will be
1780              used including it's default zones.
1781
1782       local-data: "<resource record string>"
1783              View specific local-data elements. Has the same behaviour as the
1784              global local-data elements.
1785
1786       local-data-ptr: "IPaddr name"
1787              View specific local-data-ptr elements. Has the same behaviour as
1788              the global local-data-ptr elements.
1789
1790       view-first: <yes or no>
1791              If enabled,  it  attempts  to  use  the  global  local-zone  and
1792              local-data  if  there  is no match in the view specific options.
1793              The default is no.
1794
1795   Python Module Options
1796       The python: clause gives the settings for the python(1) script  module.
1797       This module acts like the iterator and validator modules do, on queries
1798       and answers.  To enable the script module it has to  be  compiled  into
1799       the  daemon,  and the word "python" has to be put in the module-config:
1800       option (usually first, or between the validator and iterator).
1801
1802       If the chroot: option is enabled, you should make sure Python's library
1803       directory  structure  is  bind mounted in the new root environment, see
1804       mount(8).  Also the python-script: path should be specified as an abso‐
1805       lute  path relative to the new root, or as a relative path to the work‐
1806       ing directory.
1807
1808       python-script: <python file>
1809              The script file to load.
1810
1811   DNS64 Module Options
1812       The dns64 module must be configured in the module-config:  "dns64  val‐
1813       idator  iterator"  directive  and  be  compiled  into  the daemon to be
1814       enabled.  These settings go in the server: section.
1815
1816       dns64-prefix: <IPv6 prefix>
1817              This sets the DNS64 prefix to use  to  synthesize  AAAA  records
1818              with.   It  must  be  /96  or  shorter.   The  default prefix is
1819              64:ff9b::/96.
1820
1821       dns64-synthall: <yes or no>
1822              Debug option, default  no.   If  enabled,  synthesize  all  AAAA
1823              records despite the presence of actual AAAA records.
1824
1825       dns64-ignore-aaaa: <name>
1826              List  domain  for  which  the AAAA records are ignored and the A
1827              record is used by dns64 processing instead.  Can be entered mul‐
1828              tiple  times,  list  a  new domain for which it applies, one per
1829              line.  Applies also to names underneath the name given.
1830
1831   DNSCrypt Options
1832       The dnscrypt: clause gives the settings of the dnscrypt channel.  While
1833       those  options  are  available, they are only meaningful if unbound was
1834       compiled with --enable-dnscrypt.  Currently certificate and secret/pub‐
1835       lic  keys cannot be generated by unbound.  You can use dnscrypt-wrapper
1836       to generate those:  https://github.com/cofyc/dnscrypt-wrapper/blob/mas
1837       ter/README.md#usage
1838
1839       dnscrypt-enable: <yes or no>
1840              Whether  or  not  the dnscrypt config should be enabled. You may
1841              define configuration but not activate it.  The default is no.
1842
1843       dnscrypt-port: <port number>
1844              On which port should dnscrypt should be activated. Note that you
1845              should  have  a  matching interface option defined in the server
1846              section for this port.
1847
1848       dnscrypt-provider: <provider name>
1849              The provider name to use to distribute certificates. This is  of
1850              the form: 2.dnscrypt-cert.example.com.. The name MUST end with a
1851              dot.
1852
1853       dnscrypt-secret-key: <path to secret key file>
1854              Path to the time limited secret key file.  This  option  may  be
1855              specified multiple times.
1856
1857       dnscrypt-provider-cert: <path to cert file>
1858              Path  to  the  certificate  related to the dnscrypt-secret-keys.
1859              This option may be specified multiple times.
1860
1861       dnscrypt-provider-cert-rotated: <path to cert file>
1862              Path to a certificate that we should be able to  serve  existing
1863              connection   from   but   do   not   want   to   advertise  over
1864              dnscrypt-provider's TXT record certs  distribution.   A  typical
1865              use  case  is  when  rotating certificates, existing clients may
1866              still use the client magic from the old cert  in  their  queries
1867              until  they  fetch  and  update the new cert. Likewise, it would
1868              allow one to prime the new cert/key without distributing the new
1869              cert  yet,  this  can  be useful when using a network of servers
1870              using anycast and on which the configuration may not get updated
1871              at  the  exact  same  time. By priming the cert, the servers can
1872              handle both old and new certs traffic  while  distributing  only
1873              one.  This option may be specified multiple times.
1874
1875       dnscrypt-shared-secret-cache-size: <memory size>
1876              Give  the  size of the data structure in which the shared secret
1877              keys are kept  in.   Default  4m.   In  bytes  or  use  m(mega),
1878              k(kilo),  g(giga).   The shared secret cache is used when a same
1879              client is making multiple queries using the same public key.  It
1880              saves a substantial amount of CPU.
1881
1882       dnscrypt-shared-secret-cache-slabs: <number>
1883              Give  power  of  2  number of slabs, this is used to reduce lock
1884              contention in the dnscrypt shared secrets cache.  Close  to  the
1885              number of cpus is a fairly good setting.
1886
1887       dnscrypt-nonce-cache-size: <memory size>
1888              Give  the  size of the data structure in which the client nonces
1889              are kept in.  Default 4m. In  bytes  or  use  m(mega),  k(kilo),
1890              g(giga).   The  nonce  cache is used to prevent dnscrypt message
1891              replaying. Client nonce should be unique for any pair of  client
1892              pk/server sk.
1893
1894       dnscrypt-nonce-cache-slabs: <number>
1895              Give  power  of  2  number of slabs, this is used to reduce lock
1896              contention in the dnscrypt nonce cache.  Close to the number  of
1897              cpus is a fairly good setting.
1898
1899   EDNS Client Subnet Module Options
1900       The  ECS  module  must be configured in the module-config: "subnetcache
1901       validator iterator" directive and be compiled into  the  daemon  to  be
1902       enabled.  These settings go in the server: section.
1903
1904       If  the  destination  address  is whitelisted with Unbound will add the
1905       EDNS0 option to the query containing the relevant part of the  client's
1906       address.  When  an  answer contains the ECS option the response and the
1907       option are placed in a specialized cache. If the authority indicated no
1908       support, the response is stored in the regular cache.
1909
1910       Additionally, when a client includes the option in its queries, Unbound
1911       will forward the option to the authority if present in  the  whitelist,
1912       or  client-subnet-always-forward is set to yes. In this case the lookup
1913       in the regular cache is skipped.
1914
1915       The maximum size of the ECS cache is controlled by 'msg-cache-size'  in
1916       the configuration file. On top of that, for each query only 100 differ‐
1917       ent subnets are allowed to be stored for each address family. Exceeding
1918       that number, older entries will be purged from cache.
1919
1920       send-client-subnet: <IP address>
1921              Send  client  source  address  to this authority. Append /num to
1922              indicate a  classless  delegation  netblock,  for  example  like
1923              10.2.3.4/24 or 2001::11/64. Can be given multiple times. Author‐
1924              ities not  listed  will  not  receive  edns-subnet  information,
1925              unless domain in query is specified in client-subnet-zone.
1926
1927       client-subnet-zone: <domain>
1928              Send  client  source  address in queries for this domain and its
1929              subdomains. Can be given multiple times. Zones not  listed  will
1930              not  receive edns-subnet information, unless hosted by authority
1931              specified in send-client-subnet.
1932
1933       client-subnet-always-forward: <yes or no>
1934              Specify  whether  the  ECS  whitelist  check  (configured  using
1935              send-client-subnet)  is  applied  for  all  queries, even if the
1936              triggering query contains an ECS record, or only for queries for
1937              which the ECS record is generated using the querier address (and
1938              therefore did not contain ECS data  in  the  client  query).  If
1939              enabled,  the  whitelist  check is skipped when the client query
1940              contains an ECS record. Default is no.
1941
1942       max-client-subnet-ipv6: <number>
1943              Specifies the maximum prefix length of the client source address
1944              we are willing to expose to third parties for IPv6.  Defaults to
1945              56.
1946
1947       max-client-subnet-ipv4: <number>
1948              Specifies the maximum prefix length of the client source address
1949              we  are willing to expose to third parties for IPv4. Defaults to
1950              24.
1951
1952       min-client-subnet-ipv6: <number>
1953              Specifies the minimum prefix length of the IPv6 source  mask  we
1954              are willing to accept in queries. Shorter source masks result in
1955              REFUSED answers. Source mask of 0 is always accepted. Default is
1956              0.
1957
1958       min-client-subnet-ipv4: <number>
1959              Specifies  the  minimum prefix length of the IPv4 source mask we
1960              are willing to accept in queries. Shorter source masks result in
1961              REFUSED answers. Source mask of 0 is always accepted. Default is
1962              0.
1963
1964       max-ecs-tree-size-ipv4: <number>
1965              Specifies the maximum number of subnets ECS answers kept in  the
1966              ECS radix tree.  This number applies for each qname/qclass/qtype
1967              tuple. Defaults to 100.
1968
1969       max-ecs-tree-size-ipv6: <number>
1970              Specifies the maximum number of subnets ECS answers kept in  the
1971              ECS radix tree.  This number applies for each qname/qclass/qtype
1972              tuple. Defaults to 100.
1973
1974   Opportunistic IPsec Support Module Options
1975       The IPsec module must be configured  in  the  module-config:  "ipsecmod
1976       validator  iterator"  directive  and  be compiled into the daemon to be
1977       enabled.  These settings go in the server: section.
1978
1979       When unbound receives an A/AAAA query that is  not  in  the  cache  and
1980       finds a valid answer, it will withhold returning the answer and instead
1981       will generate an IPSECKEY subquery for the same  domain  name.   If  an
1982       answer  was  found, unbound will call an external hook passing the fol‐
1983       lowing arguments:
1984
1985            QNAME
1986                 Domain name of the A/AAAA and IPSECKEY query.  In string for‐
1987                 mat.
1988
1989            IPSECKEY TTL
1990                 TTL of the IPSECKEY RRset.
1991
1992            A/AAAA
1993                 String  of space separated IP addresses present in the A/AAAA
1994                 RRset.  The IP addresses are in string format.
1995
1996            IPSECKEY
1997                 String of space  separated  IPSECKEY  RDATA  present  in  the
1998                 IPSECKEY  RRset.   The IPSECKEY RDATA are in DNS presentation
1999                 format.
2000
2001       The A/AAAA answer is then cached and returned to the  client.   If  the
2002       external  hook  was called the TTL changes to ensure it doesn't surpass
2003       ipsecmod-max-ttl.
2004
2005       The same procedure is also followed when prefetch:  is  used,  but  the
2006       A/AAAA answer is given to the client before the hook is called.  ipsec‐
2007       mod-max-ttl ensures that the A/AAAA answer given from  cache  is  still
2008       relevant for opportunistic IPsec.
2009
2010       ipsecmod-enabled: <yes or no>
2011              Specifies whether the IPsec module is enabled or not.  The IPsec
2012              module still needs to be defined in  the  module-config:  direc‐
2013              tive.  This option facilitates turning on/off the module without
2014              restarting/reloading unbound.  Defaults to yes.
2015
2016       ipsecmod-hook: <filename>
2017              Specifies the external hook that unbound  will  call  with  sys‐
2018              tem(3).  The file can be specified as an absolute/relative path.
2019              The file needs the proper permissions to be able to be  executed
2020              by the same user that runs unbound.  It must be present when the
2021              IPsec module is defined in the module-config: directive.
2022
2023       ipsecmod-strict: <yes or no>
2024              If enabled unbound requires the external hook to return  a  suc‐
2025              cess value of 0.  Failing to do so unbound will reply with SERV‐
2026              FAIL.  The A/AAAA answer will also not be cached.   Defaults  to
2027              no.
2028
2029       ipsecmod-max-ttl: <seconds>
2030              Time to live maximum for A/AAAA cached records after calling the
2031              external hook.  Defaults to 3600.
2032
2033       ipsecmod-ignore-bogus: <yes or no>
2034              Specifies the behaviour of unbound when the IPSECKEY  answer  is
2035              bogus.   If  set  to yes, the hook will be called and the A/AAAA
2036              answer will be returned to the client.  If set to no,  the  hook
2037              will  not  be  called and the answer to the A/AAAA query will be
2038              SERVFAIL.  Mainly used for testing.  Defaults to no.
2039
2040       ipsecmod-whitelist: <domain>
2041              Whitelist the domain so that the module logic will be  executed.
2042              Can  be  given  multiple  times,  for different domains.  If the
2043              option is not  specified,  all  domains  are  treated  as  being
2044              whitelisted (default).
2045
2046   Cache DB Module Options
2047       The Cache DB module must be configured in the module-config: "validator
2048       cachedb iterator" directive  and  be  compiled  into  the  daemon  with
2049       --enable-cachedb.  If this module is enabled and configured, the speci‐
2050       fied backend database works as a second level cache: When Unbound  can‐
2051       not  find an answer to a query in its built-in in-memory cache, it con‐
2052       sults the specified backend.  If it finds a valid answer in  the  back‐
2053       end,  Unbound uses it to respond to the query without performing itera‐
2054       tive DNS resolution.  If Unbound cannot even  find  an  answer  in  the
2055       backend,  it  resolves the query as usual, and stores the answer in the
2056       backend.
2057
2058       If Unbound was built  with  --with-libhiredis  on  a  system  that  has
2059       installed the hiredis C client library of Redis, then the "redis" back‐
2060       end can be used.  This backend communicates with  the  specified  Redis
2061       server  over a TCP connection to store and retrieve cache data.  It can
2062       be used as a persistent and/or shared  cache  backend.   It  should  be
2063       noted  that Unbound never removes data stored in the Redis server, even
2064       if some data have expired in terms of DNS TTL or the Redis  server  has
2065       cached  too much data; if necessary the Redis server must be configured
2066       to limit the cache size, preferably with some kind  of  least-recently-
2067       used eviction policy.  This backend uses synchronous communication with
2068       the Redis server based on the assumption that the communication is sta‐
2069       ble  and sufficiently fast.  The thread waiting for a response from the
2070       Redis server cannot handle other DNS queries.  Although the backend has
2071       the  ability  to  reconnect to the server when the connection is closed
2072       unexpectedly and there is a configurable timeout in case the server  is
2073       overly  slow  or hangs up, these cases are assumed to be very rare.  If
2074       connection close or timeout happens too often, Unbound will  be  effec‐
2075       tively  unusable with this backend.  It's the administrator's responsi‐
2076       bility to make the assumption hold.
2077
2078       The cachedb: clause gives custom settings of the cache DB module.
2079
2080       backend: <backend name>
2081              Specify the backend database name.  The default database is  the
2082              in-memory  backend  named  "testframe",  which, as the name sug‐
2083              gests, is not of any practical use.  Depending on the build-time
2084              configuration,  "redis"  backend  may  also be used as described
2085              above.
2086
2087       secret-seed: <"secret string">
2088              Specify a seed to calculate a hash value from query information.
2089              This  value  will be used as the key of the corresponding answer
2090              for the backend database and  can  be  customized  if  the  hash
2091              should  not  be predictable operationally.  If the backend data‐
2092              base is shared by multiple Unbound instances, all instances must
2093              use the same secret seed.  This option defaults to "default".
2094
2095       The following cachedb otions are specific to the redis backend.
2096
2097       redis-server-host: <server address or name>
2098              The  IP  (either  v6  or v4) address or domain name of the Redis
2099              server.  In general an IP address should be specified as  other‐
2100              wise  Unbound  will have to resolve the name of the server every
2101              time it establishes a connection to  the  server.   This  option
2102              defaults to "127.0.0.1".
2103
2104       redis-server-port: <port number>
2105              The  TCP  port number of the Redis server.  This option defaults
2106              to 6379.
2107
2108       redis-timeout: <msec>
2109              The period until when Unbound waits  for  a  response  from  the
2110              Redis sever.  If this timeout expires Unbound closes the connec‐
2111              tion, treats it as  if  the  Redis  server  does  not  have  the
2112              requested  data,  and  will try to re-establish a new connection
2113              later.  This option defaults to 100 milliseconds.
2114

MEMORY CONTROL EXAMPLE

2116       In the example config settings below memory usage is reduced. Some ser‐
2117       vice  levels are lower, notable very large data and a high TCP load are
2118       no longer supported. Very large data and high TCP loads are exceptional
2119       for the DNS.  DNSSEC validation is enabled, just add trust anchors.  If
2120       you do not have to worry about programs using more than 3 Mb of memory,
2121       the below example is not for you. Use the defaults to receive full ser‐
2122       vice, which on BSD-32bit tops out at 30-40 Mb after heavy usage.
2123
2124       # example settings that reduce memory usage
2125       server:
2126            num-threads: 1
2127            outgoing-num-tcp: 1 # this limits TCP service, uses less buffers.
2128            incoming-num-tcp: 1
2129            outgoing-range: 60  # uses less memory, but less performance.
2130            msg-buffer-size: 8192   # note this limits service, 'no huge stuff'.
2131            msg-cache-size: 100k
2132            msg-cache-slabs: 1
2133            rrset-cache-size: 100k
2134            rrset-cache-slabs: 1
2135            infra-cache-numhosts: 200
2136            infra-cache-slabs: 1
2137            key-cache-size: 100k
2138            key-cache-slabs: 1
2139            neg-cache-size: 10k
2140            num-queries-per-thread: 30
2141            target-fetch-policy: "2 1 0 0 0 0"
2142            harden-large-queries: "yes"
2143            harden-short-bufsize: "yes"
2144

FILES

2146       /etc/unbound
2147              default unbound working directory.
2148
2149       /etc/unbound
2150              default chroot(2) location.
2151
2152       /etc/unbound/unbound.conf
2153              unbound configuration file.
2154
2155       /var/run/unbound/unbound.pid
2156              default unbound pidfile with process ID of the running daemon.
2157
2158       unbound.log
2159              unbound log file. default is to log to syslog(3).
2160

SEE ALSO

2162       unbound(8), unbound-checkconf(8).
2163

AUTHORS

2165       Unbound was written by NLnet Labs. Please see CREDITS file in the  dis‐
2166       tribution for further details.
2167
2168
2169
2170NLnet Labs                       Dec 11, 2018                  unbound.conf(5)
Impressum