summaryrefslogtreecommitdiff
path: root/os/kay/modules/router.nix
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-11-23 18:57:47 +0530
committersinanmohd <sinan@sinanmohd.com>2024-11-23 18:58:13 +0530
commit94553dd42bc84cc4a3d142a5d571609d820cce7e (patch)
tree4e97681701c602055b73cd6802d4c4d44c860838 /os/kay/modules/router.nix
parentf7037fcf9b9dcdde0b1d46eb744ef6b64e1dbafb (diff)
kay/router: nat all traffic to gpon subnetmaster
Diffstat (limited to 'os/kay/modules/router.nix')
-rw-r--r--os/kay/modules/router.nix6
1 files changed, 3 insertions, 3 deletions
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
'';
};