Benjamin Renard authored 9 years ago
1) Fail2ban action script to stock banned IP in a JSON file 2) ======================================================== 3) 4) This script is design to be use as action script for fail2ban. 5) 6) Installation 7) ------------ 8) 9) - Put action.d/jsonfile.conf in /etc/fail2ban/action.d 10) - Put bin/fail2ban-jsonfile in /usr/local/bin/fail2ban-jsonfile 11) 12) Configuration 13) ------------- 14) 15) Jail example : 16) 17) [myapp] 18) enabled = true 19) filter = myapp 20) action = jsonfile[jsonpath=/var/tmp/myapp-banned-ip.json] 21) logpath = /var/log/myapp.log 22) 23) Parameters : 24) 25) - bin : 26) Specify the path to fail2ban-jsonfile script 27) Default : /usr/local/bin/fail2ban-jsonfile 28) 29) - jsonpath : 30) The path of JSON file 31) Default : /tmp/fail2ban-jsonfile.json 32) 33) - umask : 34) Umask use on JSON file creation (Integer) 35) Default : 0077