mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
hosts/ni/services/fail2ban: update settings
This commit is contained in:
parent
a91e89b6a3
commit
44ae723bd9
@ -13,6 +13,13 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
bantime-increment = {
|
||||
enable = true;
|
||||
factor = "4";
|
||||
maxtime = "24h";
|
||||
overalljails = true;
|
||||
};
|
||||
extraPackages = with pkgs; [ ipset ];
|
||||
ignoreIP = [
|
||||
# VPN clients.
|
||||
"${interfaces.wireguard0.IPv4.address}/13"
|
||||
|
@ -75,7 +75,7 @@ in
|
||||
security.dhparams.params.nginx.bits = 4096;
|
||||
}
|
||||
|
||||
(lib.mkIf config.profiles.server.enable {
|
||||
(lib.mkIf hostCfg.services.fail2ban.enable {
|
||||
# Some fail2ban policies to apply for nginx.
|
||||
services.fail2ban.jails = {
|
||||
nginx-http-auth.settings = { enabled = true; };
|
||||
|
Loading…
Reference in New Issue
Block a user