summaryrefslogtreecommitdiff
path: root/data/templates/dns-forwarding/recursor.conf.j2
blob: 5ac872f19d11abf9c42f435cc786a0a35ef513af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{# j2lint: disable=single-statement-per-line #}
### Autogenerated by service_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={{ config_dir }}/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(',') }}

# listen-port
local-port={{ port }}

# dnssec
dnssec={{ dnssec }}

{% if dns64_prefix is vyos_defined %}
# dns64-prefix
dns64-prefix={{ dns64_prefix }}
{% endif %}

{% if exclude_throttle_address is vyos_defined %}
# dont-throttle-netmasks
dont-throttle-netmasks={{ exclude_throttle_address | join(',') }}
{% endif %}

{% if serve_stale_extension is vyos_defined %}
# serve-stale-extensions
serve-stale-extensions={{ serve_stale_extension }}
{% endif %}

# 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={{ config_dir }}/recursor.forward-zones.conf

#ecs
{% if options.ecs_add_for is vyos_defined %}
ecs-add-for={{ options.ecs_add_for | join(',') }}
{% endif %}

{% if options.ecs_ipv4_bits is vyos_defined %}
ecs-ipv4-bits={{ options.ecs_ipv4_bits }}
{% endif %}

{% if options.edns_subnet_allow_list is vyos_defined %}
edns-subnet-allow-list={{ options.edns_subnet_allow_list | join(',') }}
{% endif %}