2020-04-18 15:42:31 +02:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
2020-04-13 16:35:09 +02:00
|
|
|
server:
|
2020-04-13 18:24:45 +02:00
|
|
|
# Timestamps use UTC ASCII instead of UNIX epoch.
|
2020-04-13 16:35:09 +02:00
|
|
|
log-time-ascii: yes
|
2020-04-13 18:24:45 +02:00
|
|
|
|
2020-04-18 15:42:31 +02:00
|
|
|
# Only log errors.
|
2020-05-02 18:06:58 +02:00
|
|
|
verbosity: 0
|
|
|
|
log-servfail: yes
|
2020-04-18 15:42:31 +02:00
|
|
|
|
2020-05-02 16:49:33 +02:00
|
|
|
logfile: "/var/log/unbound/unbound.log"
|
2020-04-18 16:23:57 +02:00
|
|
|
|
2020-04-13 18:24:45 +02:00
|
|
|
do-ip4: yes
|
2020-08-01 14:32:02 +02:00
|
|
|
do-ip6: yes
|
2020-04-13 18:24:45 +02:00
|
|
|
|
2020-04-13 16:35:09 +02:00
|
|
|
# IP addresses on which to listen.
|
2020-08-01 14:32:02 +02:00
|
|
|
#
|
|
|
|
# Note: dns_host_suffix is dynamically set in this role's tasks,
|
|
|
|
# and changes depending on whether we're handling the main or backup
|
|
|
|
# recursive DNS node.
|
|
|
|
|
|
|
|
# IPv4
|
2020-04-13 16:35:09 +02:00
|
|
|
interface: 10.{{ subnet_ids.ap }}.0.{{ dns_host_suffix }}
|
|
|
|
interface: 10.{{ subnet_ids.users_wired }}.0.{{ dns_host_suffix }}
|
|
|
|
interface: 10.{{ subnet_ids.users_wifi }}.0.{{ dns_host_suffix }}
|
2021-01-24 01:30:31 +01:00
|
|
|
interface: 10.{{ subnet_ids.users_accueil }}.0.{{ dns_host_suffix }}
|
2020-04-13 16:35:09 +02:00
|
|
|
|
2020-08-01 14:32:02 +02:00
|
|
|
|
|
|
|
# IPv6
|
|
|
|
interface: {{ ipv6_base_prefix }}:{{ subnet_ids.ap }}::0:{{ dns_host_suffix }}
|
|
|
|
interface: {{ ipv6_base_prefix }}:{{ subnet_ids.users_wired }}::0:{{ dns_host_suffix }}
|
|
|
|
interface: {{ ipv6_base_prefix }}:{{ subnet_ids.users_wifi }}::0:{{ dns_host_suffix }}
|
2021-01-24 01:30:31 +01:00
|
|
|
interface: {{ ipv6_base_prefix }}:{{ subnet_ids.users_accueil }}::0:{{ dns_host_suffix }}
|
2020-08-01 14:32:02 +02:00
|
|
|
|
2020-04-13 16:35:09 +02:00
|
|
|
|
|
|
|
# By default, anything other than localhost is refused.
|
|
|
|
# Whitelist some subnets:
|
|
|
|
access-control: 10.{{ subnet_ids.ap }}.0.0/16 allow
|
|
|
|
access-control: 10.{{ subnet_ids.users_wired }}.0.0/16 allow
|
|
|
|
access-control: 10.{{ subnet_ids.users_wifi }}.0.0/16 allow
|
2021-01-24 01:30:31 +01:00
|
|
|
access-control: 10.{{ subnet_ids.users_accueil }}.0.0/16 allow
|
2020-08-01 17:48:39 +02:00
|
|
|
access-control: {{ ipv6_base_prefix }}::/32 allow # Fuck it... :)
|
2020-04-13 16:35:09 +02:00
|
|
|
|
|
|
|
num-threads: {{ ansible_processor_vcpus }}
|
|
|
|
|
|
|
|
private-address: 10.0.0.0/8
|
2020-04-28 23:14:43 +02:00
|
|
|
|
|
|
|
# The host cache TTL affects blacklisting of supposedly bogus hosts.
|
|
|
|
# The default was 900 (15 minutes).
|
|
|
|
infra-host-ttl: 60
|
|
|
|
|
|
|
|
|
2020-05-02 18:44:17 +02:00
|
|
|
# The following is vital, we were having issues
|
|
|
|
# with DNSSEC that turned out to be due to UDP responses that were too
|
|
|
|
# large.
|
2020-04-28 23:14:43 +02:00
|
|
|
|
2020-05-02 18:44:17 +02:00
|
|
|
# EDNS reassembly buffer to advertise to UDP peers (the actual buffer
|
|
|
|
# is set with msg-buffer-size). 1472 can solve fragmentation (timeouts)
|
|
|
|
edns-buffer-size: {{ mtu }}
|
2020-04-28 23:14:43 +02:00
|
|
|
|
2020-05-02 18:44:17 +02:00
|
|
|
# Maximum UDP response size (not applied to TCP response).
|
|
|
|
# Suggested values are 512 to 4096. Default is 4096. 65536 disables it.
|
|
|
|
max-udp-size: {{ mtu }}
|