Today I Learned: 29/11/2021 - A possible solution to problems connecting to an older MSSQL server via ODBC on Ubuntu 21.04
Publish date: 29 Nov 2021
Having moved laptops and changed OS from Ubuntu 20.04 to PopOS 21.04 I could not connect to an older version Microsoft SQL Server using ODBC. The most prevalent suggestion Google provided was to use a lower TLS level, but I knew from previous experience with the server that it supported TLS v1.2. A related suggestion was to permit weaker ciphers, which turned out to be the trick.
Following the advice here I altered my OpenSSL conf file at /etc/ssl/openssl.cnf file by:
- Adding openssl_conf = default_conf to the top of the file
- Adding new sections to the bottom of the file:
[ default_conf ]
ssl_conf = ssl_sect
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
MinProtocol = TLSv1.2
CipherString = DEFAULT:@SECLEVEL=1
The default CipherString is SECLEVEL=2 so this change will permit weaker ciphers in use on older servers.