feat: Replace the now missing fail2ban with crowdsec

This commit is contained in:
Tristan Daniël Maat 2025-01-24 02:14:46 +08:00
parent b90af26085
commit 6e2b796c0d
Signed by: tlater
GPG key ID: 49670FD774E43268
5 changed files with 38 additions and 3 deletions
configuration/services

View file

@ -0,0 +1,26 @@
{ pkgs, config, ... }:
{
services.crowdsec = {
enable = true;
# clientCredentials = config.sops.secrets."crowdsec/credentials".path;
settings.crowdsec_service.acquisition_path =
(pkgs.formats.yaml { }).generate "crowdsec-acquisitions.yaml"
{
source = "journalctl";
journalctl_filter = [ "_SYSTEMD_UNIT=sshd.service" ];
labels.type = "syslog";
};
};
}
# db_config = {
# type = "postgresql";
# db_path = "/run/postgresql";
# user = "crowdsec";
# db_name = "crowdsec";
# flush = {
# max_items = 10000;
# max_age = "14d";
# };
# };