]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
view docs: add example matching all addresses
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 17 Mar 2017 12:03:55 +0000 (13:03 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 21 Mar 2017 14:52:21 +0000 (15:52 +0100)
This started working since the grandparent commit.  Suggested at
https://gitter.im/CZ-NIC/knot-resolver?at=58ca5a03f7f7d48104212607

modules/view/README.rst

index 6fd8decd7d0a2ee80ac4bb69e0f4ba5b8d54aee8..f367814af4d2f7f4dc1a1c3d2be8deca9371c4bd 100644 (file)
@@ -40,6 +40,8 @@ Example configuration
        view:addr('192.168.1.0/24', policy.rpz(policy.PASS, 'whitelist.rpz'))
        -- Forward all queries from given subnet to proxy
        view:addr('10.0.0.0/8', policy.all(policy.FORWARD('2001:DB8::1')))
+       -- Drop everything that hasn't matched
+       view:addr('0.0.0.0/0', function (req, qry) return policy.DROP end)
 
 Properties
 ^^^^^^^^^^