lixonet-ee/bind/named.conf.tmpl

94 lines
2.1 KiB
Cheetah
Raw Permalink 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";
2020-06-22 00:18:11 +00:00
listen-on { any; };
2023-04-12 18:36:32 -06:00
{{ if eq "1" "${bind_forward_enable:-1}" }}
2020-06-13 04:22:42 +00:00
forward only;
forwarders { ${bind_forward_address-"${internal_gateway}"}; };
2023-04-12 18:36:32 -06:00
{{ end }}
2023-01-08 21:49:03 -07:00
dnssec-validation no;
2020-06-13 04:22:42 +00:00
};
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;
2020-06-23 16:31:49 +00:00
match-clients { any; };
2020-06-13 04:22:42 +00:00
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
2023-04-12 18:38:29 -06:00
{{ if eq "1" "${bind_forward_enable:-1}" }}
2020-06-13 04:22:42 +00:00
zone "{{ "$tinc_peer_name" | replace "_" "." }}" {
type forward;
forward only;
forwarders { ${bind_forward_address-"${internal_gateway}"}; };
};
2023-04-12 18:38:29 -06:00
{{ end }}
# Local reverse zone forwarders
2021-09-21 17:28:39 -06:00
{{ if eq "1" "${bind_forward_enable:-1}" }}
{{ if len "${local_reverse_zones:-}" }}{{ range "$local_reverse_zones" | split "," }}zone "{{ . }}" {
type forward;
forward only;
forwarders { ${bind_forward_address-"${internal_gateway}"}; };
};
{{ end }}{{ end }}
2021-09-21 17:28:39 -06:00
{{ end }}
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; };
};