En Ubuntu 20.04, a través de una VPN, ya no puedo acceder a un servidor que utiliza el protocolo TLSv1.
En Ubuntu 18.04, estaba funcionando.
Primero me conecto a la VPN a través de SNX y luego uso un programa que accede al servidor.
Hice algunas pruebas con openssl para resaltar este problema. ¿Es posible solucionar esto? Creo que mi problema puede tener que ver con el mismo informado en https://github.com/curl/curl/issues/4097 .
Creo que el protocolo no compatible OpenSSL v1.1.1 ssl_choose_client_version tiene que ver con mi problema, pero es diferente porque no tiene el problema "no hay protocolos disponibles".
Cuando pruebo con openssl, aparece el error "protocolo no compatible ", pero cuando pruebo con openssl forzando TLSv1 , aparece el error " no hay protocolos disponibles ".
Detalles de las pruebas:
Ubuntu 18.04:
Package: openssl -> Version: 1.1.1-1ubuntu2.1 ~ 18.04.5 openssl s_client -connect host: port -> works - TLSv1 ("SSL-Session: Protocol: TLSv1."). openssl s_client -connect host: port -tls1 -> works - TLSv1 ("SSL-Session: Protocol: TLSv1."). openssl s_client -connect host: port -tls1_1 -> 139786161414592: error: 1425F102: SSL routines: ssl_choose_client_version: unsupported protocol: ../ ssl / statem / statem_lib.c: 1907: openssl s_client -connect host: port -tls1_2 -> 139786161414592: error: 1425F102: SSL routines: ssl_choose_client_version: unsupported protocol: ../ ssl / statem / statem_lib.c: 1907:Ubuntu 20.04:
Package: openssl -> Version: 1.1.1f-1ubuntu2 openssl s_client -connect host: port -> 140253162648896: error: 1425F102: SSL routines: ssl_choose_client_version: unsupported protocol: ../ ssl / statem / statem_lib.c: 1941: openssl s_client -connect host: port -tls1 -> 139722831217984: error: 141E70BF: SSL routines: tls_construct_client_hello: no protocols available: ../ ssl / statem / statem_clnt.c: 1112: openssl s_client -connect host: port -tls1_1 -> 139923839911232: error: 141E70BF: SSL routines: tls_construct_client_hello: no protocols available: ../ ssl / statem / statem_clnt.c: 1112: openssl s_client -connect host: port -tls1_2 -> 139862992581952: error: 1425F102: SSL routines: ssl_choose_client_version: unsupported protocol: ../ ssl / statem / statem_lib.c: 1941:Ubuntu 18.04 - Conexión detallada con éxito
my@machine: ~ $ openssl s_client -connect my.domain: 9023 -tls1 CONNECTED (00000005) depth = 2 C = XX, O = XXXXXX, OU = ICP-XX, CN = AC XXXXX vX verify error: num = 19: self signed certificate in certificate chain --- Certificate chain 0 s: C = XX, ST = XX, L = XXXXXX, O = XXXXXXXX, OU = XXXXXXXXXXX XXXXX, CN = xxx.com i: C = XX, O = XXXXXXXX., OU = ICP-XX, CN = AC XXXXX vX 1 s: C = XX, O = XXXXXXXX., OU = ICP-XX, CN = AC XXXXX vX i: C = XX, O = XXXXXXXX., OU = ICP-XX, CN = AC XXXXX vX 2 s: C = XX, O = XXXXXXXX., OU = ICP-XX, CN = AC XXXXX vX i: C = XX, O = XXXXXXXX., OU = ICP-XX, CN = AC XXXXX vX --- Server certificate ----- BEGIN CERTIFICATE ----- (...) -----END CERTIFICATE----- subject=X = XX, ST = XX, L = XXXXXX, O = XXXXXXX, OU = XXXXXXXX, CN = mydomain.com issuer=C = XX, O = XXXXXXXXXX, OU = ICP-XX, CN = AC XXXXXXXXXXXXXXXXXXXXX --- No client certificate CA names sent --- SSL handshake has read 4604 bytes and written 449 bytes Verification error: self signed certificate in certificate chain --- New, SSLv3, Cipher is AES256-SHA Server public key is 2048 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol: TLSv1 Cipher: AES256-SHA Session-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Session-ID-ctx: Master-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PSK identity: None PSK identity hint: None SRP username: None Start Time: 1588445847 Timeout: 7200 (sec) Verify return code: 19 (self signed certificate in certificate chain) Extended master secret: no ---Ubuntu 20.04 - Conexión fallida detallada:
my@machine: ~ / Documents / $ openssl s_client -connect my.domain: 9023 CONNECTED (00000003) 139912319178048: error: 1425F102: SSL routines: ssl_choose_client_version: unsupported protocol: ../ ssl / statem / statem_lib.c: 1941: --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 4545 bytes and written 309 bytes Verification: OK --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated Early data was not sent Verify return code: 0 (ok) --- my@machine: ~ / Documents / study $ openssl s_client -connect my.domain: 9023 -tls1 CONNECTED (00000003) 140581447836992: error: 141E70BF: SSL routines: tls_construct_client_hello: no protocols available: ../ ssl / statem / statem_clnt.c: 1112: -El servidor admite TLSv1 y no TLSv1.1 y superior
La versión de Ubuntu 20.x openssl no es compatible con TLSv1 e inferior.
Podría ser que el archivo openssl.cnf se haya actualizado para agregar valores predeterminados de conexión más seguros. Depende del sistema operativo y el sabor.
Determine la ubicación del archivo de configuración (para openssl para su versión de Linux) y averigüe si hay alguna restricción para reducir las versiones de TLS o cuál es la configuración predeterminada.
Pruebe lo siguiente para ver si el servidor es compatible con TLSv1.1 y superior:
nmap --script ssl-enum-ciphers -p 443 your_host_nameVerifique la salida para ver los cifrados y las versiones correspondientes.
| ssl-enum-ciphers: | TLSv1.0: | ciphers: | TLS_RSA_WITH_AES_128_CBC_SHA - strong | TLS_RSA_WITH_AES_256_CBC_SHA - strong | compressors: | NULL | TLSv1.1: | ciphers: | TLS_RSA_WITH_AES_128_CBC_SHA - strong | TLS_RSA_WITH_AES_256_CBC_SHA - strongAcabo de resolver mi problema con: https://askubuntu.com/questions/1233186/ubuntu-20-04-how-to-set-lower-ssl-security-level
Solo citando este enlace:
Debe agregar esto al comienzo de su archivo de configuración:
openssl_conf = default_confY luego esto hasta el final:
[ default_conf ] ssl_conf = ssl_sect [ssl_sect] system_default = ssl_default_sect [ssl_default_sect] MinProtocol = TLSv1 CipherString = DEFAULT:@SECLEVEL=1El comentario en el enlace de arriba decía:
Note that if you prefer you can make changes to a local copy of the config file, and then ensure your process is started with the environment variable OPENSSL_CONF defined to point at the location of your config file: export OPENSSL_CONF=/path/to/my/openssl.cnf This way you can make changes without having to impact your entire system.¡Usé la segunda opción "exportar OPENSSL_CONF=/ruta/a/mi/openssl.cnf" y funcionó perfectamente!
Si obtiene el error 14187180 como lo hice yo después de probar la respuesta anterior https://askubuntu.com/questions/1233186/ubuntu-20-04-how-to-set-lower-ssl-security-level (o de otro modo) puede gusta probar --dtls-ciphers=LEGACY con openconnect. Necesitaba cambiar a TLSv1.1 como se indicó anteriormente (MinProtocol = TLSv1.1) y agregar esto para conectarme a la VPN Cisco Anyconnect de un cliente.
echo password | OPENSSL_CONF=/etc/ssl/openssl_tls_1_0.cnf openconnect -v -g VPNGROUP -u username --dtls-ciphers=LEGACY --passwd-on-stdin vpn.domainLa solución que funcionó para mí fue crear un openssl_tls1.cnf que contiene:
openssl_conf = default_conf [ default_conf ] ssl_conf = ssl_sect [ssl_sect] system_default = system_default_sect [system_default_sect] MinProtocol = TLSv1 CipherString = DEFAULT:@SECLEVEL=1 Luego, configurar OPENSSL_CONF=/path/to/openssl_tls1.cnf permite conectarse con el protocolo inferior, como en
OPENSSL_CONF=openssl_tls1.cnf wget https://foo.bar