Added ufw config & ssh port changed

This commit is contained in:
b.waal
2019-10-08 11:29:44 +02:00
parent 2b733413a9
commit c6e6e2169e

View File

@@ -80,6 +80,7 @@ debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Si
##----------------## ##----------------##
msg " Pre-Configuring" msg " Pre-Configuring"
sleep 2 sleep 2
sed -i '/Port 22/c\Port 4242' /etc/ssh/sshd_config
hostnamectl set-hostname $domain > $OUTPUT 2>&1 hostnamectl set-hostname $domain > $OUTPUT 2>&1
timedatectl set-timezone Europe/Amsterdam > $OUTPUT 2>&1 timedatectl set-timezone Europe/Amsterdam > $OUTPUT 2>&1
hostname --fqdn > /etc/mailname 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 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 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 # # 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 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 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 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 # # Updating ClamAV definitions #