From 4574d0008ad4571da23f59b7be257236df9b94f3 Mon Sep 17 00:00:00 2001 From: "b.waal" Date: Sat, 31 Aug 2019 23:16:37 +0200 Subject: [PATCH] Update 'installer.sh' --- installer.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/installer.sh b/installer.sh index ba3c854..7b16dee 100644 --- a/installer.sh +++ b/installer.sh @@ -323,12 +323,23 @@ wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$bra source /tmp/rainloop.sh ln -s /opt/rainloop /var/www/"$domain"/html/ +##--------------## +# Fail2Ban # +##--------------## +apt install fail2ban -y +wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/dovecot-pop3imap.conf -O /etc/fail2ban/filter.d/dovecot-pop3imap.conf +wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/postfix-sasl.conf -O /etc/fail2ban/filter.d/postfix-sasl.conf +wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/rainloop.conf -O /etc/fail2ban/filter.d/rainloop.conf +wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/jail.local -O /etc/fail2ban/jail.local +sed -i 's/root@localhost/'$email'/g' /etc/fail2ban/jail.conf +systemctl restart fail2ban + ##-----------------------## # Enabling Services # ##-----------------------## -systemctl enable postfix.service postfix@-.service dovecot.service +systemctl enable postfix.service postfix@-.service dovecot.service fail2ban.service ##-----------------------## # Starting Services # ##-----------------------## -systemctl restart postfix.service postfix@-.service dovecot.service \ No newline at end of file +systemctl restart postfix.service postfix@-.service dovecot.service fail2ban.service \ No newline at end of file