summaryrefslogtreecommitdiff
path: root/nix/modules/fail2ban.nix
blob: 5d289a0c5cf738b21f9c0e1bd16030b4d2c6c040 (plain)
1
2
3
4
5
6
7
8
9
10
11
{ lib, config, ... }:
{
  services.fail2ban = {
    enable = lib.mkDefault config.monorepo.profiles.server.enable;
    # Ban IP after 5 failures for 1 hour
    maxretry = 5;
    bantime = "1h";
    banaction = "iptables-allports";
    banaction-allports = "iptables-allports";
  };
}