reaction/reaction.yml

24 lines
588 B
YAML
Raw Normal View History

2023-03-23 21:14:53 +01:00
---
definitions:
2023-04-11 13:01:02 +02:00
- &iptablesban [ "iptables" "-w" "-I" "reaction" "1" "-s" "<ip>" "-j" "block" ]
- &iptablesunban [ "iptables" "-w" "-D" "reaction" "1" "-s" "<ip>" "-j" "block" ]
2023-03-23 21:14:53 +01:00
2023-03-24 17:36:41 +01:00
patterns:
ip: '(([0-9]{1,3}\.){3}[0-9]{1,3})|([0-9a-fA-F:]{2,90})'
2023-03-23 21:14:53 +01:00
streams:
2023-04-11 13:01:02 +02:00
ssh:
cmd: [ "journalctl" "-fu" "sshd.service" ]
2023-03-23 21:14:53 +01:00
filters:
2023-04-11 13:01:02 +02:00
failedlogin:
2023-03-24 00:27:51 +01:00
regex:
2023-04-11 13:01:02 +02:00
- authentication failure;.*rhost=<ip>
retry: 3
retry-period: 6h
2023-03-23 21:14:53 +01:00
actions:
2023-04-11 13:01:02 +02:00
ban:
cmd: *iptablesban
unban:
cmd: *iptablesunban
after: 2d