Improving the external IP detection by bbb-conf

44 views
Skip to first unread message

insightc...@t-online.de

unread,
Sep 17, 2014, 3:25:21 PM9/17/14
to bigblueb...@googlegroups.com
I've been looking into an easy fix to detect the correct external IP also when using the OpenVZ environment and it probably really simple, since when issuing an ifconfig on an OpenVZ Ubuntu14.04 the network interface has a quite unique name (venet0:0). By simply checking for that string in ifconfig, the environment can be detected and in that case we simply choose the last in stead of the first ip on the ifconfig list, which is the external IP in OpenVZ, I tried this on several OpenVZ boxes and it works on OpenVZ and it also detects the correct IP in KVM which is similar to a dedicated server. Here is the code segment to replace the IP= line in bbb-conf:

# Determine IP so it works on multilingual installations
#
if [[ `sudo ifconfig` == *venet0:0* ]]
then
   # IP detection for OpenVZ environment
   IP=$(ifconfig | grep -v '127.0.0.1' | grep -E "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | tail -1 | cut -d: -f2 | awk '{ print $1}')
else
   # IP detection for regular environment
   IP=$(ifconfig | grep -v '127.0.0.1' | grep -E "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | head -1 | cut -d: -f2 | awk '{ print $1}')
fi
MEM=`free -m | grep Mem | awk '{ print $2}'`


This should avoid several "My WebRTC audio isn't working" posts...

Best regards
Oliver

Fred Dixon

unread,
Sep 17, 2014, 5:03:46 PM9/17/14
to BigBlueButton-dev
Many thanks Oliver!

We'll test this internally towards adding it to the next update for BigBlueButton 0.9.0-beta.

Regards,... Fred

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-...@googlegroups.com.
To post to this group, send email to bigblueb...@googlegroups.com.
Visit this group at http://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.



--
BigBlueButton Developer
BigBlueButton on twitter: @bigbluebutton
Reply all
Reply to author
Forward
0 new messages