From f82bb3a1ae0c38002fc10c15057cc8072163d715 Mon Sep 17 00:00:00 2001 From: qubex22 Date: Sat, 2 Jul 2022 13:25:19 +0000 Subject: [PATCH 1/5] NAT workaround for mediasoup in 2.5 or later --- docs/behind-nat.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/docs/behind-nat.md b/docs/behind-nat.md index 3a8d1e67..3e9111fc 100644 --- a/docs/behind-nat.md +++ b/docs/behind-nat.md @@ -1,14 +1,19 @@ -# Note if you use a Firewall / NAT -Kurento binds somehow always to the external IP instead of the local one or `0.0.0.0`. For that reason you need to add your external IP to your interface. +# Note if you use a Firewall / NAT in BBB 2.5 or later +1. When the **setup script** asks for your **external IPv4** select NO and then put the **private ip** of your host. +> Is x.x.x.x your external IPv4 address? (y/n): *n* +> Please enter correct IPv4 address: *192.168.1.100* -#### Temporary way (until next reboot) -``` -$ ip addr add 144.76.97.34/32 dev ens3 -``` +This is because the variable **EXTERNAL_IPv4** in .env should be the private ip of the host. If you put the public ip and port forward in your router when the packets reach bbb they would be searching for your PublicIP:port and finally the result would be port unreachable. -#### Permanent way -Specific to your linux distribution. Use a search engine of your choice. ;) +2. Now freeswitch and mediasoup bind to the private ip, and we have port forwarded every needed udp port 16384-32768. The problem now is that Mediasoup have an ***announcedIp*** variable that sould ALWAYS be the Public IP, if not, webrtc won't work +3. To change this, we should edit the docker-compose.yml at these lines: +` +MS_WEBRTC_LISTEN_IPS: '[{"ip":"${EXTERNAL_IPv4}", "announcedIp":"x.x.x.x"}]' +` +` +MS_RTP_LISTEN_IP: '{"ip":"0.0.0.0", "announcedIp":"x.x.x.x"}' +` +where x.x.x.x is your public ip ## Ports -Also don't forget to forward all necassary ports listed in https://docs.bigbluebutton.org/admin/configure-firewall.html - +Also don't forget to forward all necassary ports listed in https://docs.bigbluebutton.org/admin/configure-firewall.html \ No newline at end of file From 49bf22a251069213070ca23137c93fa27e2e90b9 Mon Sep 17 00:00:00 2001 From: qubex22 Date: Mon, 4 Jul 2022 10:42:37 +0000 Subject: [PATCH 2/5] Add freeswitch step --- docs/behind-nat.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/behind-nat.md b/docs/behind-nat.md index 3e9111fc..95b66ddc 100644 --- a/docs/behind-nat.md +++ b/docs/behind-nat.md @@ -7,13 +7,17 @@ This is because the variable **EXTERNAL_IPv4** in .env should be the private ip 2. Now freeswitch and mediasoup bind to the private ip, and we have port forwarded every needed udp port 16384-32768. The problem now is that Mediasoup have an ***announcedIp*** variable that sould ALWAYS be the Public IP, if not, webrtc won't work -3. To change this, we should edit the docker-compose.yml at these lines: -` +3. To change this, we should edit the `docker-compose.yml` at these lines: +``` MS_WEBRTC_LISTEN_IPS: '[{"ip":"${EXTERNAL_IPv4}", "announcedIp":"x.x.x.x"}]' -` -` MS_RTP_LISTEN_IP: '{"ip":"0.0.0.0", "announcedIp":"x.x.x.x"}' -` +``` where x.x.x.x is your public ip +4. As indicated in https://github.com/bigbluebutton/bigbluebutton.github.io/issues/126 these 2 variables in the `vars.xml` of freeswitch should point to the external ip: +``` + + +``` + ## Ports Also don't forget to forward all necassary ports listed in https://docs.bigbluebutton.org/admin/configure-firewall.html \ No newline at end of file From 4ef603f2194d4f62cbf8ac681670a7fc513db5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Rodr=C3=ADguez?= Date: Mon, 4 Jul 2022 12:43:29 +0200 Subject: [PATCH 3/5] Update behind-nat.md --- docs/behind-nat.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/behind-nat.md b/docs/behind-nat.md index 95b66ddc..4f81c614 100644 --- a/docs/behind-nat.md +++ b/docs/behind-nat.md @@ -13,6 +13,7 @@ MS_WEBRTC_LISTEN_IPS: '[{"ip":"${EXTERNAL_IPv4}", "announcedIp":"x.x.x.x"}]' MS_RTP_LISTEN_IP: '{"ip":"0.0.0.0", "announcedIp":"x.x.x.x"}' ``` where x.x.x.x is your public ip + 4. As indicated in https://github.com/bigbluebutton/bigbluebutton.github.io/issues/126 these 2 variables in the `vars.xml` of freeswitch should point to the external ip: ``` @@ -20,4 +21,4 @@ where x.x.x.x is your public ip ``` ## Ports -Also don't forget to forward all necassary ports listed in https://docs.bigbluebutton.org/admin/configure-firewall.html \ No newline at end of file +Also don't forget to forward all necassary ports listed in https://docs.bigbluebutton.org/admin/configure-firewall.html From 3b9887a48e8f504b0a1602002d64746e9a2a775c Mon Sep 17 00:00:00 2001 From: cube Date: Sat, 30 Sep 2023 12:48:23 +0200 Subject: [PATCH 4/5] Update behind-nat.md --- docs/behind-nat.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/behind-nat.md b/docs/behind-nat.md index 4f81c614..4e84600e 100644 --- a/docs/behind-nat.md +++ b/docs/behind-nat.md @@ -14,11 +14,14 @@ MS_RTP_LISTEN_IP: '{"ip":"0.0.0.0", "announcedIp":"x.x.x.x"}' ``` where x.x.x.x is your public ip -4. As indicated in https://github.com/bigbluebutton/bigbluebutton.github.io/issues/126 these 2 variables in the `vars.xml` of freeswitch should point to the external ip: +4. As indicated in https://github.com/bigbluebutton/bigbluebutton.github.io/issues/126 these 2 variables in `bbb-docker/mod/freeswitch/conf/vars.xml` file of freeswitch should point to the external ip: ``` - - + + ``` +where x.x.x.x is your public ip + +5. In the `docker-compose.yml` file comment the image line of freeswitch in order to build it locally when you run docker compose up -d ## Ports Also don't forget to forward all necassary ports listed in https://docs.bigbluebutton.org/admin/configure-firewall.html From 0c99368fd5eecf9874e6c1ed1c47d2ad2907747b Mon Sep 17 00:00:00 2001 From: cube Date: Sat, 30 Sep 2023 12:49:11 +0200 Subject: [PATCH 5/5] Update behind-nat.md --- docs/behind-nat.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/behind-nat.md b/docs/behind-nat.md index 4e84600e..56f638ac 100644 --- a/docs/behind-nat.md +++ b/docs/behind-nat.md @@ -22,6 +22,23 @@ where x.x.x.x is your public ip where x.x.x.x is your public ip 5. In the `docker-compose.yml` file comment the image line of freeswitch in order to build it locally when you run docker compose up -d +``` +freeswitch: + container_name: bbb-freeswitch + build: + context: mod/freeswitch + args: + BBB_BUILD_TAG: v2022-12-29-grails-524 + TAG_FS_BUILD_FILES: v2.6.0 + TAG_FS_CONFIG: v2.6.0 + TAG_FREESWITCH: v1.10.9 + #image: alangecker/bbb-docker-freeswitch:v2.6.0 + restart: unless-stopped + cap_add: + - IPC_LOCK + - NET_ADMIN + - NET_RAW +``` ## Ports Also don't forget to forward all necassary ports listed in https://docs.bigbluebutton.org/admin/configure-firewall.html