fix crowdsec/traefik
This commit is contained in:
parent
d496f1259d
commit
3df22f9eb0
9 changed files with 77 additions and 72 deletions
|
@ -1,6 +1,5 @@
|
|||
listen_addr: 127.0.0.1:7422
|
||||
appsec_config: crowdsecurity/appsec-default
|
||||
name: traefik
|
||||
source: appsec
|
||||
labels:
|
||||
type: appsec
|
||||
listen_addr: 127.0.0.1:7422
|
||||
source: appsec
|
||||
|
|
5
nixos/viridian/services/crowdsec/acquis.d/syslog.yaml
Normal file
5
nixos/viridian/services/crowdsec/acquis.d/syslog.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
source: journalctl
|
||||
journalctl_filter:
|
||||
- "_SYSTEMD_UNIT=ssh.service"
|
||||
labels:
|
||||
type: syslog
|
5
nixos/viridian/services/crowdsec/acquis.d/traefik.yaml
Normal file
5
nixos/viridian/services/crowdsec/acquis.d/traefik.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
poll_without_inotify: false
|
||||
filenames:
|
||||
- /var/log/traefik/access.log
|
||||
labels:
|
||||
type: traefik
|
|
@ -21,14 +21,7 @@ in {
|
|||
group = "crowdsec";
|
||||
};
|
||||
|
||||
services.crowdsec = let
|
||||
yaml = (pkgs.formats.yaml {}).generate;
|
||||
acquisitions_file = yaml "acquisitions.yaml" {
|
||||
source = "journalctl";
|
||||
journalctl_filter = ["_SYSTEMD_UNIT=sshd.service"];
|
||||
labels.type = "syslog";
|
||||
};
|
||||
in {
|
||||
services.crowdsec = {
|
||||
enable = true;
|
||||
allowLocalJournalAccess = true;
|
||||
enrollKeyFile = config.age.secrets.enrollment-key.path;
|
||||
|
@ -36,7 +29,6 @@ in {
|
|||
api.server = {
|
||||
listen_uri = "127.0.0.1:${port}";
|
||||
};
|
||||
crowdsec_service.acquisition_path = acquisitions_file;
|
||||
crowdsec_service.acquisition_dir = ./acquis.d;
|
||||
};
|
||||
};
|
||||
|
@ -80,6 +72,22 @@ in {
|
|||
if ! cscli collections list | grep -q "crowdsecurity/appsec-generic-rules"; then
|
||||
cscli collections install "crowdsecurity/appsec-generic-rules"
|
||||
fi
|
||||
|
||||
if ! cscli collections list | grep -q "crowdsecurity/traefik"; then
|
||||
cscli collections install "crowdsecurity/traefik"
|
||||
fi
|
||||
|
||||
if ! cscli collections list | grep -q "crowdsecurity/http-cve"; then
|
||||
cscli collections install "crowdsecurity/http-cve"
|
||||
fi
|
||||
|
||||
if ! cscli collections list | grep -q "crowdsecurity/sshd"; then
|
||||
cscli collections install "crowdsecurity/sshd"
|
||||
fi
|
||||
|
||||
if ! cscli collections list | grep -q "crowdsecurity/base-http-scenarios"; then
|
||||
cscli collections install "crowdsecurity/base-http-scenarios"
|
||||
fi
|
||||
'';
|
||||
in [
|
||||
"${bouncer}/bin/register-bouncer"
|
||||
|
|
Binary file not shown.
|
@ -1,9 +0,0 @@
|
|||
age-encryption.org/v1
|
||||
-> piv-p256 hdSnGw A6O6zvEq05hpB3GxDsrj2rUxr0P031TKreOe3ZAfUpJs
|
||||
Ww8Qg1MV5dJoCYQEGSNLUnZdX7dO1cGu3XaQTyn97PA
|
||||
-> 0(D-grease b? xbW Qg ~cDE0j!
|
||||
s5z0LGzRiWS6lMMphO19nB7qmvXkto4RJrcTSrOtPHbY9Iam2aeYA0qN4faK40Zs
|
||||
XPc
|
||||
--- q1PoY78SatX6wOKNW549+ndCCrNhveA8dHcHQpF+slk
|
||||
l
<0A>¾ß`òŠæ¨=(¡¾è;>Y[)Pfwú.§…óQ²¹¸W5áòØØL©Ã—K£DˆTœY$’µŸ
|
||||
ý’Ù¿zñ¨Ã]
|
Loading…
Add table
Add a link
Reference in a new issue