Add FortiToken multi-factor authentication
This configuration adds multi-factor authentication (MFA) to the FortiClient dialup VPN configuration (FortiClient as dialup client). It uses one of the two free mobile FortiTokens that is already installed on the FortiGate.
For large number of users, it is recommended to use FortiAuthenticator for user and identity management. Also consider FortiIdentity Cloud for mass deployments of mobile tokens.
FortiGates with FortiCare Premium or FortiCare Elite has 3 free seats to FortiIdentity Cloud. See FortiCloud Subscriptions for details.
To configure MFA using the GUI:
-
Edit the user:
-
Go to User & Authentication > User Definition and edit local user vpnuser1.
-
Enable Two-factor Authentication.
-
For Authentication Type, click FortiToken and select one mobile Token from the list.
-
Enter the user's Email Address.
-
Enable Send Activation Code and select Email.
-
Click OK.
-
-
Activate the mobile token.
When a FortiToken is added to user vpnuser1, an email is sent to the user's email address. Follow the instructions to install your FortiToken mobile application on your device and activate your token.
To configure MFA using the CLI:
-
Edit the user and user group:
config user local edit "vpnuser1" set type password set two-factor fortitoken set fortitoken <select mobile token for the option list> set email-to <user's email address> set passwd <user's password> next end -
Activate the mobile token.
When a FortiToken is added to user vpnuser1, an email is sent to the user's email address. Follow the instructions to install your FortiToken mobile application on your device and activate your token.
To verify the connection:
-
On the FortiClient, go to Remote Access and find the VPN tunnel to connect.
-
Click Connect.
-
When prompted, enter the username and password.
-
On the next screen, when prompted for your FortiToken code, locate the code on your FortiToken Mobile app and enter the code.
-
Click Connect.
-
Once connected, go to the FortiGate > Dashboard > Network Monitor > VPN.
The user will be shown in the Member column. There will not be any warning icon indicating the need for 2FA.
-
In the debug command
diagnose vpn ike gateway list, confirm that the2FAfield displaysYes:# diagnose vpn ike gateway list vd: root/0 name: remote_vpn_0 version: 2 interface: port3 5 addr: 203.0.113.249:4500 -> 198.51.100.2:49720 tun_id: 10.10.2.1/::10.0.0.5 remote_location: 0.0.0.0 network-id: 0 transport: UDP created: 443s ago eap-user: vpnuser1 2FA: yes peer-id: 198.51.100.2 peer-id-auth: no FortiClient UID: 9A016B5A6E914B42AD4168C066EB04CA assigned IPv4 address: 10.10.2.1/255.255.255.255