configuration.nix/hosts/bifrost/network/firewall.nix
2024-11-21 10:50:31 +05:30

19 lines
436 B
Nix

_: {
networking = {
nftables = {
enable = true;
ruleset = ''
table ip nat {
chain PREROUTING {
type nat hook prerouting priority dstnat;
iifname ens3 tcp dport 22 dnat to 10.10.10.13:2222
}
chain POSTROUTING {
type nat hook postrouting priority srcnat;
ip daddr 10.10.10.13 masquerade
};
}
'';
};
};
}