From 85dc113fe43577cb3b8e42ad83475f1dd351950b Mon Sep 17 00:00:00 2001 From: Karim <37943746+ksaadDE@users.noreply.github.com> Date: Wed, 18 May 2022 01:22:45 +0200 Subject: [PATCH 1/2] Replaceing old TLS versions and insecure ciphers NEVER use SSL / TLS in outdated versions or insecure / oudated ciphers. Current state-of-the-art TLS Versions are TLSv1.2 and TLSv1.3. TLSv1.2 is only enabled for backwards compatibility. Ciphers are taken out of the guide. ```ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;``` Are the recommended ciphers out of source 4 in combination of all other sources. source 1: https://www.linuxtechi.com/harden-secure-nginx-web-server-linux source 2: https://beaglesecurity.com/blog/article/nginx-server-security.html source 3: https://www.acunetix.com/blog/articles/tls-ssl-cipher-hardening/ source 4: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html --- modoboa_installer/scripts/files/nginx/modoboa.conf.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modoboa_installer/scripts/files/nginx/modoboa.conf.tpl b/modoboa_installer/scripts/files/nginx/modoboa.conf.tpl index a281371..e2b3d78 100644 --- a/modoboa_installer/scripts/files/nginx/modoboa.conf.tpl +++ b/modoboa_installer/scripts/files/nginx/modoboa.conf.tpl @@ -17,8 +17,8 @@ server { ssl_certificate %tls_cert_file; ssl_certificate_key %tls_key_file; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384"; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_verify_depth 3; From 4301bcca74528471cd94ca22080f001007f29810 Mon Sep 17 00:00:00 2001 From: Karim <37943746+ksaadDE@users.noreply.github.com> Date: Mon, 27 Jun 2022 19:49:46 +0200 Subject: [PATCH 2/2] removed forcing renew, no-autoupgrade only renew, no force fix and do upgrades https://github.com/modoboa/modoboa/issues/2129 --- modoboa_installer/ssl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modoboa_installer/ssl.py b/modoboa_installer/ssl.py index 784e9d1..8df9b30 100644 --- a/modoboa_installer/ssl.py +++ b/modoboa_installer/ssl.py @@ -104,7 +104,7 @@ class LetsEncryptCertificate(CertificateBackend): self.hostname, self.config.get("letsencrypt", "email"))) with open("/etc/cron.d/letsencrypt", "w") as fp: fp.write("0 */12 * * * root certbot renew " - "--quiet --no-self-upgrade --force-renewal\n") + "--quiet\n") cfg_file = "/etc/letsencrypt/renewal/{}.conf".format(self.hostname) pattern = "s/authenticator = standalone/authenticator = nginx/" utils.exec_cmd("perl -pi -e '{}' {}".format(pattern, cfg_file))