services: nginx: enable fail2ban 'apache-badbots' filter
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
9250581753
commit
e373b1aa98
|
@ -48,4 +48,16 @@
|
|||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
};
|
||||
|
||||
services.fail2ban.jails.apache-badbots =
|
||||
lib.mkIf config.services.fail2ban.enable {
|
||||
settings = {
|
||||
enabled = true;
|
||||
port = "http,https";
|
||||
filter = "apache-badbots";
|
||||
logpath = "/var/log/nginx/access.log";
|
||||
maxretry = 1;
|
||||
bantime = "72h";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue