how toFortinet

FortiGate IPsec IKEv2 VPN with FortiToken MFA and local users

Jump to content ↓

Configure and verify a FortiGate dial-up IKEv2 VPN using local users, EAP-MSCHAPv2, FortiToken Mobile, and the free FortiClient VPN.

advancedrisk: highFreshFortiOS FortiOS 7.6.8FortiOS FortiClient VPN-only 7.4.3
Last verified 2026-10-30 · Next review 2027-01-30
FortinetFortiGatehow to
01Before you run this

Potentially disruptive. Use a maintenance window, confirm rollback steps and avoid running unreviewed in production.

02Applies to

FortiGate · FortiToken Mobile · FortiClient · FortiOS · Windows · FortiOS 7.6.8 · FortiClient VPN-only 7.4.3

When to use this content

Use this article as an operational reference when working with FortiGate.

Technical article

Tested outcome and scope

Lab tested: A FortiGate 40F running FortiOS 7.6.8 accepted an IKEv2 dial-up connection from a Windows FortiClient VPN-only installation, prompted for FortiToken Mobile, and ultimately established the VPN. The account was local to the FortiGate, not an Active Directory or LDAP account.

Not established by the lab: Connectivity to an internal test host, production policy behavior, LDAP/RADIUS interoperability, or universal compatibility with every FortiClient release. This guide documents the working local-user approach only.

Topology and prerequisites

  • FortiGate 40F with FortiOS 7.6.8.
  • Windows computer with FortiClient VPN-only; version 7.4.3 was used during the lab work.
  • FortiToken Mobile available and activated for a FortiGate local user.
  • An individual FortiGate user group containing that user.
  • A unique dial-up VPN client address pool that does not overlap with LANs.
  • If the FortiGate WAN is behind an ISP router, forward UDP/500 and UDP/4500 to its WAN address; confirm that the operator provides reachable public IPv4 (not unhandled CGNAT). UDP/1701 is not required for IKEv2.
  • Administrator access and a configuration backup, plus a separate management path in case VPN settings need rollback.

1. Create the user and FortiToken

In User & Authentication → User Definition, create a Local User with a strong password and enable Two-factor Authentication → FortiToken. Complete token activation on the approved phone. Create a FortiGate user group (example: VPN_IKEV2_MFA_LAB) and add this user.

Security: Do not publish enrollment QR codes, token serials, passwords, recovery codes, or activation email addresses.

2. Create the IPsec Phase 1 in the GUI

Navigate to VPN → IPsec Tunnels → Create New → Custom. Values used in this lab:

SettingValue
Tunnel nameVPN_IKEV2_MFA
Remote gatewayDialup user
InterfaceActual FortiGate WAN interface (in this lab: wan)
AuthenticationPre-shared Key (strong, unique)
IKEVersion 2
EAPEnable → EAP identity request
User groupSpecify → VPN_IKEV2_MFA_LAB
Mode configEnable
Assigned client addresses10.253.240.10–10.253.240.50, mask 255.255.255.0
NAT traversalEnable
Phase 1 proposalAES256 / SHA256
DH group14

The tunnel's underlying interface name has a 15-character limit in the tested interface. An attempt to create VPN_IKEV2_MFA_LAB failed with string value is too long ... limit is 15, causing subsequent set commands to fail with Unknown action 0. The shorter VPN_IKEV2_MFA was used instead. This is not a firmware or FortiToken failure.

Set split routing to only the intended internal test prefix. Do not route unrelated production traffic into a lab tunnel. Do not expose the FortiGate management GUI to arbitrary VPN users.

3. Configure Phase 2

Create a Phase 2 selector with:

SettingValue
EncapsulationTunnel Mode
Address selectorsLocal and remote 0.0.0.0/0 for initial dial-up negotiation
Encryption/authenticationAES256 / SHA256
Replay detectionEnable
PFSEnable; DH group 14
L2TPDisable
Lifetime43200 seconds (tested configuration)

Broad selectors are not access control. Restrict reachability using least-privilege firewall policies, mode-config split routing, and local-in controls for any management-plane access.

4. Configure FortiClient

Create an IPsec VPN profile in FortiClient:

  1. Remote Gateway = public IPv4 or DNS name of the ISP router / exposed FortiGate.
  2. Authentication = the exact PSK defined in Phase 1.
  3. IKE = Version 2.
  4. User authentication = Prompt on login.
  5. Phase 1 = AES256/SHA256, DH14; Phase 2 = AES256/SHA256, PFS DH14.
  6. Use the EAP-MSCHAPv2 client flow (the default eap_method=1 in the tested setup). Do not change to eap_method=2 merely because MFA is enabled; EAP-TTLS is a different method and was not used for this local-user lab.

Test from an external network (for example, a mobile hotspot), not only from the ISP router's internal network, to avoid NAT loopback confusion.

5. Validate MFA separately from tunnel access

The tested sequence was: enter the FortiGate local username and password → receive a FortiToken Mobile prompt → complete the token challenge → VPN connects.

A token prompt alone is not proof that MFA succeeded. Confirm the tunnel reaches an established state in the FortiClient and the FortiGate VPN events. Only then test approved data-plane or management-plane destinations.

To investigate a failure, start with Log & Report → Events → VPN Events. Use a short IKE debug when required:

bash
diagnose debug reset
diagnose debug console timestamp enable
diagnose debug application ike -1
diagnose debug enable

Make one test and stop promptly:

bash
diagnose debug disable
diagnose debug reset

Redact all secrets, public IP addresses tied to a private organization, usernames, token codes and device identifiers from exported evidence.

Common failure patterns

SymptomInvestigate
No IKE packetsPublic reachability, CGNAT, ISP NAT forward for UDP/500 and 4500
No EAP promptIKE negotiation, PSK, IKEv2 settings, group selection
FortiToken prompt appears but connection failsToken validation, auth logs, IKE completion, Phase 2 proposals/selectors
Unknown action 0 after editCheck preceding edit failure and 15-character tunnel-name limit
VPN connects but no host respondsRoute push, split tunnel, firewall policies, host firewall, local-in vs forwarded traffic

Security and operational notes

  • Bind a named group to the dial-up tunnel; do not accidentally authorize every local account.
  • Keep PSKs and FortiToken assignment under controlled administrative access.
  • Limit policies by source group, destination address and service; enable logs.
  • FortiGate local users and Active Directory users authenticated through LDAP or RADIUS are different architectures. This lab does not demonstrate AD-backed FortiToken.
  • Capture a backup and document rollback before applying to production.

Rollback

Disable the test tunnel or remove its dedicated policies, group and local user after validating they have no other dependencies. Retain administrative access outside the test VPN.

Technical path

Knowledge graph

Explicit editorial relationships across prerequisites, commands, troubleshooting, Labs and next steps.

Knowledge quality

Did this article help you solve the problem?

Each account can vote once per article. You can change your vote without increasing the total count.