feat(nat): Enable nat (with ip_forward)

This commit is contained in:
catvayor 2024-05-26 20:49:02 +02:00
parent a00833c682
commit 37a18c0347
Signed by untrusted user: lbailly
GPG key ID: CE3E645251AC63F3

View file

@ -190,5 +190,21 @@ in
}; };
}; };
networking.firewall.allowedUDPPorts = [ 67 ]; networking = {
nftables = {
enable = true;
tables.nat = {
family = "ip";
content = ''
chain postrouting {
type nat hook postrouting priority 100;
snat ip to 129.199.195.130-129.199.195.158
}
'';
};
};
firewall.allowedUDPPorts = [ 67 ];
};
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
} }