UDP not working

672 views
Skip to first unread message

Yonggan

unread,
Sep 30, 2021, 6:54:55 AM9/30/21
to TURN Server (Open-Source project)
Hey there,

i have problems with my coturn server.
It does not work over udp.

i am using the docker version of coturn coturn/coturn:latest
but installed via apt install coturn i had the same problems

My Firewall is the ufw firewall with following Settings:

ufw status
Status: active

To                         Action      From
--                         ------      ----
37263                      ALLOW       Anywhere
80                         ALLOW       Anywhere
443                        ALLOW       Anywhere
25                         ALLOW       Anywhere
110                        ALLOW       Anywhere
143                        ALLOW       Anywhere
465                        ALLOW       Anywhere
587                        ALLOW       Anywhere
993                        ALLOW       Anywhere
995                        ALLOW       Anywhere
4190                       ALLOW       Anywhere
3478                       ALLOW       Anywhere
5349                       ALLOW       Anywhere
64000:65535/udp            ALLOW       Anywhere
3478/udp                   ALLOW       Anywhere
5349/udp                   ALLOW       Anywhere
49152:65535/udp            ALLOW       Anywhere
5001                       ALLOW       Anywhere
37263 (v6)                 ALLOW       Anywhere (v6)
80 (v6)                    ALLOW       Anywhere (v6)
443 (v6)                   ALLOW       Anywhere (v6)
25 (v6)                    ALLOW       Anywhere (v6)
110 (v6)                   ALLOW       Anywhere (v6)
143 (v6)                   ALLOW       Anywhere (v6)
465 (v6)                   ALLOW       Anywhere (v6)
587 (v6)                   ALLOW       Anywhere (v6)
993 (v6)                   ALLOW       Anywhere (v6)
995 (v6)                   ALLOW       Anywhere (v6)
4190 (v6)                  ALLOW       Anywhere (v6)
3478 (v6)                  ALLOW       Anywhere (v6)
5349 (v6)                  ALLOW       Anywhere (v6)
443/udp (v6)               ALLOW       Anywhere (v6)
3478/udp (v6)              ALLOW       Anywhere (v6)
5349/udp (v6)              ALLOW       Anywhere (v6)
49152:65535/udp (v6)       ALLOW       Anywhere (v6)

When i start the TCP test it works:
turnutils_uclient -W SECRET turn.obco.pro -T
0: : Total connect time is 1
0: : Total connect time is 1
0: : 2 connections are completed
0: : 2 connections are completed
0: : start_mclient: msz=2, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
0: : start_mclient: msz=2, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
1: : start_mclient: msz=2, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
1: : start_mclient: msz=2, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
2: : start_mclient: msz=2, tot_send_msgs=5, tot_recv_msgs=5, tot_send_bytes ~ 500, tot_recv_bytes ~ 500
2: : start_mclient: msz=2, tot_send_msgs=5, tot_recv_msgs=5, tot_send_bytes ~ 500, tot_recv_bytes ~ 500
3: : start_mclient: msz=2, tot_send_msgs=5, tot_recv_msgs=5, tot_send_bytes ~ 500, tot_recv_bytes ~ 500
3: : start_mclient: msz=2, tot_send_msgs=5, tot_recv_msgs=5, tot_send_bytes ~ 500, tot_recv_bytes ~ 500
4: : start_mclient: msz=2, tot_send_msgs=5, tot_recv_msgs=5, tot_send_bytes ~ 500, tot_recv_bytes ~ 500
4: : start_mclient: msz=2, tot_send_msgs=5, tot_recv_msgs=5, tot_send_bytes ~ 500, tot_recv_bytes ~ 500
5: : start_mclient: msz=2, tot_send_msgs=5, tot_recv_msgs=5, tot_send_bytes ~ 500, tot_recv_bytes ~ 500
5: : start_mclient: msz=2, tot_send_msgs=5, tot_recv_msgs=5, tot_send_bytes ~ 500, tot_recv_bytes ~ 500
6: : start_mclient: tot_send_msgs=10, tot_recv_msgs=10
6: : start_mclient: tot_send_msgs=10, tot_recv_msgs=10
6: : start_mclient: tot_send_bytes ~ 1000, tot_recv_bytes ~ 1000
6: : start_mclient: tot_send_bytes ~ 1000, tot_recv_bytes ~ 1000
6: : Total transmit time is 6
6: : Total transmit time is 6
6: : Total lost packets 0 (0.000000%), total send dropped 0 (0.000000%)
6: : Total lost packets 0 (0.000000%), total send dropped 0 (0.000000%)
6: : Average round trip delay 0.000000 ms; min = 0 ms, max = 0 ms
6: : Average round trip delay 0.000000 ms; min = 0 ms, max = 0 ms
6: : Average jitter 0.300000 ms; min = 0 ms, max = 1 ms
6: : Average jitter 0.300000 ms; min = 0 ms, max = 1 ms

But with UDP it fails:
 turnutils_uclient -W SECRET turn.obco.pro -v
0: : IPv4. Connected from: 85.10.207.75:41380
0: : IPv4. Connected from: 85.10.207.75:41380
0: : IPv4. Connected to: 85.10.207.75:3478
0: : IPv4. Connected to: 85.10.207.75:3478
0: : allocate sent
0: : allocate sent
0: : allocate response received:
0: : allocate response received:
0: : allocate sent
0: : allocate sent
0: : allocate response received:
0: : allocate response received:
0: : success
0: : success
0: : IPv4. Received relay addr: 85.10.207.75:49162
0: : IPv4. Received relay addr: 85.10.207.75:49162
0: : clnet_allocate: rtv=7307748890134298660
0: : clnet_allocate: rtv=7307748890134298660
0: : refresh sent
0: : refresh sent
0: : refresh response received:
0: : refresh response received:
0: : success
0: : success
0: : IPv4. Connected from: 85.10.207.75:46388
0: : IPv4. Connected from: 85.10.207.75:46388
0: : IPv4. Connected to: 85.10.207.75:3478
0: : IPv4. Connected to: 85.10.207.75:3478
0: : IPv4. Connected from: 85.10.207.75:43078
0: : IPv4. Connected from: 85.10.207.75:43078
0: : IPv4. Connected to: 85.10.207.75:3478
0: : IPv4. Connected to: 85.10.207.75:3478
0: : allocate sent
0: : allocate sent
0: : allocate response received:
0: : allocate response received:
0: : allocate sent
0: : allocate sent
0: : allocate response received:
0: : allocate response received:
0: : success
0: : success
0: : IPv4. Received relay addr: 85.10.207.75:49163
0: : IPv4. Received relay addr: 85.10.207.75:49163
0: : clnet_allocate: rtv=0
0: : clnet_allocate: rtv=0
0: : refresh sent
0: : refresh sent
0: : refresh response received:
0: : refresh response received:
0: : success
0: : success
0: : allocate sent
0: : allocate sent
0: : allocate response received:
0: : allocate response received:
0: : allocate sent
0: : allocate sent
0: : allocate response received:
0: : allocate response received:
0: : success
0: : success
0: : IPv4. Received relay addr: 85.10.207.75:49188
0: : IPv4. Received relay addr: 85.10.207.75:49188
0: : clnet_allocate: rtv=6363124172577947679
0: : clnet_allocate: rtv=6363124172577947679
0: : refresh sent
0: : refresh sent
0: : refresh response received:
0: : refresh response received:
0: : success
0: : success
0: : channel bind sent
0: : channel bind sent
0: : cb response received:
0: : cb response received:
0: : channel bind: error 403 (Forbidden IP)
0: : channel bind: error 403 (Forbidden IP)

This is my docker-compose setup:
 coturn:
    image: coturn/coturn:latest
    container_name: coturn
    restart: always
    volumes:
      - /docker/Matrix-Synapse/Data/Coturn:/etc/coturn
    ports:
      - 3478:3478
      - 3478:3478/udp
      - 5349:5349
      - 5349:5349/udp
      - 49160-49200:49160-49200/udp
    command:
      - -n
      - --external-ip=85.10.207.75
      - --use-auth-secret
      - --realm=turn.obco.pro
      - --static-auth-secret=SECRET
      - --listening-port=3478
      - --tls-listening-port=5349
      - --min-port=49160
      - --max-port=49200
      - --verbose
      - --allow-loopback-peers
      - --cli-password=SECRET
      - --allowed-peer-ip=10.0.0.1

I really dont know what the problem is. Would be nice if somebody could help me out.

Nnanyereugo emmanuel

unread,
May 30, 2023, 7:03:21 PM5/30/23
to TURN Server (Open-Source project)
Probably your server security groups. I faced the same challeng.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages