Detecting external ips running sentry for lms or cms

Hi all, anyone using sentry with lms or cms? we notice that all events are coming from the same ip (which is the ip of the box running tutor & docker)

Anyone solve this issue? I read that maybe solved by using a specific (host) networ-mode https://docs.docker.com/compose/compose-file/#network_mode

Hey @cacciaresi,
This issue is due to the fact that there is a load balancer (nginx) between the gunicorn process and the client. For some reason, the X-Forwarded-For header is not properly read by Django. That means that there is a problematic link somewhere in the chain:

nginx -> gunicorn -> django -> sentry

I think that the problem could be coming from gunicorn, which does not consider nginx as a trusted proxy. According to the docs, we should pass the --forwarded-allow-ips="*" option to the gunicorn process: https://docs.gunicorn.org/en/latest/deploy.html

Could you please open a github issue describing your problem and linking to this post?

1 Like

Hi! I will create the issue.