From: Marcin Krol Date: Sun, 22 Jul 2018 16:29:27 +0000 (+0000) Subject: - strenghten SSL config, it gets 100% A+ result on SSL Labs test X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=fd6a979d6b76c6b1f675b81caeafcd444040498d;p=packages%2Fapache.git - strenghten SSL config, it gets 100% A+ result on SSL Labs test --- diff --git a/apache-mod_ssl.conf b/apache-mod_ssl.conf index 5fdfa7e..2bd073b 100644 --- a/apache-mod_ssl.conf +++ b/apache-mod_ssl.conf @@ -64,19 +64,32 @@ SSLSessionCacheTimeout 300 # This directive can be used to control the SSL protocol flavors mod_ssl # should use when establishing its server environment. Clients then can only # connect with one of the provided protocols. -SSLProtocol all -SSLv2 -SSLv3 +SSLProtocol -all TLSv1.2 # SSL Cipher Suite: # List the ciphers that the client is permitted to negotiate. # See the mod_ssl documentation for a complete list. -SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA +SSLCipherSuite HIGH:!aNULL:!MD5:!3DES:!CAMELLIA128:!AES128 SSLHonorCipherOrder on SSLCompression off +# Use this command to generate 4096 DH parameters (it will take long time): +# openssl dhparam -out /etc//httpd/ssl/dhparams.pem 4096 +# When finished, uncomment line below +#SSLOpenSSLConfCmd DHParameters /etc/httpd/ssl/dhparams.pem + +SSLOpenSSLConfCmd ECDHParameters secp384r1 +SSLOpenSSLConfCmd Curves secp521r1:secp384r1 + +Header always set Strict-Transport-Security max-age=31556952;includeSubDomains +Header always set X-Frame-Options SAMEORIGIN +Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure +Header always set X-Content-Type-Options nosnif + # OCSP Stapling -SSLUseStapling off +SSLUseStapling on SSLStaplingResponderTimeout 5 SSLStaplingReturnResponderErrors off SSLStaplingCache shmcb:/var/cache/httpd/ocsp(128000)