nixos-config/hosts/sup/firewall-services.nix

18 lines
290 B
Nix
Raw Permalink Normal View History

2022-06-01 18:27:21 +00:00
{ config, lib, pkgs, ... }:
{
networking.firewall = {
allowPing = true;
# allowed TCP range
allowedTCPPorts = [ 22 80 2342 9001 9002];
};
services.fail2ban = {
enable = true;
maxretry = 2;
ignoreIP = [
"127.0.0.0/8"
"212.114.16.52"
];
};
}