feat: Replace the now missing fail2ban with crowdsec
This commit is contained in:
parent
b90af26085
commit
6e2b796c0d
5 changed files with 38 additions and 3 deletions
configuration/services
26
configuration/services/crowdsec.nix
Normal file
26
configuration/services/crowdsec.nix
Normal 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";
|
||||
# };
|
||||
# };
|
Loading…
Add table
Add a link
Reference in a new issue