update(baldur): better fail2ban filters

This commit is contained in:
Filippo Berto 2025-10-16 15:19:35 +02:00
parent 3cb057a31a
commit 79138d965d
No known key found for this signature in database
GPG key ID: F1D17F9BCEC62FBC

View file

@ -51,6 +51,14 @@
enable = true;
bantime-increment.enable = true;
jails = {
"nginx-bad-request" = {
settings = {
filter = "nginx-bad-request";
action = ''nftables-multiport[name=HTTP, port="http,https"]'';
logpath = "/var/log/nginx/error.log*";
backend = "auto";
};
};
"nginx-botsearch" = {
settings = {
filter = "nginx-botsearch";
@ -59,6 +67,14 @@
backend = "auto";
};
};
"nginx-forbidden" = {
settings = {
filter = "nginx-forbidden";
action = ''nftables-multiport[name=HTTP, port="http,https"]'';
logpath = "/var/log/nginx/error.log*";
backend = "auto";
};
};
"nginx-http-auth" = {
settings = {
filter = "nginx-http-auth";
@ -67,6 +83,14 @@
backend = "auto";
};
};
"nginx-limit-req" = {
settings = {
filter = "nginx-limit-req";
action = ''nftables-multiport[name=HTTP, port="http,https"]'';
logpath = "/var/log/nginx/error.log*";
backend = "auto";
};
};
};
};
nginx = {