Created on
03-17-2025
08:43 AM
Edited on
01-23-2026
12:43 AM
By
Jean-Philippe_P
| Description | This article describes a dial-up IPsec tunnel configuration using IKEv2 in which the user authenticates using a locally stored credential and 2FA using FortiToken Mobile. |
| Scope | FortiGate. |
| Solution |
Recommended versions: The default IKEv2 authentication method EAP-MSCHAPv2 supports FortiToken Mobile 2FA. The following recommended versions support FortiToken mobile push as well as manual OTP entry when connecting to IKEv2 dialup IPsec tunnels.
FortiOS: v7.4.8 and above. FortiClient:
For minimum EAP-MSCHAPv2 versions, as well as those supporting FortiToken for EAP-TTLS, see this article: Technical Tip: Required firmware/software versions for using FortiToken Mobile or OTP MFA with Forti....
Configuration:
From CLI:
config user local edit "Test" set type password set two-factor fortitoken set fortitoken "FTKMxxxx" set email-to "xxxx@example.com" set passwd <password> next end
config user group edit "VPN_Users" set member "Test" next end
config vpn ipsec phase1-interface set type dynamic next
Note: config vpn ipsec phase2-interface
config firewall policy
Note: In some cases, when two-factor authentication is used for a dial-up tunnel but users are intermittently unable to connect or have to try multiple times before connecting, extending the IPsec negotiation timeout beyond the default 30 seconds may be necessary. This adjustment can prevent connection failures if additional time is required to enter the one-time password (OTP). config vpn ipsec phase1-interface edit "Test-Dialup" set negotiate-timeout 50 <----- Enter an integer value from <1> to <300> <----- Default = <30>. next end
FortiClient iOS does not support using FortiToken when connecting to a dial-up VPN gateway, see Remote Access. As a workaround, include the token code in the password field while connecting.
The user will enter p@ssw0rd345678 when prompted for the password.
To verify the workaround, run the following commands:
diagnose debug reset
To stop the debugs, run the following command:
diagnose debug disable
Without the workaround:
[913] update_auth_token_session-Token is needed ike V=root:0:vpn_car:114 EAP 9199965560835 result FNBAM_NEED_TOKEN
With the workaround:
[880] update_auth_token_session-2fa code has already been verified in concatenated password
Related documents: Technical Tip: FortiOS IKEv2 Dialup VPN User and Multi-factor authentication resources Technical Tip: IKEv2 Dial-up IPsec tunnel with Radius and FortiToken MFA |
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 2026 Fortinet, Inc. All Rights Reserved.