Troubleshooting Tip: VPN disconnection issue when using the same IP pool on different dial-up IPsec tunnels on FortiGate
| Description | This article describes the reason behind the user VPN disconnection issue when the same IP pool is enabled under different dial-up IPsec tunnels even when a different user groups is enabled per dial-up IPsec tunnel. |
| Scope | FortiGate. |
| Solution | As intended as part of FortiOS' design, the same IP pool cannot be used on multiple IPsec tunnels on FortiGate. If the same IP pool is configured on different dial-up IPsec tunnels, then only one VPN user will be able to connect to the VPN at the time, this means the first connected VPN user will be disconnected as soon as the second VPN user is connected to the VPN:
config vpn ipsec phase1-interface edit <tunnel A> set type dynamic set authusrgrp <group A> set ipv4-start-ip 10.180.1.1 set ipv4-end-ip 10.180.1.10 next edit <tunnel B> set type dynamic set authusrgrp <group B> set ipv4-start-ip 10.180.1.1 set ipv4-end-ip 10.180.1.10 next end
During the IKE notation, the IKE daemon will map the IPsec tunnel to the user based on enabled user group in phase1. Once the user is successfully authenticated, the first available IP from the IP pool will be assigned to the user. When a second user connects to the VPN and is successfully authenticated, the IKE daemon will try to assign the first IP from the IP pool of the tunnel to the second user by releasing the first IP from the first connected VPN user.
As a result, the first connected VPN user will be disconnected, and the second VPN user will connect to the VPN.
The following configuration example is one with two different user groups (local users and an LDAP group), and the debug output shows the first connected VPN user is disconnected from the VPN as soon as the second VPN user is connected to the VPN when the same IP pool is configured on both tunnels:
config user local
edit 1 set server-name "fortiserver.ldap" set group-name "CN=ldap.group,DC=fortiserver,DC=com" next edit "local.users" set member "tester" next end
config vpn ipsec phase1-interface edit "fct.1" set type dynamic set interface "port4" set mode aggressive set mode-cfg enable set proposal aes128-sha256 aes256-sha256 set xauthtype auto set authusrgrp "local.users" <----- set ipv4-start-ip 10.180.1.1 set ipv4-end-ip 10.180.1.10 set psksecret ENC ESywuF***** next edit "fct.2" set type dynamic set interface "port4" set mode aggressive set mode-cfg enable set proposal aes128-sha1 aes256-sha1 set xauthtype auto set authusrgrp "ldap.users" <----- set ipv4-start-ip 10.180.1.1 set ipv4-end-ip 10.180.1.10 set psksecret ENC nHAEM/GvwL7KP/dEu***** next
config vpn ipsec phase2-interface edit "fct.1" set phase1name "fct.1" set proposal aes128-sha256 set dhgrp 2 next edit "fct.2" set phase1name "fct.2" set proposal aes128-sha256 set dhgrp 5 next end
As seen in the IKE debug output, the first VPN user tester is connected to the VPN. The IKE daemon assigns the first IP 10.180.1.1 from the IP pool to the VPN user (local user):
2025-06-30 13:59:39.847399 ike V=root:0:fct.1:1720: add route 10.180.1.1/255.255.255.255 gw 10.180.1.1 oif fct.1(1364) metric 15 priority 1
diagnose vpn ike gateway list vd: root/0 id/spi: 1065 120a6649c20e9794/1c30a00c2ba187b8
And as soon as the second VPN user zilan (a LDAP user) is connected to the VPN, the first connected VPN user tester (a local user) is disconnected from the VPN since the IKE daemon release the first assigned IP 10.180.1.1 from the user tester and assigns the released IP 10.180.1.1 to the second conncted VPN user zilan:
2025-06-30 13:59:54.413386 ike V=root:0:fct.2_0:1066:fct.2:1727: add dynamic IPsec SA selectors 282 9C20E97941C30A00C2BA187B8081005 01E441B633000000500C000024D5617C3DDE8449AEF88C4694 22BD0873FC28666AF8032E9215C89232 4505BE1C00000010000000010304000114B059D8 9C20E97941C30A00C2BA187B808100 501E441B6330000005C9977BFF9F70F9DCD7082819D C20BC8316F3F612B0C02EA3D54F420F5A92B7A7DC224D1266B 1B87760A7F45F5EBD136A465F225AB 3918796BE38CF2D80C9E88C0 050182665BFC0000005C0C000024BEC713AF8080C6D4 11978A305D2D08FEA815B2A73D428CC6ED68D777BA7F738400 00001C0000000101100001120A664 9C20E97941C30A00C2BA187B8 C20E97941C30A00C2BA187B808100 50182665BFC0000006C916BBBFE1D142202387846F7 3B6364B1B8BDF65A20C152F3D5CA9CCFFE276E89B86F6C912B 0A192FC24F937E0B54EA2AF5F4B86F 2878E336B7471B916068CA3342671622AC0D7E3D2725975F95288805
diagnose vpn ike gateway list vd: root/0 id/spi: 1066 8a5abd1521b732e4/06fdab9ad00b7825 |
