OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: ruggerio on December 10, 2018, 10:25:00 am

Title: HAPROXY: Which Ports to which target to open for reverse proxy [solved]
Post by: ruggerio on December 10, 2018, 10:25:00 am
Hi,

Which ports do i have to open on the wan-interface, when using haproxy (listening on 127.0.0.1:80 and 127.0.0.1:443) public frontend?

Do i just have to set on wan interface allow all to this firewall port 80 and 443?
Title: Re: HAPROXY: Which Ports to which target to open for reverse proxy
Post by: fabian on December 10, 2018, 10:27:14 pm
this will not work, you need to bind it on 0.0.0.0 and :: to be publicly available.
Title: Re: HAPROXY: Which Ports to which target to open for reverse proxy
Post by: ruggerio on December 11, 2018, 07:53:17 am
OK, and then just a rule on wan to allow port 80 and 443?

i tried before to insert my domain in the form domain.tld:80 domain.tld:443 - this did not work either. I thought, this will make it listening to wan port?
Title: Re: HAPROXY: Which Ports to which target to open for reverse proxy
Post by: fabian on December 11, 2018, 06:13:43 pm
you probably want a rule

PASS IPv4+IPv6 TCP FROM ANY:ANY TO THIS_FIREWALL:WEB_PORTS

WEB_PORTS: Alias for 80,443
Title: Re: HAPROXY: Which Ports to which target to open for reverse proxy
Post by: ruggerio on December 12, 2018, 08:30:46 am
Thx, i think i had this, but i gonna retry. Maybe i just did something wrong.
Title: Re: HAPROXY: Which Ports to which target to open for reverse proxy
Post by: ruggerio on December 12, 2018, 02:21:09 pm
done like this, working. Thx!