mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +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 {
|
config = lib.mkIf cfg.enable {
|
||||||
services.fail2ban = {
|
services.fail2ban = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
bantime-increment = {
|
||||||
|
enable = true;
|
||||||
|
factor = "4";
|
||||||
|
maxtime = "24h";
|
||||||
|
overalljails = true;
|
||||||
|
};
|
||||||
|
extraPackages = with pkgs; [ ipset ];
|
||||||
ignoreIP = [
|
ignoreIP = [
|
||||||
# VPN clients.
|
# VPN clients.
|
||||||
"${interfaces.wireguard0.IPv4.address}/13"
|
"${interfaces.wireguard0.IPv4.address}/13"
|
||||||
|
@ -75,7 +75,7 @@ in
|
|||||||
security.dhparams.params.nginx.bits = 4096;
|
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.
|
# Some fail2ban policies to apply for nginx.
|
||||||
services.fail2ban.jails = {
|
services.fail2ban.jails = {
|
||||||
nginx-http-auth.settings = { enabled = true; };
|
nginx-http-auth.settings = { enabled = true; };
|
||||||
|
Loading…
Reference in New Issue
Block a user