TLS tunnels by SNI
Serve several TLS applications on your own IPv4:443 while keeping certificates and mTLS in your application.
On this page5
TLS tunnels require Dedicated or higher and an assigned own IPv4. Prontaro routes the original encrypted stream by the visible SNI in the first ClientHello; your backend owns the certificate, private key, TLS policy, mTLS and renewal. Different names can share one IP with HTTPS tunnels. There is no default Prontaro hostname.
Start and allow access
Run a TLS server on local port 8443, then start the tunnel. With several own IPs, add --to 203.0.113.10 to select one; with one, it is selected automatically.
prontaro tls 8443 --name partner --domain partner.example.comBecause access starts closed, an interactive terminal prompts right away:
? partner.example.com:443 is closed to everyone. Who should reach it?
› only the address API sees for you: 198.51.100.7
enter addresses…
everyone
nobody for nowAnswer this prompt first to allow your current IP, enter visitor IPv4/CIDR addresses (for example 198.51.100.7), open to everyone, or keep it closed for now. Then create A partner.example.com → 203.0.113.10 at your DNS provider, using your actual IP. For a background service (--no-input) or later rule changes while the tunnel runs, use prontaro access in a second terminal (or the Access tab in the dashboard):
prontaro access partner allow 198.51.100.7The public address is partner.example.com:443. Connect by hostname so the client sends SNI and validates the backend certificate. The tunnel name partner identifies the tunnel in your account; it is not SNI. Prontaro does not verify DNS or issue a certificate for this tunnel.
Access starts closed: an empty allowlist denies everyone. To open it explicitly, run prontaro access partner public --yes; to close it, run prontaro access partner close. Attempts denied by the IP allowlist are closed and recorded in connection logs. Backend mTLS does not bypass this allowlist.
Check the TLS backend locally, then connect from an allowed visitor IP. Both commands must validate the certificate; supply -CAfile if you use a private CA.
openssl s_client -connect 127.0.0.1:8443 -servername partner.example.com -verify_hostname partner.example.com -verify_return_erroropenssl s_client -connect partner.example.com:443 -servername partner.example.com -verify_hostname partner.example.com -verify_return_errorNames and status
--domain only adds a name. Repeating the same name on the same tunnel changes nothing; it never moves a name from another tunnel. If adding a domain fails, the tunnel and its other names keep working. Check or add the domain on the Domains tab in the dashboard without restarting the tunnel. This tab also shows domain status and the IP for your A record; prontaro ls lists active addresses only.
HTTPS and TLS share the custom-domain quota. A domain waiting for a slot does not accept traffic yet. Applied status means the domain is configured on Prontaro servers; it does not confirm DNS, access rules, the local server, or its certificate. A name can be bound only once per account, even across two own IPs; multiple different names are allowed.
To move a name between TLS tunnels, use the dashboard. To switch HTTPS ↔ TLS, delete the domain binding and add it to the other type. HTTPS Basic Auth and OAuth protection do not carry over. Returning to HTTPS requires the ordinary DNS/certificate setup with a new challenge token.
Certificates with Caddy
For a restricted allowlist, use Caddy DNS-01 with the module and credentials for your DNS provider. For public access, TLS-ALPN-01 works through public port 443; keep it reachable for renewal, not just initial issuance. Disable HTTP-01 because this route does not provide port 80:
{
https_port 8443
auto_https disable_redirects
}
partner.example.com {
tls {
issuer acme {
disable_http_challenge
}
}
reverse_proxy 127.0.0.1:3000
}This example serves local TLS on 8443 and proxies to an HTTP application on 3000. Keep PROXY protocol off unless the backend is configured to parse it before TLS. See Caddy TLS and automatic HTTPS.
PostgreSQL and other clients
PostgreSQL needs both a libpq client and server version 17 or newer, direct TLS negotiation and SNI. Configure the server certificate for the hostname and supply its trusted CA to the client.
For this PostgreSQL example, also point A db.example.com to your own IP; with several IPs, pass --to to choose that IP. Keep PROXY protocol off unless a configured frontend parses it.
prontaro tls 5432 --name pg --domain db.example.comIn an interactive terminal, answer the startup access prompt (Who should reach it?) first to allow your client IPv4 (198.51.100.7). For a background service or later changes, run prontaro access in another terminal:
prontaro access pg allow 198.51.100.7psql "host=db.example.com port=443 dbname=app user=app sslnegotiation=direct sslsni=1 sslmode=verify-full sslrootcert=/path/to/ca.pem"sslmode=verify-full checks the certificate and hostname. The traditional PostgreSQL SSLRequest, STARTTLS, clients without visible SNI and ECH hiding the routing name require a TCP tunnel instead. See libpq connection parameters.
Limits and troubleshooting
TLS has no Prontaro Basic Auth, OAuth, webhook-path exceptions, HTTP rewriting or HTTP inspection/replay. Traffic and connections count normally; HTTPS request quota does not apply. A denied TLS connection closes without a Prontaro HTTP page; check connection logs and access rules. A plain HTTP backend causes TLS errors such as wrong version number: check TLS locally and check PROXY protocol configuration; for HTTP use prontaro http.
A TCP tunnel on your IP’s port 443 excludes the entire HTTPS/TLS group. Saved stopped tunnels still reserve the port; stopping alone does not resolve a conflict. Remove the conflicting tunnel or move HTTPS to shared access; TLS cannot use shared IPs.
After replacing an IP, update the DNS A record. A saved tunnel follows its IP assignment, but a service’s explicit saved --to can still contain the old address: remove or update it before restarting. prontaro rm partner deletes the tunnel and its names while keeping the IP. Releasing the IP deletes its TLS tunnels and names; remove their DNS records first. A saved service --domain adds a deleted name again on its next start, so remove that flag if you want the name to stay removed.
Something wrong on this page? Contact us