Created on
06-21-2025
12:50 PM
Edited on
06-23-2025
01:35 AM
By
Jean-Philippe_P
| Description | This article describes the scenario when NAT with IP pool is enabled before the IPsec tunnel for the source or local network subnets, failing due to not matching the phase2 selectors. |
| Scope | FortiGate, FortiVM. |
| Solution |
When the IPsec tunnel is initiated in FortiGate, and for the local network subnet or source, a floating NAT IP or an IP pool is being used, the NAT happens before the traffic enters the tunnel. In that case, the NAT IP address object or address group, or the range, should be the source selector for the phase2 configuration instead of the local subnet or network.
If the LAN address object is being set in the phase2 selector, the traffic will not match the correct phase2 selector and will be dropped. The debug flow will show the dropped packet report.
Here, if the local network host or server IP range is from 1.2.3.50 to 1.2.3.55 and the NAT pool range is from 192.168.10.60 to 192.168.10.70, which are doing masquerading for the LAN IPs, the IP pool configuration can be like below:
CLI:
config firewall ippool edit "IPOOL_for_VPN"
For the NAT IP range, an address range object has to be created.
config firewall address
Once the object is created, it has to be set in the source option in phase2 selector.
config vpn ipsec phase2-interface
Incoming and outgoing policies should have to have the address object 'POOL_ADDR_GROUP' in source and destination addresses. Once it has been set, the phase 2 selectors will find the appropriate match for the remote and local host and continue passing traffic after performing NAT for the local subnets or networks.
Related article: |
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.