Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43500

Add SSL tunneling support to enable HTTPS when using the chat daemon.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.7
    • Chat
    • MOODLE_27_STABLE
    • m27_MDL-43500_Add_HTTPS_Support_To_Chat_Daemon
    • Hide

      (difficulty: difficult, requires system administrator access to the server hosting the Moodle instance to install a SSL tunneling like e.g. stunnel)

      1. Configure the SSL tunnelling and start it. See below 1 an example using stunnel under CentOS;
      2. Configure the secure access in the Moodle chat daemon settings, using the default values;
      3. Enable the secure access to the chatd daemon;
      4. Start the chatd daemon;
      5. Configure a chat activity and attend to it: look at the frameset source to see that the https:// URL is in place;
      6. Using two different browsers (e.g. CR and FF) with two different Moodle users, play a bit with the chat to see that it is happily doing its job.

      1 stunnel installation, configuration settings and start CLI commands:

      # yum install stunnel -y
      # cat /etc/stunnel/stunnel.conf
      # Use the same Apache SSL configuration: /etc/httpd/conf.d/ssl.conf
      cert = /etc/pki/tls/certs/localhost.crt
      key = /etc/pki/tls/private/localhost.key
      chroot = /var/run/stunnel/
      setuid = nobody
      setgid = nobody
      pid = /var/run/stunnel.pid
      client = no
       
      [moodle-chatd]
      accept = <chat_serverhost>:9111
      connect = 127.0.0.1:9111
       
      # mkdir -p /var/run/stunnel/var/run
      # chown -R nobody.nobody /var/run/stunnel/
      # /usr/sbin/stunnel /etc/stunnel/stunnel.conf
      # netstat -nat | grep 9111
      tcp        0      0 <IPv4 address of chat_serverhost>:9111           0.0.0.0:*                   LISTEN
      

      Show
      (difficulty: difficult, requires system administrator access to the server hosting the Moodle instance to install a SSL tunneling like e.g. stunnel ) Configure the SSL tunnelling and start it. See below 1 an example using stunnel under CentOS; Configure the secure access in the Moodle chat daemon settings, using the default values; Enable the secure access to the chatd daemon; Start the chatd daemon; Configure a chat activity and attend to it: look at the frameset source to see that the https:// URL is in place; Using two different browsers (e.g. CR and FF) with two different Moodle users, play a bit with the chat to see that it is happily doing its job. 1 stunnel installation, configuration settings and start CLI commands: # yum install stunnel -y # cat /etc/stunnel/stunnel.conf # Use the same Apache SSL configuration: /etc/httpd/conf.d/ssl.conf cert = /etc/pki/tls/certs/localhost.crt key = /etc/pki/tls/private/localhost.key chroot = /var/run/stunnel/ setuid = nobody setgid = nobody pid = /var/run/stunnel.pid client = no   [moodle-chatd] accept = <chat_serverhost>:9111 connect = 127.0.0.1:9111   # mkdir -p /var/run/stunnel/var/run # chown -R nobody.nobody /var/run/stunnel/ # /usr/sbin/stunnel /etc/stunnel/stunnel.conf # netstat -nat | grep 9111 tcp 0 0 <IPv4 address of chat_serverhost>:9111 0.0.0.0:* LISTEN

      If you want your Moodle fully running under HTTPS you cannot use the chatd daemon.
      See the details in: https://moodle.org/mod/forum/discuss.php?d=246019.

            matteo Matteo Scaramuccia
            matteo Matteo Scaramuccia
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.