2023-03-18 21:39:01 +01:00
|
|
|
# Serveur
|
|
|
|
|
|
|
|
`reactiond <FILEPATH>`
|
|
|
|
|
|
|
|
Avec un défaut à `/etc/reaction/reactiond.conf`
|
|
|
|
|
|
|
|
```yaml
|
2023-03-23 14:24:26 +01:00
|
|
|
definitions:
|
|
|
|
- &iptablesban iptables -I reaction 1 -s <ip> -j block
|
|
|
|
- &iptablesunban iptables -D reaction 1 -s <ip> -j block
|
|
|
|
|
2023-03-18 21:39:01 +01:00
|
|
|
regexes:
|
2023-03-23 14:24:26 +01:00
|
|
|
ip: '(([0-9]{1,3}\.){3}[0-9]{1,3})|([0-9a-fA-F:]{2,90})'
|
2023-03-19 23:09:59 +01:00
|
|
|
|
2023-03-18 21:39:01 +01:00
|
|
|
streams:
|
2023-03-23 14:24:26 +01:00
|
|
|
nextcloud:
|
|
|
|
cmd: journalctl -fu phpfpm-nextcloud.service
|
|
|
|
filters:
|
|
|
|
failed-login:
|
|
|
|
regex:
|
|
|
|
- '"message":"Login failed: .\+ (Remote IP: <ip>)"'
|
|
|
|
retry: 3
|
|
|
|
retry-period: 1h
|
|
|
|
actions:
|
|
|
|
ban:
|
|
|
|
cmd: *iptablesban
|
|
|
|
unban:
|
|
|
|
cmd: *iptablesunban
|
|
|
|
after: 1h
|
2023-03-18 21:39:01 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
reactionc: le client
|