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

21 lines
504 B
Nix
Raw Normal View History

_: {
2024-11-23 00:22:19 +05:30
systemd.services.nftables.after = [ "wg-quick-Homelab.service" ];
networking = {
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
};
}
'';
};
};
}