From bfc7263f92d3ba266b0004764400c29cef62caa8 Mon Sep 17 00:00:00 2001 From: Tine Date: Thu, 2 Jan 2025 17:34:59 +0100 Subject: [PATCH] feat(network.tjo.cloud): nat66 --- network.tjo.cloud/justfile | 8 ++++---- network.tjo.cloud/openwrt/etc/config/dhcp | 1 + network.tjo.cloud/openwrt/etc/config/firewall | 1 + network.tjo.cloud/openwrt/etc/config/network | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/network.tjo.cloud/justfile b/network.tjo.cloud/justfile index 7f2fcf5..859a2ba 100644 --- a/network.tjo.cloud/justfile +++ b/network.tjo.cloud/justfile @@ -3,13 +3,13 @@ default: apply: #!/usr/bin/env sh - cd {{justfile_directory()}}/terraform + cd {{source_directory()}}/terraform tofu init tofu apply destroy: #!/usr/bin/env sh - cd {{justfile_directory()}}/terraform + cd {{source_directory()}}/terraform tofu destroy configure-all: @@ -27,7 +27,7 @@ configure node: echo "Configuring ${node}.network.tjo.cloud" - for file in {{justfile_directory()}}/openwrt/etc/config/* + for file in {{source_directory()}}/openwrt/etc/config/* do echo "- Deploying /etc/config/$(basename $file)" gomplate --file $file \ @@ -63,7 +63,7 @@ configure node: echo "- Configuring bird" tailscale ssh "root@${node}-network-tjo-cloud" "opkg update" tailscale ssh "root@${node}-network-tjo-cloud" "opkg install bird2 bird2c" - gomplate --file {{justfile_directory()}}/openwrt/etc/bird.conf \ + gomplate --file {{source_directory()}}/openwrt/etc/bird.conf \ --datasource common=configs/common.yaml \ --datasource node=configs/node.${node}.yaml \ | tailscale ssh "root@${node}-network-tjo-cloud" "cat > /etc/bird.conf" diff --git a/network.tjo.cloud/openwrt/etc/config/dhcp b/network.tjo.cloud/openwrt/etc/config/dhcp index 7e021c7..935c6ea 100644 --- a/network.tjo.cloud/openwrt/etc/config/dhcp +++ b/network.tjo.cloud/openwrt/etc/config/dhcp @@ -32,6 +32,7 @@ config dhcp 'lan' option dhcpv4 'server' option dhcpv6 'server' option ra 'server' + option ra_default '1' list ra_flags 'managed-config' list ra_flags 'other-config' diff --git a/network.tjo.cloud/openwrt/etc/config/firewall b/network.tjo.cloud/openwrt/etc/config/firewall index ac2a350..634bb52 100644 --- a/network.tjo.cloud/openwrt/etc/config/firewall +++ b/network.tjo.cloud/openwrt/etc/config/firewall @@ -20,6 +20,7 @@ config zone option output 'ACCEPT' option forward 'REJECT' option masq '1' + option masq6 '1' option mtu_fix '1' config forwarding diff --git a/network.tjo.cloud/openwrt/etc/config/network b/network.tjo.cloud/openwrt/etc/config/network index 1b81e75..119b286 100644 --- a/network.tjo.cloud/openwrt/etc/config/network +++ b/network.tjo.cloud/openwrt/etc/config/network @@ -41,6 +41,7 @@ config interface 'wan6' option device 'eth0' option proto 'dhcpv6' option peerdns '0' + option sourcefilter '0' list dns '2606:4700:4700::1111' # cloudflare primary list dns '2620:fe::fe' # quad9 primary list dns '2606:4700:4700::1001' # cloudflare backup