Skip to content

Conversation

@BrentBaccala
Copy link
Contributor

Commit 1b19b0 (Updated for installing coturn on 20.04 - Jan 17 2021) added coturn configuration options (listening-ip, relay-ip, external-ip) that aren't properly set if the TURN server is behind a NAT gateway.

In the NAT case, both listening-ip (the address the TURN server binds to) and relay-ip (the address the TURN server transmits on) should be the private IP address.

If listening-ip and relay-ip are improperly set to the external IP address, then we get error messages (like those reported on Issue #577) that the TURN server can't bind to the public IP address.

Fixes and closes Issue #577.

Commit 1b19b0 (Updated for installing coturn on 20.04 - Jan 17 2021) added
coturn configuration options (listening-ip, relay-ip, external-ip) that
aren't properly set if the TURN server is behind a NAT gateway.

In the NAT case, both listening-ip (the address the TURN server binds to)
and relay-ip (the address the TURN server transmits on) should be the
private IP address.

If listening-ip and relay-ip are improperly set to the external IP address,
then we get error messages (like those reported on Issue bigbluebutton#577) that the
TURN server can't bind to the public IP address.

Fixes and closes Issue bigbluebutton#577.
@ffdixon
Copy link
Member

ffdixon commented Jan 6, 2023

Just testing this -- it seems that ${INTERNAL_IP:-$IP} will only put the first INTERNAL_IP.

# cat test.sh
#!/bin/bash

INTERNAL_IP=1.1.1.1
IP=2.2.2.2
echo "listening-ip=${INTERNAL_IP:-$IP}"

#./test.sh
listening-ip=1.1.1.1

@BrentBaccala
Copy link
Contributor Author

Just testing this -- it seems that ${INTERNAL_IP:-$IP} will only put the first INTERNAL_IP.

That's the desired behavior. It uses INTERNAL_IP in the NAT case, and IP in the non-NAT case.

listening-ip is the address that the TURN server actually binds to and listens for packets on, so it needs to be an address that is actually configured on the machine. In the NAT case, INTERNAL_IP is the private address and IP is the public address, while in the non-NAT case, INTERNAL_IP isn't set and IP is the public address, that is also the address actually configured on the machine.

@schlaile
Copy link

I just installed bbb 3.0 using bbb-install.sh and noticed, that the turn-server configuration isn't properly set behind a NAT firewall.

Symptom: everything works besides audio (ICE failure).

Solution:

  • Add "external-ip" pointing to the public firewall IP (everything else left unchanged) in /etc/turnserver.conf

You might want to update your patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants