rudderlabs / rudder-server

Privacy and Security focused Segment-alternative, in Golang and React
https://www.rudderstack.com/
Other
4.1k stars 317 forks source link

Client IP in destination is incorrect #459

Closed kevinavery closed 4 years ago

kevinavery commented 4 years ago

Hi, it looks like the client IP address in my destinations (Amplitude and Snowflake) matches the IP of the rudder-server node rather than the actual client.

Tested with the latest version here deployed via rudderstack-helm. As an aside, is there a way to check the version or git hash of rudder-server instance?

sivashanmukh commented 4 years ago

We pick up this value from X-Forwarded-For header and if its not there, we pick up RemoteAddr (doc: here) from the request.

To get the commit number and other details, you can do this

curl http://<rudder-node-ip>:8080/version

Incase you want to dig into code, you can take a look here

kevinavery commented 4 years ago

Looks like AWS ELBs only send X-Forwarded-For if the listener protocol is HTTP/S, but rudderstack-helm configures the ELB to use TCP. I'll open an issue there