mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
crowdsec
This commit is contained in:
parent
2580cbd227
commit
5742bc2a7d
1 changed files with 29 additions and 34 deletions
|
|
@ -3,47 +3,42 @@
|
|||
{
|
||||
services.crowdsec = {
|
||||
enable = true;
|
||||
allowLocalAPI = true;
|
||||
|
||||
hub = {
|
||||
collections = [
|
||||
"crowdsecurity/linux"
|
||||
"crowdsecurity/sshd"
|
||||
"crowdsecurity/traefik"
|
||||
"crowdsecurity/http-cve"
|
||||
];
|
||||
};
|
||||
api.server.enable = true;
|
||||
|
||||
localConfig = {
|
||||
acquisitions = [
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = [ "_SYSTEMD_UNIT=sshd.service" ];
|
||||
labels.type = "syslog";
|
||||
}
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = [
|
||||
"SYSLOG_IDENTIFIER=sudo"
|
||||
"SYSLOG_IDENTIFIER=auth"
|
||||
];
|
||||
labels.type = "syslog";
|
||||
}
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = [ "_SYSTEMD_UNIT=docker-traefik.service" ];
|
||||
labels.type = "traefik";
|
||||
}
|
||||
];
|
||||
};
|
||||
hub.collections = [
|
||||
"crowdsecurity/linux"
|
||||
"crowdsecurity/sshd"
|
||||
"crowdsecurity/traefik"
|
||||
"crowdsecurity/http-cve"
|
||||
];
|
||||
|
||||
localConfig = [
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = [ "_SYSTEMD_UNIT=sshd.service" ];
|
||||
labels.type = "syslog";
|
||||
}
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = [
|
||||
"SYSLOG_IDENTIFIER=sudo"
|
||||
"SYSLOG_IDENTIFIER=auth"
|
||||
];
|
||||
labels.type = "syslog";
|
||||
}
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = [ "_SYSTEMD_UNIT=docker-traefik.service" ];
|
||||
labels.type = "traefik";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.crowdsec-firewall-bouncer = {
|
||||
enable = true;
|
||||
|
||||
registerBouncer = {
|
||||
enable = true;
|
||||
};
|
||||
registerBouncer.enable = true;
|
||||
|
||||
settings = {
|
||||
mode = "nftables";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue