Compare commits

..

1 commit

Author SHA1 Message Date
Bruno BELANYI 4e093fbff3 nixos: services: nextcloud: add fail2ban jail
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2024-09-22 01:37:34 +02:00
2 changed files with 1 additions and 16 deletions

View file

@ -48,21 +48,5 @@ in
inherit (cfg) port; inherit (cfg) port;
}; };
}; };
services.fail2ban.jails = {
miniflux = ''
enabled = true
filter = miniflux
port = http,https
'';
};
environment.etc = {
"fail2ban/filter.d/miniflux.conf".text = ''
[Definition]
failregex = ^.*msg="[^"]*(Incorrect|Invalid) username or password[^"]*".*client_ip=<ADDR>
journalmatch = _SYSTEMD_UNIT=miniflux.service
'';
};
}; };
} }

View file

@ -107,5 +107,6 @@ in
journalmatch = _SYSTEMD_UNIT=phpfpm-nextcloud.service journalmatch = _SYSTEMD_UNIT=phpfpm-nextcloud.service
''; '';
}; };
}; };
} }