add dns64 support to our unbound role

This commit is contained in:
lilly 2026-12-06 02:25:09 +01:00
commit 6c20ffffc1
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
3 changed files with 9 additions and 0 deletions

View file

@ -25,4 +25,6 @@ The following variables can be used to customize this role:
Defaults to max vCPU Count.
- `unbound_private_domain`: List of domains from witch unbound for the domain and its subdomains to allows resolving of RFC1918 addresses. (Not relevent on Debian)
Defaults to `[]`
- `unbound_enable_dns64`: Whether dns64 module should be loaded. If defined, the `unbound_dns64_prefix` option must also be set.
- `unbound_dns64_prefix`: The prefix in which AAAA records are synthesized when upstream only returns an A record

View file

@ -5,3 +5,4 @@ unbound_enable_unbound_control: true
unbound_enable_dnssec: true
unbound_access_control: [ ]
unbound_private_domain: [ ]
unbound_enable_dns64: false

View file

@ -1,6 +1,8 @@
# ref: https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html
# unbound.conf(5) man page
server:
module-config: "{% if unbound_enable_dns64 %}dns64 {% endif %}validator iterator"
{% if unbound_enable_dnssec -%}
# location of the trust anchor file that enables DNSSEC
# this file is generated by the `unbound-anchor` command
@ -43,6 +45,10 @@ server:
private-domain: {{ i }}
{% endfor -%}
{% if unbound_enable_dns64 -%}
dns64-prefix: "{{ unbound_dns64_prefix }}"
{% endif -%}
# The number of seconds between printing statistics to the log for every thread.
statistics-interval: 0