haios/modules/nixos/networking/firewall/default.nix
2025-02-18 21:31:23 +02:00

30 lines
465 B
Nix

{
pkgs,
lib,
...
}: let
inherit (lib.modules) mkForce;
in {
imports = [
./fail2ban.nix
];
config = {
networking.firewall = {
enable = true;
package = pkgs.iptables;
allowedTCPPorts = [
443
80
];
allowedUDPPorts = [];
# make a much smaller and easier to read log
logReversePathDrops = true;
logRefusedConnections = false;
checkReversePath = mkForce false;
};
};
}