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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

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

    Moodle
    security
    5
    6
    571
    Loading More Posts
    • 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.
    • imc67
      imc67 translator last edited by

      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.

      jdaviescoates 1 Reply Last reply Reply Quote 1
      • jdaviescoates
        jdaviescoates @imc67 last edited by 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

        I use Cloudron with Gandi & Hetzner

        fbartels 1 Reply Last reply Reply Quote 1
        • fbartels
          fbartels App Dev @jdaviescoates last edited by

          @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 Reply Quote 1
          • subven
            subven last edited by 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)
            
            imc67 1 Reply Last reply Reply Quote 3
            • imc67
              imc67 translator @subven last edited by

              @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?

              nebulon 1 Reply Last reply Reply Quote 1
              • nebulon
                nebulon Staff @imc67 last edited by

                @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 Reply Quote 2
                • First post
                  Last post
                Powered by NodeBB