Actually you don't need to open inbound firewall ports to the internet. All media and signaling traffic is initiated outbound from your clients/servers to Microsoft’s cloud, and the return traffic flows back through those same outbound connections. The only firewall rules you need are outbound UDP 3478–3481 and TCP 443/80 to Microsoft’s published IP ranges.
According to Microsoft’s network requirements documentation, you need to allow
- Outbound UDP: 3478–3481 (used for STUN/TURN media traversal).
- Outbound TCP: 443 (primary), 80 (fallback).
Destination IP ranges:
Media processors and TURN services: 20.202.0.0/16
Call automation/media: 52.112.0.0/14, 52.122.0.0/15, 2603:1063::/38
Teams services: *.teams.microsoft.com, *.skype.com, *.microsoft.com, *.office.com, etc.
Your firewall should allow outbound traffic to these IP ranges and FQDNs. The return traffic will automatically be permitted by the firewall’s stateful inspection.
If you find this information useful to some extent, please accept the answer so that your experience with the issue would help contribute to the whole community. Thank you :)
Vivian