You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -96,14 +94,33 @@ For manual installations before starting the `crowdsec-blocklist-mirror` service
96
94
97
95
The default configuration file is located under : `/etc/crowdsec/bouncers/` as file `crowdsec-blocklist-mirror.yaml`.
98
96
99
-
If you need to download and restore the configuration file you can find an example on the [Respository](https://github.com/crowdsecurity/cs-blocklist-mirror/blob/main/config/crowdsec-blocklist-mirror.yaml)
97
+
If you need to download and restore the configuration file you can find an example on the [Repository](https://github.com/crowdsecurity/cs-blocklist-mirror/blob/main/config/crowdsec-blocklist-mirror.yaml)
100
98
101
99
## Configuration Reference
102
100
103
101
### `crowdsec_config`
104
102
105
103
Used to nest the configuration related to crowdsec.
106
104
105
+
```yaml title="Example"
106
+
crowdsec_config:
107
+
lapi_url: http://127.0.0.1:8080
108
+
lapi_key: ${LAPI_KEY}
109
+
update_frequency: 10s
110
+
supported_decisions_types:
111
+
- ban
112
+
include_scenarios_containing:
113
+
- ssh
114
+
- http
115
+
exclude_scenarios_containing:
116
+
- dns
117
+
only_include_decisions_from:
118
+
- crowdsec
119
+
- cscli
120
+
insecure_skip_verify: false
121
+
listen_uri: 127.0.0.1:41412
122
+
```
123
+
107
124
#### `lapi_url`
108
125
> string
109
126
@@ -138,13 +155,23 @@ Path to the CA file used to trust the LAPI certificate.
138
155
139
156
The component will poll the CrowdSec LAPI every `update_frequency` interval.
140
157
158
+
#### `supported_decisions_types`
159
+
> [ ]string
160
+
161
+
Limit mirrored blocklists to specific decision types (for example `ban`, `captcha`).
162
+
163
+
- Empty/missing list: no type filtering (all types).
164
+
- Case-insensitive matching.
165
+
141
166
#### `include_scenarios_containing`
142
167
> [ ]string
143
168
144
169
Ignore IPs banned for triggering scenarios not containing the provided words.
@@ -198,15 +235,26 @@ The URI endpoint to serve the metrics on.
198
235
199
236
List of blocklists to serve. Each blocklist has the following configuration.
200
237
238
+
```yaml title="Example"
239
+
blocklists:
240
+
- format: plain_text
241
+
aggregate: true
242
+
endpoint: /security.txt
243
+
authentication:
244
+
type: none
245
+
```
246
+
201
247
#### `format`
202
248
> string
203
249
204
-
Format of the blocklist, the following are supported:
250
+
Format of the blocklist. See the supported values and examples in the [Formats](#formats) section.
205
251
206
-
- `plain_text` : One IP per line
207
-
- `mikrotik` : Generates a mikrotik script
208
-
- `F5` : Lines for f5 appliances
209
-
- `juniper`: One entry per line using CIDR notation
252
+
#### `aggregate`
253
+
> boolean
254
+
255
+
When enabled, aggregate decisions into CIDR ranges to reduce the size of the served blocklist.
256
+
257
+
This changes the output to CIDR ranges (including `/32` and `/128` for single IPs) and makes per-decision metadata unavailable, so runtime filters that rely on such metadata (for example `?origin=`) are not compatible.
210
258
211
259
#### `endpoint`
212
260
> string
@@ -220,7 +268,7 @@ Configuration used to enforce or bypass authentication on the blocklist.
220
268
##### `type`:
221
269
> `none` | `basic` | `ip_based`
222
270
223
-
The type of authetentication to impose:
271
+
The type of authentication to impose:
224
272
225
273
- `none` : No authentication required.
226
274
- `basic` : Basic authentication required.
@@ -245,6 +293,12 @@ List of valid IPv4 and IPv6 IPs and ranges which have access to blocklist. It's
245
293
246
294
TLS Configuration is utilized to activate HTTPS on the mirror server.
If omitted, the YAML value applies. To include all types, omit the parameter and leave the YAML list empty.
355
+
289
356
You can then start the service via:
290
357
291
358
```bash
@@ -372,22 +439,15 @@ Example:
372
439
373
440
#### SRX Dynamic Address configuration sample
374
441
375
-
Using the blocklist on a Juniper SRX requires that the published url ends in .txt. This can be acieved by altering the endpoint config in`cfg.yaml` as follows:
442
+
Using the blocklist on a Juniper SRX requires that the published URL ends in`.txt`. This can be achieved by altering the endpoint config in`cfg.yaml` as follows:
376
443
377
-
Sample `cfg.yaml`
444
+
Sample `cfg.yaml`:
378
445
```yaml
379
-
####
380
446
blocklists:
381
-
- format: juniper# Supported formats are either of "plain_text", "mikrotik", "juniper"
382
-
endpoint: /security/blocklist.txt #Must have .txt for juniper formatter.
447
+
- format: juniper
448
+
endpoint: /security/blocklist.txt #Must end with `.txt` for the Juniper formatter.
383
449
authentication:
384
-
type: none # Supported types are either of "none", "ip_based", "basic"
385
-
user:
386
-
password:
387
-
trusted_ips: # IP ranges, or IPs which don't require auth to access this blocklist
388
-
- 127.0.0.1
389
-
- ::1
390
-
####
450
+
type: none
391
451
```
392
452
393
453
This can then be configured on the SRX firewall as follows:
0 commit comments