Set up Active/Passive HA on Alibaba Cloud
Focus
Focus
VM-Series

Set up Active/Passive HA on Alibaba Cloud

Table of Contents

Set up Active/Passive HA on Alibaba Cloud

Configure your active/passive HA deployments using HAVIP.
Where Can I Use This?What Do I Need?
  • Alibaba Cloud International Regions subscription
  • Alibaba Cloud Mainland China subscription
  • VM-Series License (BYOL)
  • VM-Series plugin
  • Panorama
The VM-Series firewall on Alibaba Cloud now supports active/passive HA deployments using a new feature of Alibaba cloud called HAVIP.
The HAVIP listens to the ARP/GARP messages sent by the VM-Series firewalls to determine which network interfaces belong to the active VM-Series firewall, and then forward traffic to those interfaces.
The HAVIP deployment architecture consists of two HAVIP interfaces and two VM-Series firewalls that are configured in active/standby HA mode.
One of the HAVIPs is configured with a public IP address (external HAVIP). The Untrust interface of each VM-Series firewall is bound to this external HAVIP. The other HAVIP (internal HAVIP) does not have an attached public IP address. The Trust interface of each VM-Series firewall is bound to the internal HAVIP.
In this example, the External HAVIP is in the same subnet as the Untrust interfaces, while the Internal HAVIP is in the same subnet as the Trust interfaces.
  • The HAVIP address must be in the same subnet as the network interfaces that are bound to it.
  • Subnets in Alibaba Cloud can't span multiple zones, so this solution will only work if both VM-Series firewalls are in the same availability zone.

Create HAVIP

  1. Click VPCHAVIPCreate HAVIP on your Alibaba Cloud console.
  2. Choose the VPC and vSwitch.
  3. Provide a private IP address for the HAVIP and click OK.

Bind an Elastic IP(EIP) Address

  1. Click the HAVIP you created to enter its configuration.
  2. Create an Elastic IP Address (EIP) and click Bind, to bind the EIP to the HAVIP.

Bind an ECS Instance

To bind with an instance, use the primary network interface of the instance. For VM-Series firewalls, the primary network interface is the management interface.
To bind the Untrust interfaces of the VM-Series firewalls to the HAVIP:
  1. Click the Bind button under ECS Instances.
  2. Choose ENI as the resource type, and then choose the Instance and ENI to bind to the HAVIP.
  3. Repeat the same procedure for the other Untrust interface.
    Once the EIP and both Untrust interfaces are bound to the HAVIP, you may find them in the HAVIP configuration page.
  4. Repeat the same procedure to create the Internal HAVIP. For the Internal HAVIP, there is no need to bind any EIP to it. The configuration for the Internal HAVIP should be similar to the image below:

Configure Route Table

Traffic from the servers should be routed to the Internal HAVIP. To achieve this, a static route is configured in the route table associated with the server subnet.
Click VPCRoute Tables.
After creating the route table, add a custom route entry to point the default route to the Internal HAVIP, and associate this route table with the server vSwitch.

Configure the VM-Series Firewall

The VM-Series firewalls are configured in active/passive HA mode with configuration sync enabled.
  1. Configure the Untrust and Trust interfaces with static IPs. The Untrust interface is configured with the private IP address of the External HAVIP, while the Trust interface is configured with the private IP address of the Internal HAVIP. As configuration sync is enabled, when a failover occurs, the newly active VM-Series firewall will use the same set of IP addresses for its Untrust and Trust interfaces.
  2. Ensure that the route table in the VM-Series firewall includes the default route via the Untrust interface, and a route to the server subnet via the Trust interface.
  3. Configure the NAT rules for Inbound and Outbound traffic.
    For Inbound traffic, the NAT rule must have a destination address match on the private IP address of the External HAVIP. This destination address is translated to the web server address by the NAT rule.
    For Outbound traffic, the SNAT rule will match the source addresses of the servers. The source address will then be SNAT to the private IP address of the External HAVIP. The External HAVIP in turn SNATs the traffic to the public IP address of the External HAVIP.

Test the Traffic

Testing Inbound Traffic
The web server is accessed via the public IP address of the External HAVIP. In the following diagrams, observe that the client can successfully access the web server, as well as the public IP address of the client.
Testing Outbound Traffic
Accessing the internet from the server, the source IP address used is detected to be that of the External HAVIP.

Failover Testing

Start a ping test on the server. The active VM-Series firewall gets suspended and the passive VM-Series firewall will then become active. From the ping test, there could be around 11 ping drops before the traffic resumes. So, the failover time is around 11 seconds.
Two VM-Series firewalls can be deployed on Alibaba Cloud in active/passive HA mode with Alibaba Cloud HAVIP to provide high availability. This provides session and configuration sync between the two VM-Series firewalls. However, this only works in a single availability zone.
If an increase in capacity is required, the VM-Series firewalls need to be scaled-up, for example VM-300 → VM-500.

Virtual CPU (vCPU) Instance Types

The VM-Series firewalls used in the testing have four network interfaces: Management, Untrust, Trust, and HA2. On most Alibaba Cloud instance types, the four vCPU instance types provide three network interfaces. The eight vCPU instance types and above provide four or more network interfaces.
If four vCPU instance types need to be used, the VM-Series firewalls need to be deployed in one-arm mode as there can only be three network interfaces attached to each firewall. Inbound and outbound traffic will traverse the same data interface.