diff options
| author | Preston Pan <ret2pop@gmail.com> | 2026-02-12 17:37:56 -0800 |
|---|---|---|
| committer | Preston Pan <ret2pop@gmail.com> | 2026-02-12 17:37:56 -0800 |
| commit | ef4bd15026b83f487cf064e7b7ce098cc8aca375 (patch) | |
| tree | d6b8e7a57633164082792ab28932bea24513e2bb /nix/modules/fail2ban.nix | |
| parent | 6a4f95482fa2c0faeafa028eae164d00c6418ac3 (diff) | |
fix vps, maddy, everything works
Diffstat (limited to 'nix/modules/fail2ban.nix')
| -rw-r--r-- | nix/modules/fail2ban.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nix/modules/fail2ban.nix b/nix/modules/fail2ban.nix new file mode 100644 index 0000000..5d289a0 --- /dev/null +++ b/nix/modules/fail2ban.nix @@ -0,0 +1,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"; + }; +} |
