From 1539f0925acb97b1e2c17a60751757deb5b51816 Mon Sep 17 00:00:00 2001 From: aviau <alexandre@alexandreviau.net> Date: Wed, 27 Apr 2016 15:39:11 -0400 Subject: [PATCH] Added guide on setting up a TURN/STUN server Tuleap: #641 Change-Id: I86718a10b03ab2281405f0c474281babdc7615ec --- docs/source/index.rst | 1 + docs/source/setting_up_turn_stun.rst | 62 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 docs/source/setting_up_turn_stun.rst diff --git a/docs/source/index.rst b/docs/source/index.rst index 9aa2d4ff..2b4e70aa 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -10,3 +10,4 @@ Contents: contributing compiling_and_installing/index releasing + setting_up_turn_stun diff --git a/docs/source/setting_up_turn_stun.rst b/docs/source/setting_up_turn_stun.rst new file mode 100644 index 00000000..dd83bdf1 --- /dev/null +++ b/docs/source/setting_up_turn_stun.rst @@ -0,0 +1,62 @@ +Setting up a TURN or STUN server +================================ + +Ring can be configured to use TURN or STUN servers (`RFC5766 <https://tools.ietf.org/html/rfc5766>`_) to establish a connection between two peers. + +In this guide, we will setup a `coturn <https://github.com/coturn/coturn>`_ server. There are other TURN/STUN server implementations available under a free license. See `TurnServer <http://turnserver.sourceforge.net/>`_ and `Restund <http://www.creytiv.com/restund.html>`_. + +1. Installing +############# + +COTURN is available in most Linux distributions. On Debian, install it with the following command: + +.. code-block:: bash + + apt-get install coturn + +2. Configuring +############## + +Here is a basic ``turnserver.conf`` file: + +.. code-block:: none + + listening-port=10000 + listening-ip=0.0.0.0 + min-port=10000 + max-port=30000 + lt-cred-mech + realm=sfl + no-stun + +3. Creating users on your TURN server +##################################### + +To create users on your TURN server, use the ``turnadmin`` binary. + +.. code-block:: bash + + turnadmin -a -u bob -p secretpassword -r sfl + + +4. Launching the TURN server +############################ + +.. code-block:: bash + + turnserver -c turnserver.conf + + +5. Configuring Ring to authenticate to the TURN server +###################################################### + +You may configure Ring to use your TURN server from the advanced tab your account settings: + +============== ============================ ====================== + Field Value Example +============== ============================ ====================== +**server url** host and port of your server 0.0.0.0:10000 +**username** username bob +**password** password secretpassword +**realm** realm sfl +============== ============================ ====================== -- GitLab