mirror of
https://github.com/aykhans/my-self-host-services.git
synced 2026-05-29 15:35:59 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ba03407420 | |||
| 8092079047 | |||
| c9b2d723d8 |
@@ -4,6 +4,7 @@
|
||||
# and in caddy/.env (CADDY) and the host firewall bouncer config (FW).
|
||||
CROWDSEC_BOUNCER_KEY_CADDY=
|
||||
CROWDSEC_BOUNCER_KEY_FW=
|
||||
CROWDSEC_BOUNCER_KEY_EXPORTER=
|
||||
|
||||
############# Console enrollment #############
|
||||
# Enroll key from https://app.crowdsec.net (free).
|
||||
|
||||
@@ -26,6 +26,7 @@ services:
|
||||
Dominic-Wagner/vaultwarden
|
||||
BOUNCER_KEY_caddy: "${CROWDSEC_BOUNCER_KEY_CADDY}"
|
||||
BOUNCER_KEY_firewall: "${CROWDSEC_BOUNCER_KEY_FW}"
|
||||
BOUNCER_KEY_exporter: "${CROWDSEC_BOUNCER_KEY_EXPORTER}"
|
||||
ENROLL_KEY: "${CROWDSEC_ENROLL_KEY:-}"
|
||||
ENROLL_INSTANCE_NAME: "${CROWDSEC_ENROLL_INSTANCE_NAME:-aykhans-prod}"
|
||||
ports:
|
||||
@@ -61,7 +62,7 @@ services:
|
||||
- caddy
|
||||
environment:
|
||||
CROWDSEC_LAPI_URL: "http://crowdsec:8080"
|
||||
CROWDSEC_API_KEY: "${CROWDSEC_BOUNCER_KEY_CADDY}"
|
||||
CROWDSEC_API_KEY: "${CROWDSEC_BOUNCER_KEY_EXPORTER}"
|
||||
POLL_INTERVAL_SECS: "30"
|
||||
LISTEN_PORT: "9100"
|
||||
GEOIP_CITY_DB: "/geoip/GeoLite2-City.mmdb"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
name: default_ip_remediation
|
||||
filters:
|
||||
- Alert.Remediation == true && Alert.GetScope() == "Ip"
|
||||
duration_expr: Sprintf('%dh', min(730, (GetDecisionsCount(Alert.GetValue())+1)*4))
|
||||
decisions:
|
||||
- type: ban
|
||||
duration: 4h
|
||||
duration_expr: Sprintf('%dh', min(168, (GetDecisionsCount(Alert.GetValue())+1)*4))
|
||||
on_success: break
|
||||
|
||||
---
|
||||
name: default_range_remediation
|
||||
filters:
|
||||
- Alert.Remediation == true && Alert.GetScope() == "Range"
|
||||
duration_expr: Sprintf('%dh', min(730, (GetDecisionsCount(Alert.GetValue())+1)*4))
|
||||
decisions:
|
||||
- type: ban
|
||||
duration: 4h
|
||||
duration_expr: Sprintf('%dh', min(168, (GetDecisionsCount(Alert.GetValue())+1)*4))
|
||||
on_success: break
|
||||
|
||||
Reference in New Issue
Block a user