Client ip gets lost after a request being passed through two haproxies?

2013-04-25 Thread Wei Kong
Hi, We have an haproxy (A)in front of ngnix and it has been working great and we can get the client ip without any problem HAProxy A - Nginx Recently we added an another haproxy (B) in front of the first haproxy(A), from that point on, we noticed that the client IP becomes the new haproxy's

Re: Client ip gets lost after a request being passed through two haproxies?

2013-04-25 Thread PiBa-NL
Hey Wei Kong, Your probably using *option forwardfor http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-option%20forwardfor* right? Think a second about how that option works: - HAProxyB recieves a connection from the Client IP, and adds a header in the http traffic telling

Re: Client ip gets lost after a request being passed through two haproxies?

2013-04-25 Thread David Coulson
On 4/25/13 2:12 PM, PiBa-NL wrote: Hey Wei Kong, Your probably using *option forwardfor http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-option%20forwardfor* right? Think a second about how that option works: - HAProxyB recieves a connection from the Client IP, and adds a

Re: Client ip gets lost after a request being passed through two haproxies?

2013-04-25 Thread David Coulson
On 4/25/13 2:12 PM, PiBa-NL wrote: Hey Wei Kong, Your probably using *option forwardfor http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-option%20forwardfor* right? I checked this - HAProxy does append to the X-Forwarded-For header. In this example 10.2.3.40 is the HAproxy