Allow forwarding all traffic
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Andrea Ciceri 2025-05-29 15:33:16 +02:00
parent 908508743b
commit 12b731ef9a
No known key found for this signature in database

View file

@ -2,6 +2,7 @@
config,
lib,
vpn,
pkgs,
...
}:
{
@ -17,5 +18,13 @@
publicKey = vpnConfig.publicKey;
allowedIPs = [ "${vpnConfig.ip}/32" ];
}) vpn;
postSetup = ''
${lib.getExeo' pkgs.iptables "iptables"} -t nat -A POSTROUTING -s 10.100.0.0/24 -o enP4p65s0 -j MASQUERADE
'';
postShutdown = ''
${lib.getExe' pkgs.iptables "iptables"} -t nat -D POSTROUTING -s 10.100.0.0/24 -o enP4p65s0 -j MASQUERADE
'';
};
}