add local PTR records in z9 to pass rfc7050 validation
All checks were successful
/ build (push) Successful in 33s
/ Ansible Lint (push) Successful in 2m12s

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
5 changed files with 17 additions and 0 deletions

View file

@ -6,6 +6,11 @@ ansible_pull__timer_randomized_delay_sec: 0min
unbound_access_control: [ "10.89.208.0/20", "2a07:c481:1::/48" ] unbound_access_control: [ "10.89.208.0/20", "2a07:c481:1::/48" ]
unbound_enable_dns64: true unbound_enable_dns64: true
unbound_dns64_prefix: "{{ jool_nat64__prefix }}" unbound_dns64_prefix: "{{ jool_nat64__prefix }}"
unbound_local_ptr:
- "64:ff9b::c000:aa ipv4only.arpa."
- "64:ff9b::c000:ab ipv4only.arpa."
- "192.0.0.170 ipv4only.arpa."
- "192.0.0.171 ipv4only.arpa."
deploy_systemd_resolved_config__enable: false deploy_systemd_resolved_config__enable: false
deploy_systemd_resolved_config__dns: deploy_systemd_resolved_config__dns:
- 127.0.0.1 - 127.0.0.1

View file

@ -27,4 +27,6 @@ The following variables can be used to customize this role:
Defaults to `[]` Defaults to `[]`
- `unbound_enable_dns64`: Whether dns64 module should be loaded. If defined, the `unbound_dns64_prefix` option must also be set. - `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_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_private_domain: [ ]
unbound_enable_dns64: false unbound_enable_dns64: false
unbound_dns64_prefix: ~ unbound_dns64_prefix: ~
unbound_local_ptr: [ ]

View file

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

View file

@ -49,6 +49,10 @@ server:
dns64-prefix: "{{ unbound_dns64_prefix }}" dns64-prefix: "{{ unbound_dns64_prefix }}"
{% endif -%} {% 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. # The number of seconds between printing statistics to the log for every thread.
statistics-interval: 0 statistics-interval: 0