HAPROXY: Connections show local ip instead remote client [solved]

Started by ruggerio, December 13, 2018, 07:03:41 AM

Previous topic - Next topic
Hi,

i recently installed successfully haproxy, it's working fine. i redirect webtraffic to my webhost.

Now, a problem occurs with fail2ban on this host. Each connection to the webserver is made by the internal gateway ip instead of the remote ip from the internet. With this, fail2ban will block my gateway and i am completely out. How can i forward the ip-information from the external, the calling id to my webserver?

FYI: the forward-x-header is checked.

Solved with this documentation for apache2, so it logs real client ip's instead of my gateways ip. Do not forget to set x-forwarded-for in your public connections.

http://www.loadbalancer.org/blog/apache-and-x-forwarded-for-headers/

Thx to the author!