add masquerade to iptables to enable ip forwarding

This commit is contained in:
Lillian Violet 2024-12-06 19:52:22 +01:00
parent 2a29f5587a
commit 7f7175ca9d

View file

@ -205,6 +205,11 @@
};
};
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
networking.firewall.extraCommands = ''
iptables -t nat -A POSTROUTING -s 10.5.5.1/24 ! -d 10.5.5.1/24 -j MASQUERADE
'';
networking.firewall = {
enable = true;
allowPing = false;