The client needs a new connection for this request as the requested host name does not match the Server Name Indication (SNI) in use for this connection.

The client needs a new connection for this request as the requested host name does not match the Server Name Indication (SNI) in use for this connection.

Before reading this, I assume you've done all the proper troubleshooting and you are 100% sure the CDN and backend server is configured correctly.

This can often happen with load balancer's and CDNs if the CDN/balancer to backend server don't use the same ports.

Let's use this example.

On CDN Provider, you define Backend/Origin Server A for www.cooldomain.com

When a user hits CDN Provider with their request host as www.cooldomain.com,your CDN then translates that to a backend server.

Let's say the backend server is 1.2.3.4 on port 30000.

Usually the real backend service listens on say Apache port 443 for SSL, you are getting this as an SNI error because the port doesn't match.  Apache or whatever service wants to know the real user port is 443, but you are being redirected from port 30000 which breaks SNI essentially.  Another way of thinking of this is that NAT is involved or some port translation if you are hitting port 30000 and being redirected to port 443 on an internal/LAN IP.  This is where things are getting broken.

How do we fix this?

Make sure the SNI is sent forcefully such as in haproxy add this:

server server1 1.2.3.4:30000 ssl verify none sni req.hdr(host)
 

If that doesn't work you will need to use more public IPs but this breaks some applications as sometimes the backend server is reallly just another load balancer too unless you have multiple public facing IPs for the load balancers.


Tags:

requested, server, indication, sni, ve, troubleshooting, cdn, backend, configured, correctly, balancer, cdns, ports, provider, define, origin, www, cooldomain, user, translates, listens, apache, ssl, doesn, redirected, essentially, nat, translation, lan, ip, forcefully, haproxy, verify, req, hdr, ips, applications, reallly, multiple, balancers,

Latest Articles

  • Proxmox How To Purge Ceph
  • VMWare ESXi/VSphere Disable Balloon Segfault in Services Solution
  • Apache Linux Debian Ubuntu Container how to manually restart without killing
  • Docker enable UTF8 in Container to stop seeing gibberish ? characters
  • Debian 8 How To Use Apt Update Archive sources.list
  • Debian Live CD Password
  • Forbidden You don't have permission to access this resource. [authz_core:error] [pid 338:tid 338] [client 1.2.3.4:55046] AH01630: client denied by server configuration:
  • The client needs a new connection for this request as the requested host name does not match the Server Name Indication (SNI) in use for this connection.
  • Asterisk RTP/audio not working in either direction in Docker NAT with a NAT client
  • dovecot: imap(root@localhost)<3702>: Error: Mailbox INBOX: mmap(size=352609044) failed with file /var/spool/mail/root/Maildir/dovecot.index.cache: Cannot allocate memory
  • Asterisk cannot find soundfile file.c:824 ast_openstream_full: File for-tech-support does not exist in any format
  • Apache Error solution - mktemp: failed to create directory via template '/var/lock/apache2.XXXXXXXXXX': No such file or directory
  • sysctl settings to reduce buffers and caches in Linux
  • Find /dev/sd block device of ata device - ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310) ata6.00: qc timeout (cmd 0xec) ata6.00: failed to IDENTIFY (I/O error, err_mask=0x4) ata6.00: revalidation failed (errno=-5)
  • Stuttering Audio on VOIP phones when first answering a call slow and fast audio
  • How to distribute the Microsoft VC Visual Studio Redistributable Files On Your Own
  • Nvidia video resolution and codec encode decode support matrix eg. h264 4k h265 HEVC VP9 Card List from GTX, RTX, Quadro
  • Japan and China ping time observations
  • ffmpeg convert to another format eg h265 to h264
  • Apache stop bots and hackers by using forensic logging.