From 3f7cd420b6f09ef5ef48b9fb854f51b6f8547872 Mon Sep 17 00:00:00 2001 From: Fred Dixon <ffdixon@gmail.com> Date: Mon, 4 Oct 2010 03:27:23 +0000 Subject: [PATCH] - Set Freeswitch event socket layer to listen on 127.0.0.1 - Added checks in bbb-conf to test ports 80, 1935, and 9123 to aid in setting up BigBlueButton behind a firewall --- .../autoload_configs/event_socket.conf.xml | 2 +- bigbluebutton-config/bin/bbb-conf | 57 +++++++++++++------ 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/bbb-voice-conference/config/freeswitch/conf/autoload_configs/event_socket.conf.xml b/bbb-voice-conference/config/freeswitch/conf/autoload_configs/event_socket.conf.xml index e4581bc948..227b8860f8 100644 --- a/bbb-voice-conference/config/freeswitch/conf/autoload_configs/event_socket.conf.xml +++ b/bbb-voice-conference/config/freeswitch/conf/autoload_configs/event_socket.conf.xml @@ -4,6 +4,6 @@ <param name="listen-ip" value="127.0.0.1"/> <param name="listen-port" value="8021"/> <param name="password" value="ClueCon"/> - <!-- param name="apply-inbound-acl" value="localnet.auto"/ --> + <param name="apply-inbound-acl" value="localnet.auto"/> </settings> </configuration> diff --git a/bigbluebutton-config/bin/bbb-conf b/bigbluebutton-config/bin/bbb-conf index df7df7c8e0..6cce3ccf9c 100755 --- a/bigbluebutton-config/bin/bbb-conf +++ b/bigbluebutton-config/bin/bbb-conf @@ -33,7 +33,7 @@ # 2010-06-25 SEB Added ability to change the security salt # 2010-06-30 SEB Added some extra errorchecking # 2010-07-06 SEB Added more errorchecking and report messages -# 2010-09-15 FFD Updates for 0.71 +# 2010-09-15 FFD Updates for 0.71-dev #set -x @@ -994,12 +994,33 @@ $RED5_DIR/webapps/sip/WEB-INF/bigbluebutton-sip.properties" if ! wget http://$NGINX_IP/bigbluebutton/api -O - --quiet | grep -q SUCCESS; then echo echo " This server could not connect to BigBlueButton through http://$NGINX_IP/" - echo " If you are setting up BigBlueButton behind a firewall, recommend you put" - echo " Recommend you put an entry into /etc/hosts for:" - echo " $IP $NGINX_IP" + echo + echo " If you are setting up BigBlueButton behind a firewall, see the FAQ" + echo " for steps to setup BigBlueButton behind a firewall." + echo " http://code.google.com/p/bigbluebutton/wiki/FAQ" echo fi + # + # Check that BigBlueButton can connect to port 80, 1935, and 9123 + # + + if ! nc -z -w 3 $NGINX_IP 80; then + echo + echo "Unable to connect to port 80 on $NGINX_IP" + fi + + if ! nc -z -w 3 $NGINX_IP 1935; then + echo + echo "Unable to connect to port 1935 (RTMP) on $NGINX_IP" + fi + + if ! nc -z -w 3 $NGINX_IP 9123; then + echo + echo "Unable to connect to port 9123 (desktop sharing) on $NGINX_IP" + fi + + exit 0 } @@ -1010,22 +1031,25 @@ $RED5_DIR/webapps/sip/WEB-INF/bigbluebutton-sip.properties" # TODO: # Check if asterisk and freeswitch are running if [ $CHECK ]; then - echo "Current Configuration:" - echo "Kernel version: " `uname -r` + echo "Server" + echo " Kernel version:" `uname -r` + + if [ -e /etc/lsb-release ]; then + source /etc/lsb-release; + echo -n " Distribution: $DISTRIB_DESCRIPTION " + fi + if [ `uname -m` == "x86_64" ]; then - echo "The architecture is 64bit." + echo "64bit" elif [ `uname -m` == "x86" ]; then - echo "The architecture is 32bit." + echo "32bit" fi - MEM=`free -m | grep Mem | awk '{ print $2}'` - echo "Memory: $MEM MB" - if [ -e /etc/lsb-release ]; then - cat /etc/lsb-release; - fi + MEM=`free -m | grep Mem | awk '{ print $2}'` + echo " Memory: $MEM MB" echo - echo "/var/www/bigbluebutton/client/conf/config.xml:" + echo "/var/www/bigbluebutton/client/conf/config.xml" IP=$(cat /var/www/bigbluebutton/client/conf/config.xml | sed -n '/porttest /{s/.*host="//;s/".*//;p}') echo " Port test (tunnel): $IP" @@ -1253,8 +1277,9 @@ if [ -n "$HOST" ]; then sudo sed -i "s/bigbluebutton.web.serverURL=http:\/\/.*/bigbluebutton.web.serverURL=http:\/\/$HOST/g" \ /var/lib/${TOMCAT}/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties -# 3 paramenter: the file, the variable name, the new value - change_var_ip /usr/share/red5/webapps/bigbluebutton/WEB-INF/bigbluebutton.properties esl.host $HOST + # 3 paramenter: the file, the variable name, the new value + # echo "Assigning $HOST for FreeSWITCH Event Socket Layer URL in /var/lib/${TOMCAT}/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties" + # change_var_ip /usr/share/red5/webapps/bigbluebutton/WEB-INF/bigbluebutton.properties esl.host $HOST # cat /var/lib/${TOMCAT}/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties -- GitLab