]> git.ipfire.org Git - thirdparty/pdns.git/blame - docs/settings.rst
Merge pull request #7677 from rgacogne/dnsdist-logging-facility
[thirdparty/pdns.git] / docs / settings.rst
CommitLineData
0e2063c3
PL
1Authoritative Server Settings
2=============================
3
4All PowerDNS Authoritative Server settings are listed here, excluding
5those that originate from backends, which are documented in the relevant
6chapters. These settings can be set inside ``pdns.conf`` or on the
7commandline when invoking the ``pdns`` binary.
8
9You can use ``+=`` syntax to set some variables incrementally, but this
10requires you to have at least one non-incremental setting for the
11variable to act as base setting. This is mostly useful for
12:ref:`setting-include-dir` directive.
13
14For boolean settings, specifying the name of the setting without a value
15means ``yes``.
16
17.. _setting-8bit-dns:
18
19``8bit-dns``
20------------
21
22- Allow 8 bit dns queries
23- Default: no
24
25.. versionadded:: 4.0.0
26
27Allow 8 bit DNS queries.
28
29.. _setting-allow-axfr-ips:
30
31``allow-axfr-ips``
32------------------
33
34- IP ranges, separated by commas
35- Default: 127.0.0.0/8,::1
36
37If set, only these IP addresses or netmasks will be able to perform
38AXFR.
39
40.. _setting-allow-dnsupdate-from:
41
42``allow-dnsupdate-from``
43------------------------
44
45- IP ranges, separated by commas
88d771bc 46- Default: 127.0.0.0/8,::1
0e2063c3 47
4991656e 48Allow DNS updates from these IP ranges. Set to empty string to honour ``ALLOW-DNSUPDATE-FROM`` in :ref:`metadata-allow-dnsupdate-from`.
0e2063c3
PL
49
50.. _setting-allow-notify-from:
51
52``allow-notify-from``
53---------------------
54
55- IP ranges, separated by commas
56- Default: 0.0.0.0/0,::/0
57
58Allow AXFR NOTIFY from these IP ranges. Setting this to an empty string
59will drop all incoming notifies.
60
61.. _setting-allow-unsigned-notify:
62
63``allow-unsigned-notify``
64-------------------------
65
66- Boolean
67- Default: yes
68
69.. versionadded:: 4.0.0
70
71Turning this off requires all notifications that are received to be
72signed by valid TSIG signature for the zone.
73
74.. _setting-allow-unsigned-supermaster:
75
76``allow-unsigned-supermaster``
77------------------------------
78
79- Boolean
80- Default: yes
81
82.. versionadded:: 4.0.0
83
84Turning this off requires all supermaster notifications to be signed by
85valid TSIG signature. It will accept any existing key on slave.
86
87.. _setting-allow-recursion:
88
89``allow-recursion``
90-------------------
91
92- IP ranges, separated by commas
93- Default: 0.0.0.0/0
d99d1243
PL
94
95.. deprecated:: 4.1.0
96 Recursion has been removed, see :doc:`guides/recursion`
0e2063c3
PL
97
98By specifying ``allow-recursion``, recursion can be restricted to
99netmasks specified. The default is to allow recursion from everywhere.
100Example: ``allow-recursion=198.51.100.0/24, 10.0.0.0/8, 192.0.2.4``.
101
102.. _setting-also-notify:
103
104``also-notify``
105---------------
106
107- IP addresses, separated by commas
108
109When notifying a domain, also notify these nameservers. Example:
110``also-notify=192.0.2.1, 203.0.113.167``. The IP addresses listed in
111``also-notify`` always receive a notification. Even if they do not match
112the list in :ref:`setting-only-notify`.
113
114.. _setting-any-to-tcp:
115
116``any-to-tcp``
117--------------
118
119- Boolean
120- Default: yes
121
122.. versionchanged:: 4.0.1, was 'no' before.
123
124Answer questions for the ANY on UDP with a truncated packet that refers
125the remote server to TCP. Useful for mitigating reflection attacks.
126
127.. _setting-api:
128
129``api``
130-------
131
132- Boolean
133- Default: no
134
135Enable/disable the :doc:`http-api/index`.
136
137.. _setting-api-key:
138
139``api-key``
140-----------
141
142- String
143
144.. versionadded:: 4.0.0
145
146Static pre-shared authentication key for access to the REST API.
147
148.. _setting-api-readonly:
149
150``api-readonly``
151----------------
152
153- Boolean
154- Default: no
155
156.. versionadded:: 4.0.0
85be413d
FL
157.. versionchanged:: 4.2.0
158This setting has been removed in 4.2.0.
0e2063c3
PL
159
160Disallow data modification through the REST API when set.
161
162.. _setting-axfr-lower-serial:
163
164``axfr-lower-serial``
165---------------------
166
167- Boolean
168- Default: no
169
170.. versionadded:: 4.0.4
171
172Also AXFR a zone from a master with a lower serial.
173
174.. _setting-cache-ttl:
175
176``cache-ttl``
177-------------
178
179- Integer
180- Default: 20
181
182Seconds to store packets in the :ref:`packet-cache`.
183
b0d4aa0b
G
184.. _setting-carbon-namespace:
185
186``carbon-namespace``
187--------------------
188
189- String
190- Default: pdns
191
7dd919af
G
192.. versionadded:: 4.2.0
193
b0d4aa0b
G
194Set the namespace or first string of the metric key. Be careful not to include
195any dots in this setting, unless you know what you are doing.
196See :ref:`metricscarbon`
197
0e2063c3
PL
198.. _setting-carbon-ourname:
199
200``carbon-ourname``
201------------------
202
203- String
204- Default: the hostname of the server
205
206If sending carbon updates, if set, this will override our hostname. Be
207careful not to include any dots in this setting, unless you know what
208you are doing. See :ref:`metricscarbon`
209
b0d4aa0b
G
210.. _setting-carbon-instance:
211
212``carbon-instance``
213-------------------
214
215- String
216- Default: auth
217
7dd919af
G
218.. versionadded:: 4.2.0
219
b0d4aa0b
G
220Set the instance or third string of the metric key. Be careful not to include
221any dots in this setting, unless you know what you are doing.
222See :ref:`metricscarbon`
223
0e2063c3
PL
224.. _setting-carbon-server:
225
226``carbon-server``
227-----------------
228
229- IP Address
230
231Send all available metrics to this server via the carbon protocol, which
232is used by graphite and metronome. It has to be an address (no
fd47d762
S
233hostnames). Moreover you can specify more than one server using a comma delimited list, ex:
234carbon-server=10.10.10.10,10.10.10.20.
235You may specify an alternate port by appending :port, ex:
0e2063c3
PL
236127.0.0.1:2004. See :ref:`metricscarbon`.
237
238.. _setting-carbon-interval:
239
240``carbon-interval``
241-------------------
242
243- Integer
244- Default: 30
245
246If sending carbon updates, this is the interval between them in seconds.
247See :ref:`metricscarbon`.
248
249.. _setting-chroot:
250
251``chroot``
252----------
253
254- Path
255
256If set, chroot to this directory for more security. See :doc:`security`.
257
258Make sure that ``/dev/log`` is available from within the chroot. Logging
259will silently fail over time otherwise (on logrotate).
260
261When setting ``chroot``, all other paths in the config (except for
262:ref:`setting-config-dir` and :ref:`setting-module-dir`)
263set in the configuration are relative to the new root.
264
265When running on a system where systemd manages services, ``chroot`` does
266not work out of the box, as PowerDNS cannot use the ``NOTIFY_SOCKET``.
267Either don't ``chroot`` on these systems or set the 'Type' of the this
268service to 'simple' instead of 'notify' (refer to the systemd
269documentation on how to modify unit-files)
270
271.. _setting-config-dir:
272
273``config-dir``
274--------------
275
276- Path
277
278Location of configuration directory (``pdns.conf``). Usually
279``/etc/powerdns``, but this depends on ``SYSCONFDIR`` during
280compile-time.
281
282.. _setting-config-name:
283
284``config-name``
285---------------
286
287- String
288
289Name of this virtual configuration - will rename the binary image. See
290:doc:`guides/virtual-instances`.
291
292.. _setting-control-console:
293
294``control-console``
295-------------------
296
297Debugging switch - don't use.
298
299.. _setting-daemon:
300
301``daemon``
302----------
303
304- Boolean
305- Default: no
306
307Operate as a daemon.
308
b8cd24cc
SH
309.. _setting-default-api-rectify:
310
311``default-api-rectify``
312-----------------------
313- Boolean
314- Default: yes
315
316.. versionadded:: 4.2.0
317
318The value of :ref:`metadata-api-rectify` if it is not set on the zone.
319
320.. note::
321 Pre 4.2.0 the default was always no.
322
0e2063c3 323.. _setting-default-ksk-algorithms:
c01b3507 324.. _setting-default-ksk-algorithm:
0e2063c3 325
c01b3507 326``default-ksk-algorithm``
0e2063c3
PL
327--------------------------
328
329- String
330- Default: ecdsa256
331
c01b3507 332.. versionchanged:: 4.1.0
28080ce6 333 Renamed from ``default-ksk-algorithms``. No longer supports multiple algorithm names.
c01b3507 334
0e2063c3 335The algorithm that should be used for the KSK when running
af28a1c2 336:doc:`pdnsutil secure-zone <manpages/pdnsutil.1>` or using the :doc:`Zone API endpoint <http-api/cryptokey>`
28080ce6
PL
337to enable DNSSEC. Must be one of:
338
28080ce6
PL
339* rsasha1
340* rsasha256
0e2063c3 341* rsasha512
28080ce6
PL
342* ecdsa256 (ECDSA P-256 with SHA256)
343* ecdsa384 (ECDSA P-384 with SHA384)
0e2063c3 344* ed25519
37356d71 345* ed448
0e2063c3 346
28080ce6
PL
347.. note::
348 Actual supported algorithms depend on the crypto-libraries
349 PowerDNS was compiled against. To check the supported DNSSEC algoritms
350 in your build of PowerDNS, run ``pdnsutil list-algorithms``.
351
0e2063c3
PL
352.. _setting-default-ksk-size:
353
354``default-ksk-size``
355--------------------
356
357- Integer
c01b3507 358- Default: whichever is default for `default-ksk-algorithm`_
0e2063c3
PL
359
360The default keysize for the KSK generated with :doc:`pdnsutil secure-zone <dnssec/pdnsutil>`.
28080ce6 361Only relevant for algorithms with non-fixed keysizes (like RSA).
0e2063c3
PL
362
363.. _setting-default-soa-name:
364
365``default-soa-name``
366--------------------
367
368- String
369- Default: a.misconfigured.powerdns.server
370
371Name to insert in the SOA record if none set in the backend.
372
373.. _setting-default-soa-edit:
374
375``default-soa-edit``
376--------------------
377
378- String
379- Default: empty
380
381Use this soa-edit value for all zones if no
382:ref:`metadata-soa-edit` metadata value is set.
383
384.. _setting-default-soa-edit-signed:
385
386``default-soa-edit-signed``
387---------------------------
388
389- String
390- Default: empty
391
392Use this soa-edit value for all signed zones if no
393:ref:`metadata-soa-edit` metadata value is set.
394Overrides :ref:`setting-default-soa-edit`
395
396.. _setting-default-soa-mail:
397
398``default-soa-mail``
399--------------------
400
401- String
402
403Mail address to insert in the SOA record if none set in the backend.
404
405.. _setting-default-ttl:
406
407``default-ttl``
408---------------
409
410- Integer
411- Default: 3600
412
413TTL to use when none is provided.
414
415.. _setting-default-zsk-algorithms:
c01b3507 416.. _setting-default-zsk-algorithm:
0e2063c3 417
c01b3507 418``default-zsk-algorithm``
0e2063c3
PL
419--------------------------
420
421- String
422- Default: (empty)
423
c01b3507
PL
424.. versionchanged:: 4.1.0
425 Renamed from ``default-zsk-algorithms``. Does no longer support multiple algorithm names.
426
0e2063c3 427The algorithm that should be used for the ZSK when running
af28a1c2 428:doc:`pdnsutil secure-zone <manpages/pdnsutil.1>` or using the :doc:`Zone API endpoint <http-api/cryptokey>`
28080ce6
PL
429to enable DNSSEC. Must be one of:
430
28080ce6
PL
431* rsasha1
432* rsasha256
0e2063c3 433* rsasha512
28080ce6
PL
434* ecdsa256 (ECDSA P-256 with SHA256)
435* ecdsa384 (ECDSA P-384 with SHA384)
0e2063c3 436* ed25519
37356d71 437* ed448
0e2063c3 438
28080ce6
PL
439.. note::
440 Actual supported algorithms depend on the crypto-libraries
441 PowerDNS was compiled against. To check the supported DNSSEC algoritms
442 in your build of PowerDNS, run ``pdnsutil list-algorithms``.
443
0e2063c3
PL
444.. _setting-default-zsk-size:
445
446``default-zsk-size``
447--------------------
448
449- Integer
c01b3507 450- Default: 0 (automatic default for `default-zsk-algorithm`_)
0e2063c3
PL
451
452The default keysize for the ZSK generated with :doc:`pdnsutil secure-zone <dnssec/pdnsutil>`.
28080ce6 453Only relevant for algorithms with non-fixed keysizes (like RSA).
0e2063c3
PL
454
455.. _setting-direct-dnskey:
456
457``direct-dnskey``
458-----------------
459
460- Boolean
461- Default: no
462
16d72778
OS
463Read additional DNSKEY, CDS and CDNSKEY records from the records table/your BIND zonefile. If not
464set, DNSKEY, CDS and CDNSKEY records in the zonefiles are ignored.
0e2063c3
PL
465
466.. _setting-disable-axfr:
467
468``disable-axfr``
469----------------
470
471- Boolean
472- Default: no
473
474Do not allow zone transfers.
475
476.. _setting-disable-axfr-rectify:
477
478``disable-axfr-rectify``
479------------------------
480
481- Boolean
482- Default: no
483
484Disable the rectify step during an outgoing AXFR. Only required for
485regression testing.
486
487.. _setting-disable-syslog:
488
489``disable-syslog``
490------------------
491
492- Boolean
493- Default: no
494
495Do not log to syslog, only to stdout. Use this setting when running
496inside a supervisor that handles logging (like systemd).
497
964d0eb6 498.. warning::
0e2063c3
PL
499 Do not use this setting in combination with :ref:`setting-daemon` as all
500 logging will disappear.
501
502.. _setting-disable-tcp:
503
504``disable-tcp``
505---------------
506
507- Boolean
508- Default: no
509
510Do not listen to TCP queries. Breaks RFC compliance.
511
512.. _setting-distributor-threads:
513
514``distributor-threads``
515-----------------------
516
517- Integer
518- Default: 3
519
520Number of Distributor (backend) threads to start per receiver thread.
521See :doc:`performance`.
522
523.. _setting-dname-processing:
524
525``dname-processing``
526--------------------
527
528- Boolean
529- Default: no
530
531Synthesise CNAME records from DNAME records as required. This
532approximately doubles query load. **Do not combine with DNSSEC!**
533
534.. _setting-dnssec-key-cache-ttl:
535
536``dnssec-key-cache-ttl``
537------------------------
538
539- Integer
540- Default: 30
541
542Seconds to cache DNSSEC keys from the database. A value of 0 disables
543caching.
544
545.. _setting-dnsupdate:
546
547``dnsupdate``
548-------------
549
550- Boolean
551- Default: no
552
553Enable/Disable DNS update (RFC2136) support. See :doc:`dnsupdate` for more.
554
555.. _setting-do-ipv6-additional-processing:
556
557``do-ipv6-additional-processing``
558---------------------------------
559
560- Boolean
561- Default: yes
562
563Perform AAAA additional processing. This sends AAAA records in the
564ADDITIONAL section when sending a referral.
565
566.. _setting-domain-metadata-cache-ttl:
567
568``domain-metadata-cache-ttl``
569-----------------------------
570
571- Integer
572- Default: 60
573
574Seconds to cache domain metadata from the database. A value of 0
575disables caching.
576
577.. _setting-edns-subnet-processing:
578
579``edns-subnet-processing``
580--------------------------
581
582- Boolean
583- Default: no
584
585Enables EDNS subnet processing, for backends that support it.
586
af68014f
CHB
587.. _setting-enable-lua-records:
588
589``enable-lua-records``
4fb906ee 590----------------------
af68014f
CHB
591
592- Boolean
593- Default: no
594
595Enable globally the LUA records feature
596
0e2063c3
PL
597.. _setting-entropy-source:
598
599``entropy-source``
600------------------
601
602- Path
603- Default: /dev/urandom
604
605Entropy source file to use.
606
607.. _setting-expand-alias:
608
609``expand-alias``
610----------------
611
612- Boolean
613- Default: no
d99d1243
PL
614
615.. versionadded:: 4.1.0
0e2063c3
PL
616
617If this is enabled, ALIAS records are expanded (synthesised to their
618A/AAAA).
619
620If this is disabled (the default), ALIAS records will not expanded and
621the server will will return NODATA for A/AAAA queries for such names.
622
623**note**: :ref:`setting-resolver` must also be set for ALIAS
624expansion to work!
625
626**note**: In PowerDNS Authoritative Server 4.0.x, this setting did not
627exist and ALIAS was always expanded.
628
629.. _setting-forward-dnsupdate:
630
631``forward-dnsupdate``
632---------------------
633
634- Boolean
635- Default: no
636
637Forward DNS updates sent to a slave to the master.
638
639.. _setting-forward-notify:
640
641``forward-notify``
642------------------
643
644- IP addresses, separated by commas
645
646IP addresses to forward received notifications to regardless of master
647or slave settings.
648
649.. note::
650 The intended use is in anycast environments where it might be
651 necessary for a proxy server to perform the AXFR. The usual checks are
652 performed before any received notification is forwarded.
653
654.. _setting-guardian:
655
656``guardian``
657------------
658
659- Boolean
660- Default: no
661
662Run within a guardian process. See :ref:`running-guardian`.
663
664.. _setting-include-dir:
665
666``include-dir``
667---------------
668
669- Path
670
671Directory to scan for additional config files. All files that end with
672.conf are loaded in order using ``POSIX`` as locale.
673
674.. _setting-launch:
675
676``launch``
677----------
678
679- Backend names, separated by commas
680
681Which backends to launch and order to query them in. Launches backends.
682In its most simple form, supply all backends that need to be launched.
683e.g.
684
685::
686
687 launch=bind,gmysql,remote
688
689If you find that you need to query a backend multiple times with
690different configuration, you can specify a name for later
691instantiations. e.g.:
692
693::
694
695 launch=gmysql,gmysql:server2
696
697In this case, there are 2 instances of the gmysql backend, one by the
698normal name and the second one is called 'server2'. The backend
699configuration item names change: e.g. ``gmysql-host`` is available to
700configure the ``host`` setting of the first or main instance, and
701``gmysql-server2-host`` for the second one.
702
ea4d3e1d
PD
703Running multiple instances of the bind backend is not allowed.
704
0e2063c3
PL
705.. _setting-load-modules:
706
707``load-modules``
708----------------
709
710- Paths, separated by commas
711
712If backends are available in nonstandard directories, specify their
713location here. Multiple files can be loaded if separated by commas. Only
714available in non-static distributions.
715
716.. _setting-local-address:
717
718``local-address``
719-----------------
720
721- IPv4 Addresses, separated by commas or whitespace
722- Default: 0.0.0.0
723
724Local IP address to which we bind. It is highly advised to bind to
725specific interfaces and not use the default 'bind to any'. This causes
726big problems if you have multiple IP addresses. Unix does not provide a
727way of figuring out what IP address a packet was sent to when binding to
728any.
729
b18fa400
PL
730.. _setting-log-timestamp:
731
732``log-timestamp``
733-----------------
734
735.. versionadded:: 4.1.0
736
737- Bool
738- Default: yes
739
740When printing log lines to stdout, prefix them with timestamps.
741Disable this if the process supervisor timestamps these lines already.
742
743.. note::
744 The systemd unit file supplied with the source code already disables timestamp printing
745
27a630b4 746.. _setting-lua-records-exec-limit:
af68014f 747
27a630b4 748``lua-records-exec-limit``
af68014f
CHB
749-----------------------------
750
751- Integer
752- Default: 1000
753
27a630b4 754Limit LUA records scripts to ``lua-records-exec-limit`` instructions.
af68014f
CHB
755Setting this to any value less than or equal to 0 will set no limit.
756
0e2063c3
PL
757.. _setting-non-local-bind:
758
759``non-local-bind``
760------------------
761
762- Boolean
763- Default: no
764
765Bind to addresses even if one or more of the
766:ref:`setting-local-address`'s do not exist on this server.
767Setting this option will enable the needed socket options to allow
768binding to non-local addresses. This feature is intended to facilitate
769ip-failover setups, but it may also mask configuration issues and for
770this reason it is disabled by default.
771
772.. _setting-lua-axfr-script:
773
774``lua-axfr-script``
775-------------------
776
777- String
778- Default: empty
779
780.. versionadded:: 4.1.0
781
84745505 782Script to be used to edit incoming AXFRs, see :ref:`modes-of-operation-axfrfilter`
0e2063c3
PL
783
784.. _setting-local-address-nonexist-fail:
785
786``local-address-nonexist-fail``
787-------------------------------
788
789- Boolean
790- Default: no
791
792Fail to start if one or more of the
793:ref:`setting-local-address`'s do not exist on this server.
794
795.. _setting-local-ipv6:
796
797``local-ipv6``
798--------------
799
800- IPv6 Addresses, separated by commas or whitespace
801- Default: '::'
802
803Local IPv6 address to which we bind. It is highly advised to bind to
804specific interfaces and not use the default 'bind to any'. This causes
805big problems if you have multiple IP addresses.
806
807.. _setting-local-ipv6-nonexist-fail:
808
809``local-ipv6-nonexist-fail``
810----------------------------
811
812- Boolean
813- Default: no
814
815Fail to start if one or more of the :ref:`setting-local-ipv6`
816addresses do not exist on this server.
817
818.. _setting-local-port:
819
820``local-port``
821--------------
822
823- Integer
824- Default: 53
825
826The port on which we listen. Only one port possible.
827
828.. _setting-log-dns-details:
829
830``log-dns-details``
831-------------------
832
833- Boolean
834- Default: no
835
836If set to 'no', informative-only DNS details will not even be sent to
837syslog, improving performance.
838
839.. _setting-logging-facility:
840
841``logging-facility``
842--------------------
843
844If set to a digit, logging is performed under this LOCAL facility. See :ref:`logging-to-syslog`.
845Do not pass names like 'local0'!
846
847.. _setting-loglevel:
848
849``loglevel``
850------------
851
852- Integer
853- Default: 4
854
e7e225a7
PL
855Amount of logging. Higher is more. Do not set below 3. Corresponds to "syslog" level values,
856e.g. error = 3, warning = 4, notice = 5, info = 6
0e2063c3
PL
857
858.. _setting-log-dns-queries:
859
860``log-dns-queries``
861-------------------
862
863- Boolean
864- Default: no
865
866Tell PowerDNS to log all incoming DNS queries. This will lead to a lot
867of logging! Only enable for debugging! Set :ref:`setting-loglevel`
868to at least 5 to see the logs.
869
870.. _setting-lua-prequery-script:
871
872``lua-prequery-script``
873-----------------------
874
875- Path
876
877Lua script to run before answering a query. This is a feature used
878internally for regression testing. The API of this functionality is not
879guaranteed to be stable, and is in fact likely to change.
880
881.. _setting-master:
882
883``master``
884----------
885
886- Boolean
887- Default: no
888
889Turn on master support. See :ref:`master-operation`.
890
891.. _setting-max-cache-entries:
892
893``max-cache-entries``
894---------------------
895
896- Integer
897- Default: 1000000
898
d99d1243
PL
899.. versionchanged:: 4.1.0
900 The packet and query caches are distinct. Previously, this setting was used for
901 both the packet and query caches. See ref:`setting-max-packet-cache-entries` for
902 the packet-cache setting.
903
0e2063c3 904Maximum number of entries in the query cache. 1 million (the default)
d99d1243 905will generally suffice for most installations.
0e2063c3
PL
906
907.. _setting-max-ent-entries:
908
909``max-ent-entries``
910-------------------
911
912- Integer
913- Default: 100000
914
915Maximum number of empty non-terminals to add to a zone. This is a
916protection measure to avoid database explosion due to long names.
917
918.. _setting-max-nsec3-iterations:
919
920``max-nsec3-iterations``
921------------------------
922
923- Integer
924- Default: 500
925
926Limit the number of NSEC3 hash iterations
927
928.. _setting-max-packet-cache-entries:
929
930``max-packet-cache-entries``
931----------------------------
932
933- Integer
934- Default: 1000000
935
d99d1243
PL
936.. versionadded:: 4.1.0
937
0e2063c3 938Maximum number of entries in the packet cache. 1 million (the default)
d99d1243 939will generally suffice for most installations.
0e2063c3
PL
940
941.. _setting-max-queue-length:
942
943``max-queue-length``
944--------------------
945
946- Integer
947- Default: 5000
948
949If this many packets are waiting for database attention, consider the
950situation hopeless and respawn.
951
952.. _setting-max-signature-cache-entries:
953
954``max-signature-cache-entries``
955-------------------------------
956
957- Integer
57b16af7 958- Default: 2^31-1 (on most systems), 2^63-1 (on ILP64 systems)
0e2063c3
PL
959
960Maximum number of signatures cache entries
961
962.. _setting-max-tcp-connection-duration:
963
964``max-tcp-connection-duration``
965-------------------------------
966
967- Integer
968- Default: 0
969
970Maximum time in seconds that a TCP DNS connection is allowed to stay
971open. 0 means unlimited. Note that exchanges related to an AXFR or IXFR
972are not affected by this setting.
973
974.. _setting-max-tcp-connections:
975
976``max-tcp-connections``
977-----------------------
978
979- Integer
980- Default: 20
981
982Allow this many incoming TCP DNS connections simultaneously.
983
984.. _setting-max-tcp-connections-per-client:
985
986``max-tcp-connections-per-client``
987----------------------------------
988
989- Integer
990- Default: 0
991
992Maximum number of simultaneous TCP connections per client. 0 means
993unlimited.
994
995.. _setting-max-tcp-transactions-per-conn:
996
997``max-tcp-transactions-per-conn``
998---------------------------------
999
1000- Integer
1001- Default: 0
1002
1003Allow this many DNS queries in a single TCP transaction. 0 means
1004unlimited. Note that exchanges related to an AXFR or IXFR are not
1005affected by this setting.
1006
1007.. _setting-module-dir:
1008
1009``module-dir``
1010--------------
1011
1012- Path
1013
1014Directory for modules. Default depends on ``PKGLIBDIR`` during
1015compile-time.
1016
1017.. _setting-negquery-cache-ttl:
1018
1019``negquery-cache-ttl``
1020----------------------
1021
1022- Integer
1023- Default: 60
1024
1025Seconds to store queries with no answer in the Query Cache. See ref:`query-cache`.
1026
1027.. _setting-no-config:
1028
1029``no-config``
1030-------------
1031
1032- Boolean
1033- Default: no
1034
1035Do not attempt to read the configuration file.
1036
1037.. _setting-no-shuffle:
1038
1039``no-shuffle``
1040--------------
1041
1042- Boolean
1043- Default: no
1044
1045Do not attempt to shuffle query results, used for regression testing.
1046
1047.. _setting-overload-queue-length:
1048
1049``overload-queue-length``
1050-------------------------
1051
1052- Integer
1053- Default: 0 (disabled)
1054
1055If this many packets are waiting for database attention, answer any new
1056questions strictly from the packet cache.
1057
1058.. _setting-reuseport:
1059
1060``reuseport``
1061-------------
1062
1063- Boolean
1064- Default: No
1065
1066On Linux 3.9 and some BSD kernels the ``SO_REUSEPORT`` option allows
1067each receiver-thread to open a new socket on the same port which allows
1068for much higher performance on multi-core boxes. Setting this option
1069will enable use of ``SO_REUSEPORT`` when available and seamlessly fall
1070back to a single socket when it is not available. A side-effect is that
1071you can start multiple servers on the same IP/port combination which may
1072or may not be a good idea. You could use this to enable transparent
1073restarts, but it may also mask configuration issues and for this reason
1074it is disabled by default.
1075
e97cb679 1076.. _setting-rng:
d4033dc3 1077
e97cb679
AT
1078``rng``
1079-------
1080
1081- String
1082- Default: auto
1083
1084Specify which random number generator to use. Permissible choises are
1085 - auto - choose automatically
1086 - sodium - Use libsodium ``randombytes_uniform``
1087 - openssl - Use libcrypto ``RAND_bytes``
1088 - getrandom - Use libc getrandom, falls back to urandom if it does not really work
1089 - arc4random - Use BSD ``arc4random_uniform``
1090 - urandom - Use ``/dev/urandom``
1091 - kiss - Use simple settable deterministic RNG. **FOR TESTING PURPOSES ONLY!**
1092
1093.. note::
1094 Not all choises are available on all systems.
1095
0e2063c3
PL
1096.. _setting-security-poll-suffix:
1097
1098``security-poll-suffix``
1099------------------------
1100
1101- String
1102- Default: secpoll.powerdns.com.
1103
1104Domain name from which to query security update notifications. Setting
1105this to an empty string disables secpoll.
1106
1107.. _setting-server-id:
1108
1109``server-id``
1110-------------
1111
1112- String
1113- Default: The hostname of the server
1114
1115This is the server ID that will be returned on an EDNS NSID query.
1116
1117.. _setting-only-notify:
1118
1119``only-notify``
1120---------------
1121
1122- IP Ranges, separated by commas or whitespace
1123- Default: 0.0.0.0/0, ::/0
1124
1125For type=MASTER zones (or SLAVE zones with slave-renotify enabled)
1126PowerDNS automatically sends NOTIFYs to the name servers specified in
1127the NS records. By specifying networks/mask as whitelist, the targets
1128can be limited. The default is to notify the world. To completely
1129disable these NOTIFYs set ``only-notify`` to an empty value. Independent
1130of this setting, the IP addresses or netmasks configured with
1131:ref:`setting-also-notify` and ``ALSO-NOTIFY`` domain metadata
1132always receive AXFR NOTIFYs.
1133
22928c2f
PL
1134IP addresses and netmasks can be excluded by prefixing them with a ``!``.
1135To notify all IP addresses apart from the 192.168.0.0/24 subnet use the following::
1136
1137 only-notify=0.0.0.0/0, ::/0, !192.168.0.0/24
1138
0e2063c3
PL
1139.. note::
1140 Even if NOTIFYs are limited by a netmask, PowerDNS first has to
1141 resolve all the hostnames to check their IP addresses against the
1142 specified whitelist. The resolving may take considerable time,
1143 especially if those hostnames are slow to resolve. If you do not need to
1144 NOTIFY the slaves defined in the NS records (e.g. you are using another
1145 method to distribute the zone data to the slaves), then set
1146 :ref:`setting-only-notify` to an empty value and specify the notification targets
1147 explicitly using :ref:`setting-also-notify` and/or
1148 :ref:`metadata-also-notify` domain metadata to avoid this potential bottleneck.
1149
f8d48529 1150.. note::
fd47d762
S
1151 If your slaves support Internet Protocol version, which your master does not,
1152 then set ``only-notify`` to include only supported protocol version.
f8d48529 1153 Otherwise there will be error trying to resolve address.
fd47d762
S
1154
1155 For example, slaves support both IPv4 and IPv6, but PowerDNS master have only IPv4,
f8d48529 1156 so allow only IPv4 with ``only-notify``::
fd47d762 1157
f8d48529
AS
1158 only-notify=0.0.0.0/0
1159
0e2063c3
PL
1160.. _setting-out-of-zone-additional-processing:
1161
1162``out-of-zone-additional-processing``
1163-------------------------------------
1164
d99d1243 1165.. deprecated:: 4.2.0
75676790
PL
1166 This setting has been removed.
1167
0e2063c3
PL
1168- Boolean
1169- Default: yes
1170
1171Do out of zone additional processing. This means that if a malicious
1172user adds a '.com' zone to your server, it is not used for other domains
1173and will not contaminate answers. Do not enable this setting if you run
1174a public DNS service with untrusted users.
1175
1176The docs had previously indicated that the default was "no", but the
1177default has been "yes" since 2005.
1178
1179.. _setting-outgoing-axfr-expand-alias:
1180
1181``outgoing-axfr-expand-alias``
1182------------------------------
1183
1184- Boolean
1185- Default: no
1186
1187If this is enabled, ALIAS records are expanded (synthesised to their
1188A/AAAA) during outgoing AXFR. This means slaves will not automatically
1189follow changes in those A/AAAA records unless you AXFR regularly!
1190
1191If this is disabled (the default), ALIAS records are sent verbatim
1192during outgoing AXFR. Note that if your slaves do not support ALIAS,
1193they will return NODATA for A/AAAA queries for such names.
1194
1195.. _setting-prevent-self-notification:
1196
1197``prevent-self-notification``
1198-----------------------------
1199
1200- Boolean
1201- Default: yes
1202
1203PowerDNS Authoritative Server attempts to not send out notifications to
1204itself in master mode. In very complicated situations we could guess
1205wrong and not notify a server that should be notified. In that case, set
1206prevent-self-notification to "no".
1207
1208.. _setting-query-cache-ttl:
1209
1210``query-cache-ttl``
1211-------------------
1212
1213- Integer
1214- Default: 20
1215
1216Seconds to store queries with an answer in the Query Cache. See :ref:`query-cache`.
1217
1218.. _setting-query-local-address:
1219
1220``query-local-address``
1221-----------------------
1222
1223- IPv4 Address
1224- Default: 0.0.0.0
1225
1226The IP address to use as a source address for sending queries. Useful if
1227you have multiple IPs and PowerDNS is not bound to the IP address your
1228operating system uses by default for outgoing packets.
1229
1230.. _setting-query-local-address6:
1231
1232``query-local-address6``
1233------------------------
1234
1235- IPv6 Address
1236- Default: '::'
1237
1238Source IP address for sending IPv6 queries.
1239
1240.. _setting-query-logging:
1241
1242``query-logging``
1243-----------------
1244
1245- Boolean
1246- Default: no
1247
1248Boolean, hints to a backend that it should log a textual representation
1249of queries it performs. Can be set at runtime.
1250
1251.. _setting-queue-limit:
1252
1253``queue-limit``
1254---------------
1255
1256- Integer
1257- Default: 1500
1258
1259Maximum number of milliseconds to queue a query. See :doc:`performance`.
1260
1261.. _setting-receiver-threads:
1262
1263``receiver-threads``
1264--------------------
1265
1266- Integer
1267- Default: 1
1268
1269Number of receiver (listening) threads to start. See :doc:`performance`.
1270
1271.. _setting-recursive-cache-ttl:
1272
1273``recursive-cache-ttl``
1274-----------------------
1275
1276- Integer
1277- Default: 10
d99d1243
PL
1278
1279.. deprecated:: 4.1.0
1280 Recursion has been removed, see :doc:`guides/recursion`
0e2063c3
PL
1281
1282Seconds to store recursive packets in the :ref:`packet-cache`.
1283
1284.. _setting-recursor:
1285
1286``recursor``
1287------------
1288
1289- IP Address
1290
1291.. deprecated:: 4.1.0
d99d1243 1292 Recursion has been removed, see :doc:`guides/recursion`
0e2063c3
PL
1293
1294If set, recursive queries will be handed to the recursor specified here.
1295
1296.. _setting-resolver:
1297
1298``resolver``
1299------------
1300
1301- IP Addresses with optional port, separated by commas
d99d1243
PL
1302
1303.. versionadded:: 4.1.0
0e2063c3
PL
1304
1305Use these resolver addresses for ALIAS and the internal stub resolver.
1306If this is not set, ``/etc/resolv.conf`` is parsed for upstream
1307resolvers.
1308
1309.. _setting-retrieval-threads:
1310
1311``retrieval-threads``
1312---------------------
1313
1314- Integer
1315- Default: 2
1316
1317Number of AXFR slave threads to start.
1318
ac340505
KD
1319.. _setting-send-signed-notify:
1320
1321``send-signed-notify``
15d44156 1322----------------------
ac340505
KD
1323
1324- Boolean
1325- Default: yes
1326
1327If yes, outgoing NOTIFYs will be signed if a TSIG key is configured for the zone.
1328If there are multiple TSIG keys configured for a domain, PowerDNS will use the
1329first one retrieved from the backend, which may not be the correct one for the
f3a29133 1330respective slave. Hence, in setups with multiple slaves with different TSIG keys
ac340505
KD
1331it may be required to send NOTIFYs unsigned.
1332
0e2063c3
PL
1333.. _setting-setgid:
1334
1335``setgid``
1336----------
1337
1338- String
1339
1340If set, change group id to this gid for more security. See :doc:`security`.
1341
1342.. _setting-setuid:
1343
1344``setuid``
1345----------
1346
1347- String
1348
1349If set, change user id to this uid for more security. See :doc:`security`.
1350
1351.. _setting-slave:
1352
1353``slave``
1354---------
1355
1356- Boolean
1357- Default: no
1358
1359Turn on slave support. See :ref:`slave-operation`.
1360
1361.. _setting-slave-cycle-interval:
1362
1363``slave-cycle-interval``
1364------------------------
1365
1366- Integer
1367- 60
1368
1369On a master, this is the amounts of seconds between the master checking
1370the SOA serials in its database to determine to send out NOTIFYs to the
1371slaves. On slaves, this is the number of seconds between the slave
1372checking for updates to zones.
1373
1374.. _setting-slave-renotify:
1375
1376``slave-renotify``
1377------------------
1378
1379- Boolean
1380- Default: no
1381
1382This setting will make PowerDNS renotify the slaves after an AXFR is
1383*received* from a master. This is useful when using when running a
1384signing-slave.
1385
1386.. _setting-signing-threads:
1387
1388``signing-threads``
1389-------------------
1390
1391- Integer
1392- Default: 3
1393
1394Tell PowerDNS how many threads to use for signing. It might help improve
1395signing speed by changing this number.
1396
1397.. _setting-soa-expire-default:
1398
1399``soa-expire-default``
1400----------------------
1401
1402- Integer
1403- Default: 604800
1404
1405Default :ref:`types-soa` expire.
1406
1407.. _setting-soa-minimum-ttl:
1408
1409``soa-minimum-ttl``
1410-------------------
1411
1412- Integer
1413- Default: 3600
1414
1415Default :ref:`types-soa` minimum ttl.
1416
1417.. _setting-soa-refresh-default:
1418
1419``soa-refresh-default``
1420-----------------------
1421
1422- Integer
1423- Default: 10800
1424
1425Default :ref:`types-soa` refresh.
1426
1427.. _setting-soa-retry-default:
1428
1429``soa-retry-default``
1430---------------------
1431
1432- Integer
1433- Default: 3600
1434
1435Default :ref:`types-soa` retry.
1436
1437.. _setting-socket-dir:
1438
1439``socket-dir``
1440--------------
1441
1442- Path
1443
1444Where the controlsocket will live. The default depends on
1445``LOCALSTATEDIR`` during compile-time (usually ``/var/run`` or
1446``/run``). See :ref:`control-socket`.
1447
1448This path will also contain the pidfile for this instance of PowerDNS
1449called ``pdns.pid`` by default. See :ref:`setting-config-name`
1450and :doc:`Virtual Hosting <guides/virtual-instances>` how this can differ.
1451
b8013977
KM
1452.. _setting-supermaster:
1453
1454``supermaster``
d4033dc3 1455---------------
b8013977
KM
1456
1457- Boolean
1458- Default: no
1459
1460.. versionadded:: 4.2.0
1461
d4033dc3 1462Turn on supermaster support. See :ref:`supermaster-operation`.
b8013977 1463
0e2063c3
PL
1464.. _setting-tcp-control-address:
1465
1466``tcp-control-address``
1467-----------------------
1468
1469- IP Address
1470
1471Address to bind to for TCP control.
1472
1473.. _setting-tcp-control-port:
1474
1475``tcp-control-port``
1476--------------------
1477
1478- Integer
1479- Default: 53000
1480
1481Port to bind to for TCP control.
1482
1483.. _setting-tcp-control-range:
1484
1485``tcp-control-range``
1486---------------------
1487
1488- IP Ranges, separated by commas or whitespace
1489
1490Limit TCP control to a specific client range.
1491
1492.. _setting-tcp-control-secret:
1493
1494``tcp-control-secret``
1495----------------------
1496
1497- String
1498
1499Password for TCP control.
1500
1501.. _setting-tcp-fast-open:
1502
1503``tcp-fast-open``
1504-----------------
1505
1506- Integer
1507- Default: 0 (Disabled)
1508
1509.. versionadded:: 4.1.0
1510
1511Enable TCP Fast Open support, if available, on the listening sockets.
1512The numerical value supplied is used as the queue size, 0 meaning
1513disabled.
1514
1515.. _setting-tcp-idle-timeout:
1516
1517``tcp-idle-timeout``
1518--------------------
1519
1520- Integer
1521- Default: 5
1522
1523Maximum time in seconds that a TCP DNS connection is allowed to stay
1524open while being idle, meaning without PowerDNS receiving or sending
1525even a single byte.
1526
1527.. _setting-traceback-handler:
1528
1529``traceback-handler``
1530---------------------
1531
1532- Boolean
1533- Default: yes
1534
1535Enable the Linux-only traceback handler.
1536
1537.. _setting-trusted-notification-proxy:
1538
1539``trusted-notification-proxy``
1540------------------------------
1541
1542- String
1543
1544IP address of incoming notification proxy
1545
1546.. _setting-udp-truncation-threshold:
1547
1548``udp-truncation-threshold``
1549----------------------------
1550
1551- Integer
e77145bb 1552- Default: 1232
0e2063c3
PL
1553
1554EDNS0 allows for large UDP response datagrams, which can potentially
1555raise performance. Large responses however also have downsides in terms
e77145bb 1556of reflection attacks. Maximum value is 65535, but values above
0e2063c3
PL
15574096 should probably not be attempted.
1558
e77145bb
PL
1559.. note:: Why 1232?
1560
1561 1232 is the largest number of payload bytes that can fit in the smallest IPv6 packet.
6c90a075 1562 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.
e77145bb 1563
0e2063c3
PL
1564.. _setting-version-string:
1565
1566``version-string``
1567------------------
1568
1569- Any of: ``anonymous``, ``powerdns``, ``full``, String
1570- Default: full
1571
1572When queried for its version over DNS
1573(``dig chaos txt version.bind @pdns.ip.address``), PowerDNS normally
1574responds truthfully. With this setting you can overrule what will be
1575returned. Set the ``version-string`` to ``full`` to get the default
1576behaviour, to ``powerdns`` to just make it state
1577``served by PowerDNS - http://www.powerdns.com``. The ``anonymous``
1578setting will return a ServFail, much like Microsoft nameservers do. You
1579can set this response to a custom value as well.
1580
1581.. _setting-webserver:
1582
1583``webserver``
1584-------------
1585
1586- Boolean
1587- Default: no
1588
1589Start a webserver for monitoring. See :doc:`performance`".
1590
1591.. versionchanged:: 4.1.0
1592 It was necessary to enable the webserver to use the REST API, this is no longer the case.
1593
1594.. _setting-webserver-address:
1595
1596``webserver-address``
1597---------------------
1598
1599- IP Address
1600- Default: 127.0.0.1
1601
1602IP Address for webserver/API to listen on.
1603
1604.. _setting-webserver-allow-from:
1605
1606``webserver-allow-from``
1607------------------------
1608
1609- IP ranges, separated by commas or whitespace
be3e1477
RG
1610- Default: 127.0.0.1,::1
1611
1612.. versionchanged:: 4.1.0
1613
d1594faf 1614 Default is now 127.0.0.1,::1, was 0.0.0.0/0,::/0 before.
0e2063c3
PL
1615
1616Webserver/API access is only allowed from these subnets.
1617
64c08e25
PL
1618.. _setting-webserver-loglevel:
1619
1620``webserver-loglevel``
1621----------------------
1622.. versionadded:: 4.2.0
1623
1624- String, one of "none", "normal", "detailed"
1625
1626The amount of logging the webserver must do. "none" means no useful webserver information will be logged.
1627When set to "normal", the webserver will log a line per request that should be familiar::
1628
a0badc0b 1629 [webserver] e235780e-a5cf-415e-9326-9d33383e739e 127.0.0.1:55376 "GET /api/v1/servers/localhost/bla HTTP/1.1" 404 196
64c08e25
PL
1630
1631When set to "detailed", all information about the request and response are logged::
1632
a0badc0b
PL
1633 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Request Details:
1634 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Headers:
1635 [webserver] e235780e-a5cf-415e-9326-9d33383e739e accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
1636 [webserver] e235780e-a5cf-415e-9326-9d33383e739e accept-encoding: gzip, deflate
1637 [webserver] e235780e-a5cf-415e-9326-9d33383e739e accept-language: en-US,en;q=0.5
1638 [webserver] e235780e-a5cf-415e-9326-9d33383e739e connection: keep-alive
1639 [webserver] e235780e-a5cf-415e-9326-9d33383e739e dnt: 1
1640 [webserver] e235780e-a5cf-415e-9326-9d33383e739e host: 127.0.0.1:8081
1641 [webserver] e235780e-a5cf-415e-9326-9d33383e739e upgrade-insecure-requests: 1
1642 [webserver] e235780e-a5cf-415e-9326-9d33383e739e user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0
1643 [webserver] e235780e-a5cf-415e-9326-9d33383e739e No body
1644 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Response details:
1645 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Headers:
1646 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Connection: close
1647 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Content-Length: 49
1648 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Content-Type: text/html; charset=utf-8
1649 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Server: PowerDNS/0.0.15896.0.gaba8bab3ab
1650 [webserver] e235780e-a5cf-415e-9326-9d33383e739e Full body:
1651 [webserver] e235780e-a5cf-415e-9326-9d33383e739e <!html><title>Not Found</title><h1>Not Found</h1>
1652 [webserver] e235780e-a5cf-415e-9326-9d33383e739e 127.0.0.1:55376 "GET /api/v1/servers/localhost/bla HTTP/1.1" 404 196
64c08e25
PL
1653
1654The 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.
1655
1656.. note::
1657 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.
1658
0e2063c3
PL
1659.. _setting-webserver-password:
1660
1661``webserver-password``
1662----------------------
1663
1664- String
1665
1666The plaintext password required for accessing the webserver.
1667
1668.. _setting-webserver-port:
1669
1670``webserver-port``
1671------------------
1672
1673- Integer
8c9cb460 1674- Default: 8081
0e2063c3
PL
1675
1676The port where webserver/API will listen on.
1677
1678.. _setting-webserver-print-arguments:
1679
1680``webserver-print-arguments``
1681-----------------------------
1682
1683- Boolean
1684- Default: no
1685
fd47d762 1686If the webserver should print arguments.
0e2063c3
PL
1687
1688.. _setting-write-pid:
1689
1690``write-pid``
1691-------------
1692
1693- Boolean
1694- Default: yes
1695
1696If a PID file should be written.
1697
1698.. _setting-xfr-max-received-mbytes:
1699
1700``xfr-max-received-mbytes``
1701---------------------------
1702
1703- Integer
1704- Default: 100
1705
1706Specifies the maximum number of received megabytes allowed on an
1707incoming AXFR/IXFR update, to prevent resource exhaustion. A value of 0
1708means no restriction.