From cd36cfb053cef4c9eaa2d8ac56c14f05228ebb99 Mon Sep 17 00:00:00 2001 From: Matti Hiljanen Date: Mon, 7 Dec 2020 13:53:25 +0200 Subject: [PATCH] dnsdist: document setACLFromFile() --- pdns/dnsdistdist/docs/advanced/acl.rst | 6 ++++++ pdns/dnsdistdist/docs/reference/config.rst | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/pdns/dnsdistdist/docs/advanced/acl.rst b/pdns/dnsdistdist/docs/advanced/acl.rst index 806243d018..5b4910295f 100644 --- a/pdns/dnsdistdist/docs/advanced/acl.rst +++ b/pdns/dnsdistdist/docs/advanced/acl.rst @@ -66,3 +66,9 @@ dnsdist also has the :func:`setACL` function that accepts a list of netmasks and setACL({'192.0.2.0/25', '2001:db8:15::bea/64'}) + +To set the ACL from a file containing a list of netmasks, use :func:`setACLFromFile`: + +.. code-block:: lua + setACLFromFile('/etc/dnsdist/query.acl') + diff --git a/pdns/dnsdistdist/docs/reference/config.rst b/pdns/dnsdistdist/docs/reference/config.rst index a196f3905f..973e6c3a4f 100644 --- a/pdns/dnsdistdist/docs/reference/config.rst +++ b/pdns/dnsdistdist/docs/reference/config.rst @@ -420,6 +420,14 @@ Access Control Lists :param {str} netmasks: A table of CIDR netmask, e.g. ``{"192.0.2.0/24", "2001:DB8:14::/56"}``. Without a subnetmask, only the specific address is allowed. +.. function:: setACLFromFile(fname) + + .. versionadded:: 1.6.0 + + Reset the ACL to the list of netmasks from the given file. See :ref:`ACL` for more information. + + :param str fname: The path to a file containing a list of netmasks. Empty lines or lines starting with "#" are ignored. + .. function:: showACL() Print a list of all netmasks allowed to send queries over UDP, TCP, DNS over TLS and DNS over HTTPS. See :ref:`ACL` for more information. -- 2.47.2