1

Does Ubuntu 14.04 support and enable perfect forward secrecy ciphers in the default TLS configuration of servers such as nginx, dovecot and postfix?

Previous versions of Ubuntu such as 12.04 did not even have the needed ciphers compiled in (see LP#1197884 or How to enable TLS 1.2 in Nginx?).

  • 1
    How about you ask: How to enable forward secrecy in X application? – Braiam Apr 13 '14 at 13:39
  • 1
    @Braiam: Because there is plenty of guides out there on how to do that. I just want to know whether Ubuntu 14.04 has all that is needed for PFS out of the box (i.e. support in libraries and ad-hoc configuration). The answer seems to be "no". – gioele Apr 13 '14 at 15:07
  • Look, you still are asking the wrong question, and the answer tells you why "that is because this is not up to Ubuntu to support or enable." So, the right question here is how to enable it since it's you that wants the support. – Braiam Apr 13 '14 at 15:20
4

No. But that is because this is not up to Ubuntu to support or enable. It is up to the respective software to support this.e

You need to have the following lines in your configuration for ...

Apache

SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 \
EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 \
EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"

Nginx

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 \
EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 \
EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";

Dovecot

ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4
ssl_prefer_server_ciphers = yes

Postfix

#the dh params
smtpd_tls_dh1024_param_file = /etc/postfix/dh_1024.pem
smtpd_tls_dh512_param_file = /etc/postfix/dh_512.pem
#enable ECDH
smtpd_tls_eecdh_grade = strong
#enabled SSL protocols, don't allow SSLv2
smtpd_tls_protocols= !SSLv2
smtpd_tls_mandatory_protocols= !SSLv2
#allowed ciphers for smtpd_tls_security_level=encrypt
smtpd_tls_mandatory_ciphers = high
#allowed ciphers for smtpd_tls_security_level=may
#smtpd_tls_ciphers = high
#enforce the server cipher preference
tls_preempt_cipherlist = yes
#disable following ciphers for smtpd_tls_security_level=encrypt
smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL
#disable following ciphers for smtpd_tls_security_level=may
#smtpd_tls_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL
#enable TLS logging to see the ciphers for inbound connections
smtpd_tls_loglevel = 1
#enable TLS logging to see the ciphers for outbound connections
smtp_tls_loglevel = 1

There are some system requirements and other configuration settings. More at the 2 links:

  • Well, Ubuntu ships configuration files for these applications. For example the Apache configuration for saucy includes SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 and SSLProtocol all (in apache2/mods-available/ssl.conf). – gioele Apr 13 '14 at 9:51
  • 3
    -1 Many things are wrong with this post. Don't just copy&paste "one size fits all" which have become obsolete over time like RC4 inclusion which should be disabled. Also, it's not consistent. Why disable RC4 with Dovecot while enabling it for Apache. And leave SSLv2/SSLv3 enabled with Dovecot? And 512-bit DH for Postfix? I doubt you know what you are doing here and this is clearly not thought through well, sorry. – gertvdijk May 5 '15 at 13:21
3

Yes, all supported Ubuntu releases ship with OpenSSL 1.0.1+ and most software is linked against OpenSSL for TLS security.

Keep in mind that a proper TLS server can be complex to set up correctly. Some quick general recommendations.

Server-side ciphersuite ordering

The default ciphersuite of OpenSSL includes support for PFS, but does not prioritize that at handshake level. Also application may have their own default ciphersuite setting to initialize OpenSSL with.

Check regularly for new recommendations

Always set your own ciphersuite/protocol settings to modern recommendations. Every now and then vulnerabilities are found and may decrease security if still used. For example, RC4 should be disabled, but two years ago it was recommended to prioritize that for the BEAST attack back then. That was patched in OpenSSL weeks after, but people keep using RC4... :(

Create DH params!

Also, never forget to create DH parameters or else PFS won't be used for non-ECDHE ciphersuites! It's a common mistakes I see with people around me. OpenSSL will be initialized without legacy DH params and resulting in lack of PFS for non-ECDHE clients.

Follow up-to-date recommendations

This wiki page managed by the Mozilla security team keeps a list of simple instructions and reasons for their recommendations.

https://wiki.mozilla.org/Security/Server_Side_TLS

VERY much recommended to follow this!

Check online

Use for example the Qualys SSL Labs test: https://www.ssllabs.com/ssltest/ and follow up the recommendations. It is very much doable to get an A+ score.

  • "Yes, all supported Ubuntu releases ship with OpenSSL 1.0.2..." <-- Source, please? OP's question was about 14.04 which on a fully up to date 14.04 server I try openssl version and see OpenSSL 1.0.1f 6 Jan 2014. – Tom Brossman Feb 13 '16 at 8:31
0

Yes, Ubuntu 14.04 supports Forward Security by default.

The default configuration lets the client decide whether or not to enable it. Chrome, Firefox, and Safari will request it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.