Description | This article describes how to implement IPsec remote access (dial-up) using certificate and username/password authentication to control user access to the resources over the tunnel by assigning different user definitions on individual firewall policy with varying subnets accessible over the tunnel. This implementation uses IKEv1 and XAUTH. |
Scope | FortiGate. IPsec IKEv1. |
Solution |
When administrators are migrating from SSL VPN and would like to leverage the same benefits it offers wherein various user groups can be added under Authentication/Portal Mapping and the same user groups can be added under firewall policy to control access to internal resources, this method can achieve the same result. Note that this was tested on IKEv1 using a combination of X.509 and XAUTH.
config user local edit "User1" set type password next set type password next end
CLI:
config vpn ipsec phase1-interface edit <VPN-name> set xauthtype auto next end
Consider if split-tunneling should be enabled/disabled. If disabled, no other changes are needed for the access to internal subnets, but users would need additional firewall policies in order to access Internet resources while connected to VPN. If split-tunneling is enabled, ensure that all the subnets that are going to be accessible over the tunnel must be added in the 'Accessible Networks' after selecting 'Enable IPv4 Split Tunnel'. This will ensure that all routes will be installed on the end user machine.
Note that even though all clients that connect to this VPN will have routes to all applicable subnets, access will be controlled using firewall policies, based on the configured access for each user or user group.
Note the access granted for each user based on the above firewall policies:
Test for User 1.
This user (User1) is configured to have access to 10.38.10.0/24, not the subnet 10.40.8.0/24. Note that both routes will be available when checking the route print on the device.
Test the connectivity to both subnets. Ping to 10.40.8.0/24 fails while ping to 10.38.10.0/24 succeeds.
Disconnect User1 and connect using User2 credentials. User2 is configured to have access to the 10.40.8.0/24 subnet, not the 10.38.10.0/24.
Test ping connectivity on both subnets. Ping to 10.40.8.1 now works while ping to 10.38.10.1 fails.
On FortiGate, the CLI configuration with the combination of certificate authentication (X.509) and XAUTH will be as follows:
config vpn ipsec phase1-interface
IKEv2 configurations: In FortiGate v7.4.2 and later, similar functionality can be achieved using IKEv2, which supports additional features including SAML user authentication. See FortiGate v7.4.0 New Features Guide | IPsec IKEv2 VPN 2FA with EAP and certificate authentication
Related articles: Technical Tip: Procedure to add multiple user group in XAUTH in dial-up IPsec VPN configuration Technical Tip: How to configure dialup tunnel with LDAP integrated certificate authentication Technical Tip: Certificate authentication for IKEv2 VPN with RADIUS or LDAP user authentication |
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 2025 Fortinet, Inc. All Rights Reserved.