Description |
This article describes how to configure a remote user IPsec VPN using IKEv2 with StrongSwan on a Linux system (Ubuntu 24.04). It also outlines the necessary steps to troubleshoot standard connectivity and traffic flow issues that may arise during the setup. |
Scope | FortiGate v7.4.x. |
Solution |
Here is a sample of a standard configuration on the FortiGate :
config vpn ipsec phase1-interface
Install StrongSwan:
sudo apt update
Configure the StrongSwan client (Linux)
Here is a sample of a standard configuration of the Linux IPsec client:
/etc/ipsec.conf config setup /etc/ipsec.secrets : PSK "YourPresharedKeyHere"
Diagnosis could be performed on both sides.
Linux side. Ensure the tunnel is up:
sudo ipsec statusall
Check routing:
ip route
Verify that traffic is routed over IPsec.
On FortiGate, ensure Phase 2 proxy IDs are installed:
diagnose vpn tunnel list name strongSwan
Expected:
proxyid_num=1
Use debug flow to confirm packet path:
diagnose debug reset
Then, a ping from the client:
ping 192.168.2.1
Expected: Allowed by Policy and return traffic via the VPN.
Diagnose missing routes or dropped responses on Linux: Use tcpdump to check if replies are arriving:
sudo tcpdump -i any icmp
Check Linux firewall (for example, ufw, iptables) is not dropping responses.
Conclusion. This article describes how to configure a remote user IPsec VPN tunnel using IKEv2 between a FortiGate firewall and a Linux client running StrongSwan. It covers both configuration steps and troubleshooting techniques to ensure successful connectivity and traffic flow. Ensure Phase 2 selectors are defined, NAT is disabled, routes are clean, IPsec policies are installed, and firewall policies allow traffic from the VPN to internal networks. |
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.