reaction/reaction.yml

24 lines
621 B
YAML
Raw Normal View History

2023-03-23 21:14:53 +01:00
---
definitions:
- &iptablesban iptables -I reaction 1 -s <ip> -j block
- &iptablesunban iptables -D reaction 1 -s <ip> -j block
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-03-24 00:27:51 +01:00
tailDown:
2023-03-25 19:12:11 +01:00
cmd: [ "sh", "-c", "echo 'found 1.1.1.1' && sleep 2s && echo 'found 1.1.1.2' && sleep 2s && echo 'found 1.1.1.1' && sleep 1s" ]
2023-03-23 21:14:53 +01:00
filters:
2023-03-24 17:36:41 +01:00
findIP:
2023-03-24 00:27:51 +01:00
regex:
2023-03-24 17:36:41 +01:00
- found <ip>
2023-03-25 19:12:11 +01:00
retry: 2
retry-period: 5s
2023-03-23 21:14:53 +01:00
actions:
2023-03-24 00:27:51 +01:00
damn:
2023-03-24 17:36:41 +01:00
cmd: [ "echo", "<ip>" ]
2023-03-24 00:27:51 +01:00
sleepdamn:
2023-03-24 17:36:41 +01:00
cmd: [ "echo", "sleep", "<ip>" ]
after: 1s