Hữu Linh
Hữu Linh

Reputation: 173

What ip does coturn need to setup turn server?

I followed a tutorial from webrtc-experiement website and installed the coturn on my local ubuntu virtual machine.

I set up the listening ip and external ip with the ubuntu private ip 192.168.47.131 and the port is 3478 and 5349 for secure address (i don't have the cert yet so i commented those ssl)

But my webrtc app (also run on local) keeps telling turn server broken with my iceServers configuration: { credential: "test", ​ url: "turn:192.168.47.131:3478", ​​​​ username: "test" }

I am able to get connected from my windows 10 to this turn server on udp, tcp. Does it have to be a public ip?

Upvotes: 2

Views: 4883

Answers (1)

theman whosoldtheworld
theman whosoldtheworld

Reputation: 173

so buy a dns and install a server on your pc. Than connect your dns to your public ip (or with user-interface manager from your dns vendor ... or on your modem/ruter system) ...at these point you can write or add or modify your turn.conf in these way.

listening-ip=xxx.xxx.xxx.xxx /*mylocal ip*/
relay-ip=xxx.xxx.xxx.xxx /*mylocal ip*/
external-ip=xx.xx.xx.xx /*my public ip on nat/ruter/modem */ 

You will need to install some certificate because of https, or use the ratified (as you are in test) of letsencrypt ... and then add everything on your file turn.conf. These row for certificate:

cert=/etc/ssl/certificate.pem  /** or your certificate real path  **/
pkey=/etc/ssl/private.key
dh-file=/etc/turn/dhparam.pem

regards

Upvotes: 0

Related Questions