How to restrict the bbb recording within a domain

235 views
Skip to first unread message

Shafeen Mohamed

unread,
Sep 15, 2020, 1:45:45 PM9/15/20
to bigbluebutton-users
Hi All,

We use bbb for live lessons in our LearnDash LMS. Once the recording is done it's displayed under the access code page. How do I restrict the recording to be played only within our domain, not allowing to copy the link and use it anywhere or by anyone who receives it ?

Best Regards,

Shafeen

TeachReo

unread,
Sep 16, 2020, 2:47:59 AM9/16/20
to bigbluebutton-users
Hi Shafeen

In the file /etc/bigbluebutton/nginx/presentation.nginx
you just need to modify this section
        location /playback/presentation {
                root    /var/bigbluebutton;
                index  index.html index.htm;
                valid_referers server_names learndashLMS.domain;
                if ($invalid_referer) {
                    return   403;
                }

        }

Replace learndashLMS.domain by your real domain ;)
restart bigbluebutton and it's done

Regards
Fabrice

Shafeen Mohamed

unread,
Sep 16, 2020, 5:12:24 AM9/16/20
to bigbluebutton-users
Hi Fabrice,

Thanks a lot for the reply. Will implement your instructions. 

Regards,

Shafeen

TeachReo

unread,
Sep 17, 2020, 2:53:19 AM9/17/20
to bigbluebutton-users
you're welcome :)

Shafeen Mohamed

unread,
Sep 22, 2020, 5:12:46 AM9/22/20
to bigbluebutton-users
Hi Fabrice,

I followed the instruction given. 

        location /playback/presentation {
                root    /var/bigbluebutton;
                index  index.html index.htm;
                valid_referers server_names teachexpert.com;
                if ($invalid_referer) {
                    return   403;
                }
        }
 Unfortunately when I restarted the bbb it produced the following error. I'm pretty new to these stuffs and would like to be guided on this.  

bbb-conf --restart

Restarting BigBlueButton 2.2.3 ...

Stopping BigBlueButton

Force gstreamer1.5-nice to version 0.1.17-0kurento1.16.04

Force gstreamer1.5-plugins-good to version 1.8.1-1kurento4.16.04

Force gstreamer1.5-pulseaudio to version 1.8.1-1kurento4.16.04

Starting BigBlueButton

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

 ........................................

#    sip may not have started properly

#    video may not have started properly

#    bigbluebutton may not have started properly

#    /usr/share/red5/log/screenshare-slf.log not found

  

# Potential problems described below

# Not running:  Nginx tomcat7 or grails LibreOffice

................................................................................

# Error: Could not connect to the configured hostname/IP address

#

#    https://live.teachexpert.com/

#

# If your BigBlueButton server is behind a firewall, see FAQ.

 # Error: Unable to reach default URL for presentation:

#

#    https://live.teachexpert.com/default.pdf

#

# Check value for beans.presentationService.defaultUploadedPresentation in

#   /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties


Thanks in advance.

Best Regards,

Shafeen

TeachReo

unread,
Sep 23, 2020, 4:00:07 AM9/23/20
to bigbluebutton-users
Hi Shafeen

what is the result of the commands after restart ?

journalctl -xe

and the result of this command :
nginx -t -c /etc/bigbluebutton/nginx/presentation.nginx

did you try to replace this line
valid_referers server_names teachexpert.com;
by this one :
valid_referers server_names *.teachexpert.com;

Regards
Fabrice

Shafeen Mohamed

unread,
Sep 24, 2020, 1:19:07 PM9/24/20
to bigbluebutton-users
Hi Fabrice, 

It's a strange world. Initial change didn't work and that's the reason I sent you the log. Today I did make the change valid_referers server_names *.teachexpert.com;, and I was able to start the server. But unfortunately I was not able to view any recordings in a browser as it returned 403. 

As a last try, once again I tried the initial code provided by you and the server was able to start. I think even the expected restriction is also working in my domain. I'm clueless, but anyway I've attached the outcome of your commands mentioned in the last message. Thank you very much for your help and if there's anything in the attached logs which needs attention please be kind enough to let me know.

One more clarification I would like to ask from you is, in the UI when I press the "Presentation" button to play the recording it loads the video in the current window. Is there a way to open the recording in a new window ?

Thanks a lot for the assistance.

Best Regards,

Shafeen


journalctl.docx
nginx -t -c.docx

TeachReo

unread,
Sep 28, 2020, 2:53:26 AM9/28/20
to bigbluebutton-users
Hi Shafeen,
I think there is something strange on your domain ... but could you start this command on your bbb server
tail -f /var/log/nginx/bigbluebutton.access.log | grep teachexpert | grep playback

after on your LearnDash LMS you start a replay

normally on your server screen you must see some lines like this (it's an example, you could have something a bit different) :
xxx.xxx.xxx.xxx - - [08/Jun/2020:13:49:10 +0200] "GET /playback/presentation/2.0/playback.html?meetingId=1aaa089f1cf88997c5b7d277102647d342cac149-1590407157891 HTTP/1.1" 200 1862 "https://teachexpert.com/replay/5ecbafc60b14942f49060f8efa7621f948ceff038480462b21ddc" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36"

The most important thing on this line is the bold part, it's this you need to add on the referer

Regards
Fabrice

Shafeen Mohamed

unread,
Oct 1, 2020, 2:09:56 PM10/1/20
to bigbluebutton-users

Hi Fabrice,

I followed your instructions. tail command retrieved live.teachexpert.com and I added it to referer. But unfortunately bbb-conf didn't restart properly. I've attached the --restart and  journalctl -xe  output. I've reverted referer to teachexpert.com and it's all good now.

What are your thoughts on this ?

Regards,

Shafeen
Restarting & nginx -t -c command.docx

TeachReo

unread,
Oct 1, 2020, 3:48:27 PM10/1/20
to bigbluebutton-users
Hi
Could you post your presentation.nginx ? 
And the log extract where you seen live.teachexpert.com
Regards
Fabrice

Shafeen Mohamed

unread,
Oct 2, 2020, 2:58:56 PM10/2/20
to bigbluebutton-users
Hi,

Please find the log extract and  presentation.nginx below .

"HEAD /presentation/a31e1cef141fd2428b7017df1000b034dc0077f5-1598706966033/video/webcams.mp4 HTTP/1.1" 200 0 "https://live.teachexpert.com/playback/presentation/2.0/playback.html?meetingId=a31e1cef141fd2428b7017df1000b034dc0077f5-1598706966033" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Edg/85.0.564.63"


        location /playback/presentation/playback.html {
                return 301 /playback/presentation/0.81/playback.html?$query_string;
                # If you have recordings from 0.9.0 beta versions and are sure
                # that you will never want to play recordings made with
                # BigBlueButton 0.81, comment the line above and uncomment the
                # following line:
                #return 301 /playback/presentation/0.9.0/playback.html?$query_string;
        }

        location /playback/presentation {
                root    /var/bigbluebutton;
                index  index.html index.htm;
                valid_referers server_names teachexpert.com;
                if ($invalid_referer) {
                    return   403;
                }
        }

        location /presentation {
                root    /var/bigbluebutton/published;
                index  index.html index.htm;

Regards,

Shafeen

TeachReo

unread,
Oct 3, 2020, 10:03:32 AM10/3/20
to bigbluebutton-users
Hi

It's the line with the meeting id you need and the referer is after the 200
GET /playback/presentation/2.0/playback.html?meetingId=1aaa089f1cf88997c5b7d277102647d342cac149-1590407157891 HTTP/1.1
the url you give is from the bbb server not learndash

Regards
Fabrice

Shafeen Mohamed

unread,
Oct 7, 2020, 1:37:09 PM10/7/20
to bigbluebutton-users
Hi,

Sorry for the delay in reverting. The following is the complete output tail command.

 tail -f /var/log/nginx/bigbluebutton.access.log | grep teachexpert | grep playback
 [07/Oct/2020:19:32:01 +0200] "GET /presentation/a31e1cef141fd2428b7017df1000b034dc0077f5-1598706966033/presentation/518d7d8e628fd4cdc9a39ff8e5b9b9bf5fe318c1-1598707093288/slide-55.png HTTP/1.1" 200 96897 "https://live.teachexpert.com/playback/presentation/2.0/playback.html?meetingId=a31e1cef141fd2428b7017df1000b034dc0077f5-1598706966033" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36"

Best Regards,

Shafeen

TeachReo

unread,
Oct 14, 2020, 2:24:49 PM10/14/20
to bigbluebutton-users
Hi
I didn't forget you ;)  one stupid thing to solve with scalelite
just one question, you watch your replays from where ?
learndash or directly from your computer with the replay url ?

Regards
Fabrice

Shafeen Mohamed

unread,
Oct 19, 2020, 11:29:06 AM10/19/20
to bigbluebutton-users
Hi, 

Thank you for reverting.

The question is not clear, though I answer as I understood. I played the recording in my computer by clicking the "Presentation" button available under BBB access code requirement. 

Regards,

Shafeen

Reply all
Reply to author
Forward
0 new messages