I have a haproxy set for https and as such I had to enable mode:tcp for that but as it turns out because of that forwardfor is being ignored and I can't see original ip. is there any way to bypass it?
haproxy ver: 1.4.9
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
x-forwarded-for is an HTTP header field, so has nothing to do with the transport layer (TCP). Usually web proxies insert the x-forwarded-for data.
If you want to have the source IP when balancing at transport layer, then you need to compile haproxy with TPROXY support. See: https://www.loadbalancer.org/blog/configure-haproxy-with-tproxy-kernel-for-full-transparent-proxy/
But note that the current Linux kernel has TPROXY support by default (It has done since 2.6.28), so you may be able to skip the kernel step described in the above blog post if your kernel version > 2.6.28.