Solved IP loggings/views in Moodle are local docker IP's
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 last edited by jdaviescoates
@jdaviescoates no, that is most likely the change from the release before https://forum.cloudron.io/topic/4299/jirafeau-package-updates/5?_=1612305182571
subven last edited by subven
@jdaviescoates it was the
HTTP_X_FORWARDED_FORthing, 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
Logged IP address source
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_FORshould 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:
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 I've published a new package which sets the
Since we only have one reverse proxy, the second setting was not needed in my tests. So this is untouched by default.