Skip to main content
meslami
Staff
Staff
March 27, 2026

Technical Tip: Configuring dial-up IPsec VPN using signature, and EAP, and OTP for authentication

  • March 27, 2026
  • 0 replies
  • 924 views
Description This article describes dial-up IPsec configuration using multi-factor authentication that includes certificate, username/password as well as OTP authentication methods.
Scope

This scenario depicts configuring

FortiGate as VPN Server for terminating dial-up IPsec.

FortiAuthenticator acting as Radius server, CA Server as well as providing FortiToken.

FortiToken Mobile and FortiClient on a Windows 11 Client machine.

Note: Microsoft Active Directory will be used as LDAP Server.


The topology is shown in the diagram below.

 

meslami_0-1774606954352.png

 

Hostnames:

  • FGT80E-2 (root vdom): FortiGate VPN gateway.
  • FAC: FortiAuthenticator (RADIUS server, OTP).
  • WIN4: Windows PC (FortiClient, FortiToken Mobile).
  • LDAP: Windows Server (Active Directory).

 

Configuration steps:

  • Configuring Certificates on the FortiAuthenticator.
  • Generating and exporting CA Certificate .
  • Generating and exporting user certificate for the FortiGate.
  • Generating and exporting user certificate for the end user.
  • Import CA and User certificates on FortiGate.
  • Import CA and User certificates on the Client machine.
  • Configuring Authentication Services on the FortiAuthenticator .
  • Configuring the FortiGate for the dial-up VPN.
  • Configuring dial-up IPsec VPN on the FortiClient.
  • Verification.
Solution

Configuring Certificates on the FortiAuthenticator:

 

Generating and exporting a CA Certificate:

In this step, a local CA will be created on the FortiAuthenticator to be used to generate and sign digital certificate for the VPN gateway (the FortiGate) and the end user in the next steps.

 

Certificate Management -> Certificate Authorities -> Local CAs.

 

meslami_1-1774607014112.png

 

meslami_2-1774607014113.png

 

meslami_3-1774607014115.png

 

For the CN of the root CA, use the FQDN of the FortiAuthenticator found in System -> Dashboard -> Status; under the System Information widget, Device FQDN. In this example, its IP address is used as the Device FQDN.

 

meslami_4-1774607014117.png

 

Then export the root CA certificate to import it into FortiGate and the Windows client. For this, select the CA just created, and then select the 'Export Certificate' as shown below:

 

meslami_5-1774607014118.png

 

The certificate will be downloaded with a '.crt' extension:

 

meslami_6-1774607014118.png

 

Generating and exporting the user certificate for the FortiGate:

 

Generate and sign a certificate for the FortiGate following the steps below:

 

Navigate to Certificate Management -> End Entities -> Users -> Create New.

 

meslami_7-1774607014121.png

 

meslami_8-1774607014123.png

 

meslami_9-1774607014125.png

 

Then select and export the certificate which will be imported on the FortiGate:

Certificate Management -> End Entities -> Users -> Select the certificate generated for the FortiGate, and then select the ‘Export Key and Cert’:

 

meslami_10-1774607014126.png

 

Enter a passphrase to protect the certificate file and select the Save button:

 

meslami_11-1774607014127.png

 

Next, download the PKCS#12 file to import it on the FortiGate in the next step:

 

meslami_12-1774607014127.png

 

meslami_13-1774607014127.png

 

Generating and exporting a user certificate for the end user:

 

Following similar steps, generate and sign a certificate for the end userunder Certificate Management -> End Entities -> Users -> Create New.

 

meslami_14-1774607014130.png

 

Note: In the ‘Subject Alternative Name field, enter the username in the ‘User Principal Name’ format the same as Active Directory. Select the user certificate and select the ‘Export Key and Cert’ to download the PKCS#12 file:

 

meslami_15-1774607014131.png

 

meslami_16-1774607014132.png

 

Enter a passphrase and select the Save button, then download the PKCS#12 file and select Finish:

 

meslami_17-1774607014132.png

 

meslami_18-1774607014132.png

 

Import CA and User certificates on FortiGate:

Next, import the CA certificate on the FortiGate:

System -> Certificates -> Create/Import -> CA Certificate.

 

meslami_19-1774607014133.png

 

On the Import page, select File and browse and upload the 10.26.51.18.cer file:

 

meslami_20-1774607014133.png

 

It will be imported as shown below:

 

meslami_21-1774607014138.png

 

Next, import the user certificate generated for the FortiGate: System -> Certificates -> Create/Import -> Certificate.

 

meslami_22-1774607014141.png

 

After, select the Import Certificate button:

 

meslami_23-1774607014143.png

 

On the 'Import' page select the 'PKCS#12 Certificate', locate the file downloaded in previous step (fgt80ipsec.p12), enter the passphrase, and select Create:

 

meslami_24-1774607014143.png

 

Verify the certificate under the System -> Certificates page:

 

meslami_25-1774607014148.png

 

Import CA and user certificates on the user machine:

 

To import and install the certificates on the Client machine, copy the certificate files on the PC:

 

meslami_26-1774607014154.png

 

First, install the CA certificate by double Selecting on the file and then select 'Install Certificate…':

 

meslami_27-1774607014155.png

 

meslami_28-1774607014157.png

 

Select the Trusted Root Certificate Authorities as the Certificate Store:

 

meslami_29-1774607014160.png

 

Select Finish:

 

meslami_30-1774607014161.png

 

To install User Certificate, double-click the file:

 

meslami_31-1774607014163.png

 

meslami_32-1774607014170.png

 

Enter the passphrase entered when exporting the certificate:

 

meslami_33-1774607014173.png

 

Select 'Personal' as the Certificate Store:

 

meslami_34-1774607014175.png

 

Then select Finish.

Configuring Authentication Services on the FortiAuthenticator:

First make sure that RADIUS services are enabled under the Network -> Interfaces -> Access Rights -> Services:

 

meslami_35-1774607014182.png

 

Define the FortiGate as a RADIUS client:

Authentication -> RADIUS Service -> Clients:

 

meslami_36-1774607014182.png

 

meslami_37-1774607014185.png

 

Enter a name for the Client, IP address, and RADIUS secret, then select Save:

 

meslami_38-1774607014186.png

 

Create an LDAP server as the remote authentication serverunder Authentication -> Remote Auth. Servers -> Create New.

 

meslami_39-1774607014187.png

 

Fill in the form as shown in the picture below:

 

meslami_40-1774607014191.png

 

Note: Enabling 'Windows Active Directory Domain Authentication' will join the FortiAuthenticator to the domain. Select Save.

 

meslami_41-1774607014192.png

 

Create a realm for the LDAP user authentication: Authentication -> User Management -> Realm -> Create New.

 

meslami_42-1774607014193.png

 

Enter a name, select the LDAP that was created in the previous step, and select Save.

 

meslami_43-1774607014194.png

 

meslami_44-1774607014195.png

 

Create a policy for the RADIUS service: Authentication -> RADIUS service -> Policies:

 

meslami_45-1774607014196.png

 

Enter a name for the policy, select the RADIUS client, and select Next:

 

meslami_46-1774607014197.png

 

Default settings are on the next page, select Next:

 

meslami_47-1774607014197.png

 

Select 'Password/OTP authentication', enable Accept EAP and WAP-MSCHAPv2, and select Next:

 

meslami_48-1774607014198.png

 

Select and enable the settings as shown below and select Next.

 

Note: In the Realm column, select the Realm that was created in the previous step:

 

meslami_49-1774607014200.png

 

Select Next.

 

meslami_50-1774607014201.png

 

Select Next.

Select Update and Exit:

 

meslami_51-1774607014202.png

 

Configuring FortiToken on the FortiAuthenticator:

Check the links below for details on how to activate license and assign FortiToken Mobile to users:

 

meslami_52-1774607014202.png

 

After the activation code is entered and the settings are saved, verify the new Token like below:

 

meslami_53-1774607014204.png

 

Follow the steps below to Import or Sync remote users on the LDAP server:

 

Go to Authentication -> User Management -> Remote Users.

 

meslami_54-1774607014204.png

 

Select Import:

 

meslami_55-1774607014205.png

 

Select the remote LDAP server created before and select Import.

 

meslami_56-1774607014205.png

 

Verify the users created on the LDAP:

 

meslami_57-1774607014207.png

 

When creating the LDAP server, the 'Internal Users' group as the Base distinguished name for this example, so all the users under this group now imported to the FortiAuthenticator 'Remote Users':

 

meslami_58-1774607014208.png

 

Note: To automatically sync with the LDAP and update the Users, create a 'Remote User Sync Rule' as follows:

Authentication -> User Management -> Remote User Sync Rules.

 

meslami_59-1774607014208.png

 

Select LDAP and Create New:

 

meslami_60-1774607014210.png

 

Select 'Test Filter', and test the LDAP connection and the Base DN:

 

meslami_61-1774607014210.png

 

Note: For the FortiToken to work properly, the FortiToken Mobile on the Client machine should be able to reach the FortiAuthenticator Public IP/FQDN. Verify and check the setting under the System -> Administrtion -> System Access:

 

meslami_62-1774607014210.png

 

meslami_63-1774607014212.png

 

Configuring the FortiGate for the dial-up VPN.

 

config system interface

    edit ‘lan’

        set vdom ‘root’

        set ip 10.26.2.108 255.255.192.0

        set allowaccess ping https ssh snmp http telnet fgfm

        set type hard-switch

        set stp enable

        set role lan

        set snmp-index 21

    next

       edit ‘LDAPCert’

        set vdom ‘root’

        set type tunnel

        set snmp-index 31

        set interface ‘wan1’

    end

config user group

    edit ‘LDAPCertUsers’

        set member ‘ldapcertuser’

    next

    edit ‘RADGroup’

        set member ‘FACRAD’

    next

config user peergrp

    edit ‘grp-ldap-cert’

        set member ‘ldapcertuser’

    next

end

config user radius

    edit ‘FACRAD’

        set server ‘10.26.21.58’

        set secret ENC …

    next

end

config vpn ipsec phase1-interface

    edit ‘LDAPCert’

        set type dynamic

        set interface ‘wan1’

        set ike-version 2

        set authmethod signature

        set peertype peergrp

        set net-device disable

        set mode-cfg enable

        set proposal aes128-sha256 aes256-sha256 aes128gcm-prfsha256 aes256gcm-prfsha384 chacha20poly1305-prfsha256

        set negotiate-timeout 60

        set dpd on-idle

        set eap enable

        set eap-identity send-request

        set eap-cert-auth enable

        set wizard-type dialup-forticlient

        set authusrgrp ‘RADGroup’

        set certificate ‘fgt80ipsec’

        set peergrp ‘grp-ldap-cert’

        set ipv4-start-ip 10.113.113.2

        set ipv4-end-ip 10.113.113.10

        set dns-mode auto

        set ipv4-split-include ‘CertVPN_split’

        set dpd-retryinterval 60

    next

    end

config vpn ipsec phase2-interface

    edit ‘LDAPCert’

        set phase1name ‘LDAPCert’

        set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm aes256gcm chacha20poly1305

    next

end

config firewall address

    edit ‘CertVPN_range’

        set uuid cdd241ce-f2d3-51f0-8668-be078baaf409

        set type iprange

        set comment ‘VPN: CertVPN (Created by VPN wizard)’

        set start-ip 10.113.113.2

        set end-ip 10.113.113.10

    next

end

config firewall policy

    edit 5

        set name ‘VPN-Policy’

        set uuid 1f21830a-05bc-51f1-4462-e7b263635815

        set srcintf ‘LDAPCert’

        set dstintf ‘lan’

        set action accept

        set srcaddr ‘CertVPN_range’

        set dstaddr ‘LAB1’

        set schedule ‘always’

        set service ‘ALL’

        set logtraffic all

        set nat enable

    next

 

Configuring dial-up IPsec VPN on the FortiClient.

 

meslami_64-1774607014213.png

 

meslami_65-1774607014213.png

 

meslami_66-1774607014214.png

 

meslami_67-1774607014215.png

 

Verification:

Select Connect on the FortiClient VPN Connection:

 

meslami_68-1774607014215.png

 

Enter user credentials:

 

meslami_69-1774607014216.png

 

Enter the token code:

 

meslami_70-1774607014217.png

 

meslami_71-1774607014217.png

 

On the FortiGate:

 

FGT80E-2 (root) # get vpn ipsec tunnel summary

'LDAPCert_0' 10.5.149.167:57661  selectors(total,up): 1/1  rx(pkt,err): 1/0  tx(pkt,err): 0/0 

FGT80E-2 (root) # diagnose vpn tunnel list name LDAPCert

list ipsec tunnel by names in vd 0

------------------------------------------------------

name=LDAPCert ver=2 serial=1 10.5.130.108:0->0.0.0.0:0 nexthop= tun_id=10.0.0.1 tun_id6=::10.0.0.1 status=up dst_mtu=0 weight=1

bound_if=5 real_if=0 lgwy=static/1 tun=intf mode=dialup/2 encap=none/552 options[0228]=npu frag-rfc  role=primary accept_traffic=1 overlay_id=0

 

proxyid_num=0 child_num=1 refcnt=4 ilast=4563207 olast=4563207 ad=/0

stat: rxp=44067 txp=11 rxb=3294040 txb=952

dpd: mode=on-idle on=-1 status=ok idle=60000ms retry=3 count=0 seqno=0

natt: mode=none draft=0 interval=0 remote_port=0

fec: egress=0 ingress=0 

 

To find more details regarding dial-up VPN, see the following: