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

  • How To Convert HTML to Text Based PDF
  • How To Emulate Android in Linux
  • How to use KVM and GUI inside Docker
  • python spacey ERROR: No matching distribution found for thinc<8.4.0,>=8.3.12
  • Debian 11 security repo fixes due to EOL
  • MySQL vs MariaDB how to create a socket user tutorial
  • Ubuntu Linux Mint Desktop Dark Black Cannot See Solution
  • How to combine .txt ACLs without breaking things
  • How to ping all of Googlebot's IPs script
  • 'virtio0' uses a qcow2 feature which is not supported by this qemu version: QCOW version 3
  • Linux bash script to get the IP of a list of hostnames
  • How To Use Camera Webcam in Docker for OBS Studio etc...
  • Computer Server Won't Post Boot Or Enter BIOS Setup After Installing RAID SAS or GPU Card etc..
  • How To Test PHP Scripts from CLI with GET variables/query string
  • apt-cache how to see all available versions of a package in Debian Ubuntu Mint
  • Virtualbox VBox Guest-utils drag and drop files stops working with Windows VMs
  • How To Remove Ubuntu Netplan and Go Back to /etc/network/interfaces
  • How To Force Flash an AMD Instinct GPU To Another Model Using Debian Ubuntu Mint Linux
  • How To compile ollama from source to use unsupported AMD GPU with rocm in Ubuntu Debian
  • QEMU KVM Virtio GPU Windows Cannot Select 1080P