]> git.ipfire.org Git - thirdparty/pdns.git/blob - pdns/recursordist/docs/settings.rst
Update pdns/recursordist/docs/settings.rst
[thirdparty/pdns.git] / pdns / recursordist / docs / settings.rst
1 PowerDNS Recursor Settings
2 ==========================
3 Each setting can appear on the command line, prefixed by '--', or in the configuration file.
4 The command line overrides the configuration file.
5
6 **Note**: Settings marked as 'Boolean' can either be set to an empty value, which means on, or to 'no' or 'off' which means off.
7 Anything else means on.
8
9 As an example:
10
11 - ``serve-rfc1918`` on its own means: do serve those zones.
12 - ``serve-rfc1918=off`` or ``serve-rfc1918=no`` means: do not serve those zones.
13 - Anything else means: do serve those zones.
14
15 .. _setting-allow-from:
16
17 ``allow-from``
18 --------------
19 - IP ranges, separated by commas
20 - Default: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
21
22 Netmasks (both IPv4 and IPv6) that are allowed to use the server.
23 The default allows access only from :rfc:`1918` private IP addresses.
24 Due to the aggressive nature of the internet these days, it is highly recommended to not open up the recursor for the entire internet.
25 Questions from IP addresses not listed here are ignored and do not get an answer.
26
27 .. _setting-allow-from-file:
28
29 ``allow-from-file``
30 -------------------
31 - Path
32
33 Like `allow-from`_, except reading from file.
34 Overrides the `allow-from`_ setting. To use this feature, supply one netmask per line, with optional comments preceded by a "#".
35
36 .. _setting-any-to-tcp:
37
38 ``any-to-tcp``
39 --------------
40 - Boolean
41 - Default: no
42
43 Answer questions for the ANY type on UDP with a truncated packet that refers the remote server to TCP.
44 Useful for mitigating ANY reflection attacks.
45
46 .. _setting-api-config-dir:
47
48 ``api-config-dir``
49 ------------------
50 .. versionadded:: 4.0.0
51
52 - Path
53 - Default: unset
54
55 Directory where the REST API stores its configuration and zones.
56
57 .. _setting-api-key:
58
59 ``api-key``
60 -----------
61 .. versionadded:: 4.0.0
62
63 - String
64 - Default: unset
65
66 Static pre-shared authentication key for access to the REST API.
67
68 .. _setting-api-readonly:
69
70 ``api-readonly``
71 ----------------
72 .. versionchanged:: 4.2.0
73 This setting has been removed.
74
75 - Boolean
76 - Default: no
77
78 Disallow data modification through the REST API when set.
79
80 .. _setting-api-logfile:
81
82 ``api-logfile``
83 ---------------
84 .. versionchanged:: 4.2.0
85 This setting has been removed.
86
87 - Path
88 - Default: unset
89
90 Location of the server logfile (used by the REST API).
91
92 .. _setting-auth-can-lower-ttl:
93
94 ``auth-can-lower-ttl``
95 ----------------------
96 - Boolean
97 - Default: no
98
99 Authoritative zones can transmit a TTL value that is lower than that specified in the parent zone.
100 This is called a 'delegation inconsistency'.
101 To follow :rfc:`RFC 2181 section 5.2<2181#section-5.2>` and :rfc:`5.4 <2181#section-5.4>` to the letter, enable this feature.
102 This will mean a slight deterioration of performance, and it will not solve any problems, but does make the recursor more standards compliant.
103 Not recommended unless you have to tick an 'RFC 2181 compliant' box.
104
105 .. _setting-auth-zones:
106
107 ``auth-zones``
108 --------------
109 - Comma separated list of 'zonename=filename' pairs
110
111 Zones read from these files (in BIND format) are served authoritatively.
112 DNSSEC is not supported. Example:
113
114 .. code-block:: none
115
116 auth-zones=example.org=/var/zones/example.org, powerdns.com=/var/zones/powerdns.com
117
118 .. _setting-carbon-interval:
119
120 ``carbon-interval``
121 -------------------
122 - Integer
123 - Default: 30
124
125 If sending carbon updates, this is the interval between them in seconds.
126 See :doc:`metrics`.
127
128 .. _setting-carbon-namespace:
129
130 ``carbon-namespace``
131 --------------------
132 .. versionadded:: 4.2.0
133
134 - String
135
136 Change the namespace or first string of the metric key. The default is pdns.
137
138 .. _setting-carbon-ourname:
139
140 ``carbon-ourname``
141 ------------------
142 - String
143
144 If sending carbon updates, if set, this will override our hostname.
145 Be careful not to include any dots in this setting, unless you know what you are doing.
146 See :ref:`metricscarbon`.
147
148 .. _setting-carbon-instance:
149
150 ``carbon-instance``
151 --------------------
152 .. versionadded:: 4.2.0
153
154 - String
155
156 Change the instance or third string of the metric key. The default is recursor.
157
158 .. _setting-carbon-server:
159
160 ``carbon-server``
161 -----------------
162 - IP address
163
164 If set to an IP or IPv6 address, will send all available metrics to this server via the carbon protocol, which is used by graphite and metronome. Moreover you can specify more than one server using a comma delimited list, ex: carbon-server=10.10.10.10,10.10.10.20.
165 You may specify an alternate port by appending :port, for example: ``127.0.0.1:2004``.
166 See :doc:`metrics`.
167
168 .. _setting-chroot:
169
170 ``chroot``
171 ----------
172 - Path to a Directory
173
174 If set, chroot to this directory for more security.
175 See :doc:`security`
176
177 Make sure that ``/dev/log`` is available from within the chroot.
178 Logging will silently fail over time otherwise (on logrotate).
179
180 When using ``chroot``, all other paths (except for `config-dir`_) set in the configuration are relative to the new root.
181
182 When using ``chroot`` and the API (`webserver`_), `api-readonly`_ **must** be set and `api-config-dir`_ unset.
183
184 When running on a system where systemd manages services, ``chroot`` does not work out of the box, as PowerDNS cannot use the ``NOTIFY_SOCKET``.
185 Either do not ``chroot`` on these systems or set the 'Type' of this service to 'simple' instead of 'notify' (refer to the systemd documentation on how to modify unit-files).
186
187 .. _setting-client-tcp-timeout:
188
189 ``client-tcp-timeout``
190 ----------------------
191 - Integer
192 - Default: 2
193
194 Time to wait for data from TCP clients.
195
196 .. _setting-config-dir:
197
198 ``config-dir``
199 --------------
200 - Path
201
202 Location of configuration directory (``recursor.conf``).
203 Usually ``/etc/powerdns``, but this depends on ``SYSCONFDIR`` during compile-time.
204
205 .. _setting-config-name:
206
207 ``config-name``
208 ---------------
209 - String
210 - Default: unset
211
212 When running multiple recursors on the same server, read settings from :file:`recursor-{name}.conf`, this will also rename the binary image.
213
214 .. _setting-cpu-map:
215
216 ``cpu-map``
217 -----------
218 .. versionadded:: 4.1.0
219
220 - String
221 - Default: unset
222
223 Set CPU affinity for worker threads, asking the scheduler to run those threads on a single CPU, or a set of CPUs.
224 This parameter accepts a space separated list of thread-id=cpu-id, or thread-id=cpu-id-1,cpu-id-2,...,cpu-id-N.
225 For example, to make the worker thread 0 run on CPU id 0 and the worker thread 1 on CPUs 1 and 2::
226
227 cpu-map=0=0 1=1,2
228
229 The number of worker threads is determined by the :ref:`setting-threads` setting.
230 If :ref:`setting-pdns-distributes-queries` is set, an additional thread is started, assigned the id 0,
231 and is the only one listening on client sockets and accepting queries, distributing them to the other worker threads afterwards.
232
233 Starting with version 4.2.0, the thread handling the control channel, the webserver and other internal stuff has been assigned
234 id 0 and more than one distributor thread can be started using the :ref:`setting-distributor-threads` setting, so the distributor
235 threads if any are assigned id 1 and counting, and the other threads follow behind.
236
237 This parameter is only available on OS that provides the `pthread_setaffinity_np()` function.
238
239 .. _setting-daemon:
240
241 ``daemon``
242 ----------
243 - Boolean
244 - Default: no
245
246 .. versionchanged:: 4.0.0
247
248 Default is now "no", was "yes" before.
249
250 Operate in the background.
251
252 .. _setting-delegation-only:
253
254 ``delegation-only``
255 -------------------
256 - Domains, comma separated
257
258 Which domains we only accept delegations from (a Verisign special).
259
260 .. _setting-dont-throttle-names:
261
262 ``dont-throttle-names``
263 ----------------------------
264 .. versionadded:: 4.2.0
265
266 - Comma separated list of domain-names
267 - Default: (empty)
268
269 When an authoritative server does not answer a query or sends a reply the recursor does not like, it is throttled.
270 Any servers' name suffix-matching the supplied names will never be throttled.
271
272 .. warning::
273 Most servers on the internet do not respond for a good reason (overloaded or unreachable), ``dont-throttle-names`` could make this load on the upstream server even higher, resulting in further service degredation.
274
275 .. _setting-dont-throttle-netmasks:
276
277 ``dont-throttle-netmasks``
278 ----------------------------
279 .. versionadded:: 4.2.0
280
281 - Comma separated list of netmasks
282 - Default: (empty)
283
284 When an authotitative server does not answer a query or sends a reply the recursor does lot like, it is throttled.
285 Any servers matching the supplied netmasks will never be throttled.
286
287 This can come in handy on lossy networks when forwarding, where the same server is configured multiple times (e.g. with ``forward-zones-recurse=example.com=192.0.2.1;192.0.2.1``).
288 By default, the PowerDNS Recursor would throttle the "first" server on a timeout and hence not retry the "second" one.
289 In this case, ``dont-throttle-netmasks`` could be set to ``192.0.2.1``.
290
291 .. warning::
292 Most servers on the internet do not respond for a good reason (overloaded or unreachable), ``dont-throttle-netmasks`` could make this load on the upstream server even higher, resulting in further service degredation.
293
294 .. _setting-disable-packetcache:
295
296 ``disable-packetcache``
297 -----------------------
298 - Boolean
299 - Default: no
300
301 Turn off the packet cache. Useful when running with Lua scripts that can
302 not be cached.
303
304 .. _setting-disable-syslog:
305
306 ``disable-syslog``
307 ------------------
308 - Boolean
309 - Default: no
310
311 Do not log to syslog, only to stdout.
312 Use this setting when running inside a supervisor that handles logging (like systemd).
313 **Note**: do not use this setting in combination with `daemon`_ as all logging will disappear.
314
315 .. _setting-distribution-load-factor:
316
317 ``distribution-load-factor``
318 ----------------------------
319 .. versionadded:: 4.1.12
320
321 - Double
322 - Default: 0.0
323
324 If `pdns-distributes-queries`_ is set and this setting is set to another value
325 than 0, the distributor thread will use a bounded load-balancing algorithm while
326 distributing queries to worker threads, making sure that no thread is assigned
327 more queries than distribution-load-factor times the average number of queries
328 currently processed by all the workers.
329 For example, with a value of 1.25, no server should get more than 125 % of the
330 average load. This helps making sure that all the workers have roughly the same
331 share of queries, even if the incoming traffic is very skewed, with a larger
332 number of requests asking for the same qname.
333
334 .. _setting-distributor-threads:
335
336 ``distributor-threads``
337 -----------------------
338 .. versionadded:: 4.2.0
339
340 - Integer
341 - Default: 1 if `pdns-distributes-queries`_ is set, 0 otherwise
342
343 If `pdns-distributes-queries`_ is set, spawn this number of distributor threads on startup. Distributor threads
344 handle incoming queries and distribute them to other threads based on a hash of the query, to maximize the cache hit
345 ratio.
346
347 .. _setting-dnssec:
348
349 ``dnssec``
350 ----------
351 .. versionadded:: 4.0.0
352
353 - One of ``off``, ``process-no-validate``, ``process``, ``log-fail``, ``validate``, String
354 - Default: ``process-no-validate``
355
356 Set the mode for DNSSEC processing:
357
358 off
359 ^^^
360 No DNSSEC processing whatsoever.
361 Ignore DO-bits in queries, don't request any DNSSEC information from authoritative servers.
362 This behaviour is similar to PowerDNS Recursor pre-4.0.
363
364 process-no-validate
365 ^^^^^^^^^^^^^^^^^^^
366 Respond with DNSSEC records to clients that ask for it, set the DO bit on all outgoing queries.
367 Don't do any validation.
368
369 process
370 ^^^^^^^
371 Respond with DNSSEC records to clients that ask for it, set the DO bit on all outgoing queries.
372 Do validation for clients that request it (by means of the AD- bit or DO-bit in the query).
373
374 log-fail
375 ^^^^^^^^
376 Similar behaviour to ``process``, but validate RRSIGs on responses and log bogus responses.
377
378 validate
379 ^^^^^^^^
380 Full blown DNSSEC validation. Send SERVFAIL to clients on bogus responses.
381
382 .. _setting-dnssec-log-bogus:
383
384 ``dnssec-log-bogus``
385 --------------------
386 - Boolean
387 - Default: no
388
389 Log every DNSSEC validation failure.
390 **Note**: This is not logged per-query but every time records are validated as Bogus.
391
392 .. _setting-dont-query:
393
394 ``dont-query``
395 --------------
396 - Netmasks, comma separated
397 - Default: 127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10, 0.0.0.0/8, 192.0.0.0/24, 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, 240.0.0.0/4, ::/96, ::ffff:0:0/96, 100::/64, 2001:db8::/32
398
399 The DNS is a public database, but sometimes contains delegations to private IP addresses, like for example 127.0.0.1.
400 This can have odd effects, depending on your network, and may even be a security risk.
401 Therefore, the PowerDNS Recursor by default does not query private space IP addresses.
402 This setting can be used to expand or reduce the limitations.
403
404 Queries to addresses for zones as configured in any of the settings `forward-zones`_, `forward-zones-file`_ or `forward-zones-recurse`_ are performed regardless of these limitations.
405
406 .. _setting-ecs-add-for:
407
408 ``ecs-add-for``
409 ---------------
410 .. versionadded:: 4.2.0
411
412 - Comma separated list of netmasks
413 - Default: 0.0.0.0/0, ::, !127.0.0.0/8, !10.0.0.0/8, !100.64.0.0/10, !169.254.0.0/16, !192.168.0.0/16, !172.16.0.0/12, !::1/128, !fc00::/7, !fe80::/10
414
415 List of requestor netmasks for which the requestor IP Address should be used as the :rfc:`EDNS Client Subnet <7871>` for outgoing queries. Outgoing queries for requestors that do not match this list will use the `ecs-scope-zero-address`_ instead.
416 Valid incoming ECS values from `use-incoming-edns-subnet`_ are not replaced.
417
418 Regardless of the value of this setting, ECS values are only sent for outgoing queries matching the conditions in the `edns-subnet-whitelist`_ setting. This setting only controls the actual value being sent.
419
420 This defaults to not using the requestor address inside RFC1918 and similar "private" IP address spaces.
421
422 .. _setting-ecs-ipv4-bits:
423
424 ``ecs-ipv4-bits``
425 -----------------
426 .. versionadded:: 4.1.0
427
428 - Integer
429 - Default: 24
430
431 Number of bits of client IPv4 address to pass when sending EDNS Client Subnet address information.
432
433 .. _setting-ecs-ipv4-cache-bits:
434
435 ``ecs-ipv4-cache-bits``
436 -----------------
437 .. versionadded:: 4.1.12
438
439 - Integer
440 - Default: 24
441
442 Maximum number of bits of client IPv4 address used by the authoritative server (as indicated by the EDNS Client Subnet scope in the answer) for an answer to be inserted into the query cache. This condition applies in conjunction with ``ecs-cache-limit-ttl``.
443 That is, only if both the limits apply, the record will not be cached.
444
445 .. _setting-ecs-ipv6-bits:
446
447 ``ecs-ipv6-bits``
448 -----------------
449 .. versionadded:: 4.1.0
450
451 - Integer
452 - Default: 56
453
454 Number of bits of client IPv6 address to pass when sending EDNS Client Subnet address information.
455
456 .. _setting-ecs-ipv6-cache-bits:
457
458 ``ecs-ipv6-cache-bits``
459 -----------------
460 .. versionadded:: 4.1.12
461
462 - Integer
463 - Default: 56
464
465 Maximum number of bits of client IPv6 address used by the authoritative server (as indicated by the EDNS Client Subnet scope in the answer) for an answer to be inserted into the query cache. This condition applies in conjunction with ``ecs-cache-limit-ttl``.
466 That is, only if both the limits apply, the record will not be cached.
467
468 .. _setting-ecs-minimum-ttl-override:
469
470 ``ecs-minimum-ttl-override``
471 ----------------------------
472 - Integer
473 - Default: 0 (disabled)
474
475 This setting artificially raises the TTLs of records in the ANSWER section of ECS-specific answers to be at least this long.
476 While this is a gross hack, and violates RFCs, under conditions of DoS, it may enable you to continue serving your customers.
477 Can be set at runtime using ``rec_control set-ecs-minimum-ttl 3600``.
478
479 .. _setting-ecs-cache-limit-ttl:
480
481 ``ecs-cache-limit-ttl``
482 -----------------------
483 .. versionadded:: 4.1.12
484
485 - Integer
486 - Default: 0 (disabled)
487
488 The minimum TTL for an ECS-specific answer to be inserted into the query cache. This condition applies in conjunction with ``ecs-ipv4-cache-bits`` or ``ecs-ipv6-cache-bits``.
489 That is, only if both the limits apply, the record will not be cached.
490
491 .. _setting-ecs-scope-zero-address:
492
493 ``ecs-scope-zero-address``
494 --------------------------
495 .. versionadded:: 4.1.0
496
497 - IPv4 or IPv6 Address
498 - Default: empty
499
500 The IP address sent via EDNS Client Subnet to authoritative servers listed in
501 `edns-subnet-whitelist`_ when `use-incoming-edns-subnet`_ is set and the query has
502 an ECS source prefix-length set to 0.
503 The default is to look for the first usable (not an ``any`` one) address in
504 `query-local-address`_ then `query-local-address6`_. If no suitable address is
505 found, the recursor fallbacks to sending 127.0.0.1.
506
507 .. _setting-edns-outgoing-bufsize:
508
509 ``edns-outgoing-bufsize``
510 -------------------------
511 .. versionchanged:: 4.2.0
512 Before 4.2.0, the default was 1680
513
514 - Integer
515 - Default: 1232
516
517 .. note:: Why 1232?
518
519 1232 is the largest number of payload bytes that can fit in the smallest IPv6 packet.
520 IPv6 has a minimum MTU of 1280 bytes (:rfc:`RFC 8200, section 5 <8200#section-5>`), minus 40 bytes for the IPv6 header, minus 8 bytes for the UDP header gives 1232, the maximum payload size for the DNS response.
521
522 This is the value set for the EDNS0 buffer size in outgoing packets.
523 Lower this if you experience timeouts.
524
525 .. _setting-edns-subnet-whitelist:
526
527 ``edns-subnet-whitelist``
528 -------------------------
529 - Comma separated list of domain names and netmasks
530 - Default: (none)
531
532 List of netmasks and domains that :rfc:`EDNS Client Subnet <7871>` should be enabled for in outgoing queries.
533
534 For example, an EDNS Client Subnet option containing the address of the initial requestor (but see `ecs-add-for`_) will be added to an outgoing query sent to server 192.0.2.1 for domain X if 192.0.2.1 matches one of the supplied netmasks, or if X matches one of the supplied domains.
535 The initial requestor address will be truncated to 24 bits for IPv4 (see `ecs-ipv4-bits`_) and to 56 bits for IPv6 (see `ecs-ipv6-bits`_), as recommended in the privacy section of RFC 7871.
536
537 By default, this option is empty, meaning no EDNS Client Subnet information is sent.
538
539 .. _setting-entropy-source:
540
541 ``entropy-source``
542 ------------------
543 - Path
544 - Default: /dev/urandom
545
546 PowerDNS can read entropy from a (hardware) source.
547 This is used for generating random numbers which are very hard to predict.
548 Generally on UNIX platforms, this source will be ``/dev/urandom``, which will always supply random numbers, even if entropy is lacking.
549 Change to ``/dev/random`` if PowerDNS should block waiting for enough entropy to arrive.
550
551 .. _setting-etc-hosts-file:
552
553 ``etc-hosts-file``
554 ------------------
555 - Path
556 - Default: /etc/hosts
557
558 The path to the /etc/hosts file, or equivalent.
559 This file can be used to serve data authoritatively using `export-etc-hosts`_.
560
561 .. _setting-export-etc-hosts:
562
563 ``export-etc-hosts``
564 --------------------
565 - Boolean
566 - Default: no
567
568 If set, this flag will export the host names and IP addresses mentioned in ``/etc/hosts``.
569
570 .. _setting-export-etc-hosts-search-suffix:
571
572 ``export-etc-hosts-search-suffix``
573 ----------------------------------
574 - String
575
576 If set, all hostnames in the `export-etc-hosts`_ file are loaded in canonical form, based on this suffix, unless the name contains a '.', in which case the name is unchanged.
577 So an entry called 'pc' with ``export-etc-hosts-search-suffix='home.com'`` will lead to the generation of 'pc.home.com' within the recursor.
578 An entry called 'server1.home' will be stored as 'server1.home', regardless of this setting.
579
580 .. _setting-forward-zones:
581
582 ``forward-zones``
583 -----------------
584 - 'zonename=IP' pairs, comma separated
585
586 Queries for zones listed here will be forwarded to the IP address listed. i.e.
587
588 .. code-block:: none
589
590 forward-zones=example.org=203.0.113.210, powerdns.com=2001:DB8::BEEF:5
591
592 Multiple IP addresses can be specified and port numbers other than 53 can be configured:
593
594 .. code-block:: none
595
596 forward-zones=example.org=203.0.113.210:5300;127.0.0.1, powerdns.com=127.0.0.1;198.51.100.10:530;[2001:DB8::1:3]:5300
597
598 Forwarded queries have the 'recursion desired' bit set to 0, meaning that this setting is intended to forward queries to authoritative servers.
599
600 **IMPORTANT**: When using DNSSEC validation (which is default), forwards to non-delegated (e.g. internal) zones that have a DNSSEC signed parent zone will validate as Bogus.
601 To prevent this, add a Negative Trust Anchor (NTA) for this zone in the `lua-config-file`_ with ``addNTA("your.zone", "A comment")``.
602 If this forwarded zone is signed, instead of adding NTA, add the DS record to the `lua-config-file`_.
603 See the :doc:`dnssec` information.
604
605 .. _setting-forward-zones-file:
606
607 ``forward-zones-file``
608 ----------------------
609 - Path
610
611 Same as `forward-zones`_, parsed from a file. Only 1 zone is allowed per line, specified as follows:
612
613 .. code-block:: none
614
615 example.org=203.0.113.210, 192.0.2.4:5300
616
617 Zones prefixed with a '+' are forwarded with the recursion-desired bit set, for which see `forward-zones-recurse`_.
618 Default behaviour without '+' is as with `forward-zones`_.
619
620 .. versionchanged:: 4.0.0
621
622 Comments are allowed, everything behind '#' is ignored.
623
624 The DNSSEC notes from `forward-zones`_ apply here as well.
625
626 .. _setting-forward-zones-recurse:
627
628 ``forward-zones-recurse``
629 -------------------------
630 - 'zonename=IP' pairs, comma separated
631
632 Like regular `forward-zones`_, but forwarded queries have the 'recursion desired' bit set to 1, meaning that this setting is intended to forward queries to other recursive servers.
633
634 The DNSSEC notes from `forward-zones`_ apply here as well.
635
636 .. _setting-gettag-needs-edns-options:
637
638 ``gettag-needs-edns-options``
639 -----------------------------
640 .. versionadded:: 4.1.0
641
642 - Boolean
643 - Default: no
644
645 If set, EDNS options in incoming queries are extracted and passed to the :func:`gettag` hook in the ``ednsoptions`` table.
646
647 .. _setting-hint-file:
648
649 ``hint-file``
650 -------------
651 - Path
652
653 If set, the root-hints are read from this file. If unset, default root hints are used.
654
655 .. _setting-include-dir:
656
657 ``include-dir``
658 ---------------
659 - Path
660
661 Directory to scan for additional config files. All files that end with .conf are loaded in order using ``POSIX`` as locale.
662
663 .. _setting-latency-statistic-size:
664
665 ``latency-statistic-size``
666 --------------------------
667 - Integer
668 - Default: 10000
669
670 Indication of how many queries will be averaged to get the average latency reported by the 'qa-latency' metric.
671
672 .. _setting-local-address:
673
674 ``local-address``
675 -----------------
676 - IP addresses, comma separated
677 - Default: 127.0.0.1
678
679 Local IPv4 or IPv6 addresses to bind to.
680 Addresses can also contain port numbers, for IPv4 specify like this: ``192.0.2.4:5300``, for IPv6: ``[::1]:5300``.
681
682 **Warning**: When binding to wildcard addresses, UNIX semantics mean that answers may not be sent from the address a query was received on.
683 It is highly recommended to bind to explicit addresses.
684
685 .. _setting-local-port:
686
687 ``local-port``
688 --------------
689 - Integer
690 - Default: 53
691
692 Local port to bind to.
693 If an address in `local-address`_ does not have an explicit port, this port is used.
694
695 .. _setting-log-timestamp:
696
697 ``log-timestamp``
698 -----------------
699
700 .. versionadded:: 4.1.0
701
702 - Bool
703 - Default: yes
704
705 When printing log lines to stdout, prefix them with timestamps.
706 Disable this if the process supervisor timestamps these lines already.
707
708 .. note::
709 The systemd unit file supplied with the source code already disables timestamp printing
710
711 .. _setting-non-local-bind:
712
713 ``non-local-bind``
714 ------------------
715 - Boolean
716 - Default: no
717
718 Bind to addresses even if one or more of the `local-address`_'s do not exist on this server.
719 Setting this option will enable the needed socket options to allow binding to non-local addresses.
720 This feature is intended to facilitate ip-failover setups, but it may also mask configuration issues and for this reason it is disabled by default.
721
722 .. _setting-loglevel:
723
724 ``loglevel``
725 ------------
726 - Integer between 0 and 9
727 - Default: 6
728
729 Amount of logging.
730 Higher is more, more logging may destroy performance.
731 It is recommended not to set this below 3.
732
733 .. _setting-log-common-errors:
734
735 ``log-common-errors``
736 ---------------------
737 - Boolean
738 - Default: no
739
740 Some DNS errors occur rather frequently and are no cause for alarm.
741
742 ``log-rpz-changes``
743 -------------------
744 .. versionadded:: 4.1.0
745
746 - Boolean
747 - Default: no
748
749 Log additions and removals to RPZ zones at Info (6) level instead of Debug (7).
750
751 .. _setting-logging-facility:
752
753 ``logging-facility``
754 --------------------
755 - Integer
756
757 If set to a digit, logging is performed under this LOCAL facility.
758 See :ref:`logging`.
759 Do not pass names like 'local0'!
760
761 .. _setting-lowercase-outgoing:
762
763 ``lowercase-outgoing``
764 ----------------------
765 - Boolean
766 - Default: no
767
768 Set to true to lowercase the outgoing queries.
769 When set to 'no' (the default) a query from a client using mixed case in the DNS labels (such as a user entering mixed-case names or `draft-vixie-dnsext-dns0x20-00 <http://tools.ietf.org/html/draft-vixie-dnsext-dns0x20-00>`_), PowerDNS preserves the case of the query.
770 Broken authoritative servers might give a wrong or broken answer on this encoding.
771 Setting ``lowercase-outgoing`` to 'yes' makes the PowerDNS Recursor lowercase all the labels in the query to the authoritative servers, but still return the proper case to the client requesting.
772
773 .. _setting-lua-config-file:
774
775 ``lua-config-file``
776 -------------------
777 - Filename
778
779 If set, and Lua support is compiled in, this will load an additional configuration file for newer features and more complicated setups.
780 See :doc:`lua-config/index` for the options that can be set in this file.
781
782 .. _setting-lua-dns-script:
783
784 ``lua-dns-script``
785 ------------------
786 - Path
787 - Default: unset
788
789 Path to a lua file to manipulate the Recursor's answers. See :doc:`lua-scripting/index` for more information.
790
791 .. _setting-maintenance-interval:
792
793 ``lua-maintenance-interval``
794 ----------------------------
795 .. versionadded:: 4.1.4
796
797 - Integer
798 - Default: 1
799
800
801 The interval between calls to the Lua user defined `maintenance()` function in seconds.
802 See :ref:`hooks-maintenance-callback`
803
804 .. _setting-max-cache-bogus-ttl:
805
806 ``max-cache-bogus-ttl``
807 -----------------------
808 .. versionadded:: 4.2.0
809
810 - Integer
811 - Default: 3600
812
813 Maximum number of seconds to cache an item in the DNS cache (negative or positive) if its DNSSEC validation failed, no matter what the original TTL specified, to reduce the impact of a broken domain.
814
815 .. _setting-max-cache-entries:
816
817 ``max-cache-entries``
818 ---------------------
819 - Integer
820 - Default: 1000000
821
822 Maximum number of DNS cache entries.
823 1 million per thread will generally suffice for most installations.
824
825 .. _setting-max-cache-ttl:
826
827 ``max-cache-ttl``
828 -----------------
829 - Integer
830 - Default: 86400
831
832 Maximum number of seconds to cache an item in the DNS cache, no matter what the original TTL specified.
833
834 .. versionchanged:: 4.1.0
835
836 The minimum value of this setting is 15. i.e. setting this to lower than 15 will make this value 15.
837
838 .. _setting-max-mthreads:
839
840 ``max-mthreads``
841 ----------------
842 - Integer
843 - Default: 2048
844
845 Maximum number of simultaneous MTasker threads.
846
847 .. _setting-max-packetcache-entries:
848
849 ``max-packetcache-entries``
850 ---------------------------
851 - Integer
852 - Default: 500000
853
854 Maximum number of Packet Cache entries.
855 1 million per thread will generally suffice for most installations.
856
857 .. _setting-max-qperq:
858
859 ``max-qperq``
860 -------------
861 - Integer
862 - Default: 50
863
864 The maximum number of outgoing queries that will be sent out during the resolution of a single client query.
865 This is used to limit endlessly chasing CNAME redirections.
866
867 .. _setting-max-negative-ttl:
868
869 ``max-negative-ttl``
870 --------------------
871 - Integer
872 - Default: 3600
873
874 A query for which there is authoritatively no answer is cached to quickly deny a record's existence later on, without putting a heavy load on the remote server.
875 In practice, caches can become saturated with hundreds of thousands of hosts which are tried only once.
876 This setting, which defaults to 3600 seconds, puts a maximum on the amount of time negative entries are cached.
877
878 .. _setting-max-recursion-depth:
879
880 ``max-recursion-depth``
881 -----------------------
882 - Integer
883 - Default: 40
884
885 Total maximum number of internal recursion calls the server may use to answer a single query.
886 0 means unlimited.
887 The value of `stack-size`_ should be increased together with this one to prevent the stack from overflowing.
888
889 .. versionchanged:: 4.1.0
890
891 Before 4.1.0, this settings was unlimited.
892
893 .. _setting-max-tcp-clients:
894
895 ``max-tcp-clients``
896 -------------------
897 - Integer
898 - Default: 128
899
900 Maximum number of simultaneous incoming TCP connections allowed.
901
902 .. _setting-max-tcp-per-client:
903
904 ``max-tcp-per-client``
905 ----------------------
906 - Integer
907 - Default: 0 (unlimited)
908
909 Maximum number of simultaneous incoming TCP connections allowed per client (remote IP address).
910
911 .. _setting-max-tcp-queries-per-connection:
912
913 ``max-tcp-queries-per-connection``
914 ----------------------------------
915 .. versionadded:: 4.1.0
916
917 - Integer
918 - Default: 0 (unlimited)
919
920 Maximum number of DNS queries in a TCP connection.
921
922 .. _setting-max-total-msec:
923
924 ``max-total-msec``
925 ------------------
926 - Integer
927 - Default: 7000
928
929 Total maximum number of milliseconds of wallclock time the server may use to answer a single query.
930
931 .. _setting-max-udp-queries-per-round:
932
933 ``max-udp-queries-per-round``
934 ----------------------------------
935 .. versionadded:: 4.1.4
936
937 - Integer
938 - Default: 10000
939
940 Under heavy load the recursor might be busy processing incoming UDP queries for a long while before there is no more of these, and might therefore
941 neglect scheduling new ``mthreads``, handling responses from authoritative servers or responding to :doc:`rec_control <manpages/rec_control.1>`
942 requests.
943 This setting caps the maximum number of incoming UDP DNS queries processed in a single round of looping on ``recvmsg()`` after being woken up by the multiplexer, before
944 returning back to normal processing and handling other events.
945
946 .. _setting-minimum-ttl-override:
947
948 ``minimum-ttl-override``
949 ------------------------
950 - Integer
951 - Default: 0 (disabled)
952
953 This setting artificially raises all TTLs to be at least this long.
954 While this is a gross hack, and violates RFCs, under conditions of DoS, it may enable you to continue serving your customers.
955 Can be set at runtime using ``rec_control set-minimum-ttl 3600``.
956
957 .. _setting-new-domain-tracking:
958
959 ``new-domain-tracking``
960 -----------------------
961 .. versionadded:: 4.2.0
962
963 - Boolean
964 - Default: no (disabled)
965
966 Whether to track newly observed domains, i.e. never seen before. This
967 is a probablistic algorithm, using a stable bloom filter to store
968 records of previously seen domains. When enabled for the first time,
969 all domains will appear to be newly observed, so the feature is best
970 left enabled for e.g. a week or longer before using the results. Note
971 that this feature is optional and must be enabled at compile-time,
972 thus it may not be available in all pre-built packages.
973 If protobuf is enabled and configured, then the newly observed domain
974 status will appear as a flag in Response messages.
975
976 .. _setting-new-domain-log:
977
978 ``new-domain-log``
979 ------------------
980 .. versionadded:: 4.2.0
981
982 - Boolean
983 - Default: yes (enabled)
984
985 If a newly observed domain is detected, log that domain in the
986 recursor log file. The log line looks something like::
987
988 Jul 18 11:31:25 Newly observed domain nod=sdfoijdfio.com
989
990 .. _setting-new-domain-lookup:
991
992 ``new-domain-lookup``
993 ---------------------
994 .. versionadded:: 4.2.0
995
996 - Domain Name
997 - Example: nod.powerdns.com
998
999 If a domain is specified, then each time a newly observed domain is
1000 detected, the recursor will perform an A record lookup of "<newly
1001 observed domain>.<lookup domain>". For example if 'new-domain-lookup'
1002 is configured as 'nod.powerdns.com', and a new domain 'xyz123.tv' is
1003 detected, then an A record lookup will be made for
1004 'xyz123.tv.nod.powerdns.com'. This feature gives a way to share the
1005 newly observed domain with partners, vendors or security teams. The
1006 result of the DNS lookup will be ignored by the recursor.
1007
1008 .. _setting-new-domain-db-size:
1009
1010 ``new-domain-db-size``
1011 ----------------------
1012 .. versionadded:: 4.2.0
1013
1014 - Integer
1015 - Example: 67108864
1016
1017 The default size of the stable bloom filter used to store previously
1018 observed domains is 67108864. To change the number of cells, use this
1019 setting. For each cell, the SBF uses 1 bit of memory, and one byte of
1020 disk for the persistent file.
1021 If there are already persistent files saved to disk, this setting will
1022 have no effect unless you remove the existing files.
1023
1024 .. _setting-new-domain-history-dir:
1025
1026 ``new-domain-history-dir``
1027 --------------------------
1028 .. versionadded:: 4.2.0
1029
1030 - Path
1031
1032 This setting controls which directory is used to store the on-disk
1033 cache of previously observed domains.
1034
1035 The default depends on ``LOCALSTATEDIR`` when building the software.
1036 Usually this comes down to ``/var/lib/pdns-recursor/nod`` or ``/usr/local/var/lib/pdns-recursor/nod``).
1037
1038 The newly observed domain feature uses a stable bloom filter to store
1039 a history of previously observed domains. The data structure is
1040 synchronized to disk every 10 minutes, and is also initialized from
1041 disk on startup. This ensures that previously observed domains are
1042 preserved across recursor restarts.
1043 If you change the new-domain-db-size setting, you must remove any files
1044 from this directory.
1045
1046 .. _setting-new-domain-whitelist:
1047
1048 ``new-domain-whitelist``
1049 ------------------------
1050 .. versionadded:: 4.2.0
1051
1052 - List of Domain Names, comma separated
1053 - Example: xyz.com, abc.com
1054
1055 This setting is a list of all domains (and implicitly all subdomains)
1056 that will never be considered a new domain. For example, if the domain
1057 'xyz123.tv' is in the list, then 'foo.bar.xyz123.tv' will never be
1058 considered a new domain. One use-case for the whitelist is to never
1059 reveal details of internal subdomains via the new-domain-lookup
1060 feature.
1061
1062 .. _setting-new-domain-pb-tag:
1063
1064 ``new-domain-pb-tag``
1065 ---------------------
1066 .. versionadded:: 4.2.0
1067
1068 - String
1069 - Default: pnds-nod
1070
1071 If protobuf is configured, then this tag will be added to all protobuf response messages when
1072 a new domain is observed.
1073
1074 .. _setting-network-timeout:
1075
1076 ``network-timeout``
1077 -------------------
1078 - Integer
1079 - Default: 1500
1080
1081 Number of milliseconds to wait for a remote authoritative server to respond.
1082
1083 .. _setting-nsec3-max-iterations:
1084
1085 ``nsec3-max-iterations``
1086 ------------------------
1087 .. versionadded:: 4.1.0
1088
1089 - Integer
1090 - Default: 2500
1091
1092 Maximum number of iterations allowed for an NSEC3 record.
1093 If an answer containing an NSEC3 record with more iterations is received, its DNSSEC validation status is treated as Insecure.
1094
1095 .. _setting-packetcache-ttl:
1096
1097 ``packetcache-ttl``
1098 -------------------
1099 - Integer
1100 - Default: 3600
1101
1102 Maximum number of seconds to cache an item in the packet cache, no matter what the original TTL specified.
1103
1104 .. _setting-packetcache-servfail-ttl:
1105
1106 ``packetcache-servfail-ttl``
1107 ----------------------------
1108 - Integer
1109 - Default: 60
1110
1111 Maximum number of seconds to cache a 'server failure' answer in the packet cache.
1112
1113 .. versionchanged:: 4.0.0
1114
1115 This setting's maximum is capped to `packetcache-ttl`_.
1116 i.e. setting ``packetcache-ttl=15`` and keeping ``packetcache-servfail-ttl`` at the default will lower ``packetcache-servfail-ttl`` to ``15``.
1117
1118 .. _setting-pdns-distributes-queries:
1119
1120 ``pdns-distributes-queries``
1121 ----------------------------
1122 - Boolean
1123 - Default: yes
1124
1125 If set, PowerDNS will have only 1 thread listening on client sockets, and distribute work by itself over threads by using a hash of the query,
1126 maximizing the cache hit ratio. Starting with version 4.2.0, more than one distributing thread can be started using the `distributor-threads`_
1127 setting.
1128 Improves performance on Linux.
1129
1130 .. _settting-public-suffix-list-file:
1131
1132 ``public-suffix-list-file``
1133 ---------------------------
1134 .. versionadded:: 4.2.0
1135
1136 - Path
1137 - Default: unset
1138
1139 Path to the Public Suffix List file, if any. If set, PowerDNS will try to load the Public Suffix List from this file instead of using the built-in list. The PSL is used to group the queries by relevant domain names when displaying the top queries.
1140
1141 .. _setting-query-local-address:
1142
1143 ``query-local-address``
1144 -----------------------
1145 - IPv4 Address, comma separated
1146 - Default: 0.0.0.0
1147
1148 Send out local queries from this address, or addresses, by adding multiple addresses, increased spoofing resilience is achieved.
1149
1150 .. _setting-query-local-address6:
1151
1152 ``query-local-address6``
1153 ------------------------
1154 - IPv6 addresses, comma separated
1155 - Default: unset
1156
1157 Send out local IPv6 queries from this address or addresses.
1158 Disabled by default, which also disables outgoing IPv6 support.
1159
1160 .. _setting-quiet:
1161
1162 ``quiet``
1163 ---------
1164 - Boolean
1165 - Default: yes
1166
1167 Don't log queries.
1168
1169 .. _setting-reuseport:
1170
1171 ``reuseport``
1172 -------------
1173 - Boolean
1174 - Default: no
1175
1176 If ``SO_REUSEPORT`` support is available, allows multiple processes to open a listening socket on the same port.
1177
1178 Since 4.1.0, when ``pdns-distributes-queries`` is set to false and ``reuseport`` is enabled, every thread will open a separate listening socket to let the kernel distribute the incoming queries, avoiding any thundering herd issue as well as the distributor thread being a bottleneck, thus leading to much higher performance on multi-core boxes.
1179
1180 .. _setting-rng:
1181
1182 ``rng``
1183 -------
1184
1185 - String
1186 - Default: auto
1187
1188 Specify which random number generator to use. Permissible choises are
1189 - auto - choose automatically
1190 - sodium - Use libsodium ``randombytes_uniform``
1191 - openssl - Use libcrypto ``RAND_bytes``
1192 - getrandom - Use libc getrandom, falls back to urandom if it does not really work
1193 - arc4random - Use BSD ``arc4random_uniform``
1194 - urandom - Use ``/dev/urandom``
1195 - kiss - Use simple settable deterministic RNG. **FOR TESTING PURPOSES ONLY!**
1196
1197 .. note::
1198 Not all choises are available on all systems.
1199
1200 .. _setting-root-nx-trust:
1201
1202 ``root-nx-trust``
1203 -----------------
1204 - Boolean
1205 - Default: yes
1206
1207 If set, an NXDOMAIN from the root-servers will serve as a blanket NXDOMAIN for the entire TLD the query belonged to.
1208 The effect of this is far fewer queries to the root-servers.
1209
1210 .. versionchanged:: 4.0.0
1211
1212 Default is 'yes' now, was 'no' before 4.0.0
1213
1214 .. _setting-security-poll-suffix:
1215
1216 ``security-poll-suffix``
1217 ------------------------
1218 - String
1219 - Default: secpoll.powerdns.com.
1220
1221 Domain name from which to query security update notifications.
1222 Setting this to an empty string disables secpoll.
1223
1224 .. _setting-serve-rfc1918:
1225
1226 ``serve-rfc1918``
1227 -----------------
1228 - Boolean
1229 - Default: yes
1230
1231 This makes the server authoritatively aware of: ``10.in-addr.arpa``, ``168.192.in-addr.arpa``, ``16-31.172.in-addr.arpa``, which saves load on the AS112 servers.
1232 Individual parts of these zones can still be loaded or forwarded.
1233
1234 .. _setting-server-down-max-fails:
1235
1236 ``server-down-max-fails``
1237 -------------------------
1238 - Integer
1239 - Default: 64
1240
1241 If a server has not responded in any way this many times in a row, no longer send it any queries for `server-down-throttle-time`_ seconds.
1242 Afterwards, we will try a new packet, and if that also gets no response at all, we again throttle for `server-down-throttle-time`_ seconds.
1243 Even a single response packet will drop the block.
1244
1245 .. _setting-server-down-throttle-time:
1246
1247 ``server-down-throttle-time``
1248 -----------------------------
1249 - Integer
1250 - Default: 60
1251
1252 Throttle a server that has failed to respond `server-down-max-fails`_ times for this many seconds.
1253
1254 .. _setting-server-id:
1255
1256 ``server-id``
1257 -------------
1258 - String
1259 - Default: The hostname of the server
1260
1261 The reply given by The PowerDNS recursor to a query for 'id.server' with its hostname, useful for in clusters.
1262 When a query contains the :rfc:`NSID EDNS0 Option <5001>`, this value is returned in the response as the NSID value.
1263
1264 This setting can be used to override the answer given to these queries.
1265 Set to "disabled" to disable NSID and 'id.server' answers.
1266
1267 Query example (where 192.0.2.14 is your server):
1268
1269 .. code-block:: sh
1270
1271 dig @192.0.2.14 CHAOS TXT id.server.
1272 dig @192.0.2.14 example.com IN A +nsid
1273
1274 ``setgid``, ``setuid``
1275 ----------------------
1276 - String
1277 - Default: unset
1278
1279 PowerDNS can change its user and group id after binding to its socket.
1280 Can be used for better :doc:`security <security>`.
1281
1282 .. _setting-signature-inception-skew:
1283
1284 ``signature-inception-skew``
1285 ----------------------------------
1286 .. versionadded:: 4.1.5
1287
1288 - Integer
1289 - Default: 60
1290
1291 Allow the signature inception to be off by this number of seconds. Negative values are not allowed.
1292
1293 .. versionchanged:: 4.2.0
1294
1295 Default is now 60, was 0 before.
1296
1297 .. _setting-single-socket:
1298
1299 ``single-socket``
1300 -----------------
1301 - Boolean
1302 - Default: no
1303
1304 Use only a single socket for outgoing queries.
1305
1306 .. _setting-snmp-agent:
1307
1308 ``snmp-agent``
1309 --------------
1310 .. versionadded:: 4.1.0
1311
1312 - Boolean
1313 - Default: no
1314
1315 If set to true and PowerDNS has been compiled with SNMP support, it will register as an SNMP agent to provide statistics and be able to send traps.
1316
1317 .. _setting-snmp-master-socket:
1318
1319 ``snmp-master-socket``
1320 ----------------------
1321 .. versionadded:: 4.1.0
1322
1323 - String
1324 - Default: empty
1325
1326 If not empty and ``snmp-agent`` is set to true, indicates how PowerDNS should contact the SNMP master to register as an SNMP agent.
1327
1328 .. _setting-socket-dir:
1329
1330 ``socket-dir``
1331 --------------
1332 - Path
1333
1334 Where to store the control socket and pidfile.
1335 The default depends on ``LOCALSTATEDIR`` or the ``--with-socketdir`` setting when building (usually ``/var/run`` or ``/run``).
1336
1337 When using `chroot`_ the default becomes to ``/``.
1338
1339 ``socket-owner``, ``socket-group``, ``socket-mode``
1340 ---------------------------------------------------
1341 Owner, group and mode of the controlsocket.
1342 Owner and group can be specified by name, mode is in octal.
1343
1344 .. _setting-spoof-nearmiss-max:
1345
1346 ``spoof-nearmiss-max``
1347 ----------------------
1348 - Integer
1349 - Default: 20
1350
1351 If set to non-zero, PowerDNS will assume it is being spoofed after seeing this many answers with the wrong id.
1352
1353 .. _setting-stack-size:
1354
1355 ``stack-size``
1356 --------------
1357 - Integer
1358 - Default: 200000
1359
1360 Size of the stack per thread.
1361
1362 .. _setting-statistics-interval:
1363
1364 ``statistics-interval``
1365 -----------------------
1366 .. versionadded:: 4.1.0
1367
1368 - Integer
1369 - Default: 1800
1370
1371 Interval between logging statistical summary on recursor performance.
1372 Use 0 to disable.
1373
1374 .. _setting-stats-api-blacklist:
1375
1376 ``stats-api-blacklist``
1377 -----------------------
1378 .. versionadded:: 4.2.0
1379
1380 - String
1381 - Default: "cache-bytes, packetcache-bytes, ecs-v4-response-bits-*, ecs-v6-response-bits-*"
1382
1383 A list of comma-separated statistic names, that are disabled when retrieving the complete list of statistics via the API for performance reasons.
1384 These statistics can still be retrieved individually by specifically asking for it.
1385
1386 .. _setting-stats-carbon-blacklist:
1387
1388 ``stats-carbon-blacklist``
1389 --------------------------
1390 .. versionadded:: 4.2.0
1391
1392 - String
1393 - Default: "cache-bytes, packetcache-bytes, ecs-v4-response-bits-*, ecs-v6-response-bits-*"
1394
1395 A list of comma-separated statistic names, that are prevented from being exported via carbon for performance reasons.
1396
1397 .. _setting-stats-rec-control-blacklist:
1398
1399 ``stats-rec-control-blacklist``
1400 -------------------------------
1401 .. versionadded:: 4.2.0
1402
1403 - String
1404 - Default: "cache-bytes, packetcache-bytes, ecs-v4-response-bits-*, ecs-v6-response-bits-*"
1405
1406 A list of comma-separated statistic names, that are disabled when retrieving the complete list of statistics via `rec_control get-all`, for performance reasons.
1407 These statistics can still be retrieved individually.
1408
1409 .. _setting-stats-ringbuffer-entries:
1410
1411 ``stats-ringbuffer-entries``
1412 ----------------------------
1413 - Integer
1414 - Default: 10000
1415
1416 Number of entries in the remotes ringbuffer, which keeps statistics on who is querying your server.
1417 Can be read out using ``rec_control top-remotes``.
1418
1419 .. _setting-stats-snmp-blacklist:
1420
1421 ``stats-snmp-blacklist``
1422 ------------------------
1423 .. versionadded:: 4.2.0
1424
1425 - String
1426 - Default: "cache-bytes, packetcache-bytes, ecs-v4-response-bits-*, ecs-v6-response-bits-*"
1427
1428 A list of comma-separated statistic names, that are prevented from being exported via SNMP, for performance reasons.
1429
1430 .. _setting-tcp-fast-open:
1431
1432 ``tcp-fast-open``
1433 -----------------
1434 .. versionadded:: 4.1.0
1435
1436 - Integer
1437 - Default: 0 (Disabled)
1438
1439 Enable TCP Fast Open support, if available, on the listening sockets.
1440 The numerical value supplied is used as the queue size, 0 meaning disabled.
1441
1442 .. _setting-threads:
1443
1444 ``threads``
1445 -----------
1446 - Integer
1447 - Default: 2
1448
1449 Spawn this number of threads on startup.
1450
1451 .. _setting-trace:
1452
1453 ``trace``
1454 ---------
1455 - Boolean
1456 - Default: no
1457
1458 If turned on, output impressive heaps of logging.
1459 May destroy performance under load.
1460
1461 .. _setting-udp-source-port-min:
1462
1463 ``udp-source-port-min``
1464 -----------------------
1465 .. versionadded:: 4.2.0
1466
1467 - Integer
1468 - Default: 1024
1469
1470 This option sets the low limit of UDP port number to bind on.
1471
1472 In combination with `udp-source-port-max`_ it configures the UDP
1473 port range to use. Port numbers are randomized within this range on
1474 initialization, and exceptions can be configured with `udp-source-port-avoid`_
1475
1476 .. _setting-udp-source-port-max:
1477
1478 ``udp-source-port-max``
1479 -----------------------
1480 .. versionadded:: 4.2.0
1481
1482 - Integer
1483 - Default: 65535
1484
1485 This option sets the maximum limit of UDP port number to bind on.
1486
1487 See `udp-source-port-min`_.
1488
1489 .. _setting-udp-source-port-avoid:
1490
1491 ``udp-source-port-avoid``
1492 -------------------------
1493 .. versionadded:: 4.2.0
1494
1495 - String
1496 - Default: 11211
1497
1498 A list of comma-separated UDP port numbers to avoid when binding.
1499 Ex: `5300,11211`
1500
1501 See `udp-source-port-min`_.
1502
1503 .. _setting-udp-truncation-threshold:
1504
1505 ``udp-truncation-threshold``
1506 ----------------------------
1507 .. versionchanged:: 4.2.0
1508 Before 4.2.0, the default was 1680
1509
1510 - Integer
1511 - Default: 1232
1512
1513 EDNS0 allows for large UDP response datagrams, which can potentially raise performance.
1514 Large responses however also have downsides in terms of reflection attacks.
1515 This setting limits the accepted size.
1516 Maximum value is 65535, but values above 4096 should probably not be attempted.
1517
1518 To know why 1232, see the note at :ref:`setting-edns-outgoing-bufsize`.
1519
1520 .. _setting-unique-response-tracking:
1521
1522 ``unique-response-tracking``
1523 ----------------------------
1524 .. versionadded:: 4.2.0
1525
1526 - Boolean
1527 - Default: no (disabled)
1528
1529 Whether to track unique DNS responses, i.e. never seen before combinations
1530 of the triplet (query name, query type, RR[rrname, rrtype, rrdata]).
1531 This can be useful for tracking potentially suspicious domains and
1532 behaviour, e.g. DNS fast-flux.
1533 If protobuf is enabled and configured, then the Protobuf Response message
1534 will contain a flag with udr set to true for each RR that is considered
1535 unique, i.e. never seen before.
1536 This feature uses a probabilistic data structure (stable bloom filter) to
1537 track unique responses, which can have false positives as well as false
1538 negatives, thus it is a best-effort feature. Increasing the number of cells
1539 in the SBF using the unique-response-db-size setting can reduce FPs and FNs.
1540
1541 .. _setting-unique-response-log:
1542
1543 ``unique-response-log``
1544 -----------------------
1545 .. versionadded:: 4.2.0
1546
1547 - Boolean
1548 - Default: no (disabled)
1549
1550 Whether to log when a unique response is detected. The log line
1551 looks something like:
1552
1553 Oct 24 12:11:27 Unique response observed: qname=foo.com qtype=A rrtype=AAAA rrname=foo.com rrcontent=1.2.3.4
1554
1555 .. _setting-unique-response-db-size:
1556
1557 ``unique-response-db-size``
1558 ---------------------------
1559 .. versionadded:: 4.2.0
1560
1561 - Integer
1562 - Example: 67108864
1563
1564 The default size of the stable bloom filter used to store previously
1565 observed responses is 67108864. To change the number of cells, use this
1566 setting. For each cell, the SBF uses 1 bit of memory, and one byte of
1567 disk for the persistent file.
1568 If there are already persistent files saved to disk, this setting will
1569 have no effect unless you remove the existing files.
1570
1571 .. _setting-unique-response-history-dir:
1572
1573 ``unique-response-history-dir``
1574 -------------------------------
1575 .. versionadded:: 4.2.0
1576
1577 - Path
1578
1579 This setting controls which directory is used to store the on-disk
1580 cache of previously observed responses.
1581
1582 The default depends on ``LOCALSTATEDIR`` when building the software.
1583 Usually this comes down to ``/var/lib/pdns-recursor/udr`` or ``/usr/local/var/lib/pdns-recursor/udr``).
1584
1585 The newly observed domain feature uses a stable bloom filter to store
1586 a history of previously observed responses. The data structure is
1587 synchronized to disk every 10 minutes, and is also initialized from
1588 disk on startup. This ensures that previously observed responses are
1589 preserved across recursor restarts. If you change the
1590 unique-response-db-size, you must remove any files from this directory.
1591
1592 .. _setting-unique-response-pb-tag:
1593
1594 ``unique-response-pb-tag``
1595 --------------------------
1596 .. versionadded:: 4.2.0
1597
1598 - String
1599 - Default: pnds-udr
1600
1601 If protobuf is configured, then this tag will be added to all protobuf response messages when
1602 a unique DNS response is observed.
1603
1604 .. _setting-use-incoming-edns-subnet:
1605
1606 ``use-incoming-edns-subnet``
1607 ----------------------------
1608 - Boolean
1609 - Default: no
1610
1611 Whether to process and pass along a received EDNS Client Subnet to authoritative servers.
1612 The ECS information will only be sent for netmasks and domains listed in `edns-subnet-whitelist`_ and will be truncated if the received scope exceeds `ecs-ipv4-bits`_ for IPv4 or `ecs-ipv6-bits`_ for IPv6.
1613
1614 .. _setting-version:
1615
1616 ``version``
1617 -----------
1618 Print version of this binary. Useful for checking which version of the PowerDNS recursor is installed on a system.
1619
1620 .. _setting-version-string:
1621
1622 ``version-string``
1623 ------------------
1624 - String
1625 - Default: PowerDNS Recursor version number
1626
1627 By default, PowerDNS replies to the 'version.bind' query with its version number.
1628 Security conscious users may wish to override the reply PowerDNS issues.
1629
1630 .. _setting-webserver:
1631
1632 ``webserver``
1633 -------------
1634 - Boolean
1635 - Default: no
1636
1637 Start the webserver (for REST API).
1638
1639 .. _setting-webserver-address:
1640
1641 ``webserver-address``
1642 ---------------------
1643 - IP Address
1644 - Default: 127.0.0.1
1645
1646 IP address for the webserver to listen on.
1647
1648 .. _setting-webserver-allow-from:
1649
1650 ``webserver-allow-from``
1651 ------------------------
1652 - IP addresses, comma separated
1653 - Default: 127.0.0.1,::1
1654
1655 .. versionchanged:: 4.1.0
1656
1657 Default is now 127.0.0.1,::1, was 0.0.0.0,::/0 before.
1658
1659 These subnets are allowed to access the webserver.
1660
1661 .. _setting-webserver-loglevel:
1662
1663 ``webserver-loglevel``
1664 ----------------------
1665 .. versionadded:: 4.2.0
1666
1667 - String, one of "none", "normal", "detailed"
1668
1669 The amount of logging the webserver must do. "none" means no useful webserver information will be logged.
1670 When set to "normal", the webserver will log a line per request that should be familiar::
1671
1672 [webserver] e235780e-a5cf-415e-9326-9d33383e739e 127.0.0.1:55376 "GET /api/v1/servers/localhost/bla HTTP/1.1" 404 196
1673
1674 When set to "detailed", all information about the request and response are logged::
1675
1676 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Request Details:
1677 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Headers:
1678 [webserver] e235780e-a5cf-415e-9326-9d33383e739e accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
1679 [webserver] e235780e-a5cf-415e-9326-9d33383e739e accept-encoding: gzip, deflate
1680 [webserver] e235780e-a5cf-415e-9326-9d33383e739e accept-language: en-US,en;q=0.5
1681 [webserver] e235780e-a5cf-415e-9326-9d33383e739e connection: keep-alive
1682 [webserver] e235780e-a5cf-415e-9326-9d33383e739e dnt: 1
1683 [webserver] e235780e-a5cf-415e-9326-9d33383e739e host: 127.0.0.1:8081
1684 [webserver] e235780e-a5cf-415e-9326-9d33383e739e upgrade-insecure-requests: 1
1685 [webserver] e235780e-a5cf-415e-9326-9d33383e739e user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0
1686 [webserver] e235780e-a5cf-415e-9326-9d33383e739e No body
1687 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Response details:
1688 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Headers:
1689 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Connection: close
1690 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Content-Length: 49
1691 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Content-Type: text/html; charset=utf-8
1692 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Server: PowerDNS/0.0.15896.0.gaba8bab3ab
1693 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Full body:
1694 [webserver] e235780e-a5cf-415e-9326-9d33383e739e <!html><title>Not Found</title><h1>Not Found</h1>
1695 [webserver] e235780e-a5cf-415e-9326-9d33383e739e 127.0.0.1:55376 "GET /api/v1/servers/localhost/bla HTTP/1.1" 404 196
1696
1697 The value between the hooks is a UUID that is generated for each request. This can be used to find all lines related to a single request.
1698
1699 .. note::
1700 The webserver logs these line on the NOTICE level. The :ref:`settings-loglevel` seting must be 5 or higher for these lines to end up in the log.
1701
1702 .. _setting-webserver-password:
1703
1704 ``webserver-password``
1705 ----------------------
1706 - String
1707 - Default: unset
1708
1709 Password required to access the webserver.
1710
1711 .. _setting-webserver-port:
1712
1713 ``webserver-port``
1714 ------------------
1715 - Integer
1716 - Default: 8082
1717
1718 TCP port where the webserver should listen on.
1719
1720 .. _setting-write-pid:
1721
1722 ``write-pid``
1723 -------------
1724 - Boolean
1725 - Default: yes
1726
1727 If a PID file should be written to `socket-dir`_
1728
1729 .. _setting-xpf-allow-from:
1730
1731 ``xpf-allow-from``
1732 ------------------
1733 .. versionadded:: 4.2.0
1734
1735 - IP ranges, separated by commas
1736 - Default: empty
1737
1738 .. note::
1739 This is an experimental implementation of `draft-bellis-dnsop-xpf <https://datatracker.ietf.org/doc/draft-bellis-dnsop-xpf/>`_.
1740
1741 The server will trust XPF records found in queries sent from those netmasks (both IPv4 and IPv6),
1742 and will adjust queries' source and destination accordingly. This is especially useful when the recursor
1743 is placed behind a proxy like `dnsdist <https://dnsdist.org>`_.
1744 Note that the ref:`setting-allow-from` setting is still applied to the original source address, and thus access restriction
1745 should be done on the proxy.
1746
1747 .. _setting-xpf-rr-code:
1748
1749 ``xpf-rr-code``
1750 ---------------
1751 .. versionadded:: 4.2.0
1752
1753 - Integer
1754 - Default: 0
1755
1756 .. note::
1757 This is an experimental implementation of `draft-bellis-dnsop-xpf <https://datatracker.ietf.org/doc/draft-bellis-dnsop-xpf/>`_.
1758
1759 This option sets the resource record code to use for XPF records, as long as an official code has not been assigned to it.
1760 0 means that XPF is disabled.