From 818dd59d652f38fe1edd499f23f49c812a99389e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 8 Aug 2014 11:57:30 -0400 Subject: [PATCH] ENH: symbiosis-blacklist-allports action --- ChangeLog | 8 +-- .../symbiosis-blacklist-allports.conf | 52 +++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 config/action.d/symbiosis-blacklist-allports.conf diff --git a/ChangeLog b/ChangeLog index afd151ae..9e47e987 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,9 +46,11 @@ ver. 0.9.1 (2014/xx/xx) - better, faster, stronger * filters.d/sieve.conf - fixed typo in _daemon. Thanks Jisoo Park - New features: - - Added - - monit filter. Thanks Jason H Martin - - directadmin filter. Thanks niorg + - New filters: + - monit Thanks Jason H Martin + - directadmin Thanks niorg + - New actions: + - symbiosis-blacklist-allports for Bytemark symbiosis firewall - fail2ban-client can fetch the running server version - Added Cloudflare API action diff --git a/config/action.d/symbiosis-blacklist-allports.conf b/config/action.d/symbiosis-blacklist-allports.conf new file mode 100644 index 00000000..c3ce44b0 --- /dev/null +++ b/config/action.d/symbiosis-blacklist-allports.conf @@ -0,0 +1,52 @@ +# Fail2Ban configuration file for Bytemark Symbiosis firewall +# +# Author: Yaroslav Halchenko +# + + +[Definition] + +# Option: actionstart +# Notes.: command executed once at the start of Fail2Ban. +# Values: CMD +# +actionstart = + +# Option: actionstop +# Notes.: command executed once at the end of Fail2Ban +# Values: CMD +# +actionstop = + +# Option: actioncheck +# Notes.: command executed once before each actionban command +# Values: CMD +# +actioncheck = iptables -n -L + +# Option: actionban +# Notes.: command executed when banning an IP. +# Values: CMD +# +actionban = echo 'all' >| /etc/symbiosis/firewall/blacklist.d/.auto + iptables -I 1 -s -j + +# Option: actionunban +# Notes.: command executed when unbanning an IP. +# Values: CMD +# +actionunban = rm -f /etc/symbiosis/firewall/blacklist.d/.auto + iptables -D -s -j + +[Init] + +# Option: chain +# Notes specifies the iptables chain to which the fail2ban rules should be +# added to. blacklist is a chain initiated by symbiosis firewall. +# Values: STRING Default: blacklist +chain = blacklist + +# Option: blocktype +# Note: This is to match default symbiosis firewall type for blacklisted IPs +# Values: STRING +blocktype = DROP