1

I am configuring Squid with High Availability. I want the setup with below conditions

  1. Two squid proxy servers (siblings) with one IP address each
  2. Both the servers in active passive HA cluster with floating IP
  3. More than one floating IP assigned to cluster and used in round robin fashion as per requests coming in from clients
  4. Squid proxy forwarding requests to "Force Point" proxy server(master/parent proxy server).

I am able to achieve point numbers 1, 2 and 4 with Squid, corosync and pacemaker.

However, I am not able achieve point number 3, on how to add additional floating IP for the cluster. Any leads to achieve this?

Arun Krishnan
  • 339
  • 2
  • 3
  • 12

1 Answers1

0

You can perform it only if your cluster is on same VLAN. If it is you can do following steps to achieve point 3:

  1. Set up a DHCP server. There are many packages for that and configure it in a random behavior of giving IP in Round Robin Fashion. You can use DNSMASQ.

  2. Put all the cluster IPs on interface of each server.

  3. Add the iptables rule to route the traffic from the specifec ip received from DHCP and delete the old one.

Sample rule for iptables:

iptables -t nat -A POSTROUTING -m statistic -j SNAT --to-source DHCPIP

IP_received_from_DHCP # For ADDING