systemd style
This commit is contained in:
parent
2f902d270a
commit
d0f330d9da
|
@ -292,7 +292,7 @@ FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list
|
||||||
SSL_PROTOCOLS="TLSv1 TLSv1.1 TLSv1.2"
|
SSL_PROTOCOLS="TLSv1 TLSv1.1 TLSv1.2"
|
||||||
|
|
||||||
# list of ciphers to use. See bettercrypto.org recommendations
|
# list of ciphers to use. See bettercrypto.org recommendations
|
||||||
SSL_CIPHERS='EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA'
|
SSL_CIPHERS="EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA"
|
||||||
|
|
||||||
# ssh (from https://stribika.github.io/2015/01/04/secure-secure-shell.html)
|
# ssh (from https://stribika.github.io/2015/01/04/secure-secure-shell.html)
|
||||||
SSH_CIPHERS="chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr"
|
SSH_CIPHERS="chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr"
|
||||||
|
|
|
@ -156,7 +156,7 @@ function change_website_settings {
|
||||||
sed -i "s|ssl_protocols .*|ssl_protocols $SSL_PROTOCOLS;|g" $WEBSITES_DIRECTORY/$file
|
sed -i "s|ssl_protocols .*|ssl_protocols $SSL_PROTOCOLS;|g" $WEBSITES_DIRECTORY/$file
|
||||||
sed -i "s|ssl_ciphers .*|ssl_ciphers '$SSL_CIPHERS';|g" $WEBSITES_DIRECTORY/$file
|
sed -i "s|ssl_ciphers .*|ssl_ciphers '$SSL_CIPHERS';|g" $WEBSITES_DIRECTORY/$file
|
||||||
done
|
done
|
||||||
service nginx restart
|
systemctl restart nginx
|
||||||
echo $'Web security settings changed'
|
echo $'Web security settings changed'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ function change_imap_settings {
|
||||||
fi
|
fi
|
||||||
sed -i "s|ssl_cipher_list.*|ssl_cipher_list = '$SSL_CIPHERS'|g" $DOVECOT_CIPHERS
|
sed -i "s|ssl_cipher_list.*|ssl_cipher_list = '$SSL_CIPHERS'|g" $DOVECOT_CIPHERS
|
||||||
sed -i "s|ssl_protocols.*|ssl_protocols = '$SSL_PROTOCOLS'|g" $DOVECOT_CIPHERS
|
sed -i "s|ssl_protocols.*|ssl_protocols = '$SSL_PROTOCOLS'|g" $DOVECOT_CIPHERS
|
||||||
service dovecot restart
|
systemctl restart dovecot
|
||||||
echo $'imap security settings changed'
|
echo $'imap security settings changed'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ function change_ssh_settings {
|
||||||
sed -i "s|MACs .*|MACs $SSH_MACS|g" $SSH_CONFIG
|
sed -i "s|MACs .*|MACs $SSH_MACS|g" $SSH_CONFIG
|
||||||
sed -i "s|KexAlgorithms .*|KexAlgorithms $SSH_KEX|g" $SSH_CONFIG
|
sed -i "s|KexAlgorithms .*|KexAlgorithms $SSH_KEX|g" $SSH_CONFIG
|
||||||
sed -i "s|PasswordAuthentication .*|PasswordAuthentication $SSH_PASSWORDS|g" $SSH_CONFIG
|
sed -i "s|PasswordAuthentication .*|PasswordAuthentication $SSH_PASSWORDS|g" $SSH_CONFIG
|
||||||
service ssh restart
|
systemctl restart ssh
|
||||||
echo $'ssh server security settings changed'
|
echo $'ssh server security settings changed'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ function change_xmpp_settings {
|
||||||
fi
|
fi
|
||||||
sed -i "s|ciphers =.*|ciphers = \"$XMPP_CIPHERS\";|g" $XMPP_CONFIG
|
sed -i "s|ciphers =.*|ciphers = \"$XMPP_CIPHERS\";|g" $XMPP_CONFIG
|
||||||
sed -i "s|curve =.*|curve = \"$XMPP_ECC_CURVE\";|g" $XMPP_CONFIG
|
sed -i "s|curve =.*|curve = \"$XMPP_ECC_CURVE\";|g" $XMPP_CONFIG
|
||||||
service prosody restart
|
systemctl restart prosody
|
||||||
echo $'xmpp security settings changed'
|
echo $'xmpp security settings changed'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue