Re: Pass Source Port

2012-01-04 Thread Willy Tarreau
Hi,

On Tue, Jan 03, 2012 at 11:26:18AM +, Türker Sezer (YHB Sistem Yönetimi) 
wrote:
> I read PROXY protocol document in haproxy website but i couldn't understand
> how i can implement it on my lb -> backend structure. And i couldn't find
> any other document about it. Can someone share his/her experiences with me?

You need to implement it in your server ; it is not too much complicated, look
at how it's implemented in haproxy, you basically need to read one line and
fill your server's structs with the info you find there. On haproxy, you just
need to add the "send-proxy" parameter on each "server" line so that haproxy
emits this information behind it.

Regards,
Willy




Re: Pass Source Port

2012-01-03 Thread YHB Sistem Yönetimi
26 Aralık 2011 21:31 tarihinde Willy Tarreau  yazdı:

> Hi Türker,
>
> On Mon, Dec 26, 2011 at 07:27:03PM +, Türker Sezer (YHB Sistem
> Yönetimi) wrote:
> > 22 Aral?k 2011 13:32 tarihinde Türker Sezer (YHB Sistem Yönetimi) <
> > turker.se...@yh.com.tr> yazd?:
> >
> > > Is there any news about this feature? Can we add source port to
> header? I
> > > tried to add reqadd line which is in your example but it doesn't work.
> I
> > > can't get source port value.
> > >
> > > Brian, could you solve your problem? Can you share your solution?
> > >
> > > Thanks
> > >
> >
> > Hi,
> >
> > Is there any method for this except patching haproxy? I think, we should
> > able to use source port in our configuration.
>
> No, there is still no such method. As an alternative, you could check
> if you can implement the PROXY protocol on your servers and have haproxy
> pass them all the L4 information. Some people here on the list are already
> doing that.
>

Thanks Willy.

I read PROXY protocol document in haproxy website but i couldn't understand
how i can implement it on my lb -> backend structure. And i couldn't find
any other document about it. Can someone share his/her experiences with me?

-- 
Türker Sezer

Linux System Administrator
YeniHayat Informatics Corp.

http://www.yh.com.tr/
+90 (212) 210 77 36 - 111


Re: Pass Source Port

2011-12-26 Thread Willy Tarreau
Hi Türker,

On Mon, Dec 26, 2011 at 07:27:03PM +, Türker Sezer (YHB Sistem Yönetimi) 
wrote:
> 22 Aral?k 2011 13:32 tarihinde Türker Sezer (YHB Sistem Yönetimi) <
> turker.se...@yh.com.tr> yazd?:
> 
> > Is there any news about this feature? Can we add source port to header? I
> > tried to add reqadd line which is in your example but it doesn't work. I
> > can't get source port value.
> >
> > Brian, could you solve your problem? Can you share your solution?
> >
> > Thanks
> >
> 
> Hi,
> 
> Is there any method for this except patching haproxy? I think, we should
> able to use source port in our configuration.

No, there is still no such method. As an alternative, you could check
if you can implement the PROXY protocol on your servers and have haproxy
pass them all the L4 information. Some people here on the list are already
doing that.

Regards,
Willy




Re: Pass Source Port

2011-12-26 Thread YHB Sistem Yönetimi
22 Aralık 2011 13:32 tarihinde Türker Sezer (YHB Sistem Yönetimi) <
turker.se...@yh.com.tr> yazdı:

> Is there any news about this feature? Can we add source port to header? I
> tried to add reqadd line which is in your example but it doesn't work. I
> can't get source port value.
>
> Brian, could you solve your problem? Can you share your solution?
>
> Thanks
>

Hi,

Is there any method for this except patching haproxy? I think, we should
able to use source port in our configuration.

-- 
Türker Sezer
TS Design Informatics LTD.

http://www.tsdesign.info/


Re: Pass Source Port

2011-12-22 Thread YHB Sistem Yönetimi
2011/2/16 Willy Tarreau 

> Hi Brian,
>
> On Fri, Feb 11, 2011 at 12:36:10PM -0800, Brian Carpio wrote:
> > Hi,
> >
> > Currently I have a requirement to not only put the source IP in an
> x-forward-for header but also the source port. I have been searching the
> documentation and I can't seem to find a way to either maintain the source
> port or put the source port into a header like we can do the source IP in
> x-forward-for.
>
> There is no such thing right now. It will be a lot easier when we add
> support for patterns in headers, as you'd be able to say something like :
>
>   reqadd X-Forwarded-Source-Port:\ $src_port
>
> In the mean time, maybe the easiest solution for you would be to modify
> the x-forwarded-for code to add the port ? I won't merge that into mainline
> because it would become incompatible with current usages of this header,
> but at least it's an easy change.
>
> Regards,
> Willy
>
>
>
Is there any news about this feature? Can we add source port to header? I
tried to add reqadd line which is in your example but it doesn't work. I
can't get source port value.

Brian, could you solve your problem? Can you share your solution?

Thanks

-- 
Türker Sezer
TS Design Informatics LTD.

http://www.tsdesign.info/


Re: Pass Source Port

2011-02-15 Thread Willy Tarreau
Hi Brian,

On Fri, Feb 11, 2011 at 12:36:10PM -0800, Brian Carpio wrote:
> Hi,
> 
> Currently I have a requirement to not only put the source IP in an 
> x-forward-for header but also the source port. I have been searching the 
> documentation and I can't seem to find a way to either maintain the source 
> port or put the source port into a header like we can do the source IP in 
> x-forward-for.

There is no such thing right now. It will be a lot easier when we add
support for patterns in headers, as you'd be able to say something like :

   reqadd X-Forwarded-Source-Port:\ $src_port

In the mean time, maybe the easiest solution for you would be to modify
the x-forwarded-for code to add the port ? I won't merge that into mainline
because it would become incompatible with current usages of this header,
but at least it's an easy change.

Regards,
Willy