Is it possible to use two TURN servers for communication with the media server?

hyuk

Member
Hello,

I am setting up Flashphoner media server with TURN servers, and I would like to use two TURN servers for communication. Here's my setup:

  1. Configuration:
    • ClientTURN Server 1 (External IP: 1.1.1.1) → TURN Server 2 (External IP: 2.2.2.2) → Flashphoner Media Server
    • The TURN Server 1 receives the client's request and relays the packet to TURN Server 2, which then forwards the data to the Flashphoner Media Server.
  2. Issue:
    • I am facing an issue where packets are not being relayed between TURN Server 1 and TURN Server 2.
    • It seems like TURN Server 1 is directly reaching the Flashphoner Media Server via the UDP port range 30000-32000 instead of relaying through TURN Server 2.
    • I would like to know if it's possible to set up communication between two TURN servers and forward packets to the media server. Is there any additional configuration required to make this work?
  3. Additional Information:
    • Currently, TURN Server 2 does not directly use TURN to communicate with the Flashphoner Media Server. Is there any additional configuration needed for TURN server-to-server communication and the connection to Flashphoner?
I would appreciate any help or guidance on how to resolve this issue.




TURN Server 1 Configuration (External IP: 1.1.1.1)

listening-port=3478
listening-ip=1.1.1.1 # Internal IP of TURN Server 1
relay-ip=1.1.1.1 # Same as the external IP if this server is handling the traffic
external-ip=1.1.1.2 # External IP of TURN Server 1

user=id:pwd # Username and password
realm= # Domain for TURN Server 1

allowed-peer-ip=2.2.2.2 # Allow packets to be relayed to TURN Server 2 (External IP of TURN Server 2)

TURN Server 2 Configuration (External IP: 2.2.2.2)

listening-port=3478
listening-ip=2.2.2.1 # Internal IP of TURN Server 2
relay-ip=2.2.2.1 # Same as the external IP if this server is handling the traffic
external-ip=2.2.2.2 # External IP of TURN Server 2

user=id:pwd# Username and password
realm= # Domain for TURN Server 2

allowed-peer-ip=

Flashphoner Server Configuration (External IP: 2.2.2.2)
ip =2.2.2.2
ip_local =2.2.2.1
media_port_from =30000
media_port_to =32000
turn_port= no use

For reference, we assume that flashphoner is on server 2 together with turnserver.
( For reference, in actual configuration, falshphoner must be located on server 3. )

Thank you!
 
Last edited:

Max

Administrator
Staff member
Good day.
You can't use TURN server-to-server relay. WebRTC client (browser) may use a list of TURN servers, but WebRTC connection will be established through one of them. So you can use either TURN1 or TURN2 server to connect to Flashphoner WCS server.
 
Top