STUN server: Is it really necessary?

267 views
Skip to first unread message

ralg

unread,
Apr 15, 2022, 10:05:29 AM4/15/22
to discuss-webrtc
Hi all!

In a deployment where WebRTC clients do always connect to a Media Server and that media server has a public IP address (i.e. media always flows through a media server and never peer-to-peer), do we still need a STUN server? Clients will always be able to connect to media server.
Screenshot 2022-04-05 at 15.12.59.png
3 )Media server has a public IP address.

I understand that if the client is behind a firewall blocking UDP traffic, a TURN server is required in order to relay media over TCP/TLS. But if we "ignore" this scenario, is it completely safe to say that the STUN is completely unnecessary? 

Thanks for your help.

davidsw...@gmail.com

unread,
Apr 15, 2022, 6:56:28 PM4/15/22
to discuss-webrtc
If the user's router provides her browser with only "private" IP numbers, your server will not be able to send any media to her. She would need either an srflx or relay candidate.

Roman Shpount

unread,
Apr 15, 2022, 11:25:29 PM4/15/22
to discuss-webrtc
Yes, it is safe to say STUN is not necessary. Furthermore, if you add ICE TCP support (RFC 6544) to your media server, TURN is not needed either. You would only need TURNS for a few cases where only TLS traffic is unblocked.
Reply all
Reply to author
Forward
0 new messages