Score:1

nginx reverse-proxy upgrade from nginx 1.17 to nginx 1.18 gives SSL error

mx flag

I am having trouble upgrading nginx from 1.17 to 1.18 (or .19, .20) Everything works ok on 1.17, but higher versions give this error:

2021/08/27 01:14:45 [error] 22#22: *8 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.**.**, server: api*******.hm.*******.gov.br, request: "GET /favicon.ico HTTP/1.1", upstream: "https://192.168.**.**:443/favicon.ico", host: "api*******.hm.********.gov.br"

The error only happens when upstream is a internal IIS server. When upstream is another nginx it works with versions above 1.17

config is basically:

location  / {
    proxy_pass https://$host.***.br$uri$is_args$args;

I tried to use proxy_ssl_verify off without success. IIS certificate is self-generated.

Please advise

digijay avatar
mx flag
Have you tried to add `proxy_ssl_server_name on;`?
mx flag
Yes . I have. Same error
digijay avatar
mx flag
Then it's most probably what Tero Kilkanen has said.
Score:1
us flag

This looks like a problem with TLS versions. Maybe your backend IIS server isn't new enough to support TLS protocol that nginx requires?

Try adding proxy_ssl_protocols directive that contains the SSL / TLS versions your IIS supports.

mx flag
Thanks, Will try that. Any means to debug those protocols strings exchange?
mx flag
I have added `proxy_ssl_protocols TLSv1 TLSv1.1;` (and not TLSv2) to location block and it accepted IIS 8.5 Ciphers (IIS running on W2012r2). Then I will accept the answer because it has taken me off of the error condition. BUT, best approach would be to upgrade IIS to support TLSv2 and I will work on that config too.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.