Merge "Implement "allowed_nets" option"

This commit is contained in:
Zuul 2018-07-17 21:16:29 +00:00 committed by Gerrit Code Review
commit bad85f12e9
2 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
options:
allowed_nets:
default: "p2p"
default: ""
type: string
description: |
String containing a list of allowed networks, separated by semicolons: e.g., "10.172.0.0/16;10.10.0.0/18"

View File

@ -1,3 +1,9 @@
{% if options.allowed_nets -%}
acl allow_query {
{{ options.allowed_nets }};
};
{% endif -%}
options {
directory "/var/cache/bind";
@ -29,4 +35,7 @@ options {
statistics-file "/var/cache/bind/named.stats";
zone-statistics yes;
allow-notify { {{ dns_backend.control_ips }}; };
{% if options.allowed_nets -%}
allow-query { allow_query; };
{% endif -%}
};