From ac580621b43148ce2c3686833b4f2a6aa3143c52 Mon Sep 17 00:00:00 2001
From: lilly
Date: Sun, 6 Dec 2026 02:25:09 +0100
Subject: [PATCH] enable and configure NAT64 for z9 client network
---
inventories/z9/host_vars/z9-router.yaml | 3 +++
inventories/z9/hosts.yaml | 3 +++
playbooks/deploy.yaml | 7 +++++++
resources/z9/z9-router/kea_dhcp.yaml | 3 +++
.../systemd_networkd/21-netlan.51-clients.network | 6 ++++++
5 files changed, 22 insertions(+)
diff --git a/inventories/z9/host_vars/z9-router.yaml b/inventories/z9/host_vars/z9-router.yaml
index 62df2ba..2ff62e0 100644
--- a/inventories/z9/host_vars/z9-router.yaml
+++ b/inventories/z9/host_vars/z9-router.yaml
@@ -4,6 +4,8 @@ nftables__config: "{{ lookup('ansible.builtin.file', 'resources/z9/z9-router/nft
ansible_pull__timer_on_calendar: "*-*-* 04:00:00 Europe/Berlin"
ansible_pull__timer_randomized_delay_sec: 0min
unbound_access_control: [ "10.89.208.0/20", "2a07:c481:1::/48" ]
+unbound_enable_dns64: true
+unbound_dns64_prefix: "{{ jool_nat64__prefix }}"
deploy_systemd_resolved_config__enable: false
deploy_systemd_resolved_config__dns:
- 127.0.0.1
@@ -14,3 +16,4 @@ secrets__folder:
owner: "root"
mode: "0754"
group: 998
+jool_nat64__prefix: "64:ff9b::/96"
diff --git a/inventories/z9/hosts.yaml b/inventories/z9/hosts.yaml
index 66519db..aa5bf43 100644
--- a/inventories/z9/hosts.yaml
+++ b/inventories/z9/hosts.yaml
@@ -86,3 +86,6 @@ secrets_hosts:
z9-router:
forgejo_runner_hosts:
hosts:
+jool_hosts:
+ hosts:
+ z9-router:
diff --git a/playbooks/deploy.yaml b/playbooks/deploy.yaml
index fd86de9..1729821 100644
--- a/playbooks/deploy.yaml
+++ b/playbooks/deploy.yaml
@@ -41,6 +41,13 @@
tags:
- kea_dhcp
+- name: Ensure jool deployment on jool_hosts
+ hosts: jool_hosts
+ roles:
+ - jool_nat64
+ tags:
+ - jool_nat64
+
- name: Ensure deployment of infrastructure authorized keys
hosts: infrastructure_authorized_keys_hosts
roles:
diff --git a/resources/z9/z9-router/kea_dhcp.yaml b/resources/z9/z9-router/kea_dhcp.yaml
index a543b5c..5bf2c3e 100644
--- a/resources/z9/z9-router/kea_dhcp.yaml
+++ b/resources/z9/z9-router/kea_dhcp.yaml
@@ -15,6 +15,9 @@ kea_dhcp__dhcp4:
data: "10.89.208.1"
- name: routers
data: 10.89.208.1
+ # This will make the v6-only capable devices to disable their v4 stack for 5 minutes and then try again
+ - name: v6-only-preferred
+ data: "300"
pools:
- pool: "10.89.208.32 - 10.89.211.250"
reservations:
diff --git a/resources/z9/z9-router/systemd_networkd/21-netlan.51-clients.network b/resources/z9/z9-router/systemd_networkd/21-netlan.51-clients.network
index 36201b8..530ede1 100644
--- a/resources/z9/z9-router/systemd_networkd/21-netlan.51-clients.network
+++ b/resources/z9/z9-router/systemd_networkd/21-netlan.51-clients.network
@@ -27,3 +27,9 @@ Prefix=2a07:c481:1:33::/64
Assign=true
Token=static:::1
+[IPv6RoutePrefix]
+Route=64:ff9b::/96
+
+[IPv6PREF64Prefix]
+Prefix=64:ff9b::/96
+