Remediation Hub (9)
Coturn UDP 3478 & TLS 443 Traversal Checklist for Matrix Calls
Enabling Coturn TLS 443 alongside UDP 3478 and blocking RFC1918 relay targets secures WebRTC and Element Call behind strict firewalls.
ICE Success: 98%+ across mobile & enterprise NAT | Ports: 3478 + 443
Step 1: Lock Down Coturn SSRF Ranges & Enable Auth Secret
In /etc/turnserver.conf, enable use-auth-secret with a 64-char static-auth-secret matching homeserver.yaml turn_shared_secret, and add denied-peer-ip blocks for 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and 127.0.0.0/8.
Step 2: Expose TLS 443 Relay & Open Ephemeral UDP Range
Bind tls-listening-port=443 on a dedicated subdomain (turn.example.com) with Let's Encrypt certs, keep listening-port=3478 open for UDP/TCP, and permit UDP 49152-65535 in UFW/iptables for zero-drop media forwarding.
Measured Thresholds & Configuration
| Coturn Directive | Required Setting | Security / NAT Purpose |
|---|---|---|
| use-auth-secret + static-auth-secret | 64-char hex shared with Synapse | Prevents open relay abuse |
| tls-listening-port | 443 (turns:turn.domain:443) | Bypasses corporate UDP firewalls |
| denied-peer-ip | RFC1918 + loopback + link-local | Blocks SSRF into internal VPS services |