Re: Odd behaviour with option forwardfor.

2017-07-24 Thread Aleksandar Lazic
Hi Willy Tarreau, Willy Tarreau wrote on 24.07.2017: > Hi Aleks, > On Sun, Jul 23, 2017 at 09:50:41AM +0200, Aleksandar Lazic wrote: >> > Personally I use 2 rules similar to the following to append to >> > X-Forwarded-For: >> > >> >   http-request set-header X-Forwarded-For

Re: Odd behaviour with option forwardfor.

2017-07-23 Thread Willy Tarreau
Hi Aleks, On Sun, Jul 23, 2017 at 09:50:41AM +0200, Aleksandar Lazic wrote: > > Personally I use 2 rules similar to the following to append to > > X-Forwarded-For: > > > >   http-request set-header X-Forwarded-For > > %[req.fhdr(X-Forwarded-For)],\ %[src] if {

Re: Odd behaviour with option forwardfor.

2017-07-23 Thread Aleksandar Lazic
Hi Claus, Claus Strommer wrote on 23.07.2017: > Hi Aleks, > > Patrick's solution is correct.  What I was expecting was that HAProxy would > take > > X-Forwarded-For: 1.1.1.1 > > and produce > > X-Forwarded-For: 1.1.1.1,2.2.2.2 > > but what it actually does is produce > > X-Forwarded-For:

Re: Odd behaviour with option forwardfor.

2017-07-23 Thread Claus Strommer
Hi Aleks, Patrick's solution is correct. What I was expecting was that HAProxy would take X-Forwarded-For: 1.1.1.1 and produce X-Forwarded-For: 1.1.1.1,2.2.2.2 but what it actually does is produce X-Forwarded-For: 1.1.1.1 X-Forwarded-For: 2.2.2.2 The backend concatenates the lines and

Re: Odd behaviour with option forwardfor.

2017-07-23 Thread Aleksandar Lazic
Hi Patrick Hemmer, Patrick Hemmer wrote on 22.07.2017: > On 2017/7/22 11:11, Claus Strommer wrote: > > Hi all, I'm seeing some odd behaviour with our > haproxy balancer and am looking for some insights. > >The setup: > >

Re: Odd behaviour with option forwardfor.

2017-07-22 Thread Claus Strommer
Thanks Patrick, your explanation makes sense. On Sat, Jul 22, 2017 at 12:28 PM, Patrick Hemmer wrote: > On 2017/7/22 11:11, Claus Strommer wrote: > > Hi all, I'm seeing some odd behaviour with our haproxy balancer and am > looking for some insights. > > The setup: > > I

Re: Odd behaviour with option forwardfor.

2017-07-22 Thread Patrick Hemmer
On 2017/7/22 11:11, Claus Strommer wrote: > Hi all, I'm seeing some odd behaviour with our haproxy balancer and am > looking for some insights. > > The setup: > > I have a webserver that is behind two haproxy balancers (version > 1.5.18 on EL7), which are behind CloudFlare. In effect the request

Odd behaviour with option forwardfor.

2017-07-22 Thread Claus Strommer
Hi all, I'm seeing some odd behaviour with our haproxy balancer and am looking for some insights. The setup: I have a webserver that is behind two haproxy balancers (version 1.5.18 on EL7), which are behind CloudFlare. In effect the request goes client->CF->haproxy1->haproxy2->server. On