HA Proxy Reverse Proxy Help [solved]

Started by docb, April 04, 2018, 10:17:09 PM

Previous topic - Next topic
April 04, 2018, 10:17:09 PM Last Edit: April 07, 2018, 11:14:27 AM by docb
EDIT: Now it works with this configuration. After some reboots and leaving everything as it is for 1 day it works.  ;D Sometimes they have their own life ;-)

Hi,
I have followed several guides to set up a reverse proxy with ha proxy but I am not sucessfull (e.g. https://docs.opnsense.org/manual/how-tos/haproxy.html, https://www.frankysweb.de/exchange-2016-opnsense-haproxy-und-lets-encrypt/). Unfortunately they do not refer to ha proxy 2.6 but I think I've managed to "translate" some of the descriptions (i.a. ACL -> Rules).
If I use NAT, I can reach my webserver from the internet, but not with HA Proxy. Could someone please look over my config and tell me where my error is?
Firewall -> Rules -> WAN -> ICPv4TCP * * * 80 (HTTP) *      [should allow any http traffic to any destination]
Services -> HAProxy -> Configuration:

  • 1. Real Server
  • Name: us80
  • FQDN or IP: 192.168.2.4 (this is where my apache is reachable
  • Port: 80
  • SSL: unchecked
  • Verify SSL: unchecked

  • 2. Virtual Services -> Backend Pool
  • Name: us80_backend
  • Mode: HTTP (Layer7) default
  • Balancing Algorythm: Source-IP Hash default
  • Server: us80
  • nothing else changed

  • 3. Rules & Checks -> Conditions
  • Name: us80_acl
  • Condition type: Path starts with
  • Negate condition: unchecked
  • Path Prefix: /*

  • 4. Rules & Checks -> Rules
  • Name: us80_rule
  • Test type: IF default
  • Logical operator: AND default
  • Execute function: use specified Backend Pool
  • Use backend pool: us80_backend


  • 5. Virtual Services -> Public Services
  • Name: us80_public
  • Listen Addresses: 127.0.0.1:80, 192.0.0.2:80 (WAN Address, I've tried it with only this address too, also 0.0.0.0:80 did not work)
  • Type: HTTP / HTTPS (SSL offloading) default
  • Default Backend Pool: us80_backend
  • Select rules: us80_rule (does not work without rule either
  • nothing else changed

I am thankful for any hints!