Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Moodle
  3. IP loggings/views in Moodle are local docker IP's

IP loggings/views in Moodle are local docker IP's

Scheduled Pinned Locked Moved Solved Moodle
security
6 Posts 5 Posters 2.0k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • imc67I Offline
    imc67I Offline
    imc67
    translator
    wrote on last edited by
    #1

    Is it possible to show everywhere where it's currently shown in Moodle the real IP of a user?

    That way it is also possible to ban IP's if they are misusing the platform.

    jdaviescoatesJ 1 Reply Last reply
    1
    • imc67I imc67

      Is it possible to show everywhere where it's currently shown in Moodle the real IP of a user?

      That way it is also possible to ban IP's if they are misusing the platform.

      jdaviescoatesJ Offline
      jdaviescoatesJ Offline
      jdaviescoates
      wrote on last edited by jdaviescoates
      #2

      @imc67 I'm not sure but @girish made a change to Jirafeau so that it logs the real IP of uploaders instead of the Docker IP so I'd guess Moodle just needs the same change.

      I think this was the change:

      • Run apache on port 8000

      I use Cloudron with Gandi & Hetzner

      fbartelsF 1 Reply Last reply
      1
      • jdaviescoatesJ jdaviescoates

        @imc67 I'm not sure but @girish made a change to Jirafeau so that it logs the real IP of uploaders instead of the Docker IP so I'd guess Moodle just needs the same change.

        I think this was the change:

        • Run apache on port 8000
        fbartelsF Offline
        fbartelsF Offline
        fbartels
        App Dev
        wrote on last edited by
        #3

        @jdaviescoates no, that is most likely the change from the release before https://forum.cloudron.io/topic/4299/jirafeau-package-updates/5?_=1612305182571

        1 Reply Last reply
        1
        • subvenS Offline
          subvenS Offline
          subven
          wrote on last edited by subven
          #4

          @jdaviescoates it was the HTTP_X_FORWARDED_FOR thing, not the apache port ^^

          Take a look at: https://moodle.org/mod/forum/discuss.php?d=385061#p1552240

          Beside the suggestion/question from Howard, what is setting for:
          ๏ปฟSite Admin -> Server -> http
          which says:
          Logged IP address source
          getremoteaddrconf
          Default: HTTP_CLIENT_IP, HTTP_X_FORWARDED_FOR, REMOTE_ADDR

          If your server is behind a reverse proxy, you can use this setting to specify which HTTP headers can be trusted to >contain the remote IP address. The headers are read in order, using the first one that is available.

          'spirit of sharing', Ken

          HTTP_X_FORWARDED_FOR should work if the the Docker gateway IP is added as trusted/ignored proxy for Moodle. I only found reverseproxy = true as an configuration option which (AFAIK) does not help. However you should be able to adjust the settings in the UI instead ๐Ÿ™‚

          Go to Site Admin -> Server -> http and do as follow:

          2021-02-03 01_38_27-Window.png

          Since @girish should already know whats up, maybe he can help to make this change permanent for all instances.

          EDIT PS: I DID NOT TEST THIS I'M JUST GUESSING ๐Ÿ˜“ ๐Ÿ’ฆ PLEASE CONFIRM WORKING FIRST

          EDIT2: Confirmed working ๐Ÿ˜ฐ

          3 February 2021, 12:44 AM	Admin User	-	System	System	Config log created	The user with id '2' changed the config setting 'reverseproxyignore' for component 'core' from '' to '172.18.0.1'.	web	176.XX.XXX.XXX (my IP)
          
          imc67I 1 Reply Last reply
          3
          • subvenS subven

            @jdaviescoates it was the HTTP_X_FORWARDED_FOR thing, not the apache port ^^

            Take a look at: https://moodle.org/mod/forum/discuss.php?d=385061#p1552240

            Beside the suggestion/question from Howard, what is setting for:
            ๏ปฟSite Admin -> Server -> http
            which says:
            Logged IP address source
            getremoteaddrconf
            Default: HTTP_CLIENT_IP, HTTP_X_FORWARDED_FOR, REMOTE_ADDR

            If your server is behind a reverse proxy, you can use this setting to specify which HTTP headers can be trusted to >contain the remote IP address. The headers are read in order, using the first one that is available.

            'spirit of sharing', Ken

            HTTP_X_FORWARDED_FOR should work if the the Docker gateway IP is added as trusted/ignored proxy for Moodle. I only found reverseproxy = true as an configuration option which (AFAIK) does not help. However you should be able to adjust the settings in the UI instead ๐Ÿ™‚

            Go to Site Admin -> Server -> http and do as follow:

            2021-02-03 01_38_27-Window.png

            Since @girish should already know whats up, maybe he can help to make this change permanent for all instances.

            EDIT PS: I DID NOT TEST THIS I'M JUST GUESSING ๐Ÿ˜“ ๐Ÿ’ฆ PLEASE CONFIRM WORKING FIRST

            EDIT2: Confirmed working ๐Ÿ˜ฐ

            3 February 2021, 12:44 AM	Admin User	-	System	System	Config log created	The user with id '2' changed the config setting 'reverseproxyignore' for component 'core' from '' to '172.18.0.1'.	web	176.XX.XXX.XXX (my IP)
            
            imc67I Offline
            imc67I Offline
            imc67
            translator
            wrote on last edited by
            #5

            @subven this is THE SOLUTION!!!

            Thank you very much!!!

            @nebulon it would be wise to add it default to the app or to the docs I guess?

            nebulonN 1 Reply Last reply
            1
            • imc67I imc67

              @subven this is THE SOLUTION!!!

              Thank you very much!!!

              @nebulon it would be wise to add it default to the app or to the docs I guess?

              nebulonN Away
              nebulonN Away
              nebulon
              Staff
              wrote on last edited by
              #6

              @imc67 I've published a new package which sets the getremoteaddrconf now correctly.
              Since we only have one reverse proxy, the second setting was not needed in my tests. So this is untouched by default.

              1 Reply Last reply
              2
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search