Y.Thomas
Y.Thomas

Reputation: 5

When webrtc connect to STUN, if the public IP's port returned by the STUN is the same as the port that is webrtc create socket with STUN used?

I find when the webrtc create socket with STUN , the port return by STUN always same as the socket port. Is it accidental or fixed?

Upvotes: 0

Views: 177

Answers (2)

mesibo
mesibo

Reputation: 4348

It's called port preservation in NAT terminology. Port numbers are preserved unless there is a conflict which happens when you have more than one machine behind NAT accessing the same service.

Upvotes: 0

Philipp Hancke
Philipp Hancke

Reputation: 17360

This depends on the type of NAT you're behind, some NATs may translate the port as well.

Upvotes: 1

Related Questions