Giter Club home page Giter Club logo

turn-server-docker-image's Introduction

Docker image for TURN server

A Docker container with the Coturn TURN server

sudo docker run -d -p 3478:3478 -p 3478:3478/udp --restart=always zolochevska/turn-server username password realm

turn-server-docker-image's People

Contributors

anastasiia-zolochevska avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

turn-server-docker-image's Issues

TURN ports are not published

Hey Anastasia,

I'm using your docker image to run a stun/turn server for an WebRTC application. I'm starting your image as follows on my server/host (e.g., IP 1.2.3.4):

sudo docker run -d -p 3478:3478 -p 3478:3478/udp --name coturn --restart=always zolochevska/turn-server username password realm

netstat -tulpen on the host shows me, that's working:

$ netstat -tulpen
tcp6       0      0 :::3478                 :::*                    LISTEN      0          54938       4639/docker-proxy
tcp6       0      0 :::22                   :::*                    LISTEN      0          18123       1680/sshd       
udp6       0      0 :::3478                 :::*                                0          54991       4655/docker-proxy

Well, if WebRTC runs a turn request, I am getting a relay candidate (Chrome):

{"candidate":"candidate:3 1 UDP 92217087 1.2.3.4 54277 typ relay raddr 1.2.3.4 rport 

Looking into netstat on the host, nothing changed. Thus I jumped into the container:

docker exec -it coturn /bin/bash

Running netstat -tulpen in the container (I installed the package net-tools), I see that the UDP port 54277 is bound inside the container:

$ netstat -tulpen
tcp        0      0 127.0.0.1:5766          0.0.0.0:*               LISTEN      0          55163       17/turnserver   
tcp        0      0 172.17.0.2:3478         0.0.0.0:*               LISTEN      0          55180       17/turnserver   
tcp        0      0 172.17.0.2:3478         0.0.0.0:*               LISTEN      0          55176       17/turnserver   
udp        0      0 172.17.0.2:54277        0.0.0.0:*                           0          58941       17/turnserver   
udp        0      0 172.17.0.2:3478         0.0.0.0:*                           0          55160       17/turnserver   
udp        0      0 172.17.0.2:3478         0.0.0.0:*                           0          55159       17/turnserver   

Using 1.2.3.4 54277 fails, since the bound port is not exposed to the host.

Conclusion

The port range used by coturn to provide the TURN functionality must be exposed as well.

Possible Fix

Port range used by coturn: 49152-65535

Source: https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf#L147

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.