Slow IPSec Connection with EMS Agent (25 Seconds) - VPN only agent 6 Seconds
Hi!
The FortiClient IPsec connection takes too long when using the FortiClient EMS-managed client.
Clients that are not managed by EMS (VPN‑only client) take about 6 seconds to establish the IPsec connection.
Example log:
06:09:02.585 → VPN connection starts
06:09:02.834 → IKE_SA_INIT sent
06:09:02.851 → IKE_SA_INIT received (16ms)
06:09:02.914 → EAP-MSCHAPv2 started
06:09:02.936 → EAP-MSCHAPV2: Authentication succeeded (22ms!)
06:09:03.657 → negotiation success (~1s total IKE)
+4.29s GAP – NO IKE activity
06:09:07.947 → first ike_sa_alive checks
(only keepalives, no real traffic)
06:09:24.777 → Ready to read packets
06:09:24.787 → tunnel_name = dummy
The IKE negotiation itself takes ~1 second.
Technically, the tunnel is up at 06:09:03.657.
But FortiClient only reports the tunnel as "Ready" 21 seconds later — from 06:09:03 to 06:09:24.
Attempts so far:
set auth-on-demand always
set client-keep-alive enable
Created VIP and policy to allow traffic from public WAN to EMS port 8013.
EMS port 8013 is reachable from the outside.
Products:
- FortiClient EMS 7.4.5 build 2111
- FortiClient (Windows) 7.4.5
- FortiGate 7.4.11 (IPSec VPN, IKEv2, EAP)
With FortiClient VPN and a manually configured IPsec connection, the problem does not occur.
So it is definitely not related to tunnel settings (routes, split networks, etc.).
12:39:14.119 Last IKE INFORMATIONAL reply
↓ 9 Sec Pause
12:39:23.248 "Ready to read packets without fabric status checking"
iked explicitly waits for EPC fabric-status from FortiESNAC before completing tunnel setup. The wait is hardcoded (?) at ~18 seconds, after which iked proceeds anyway, logging:Timestamp Event
12:39:05.694 | [netmon:0x12c1] Quick stop disallowed - ip or interface change — VPN interface gets IP |
12:39:06–13 | [netmon:0x12c1] Quick stop disallowed - flag is false (1x per second, ~9s) |
12:39:14.694 | [netmon:0x12c1] Entering "calculating" state for up to 13 secs — cycle 1 timeout fires, triggers public-IP check |
12:39:14.858 | [netmon:0x12c2] Network change public ip update succeeded. code: 1 — public IP changed → cycle 2 spawns |
12:39:15.759 | [netmon:0x12c2] Quick stop disallowed - non-host route included — split-tunnel routes in routing table trigger another stability wait |
12:39:16–23 | [netmon:0x12c2] Quick stop disallowed - flag is false (1x per second, ~9s) |
12:39:23.248 | iked timeout fires — Ready to read packets without fabric status checking |
12:39:24.768 | [netmon:0x12c2] Network change public ip update succeeded. code: 0 — IP now stable, cycle 2 completes |
12:39:24.925 | {"onnet":true,"status":2,"status_msg":"ready"} — FortiESNAC finally reports ready |
endpoint-control settings is empty (default), no endpoint-check on firewall policiesAny ideas?
EDIT:
Fresh Client with FortiClient (Full), but without EMS Connected: 10 Seconds.
