1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-21 03:02:09 +00:00

Exclude f2b sets

If you save the f2b set, it will stack them on restart. Adding grep -iv "f2b" will exclude any sets from fail2ban from being saved, so they append a single time properly
This commit is contained in:
jordanrinke 2014-08-08 16:41:31 -07:00
parent 1ca7c0c6e1
commit 600ecb5356

View File

@ -72,7 +72,7 @@ save_rules()
log_action_cont_msg " skipping IPset - no sets defined or not loaded"
elif [ -x /usr/sbin/ipset ] || [ -x /sbin/ipset ]; then
log_action_cont_msg " IPset"
ipset save > /etc/iptables/rules.ipsets
ipset save | grep -iv "f2b"> /etc/iptables/rules.ipsets
if [ $? -ne 0 ]; then
rc=1
fi