Skip to navigation

SSL and TLS termination

TLS (Transport Layer Security, the newer name for SSL) is the encryption behind https:// and the padlock in the browser. With TLS termination, the load balancer decrypts the traffic, so it needs a certificate for your site. With TLS passthrough, the load balancer forwards the encrypted traffic unopened, and your own VMs decrypt it with their own certificate.

What is available today

ModeHow you set it upWho holds the certificateAvailable
TerminationApplication (Layer 7) load balancer with an HTTPS listenerThe load balancerNot yet. An HTTPS listener needs a TLS certificate, and there is no way to add one yet.
PassthroughNetwork (Layer 4) load balancer with a TCP listener, for example 443 → 443Your VMsYes
NoneApplication load balancer with an HTTP listener, or a Network load balancer for a protocol that isn’t encryptedNobodyYes

In the portal, HTTPS is shown but disabled: “Needs a TLS certificate. Coming soon”. In the API, an HTTPS listener takes a certificate_ref (a certificate’s ID), but the public API has no call to create or upload a certificate.

Until termination is available, use passthrough for HTTPS. As the portal puts it: “TCP forwards connections unchanged, including TLS passthrough. Your backend servers handle TLS and provide the certificates.”

How passthrough works

  1. The client opens https://shop.example.com. Your domain’s A record points to the load balancer’s IP address.
  2. The load balancer forwards the TCP connection, unchanged, to a healthy VM on its backend port.
  3. The VM presents its own certificate and decrypts the traffic. The load balancer never sees the content.

So:

  • Every VM needs the certificate and key for the name clients use, such as shop.example.com.
  • The load balancer can’t read requests, so it can’t route by path or hostname. Every connection goes to the same targets.
  • Use a “Port is open” health check. There is no HTTPS check, and an HTTP check against a TLS-only port fails.

Before you begin

  • A domain and access to its DNS settings.
  • A certificate and key for that domain on every VM, with your web server serving HTTPS on the backend port, for example 443.
  • That port open in each VM’s firewall group. See Create firewall rules.
  • The VMs running in one location, each with its own public IP address. See Attach VMs.

Serve HTTPS with passthrough in the portal

1

Open the create form

Under Network & Security, click Load Balancer, then Create Load Balancer.

2

Choose the type

Choose the Location where your VMs run, then set Type to Network (Layer 4).

3

Add the forwarding rule

Under Forwarding rules, set Incoming to TCP and port 443, and Backend to TCP and the port your VMs serve HTTPS on, for example 443.

4

Add targets and the health check

Click Add VMs and select your VMs. Under Health check, keep Port is open.

5

Create

Click Create Load Balancer. When the status is Active, copy the Public IP address from Overview → Connect.

Serve HTTPS with passthrough with the API

curl -X POST "https://api.ibee.ai/v1/networking/load-balancers?workspace_id=710995" \
-H "Authorization: Bearer $IBEE_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: shop-tls-create-1" \
-d '{
"name": "shop-tls",
"region_id": "01a1e3fe-3104-7563-ad37-95f90ab93ef3",
"traffic_type": "network",
"node_count": 1,
"listeners": [
{"name": "tcp-443", "protocol": "TCP", "port": 443, "target_group": "tls"}
],
"target_groups": [
{
"name": "tls",
"protocol": "TCP",
"targets": [
{"kind": "vm", "resource_id": "vm-7f3c2d1e", "port": 443},
{"kind": "vm", "resource_id": "vm-8a4d3e2f", "port": 443}
],
"health_check": {"protocol": "TCP"}
}
]
}'

The call answers 202 with an operation. Wait for it, then read the address from conditions.addresses. See Create a load balancer with the API.

Point your domain at the load balancer

The load balancer has an IP address but no hostname. At your DNS provider, add an A record:

TypeNameValue
Ashop (for shop.example.com)The load balancer’s address, for example 103.149.10.86

An A record also works on a root domain such as example.com.

Verify

Check that the load balancer passes your VM’s certificate through:

openssl s_client -connect 103.149.10.86:443 -servername shop.example.com </dev/null | head -20

The subject should be your domain’s certificate, the one installed on your VMs. After your DNS record resolves, open https://shop.example.com in a browser and check for the padlock, or run:

curl -v https://shop.example.com/ 2>&1 | grep -E "subject:|issuer:|HTTP/"

Limits

ItemValue
HTTPS listener with a certificate on the load balancerNot available yet
Create or upload a certificateNot available in the portal or the public API
TLS passthroughNetwork load balancer, TCP listener, any port 1–65535
HTTPS health checkNone. Use Port is open (TCP).
Path or hostname routing with passthroughNot available. A Network load balancer doesn’t read requests.
Load balancer hostnameNone. Use an A record.

Security tips

  • Don’t send passwords or personal data through an HTTP listener. HTTP isn’t encrypted.
  • With passthrough, traffic stays encrypted from the client all the way to your VM. Only your VMs hold the key.
  • Keep the certificate the same on every VM, and renew it on every VM before it expires.

Troubleshooting

You seeWhat it meansWhat to do
HTTPS is disabled: “Needs a TLS certificate. Coming soon”Certificates can’t be added to load balancers yetUse a Network load balancer with a TCP listener (passthrough).
”HTTPS listeners need a certificate, which isn’t available yet”A listener is HTTPS but has no certificateUse a TCP listener on a Network load balancer instead.
The browser warns about the certificateThe VM’s certificate doesn’t cover the name you used, for example because you connected by IP addressConnect by your domain, and use a certificate issued for it on every VM.
The certificate warning appears only sometimesOne VM has a different or expired certificateInstall the same valid certificate on every VM.
It works by IP address but not by your domainThe A record is missing or not visible yetCheck it with dig +short shop.example.com, which should print the load balancer’s address.
The health check fails although HTTPS works on the VMAn HTTP response check can’t talk to a TLS-only portUse Port is open.