|
|
@@ -8,19 +8,25 @@
|
|
|
|
|
|
# Replace dhparam 1024 with dhparam 4096
|
|
|
echo "(*) Increasing Diffie-Hellman Parameter strength to 4096-bit..."
|
|
|
-mv /etc/ssl/dhparam.pem $HESTIA_BACKUP/conf/
|
|
|
+if [ -e /etc/ssl/dhparam.pem ]; then
|
|
|
+ mv /etc/ssl/dhparam.pem $HESTIA_BACKUP/conf/
|
|
|
+fi
|
|
|
cp -f $HESTIA/install/deb/ssl/dhparam.pem /etc/ssl/
|
|
|
chmod 600 /etc/ssl/dhparam.pem
|
|
|
|
|
|
# Enhance Vsftpd security
|
|
|
-echo "(*) Hardening Vsftpd SSL configuration..."
|
|
|
-cp -f /etc/vsftpd.conf $HESTIA_BACKUP/conf/
|
|
|
-sed -i "s|ssl_tlsv1=YES|ssl_tlsv1=NO|g" /etc/vsftpd.conf
|
|
|
+if [ "$FTP_SYSTEM" = "vsftpd" ]; then
|
|
|
+ echo "(*) Hardening Vsftpd SSL configuration..."
|
|
|
+ cp -f /etc/vsftpd.conf $HESTIA_BACKUP/conf/
|
|
|
+ sed -i "s|ssl_tlsv1=YES|ssl_tlsv1=NO|g" /etc/vsftpd.conf
|
|
|
+fi
|
|
|
|
|
|
# Enhance Dovecot security
|
|
|
-echo "(*) Hardening Dovecot SSL configuration..."
|
|
|
-mv /etc/dovecot/conf.d/10-ssl.conf $HESTIA_BACKUP/conf/
|
|
|
-cp -f $HESTIA/install/deb/dovecot/conf.d/10-ssl.conf /etc/dovecot/conf.d/
|
|
|
+if [ "$IMAP_SYSTEM" = "dovecot" ]; then
|
|
|
+ echo "(*) Hardening Dovecot SSL configuration..."
|
|
|
+ mv /etc/dovecot/conf.d/10-ssl.conf $HESTIA_BACKUP/conf/
|
|
|
+ cp -f $HESTIA/install/deb/dovecot/conf.d/10-ssl.conf /etc/dovecot/conf.d/
|
|
|
+fi
|
|
|
|
|
|
# Update DNS resolvers in hestia-nginx's configuration
|
|
|
echo "(*) Updating DNS resolvers for Hestia Internal Web Server..."
|