Questions tagged [stun]

STUN stands for Session Traversal Utilities for NAT. It helps peers located behind NATs communicate with each other when they only have private IP addresses.

STUN stands for Session Traversal Utilities for NAT. It helps peers located behind different NATs communicate with each other when they only have private IP addresses.

The underlying technique used by STUN is to have both peers contact a central peer (having a public IP address) to help them communicate directly with each other. Achieving this involves performing NAT hole punching. Performing STUN is not always possible because of restrictions established on NATs.

The original hole punching method used by STUN is now deprecated, because it does not cover all cases properly.

460 questions
77
votes
5 answers

How does WebRTC work?

I'm interested in Peer-to-Peer connections in the browser. Since this seems to be possible with WebRTC, I'm wondering how it works exaclty. I've read some explanations and saw diagrams about it and now it's clear to me, that the connection…
Van Coding
  • 24,244
  • 24
  • 88
  • 132
62
votes
10 answers

STUN/TURN server connectivity test

I am trying to figure out how to test whether a STUN/TURN server is alive and properly responding to connections. Ideally this test would be performed from an external machine, just in case the STUN/TURN machine is down for this case should also be…
mirazour
  • 723
  • 1
  • 6
  • 7
46
votes
3 answers

what is STUN stun.l.google.com:19302 used for

I'm looking at the webrtc.html and peerconnection_server demo, and it is working fine between two Chrome browsers. My question is, what exactly is the first param of webkitPeerConnection ? pc = new webkitPeerConnection("STUN…
Vicky
  • 1,412
  • 4
  • 18
  • 30
36
votes
4 answers

Java UDP hole punching example - connecting through firewall

Lets say I have two computers. They know each others public and private IPs via ice4j. One client listening and the other one sending some string. I'd like to see this happen via UPD hole punching: Let A be the client requesting the…
MatBanik
  • 26,356
  • 39
  • 116
  • 178
35
votes
2 answers

Implementing our own STUN/TURN server for WebRTC Application

I am working on a webrtc application and have to implement following TURN server. https://code.google.com/p/rfc5766-turn-server/ I am following this tutorial. http://www.dialogic.com/den/developer_forums/f/71/t/10238.aspx and it says to reference…
Sam Fast
  • 571
  • 2
  • 9
  • 16
34
votes
3 answers

WebRTC - How many STUN/TURN servers do I need to specify?

I'm having trouble with NAT traversal and WebRTC. Videostreaming works with some people, but not with someone who's behind a student dorm router. I think this should be solved by using a TURN server. I've done that, it still isn't working, and now…
spacecoyote
  • 1,909
  • 3
  • 19
  • 24
33
votes
4 answers

Is STUN server absolutely necessary for webrtc when I have a socket.io based signaling server?

My understanding about STUN server for webrtc is that when the clients are behind the NAT (in most cases, if not all), the STUN server will help the webrtc clients to identify their addresses and ports. And I also read some article saying that a…
user1663023
32
votes
1 answer

How NAT traversal works in case of peer to peer protocols like bittorrent.

I know about NAT traversal and about STUN, TURN and ICE and its use. I want to know whether these are implemented in peer to peer file sharing application like bittorrent. Whether trackers facilitate peers behind NATs to communicate with each other…
user1887464
  • 533
  • 2
  • 6
  • 11
26
votes
4 answers

How to self-host to not rely on WebRTC STUN server stun.l.google.com:19302?

I have just downloaded a video chat project. It uses a STUN server and specifies the URL stun:23.21.150.121. How can I use my own server instead of the STUN server? What do I have to enter instead of this URL?
Vicky
  • 1,412
  • 4
  • 18
  • 30
25
votes
2 answers

How to create stun turn server instance using AWS EC2

Actually i wants to use my own stun/Turn server instance and i want to use Amazon EC2 .If anybody has any idea regarding this please share with me the steps to create or any reference link to follow.
satya
  • 3,508
  • 11
  • 50
  • 130
22
votes
1 answer

why doesn't "onicecandidate" work?

I'm having trouble understanding webRTC with it's PeerConnection and 'onicecandidate' event. As far as I understand it you must initiate a peerconnection using a STUN (or TURN) server, because it will send you back your ICE candidate for…
Fab
  • 375
  • 1
  • 3
  • 11
21
votes
3 answers

STUN, TURN, ICE library for Java

I need to establish a P2P UDP and TCP Connection between two Users. Both of them are behind a NAT. A little research leads me to STUN, TURN and ICE. Is there any Java solution (library) except jSTUN which seems to work only on UDP. And TURN, ICE is…
Hemeroc
  • 2,176
  • 5
  • 23
  • 29
19
votes
2 answers

ICE vs STUN vs TURN

I've read that ICE is an agent on the WebRTC server which sends SDP information of users to STUN or TURN server. STUN and TURN server gives this SDP information and makes a P2P connection for the users. Is that true? So, what is the exact…
M. Rostami
  • 999
  • 3
  • 16
  • 27
18
votes
3 answers

Why a STUN Server Needs Two Different Public IP addresses

I have took a look to STUN Server settings in openfire, and this statement from there: "In order to act as a STUN server, two different public IP addresses on the same machine are required, as well as two different port numbers for each IP." I have…
metdos
  • 13,411
  • 17
  • 77
  • 120
18
votes
2 answers

Use specific ports for webRTC

When creating a peer to peer audio connection using webRTC, the STUN server we use will return the public IP if a user is behind a router. Now in the ICE objects, I can see that the rport is always something between 50000 and up. Is there a way to…
Armin Hierstetter
  • 1,078
  • 2
  • 12
  • 27
1
2 3
30 31