OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • HAPROXY: Connections show local ip instead remote client [solved]
« previous next »
  • Print
Pages: [1]

Author Topic: HAPROXY: Connections show local ip instead remote client [solved]  (Read 1845 times)

ruggerio

  • Sr. Member
  • ****
  • Posts: 289
  • Karma: 11
    • View Profile
HAPROXY: Connections show local ip instead remote client [solved]
« 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.
« Last Edit: December 19, 2018, 02:15:52 pm by ruggerio »
Logged

ruggerio

  • Sr. Member
  • ****
  • Posts: 289
  • Karma: 11
    • View Profile
Re: HAPROXY: Connections show local ip instead remote client [solved]
« Reply #1 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!
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • HAPROXY: Connections show local ip instead remote client [solved]
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2