reaction/reaction.yml

24 lines
528 B
YAML

---
definitions:
- &iptablesban iptables -I reaction 1 -s <ip> -j block
- &iptablesunban iptables -D reaction 1 -s <ip> -j block
patterns:
ip: '(([0-9]{1,3}\.){3}[0-9]{1,3})|([0-9a-fA-F:]{2,90})'
streams:
tailDown:
cmd: [ "tail", "/home/ao/DOWN" ]
filters:
findIP:
regex:
- found <ip>
# retry: 1
retry-period: 1s
actions:
damn:
cmd: [ "echo", "<ip>" ]
sleepdamn:
cmd: [ "echo", "sleep", "<ip>" ]
after: 1s