From 073e9bd31242a18bc0c5fb8dd5e486f879187fcf Mon Sep 17 00:00:00 2001 From: Brent Baccala Date: Thu, 5 Jan 2023 17:41:27 -0500 Subject: [PATCH] Fix TURN server configuration for TURN servers behind NAT gateways 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. --- bbb-install-2.5.sh | 4 ++-- bbb-install-2.6.sh | 4 ++-- bbb-install.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bbb-install-2.5.sh b/bbb-install-2.5.sh index ccc19bf..0c2c5e2 100755 --- a/bbb-install-2.5.sh +++ b/bbb-install-2.5.sh @@ -1013,8 +1013,8 @@ install_coturn() { listening-port=3478 tls-listening-port=443 -listening-ip=$IP -relay-ip=$IP +listening-ip=${INTERNAL_IP:-$IP} +relay-ip=${INTERNAL_IP:-$IP} $EXTERNAL_IP min-port=32769 diff --git a/bbb-install-2.6.sh b/bbb-install-2.6.sh index 077bf07..4e7b5ec 100755 --- a/bbb-install-2.6.sh +++ b/bbb-install-2.6.sh @@ -1002,8 +1002,8 @@ install_coturn() { listening-port=3478 tls-listening-port=443 -listening-ip=$IP -relay-ip=$IP +listening-ip=${INTERNAL_IP:-$IP} +relay-ip=${INTERNAL_IP:-$IP} $EXTERNAL_IP min-port=32769 diff --git a/bbb-install.sh b/bbb-install.sh index 85f36d3..b3d6470 100755 --- a/bbb-install.sh +++ b/bbb-install.sh @@ -1053,8 +1053,8 @@ install_coturn() { listening-port=3478 tls-listening-port=443 -listening-ip=$IP -relay-ip=$IP +listening-ip=${INTERNAL_IP:-$IP} +relay-ip=${INTERNAL_IP:-$IP} $EXTERNAL_IP min-port=32769