summaryrefslogtreecommitdiff
path: root/data/templates/dns-forwarding/recursor.conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/dns-forwarding/recursor.conf.j2')
-rw-r--r--data/templates/dns-forwarding/recursor.conf.j242
1 files changed, 42 insertions, 0 deletions
diff --git a/data/templates/dns-forwarding/recursor.conf.j2 b/data/templates/dns-forwarding/recursor.conf.j2
new file mode 100644
index 000000000..c1950e1bc
--- /dev/null
+++ b/data/templates/dns-forwarding/recursor.conf.j2
@@ -0,0 +1,42 @@
+{# j2lint: disable=single-statement-per-line #}
+### Autogenerated by dns_forwarding.py ###
+
+# XXX: pdns recursor doesn't like whitespace near entry separators,
+# especially in the semicolon-separated lists of name servers.
+# Please be careful if you edit the template.
+
+# Non-configurable defaults
+daemon=yes
+threads=1
+allow-from={{ allow_from | join(',') }}
+log-common-errors=yes
+non-local-bind=yes
+query-local-address={{ source_address | join(',') }}
+lua-config-file=recursor.conf.lua
+
+# cache-size
+max-cache-entries={{ cache_size }}
+
+# negative TTL for NXDOMAIN
+max-negative-ttl={{ negative_ttl }}
+
+# timeout
+network-timeout={{ timeout }}
+
+# ignore-hosts-file
+export-etc-hosts={{ 'no' if ignore_hosts_file is vyos_defined else 'yes' }}
+
+# listen-address
+local-address={{ listen_address | join(',') }}
+
+# dnssec
+dnssec={{ dnssec }}
+
+# serve rfc1918 records
+serve-rfc1918={{ 'no' if no_serve_rfc1918 is vyos_defined else 'yes' }}
+
+# zones
+auth-zones={% for z in authoritative_zones %}{{ z.name }}={{ z.file }}{{- "," if not loop.last -}}{% endfor %}
+
+forward-zones-file=recursor.forward-zones.conf
+