Nginx Plugin - How to setup UDP LoadBalancer.

Started by vaibhavtawade144@gmail.co, August 27, 2020, 11:07:43 AM

Previous topic - Next topic
I have Installed Nginx plugin on OPNsense for UDP load balancing. I don't have any prior knowledge of this.

Consider I have 3 backend servers, UDP1, UDP2 and UDP3.
When I try this on nginx installed on any OS, the LoadBalancer will be accessible on IP of the host.

Please Guide me how to configure it on OPNsense.
Steps I have Followed,
1. First added UDP1, 2 and 3 in Upstream servers section.
2. Then Created Upstream with those 3 servers.
3. Created stream with that Upstream.

so what I need to do further?
On what IP this LoadBalancer will be accessible.

"When I try this on nginx installed on any OS, the LoadBalancer will be accessible on IP of the host"
"On what IP this LoadBalancer will be accessible"
yes. ip of the host (if fw rules allow)

Quote from: Fright on August 27, 2020, 12:15:31 PM
"When I try this on nginx installed on any OS, the LoadBalancer will be accessible on IP of the host"
"On what IP this LoadBalancer will be accessible"
yes. ip of the host (if fw rules allow)

How to do it with OPNsense, as it is plugin based, on what IP I will get the load balancer.

August 27, 2020, 02:06:30 PM #3 Last Edit: August 27, 2020, 03:28:08 PM by Fright
I didn't understand the question, to be honest.
You need to install nginx plugin.
Configurte streaming to your backend servers.
Open upd/tcp (what your application use) port on firewall (on opnsense) on interfaces\ip which you want to listen.
nginx listen on system interfaces. ie opnsense host interfaces\IPs

nginx always binds on 0.0.0.0 for IPv4 and :: for IPv6, which means that it is available on all interfaces the has unless a firewall rule (default = block) restricts that.