mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
crowdsec
This commit is contained in:
parent
3d7f565c37
commit
5abbaddeaf
1 changed files with 26 additions and 23 deletions
|
|
@ -4,8 +4,6 @@
|
|||
services.crowdsec = {
|
||||
enable = true;
|
||||
|
||||
allowLocalAPI = true;
|
||||
|
||||
hub = {
|
||||
collections = [
|
||||
"crowdsecurity/linux"
|
||||
|
|
@ -15,30 +13,35 @@
|
|||
];
|
||||
};
|
||||
|
||||
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";
|
||||
}
|
||||
];
|
||||
};
|
||||
localConfig = {
|
||||
# Log Sources
|
||||
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";
|
||||
}
|
||||
];
|
||||
|
||||
api.server.enable = true;
|
||||
};
|
||||
};
|
||||
services.crowdsec-firewall-bouncer = {
|
||||
enable = true;
|
||||
|
||||
registerBouncer = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue