diff options
author | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2024-03-22 16:12:05 +0700 |
---|---|---|
committer | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2024-03-22 16:12:55 +0700 |
commit | 4a5be726c77c5989552c19f60d0e2731a64e2190 (patch) | |
tree | e92c1501b1e36a96151ffaf78105a9d052eb157d /fail2ban.nix | |
parent | 17c3aabcc7d81c9d540517581b23471c8f98d216 (diff) | |
download | nixos-conf-4a5be726c77c5989552c19f60d0e2731a64e2190.tar.gz |
Update config for fail2ban
Diffstat (limited to 'fail2ban.nix')
-rw-r--r-- | fail2ban.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/fail2ban.nix b/fail2ban.nix new file mode 100644 index 0000000..d30f6b0 --- /dev/null +++ b/fail2ban.nix @@ -0,0 +1,36 @@ +# Configuration for fail2ban +# Copyright (C) 2024 Ngô Ngọc Đức Huy +# +# This file is part of loang configuration. +# +# Loang configuration is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Loang configuration is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with loang configuration. If not, see <https://www.gnu.org/licenses/>. + +{ pkgs, ... }: +{ + services.jail2ban = { + enable = true; + bantime = "30m"; + bantime-increment = { + enable = true; + maxtime = "7d"; + }; + jails = { + maddy = { + settings = { + logpath = "/var/log/maddy.log"; + }; + }; + }; + }; +}; |