Is there any way to rewrite the cipher suite that traefik offers to configured servers in a loadBalancer
?
We are currently facing an issue where traefik cannot connect to a device on the network. It took us a long time to figure it out since the error message is just:
level=debug msg="'502 Bad Gateway' caused by: remote error: tls: handshake failure"
In the pcap the message from the device was Handshake Failure (40)
and with the 40
we were able to deduce that there were no shared cipher suites.
Traefik does offer the following cipher suites in the Client Hello:
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
TLS_AES_128_GCM_SHA256
TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256
But the device does not accept any of them. I had hoped that traefik would just offer all cipher suites defined in crypto/tls
tls package - crypto/tls - Go Packages because at least there are the following that are supported by the device:
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_GCM_SHA384
There are also some CBC ciphers that match but lets not use them.
We know/verified that it worked with version 2.10.4. We have updated over the last few weeks first to 2.10.7, then to 2.11.11 and finally today to 2.11.13. Somewhere between 2.10.4 and 2.11.11 this problem occurred.
Our dynamic config currently looks like this:
http:
routers:
device:
entrypoint:
- websecure-device
service: device@file
rule: Host(`device.example.com`)
tls:
certResolver: cloudflare
services:
device:
loadBalancer:
servers:
- url: https://192.168.100.2
passHostHeader: true
serversTransport: https-insecure@file
serversTransports:
https: []
https-insecure:
insecureSkipVerify: true