I have configured HAproxy for TCP/IP loadbalancing but in app server I am not getting IP address of source instead of that I'm getting haproxy IP address as client ip address.

I searched on google and I got so many article to setup proxy-forwarding in HTTP mode but i'm not getting any method to enable same in TCP/IP mode. Please help me with this.



You cannot get the client IP address in TCP mode, since there is no mechanism to relay the original IP address to the application server.

  • is there any way to achieve this by using IPTables? Mar 15 '21 at 17:57
  • 2
    That might be possible, search for "iptables load balancer" and you will find articles about the subject. Mar 15 '21 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.