1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-05 15:57:23 +01:00

fail2ban: whitelist our machine's public ip address so status checks dont cause bans of the machine itself

This commit is contained in:
Joshua Tauberer
2015-12-07 08:45:59 -05:00
parent 5bbe9f9a04
commit 20e11bbab3
2 changed files with 10 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
source /etc/mailinabox.conf
source setup/functions.sh # load our functions
# Basic System Configuration
@@ -198,7 +199,9 @@ restart_service resolvconf
# ### Fail2Ban Service
# Configure the Fail2Ban installation to prevent dumb bruce-force attacks against dovecot, postfix and ssh
cp conf/fail2ban/jail.local /etc/fail2ban/jail.local
cat conf/fail2ban/jail.local \
| sed "s/PUBLIC_IP/$PUBLIC_IP/g" \
> /etc/fail2ban/jail.local
cp conf/fail2ban/dovecotimap.conf /etc/fail2ban/filter.d/dovecotimap.conf
restart_service fail2ban