lixonet-ee/bind/named.conf.tmpl

91 lines
2.0 KiB
Cheetah
Raw Normal View History

2020-06-13 04:22:42 +00:00
acl "lixonet_global" {
${network_address}/${global_prefix:-16};
};
acl "lixonet_local" {
{{ if len "${bgp_routes:-}" }}{{ range "$bgp_routes" | split "," }}{{.}};
{{ end }}{{ end }}
};
options {
directory "/var/cache/bind";
listen-on { ${tinc_peer_address}; };
forward only;
forwarders { ${bind_forward_address-"${internal_gateway}"}; };
dnssec-enable no;
dnssec-validation no;
};
logging {
channel custom {
stderr;
print-time yes;
print-severity yes;
print-category yes;
2020-06-21 06:03:30 +00:00
severity warning;
2020-06-13 04:22:42 +00:00
};
category default { custom; };
};
view "lixonet" {
recursion yes;
match-clients { lixonet_global; };
allow-query { any; };
allow-recursion { any; };
response-policy { zone "rpz.whitelist"; zone "rpz"; };
zone "rpz.whitelist" {
type master;
file "/etc/bind/lixo.rpz.whitelist";
allow-query { none; };
};
zone "rpz" {
type master;
file "/etc/bind/lixo.rpz";
allow-query { none; };
};
2020-06-13 04:45:08 +00:00
# Local forwarding zone
2020-06-13 04:22:42 +00:00
zone "{{ "$tinc_peer_name" | replace "_" "." }}" {
type forward;
forward only;
forwarders { ${bind_forward_address-"${internal_gateway}"}; };
};
# Local reverse zone forwarders
{{ if len "${local_reverse_zones:-}" }}{{ range "$local_reverse_zones" | split "," }}zone "{{ . }}" {
type forward;
forward only;
forwarders { ${bind_forward_address-"${internal_gateway}"}; };
};
{{ end }}{{ end }}
2020-06-13 04:22:42 +00:00
2020-06-13 04:45:08 +00:00
# Peer forwarding zones
2020-06-13 04:22:42 +00:00
{{ range files "bind/peers" }} {{ if ne . "${tinc_peer_name}" }}
zone "{{ . | replace "_" "." }}" {
type forward;
forward only;
{{ include (print "bind/peers/" .) }}
};{{ end }}{{ end }}
2020-06-13 04:45:08 +00:00
# Custom mesh zones
{{ range files "bind/zones" }}zone "{{ . | replace "_" "." }}" {
2020-06-13 04:45:08 +00:00
{{ include (print "bind/zones/" .) }}
};
{{ end }}
2020-06-13 04:22:42 +00:00
};
view "default" {
recursion no;
match-clients { any; };
allow-recursion { none; };
};