From 8ec65b9d39f3a8f9b4039abe7ba6f15031c15843 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Mon, 5 Oct 2026 15:33:19 -0500 Subject: wg update and routing for flex --- hosts/flex-wg-router/configuration.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hosts/flex-wg-router/configuration.nix') diff --git a/hosts/flex-wg-router/configuration.nix b/hosts/flex-wg-router/configuration.nix index 22fd06d..3f6ad06 100644 --- a/hosts/flex-wg-router/configuration.nix +++ b/hosts/flex-wg-router/configuration.nix @@ -48,6 +48,16 @@ in { allowedUDPPorts = [ 51820 ]; }; }; + # NAT/masquerade lan0 allowing wg0 clients to access lan0 + nftables.tables.wg-nat = { + family = "ip"; + content = '' + chain post { + type nat hook postrouting priority srcnat; policy accept; + iifname "wg0" oifname "lan0" masquerade comment "wg0 => lan0" + } + ''; + }; }; # Router config -- cgit v1.3.1