1 \section{Recommendations on practical settings}
2 \label{section:PracticalSettings}
5 \subsection{Webservers}
10 \item[Tested with Version:]
12 \item[Settings:] \mbox{}
14 %-All +TLSv1.1 +TLSv1.2
15 \begin{lstlisting}[breaklines]
16 SSLProtocol All -SSLv2 -SSLv3
17 SSLHonorCipherOrder On
19 # Add six earth month HSTS header for all users...
20 Header add Strict-Transport-Security "max-age=15768000"
21 # If you want to protect all subdomains, use the following header
22 # ALL subdomains HAVE TO support https if you use this!
23 # Strict-Transport-Security: max-age=15768000 ; includeSubDomains
25 SSLCipherSuite 'EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EDH+CAMELLIA256:EECDH:EDH+aRSA:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!AES128:!CAMELLIA128:!ECDSA:AES256-SHA'
28 Note again, that any cipher suite starting with ECDHE can be omitted in case of doubt.
29 %% XXX NOTE TO SELF: remove from future automatically generated lists!
31 \item[Additional settings:]
33 You should redirect everything to httpS:// if possible. In Apache you can do this with the following setting inside of a VirtualHost environment:
35 \begin{lstlisting}[breaklines]
39 RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=permanent]
44 \item[Justification for special settings (if needed):]
50 See ssllabs in section \ref{section:Tools}
53 %XXXX ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5:!DSS
56 \subsubsection{lighttpd}
61 \item[Tested with Version:]
65 \item[Settings:] \mbox{}
68 %% Complete ssl.cipher-list with same algo than Apache
69 \todo{FIXME: this string seems to be wrongly formatted??}
71 \begin{lstlisting}[breaklines]
72 $SERVER["socket"] == "0.0.0.0:443" {
74 ssl.use-sslv2 = "disable"
75 ssl.use-sslv3 = "disable"
76 #ssl.use-compression obsolete >= 1.4.3.1
77 ssl.pemfile = "/etc/lighttpd/server.pem"
78 ssl.cipher-list = 'EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EDH+CAMELLIA256:EECDH:EDH+aRSA:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!AES128:!CAMELLIA128:!ECDSA:AES256-SHA'
79 ssl.honor-cipher-order = "enable"
80 setenv.add-response-header = ( "Strict-Transport-Security" => "max-age=31536000")
85 \item[Additional settings:]
87 As for any other webserver, you should redirect automatically http traffic toward httpS://
89 \begin{lstlisting}[breaklines]
90 $HTTP["scheme"] == "http" {
91 # capture vhost name with regex conditiona -> %0 in redirect pattern
92 # must be the most inner block to the redirect rule
93 $HTTP["host"] =~ ".*" {
94 url.redirect = (".*" => "https://%0$0")
101 \todo{add references}.
102 lighttpd httpS:// redirection: \url{http://redmine.lighttpd.net/projects/1/wiki/HowToRedirectHttpToHttps}
104 % add any further references or best practice documents here
106 \item[How to test:] See ssllabs in section \ref{section:Tools}
108 % describe here or point the admin to tools (can be a simple footnote or \ref{} to the tools section) which help the admin to test his settings.
112 \subsubsection{nginx}
115 \item[Tested with Version:]
119 \item[Settings:] \mbox{}
121 \begin{lstlisting}[breaklines]
122 ssl_prefer_server_ciphers on;
123 ssl_protocols -SSLv2 -SSLv3;
124 ssl_ciphers 'EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EDH+CAMELLIA256:EECDH:EDH+aRSA:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!AES128:!CAMELLIA128:!ECDSA:AES256-SHA';
125 add_header Strict-Transport-Security max-age=2592000;
126 add_header X-Frame-Options DENY;
129 %% XXX FIXME: do we need to specify dhparams? Parameter: ssl_dhparam = file. See: http://wiki.nginx.org/HttpSslModule#ssl_protocols
131 \item[Additional settings:]
133 If you decide to trust NIST's ECC curve recommendation, you can add the following line to nginx's configuration file to select special curves:
135 \begin{lstlisting}[breaklines]
136 ssl_ecdh_curve sect571k1;
139 You should redirect everything to httpS:// if possible. In Nginx you can do this with the following setting:
141 \begin{lstlisting}[breaklines]
142 rewrite ^(.*) https://$host$1 permanent;
146 \item[References:] \todo{add references}
148 \item[How to test:] See ssllabs in section \ref{section:Tools}
156 \subsubsection{MS IIS}
160 \todo{screenshots? registry key settings? }
164 \item[Tested with Version:] \todo{version?}
166 \item[Settings:] \mbox{}
169 When trying to avoid RC4 and CBC (BEAST-Attack) and requiring perfect
170 forward secrecy, Microsoft Internet Information Server (IIS) supports
171 ECDSA, but does not support RSA for key exchange (consider ECC suite
172 B doubts\footnote{\url{http://safecurves.cr.yp.to/rigid.html}}).
174 Since \verb|ECDHE_RSA_*| is not supported, a SSL certificate based on
175 elliptic curves needs to be used.
177 The configuration of cipher suites MS IIS will use can be configured in one
178 of the following ways:
180 \item Group Policy \footnote{\url{http://msdn.microsoft.com/en-us/library/windows/desktop/bb870930(v=vs.85).aspx}}
182 \item IIS Crypto~\footnote{\url{https://www.nartac.com/Products/IISCrypto/}}
186 Table~\ref{tab:MS_IIS_Client_Support} shows the process of turning on
187 one algorithm after another and the effect on the supported Clients
188 tested using https://www.ssllabs.com.
190 \verb|SSL 3.0|, \verb|SSL 2.0| and \verb|MD5| are turned off.
191 \verb|TLS 1.0| and \verb|TLS 2.0| are turned on.
198 Cipher Suite & Client \\
200 \verb|TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256| & only IE 10,11, OpenSSL 1.0.1e \\
201 \verb|TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256| & Chrome 30, Opera 17, Safari 6+ \\
202 \verb|TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA| & FF 10-24, IE 8+, Safari 5, Java 7\\
205 \caption{Client support}
206 \label{tab:MS_IIS_Client_Support}
209 Table~\ref{tab:MS_IIS_Client_Support} shows the algoriths from
210 strongest to weakest and why they need to be added in this order. For
211 example insiting on SHA-2 algorithms (only first two lines) would
212 eliminate all versions of Firefox, so the last line is needed to
213 support this browser, but should be placed at the bottom, so capable
214 browsers will choose the stronger SHA-2 algorithms.
216 \verb|TLS_RSA_WITH_RC4_128_SHA| or equivalent should also be added if
217 MS Terminal Server Connection is used (make sure to use this only in a
218 trusted environment). This suite will not be used for SSL, since we do
222 % \verb|TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256| ... only supported by: IE 10,11, OpenSSL 1.0.1e
223 % \verb|TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256| ... Chrome 30, Opera 17, Safari 6+
224 % \verb|TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA| ... Firefox 10-24, IE 8+, Safari 5, Java 7
227 Not supported Clients:
234 item[Additional settings:]
236 %Here you can add additional settings
238 \item[Justification for special settings (if needed):]
240 % in case you have the need for further justifications why you chose this and that setting or if the settings do not fit into the standard Variant A or Variant B schema, please document this here
244 \todo{add references}
246 % add any further references or best practice documents here
248 \item[How to test:] See ssllabs in section \ref{section:Tools}
255 \subsection{Mail Servers}
257 This section documents the most common mail (SMTP) and IMAPs/POPs servers. Another option to secure IMAPs/POPs servers is to place them behind an stunnel server.
259 \subsubsection{Dovecot}
264 % Example: http://dovecot.org/list/dovecot/2013-October/092999.html
266 \begin{lstlisting}[breaklines]
267 ssl_cipher_list = 'EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EDH+CAMELLIA256:EECDH:EDH+aRSA:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!AES128:!CAMELLIA128:!ECDSA:AES256-SHA'
268 ssl_prefer_server_ciphers = yes
271 Dovecot 2.1: Almost as good as dovecot 2.2. Does not support ssl\_prefer\_server\_ciphers
273 \paragraph*{Limitations}\mbox{}\\
275 Dovecot currently does not support disabling TLS compression. Furthermore, DH parameters
276 greater than 1024bit aren't possible. The most recent version 2.2.7 of Dovecot implements
277 configurable DH parameter length
278 \footnote{\url{http://hg.dovecot.org/dovecot-2.2/rev/43ab5abeb8f0}}.
280 \subsubsection{cyrus-imapd (based on 2.4.17)}
282 \paragraph*{imapd.conf}\mbox{}\\
284 To activate SSL/TLS configure your certificate with
285 \begin{lstlisting}[breaklines]
286 tls_cert_file: .../cert.pem
287 tls_key_file: .../cert.key
290 Do not forget to add necessary intermediate certificates to the .pem file.\\
292 Limiting the ciphers provided may force (especially older) clients to connect without encryption at all! Sticking to the defaults is recommended.\\
294 If you still want to force strong encryption use
295 \begin{lstlisting}[breaklines]
296 tls_cipher_list: <...recommended ciphersuite...>
299 cyrus-imapd loads hardcoded 1024 bit DH parameters using get\_rfc2409\_prime\_1024() by default. If you want to load your own DH parameters add them PEM encoded to the certificate file given in tls\_cert\_file. Do not forget to re-add them after updating your certificate.
301 \paragraph*{cyrus.conf}\mbox{}\\
303 To support POP3/IMAP on ports 110/143 with STARTTLS add
304 \begin{lstlisting}[breaklines]
305 imap cmd="imapd" listen="imap" prefork=3
306 pop3 cmd="pop3d" listen="pop3" prefork=1
308 to the SERVICES section.\\
310 To support POP3S/IMAPS on ports 995/993 add
311 \begin{lstlisting}[breaklines]
312 imaps cmd="imapd -s" listen="imaps" prefork=3
313 pop3s cmd="pop3d -s" listen="pop3s" prefork=1
316 \paragraph*{Limitations}\mbox{}\\
318 cyrus-imapd currently (2.4.17, trunk) does not support elliptic curves. ECDHE will not work even if defined in your cipher list.\\
320 Currently there is no way to prefer server ciphers or to disable compression.\\
322 There is a working patch for all three features:
323 \url{https://bugzilla.cyrusimap.org/show_bug.cgi?id=3823}\\
325 There is no way to prevent unencrypted connections on the STARTTLS ports. You can prevent usage of plaintext login by setting
326 \begin{lstlisting}[breaklines]
329 in imapd.conf. But note that SASL PLAIN/LOGIN is still available!\\
334 % XXX config von Adi?
336 % ciphers = EDH+CAMELLIA256:EDH+aRSA:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:-AES128:!CAMELLIA128:!ECDSA:AES256-SHA:EDH+AES128;
337 % options = CIPHER_SERVER_PREFERENCE
340 \subsubsection{SMTP in general}
342 SMTP usually uses opportunistic TLS. This means that an MTA will accept TLS connections when asked for it during handshake but will not require it. One should always support incoming opportunistic TLS and always try TLS handshake outgoing.\\
344 Furthermore a mailserver can operate in three modes:
346 \item As MSA (Mail Submission Agent) your mailserver receives mail from your clients MUAs (Mail User Agent).
347 \item As receiving MTA (Mail Transmission Agent, MX)
348 \item As sending MTA (SMTP client)
351 We recommend the following basic setup for all modes:
353 \item correctly setup MX, A and PTR RRs without using CNAMEs at all.
354 \item enable encryption (opportunistic TLS)
355 \item do not use self signed certificates
358 For SMTP client mode we additionally recommend:
360 \item the hostname used as HELO must match the PTR RR
361 \item setup a client certificate (most server certificates are client certificates as well)
362 \item either the common name or at least an alternate subject name of your certificate must match the PTR RR
363 \item do not modify the cipher suite for client mode
366 For MSA operation we recommend:
368 \item listen on submission port 587
369 \item enforce SMTP AUTH even for local networks
370 \item do not allow SMTP AUTH on unencrypted connections
371 \item optionally use the recommended cipher suites if (and only if) all your connecting MUAs support them
376 % Note that (with the exception of MSA mode), it might be better to allow any cipher suite -- since any encryption is better than no encryption when it comes to opportunistic TLS.
378 We strongly recommend to allow all cipher suites for anything but MSA
379 mode, because the alternative is plain text transmission.
381 \subsubsection{Postfix}
383 \todo{cm: document DANE}
385 First, you need to generate Diffie Hellman parameters (please first take a look at the section \ref{section:PRNG}):
387 \todo{FIXME: this is a really weak setting! See also: http://postfix.1071664.n5.nabble.com/postfix-hardening-what-can-we-do-td61874.html}
388 \begin{lstlisting}[breaklines]
389 % openssl gendh -out /etc/postfix/dh_param_512.pem -2 512
390 % openssl gendh -out /etc/postfix/dh_param_1024.pem -2 1024
393 Next, we specify these DH parameters in \verb|main.cf|:
395 \begin{lstlisting}[breaklines]
396 smtpd_tls_dh512_param_file = /etc/postfix/dh_param_512.pem
397 smtpd_tls_dh1024_param_file = /etc/postfix/dh_param_1024.pem
400 \paragraph*{MX and SMTP client configuration}\mbox{}\\
402 As discussed above, because of opportunistic encryption we do not
403 restrict the list of ciphers. There's still some steps needed to
404 enable TLS, all in \verb|main.cf| \footnote{Refer to
405 \url{http://www.postfix.org/TLS_README.html} for an in-depth
408 \begin{lstlisting}[breaklines]
409 smtpd_tls_cert_file = /etc/postfix/server.pem
410 smtpd_tls_key_file = /etc/postfix/server.key
411 # use 0 for Postfix >= 2.9, and 1 for earlier versions
412 smtpd_tls_loglevel = 0
413 # enable opportunistic TLS support in the SMTP server and client
414 smtpd_tls_security_level = may
415 smtp_tls_security_level = may
416 # if you have authentication enabled, only offer it after STARTTLS
417 smtpd_tls_auth_only = yes
418 tls_ssl_options=NO_COMPRESSION
419 tls_random_source = dev:/dev/urandom
422 \paragraph*{MSA}\mbox{}\\
424 For the MSA \verb|smtpd| process, we first define the ciphers that are
425 acceptable for the ``mandatory'' security level, again in
428 \begin{lstlisting}[breaklines]
429 smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
430 smtpd_tls_mandatory_ciphers=high
431 tls_high_cipherlist='EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EDH+CAMELLIA256:EECDH:EDH+aRSA:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!AES128:!CAMELLIA128:!ECDSA:AES256-SHA'
434 Then, we configure the MSA smtpd in \verb|master.cf| with two
435 additional options that are only used for this instance of smtpd:
437 \begin{lstlisting}[breaklines]
438 587 inet n - - - - smtpd
439 -o smtpd_tls_security_level=encrypt -o tls_preempt_cipherlist = yes
442 For those users who want to use ECC key exchange, it is possible to specify this via:
443 \begin{lstlisting}[breaklines]
444 smtpd_tls_eecdh_grade = ultra
447 You can check the settings with the following command:
448 \begin{lstlisting}[breaklines]
449 $ zegrep "TLS connection established from.*with cipher" | /var/log/mail.log | awk '{printf("%s %s %s %s\n", $12, $13, $14, $15)}' | sort | uniq -c | sort -n
450 1 SSLv3 with cipher DHE-RSA-AES256-SHA
451 23 TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384
452 60 TLSv1 with cipher ECDHE-RSA-AES256-SHA
453 270 TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384
454 335 TLSv1 with cipher DHE-RSA-AES256-SHA
457 \paragraph*{Limitations}\mbox{}\\
459 tls\_ssl\_options is supported from Postfix 2.11 onwards. You can
460 leave the statement in the configuration for older versions, it will
463 tls\_preempt\_cipherlist is supported from Postfix 2.8 onwards. Again,
464 you can leave the statement in for older versions.
466 \subsubsection{Exim (based on 4.82)}
468 It is highly recommended to read
470 \url{http://exim.org/exim-html-current/doc/html/spec_html/ch-encrypted_smtp_connections_using_tlsssl.html}
474 \paragraph*{MSA mode (submission)}\mbox{}\\
476 In the main config section of Exim add:
478 \begin{lstlisting}[breaklines]
479 tls_certificate = ..../cert.pem
480 tls_privatekey = ..../cert.key
482 don't forget to add intermediate certificates to the .pem file if needed.\\
484 Tell Exim to advertise STARTTLS in the EHLO answer to everyone:
485 \begin{lstlisting}[breaklines]
486 tls_advertise_hosts = *
489 If you want to support legacy SMTPS on port 465, and STARTTLS on smtp(25)/submission(587) ports set
490 \begin{lstlisting}[breaklines]
491 daemon_smtp_ports = smtp : smtps : submission
492 tls_on_connect_ports = 465
495 It is highly recommended to limit SMTP AUTH to SSL connections only. To do so add
496 \begin{lstlisting}[breaklines]
497 server_advertise_condition = ${if eq{$tls_cipher}{}{no}{yes}}
499 to every authenticator defined.\\
501 Add the following rules on top of your acl\_smtp\_mail:
502 \begin{lstlisting}[breaklines]
504 control = submission/sender_retain
506 This switches Exim to submission mode and allows addition of missing Message-ID: and Date: headers.\\
508 It is not advisable to restrict the default cipher list for MSA mode if you don't know all connecting MUAs. If you still want to define one please consult the Exim documentation or ask on the exim-users mailinglist.\\
509 % Exim maintainers do not recommend to change default ciphers
510 % I think we shouldn't, too
512 %\begin{lstlisting}[breaklines]
513 % tls_require_ciphers = <...recommended ciphersuite...>
516 The cipher used is written to the logfiles by default. You may want to add
517 \begin{lstlisting}[breaklines]
518 log_selector = <....whatever your log_selector already contains...> \
519 +tls_certificate_verified +tls_peerdn +tls_sni
521 to get even more TLS information logged.
524 \paragraph*{server mode (incoming)}\mbox{}\\
526 In the main config section of Exim add:
528 \begin{lstlisting}[breaklines]
529 tls_certificate = ..../cert.pem
530 tls_privatekey = ..../cert.key
532 don't forget to add intermediate certificates to the .pem file if needed.\\
534 Tell Exim to advertise STARTTLS in the EHLO answer to everyone:
535 \begin{lstlisting}[breaklines]
536 tls_advertise_hosts = *
539 Listen on smtp(25) port only
540 \begin{lstlisting}[breaklines]
541 daemon_smtp_ports = smtp
544 It is not advisable to restrict the default cipher list for opportunistic encryption as used by SMTP. Do not use cipher lists recommended for HTTPS! If you still want to define one please consult the Exim documentation or ask on the exim-users mailinglist.\\
545 % Exim maintainers do not recommend to change default ciphers
548 %\begin{lstlisting}[breaklines]
549 % tls_require_ciphers = <...recommended ciphersuite...>
552 If you want to request and verify client certificates from sending hosts set
553 \begin{lstlisting}[breaklines]
554 tls_verify_certificates = /etc/pki/tls/certs/ca-bundle.crt
555 tls_try_verify_hosts = *
558 tls\_try\_verify\_hosts only reports the result to your logfile. If you want to disconnect such clients you have to use
559 \begin{lstlisting}[breaklines]
563 The cipher used is written to the logfiles by default. You may want to add
564 \begin{lstlisting}[breaklines]
565 log_selector = <....whatever your log_selector already contains...> \
566 +tls_certificate_verified +tls_peerdn +tls_sni
568 to get even more TLS information logged.
570 \paragraph*{client mode (outgoing)}\mbox{}\\
572 Exim uses opportunistic encryption in the SMTP transport by default.
574 Client mode settings have to be done in the configuration section of the smtp transport (driver = smtp).
576 If you want to use a client certificate (most server certificates can be used as client certificate, too) set
577 \begin{lstlisting}[breaklines]
578 tls_certificate = .../cert.pem
579 tls_privatekey = .../cert.key
581 This is recommended for MTA-MTA traffic.\\
583 %If you want to limit used ciphers set
584 %\begin{lstlisting}[breaklines]
585 % tls_require_ciphers = <...recommended ciphersuite...>
587 % Exim Maintainers do not recommend ciphers. We shouldn't do so, too.
588 Do not limit ciphers without a very good reason. In the worst case you end up without encryption at all instead of some weak encryption. Please consult the Exim documentation if you really need to define ciphers.
590 \paragraph*{OpenSSL}\mbox{}\\
591 Exim already disables SSLv2 by default. We recommend to add
592 \begin{lstlisting}[breaklines]
593 openssl_options = +all +no_sslv2 +no_compression +cipher_server_preference
595 to the main configuration.\\
596 Note: +all is misleading here since OpenSSL only activates the most common workarounds. But that's how SSL\_OP\_ALL is defined.\\
598 You do not need to set dh\_parameters. Exim with OpenSSL by default uses parameter initialization with the "2048-bit MODP Group with 224-bit Prime Order Subgroup" defined in section 2.2 of RFC 5114 (ike23).
599 If you want to set your own DH parameters please read the TLS documentation of exim.\\
603 \paragraph*{GnuTLS}\mbox{}\\
605 GnuTLS is different in only some respects to OpenSSL:
607 \item tls\_require\_ciphers needs a GnuTLS priority string instead of a cipher list. It is recommended to use the defaults by not defining this option. It highly depends on the version of GnuTLS used. Therefore it is not advisable to change the defaults.
608 \item There is no option like openssl\_options
611 \paragraph*{Exim string expansion}\mbox{}\\
613 Note that most of the options accept expansion strings. This way you can eg. set cipher lists or STARTTLS advertisment conditionally. Please follow the link to the official Exim documentation to get more information.
615 \paragraph*{Limitations}\mbox{}\\
617 Exim currently (4.82) does not support elliptic curves with OpenSSL. This means that ECDHE is not used even if defined in your cipher list.
618 There already is a working patch to provide support:\\
619 \url{http://bugs.exim.org/show_bug.cgi?id=1397}
622 % do we need to documment starttls in detail?
623 %\subsubsection{starttls?}
627 \begin{lstlisting}[breaklines]
629 PermitEmptyPasswords no
632 HostKey /etc/ssh/ssh_host_rsa_key
634 MACs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
635 KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
638 % XXX: curve25519-sha256@libssh.org only available upstream(!)
639 Note: older linux systems won't support SHA2, PuTTY does not support RIPE-MD160.
644 \todo{write this subsection}
645 \subsubsection{IPSec}
647 \todo{cm: check if there are downgrade attacks for checkpoint \& co} \\
648 \todo{cm: reference the paper describing how complex IPSec is and that it can't be checked properly} \\
649 \todo{cm: change this to a table format: Variant ((A,B), (recommendations, recommendations))} \\
651 \paragraph*{Assumptions}\mbox{}\\
653 We assume the usage of IKE (v1 or v2) for this document, and ESP.
655 \paragraph*{Authentication}\mbox{}\\
657 IPSEC authentication should optimally be performed via RSA signatures,
658 with a key size of 2048 bits or more. Configuring only the trusted CA
659 that issued the peer certificate provides for additional protection
660 against fake certificates.
662 If you need to use Pre-Shared Key authentication:
665 \item Choose a \textbf{random} PSK of 20 characters or more (\todo{length, references!})
666 \item Use a \textbf{separate} PSK for any IPSEC connection
667 \item Change the PSKs regularily
670 \paragraph*{Cryptographic Suites}\mbox{}\\
672 IPSEC Cryptographic Suites are pre-defined settings for all the
673 items of a configuration; they try to provide a balanced security
674 level and make setting up VPNs easier.
676 When using any of those suites, make sure to enable ``Perfect Forward
677 Secrecy`` for Phase 2, as this is not specified in the suites.
679 \verb|Suite-B-GCM-256| \footnote{\url{http://tools.ietf.org/html/rfc6379}}
680 would be roughly equivalent to ``Configuration A``, but keep in mind
681 that it uses NIST elliptic curves for the Diffie-Hellman key exchange.
683 \verb|Suite-B-GCM-128| or
684 \verb|VPN-B| \footnote{\url{http://tools.ietf.org/html/rfc4308}} would
685 be roughly equivalent to ``Configuration B``; again,
686 \verb|Suite-B-GCM-128| uses NIST elliptic curves, \verb|VPN-B| does
689 \todo{Aaron: make an example for how to include images}
690 \todo{cm: screenshots of Checkpoint settings}
692 \paragraph*{IKE or Phase 1}\mbox{}\\
694 IKE or Phase 1 is the mutual authentication and key exchange phase.
696 Use only ``main mode``, as ``aggressive mode`` has known security
697 vulnerabilities \footnote{\url{http://ikecrack.sourceforge.net/}}.
699 Encryption Algorithm: AES or CAMELLIA
701 Hash Algorithm: SHA2-256, SHA2-384 or SHA2-512
703 DH Group: Group 14--18 (2048--8192 bit DH), or 19-21 (256--521 bit
706 Lifetime: \todo{need recommendations; 1 day seems to be common practice}
708 \todo{what about CAST?}
710 \paragraph*{ESP or Phase 2}\mbox{}\\
712 Enable ``Perfect Forward Secrecy`` with a DH Group equivalent to the
715 Encryption Algorithm: AES-GCM-16, AES-CTR, AES-CCM-16, AES-CBC, SEED
716 or CAMELLIA \todo{order of this list?}
718 Hash Algorithm: none (if using AES-GCM), HMAC-SHA-SHA256 or longer
719 \todo{what about AES-XCBC-MAC?}
721 Lifetime: \todo{need recommendations; 1--8 hours seems to be common practice}
724 \subsubsection{OpenVPN}
725 \todo{cm: please write this subsubsection}
726 \todo{WARNING - Section Writing in progress...}
727 \todo{We suppose user uses easy-rsa which is roughly used in all HOWTO}
729 \paragraph{Fine tuning at installation level}
731 When installing an OpenVPN server instance, you are probably using {\it easy-rsa} tools to generate the crypto stuff needed.
732 From the directory where you will run them, you can enhance you configuration by changing the following variables in {\it Vars}
734 \begin{lstlisting}[breaklines]
738 This will enhance the security of the key exchange steps by using RSA keys with a length of 2048 bits.
740 \todo{Shouldn't we need to reduce CA and certificate lifetime? Per default 10y!!}
743 \paragraph{Server Configuration}
745 \todo{To write - locked by David}
747 \begin{lstlisting}[breaklines]
748 cipher AES-128-CBC # AES
752 \paragraph{Client Configuration}
754 \todo{To write - locked by David}
756 \begin{lstlisting}[breaklines]
763 \todo{cm: please write this subsubsection}
765 \subsubsection{Cisco IPSec}
766 \todo{write this subsubsection}
768 \subsubsection{Juniper VPN}
769 \todo{write this subsubsection. AK: ask Hannes}
771 \subsubsection{L2TP over IPSec}
772 \todo{write this subsubsection}
774 \subsubsection{Racoon}
775 \todo{write this subsubsection}
778 \subsection{PGP/ GPG - Pretty Good Privacy}
780 \todo{re-work this subsection -- this is still only a draft!!}
783 \subsection{seclayer-tcp}
784 \todo{Ramin: please write this section or ask Posch}
785 For the austrian citizen card....
788 seclayer-tcp 3495/udp # securitylayer over tcp
789 seclayer-tcp 3495/tcp # securitylayer over tcp
793 \subsection{IPMI, ILO and other lights out management solutions}
794 \todo{write this!! Recommendation. Empfehlung: nie ins Internet, nur in ein eigenes mgmt VLAN, das via VPN erreichbar ist!!
798 \todo{AK: ask Klaus. Write this section, Klaus??? }
800 \subsection{Instant Messaging Systems}
801 \subsubsection{XMPP / Jabber}
802 \todo{ts: Describe ejabberd configuration. Reference to Peter`s manifesto https://github.com/stpeter/manifesto}
807 \input{proxy_solutions}
813 %%% TeX-master: "applied-crypto-hardening"