Nginx as reverse proxy with upstream SSL and weak ciphers

1

I have to access an outdated web server with outdated security settings. The server supports SSL 3 and TLS 1 and the following cipher suites:

TLS_DHE_RSA_WITH_AES_256_CBC_SHA                   
TLS_RSA_WITH_AES_256_CBC_SHA                       
TLS_DHE_RSA_WITH_AES_128_CBC_SHA                   
TLS_RSA_WITH_AES_128_CBC_SHA                       
TLS_RSA_WITH_RC4_128_SHA                           
TLS_RSA_WITH_RC4_128_MD5                           
TLS_RSA_EXPORT1024_WITH_RC4_56_SHA                 
TLS_RSA_EXPORT1024_WITH_RC4_56_MD5                 
TLS_RSA_EXPORT_WITH_RC4_40_MD5                     

I have had good experience so far in using Nginx as a reverse proxy to connect to various services and servers so I tried it here, too. This is my configuration:

server {
    listen 443 ssl;

    server_name localhost;

    ssl_certificate /etc/ssl/certs/self-signed.crt;
    ssl_certificate_key /etc/ssl/private/self-signed.key;

    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-ForwardedFor $proxy_add_x_forwarded_for;
        proxy_pass https://192.168.2.110:443;
        proxy_redirect https://localhost:443 https://192.168.2.110:443;
    }
}

I want https://localhost to be redirected to https://192.168.2.110:443;

This fails due to weak Diffie-Hellman group (cf. Logjam). Note that the certificate is also expired for 4 years now. In the error log I find this:

2017/05/10 23:59:45 [crit] 2220#2220: *1 SSL_do_handshake() failed (SSL: error:14082174:SSL routines:ssl3_check_cert_and_algorithm:dh key too small) while SSL handshaking to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "https://192.168.0.10:443/", host: "localhost"

Can I force Nginx to accept weak ciphers or any other simple solutions? All my browsers on the machines I currently use do not allow that. I currently fall back to an old machine running Windows 7 with an old version of Internet Explorer that accepts the certificate at least with exception. I can of course use a virtual machine with 2012 software, but using some configuration would be way simpler.

kap

Posted 2017-05-10T22:03:08.680

Reputation: 113

You have added the certificate to the client's certificate store, so the expired certificate, will be trusted? – Ramhound – 2017-05-10T22:05:42.760

Not yet. How do I get the certificate from the server and where should it be stored for Nginx to find it? But that should be secondary problem after the dh prams check. – kap – 2017-05-10T22:09:29.543

The public and private typically is stored on the server. – Ramhound – 2017-05-10T22:26:26.027

No answers