OPNsense Forum

English Forums => General Discussion => Topic started by: leacho73 on May 11, 2022, 03:18:28 PM

Title: Hosting Unifi Controller behind HAProxy
Post by: leacho73 on May 11, 2022, 03:18:28 PM
Hi All,

Apologies if this isn't the right forum - please move if I've got it wrong!

Has anyone successfully hosted a Unifi controller behind HAProxy running on OpnSense? - I've got a working config at the moment acting as a web proxy, allowing me to access internal resources via external URLs and Lets Encrypt - but if I want to use it as a 'inform URL' for my access points I need to be able to forward UDP/3478 and TCP/8080 - I'm pretty sure I can't forward UDP? I would do this via normal port forwarding rules, but I have a requirement for different rules depending on the URL they are hitting.

Thanks
Leacho
Title: Re: Hosting Unifi Controller behind HAProxy
Post by: zerwes on May 11, 2022, 04:56:51 PM
$ curl -s  http://www.haproxy.org/ | grep -i "<title>"
    <title>HAProxy - The Reliable, High Performance TCP/HTTP Load Balancer</title>

... no UDP mentioned there ...
AFAIK haproxy supports udp just for dgram syslog, no other udp is supported ...
And as portforwarding is working several layers below the URL, I am afraid you will be out of luck with this ...
Maybe nginx can help you here (but this is not my field of expertise ...)