1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-23 02:27:05 +00:00

SmartOS: fix fail2ban to work with native ipfilter

This commit is contained in:
Reza Jelveh 2017-11-27 10:28:54 +01:00
parent 86b6b7d97e
commit 1bd0f79aae

View File

@ -346,6 +346,12 @@ cat conf/fail2ban/jails.conf \
> /etc/fail2ban/jail.d/mailinabox.conf
cp -f conf/fail2ban/filter.d/* /etc/fail2ban/filter.d/
if [[ -n "$LX_ZONE" ]]; then
sed -i -e "s/iptables-allports/ipfilter/g" /etc/fail2ban/jail.conf
sed -i -e "s/iptables-allports/ipfilter/g" /etc/fail2ban/jail.d/mailinabox.conf
sed -i -e "s@/sbin/ipf@/native/usr/sbin/ipf@g" /etc/fail2ban/action.d/ipfilter.conf
fi
# On first installation, the log files that the jails look at don't all exist.
# e.g., The roundcube error log isn't normally created until someone logs into
# Roundcube for the first time. This causes fail2ban to fail to start. Later