-
STUN servers are used by both clients to determine their IP address
as visible by the global Internet.If both the peers are behind the
same NAT , STUN settings are not needed since they are anyways
reachable form each other . STUN effectively comes into play when the
peers are on different networks. -
As we know that webRTC is peer to peer and the ice candidates are
mandatory in webrtc. ICE functionality can be in any of the two ways
, STUN and TURN . -
There are many stun servers provided by google and other sites which
one could use . You can also setup your own STUn server according to
rfc5766.
Hope that gives a zest of what and how of stun .