AWS turnserver for a webRTC app

1,036 views
Skip to first unread message

miguel clement

unread,
Apr 22, 2015, 8:00:00 PM4/22/15
to turn-server-project...@googlegroups.com
Hi, 
I'm trying to deploy a turn server on aws for a webrtc based file transfer app. 
I was wondering if there was anything I should add to turnserver.conf to make it work with webRTC.

I set these listening ports in turnserver.conf

# TURN listener port for UDP and TCP (Default: 3478).
# Note: actually, TLS & DTLS sessions can connect to the 
# "plain" TCP & UDP port(s), too - if allowed by configuration.
#
listening-port=3478
listening-port=443
listening-port=80

Then I set the external IP

# For Amazon EC2 users:
#
# TURN Server public/private address mapping, if the server is behind NAT.
# In that situation, if a -X is used in form "-X <ip>" then that ip will be reported
# as relay IP address of all allocations. This scenario works only in a simple case
# when one single relay address is be used, and no RFC5780 functionality is required.
# That single relay address must be mapped by NAT to the 'external' IP.
# The "external-ip" value, if not empty, is returned in XOR-RELAYED-ADDRESS field.
# For that 'external' IP, NAT must forward ports directly (relayed port 12345
# must be always mapped to the same 'external' port 12345).
#
# In more complex case when more than one IP address is involved,
# that option must be used several times, each entry must
# have form "-X <public-ip/private-ip>", to map all involved addresses.
# RFC5780 NAT discovery STUN functionality will work correctly,
# if the addresses are mapped properly, even when the TURN server itself 
# is behind A NAT.
#
# By default, this value is empty, and no address mapping is used.
#
#external-ip=54.218.224.183
#
#OR:
#
external-ip=54.x../172.y..

x and y are numbers (hidden)

I use Lt cred
# Uncomment to use long-term credential mechanism.
# By default no credentials mechanism is used (any user allowed).
# This option can be used with either flat file user database or 
# PostgreSQL DB or MySQL DB or Redis DB for user keys storage.
#
lt-cred-mech

Finally I set up creds:
# 'Static' user accounts for long term credentials mechanism, only.
# This option cannot be used with TURN REST API or with short-term credentials
# mechanism.
# 'Static' user accounts are NOT dynamically checked by the turnserver process, 
# so that they can NOT be changed while the turnserver is running.
#
user=turn:turn

To run it I just call 
sudo turnserver

Is there something I am missing? I see this when I hit the public ip:
TURN Server 
use https connection for the admin session

Thanks

miguel clement

unread,
Apr 22, 2015, 8:25:13 PM4/22/15
to turn-server-project...@googlegroups.com
I tried using this command to deploy and still nothing. here is the output:
root@ip-11111111 log]# turnserver -v -r ec2--11111111.us-west-2.compute.amazonaws.com -X 1111111 --no-tls -a -c turnserver.conf
0: log file opened: /var/log/turn_9383_2015-04-23.log
0:
RFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server
Version Coturn-4.4.4.2 'Ardee West'
0:
Max number of open files/sockets allowed for this process: 33000
0:
Due to the open files/sockets limitation,
max supported number of TURN Sessions possible is: 16500 (approximately)
0:

==== Show him the instruments, Practical Frost: ====

0: TLS supported
0: DTLS supported
0: AEAD supported
0: SQLite supported, default database location is /usr/local/var/db/turndb
0: Redis supported
0: PostgreSQL supported
0: MySQL supported
0: MongoDB supported
0: OpenSSL compile-time version: OpenSSL 1.0.1k-fips 8 Jan 2015
0: Default Net Engine version: 3 (UDP thread per CPU core)

=====================================================

0: Config file found: /etc/turnserver.conf

Oleg Moskalenko

unread,
Apr 22, 2015, 8:50:35 PM4/22/15
to miguel clement, turn-server-project...@googlegroups.com
I did not get exactly what you are trying to achieve.

The TURN server listening endpoints accept two types of protocols:

1) STUN/TURN protocol over TCP, TLS, UDP, DTLS, SCTP;
2) Or HTTPS protocol for web admin functions.

I see that you are trying to use HTTP protocol. It is not supported
for any purpose.

Oleg
> --
> You received this message because you are subscribed to the Google Groups
> "TURN Server (Open-Source project)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
> turn-server-project-rfc57...@googlegroups.com.
> To post to this group, send email to
> turn-server-project...@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/turn-server-project-rfc5766-turn-server.
> For more options, visit https://groups.google.com/d/optout.

miguel clement

unread,
Apr 24, 2015, 12:50:07 AM4/24/15
to turn-server-project...@googlegroups.com, miguelf...@gmail.com
Reply all
Reply to author
Forward
0 new messages