From c6e6e2169ec8782a9e61df074fababbf29af86dd Mon Sep 17 00:00:00 2001 From: "b.waal" Date: Tue, 8 Oct 2019 11:29:44 +0200 Subject: [PATCH] Added ufw config & ssh port changed --- installer.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/installer.sh b/installer.sh index a37c2ce..5679158 100644 --- a/installer.sh +++ b/installer.sh @@ -80,6 +80,7 @@ debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Si ##----------------## msg " Pre-Configuring" sleep 2 +sed -i '/Port 22/c\Port 4242' /etc/ssh/sshd_config hostnamectl set-hostname $domain > $OUTPUT 2>&1 timedatectl set-timezone Europe/Amsterdam > $OUTPUT 2>&1 hostname --fqdn > /etc/mailname @@ -419,6 +420,11 @@ source /tmp/clear-queue.sh wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/"$branch"/beta/config/motd/01-custom -O /etc/update-motd.d/01-custom chmod +x /etc/update-motd.d/01-custom +##---------## +# Ufw # +##---------## +wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/beta/config/ufw/config.sh -O /tmp/ufw-config.sh +source /tmp/ufw-config.sh ##---------------------## # System services # @@ -428,7 +434,7 @@ sleep 2 systemctl enable nginx mysql postfix postfix@- dovecot fail2ban clamav-daemon clamav-freshclam clamsmtp spamassassin > $OUTPUT 2>&1 systemctl disable amavis amavisd-snmp-subagent amavis-mc postfix dovecot> $OUTPUT 2>&1 systemctl stop amavis amavisd-snmp-subagent amavis-mc postfix dovecot > $OUTPUT 2>&1 -systemctl restart nginx mysql postfix@- fail2ban clamav-daemon clamav-freshclam clamsmtp spamassassin > $OUTPUT 2>&1 +systemctl restart sshd nginx mysql postfix@- fail2ban clamav-daemon clamav-freshclam clamsmtp spamassassin > $OUTPUT 2>&1 ##---------------------------------## # Updating ClamAV definitions #