Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not recieving original customer ip in the user.ip tag #554

Closed
jellevanhees opened this issue Jun 29, 2020 · 3 comments · Fixed by getsentry/develop#119
Closed

Not recieving original customer ip in the user.ip tag #554

jellevanhees opened this issue Jun 29, 2020 · 3 comments · Fixed by getsentry/develop#119

Comments

@jellevanhees
Copy link

We run the default config from this repository.
our website(vue project) posts client side errors to sentry.
the user.ip tag from these errors is shown as the gateway ip of the docker network the stack runs in.
we would expect the public ip of the client in this tag.
the nginx config is default and uses x-forwarded-for header config.
we already did some testing with SENTRY_USE_X_FORWARDED_FOR = True and SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
with no positive result so far.

we currently have no luck finding related info on the documentation and other github issues are either older then 2 years or don't seem to have a definitive answer.

@BYK BYK self-assigned this Jul 10, 2020
@BYK BYK added this to the 20.7.0 milestone Jul 10, 2020
@BYK BYK removed this from the 20.7.0 milestone Jul 15, 2020
@BYK
Copy link
Member

BYK commented Jul 15, 2020

This is unfortunately a bug in Docker itself: moby/moby#15086. The only viable solution seems to be adding an HTTP load balancer in front (or something like CloudFlare) and then modify the nginx config to use the headers they pass down for the real client IP.

Will keep the issue open so we don't forget to document this.

@BYK
Copy link
Member

BYK commented Jul 15, 2020

/ping @mattrobenolt in case he has any other suggestions.

@VentyCZ
Copy link

VentyCZ commented Jul 18, 2020

I had this issue, just fixed it by updating nginx/nginx.conf file:

proxy_set_header X-Real-IP $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Just replaced $remote_addr with $proxy_add_x_forwarded_for.

If you want the external ip in logs, also update "log_format" line.

BYK added a commit to getsentry/develop that referenced this issue Aug 31, 2020
This is a first pass for on-premise basics without any connection to the new document. We will be adding an on-premise homepage that links to this document.

See https://app.asana.com/0/1169344595888357/1190341230301189/f.

Closes getsentry/self-hosted#410, closes getsentry/self-hosted#554, closes getsentry/self-hosted#567
BYK added a commit to getsentry/develop that referenced this issue Sep 1, 2020
This is a first pass for on-premise basics without any connection to the new document. We will be adding an on-premise homepage that links to this document.

See https://app.asana.com/0/1169344595888357/1190341230301189/f.

Closes getsentry/self-hosted#410, closes getsentry/self-hosted#554, closes getsentry/self-hosted#567

Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2020
a-hariti pushed a commit to getsentry/sentry-docs that referenced this issue Jun 8, 2024
This is a first pass for on-premise basics without any connection to the new document. We will be adding an on-premise homepage that links to this document.

See https://app.asana.com/0/1169344595888357/1190341230301189/f.

Closes getsentry/self-hosted#410, closes getsentry/self-hosted#554, closes getsentry/self-hosted#567

Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com>
stephanie-anderson pushed a commit to getsentry/sentry-docs that referenced this issue Jun 10, 2024
This is a first pass for on-premise basics without any connection to the new document. We will be adding an on-premise homepage that links to this document.

See https://app.asana.com/0/1169344595888357/1190341230301189/f.

Closes getsentry/self-hosted#410, closes getsentry/self-hosted#554, closes getsentry/self-hosted#567

Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants