Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure coturn with an alternative listening port?

We tried to configure coturn with an alternative listening port, and it's not working. I'd like to clarify if we're doing the right thing and if it doesn't work because of /me stupid or the server.

We're using turns (secure). I want the server to listen on port 5349 and 443, the default port in case 443 has web proxies which block turn traffic and 443 in case everything else is blocked. I was planning to give the client 2 redundant servers, one with each port.

  • Is this a good idea or would you consider it unnecessary?

When I configure coturn with

tls-listening-port=5349
alt-tls-listening-port=443

only 5349 works. When I change the specification order, 443 works.

Looks like alt-tls-listening-port has no effect at all.

I know when using UDP the ports are consecutive by default, but the comments say

# Alternative listening port for TLS and DTLS protocols.
# Default (or zero) value means "TLS listening port plus one".

and for the non-TLS section

# This is needed for RFC 5780 support
# (STUN extension specs, NAT behavior discovery). The TURN Server 
# supports RFC 5780 only if it is started with more than one 
# listening IP address of the same family (IPv4 or IPv6).
# RFC 5780 is supported only by UDP protocol, other protocols
# are listening to that endpoint only for "symmetry".

so I assume what I am planning to do should work. Any ideas?

like image 243
Oliver Hausler Avatar asked Nov 07 '22 21:11

Oliver Hausler


1 Answers

I was also in the same position, and could only get this working by setting multiple listening-ip addresses. I know this is alluded to in the alt-listening-port comments, but it's not mentioned in alt-tls-listening-port so it seems 'odd' behaviour.

Anywhoo, for clarify the alt-*-listening-port options only start working for me after doing something like:

listening-ip=1.2.3.4
listening-ip=1.2.3.5
like image 139
Tristan Perry Avatar answered Nov 16 '22 18:11

Tristan Perry