plain-hamburger-12701
02/18/2026, 4:25 AMtall-airline-16756
02/18/2026, 4:25 AMtall-airline-16756
02/18/2026, 4:26 AMiceTransportPolicy: 'relay') so clients use TURN instead of attempting direct UDP.
• What to allow on the firewall: outbound TCP 443 to your LiveKit domain / TURN endpoint and WSS (port 443) for signaling.
2) Enable embedded TURN on your LiveKit media nodes
• LiveKit supports running TURN inside the media node so media is relayed from within your EKS cluster (no external third-party relay required).
• Configure the LiveKit server/YAML to enable TURN and ensure it’s reachable over TCP/443.
3) Keep traffic private over Direct Connect / VPC peering
• Since you have Direct Connect, you can advertise private IPs for signaling and TURN so clients inside the corporate network connect to private endpoints instead of public internet addresses.
• This reduces attack surface and avoids requiring public UDP ports.
4) Handle DPI / corporate proxies (e.g., ZScaler)
• If a corporate proxy or DPI appliance inspects or blocks TURN/WebRTC even on TCP/443, add bypass rules for your LiveKit domains to disable protocol inspection for those endpoints so encrypted traffic passes.
• Example: add exclusions for your LiveKit domain(s) and TURN domain so DPI won’t break WebRTC/TURN.
5) Ensure stable ICE fallback and routing
• Make sure session affinity (sticky routing) is configured so clients keep the same media node during fallback; this avoids issues when a client reconnects to a different node.
• Monitor ICE negotiation logs to confirm clients are using TURN/TCP when UDP is blocked.
Quick recommended action plan
1. Enable TURN (TCP/TLS) on your LiveKit media nodes and expose it on port 443.
2. Configure clients to prefer/force relay when needed (iceTransportPolicy: 'relay') during testing.
3. If using Direct Connect, configure private endpoints and advertise private ICE candidates.
4. If a corporate proxy inspects traffic, add DPI/bypass rules for your LiveKit/TURN domains.
5. Test from a client inside the corporate network and check ICE logs to confirm TURN/TCP usage.
If you’d like, tell me:
• Do you plan to use public LiveKit domains or private endpoints over Direct Connect?
• Are there existing corporate proxy/DPI appliances (like ZScaler) in the path?
With that I can give the specific config snippets you’ll need for LiveKit server YAML and client connection options.
Sources: Firewall Tips for LiveKit Connectivity | LiveKit | Configure ZScaler proxy for LiveKit connections | LiveKit | How We Built a Globally Distributed WebRTC Mesh Networkplain-hamburger-12701
02/18/2026, 4:27 AMtall-airline-16756
02/18/2026, 4:27 AMiceTransportPolicy: 'relay' in your client rtc configuration to test or ensure TURN is used.
Practical checklist
1. Select the UDP port(s) you will allow (for example, 7882 or a small range).
2. Configure LiveKit media node(s) to use and advertise that port/range.
3. Enable embedded TURN and expose it on TCP/443 (TLS) so corporate firewalls allow media relays.
4. If using Direct Connect/private endpoints, advertise private ICE candidates so traffic stays on the private network.
5. If a corporate DPI/proxy (e.g., ZScaler) inspects traffic, add bypass rules for your LiveKit/TURN domains to avoid breaking encrypted WebRTC traffic.
6. Test from inside the corporate network and inspect ICE logs to verify UDP direct connections when possible and TURN/TCP when not.
When a small UDP range can be a problem
• If you expect high concurrency or many simultaneous media sessions, a single UDP port may become a bottleneck; a slightly larger but still-restricted range helps throughput.
• If corporate proxies perform TLS interception or deep protocol inspection, TURN over TCP/443 may still be blocked unless you add bypass/exemption rules.
If you want, I can:
• Provide the exact LiveKit server YAML snippet to restrict the UDP port range.
• Provide a client snippet showing iceTransportPolicy: 'relay' and WSS configuration for testing.
• Help decide an appropriate small UDP range based on expected concurrent sessions.
Which would you like next — the server YAML snippet, a client example, or guidance on picking a UDP range for your expected concurrency?
Sources: Running LiveKit on AWS | Firewall Tips for LiveKit Connectivity | LiveKitplain-hamburger-12701
02/18/2026, 4:29 AMtall-airline-16756
02/18/2026, 4:29 AMplain-hamburger-12701
02/18/2026, 4:29 AMtall-airline-16756
02/18/2026, 4:30 AMiceTransportPolicy: 'relay' in the client rtc config to force use of TURN.
◦ Ensure TURN is available on TCP 443 and that the firewall/proxy allows outbound TCP 443 to your TURN endpoint.
• Prefer domain-based allowlisting rather than relying only on ports:
◦ Whitelist your LiveKit domain(s) and TURN domain (for example, *.livekit.cloud or your private domain) in proxy/DNS rules.
◦ If your corporate proxy uses DPI (e.g., ZScaler), add bypass rules for LiveKit/TURN domains so protocol inspection doesn’t break encrypted WebRTC/TURN traffic.
Concrete recommended firewall rules (minimal, secure):
• Allow outbound TCP 443 to your LiveKit/TURN domain(s) (required).
• Allow inbound/outbound TCP 7880 (signaling) to your LiveKit host(s) if you use that port.
• Allow inbound/outbound TCP 7881 if you need agent/health access.
• Option A (allow limited UDP direct media): Allow UDP 7882 (and optionally UDP 3478/3479 for STUN), understanding this may be insufficient at scale.
• Option B (recommended for strict policies): Block UDP media and rely on TURN/TCP 443 — no wide UDP range needed.
If you want, I can:
• Provide the exact LiveKit server YAML snippet to restrict/advertise a specific UDP port (e.g., 7882).
• Provide a client snippet showing iceTransportPolicy: 'relay' and WSS configuration for testing TURN/TCP.
• Help decide a small UDP range if you need some UDP for performance but want to keep the surface minimal (tell me expected concurrent sessions).
Which would you like next — a server YAML example, the client config snippet, or guidance on picking a small UDP range?
Sources: Firewall Tips for LiveKit Connectivity | LiveKit | server-sdk-js | livekit/livekit_composite | DeepWiki | Self-hosted deployments | LiveKit Documentation | Running LiveKit on AWS | Configure ZScaler proxy for LiveKit connections | LiveKitplain-hamburger-12701
02/18/2026, 4:31 AMiceTransportPolicy: 'relay' and WSS configuration for testing TURN/TCP.
yes pleasetall-airline-16756
02/18/2026, 4:31 AM# livekit.yaml
# Basic server listening port (signaling)
port: 7880
# Bind addresses; leave empty to bind all interfaces or set specific private IPs
bind_addresses:
- ""
rtc:
# Restrict UDP port usage to a single port
port_range_start: 7882
port_range_end: 7882
# Optional: TCP port used for WebRTC TCP fallback (if desired)
tcp_port: 7881
# TURN server settings (embedded TURN using TLS)
turn_server:
enabled: true
# domain exposed to clients for TURN/WSS (use your DNS name)
domain: <http://your-livekit-domain.example.com|your-livekit-domain.example.com>
# TLS cert + key used for TURN/TLS on 443
cert_file: /etc/ssl/certs/fullchain.pem
key_file: /etc/ssl/private/privkey.pem
# Expose TURN TLS on 443
tls_port: 443
# Keep the UDP port entry if you allow UDP 7882 for direct media
udp_port: 7882
Firewall summary for this setup (minimal):
• Allow outbound TCP 443 to your TURN domain (clients -> TURN/TLS).
• Allow inbound/outbound TCP 7880 to your LiveKit signaling host (if signaling runs on that port).
• Allow inbound/outbound TCP 7881 if you use the rtc tcp fallback/agent endpoints.
• Allow UDP 7882 if you want to permit direct UDP media on that single port; otherwise UDP can be blocked and all media will use TURN/TCP 443.
2) Client snippet (TypeScript) — force TURN/TCP (relay) and use WSS for signaling
import { Room } from "livekit-client";
// Example connect options to force TURN relay via TCP/TLS (port 443)
const connectOptions = {
rtcConfig: {
// Force usage of TURN (no direct P2P/UDP)
iceTransportPolicy: 'relay',
// Explicitly list TURN servers (use your TURN domain if self-hosted)
iceServers: [
{
urls: [
// secure TURN over TLS/TCP on 443
'turns:<http://your-livekit-domain.example.com:443?transport=tcp|your-livekit-domain.example.com:443?transport=tcp>',
'turn:<http://your-livekit-domain.example.com:443?transport=tcp|your-livekit-domain.example.com:443?transport=tcp>'
],
// if your TURN requires username/password, include them here
// username: 'turn-username',
// credential: 'turn-credential'
}
]
},
// Optional client-side settings
websocketTimeout: 10000,
autoSubscribe: true
};
// Connect over WSS (signaling) — replace domain and token
const wsUrl = '<wss://your-livekit-domain.example.com>';
const token = 'YOUR_ACCESS_TOKEN';
const room = new Room();
try {
await room.connect(wsUrl, token, connectOptions);
console.log('Connected and using TURN/TCP (relay) over TLS');
} catch (err) {
console.error('Connection failed', err);
}
What to test and verify
• From a client on the corporate network, run the connection and inspect ICE candidate logs in the browser devtools. You should see TURN candidates and the selected candidate should indicate relay over TCP/TLS.
• If connection fails, confirm:
◦ TCP 443 to your TURN domain is allowed outbound.
◦ WSS (TCP 443) to your signaling domain is allowed.
◦ Your TLS certs are valid and match the domain the client connects to.
◦ If a proxy/DPI is in place, add domain bypass rules (example for ZScaler):
url.domain=turn.livekit.cloud detect_protocol(no) url.domain=your-livekit-domain.example.com detect_protocol(no)
If you want, I can now:
• Provide the exact LiveKit YAML snippet tailored to your existing values (domain names, cert paths).
• Provide a minimal TURN credential generation example and where to plug username/credential into the client snippet.
Which one would be most helpful next?
Sources: Firewall Tips for LiveKit Connectivity | LiveKit | Configure ZScaler proxy for LiveKit connections | LiveKitplain-hamburger-12701
02/18/2026, 4:32 AMtall-airline-16756
02/18/2026, 4:35 AMiceTransportPolicy: 'relay' in the client to ensure TURN is used.
• Expose TURN on TCP/443 with valid TLS certs and allow outbound TCP 443 to that domain from client networks.
• Whitelist by domain (your LiveKit/TURN domain) and add proxy/DPI bypass rules if your corporate stack inspects traffic.
• Monitor and size TURN/media nodes for the extra bandwidth and concurrent sessions you expect.
• Test end-to-end from inside your corporate network and confirm ICE candidate selection in browser devtools (you should see relay candidates selected).
If you’d like, I can:
• Provide a short checklist for capacity planning (bandwidth per concurrent user) based on your expected concurrency.
• Help you generate a TURN credential example and where to plug it into client code.
• Review your corporate proxy/DPI rules and suggest exact bypass entries for your domain.
Which of those would be most useful next?
Sources: Firewall Tips for LiveKit Connectivity | LiveKit | Firewall Tipsplain-hamburger-12701
02/18/2026, 4:44 AMtall-airline-16756
02/18/2026, 4:45 AMiceTransportPolicy: 'relay') and ensuring clients successfully establish media over TURN/TCP 443.
If you want, tell me:
• Which Kong edition are you using (OSS vs Gateway/Enterprise)?
• Are you planning to proxy signaling only, or also TURN/TCP via Kong?
With those details I can give a concrete Kong route/example (including timeout settings and stream config if you need TURN proxied).
Sources: Diagnosing Connection Errors with the Connection Test Utility | LiveKit | Client SDKs | livekit/livekit_composite | DeepWiki | Firewall Tips for LiveKit Connectivity | LiveKit | Best practices for managing webhook event streams | LiveKit | Configure ZScaler proxy for LiveKit connections | LiveKitplain-hamburger-12701
02/18/2026, 4:49 AMtall-airline-16756
02/18/2026, 4:49 AMturn.livekit.cloud) on TCP 443.
• TCP 7880 (inbound/outbound between clients and your LiveKit signaling host) — if your LiveKit signaling is on 7880
◦ Purpose: LiveKit WebSocket signaling (WSS) when not served on 443.
◦ If you serve signaling on 443 instead, this is not required.
Optional / recommended (depending on your deployment)
• TCP 7881
◦ Purpose: agent/health endpoints and optional WebRTC TCP fallback port inside LiveKit.
◦ Include if you run Agents or want the TCP fallback listener there.
• UDP 7882 (optional)
◦ Purpose: direct WebRTC media over UDP if you want to allow limited UDP. You can keep this for direct media when UDP is permitted.
◦ Note: a single UDP port may work for small deployments but can be a bottleneck at scale.
• UDP 3478 / UDP 3479 (optional)
◦ Purpose: STUN/TURN UDP. Helpful only if you intend to allow some UDP STUN/TURN. Not required when using TURN/TCP exclusively.
Domain-based and proxy considerations (important)
• Whitelist domains rather than only ports where possible:
◦ your LiveKit domain (e.g., <http://your-livekit-domain.example.com|your-livekit-domain.example.com>)
◦ your TURN domain (e.g., turn.livekit.cloud or your TURN host)
• If a corporate proxy/DPI (like ZScaler) is present, add bypass rules for your LiveKit/TURN domains so TLS inspection doesn’t break TURN/TLS:
◦ Example: url.domain=turn.livekit.cloud detect_protocol(no) and url.domain=<http://your-livekit-domain.example.com|your-livekit-domain.example.com> detect_protocol(no)
Summary checklist for a strict TCP-fallback setup
1. Allow outbound TCP 443 to your TURN domain (required).
2. Allow WSS (TCP 443) to your signaling domain, or TCP 7880 if signaling runs there (required depending on your setup).
3. Optionally allow TCP 7881 for agent/health or internal TCP fallback.
4. Optionally allow UDP 7882 / UDP 3478/3479 only if you want partial UDP direct media; not necessary if you force TURN/TCP relay.
5. Whitelist domains and add proxy/DPI bypasses as needed.
If you tell me:
• Are you serving signaling on 443 or 7880?
• Are you planning to keep any UDP port(s) open (e.g., 7882) or block UDP entirely?
I’ll give a final minimal firewall rule set you can hand to your security team.plain-hamburger-12701
02/18/2026, 4:53 AMplain-hamburger-12701
02/18/2026, 4:53 AMtall-airline-16756
02/18/2026, 4:54 AMiceTransportPolicy: 'relay'.
Practical recommendation
• Best balance: allow UDP 7882 (or a small range) plus TURN on TCP 443. This gives optimal performance when possible and reliable fallback when UDP is blocked.
• If policy mandates no UDP, plan capacity for TURN (bandwidth, CPU) and ensure TLS/TURN endpoints are whitelisted and bypassed from DPI.
If you want, I can:
• Produce a minimal firewall rule set you can hand to security for the “allow UDP 7882 + TURN/TCP443” option.
• Estimate TURN bandwidth needs if you tell me expected concurrent users and average bitrate.
Which would you like next?
Sources: How We Built a Globally Distributed WebRTC Mesh Network | Firewall Tips for LiveKit Connectivity | LiveKit | Running LiveKit on AWS | Configure ZScaler proxy for LiveKit connections | LiveKitplain-hamburger-12701
02/18/2026, 4:56 AMtall-airline-16756
02/18/2026, 4:56 AMiceTransportPolicy: 'relay') for TURN/TCP-only testing.