From 94553dd42bc84cc4a3d142a5d571609d820cce7e Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 23 Nov 2024 18:57:47 +0530 Subject: kay/router: nat all traffic to gpon subnet --- os/kay/modules/router.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'os/kay/modules') diff --git a/os/kay/modules/router.nix b/os/kay/modules/router.nix index 59ab281..8bf7cde 100644 --- a/os/kay/modules/router.nix +++ b/os/kay/modules/router.nix @@ -3,6 +3,7 @@ gponInterface = "enp3s0"; gponHost = "192.168.38.2"; + gponSubnet = "192.168.38.0"; gponPrefix = 24; lanInterface = "enp8s0f3u1"; @@ -49,11 +50,10 @@ in { -j TCPMSS --clamp-mss-to-pmtu iptables -t nat -I POSTROUTING 1 \ - -s ${subnet}/${toString prefix} \ - -o ${gponInterface} \ + -d ${gponSubnet}/${toString gponPrefix} \ -j MASQUERADE iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN \ - -o ${gponInterface} \ + -d ${gponSubnet}/${toString gponPrefix} \ -j TCPMSS --clamp-mss-to-pmtu ''; }; -- cgit v1.2.3