Proxmox/Hyper-V/VMware

How to Setup forwarding on an HA Proxy

On a Proxmox Container, you can set up forwarding in the following ways. Here you can as well display it using the #vzlist command to list all HA proxy available.

  • Now use the command #vzctl enter  <proxy server number> to enter the container.
  • Now access the etc/haproxy/haproxy.cfg file by using the VIM editor or any other text editor.

Now copy the old HAproxy text (create a new one if you do not have an any previous command) and paste before the #router for the front end settings end edit the name to uniquely identify the CT created

Also, do this for the back end. Copy and paste before the default_backend librenms and ensure the name is changed to identify the shop created.

  • Scroll to the last part and Copy and paste the last three (3) lines.
    Here ensure to enter the IP address to the backend so it knows where it is redirected to and also the name should be changed here.
  • Now restart the HAproxy using this command #service haproxy reload.

I found the below article very useful when setting up and configuring an HA-Proxy using a Single Floating Address.
https://www.digitalocean.com/community/tutorials/an-introduction-to-haproxy-and-load-balancing-concepts
https://www.digitalocean.com/community/tutorials/how-to-create-a-high-availability-haproxy-setup-with-corosync-pacemaker-and-floating-ips-on-ubuntu-14-04
https://autoize.com/redundant-load-balancing-haproxy-keepalived/

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x