ICE/STUN/TURN servers on my own VPS

602 views
Skip to first unread message

Giacomo Silli

unread,
Oct 18, 2016, 6:40:19 AM10/18/16
to EasyRTC
Hi everyone, please help me in some detail, unfortunately I can not understand some things.

I tried using different WebRTC open-source, but in the end I went back on this easyRTC, I think is done very well.

I installed Coturn as turn-server and Collider as signaling-server, they are working pretty well.

I can not understand how the ICE-server and the STUN-server works.

I read several documents, theoretically i know what it is, but I do not understand how they work and how to install them.

I would use easyRTC entirely on my VPS on Ubuntu, I would like to use it with different wireless networks and via 3g / 4g.

I repeat, I would avoid using ICE / STUN / TURN public server, I want to use mine on my VPS, it is possible?

Thanks in advance, I hope to get a response.
Message has been deleted

Giacomo Silli

unread,
Oct 18, 2016, 9:52:31 AM10/18/16
to EasyRTC
Update:

I just noticed that if I set the STUN url after the Coturn server installation, this works.
    {
      "Urls": [
        "Turn: myip: 3478? Transport = udp"
        "Turn: myip: 3478? Transport = tcp"
      ],
      "Username", "test",
      "Credential", "test"
    },
       {
     "Urls": [
        "Stun: myip: 3478"
      ]
    }
  ]

With the same PORT, working properly, I do not know if it's the proper way to proceed, but if I delete the TURN address and use only the STUN this works.

My question now is, how to install/configure an ICE server?

Eric Davies

unread,
Oct 18, 2016, 11:40:35 AM10/18/16
to EasyRTC
You have some typos in your turn entries that is probably causing the peer connection to throw an exception.
It should be colons not commas.
      "Username": "test",
      "Credential": "test"
not:
  "Username", "test",
      "Credential", "test"
And you are missing a common separating the items in the urls.

If you check the developer console of your browser, you'll probably see an error message.

Somethings I'm not sure are safe (they may be, they may not, I've never tried): mixed case for your label fields, and embedded spaces in your urls. 
I would try:
   {
      "urls": [
        "turn:myip:3478?Transport=udp",
        "turn:myip:3478?Transport=tcp"
      ],
      "username": "test",
      "credential": "test"
    },
       {
     "urls": [
        "stun:myip:3478"
      ]
    }
  ]

Eric Davies

unread,
Oct 18, 2016, 11:44:13 AM10/18/16
to EasyRTC
There is no problem installing the various servers on your VPS, as long as the VPS is reachable where the clients are.
You may want to look at this first draft of our getting started guide. http://priologic.github.io/easyrtc/beta-branch/general/gettingStarted.html

Giacomo Silli

unread,
Oct 18, 2016, 11:52:26 AM10/18/16
to EasyRTC
Believe me,  I have no idea why pasting the code there are "," instead of ":" because in my the file there are definitely ":" In fact, the authentication works.

I installed the COTURN server,  seems to work both as STUN / TURN server, btw it is not clear tome  if it is normal that they work on the same port.

I really can not understand the operation of ICE server, some projects cannot be used by connecting directly to the TURN server, but require an ICE server.

Thanks for the link, i'll read it in some minuts.

Eric Davies

unread,
Oct 18, 2016, 1:27:37 PM10/18/16
to EasyRTC
It's not a matter of particular projects requiring a turn server, but particular clients requiring a turn server due to the particular router or firewall they are behind.  However, I think you'll find the gettingStarted document explains that more clearly.
Reply all
Reply to author
Forward
0 new messages