nixos/common/firewall.nix

27 lines
538 B
Nix
Raw Normal View History

2024-09-29 03:02:03 +00:00
{ config, pkgs, ... }:
{
networking.firewall.enable = false;
networking.nftables = {
enable = true;
ruleset = ''
table inet filter {
chain input {
type filter hook input priority 0; policy accept;
}
chain forward {
type filter hook forward priority 0; policy accept
}
chain output {
type filter hook output priority 0; policy accept
# Block outgoing mail traffic
tcp dport {25, 465, 587} drop
}
}
'';
};
}