From 971c3d93feefb6f189faaa13faf93f890d40b9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 24 Dec 2014 14:45:48 +0100 Subject: [PATCH 1/2] Monit config Copy it to `/etc/monit/monitrc.d/fail2ban` More info: https://github.com/szepeviktor/debian-server-tools/blob/master/monitoring/monit/monit-debian-setup.sh#L113 --- files/monit/fail2ban | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 files/monit/fail2ban diff --git a/files/monit/fail2ban b/files/monit/fail2ban new file mode 100644 index 00000000..8e6c9419 --- /dev/null +++ b/files/monit/fail2ban @@ -0,0 +1,9 @@ +check process fail2ban with pidfile /var/run/fail2ban/fail2ban.pid + group services + start program = "/etc/init.d/fail2ban force-start" + stop program = "/etc/init.d/fail2ban stop || :" + if failed unixsocket /var/run/fail2ban/fail2ban.sock then restart + if 5 restarts within 5 cycles then timeout + +check file fail2ban_log with path /var/log/fail2ban.log + if match "ERROR|WARNING" then alert From 10f68f494605fac41310ffc9a4bfc48158535013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 24 Dec 2014 15:00:25 +0100 Subject: [PATCH 2/2] Update ChangeLog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 690b168a..db419c3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,7 @@ ver. 0.9.2 (2014/XX/XXX) - wanna-be-released possible to extend a stock filter or jail regexp in .local file (opposite to simply set failregex/ignoreregex that overwrites it), see gh-867. + - Monit config for fail2ban in /files/monit - Enhancements: * Enable multiport for firewallcmd-new action. Closes gh-834