KB Article #178268

Using Remote Host settings to send the SNI extension to a backend server.

Problem

The SNI extension is not sent with a request despite being selected in Remote Host settings.

Resolution

Update: as of 7.7.Sept2020 and later versions, the hostname and SNI settings are considered independently. (RDAPI-20023)


Original solution: In some cases you can only connect successfully by attaching a SNI extension to the request. This can be tested outside the API Gateway via an OpenSSL command. In these cases including the -servername parameter ensures a successful connection. Whereas when you omit it the following error is returned:



SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:769:



To send an SNI extension you need to use the Remote Host option.
You need to select the 'Send Server Name Indication TLS extension to server' option (general settings). But you must also select the 'Verify server's certificate matches requested hostname' option. This must be selected because the SNI extension is only sent when API Gateway can verify the server's certificate.