Closed RamyaAshika closed 5 years ago
It should work. (Un)Fortunately I don't have Cygwin only linux. (Cygwin is not recommended for production AFAIK) Try it on debian linux and I could help more..
I miss your IP and logs.. It should work with any public global ipv4 address and IPv6 address too..
Ok FIne. Before that, I want to clarify this doubt.See my local ip address xxx.xxx.xx something like this and these are the steps I followed STEP 1: $ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz $ tar xvfz libevent-2.0.21-stable.tar.gz $ cd libevent-2.0.21-stable $ ./configure $ make $ make install Completed
STEP 2: We assume that you are installing the Coturn from the sources.Downloaded the latest version
$ tar xvfz turnserver-<...>.tar.gz $ ./configure $ make $ make install
STEP 3: Add the long-term TURN users with the turnadmin utility. For example, this command adds user ninefinger with password youhavetoberealistic, realm north.gov, to the default sqlite database:
$ sudo turnadmin -a -u ninefingers -r north.gov -p youhavetoberealistic
STEP 4: For example, this command adds the admin user bayaz with password magi:
$ sudo bin/turnadmin -A -u bayaz -p magi
STEP 5: From this link I have changed my turnserver.conf and turnuserdb.conf https://www.webrtc-experiment.com/docs/TURN-server-installation-guide.html#windows
Finally I ran with this command
turnserver -L
@misi
I have done these steps for my local my address. this is the result I got it and I dunno whether its working or not but its not throwing any error and in my firewall its showing like this
Whether it works?? @misi
But the main thing for me is I'm having my public ip address from there people will access my application. In that I want to use this. so obviously I need to use my public address instead of this local ip address. In that what my doubt is can I able to configure for my public ip address from my internal system/local system. @misi
Run it with:
turnserver -L x.x.x.x -a -f -r yourdomain.com
x.x.x.x
is your local ip address where it should listen. (You can skip it. It will discover all address)
y.y.y.y
with your global ip y.y.y.y
and set in your NAT the portforwarding to all TURN/STUN and RTP/RTCP ports.yourdomain.com
is your realm. (If you don't have own domain then use any string)If your pc not behind nat then x.x.x.x
and y.y.y.y
are the same.
ooh k But I didn't get this point
Whether this is what you're saying? When running the final command for my public IP address from my local system. Instead of this command,
turnserver -L
The realm/domain is missing only. e.g. example.org
turnserver -X <public_ip_address> -a -f -r example.org
Omg. This is what I'm getting. I have changed my config file like this
listening-port=3478 tls-listening-port=5349 alt-listening-port=3479 alt-tls-listening-port=5350 listening-ip=xxx.xxx.xx.xxx listening-ip=xxx.xxx.xx.xxx relay-ip=xxx.xxx.xx.xxx min-port=49152 max-port=65535 verbose fingerprint
userdb=/etc/turnuserdb.conf realm=xxx.xxx.xx.xxx cert=/etc/ssl/certificate.pem pkey=/etc/ssl/private.key dh-file=/etc/turn/dhparam.pem no-stdout-log log-file=/var/log/turn/turn.log lt-cred-mech user=iCore:iCore@123
no-sslv3 no-tlsv1
and I ran this command
turnserver -X
0: Trying to bind fd 40 to <192.168.42.172:3478>: errno=125 Cannot bind local socket to addr: Cannot assign requested address 0: Cannot bind DTLS/UDP listener socket to addr 192.168.42.172:3478 0: Trying to bind DTLS/UDP listener socket to addr 192.168.42.172:3478, again... bind: Cannot assign requested address
@misi
Where is the logs will be there? If you need I may send you @misi
IP
Make sure your ipv4 address is 192.168.42.172
cmd
ipconfig /all
if your global address is y.y.y.y
config
listening-port=3478
tls-listening-port=5349
alt-listening-port=3479
alt-tls-listening-port=5350
listening-ip=192.168.42.172
relay-ip=192.168.42.172
external-ip=y.y.y.y
min-port=49152
max-port=65535
verbose
fingerprint
#use-auth-secret
#static-auth-secret
userdb=/etc/turnuserdb.conf
realm=example.org
cert=/etc/ssl/certificate.pem
pkey=/etc/ssl/private.key
dh-file=/etc/turn/dhparam.pem
no-stdout-log
log-file=/var/log/turn/turn.log
lt-cred-mech
user=iCore:iCore@123
no-sslv3
no-tlsv1
Run Run turnserver without any parameter
turnserver
Ya I have checked in my global ip address through Putty but I don't see any ip address like this 192.168.42.172 and on my local my ip address also there is no ip address like this. @misi
Whether you got any idea @misi
Replace 192.168.42.172 with your local ip address...
This is how I have given
listening-port=3478 tls-listening-port=5349 alt-listening-port=3479 alt-tls-listening-port=5350 listening-ip=localipaddress relay-ip=localipaddress external-ip=online/publicipaddress min-port=49152 max-port=65535 verbose fingerprint
userdb=/etc/turnuserdb.conf realm=icoretek.com cert=/etc/ssl/certificate.pem pkey=/etc/ssl/private.key dh-file=/etc/turn/dhparam.pem no-stdout-log log-file=/var/log/turn/turn.log lt-cred-mech user=iCore:iCore@123
no-sslv3 no-tlsv1
and ran the command $ turnserver -L localipaddress -a -f -r icoretek.com
now its not showing any error whether its connected? @misi
Please Can I know which [turn_server_ip_address] we need to add here in pc_config variable?
var pc_config = {"iceServers": [{"url": "stun:stun.l.google.com:19302"},
{"url":"turn:my_username@
@misi
Hey Hi Misi, Now I'm currently running this project on Centos Linux. I have followed all the steps https://www.webrtc-experiment.com/docs/TURN-server-installation-guide.html#centos which is given in the link for centos.
and finally for running the command I have used this. turnserver -v -r ip:port -a -b turnuserdb.conf -c turnserver.conf -u turn-username:password
but after that I'm getting Cannot bind local socket to addr:PERMISSION DENIED like that I'm getting.
Any help?
@misi
@RamyaAshika Were you able to solve this issue? If yes, could you please help!
I have exactly the same issue if coturn doesn't run as root.
systemctl may already be running coturn on your server (particularly if you install through apt
). Try killing first (as sudo): systemctl stop coturn
. Then running turnserver
. Worked for me on Ubuntu 20.04 server.
I have tried with coturn configuration with my local system using my local IP address. It worked. But now, I'm trying to configure this using my public IP. Is it possible? and I'm doing this using Cygwin, can i able to configure this in my system with my public IP address?