Migrating FortiGate SSL VPN to IPsec IKEv2 Dial-up
For years, SSL VPN was the default remote access on FortiGate: one portal, FortiClient, works through any hotel Wi-Fi. It was also the source of some of the worst Fortinet vulnerabilities of the last decade.
Fortinet has drawn the line. In FortiOS 7.6.3 SSL VPN tunnel mode was removed, and web mode lives on as “Agentless VPN”. On smaller models with 2 GB RAM, SSL VPN was dropped even earlier, in 7.6.0. If you upgrade a box with an SSL VPN tunnel config to those builds, that config is simply gone.
The replacement is IPsec IKEv2 dial-up with FortiClient. Here’s how I approach the migration.
Why SSL VPN had to go
A short and incomplete history:
- CVE-2018-13379 – path traversal leaking session files with plaintext credentials. Credential dumps from this were still circulating years later.
- CVE-2022-42475 – heap overflow in sslvpnd, pre-auth RCE, exploited in the wild.
- CVE-2024-21762 – out-of-bounds write in SSL VPN, pre-auth RCE, exploited in the wild.
- April 2025 – Fortinet disclosed that attackers had left a symlink behind on previously compromised devices, giving them read access to the filesystem even after patching.
The common denominator: a large, complex web service running pre-auth on the internet-facing interface. IPsec’s attack surface is smaller and much better understood.
Plan before you touch the config
1. Inventory
Per FortiGate, find out:
- how many users actually use SSL VPN (
Log & Report → VPN Events, last 90 days) - authentication: local users, LDAP, RADIUS, SAML/Entra ID, MFA (FortiToken?)
- split tunnel or full tunnel, which subnets
- web mode bookmarks – these need a different solution (Agentless VPN, ZTNA, or a jump host)
- FortiClient versions on the endpoints and whether you have EMS
2. Decide on the design
- IKEv2, not IKEv1 – fewer messages, built-in NAT-T, EAP for user authentication.
- EAP on top of PSK or certificates, so users authenticate individually against the same groups as before.
- IKE over TCP for users in restrictive networks (hotels, guest Wi-Fi) that block UDP 500/4500. This was SSL VPN’s main advantage – IPsec on FortiGate can now do it too.
- Same IP pool and same firewall policies as the SSL VPN, if possible. Fewer moving parts during cut-over.
3. Pilot, then cut over
Run both in parallel for a few weeks. IT first, then a pilot group, then everyone. Only then disable SSL VPN – and actually disable it, don’t just leave the portal without users.
The config
This is a template, not something to paste blindly. Names, subnets and groups are examples.
Phase 1
config vpn ipsec phase1-interface
edit "RA-IKEv2"
set type dynamic
set interface "wan1"
set ike-version 2
set peertype any
set net-device disable
set mode-cfg enable
set proposal aes256gcm-prfsha384 aes256-sha256
set dhgrp 20 19
set eap enable
set eap-identity send-request
set authusrgrp "VPN_USERS"
set ipv4-start-ip 10.212.134.10
set ipv4-end-ip 10.212.134.200
set ipv4-netmask 255.255.255.0
set dns-mode manual
set ipv4-dns-server1 10.0.10.10
set ipv4-split-include "VPN_SPLIT_NETS"
set save-password disable
set client-auto-negotiate enable
set client-keep-alive enable
set dpd on-idle
set psksecret <long-random-psk>
next
end
Key lines:
type dynamic– dial-up, peers have unknown IPs.mode-cfg enable– the FortiGate hands out IP, DNS and split-tunnel routes to the client.eap enable+authusrgrp– each user authenticates with their own credentials against the group (local, LDAP or RADIUS behind it).ipv4-split-include– an address group with the internal subnets. Remove it for full tunnel.
Phase 2
config vpn ipsec phase2-interface
edit "RA-IKEv2"
set phase1name "RA-IKEv2"
set proposal aes256gcm aes256-sha256
set dhgrp 20 19
next
end
Selectors stay at 0.0.0.0/0 – mode-config and the split-include handle what goes into the tunnel.
Firewall policy
config firewall policy
edit 0
set name "RA-VPN to LAN"
set srcintf "RA-IKEv2"
set dstintf "internal"
set srcaddr "RA_VPN_POOL"
set dstaddr "VPN_SPLIT_NETS"
set groups "VPN_USERS"
set service "ALL"
set schedule "always"
set action accept
set logtraffic all
next
end
Narrow dstaddr and service per group if different teams need different access – that’s the actual security win over a flat “VPN users can reach everything” policy.
IKE over TCP
The TCP port is set globally:
config system settings
set ike-tcp-port 443
end
Then enable TCP transport on the phase 1. The keyword options differ slightly between builds, so check what yours offers:
config vpn ipsec phase1-interface
edit "RA-IKEv2"
set transport ?
auto / fallback mode (try UDP, fall back to TCP) is the best user experience.
Port conflict: TCP 443 is also the default for admin HTTPS and often for SSL VPN. Move admin HTTPS to another port first (config system global → set admin-sport), and don’t run SSL VPN on the same port during the parallel phase.
FortiClient side
On the client, create a new IPsec VPN connection:
- Remote gateway: your FortiGate public IP / FQDN
- Authentication method: Pre-shared key (the PSK from phase 1)
- Authentication (XAuth): Prompt on login – with IKEv2 this is EAP
- Advanced → IKE version 2, and match the proposals and DH groups
- If you use IKE over TCP: set the transport / port accordingly
With EMS, push this as a profile. Without EMS, export the config from a working client and distribute it – it’s much less error-prone than users typing proposals.
Don’t forget the hardening
Moving to IPsec reduces the attack surface but doesn’t remove it. Things I add during the migration:
- Local-in policy with GeoIP for UDP 500/4500 and the IKE TCP port, plus explicit deny for everyone else
- MFA – FortiToken on the user, or RADIUS/SAML with MFA behind it
- Disable SSL VPN completely once the migration is done:
config vpn ssl settings
set status disable
end
Also remove the SSL VPN portals, policies and the local-in rule for the old port. Leftovers are how a “disabled” feature ends up exposed again after a config restore.
Troubleshooting
When a client can’t connect, the IKE debug tells you why:
diagnose debug reset
diagnose vpn ike log filter rem-addr4 <client-public-ip>
diagnose debug application ike -1
diagnose debug enable
Typical messages are no proposal chosen (proposal mismatch between FortiClient and phase 1), EAP authentication failures (wrong group or user not in the group), and timeouts (UDP blocked → that’s what IKE over TCP is for). See my debug flow cheat sheet for the rest of the toolkit.
Summary
SSL VPN on FortiGate is on its way out whether you migrate or not. Doing it on your schedule – inventory, parallel run, pilot, cut-over, cleanup – is a lot more pleasant than discovering after an upgrade that your remote access config disappeared.