it_best_practise:apache:ssl_settings
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
it_best_practise:apache:ssl_settings [2017/03/03 10:35] – created Stephan Krinetzki | it_best_practise:apache:ssl_settings [2024/02/27 11:41] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 16: | Line 16: | ||
# | # | ||
# | # | ||
+ | |||
SSLProtocol All -SSLv2 -SSLv3 | SSLProtocol All -SSLv2 -SSLv3 | ||
SSLHonorCipherOrder On | SSLHonorCipherOrder On | ||
SSLCompression off | SSLCompression off | ||
+ | |||
# Add six earth month HSTS header for all users... | # Add six earth month HSTS header for all users... | ||
Header always set Strict-Transport-Security " | Header always set Strict-Transport-Security " | ||
+ | |||
# If you want to protect all subdomains, use the following header | # If you want to protect all subdomains, use the following header | ||
# ALL subdomains HAVE TO support HTTPS if you use this! | # ALL subdomains HAVE TO support HTTPS if you use this! | ||
Line 26: | Line 29: | ||
# HTTP Public Key Pinning (HPKP) for 90 days (60*60*24*90=7776000) | # HTTP Public Key Pinning (HPKP) for 90 days (60*60*24*90=7776000) | ||
# At least use one Backup-Key and/or add whole CA, think of Cert-Updates! | # At least use one Backup-Key and/or add whole CA, think of Cert-Updates! | ||
+ | |||
Header always set Public-Key-Pins " | Header always set Public-Key-Pins " | ||
\YOUR_BACKUP_HASH=\"; | \YOUR_BACKUP_HASH=\"; | ||
+ | |||
SSLCipherSuite ' | SSLCipherSuite ' | ||
\: | \: | ||
Line 34: | Line 39: | ||
Damit entspricht man den aktuellen SSL Einstellungen. Diese Einstellungen werden pro VHost vorgenommen. | Damit entspricht man den aktuellen SSL Einstellungen. Diese Einstellungen werden pro VHost vorgenommen. | ||
+ | |||
+ | ==== Eigene Diffie-Hellman Parameter erstellen ==== | ||
+ | Ausgehend von der Schwachstellt [[https:// | ||
+ | < | ||
+ | openssl dhparam -out dhparams.pem 4096 | ||
+ | </ | ||
+ | anschließend kann man das File im Apache (Version 2.4.8 und neuer und OpenSSL 1.0.2) einbinden mit: | ||
+ | < | ||
+ | SSLOpenSSLConfCmd DHParameters "{path to dhparams.pem}" | ||
+ | </ | ||
+ | |||
+ | Weitere Details dazu sind [[https:// | ||
+ | |||
+ | **Achtung**: | ||
+ | |||
+ | ==== Schlüsselaustausch via Diffie Hellman Elliptic Curve ==== | ||
+ | Apache kann schon per default ausgehend von einem RSA-Schlüssel den Schlüsselaustausch mit dem Client per Elliptischen Kurven durchführen. Dabei wird (auf meinen Systemen immer) eine Schlüssellänge von 256 Bit genutzt. Diese lässt sich hochstellen. | ||
+ | |||
+ | Dazu muss man zuerst herausfinden welche Kurven auf einem System zur verfügung stehen: | ||
+ | < | ||
+ | openssl ecparam -list_curves | ||
+ | </ | ||
+ | |||
+ | Anschließend kann man in der Apache (Version 2.4.8 oder höher) Config für den vHost festlegen, was man wirklich haben will. Dabei darf man natürlich nur Kurven auswählen, die das System auch kann... | ||
+ | |||
+ | < | ||
+ | SSLOpenSSLConfCmd ECDHParameters Automatic | ||
+ | SSLOpenSSLConfCmd Curves secp521r1: | ||
+ | </ | ||
+ | |||
+ | Weitere Details dazu sind [[https:// | ||
+ | |||
+ | **Achtung**: | ||
==== Weitere Versionsinformationen ==== | ==== Weitere Versionsinformationen ==== |
it_best_practise/apache/ssl_settings.1488537307.txt.gz · Last modified: 2024/02/27 11:40 (external edit)