Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:dovecot_ssl_tls

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:dovecot_ssl_tls [2015/05/21 12:25] – [Neustart] klaustachtler:dovecot_ssl_tls [2015/09/29 14:06] (aktuell) – [/etc/dovecot/conf.d/10-ssl.conf] klaus
Zeile 5: Zeile 5:
 :!: **HINWEIS** - **Die Nachfolgende Konfiguration von [[http://dovecot.org|Dovecot]] setzt eine lauffähige Installation von [[http://dovecot.org|Dovecot]] voraus, wie unter nachfolgendem internen Link beschrieben !!!** :!: **HINWEIS** - **Die Nachfolgende Konfiguration von [[http://dovecot.org|Dovecot]] setzt eine lauffähige Installation von [[http://dovecot.org|Dovecot]] voraus, wie unter nachfolgendem internen Link beschrieben !!!**
   * **[[tachtler:dovecot_centos_6|Dovecot CentOS 6]]**   * **[[tachtler:dovecot_centos_6|Dovecot CentOS 6]]**
 +  * **[[tachtler:dovecot_centos_7|Dovecot CentOS 7]]**
  
 [[http://dovecot.org//|{{:tachtler:index:dovecot-48x48.png }}]]  [[http://dovecot.org//|{{:tachtler:index:dovecot-48x48.png }}]] 
Zeile 28: Zeile 29:
  
 Grundsätzlich kann auch ein **//Self-signed Certificate//** (Selbst erstelltes und bestätigtes Zertifikat) dafür benutzt werden. Wie ein solches Zertifikat selbst erstellt werden, kann kann etwas ausführlicher unter nachfolgendem internen Links nachgelesen werden. Grundsätzlich kann auch ein **//Self-signed Certificate//** (Selbst erstelltes und bestätigtes Zertifikat) dafür benutzt werden. Wie ein solches Zertifikat selbst erstellt werden, kann kann etwas ausführlicher unter nachfolgendem internen Links nachgelesen werden.
-  * [[tachtler:apache_http_server_-_mod_ssl_-_ssl-verschluesselung_https#ssl-zertifikat_erstellen|Apache HTTP Server - mod_ssl - SSL-Verschlüsselung (https) - Sll-Zertifikat erstellen]]+  * [[tachtler:apache_http_server_centos_6_-_mod_ssl_-_ssl-verschluesselung_https#ssl-zertifikat_erstellen|Apache HTTP Server CentOS 6- mod_ssl - SSL-Verschlüsselung (https) - SSL-Zertifikat erstellen]] 
 +  * [[tachtler:apache_http_server_centos_7_-_mod_ssl_-_verschluesselung_https#self-signed-certificate|Apache HTTP Server CentOS 7- mod_ssl - SSL-Verschlüsselung (https) - Self-signed-certificate]]
  
 ==== Zertifikat erstellen ==== ==== Zertifikat erstellen ====
Zeile 50: Zeile 52:
 Wie das Zertifikat **inhaltlich** ausgestellt wurde, kann mit dem folgenden Befehl überprüft werden: Wie das Zertifikat **inhaltlich** ausgestellt wurde, kann mit dem folgenden Befehl überprüft werden:
 <code> <code>
-]# openssl x509 -noout -text -in /tmp/mail.tachtler.net.crt+# openssl x509 -noout -text -in /tmp/mail.tachtler.net.crt
 Certificate: Certificate:
     Data:     Data:
Zeile 152: Zeile 154:
 Die in der vorhergehenden Konfiguration, welche unter nachfolgendem internen Link nachzulesen ist Die in der vorhergehenden Konfiguration, welche unter nachfolgendem internen Link nachzulesen ist
   * [[tachtler:dovecot_centos_6#etc_dovecot_confd_10-sslconf|Dovecot CentOS 6 - Konfiguration Authentifizierung - /etc/dovecot/conf.d/10-ssl.conf]]   * [[tachtler:dovecot_centos_6#etc_dovecot_confd_10-sslconf|Dovecot CentOS 6 - Konfiguration Authentifizierung - /etc/dovecot/conf.d/10-ssl.conf]]
 +  * [[tachtler:dovecot_centos_7#etc_dovecot_confd_10-sslconf|Dovecot CentOS 7 - Konfiguration Authentifizierung - /etc/dovecot/conf.d/10-ssl.conf]]
 kann jetzt wiederum angepasst werden. kann jetzt wiederum angepasst werden.
  
Zeile 214: Zeile 217:
 # default: ssl_key = </etc/pki/dovecot/private/dovecot.pem # default: ssl_key = </etc/pki/dovecot/private/dovecot.pem
 ssl_key = </etc/pki/dovecot/private/mail.tachtler.net.key ssl_key = </etc/pki/dovecot/private/mail.tachtler.net.key
 +...
 +</code>
 +
 +=== ssl_dh_parameters_length ===   
 +
 +Aufgrund einer Sicherheitsschwäche beim "Handshake" im //Diffie-Hellmann-Algorithmus// sollten die Stärke der möglichen Verschlüsselungs-Parameter entsprechend angepasst werden:
 +<code ini>
 +...
 +# DH parameters length to use.
 +# Tachtler
 +# Diffie-Hellmann vulnerability
 +# https://weakdh.org/sysadmin.html
 +# default: #ssl_dh_parameters_length = 1024
 +ssl_dh_parameters_length = 2048
 ... ...
 </code> </code>
Zeile 234: Zeile 251:
  
 Aufgrund einer Sicherheitsschwäche beim "Handshake" im //Diffie-Hellmann-Algorithmus// sollten die Liste der möglichen Verschlüsselungs-Algorithmen entsprechend angepasst werden: Aufgrund einer Sicherheitsschwäche beim "Handshake" im //Diffie-Hellmann-Algorithmus// sollten die Liste der möglichen Verschlüsselungs-Algorithmen entsprechend angepasst werden:
- 
 <code ini> <code ini>
 +...
 # SSL ciphers to use # SSL ciphers to use
 # Tachtler # Tachtler
Zeile 241: Zeile 258:
 # https://weakdh.org/sysadmin.html # https://weakdh.org/sysadmin.html
 # default: #ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL # default: #ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL
-ssl_cipher_list = 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+# original from https://weakdh.org/sysadmin.html: ssl_cipher_list = 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 
 +# Tachtler - changed order, to use first ECDHE-RSA-AES256-GCM-SHA384 / ECDHE-ECDSA-AES256-GCM-SHA384! 
 +ssl_cipher_list = ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256: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 
 + 
 +...
 </code> </code>
  
Zeile 247: Zeile 268:
  
 Aufgrund einer Sicherheitsschwäche beim "Handshake" im //Diffie-Hellmann-Algorithmus// sollten die Liste der Verschlüsselungs-Algorithmen die der [[http://dovecot.org|Dovecot]]-Server dem Client vorschlägt, Anwendung finden und dem Client **__nicht__** die Möglichkeit gegeben werden, entsprechende "downgrades" der Verschlüsselungs-Algorithmen dem [[http://dovecot.org|Dovecot]]-Server vorzuschlagen. Nachfolgende Anpassungen sind dazu notwendig: Aufgrund einer Sicherheitsschwäche beim "Handshake" im //Diffie-Hellmann-Algorithmus// sollten die Liste der Verschlüsselungs-Algorithmen die der [[http://dovecot.org|Dovecot]]-Server dem Client vorschlägt, Anwendung finden und dem Client **__nicht__** die Möglichkeit gegeben werden, entsprechende "downgrades" der Verschlüsselungs-Algorithmen dem [[http://dovecot.org|Dovecot]]-Server vorzuschlagen. Nachfolgende Anpassungen sind dazu notwendig:
- +<code ini> 
-<code>+...
 # Prefer the server's order of ciphers over client's. # Prefer the server's order of ciphers over client's.
 # Tachtler # Tachtler
Zeile 255: Zeile 276:
 # default: #ssl_prefer_server_ciphers = no # default: #ssl_prefer_server_ciphers = no
 ssl_prefer_server_ciphers = yes ssl_prefer_server_ciphers = yes
 +...
 </code> </code>
  
Zeile 263: Zeile 285:
 Die in der vorhergehenden Konfiguration, welche unter nachfolgendem internen Link nachzulesen ist Die in der vorhergehenden Konfiguration, welche unter nachfolgendem internen Link nachzulesen ist
   * [[tachtler:dovecot_centos_6#etc_dovecot_confd_10-authconf|Dovecot CentOS 6 - Konfiguration Authentifizierung - /etc/dovecot/conf.d/10-auth.conf]]   * [[tachtler:dovecot_centos_6#etc_dovecot_confd_10-authconf|Dovecot CentOS 6 - Konfiguration Authentifizierung - /etc/dovecot/conf.d/10-auth.conf]]
 +  * [[tachtler:dovecot_centos_7#etc_dovecot_confd_10-authconf|Dovecot CentOS 7 - Konfiguration Authentifizierung - /etc/dovecot/conf.d/10-auth.conf]]
 kann **später** auch angepasst werden. kann **später** auch angepasst werden.
  
Zeile 307: Zeile 330:
 <code> <code>
 # doveconf -n # doveconf -n
-# 2.2.10: /etc/dovecot/dovecot.conf +# 2.2.18: /etc/dovecot/dovecot.conf 
-# OS: Linux 2.6.32-431.5.1.el6.x86_64 x86_64 CentOS release 6.(Final+# OS: Linux 3.10.0-229.7.2.el7.x86_64 x86_64 CentOS Linux release 7.1.1503 (Core 
 auth_debug = yes auth_debug = yes
 +auth_debug_passwords = yes
 auth_master_user_separator = * auth_master_user_separator = *
 auth_mechanisms = plain digest-md5 cram-md5 login auth_mechanisms = plain digest-md5 cram-md5 login
 auth_verbose = yes auth_verbose = yes
-disable_plaintext_auth no+listen *
 mail_debug = yes mail_debug = yes
 mail_location = maildir:~/Maildir mail_location = maildir:~/Maildir
Zeile 356: Zeile 380:
 } }
 ssl_cert = </etc/pki/dovecot/certs/mail.tachtler.net.crt ssl_cert = </etc/pki/dovecot/certs/mail.tachtler.net.crt
 +ssl_cipher_list = ssl_cipher_list = 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
 +ssl_dh_parameters_length = 2048
 ssl_key = </etc/pki/dovecot/private/mail.tachtler.net.key ssl_key = </etc/pki/dovecot/private/mail.tachtler.net.key
-ssl_cert = </etc/pki/dovecot/certs/CAcert-class3-wildcard_all_in_one.crt 
-ssl_cipher_list = 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 
-ssl_key = </etc/pki/dovecot/private/tachtler.net.key 
 ssl_prefer_server_ciphers = yes ssl_prefer_server_ciphers = yes
- 
 ssl_protocols = !SSLv2 !SSLv3 ssl_protocols = !SSLv2 !SSLv3
 userdb { userdb {
Zeile 377: Zeile 399:
 Stopping Dovecot Imap:                                      OK  ] Stopping Dovecot Imap:                                      OK  ]
 Starting Dovecot Imap:                                      OK  ] Starting Dovecot Imap:                                      OK  ]
 +</code>
 +bzw.
 +<code>
 +# systemctl restart dovecot
 </code> </code>
  
Zeile 464: Zeile 490:
 a2 list "" "*" a2 list "" "*"
 * LIST (\HasChildren) "/" INBOX * LIST (\HasChildren) "/" INBOX
-a2 OK List completed.+a2 OK List completed (0.000 secs).
 a3 logout a3 logout
 * BYE Logging out * BYE Logging out
Zeile 506: Zeile 532:
 # openssl s_client -starttls imap -connect 192.168.0.80:143 # openssl s_client -starttls imap -connect 192.168.0.80:143
 CONNECTED(00000003) CONNECTED(00000003)
-depth=2 O = Root CA, OU = http://www.cacert.org, CN = CA Cert Signing Authority, emailAddress = +depth=2 O = Root CA, OU = http://www.cacert.org, CN = CA Cert Signing Authority, emailAddress = support@cacert.org
-support@cacert.org+
 verify error:num=19:self signed certificate in certificate chain verify error:num=19:self signed certificate in certificate chain
 verify return:0 verify return:0
Zeile 553: Zeile 578:
 --- ---
 No client certificate CA names sent No client certificate CA names sent
 +Server Temp Key: ECDH, prime256v1, 256 bits
 --- ---
-SSL handshake has read 6246 bytes and written 479 bytes+SSL handshake has read 6060 bytes and written 401 bytes
 --- ---
-New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-GCM-SHA384+New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
 Server public key is 2048 bit Server public key is 2048 bit
 Secure Renegotiation IS supported Secure Renegotiation IS supported
Zeile 563: Zeile 589:
 SSL-Session: SSL-Session:
     Protocol  : TLSv1.2     Protocol  : TLSv1.2
-    Cipher    : DHE-RSA-AES256-GCM-SHA384 +    Cipher    : ECDHE-RSA-AES128-GCM-SHA256 
-    Session-ID: 5ED32BF589E5F3F36DA3CA21A20C7EFCDDC30DADB646548CA1C98C2BCA6A2157 +    Session-ID: 63A349AEDB6241A498691620C64089697548C10946B471201F68D0227B198566 
-    Session-ID-ctx: +    Session-ID-ctx:  
-    Master-Key: 021C416A8193DBC51F5C6695A8BC5158A71714E3C795BB31DAE35D23610EA8BFDD54339C1F41D79261B90290E5A882+    Master-Key: 18629B8684C43ACBCE6477544EAC0A6996F0829297A76FEC5CE4A81634A4964AF8142960875A55E9EA7E27B7CFBED769
     Key-Arg   : None     Key-Arg   : None
     Krb5 Principal: None     Krb5 Principal: None
Zeile 573: Zeile 599:
     TLS session ticket lifetime hint: 300 (seconds)     TLS session ticket lifetime hint: 300 (seconds)
     TLS session ticket:     TLS session ticket:
-    0000 - a7 62 3d 5a dd c0 6f bb-a7 bb 36 1a 64 92 c7 b8   .bXZ..o...6.d... +    0000 - 51 bf 00 ed 77 92 bf 24-67 b1 a6 7f 45 76 ff 65   Q...w..$g...Ev.e 
-    0010 - 29 e2 1f fa 71 83 c9 a6-f2 6d d0 24 79 a1 09 7a   )...1....m.$y..z +    0010 - ef e3 dd 3d 35 db ff fd-eb fa f4 76 84 0e e7 9c   ...=5......v.... 
-    0020 - 1e 7a b7 d3 a1 4a 29 2c-a8 06 7e 6b 46 75 9b ee   .z...B),..~kFu.. +    0020 - 0c 8a 65 50 b8 de d6 95-32 e9 4e 8c 3c 9a a4 b3   ..eP....2.N.<... 
-    0030 - 3a 6a 94 dc fa 53 88 70-05 89 13 e0 75 f1 ee a1   :j...s.p....u... +    0030 - 5f 83 d4 25 c4 d2 05 c7-1d 14 54 ac 75 8c 90 b7   _..%......T.u... 
-    0040 - 8f 89 2e 8e 85 53 22 d8-23 fa 47 c0 d8 29 d7 87   .....S".#.G..).. +    0040 - 48 42 4d 79 52 bc 64 dc-55 54 43 59 3e 7b cf d9   HBMyR.d.UTCY>{.. 
-    0050 - fa 7b c1 d1 52 ac 28 50-0a a3 a0 2a 15 94 0a 7d   .{..R.(P.a.*...} +    0050 - 3c 8e ae c1 c2 33 9d 27-48 7d af 84 8d fc 0b c2   <....3.'H}...... 
-    0060 - 95 65 24 11 a7 4a 15 05-71 99 8a 3a 36 11 e8 a4   .e$..J..v..:6... +    0060 - a6 4e 7c 2e ec b4 9f 18-95 dc 64 8b 23 de d9 10   .N|.......d.#... 
-    0070 - 03 19 1a ac 21 38 7b 46-ee dd 13 bd cb 2d d5 a4   ....!2{F..C..-.. +    0070 - 40 2e 04 9f 02 ce 3b 61-d4 6d 31 63 33 5e 9f 9c   @.....;a.m1c3^.. 
-    0080 - f2 3a fa a3 c9 fe e5 63-ec e4 b4 00 01 c3 60 57   .:..3..c...d..`W +    0080 - 65 e4 73 7e b6 26 13 2c-ee 4c b6 e1 2d d4 75 45   e.s~.&.,.L..-.uE 
-    0090 - a9 af 9e 23 51 eb 31 be-9d 2e 52 7a b7 35 1d 3d   ...#A.1.4.R1.5.=+    0090 - f3 cd 5d 09 af 44 cb e6-7f ad 19 84 76 58 73 f5   ..]..D......vXs.
  
-    Start Time: 1397162463+    Start Time: 1436445698
     Timeout   : 300 (sec)     Timeout   : 300 (sec)
     Verify return code: 19 (self signed certificate in certificate chain)     Verify return code: 19 (self signed certificate in certificate chain)
tachtler/dovecot_ssl_tls.1432203929.txt.gz · Zuletzt geändert: 2015/05/21 12:25 (Externe Bearbeitung)