Forum: NGINX Getting forward secrecy enabled

2974d09ac2541e892966b762aad84943?d=identicon&s=25 justin (Guest)
on 2013-10-02 06:13
(Received via mailing list)
On ssllabs.com I am getting the following, even though I am using all
the
recommend settings.

http://i.imgur.com/TlsKMzP.png

Here are my nginx settings:

  ssl_prefer_server_ciphers on;
  ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
  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";
  ssl_dhparam /etc/nginx/ssl/dhparam_4096.pem;

Any idea how I can get full forward secrecy enabled?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243341#msg-243341
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mex (Guest)
on 2013-10-02 06:53
(Received via mailing list)
Hi justin,

> even though I am using all the recommend settings.

which recommended settings? recommended by whom?

i learned that, from ssllabs-view, only the cipher-suites recommended by
ivan ristic seem to work:
http://www.mare-system.de/guide-to-nginx-ssl-spdy-...
all other cipher-suites i found "somewhere" that should enable PFS dont
seem
to work,
at least for sslabs.

problem is: there is no other way (that i know of) than ssllabs to check
your server-settings
and check PFS.

but PFS also depends on your openssl-version.


regards,

mex

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243343#msg-243343
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mex (Guest)
on 2013-10-02 07:00
(Received via mailing list)
btw, check the following for a reference for PFS-setup:
https://www.ssllabs.com/ssltest/analyze.html?d=makepw.com

ssl-settings are:

ssl_protocols SSLv3 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;


regards,


mex

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243344#msg-243344
2974d09ac2541e892966b762aad84943?d=identicon&s=25 justin (Guest)
on 2013-10-02 07:17
(Received via mailing list)
I tried what was recommended by
(http://www.mare-system.de/guide-to-nginx-ssl-spdy-...

But still missing: IE 11 / Win 8.1 (FAIL)
                           IE 8-10 / Win 7 (NO FS)
                           IE 7 / Vista (NO FS)

Here is my exact config:

  ssl_prefer_server_ciphers on;
  ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
  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;

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243345#msg-243345
2974d09ac2541e892966b762aad84943?d=identicon&s=25 justin (Guest)
on 2013-10-02 07:18
(Received via mailing list)
Sucks the forum software cutting of the cipher list string, here is what
I
am using in a gist:

https://gist.github.com/nodesocket/8d4cc41c91466ae17b80

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243346#msg-243346
2974d09ac2541e892966b762aad84943?d=identicon&s=25 justin (Guest)
on 2013-10-02 07:33
(Received via mailing list)
Comparing the result from makepw.com and my site, I am missing the
following
cipher suites:

TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030)   ECDH 256 bits (eq. 3072
bits RSA)   FS  256
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   ECDH 256 bits (eq. 3072
bits RSA)   FS  128
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (0xc028)   ECDH 256 bits (eq. 3072
bits RSA)   FS  256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027)   ECDH 256 bits (eq. 3072
bits RSA)   FS  128
TLS_ECDHE_RSA_WITH_RC4_128_SHA (0xc011)   ECDH 256 bits (eq. 3072 bits
RSA)
 FS  128
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014)   ECDH 256 bits (eq. 3072
bits
RSA)   FS  256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)   ECDH 256 bits (eq. 3072
bits
RSA)   FS  128

I just confirmed that I am running the latest version of openssl
(OpenSSL
1.0.1e 11 Feb 2013).

Any ideas?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243347#msg-243347
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mex (Guest)
on 2013-10-02 07:35
(Received via mailing list)
hmm, looks like some mismatch: in yoiur config you define ECDH, but in
your
screenshot
i see DH configured (please compare your screenshot with the
ssllabs-link i
provided, esp.
the cipher-suites/handshake - part.

should be:

TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030)   ECDH 256 bits (eq. 3072
bits RSA)   FS

is:
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030)   DH 4096 bits



your openssl-version seems to be OK.

did you compiled nginx with your own version of openssl?

if not, what gives "openssl version" ?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243348#msg-243348
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mex (Guest)
on 2013-10-02 07:47
(Received via mailing list)
how did you compiled nginx, with openssl-sources via
--with-openssl=/path/to/sources ?
i could imagine that, if not, your (outdated) distros openssl-dev might
be
used.

i have this issue when compiling nginx on debian; i have to download
openssl
and
point nginx where to find the sources

but since openssl recognizes openssl 1.0.1e ... this seems fishy
somehow, as
if you
are potentially capable of PFS, but are not able to deliver, for
whatever
reason.

all i did for makepw.com was:

 ./configure  ... --with-http_spdy_module --with-http_ssl_module
--with-openssl=/path/to/openssl_source/ ...

then i configured the cipher-suites according to recomendations from
ivan
ristic.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243349#msg-243349
2974d09ac2541e892966b762aad84943?d=identicon&s=25 justin (Guest)
on 2013-10-02 07:57
(Received via mailing list)
I don't compile nginx, I get it from the official CentOS repo:

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243350#msg-243350
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mex (Guest)
on 2013-10-02 08:29
(Received via mailing list)
maybe you ask the person who creates the packages how nginx was build,
which
openssl-version applies etc pp.

can you execute "openssl version" on the server nginx runs on?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243351#msg-243351
8b0e4dc8d49f6c405d9d915423fd779f?d=identicon&s=25 Darren Pilgrim (Guest)
on 2013-10-02 10:25
(Received via mailing list)
I have:

ssl_ciphers HIGH:!SSLv2:!MEDIUM:!LOW:!EXP:!RC4:!DSS:!aNULL:@STRENGTH;
ssl_prefer_server_ciphers on;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;

Yields:

https://www.ssllabs.com/ssltest/analyze.html?d=rus...

nginx 1.4.2 compiled against OpenSSL 1.0.1e 11 Feb 2013
050396bddd167f343d4557392827ae47?d=identicon&s=25 Vahan Yerkanian (Guest)
on 2013-10-02 13:09
(Received via mailing list)
On Oct 2, 2013, at 9:57 AM, justin <nginx-forum@nginx.us> wrote:

> I don't compile nginx, I get it from the official CentOS repo:
>
> [nginx]
> name=nginx repo
> baseurl=http://nginx.org/packages/centos/6/$basearch/
> gpgcheck=0
> enabled=1
>

That's your problem, that version doesn't support ECDHE.

You'll need to compile your own version, there are lots of guides on the
net, one of the first results on Google:

https://xkyle.com/getting-started-with-spdy-on-nginx/

Best regards,
Vahan Yerkanian
Tech. Coordinator
Helix Consulting LLC
2974d09ac2541e892966b762aad84943?d=identicon&s=25 justin (Guest)
on 2013-10-03 08:30
(Received via mailing list)
Yeah, anyway to get the official yum repo to support ECDHE when they
compile. Seems like a basic thing they should already do already.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243398#msg-243398
25c5f9ec1f3bd6b8a421f3022863508f?d=identicon&s=25 Sergey Budnevitch (Guest)
on 2013-10-03 14:37
(Received via mailing list)
On 2  Oct2013, at 15:08 , Vahan Yerkanian <vahan@helix.am> wrote:

>
> That's your problem, that version doesn't support ECDHE.

nginx itself has no ciphers support, it depend on openssl.
RHEL/CentOS version of openssl lacks elliptic curve ciphers,
it is explicitly striped from rpm
(https://bugzilla.redhat.com/show_bug.cgi?id=319901),
and ECDHE is unavailable on RHEL/CentOS with default openssl.
So either change/rebuild openssl rpm, rebuild nginx with
statically linked openssl or use another linux distribution.

You could list and check available ciphers by:
openssl cipher -v
25c5f9ec1f3bd6b8a421f3022863508f?d=identicon&s=25 Sergey Budnevitch (Guest)
on 2013-10-03 15:17
(Received via mailing list)
On 3  Oct2013, at 16:36 , Sergey Budnevitch <sb@nginx.com> wrote:

>>> gpgcheck=0
>>> enabled=1
>>>
>>
>> That's your problem, that version doesn't support ECDHE.
>
> nginx itself has no ciphers support, it depend on openssl.
> RHEL/CentOS version of openssl lacks elliptic curve ciphers,
> it is explicitly striped from rpm
(https://bugzilla.redhat.com/show_bug.cgi?id=319901),
> and ECDHE is unavailable on RHEL/CentOS with default openssl.
> So either change/rebuild openssl rpm,

It is neccesary to rebuild nginx too, openssl replacement along is not
sufficient.

> rebuild nginx with
> statically linked openssl or use another linux distribution.
>
> You could list and check available ciphers by:
> openssl cipher -v

BTW, DHE also provides forward secrecy, but it is slow.
94389c4cf2baaab5798bbc5e899ff0e9?d=identicon&s=25 Gena Makhomed (Guest)
on 2013-10-03 15:30
(Received via mailing list)
On 03.10.2013 15:36, Sergey Budnevitch wrote:

> nginx itself has no ciphers support, it depend on openssl.
> RHEL/CentOS version of openssl lacks elliptic curve ciphers,
> it is explicitly striped from rpm
(https://bugzilla.redhat.com/show_bug.cgi?id=319901),
> and ECDHE is unavailable on RHEL/CentOS with default openssl.
> So either change/rebuild openssl rpm, rebuild nginx with
> statically linked openssl or use another linux distribution.

for rebuild nginx with statically linked openssl, spec changes:

========================================================

...
%define openssl_version 1.0.1e
...
Source0:    http://sysoev.ru/nginx/nginx-%{version}.tar.gz
...
Source4:
http://www.openssl.org/source/openssl-%{openssl_ve...
...
%prep
%setup -q
%setup -q -b4
...
./configure \
...
     --with-openssl=../openssl-%{openssl_version} \
     --with-openssl-opt="no-threads no-shared no-zlib no-dso no-asm" \
...
#make %{?_smp_mflags}
make
...

========================================================

P.S.

better if nginx rpm spec contain build options -
like "--with-statically-linked-openssl"
for easy change usage statically/dynamically
linked openssl during nginx srpm rebuild.
or even change default to always use
latest openssl for nginx from nginx.org

if nginx build with latest openssl -
Getting forward secrecy enabled is easy, as described in articles:

https://community.qualys.com/blogs/securitylabs/20...

and

https://community.qualys.com/blogs/securitylabs/20...

for example:

     ssl_protocols SSLv3 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 +RC4 RC4";

     ssl_dhparam /etc/tls/dh2048/dh2048.pem;
     ssl_session_cache shared:SSL:4M;
     ssl_session_timeout 120m;

     ssl_stapling on;
     resolver 8.8.8.8 8.8.4.4;

with such config test https://www.ssllabs.com/ssltest/
for nginx on CentOS 6 say:

"This server supports Forward Secrecy with modern browsers."

--
Best regards,
  Gena
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mex (Guest)
on 2013-10-10 17:42
(Received via mailing list)
hi darren,

your ciphers look very good!

i included your suggestion in my ssl-guide, looking forward to perftest
those
cipher_suites.



regards,

mex

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,243341,243594#msg-243594
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.