1unbound.conf(5)                 unbound 1.10.0                 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/urandom /etc/unbound/dev/urandom
42            # and  mount --bind -n /dev/log /etc/unbound/dev/log
43            chroot: "/etc/unbound"
44            # logfile: "/etc/unbound/unbound.log"  #uncomment to use logfile.
45            pidfile: "/etc/unbound/unbound.pid"
46            # verbosity: 1      # uncomment and increase to get more logging.
47            # listen on all interfaces, answer queries from the local subnet.
48            interface: 0.0.0.0
49            interface: ::0
50            access-control: 10.0.0.0/8 allow
51            access-control: 2001:DB8::/64 allow
52

FILE FORMAT

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

MEMORY CONTROL EXAMPLE

2290       In the example config settings below memory usage is reduced. Some ser‐
2291       vice levels are lower, notable very large data and a high TCP load  are
2292       no longer supported. Very large data and high TCP loads are exceptional
2293       for the DNS.  DNSSEC validation is enabled, just add trust anchors.  If
2294       you do not have to worry about programs using more than 3 Mb of memory,
2295       the below example is not for you. Use the defaults to receive full ser‐
2296       vice, which on BSD-32bit tops out at 30-40 Mb after heavy usage.
2297
2298       # example settings that reduce memory usage
2299       server:
2300            num-threads: 1
2301            outgoing-num-tcp: 1 # this limits TCP service, uses less buffers.
2302            incoming-num-tcp: 1
2303            outgoing-range: 60  # uses less memory, but less performance.
2304            msg-buffer-size: 8192   # note this limits service, 'no huge stuff'.
2305            msg-cache-size: 100k
2306            msg-cache-slabs: 1
2307            rrset-cache-size: 100k
2308            rrset-cache-slabs: 1
2309            infra-cache-numhosts: 200
2310            infra-cache-slabs: 1
2311            key-cache-size: 100k
2312            key-cache-slabs: 1
2313            neg-cache-size: 10k
2314            num-queries-per-thread: 30
2315            target-fetch-policy: "2 1 0 0 0 0"
2316            harden-large-queries: "yes"
2317            harden-short-bufsize: "yes"
2318

FILES

2320       /etc/unbound
2321              default unbound working directory.
2322
2323       /etc/unbound
2324              default chroot(2) location.
2325
2326       /etc/unbound/unbound.conf
2327              unbound configuration file.
2328
2329       /run/unbound/unbound.pid
2330              default unbound pidfile with process ID of the running daemon.
2331
2332       unbound.log
2333              unbound log file. default is to log to syslog(3).
2334

SEE ALSO

2336       unbound(8), unbound-checkconf(8).
2337

AUTHORS

2339       Unbound  was written by NLnet Labs. Please see CREDITS file in the dis‐
2340       tribution for further details.
2341
2342
2343
2344NLnet Labs                       Feb 20, 2020                  unbound.conf(5)
Impressum