mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-18 02:32:09 +00:00
Update system.sh
This commit is contained in:
parent
57c9d3e01a
commit
4549562710
@ -372,22 +372,27 @@ else
|
|||||||
service restart bind9
|
service restart bind9
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# ### Fail2Ban Service
|
# ### Fail2Ban Service
|
||||||
|
# We'll skip this on docker installations
|
||||||
|
|
||||||
# Configure the Fail2Ban installation to prevent dumb bruce-force attacks against dovecot, postfix, ssh, etc.
|
if [ "$INSTALL" == "m" ]; then
|
||||||
rm -f /etc/fail2ban/jail.local # we used to use this file but don't anymore
|
# Configure the Fail2Ban installation to prevent dumb bruce-force attacks against dovecot, postfix, ssh, etc.
|
||||||
rm -f /etc/fail2ban/jail.d/defaults-debian.conf # removes default config so we can manage all of fail2ban rules in one config
|
rm -f /etc/fail2ban/jail.local # we used to use this file but don't anymore
|
||||||
cat conf/fail2ban/jails.conf \
|
rm -f /etc/fail2ban/jail.d/defaults-debian.conf # removes default config so we can manage all of fail2ban rules in one config
|
||||||
| sed "s/PUBLIC_IP/$PUBLIC_IP/g" \
|
cat conf/fail2ban/jails.conf \
|
||||||
| sed "s#STORAGE_ROOT#$STORAGE_ROOT#" \
|
| sed "s/PUBLIC_IP/$PUBLIC_IP/g" \
|
||||||
> /etc/fail2ban/jail.d/mailinabox.conf
|
| sed "s#STORAGE_ROOT#$STORAGE_ROOT#" \
|
||||||
cp -f conf/fail2ban/filter.d/* /etc/fail2ban/filter.d/
|
> /etc/fail2ban/jail.d/mailinabox.conf
|
||||||
|
cp -f conf/fail2ban/filter.d/* /etc/fail2ban/filter.d/
|
||||||
|
|
||||||
# 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
|
# On first installation, the log files that the jails look at don't all exist.
|
||||||
# Roundcube for the first time. This causes fail2ban to fail to start. Later
|
# e.g., The roundcube error log isn't normally created until someone logs into
|
||||||
# scripts will ensure the files exist and then fail2ban is given another
|
# Roundcube for the first time. This causes fail2ban to fail to start. Later
|
||||||
# restart at the very end of setup.
|
# scripts will ensure the files exist and then fail2ban is given another
|
||||||
restart_service fail2ban
|
# restart at the very end of setup.
|
||||||
|
restart_service fail2ban
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Finsihed system.sh"
|
echo "Finsihed system.sh"
|
||||||
|
Loading…
Reference in New Issue
Block a user