nixos-config/hosts/web/firewall-web.nix

18 lines
299 B
Nix
Raw Permalink Normal View History

2022-05-26 10:55:06 +00:00
{ config, lib, pkgs, ... }:
{
networking.firewall = {
allowPing = true;
# allowed TCP range
allowedTCPPorts = [ 22 80 443 9002 2021 8096 8920];
2022-05-26 10:55:06 +00:00
};
services.fail2ban = {
enable = true;
maxretry = 2;
ignoreIP = [
"127.0.0.0/8"
"212.114.16.52"
];
};
}