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
1 changed files with 6 additions and 0 deletions

View File

@ -346,6 +346,12 @@ cat conf/fail2ban/jails.conf \
> /etc/fail2ban/jail.d/mailinabox.conf > /etc/fail2ban/jail.d/mailinabox.conf
cp -f conf/fail2ban/filter.d/* /etc/fail2ban/filter.d/ 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. # 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 # 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 # Roundcube for the first time. This causes fail2ban to fail to start. Later