.. function:: addAllowedAdditionalQType(qtype, targets [, options ]))
.. versionadded:: 4.7.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-recursor.allowed_additional_qtypes`.
Allow additional processing for ``qtype``.
:type targets: list of qtype numbers
:param table options: a table of options. Currently the only option is ``mode`` having an integer value. For the available modes, see above. If no mode is specified, the default ``pdns.AdditionalMode.CacheOnlyRequireAuth`` mode is used.
-
.. function:: addTA(name, dscontent)
.. versionadded:: 4.2.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-dnssec.trustanchors`.
Adds Trust Anchor to the list of DNSSEC anchors.
.. function:: addNTA(name[, reason])
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-dnssec.negative_trustanchors`.
+
Adds a Negative Trust Anchor for ``name`` to the configuration.
Please read :ref:`ntas` for operational information on NTAs.
.. function:: readTrustAnchorsFromFile(fname[, interval])
.. versionadded:: 4.2.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-dnssec.trustanchorfile` and :ref:`setting-yaml-dnssec.trustanchorfile_interval`.
Reads all DS and DNSKEY records from ``fname`` (a BIND zone file) and adds these to the Trust Anchors.
This function can be used to read distribution provided trust anchors, as for instance ``/usr/share/dns/root.key`` from Debian's ``dns-root-data`` package.
proxymapping
In addition, :func:`pdnslog` together with ``pdns.loglevels`` is also supported in the Lua configuration file.
+
+.. note::
+ Starting with version 5.1.0, the settings originally specified in a Lua config file can also be put in YAML form.
+ The conversion printed by ``rec_control show-yaml`` will print these settings if a Lua config file is specified in the config file being converted.
+ You have to choose however: either set Lua settings the old way in the Lua config file, or convert all to YAML.
+ If you are using YAML settings of items originally specified in the Lua config file, do not set :ref:`setting-yaml-recursor.lua_config_file` anymore. The :program:`Recursor` will check that you do not mix both configuration methods.
+
.. function:: protobufServer(servers [, options]))
.. versionadded:: 4.2.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-logging.protobuf_servers`.
Send protocol buffer messages to one or more servers for incoming queries and/or outgoing responses. The client address may be masked using :func:`setProtobufMasks`, for anonymization purposes.
.. function:: setProtobufMasks(maskv4, maskV6)
.. versionadded:: 4.2.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-logging.protobuf_mask_v4` and :ref:`setting-yaml-logging.protobuf_mask_v6`.
:param int maskV4: network mask to apply to the client IPv4 addresses, for anonymization purposes. The default of 32 means no anonymization.
:param int maskV6: Same as maskV4, but for IPv6. Defaults to 128.
.. function:: outgoingProtobufServer(servers [, options])
.. versionadded:: 4.2.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-logging.outgoing_protobuf_servers`.
Send protocol buffer messages to one or more servers for outgoing queries and/or incoming responses.
.. function:: dnstapFrameStreamServer(servers, [, options])
.. versionadded:: 4.3.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-logging.dnstap_framestream_servers`.
Send dnstap formatted message to one or more framestream servers for outgoing queries and/or incoming responses.
.. function:: dnstapNODFrameStreamServer(servers [, options])
.. versionadded:: 4.8.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-logging.dnstap_nod_framestream_servers`.
Send dnstap formatted message for :ref:`Newly Observed Domain` and :ref:`Unique Domain Response`.
``Message.type`` will be set to ``CLIENT_QUERY`` for NOD and ``RESOLVER_RESPONSE`` for UDR. The concerned domain name will be attached in the ``Message.query_zone`` field.
.. function:: addProxyMapping(subnet, ip [, domains])
.. versionadded:: 4.7.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-incoming.proxymappings`.
Specify a table based mapping for a subnet.
---------------------------
.. function:: rpzFile(filename, settings)
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-recursor.rpzs`.
+
Load an RPZ from disk.
If multiple files are to be loaded, the zones can be distinguished by setting a ``policyName``, see below.
.. versionchanged:: 4.2.0
- The first parameter can be a list of addresses.
+ The first parameter can be a list of addresses.
.. versionchanged:: 4.5.0
- This function has been renamed from ``rpzMaster``.
+ This function has been renamed from ``rpzMaster``.
+
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-recursor.rpzs`.
Load an RPZ from AXFR and keep retrieving with IXFR.
``addSortList``
^^^^^^^^^^^^^^^
+
+.. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-recursor.sortlists`.
+
``addSortList()`` is used in the :ref:`setting-lua-config-file` and is intended to exactly mirror the semantics of the BIND sortlist option, but the syntax is slightly different.
+
As an example, the following BIND sortlist:
.. code-block:: none
In other words: each IP address is put within quotes, and are separated by commas instead of semicolons.
For the rest everything is identical.
+
.. function:: zoneToCache(zone, method, source [, settings ])
.. versionadded:: 4.6.0
+ .. versionadded:: 5.1.0 Alternative equivalent YAML setting: :ref:`setting-yaml-recordcache.zonetocaches`.
Load a zone and put it into the Recursor cache periodically.
}
if (have.count("defpol") != 0) {
params.defpol = DNSFilterEngine::Policy();
- params.defcontent = boost::get<string>(have.at("defcontent"));
params.defpol->d_kind = (DNSFilterEngine::PolicyKind)boost::get<uint32_t>(have.at("defpol"));
params.defpol->setName(params.polName);
if (params.defpol->d_kind == DNSFilterEngine::PolicyKind::Custom) {
+ params.defcontent = boost::get<string>(have.at("defcontent"));
if (!params.defpol->d_custom) {
params.defpol->d_custom = make_unique<DNSFilterEngine::Policy::CustomData>();
}
params.defpol->d_custom->push_back(DNSRecordContent::make(QType::CNAME, QClass::IN,
- params.defcontent));
+ params.defcontent));
if (have.count("defttl") != 0) {
params.defpol->d_ttl = static_cast<int32_t>(boost::get<uint32_t>(have.at("defttl")));
continue;
}
try {
- // The get calls all return a value object here. That is essential, since we want copies so that RPZIXFRTracker gets values
- // with the proper lifetime.
+ // RPZIXTracker uses call by value for its args. That is essential, since we want copies so
+ // that RPZIXFRTracker gets values with the proper lifetime.
std::thread theThread(RPZIXFRTracker, rpzPrimary, generation);
theThread.detach();
}
params.defpol->d_custom = make_unique<DNSFilterEngine::Policy::CustomData>();
}
params.defpol->d_custom->push_back(DNSRecordContent::make(QType::CNAME, QClass::IN,
- std::string(params.defcontent)));
+ std::string(params.defcontent)));
if (rpz.defttl != std::numeric_limits<uint32_t>::max()) {
params.defpol->d_ttl = static_cast<int>(rpz.defttl);
Starting with version 5.1.0, the settings originally specified in a Lua config file can also be put in YAML form.
The conversion printed by ``rec_control show-yaml`` will print these settings if a Lua config file is specified in the config file being converted.
You have to choose however: either set Lua settings the old way in the Lua config file, or convert all to YAML.
- If you are using YAML settings of items originally specified in the Lua config file, do not set :ref:`setting-yaml-recursor.lua_config_file` any more. The :program:`Recursor` will check that you do not mix both configuration methods.
+ If you are using YAML settings of items originally specified in the Lua config file, do not set :ref:`setting-yaml-recursor.lua_config_file` anymore. The :program:`Recursor` will check that you do not mix both configuration methods.
YAML settings file
------------------
Sequence of trust anchors. If the sequence contains an entry for the root zone, the default root zone trust anchor is not included.
If a zone appears multiple times, the entries in ``dsrecords`` are merged.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of negative trust anchors.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`',
'versionadded': '5.1.0',
},
{
A path to a zone file to read trust anchors from.
This can be used to read distribution provided trust anchors, as for instance ``/usr/share/dns/root.key`` from Debian's ``dns-root-data`` package.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Interval (in hours) to re-read the ``trustanchorfile``. Zero disables periodic re-reads.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of outgoing protobuf servers. Currently the maximum size of this list is one.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/protobuf`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of outgoing protobuf servers. Currently the maximum size of this list is one.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/protobuf`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Network mask to apply to the client IPv4 addresses, for anonymization purposes. The default of 32 means no anonymization.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/protobuf`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Network mask to apply to the client IPv6 addresses, for anonymization purposes. The default of 128 means no anonymization.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/protobuf`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of dnstap servers. Currently the maximum size of this list is one.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/protobuf`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of NOD dnstap servers. Currently the maximum size of this list is one.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/protobuf`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of sort lists.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/sortlist`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of RPZ entries.
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/rpz`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of ZoneToCache entries
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/ztc`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of AllowedAdditionalQType
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/additionals`',
'versionadded': '5.1.0',
},
{
'doc' : '''
Sequence of ProxyMapping
''',
- 'skip-old' : 'Old style in Lua settings',
+ 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/proxymapping`',
'versionadded': '5.1.0',
},
]