add local PTR records in z9 to pass rfc7050 validation

We configure dns64 in unbound which also automatically includes the
capability to communicate the local nat64 prefix to clients via
DNS as a mechanism.
This mostly *just works* except that a validation of the received
information is required by RFC7050 which needs requires explicit
unbound configuration. That configuration is implemented here.
This commit is contained in:
lilly 2026-12-06 15:09:32 +01:00
commit a315ef48e2
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
4 changed files with 17 additions and 0 deletions

View file

@ -27,4 +27,6 @@ The following variables can be used to customize this role:
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
- `unbound_local_ptr`: List of [local-data-ptr](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html#unbound-conf-local-data-ptr) strings that will be added to the unbound config.
Defaults to `[]`

View file

@ -7,3 +7,4 @@ unbound_access_control: [ ]
unbound_private_domain: [ ]
unbound_enable_dns64: false
unbound_dns64_prefix: ~
unbound_local_ptr: [ ]

View file

@ -44,3 +44,8 @@ argument_specs:
unbound_dns64_prefix:
type: str
required: false
unbound_local_ptr:
type: list
elements: str
required: false

View file

@ -49,6 +49,10 @@ server:
dns64-prefix: "{{ unbound_dns64_prefix }}"
{% endif -%}
{% for i in unbound_local_ptr -%}
local-data-ptr: "{{ i }}"
{% endfor -%}
# The number of seconds between printing statistics to the log for every thread.
statistics-interval: 0