OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: ruggerio on December 13, 2018, 07:03:41 am

Title: HAPROXY: Connections show local ip instead remote client [solved]
Post by: ruggerio on December 13, 2018, 07:03:41 am
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.
Title: Re: HAPROXY: Connections show local ip instead remote client [solved]
Post by: ruggerio on December 19, 2018, 02:18:05 pm
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!