Description | This article describes how to set up an IPSec tunnel in an Active/Active HA Cluster for FortiGate-VM in Azure to prevent tunnel flapping and asymmetric routing |
Scope | FortiGate-VM Active/Active HA Cluster in Azure. |
Solution |
While an Active/Passive HA cluster is generally recommended for IPSec tunnels, users may require establishing an IPSec tunnel in an existing Active/Active HA cluster.
The following assumes an Active/Active HA cluster for FortiGate-VM is implemented based on the provided template, and the traffic flow is from on-premises to the Cloud environment. FortiGate Active-Active ELB-ILB - GitHub
Set up an IPsec tunnel between the FortiGate HA cluster in Azure and another [FortiGate] firewall.
For details on IPSec VPN setup and troubleshooting of a FortiGate Active/Passive HA cluster, refer to: IPSec VPN connectivity for FortiGate in Azure - GitHub FortiGate HA cluster ELB-ILB inbound-ipsec-configuration - GitHub
Using an Active/Active HA cluster with an IPSec tunnel, the end-to-end connection from an on-premises host to a protected VM in Azure may encounter the following issues:
To address these issues:
config vpn ipsec phase1-interface edit "to_On-prem" set fgsp-sync enable next end
If the FGSP session sync is not enabled on the FortiGate, enable the passive-mode too on the IPSec phase1-interface. Enabling passive mode ensures that the Azure FortiGate acts as a responder and does not initiate the IPsec tunnel. The on-premises device determines to which FortiGate (FGT-A or FGT-B) to send the IPSec traffic. If the responding FortiGate fails, the traffic automatically shifts to the other, re-establishing the tunnel.
config vpn ipsec phase1-interface edit "to_On-prem" set passive-mode enable next end
For detailed configuration, refer to: Configuring FGSP with an IPSec tunnel - Fortinet Community
This configuration ensures that traffic originating from a specific client IP always returns through the same FortiGate, maintaining symmetry in routing.
Note 1: Although the HA cluster is Active/Active, the IPsec tunnel with the FGSP configuration will operate in an Active/Passive manner, since the tunnel is established with only one FortiGate at a given time.
Note 2: If the traffic originates from the cloud environment to the on-premises network, connection issues may occur because only one IPsec tunnel is active, while both FortiGate-VMs may receive the forwarded traffic - but only one can route it through the tunnel. In that case, each FortiGate needs to establish an IPsec tunnel separately to the remote peer.
For more details, see the following GitHub document: GitHub - movinalot/fgt-in-azure-ipsec-troubleshoot.
Related documents:
|
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.