configuration.nix/hosts/bifrost/network/firewall.nix

21 lines
478 B
Nix
Raw Normal View History

_: {
networking = {
firewall.allowedTCPPorts = [ 42069 ];
nftables = {
enable = true;
ruleset = ''
table ip nat {
chain PREROUTING {
2024-11-19 23:35:28 +05:30
type nat hook prerouting priority dstnat;
iifname ens3 tcp dport 22 dnat to 10.10.10.13:2222
}
chain POSTROUTING {
2024-11-19 23:35:28 +05:30
type nat hook postrouting priority srcnat;
ip daddr 10.10.10.13 masquerade
};
}
'';
};
};
}