]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: document setACLFromFile() 9822/head
authorMatti Hiljanen <matti@hiljanen.com>
Mon, 7 Dec 2020 11:53:25 +0000 (13:53 +0200)
committerMatti Hiljanen <matti@hiljanen.com>
Tue, 8 Dec 2020 08:53:19 +0000 (10:53 +0200)
pdns/dnsdistdist/docs/advanced/acl.rst
pdns/dnsdistdist/docs/reference/config.rst

index 806243d018f58a44cb2dcc80118cd88c8ca47adc..5b4910295f3acb01ef0f5b2d1cd2bfb65f3e01ed 100644 (file)
@@ -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')
+
index a196f3905f2c631a886ad39e593faf093c214e6d..973e6c3a4f8eb7df6f548ed42e085cb920b99da7 100644 (file)
@@ -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.