VPN

IPsec VPN FortiGate: Setup, Configuration, and Troubleshooting

韩知予··10 min
IPsec VPN FortiGate: Setup, Configuration, and Troubleshooting

Learn how FortiGate IPsec VPNs work, how to configure them, and how to troubleshoot common connection issues.

An IPsec VPN on a FortiGate firewall creates an encrypted connection between networks or between a remote user and a protected network. To set one up, define the VPN peers and encryption settings, configure authentication, add the necessary routes and firewall policies, then test both tunnel status and traffic flow. Exact steps depend on whether you need a site-to-site tunnel or remote access, as well as your FortiOS version and network design.

NordVPN — fast, secure VPN

Editor's pick: NordVPN — fast, secure VPN — Strong encryption, a no-logs policy and apps for every device. 30-day money-back guarantee. Get NordVPN →

Compare common FortiGate IPsec VPN designs

DesignConnectsTypical useMain configuration focusTraffic scope
Site-to-siteTwo networksBranch office connectivityPeer settings and network subnetsSelected subnets
Hub-and-spokeBranches to a central siteCentralized access between locationsHub and spoke tunnelsRouted through hub
Remote accessIndividual users to a networkEmployee access while awayUser authentication and client settingsAssigned network resources
Route-basedNetworks through a virtual interfaceFlexible routing and policiesTunnel interface and routesControlled by routes
Policy-basedNetworks through matching policiesPolicy-defined tunnel trafficPhase 2 selectors and firewall policiesMatching traffic only
Dynamic peerA site with a changing addressConnections without a fixed peer IPPeer identification and authenticationSelected subnets

Compiled November 2026; check the provider's site for current details.

VPN prices compared
VPNObfuscationFrom / monthPlanFree planRefundAlipayWeChatUnionPayCryptoWebsite opens in ChinaTrustpilot
ZoogVPNTurn on manually
Shadow
$2.49/mo27 months: $59.99Yes7 days✓✓✓✓Official site blocked; our special link opens (4.4 s)4.2/5 (195 reviews)
NordVPNTurn on manually
Obfuscated Servers / NordWhisper
$3.49/mo27 months: $94.23No30 days?✗✓✓✗ Blocked4.2/5 (51,628 reviews)
ExpressVPN✓ On by default
all servers
$3.00/mo28 months: $84No30 days✗✗✓✗✗ Blocked4.4/5 (29,706 reviews)
Surfshark✓ On by default
Camouflage, with OpenVPN
See siteSee siteNo30 days✗✗✗✓✗ Blocked4.3/5 (31,823 reviews)
Proton VPNTurn on manually
Stealth, free plan too
$2.99/mo12 months: $35.88Yes30 days✗✗✗✓✗ Blocked2.1/5 (1,040 reviews)
Astrill VPNTurn on manually
StealthVPN / OpenWeb
$12.50/mo24 months: $300NoSee site✗✗✗✓✗ Blocked1.3/5 (110 reviews)
Private Internet AccessTurn on manually
Shadowsocks, OpenVPN only
$2.03/mo40 months: $81.2No30 days✗✗✗✗✗ Blocked4.2/5 (11,033 reviews)
CyberGhostTurn on manually
selected servers
$2.19/mo28 months: $61.32No45 days✗✗✗✓✗ Blocked4.0/5 (24,178 reviews)
PureVPNTurn on manually
switch to OpenVPN
$1.69/mo60 months: $101.55No31 days??✗✓✗ Blocked4.4/5 (17,994 reviews)
AdGuard VPN✓ On by default
TrustTunnel
$2.99/mo24 months: $71.76Yes30 days✓✗✓✓Official site blocked; our special link opens (3.7 s)4.3/5 (290 reviews)
MullvadTurn on manually
QUIC / Shadowsocks / LWO
$5.61/mo€5/moNo14 days✗✗✗✓✗ Blocked3.2/5 (192 reviews)
WindscribeTurn on manually
Stealth / WStunnel
$5.75/mo12 months: $69YesSee site✗✗✗✓✗ Blocked4.7/5 (13,355 reviews)
StrongVPNTurn on manually
Scramble, OpenVPN TCP
See siteSee siteNo30 days✓✗✗✗✗ Blocked4.4/5 (2,695 reviews)
LightXtreme 闪连Not listed$7.08/mo12 months: $84.99Yes30 days✓✓✓✓✓ Yes (3.5 s)No page

Prices checked 2026-11-10 on each vendor's pricing page (cheapest long plan, USD). Check the vendor's checkout for the final price.

Obfuscation checked 2026-11-14 on each vendor's site and help center: "on by default" = nothing to set; "turn on manually" = switch protocol or mode in settings; "not listed" = the vendor describes no obfuscation.

Payment methods checked 2026-11-10 on each vendor's payment pages: all 14 take cards and PayPal; ✗ = not listed, ? = the vendor's own pages disagree.

China access: whether the official website opens from mainland China networks (tests the website only, not the VPN connection). Last checked 2026-11-18 01:02 Beijing time.

Trustpilot score and review count checked 2026-11-10.

What a FortiGate IPsec VPN does

IPsec is a set of protocols that protects IP traffic across an untrusted network, such as the public internet. A FortiGate can use it to connect two offices, link a cloud network, or provide remote users with access to internal resources.

During setup, the peers negotiate security parameters and establish an encrypted tunnel. FortiGate commonly divides this process into two phases:

  • Phase 1 establishes a secure channel between the VPN peers. It includes peer authentication and settings such as encryption, integrity, and Diffie-Hellman groups.
  • Phase 2 defines how the data crossing the tunnel is protected, including the encryption proposal and the local and remote traffic selectors.

For route-based VPNs, FortiGate creates a virtual tunnel interface. You can then control traffic with routes and firewall policies, much like traffic passing through a physical interface.

IPsec VPN FortiGate: Setup, Configuration, and Troubleshooting: Checklist

Choose the right VPN design

A site-to-site VPN connects networks behind two gateways. A remote-access VPN connects an individual device to a network protected by FortiGate. Their configuration needs differ, so first identify the required users, networks, and traffic paths. Free VPN Where You Can Choose Country: What to Know

Design Typical use Main configuration considerations
Site-to-site Connecting offices or a cloud network Peer address, matching network selectors, routes, and policies on both gateways
Remote access Connecting staff devices to internal services User authentication, client compatibility, address assignment, and access policies
Route-based Flexible routing and policy control Tunnel interface, routing entries, and interface-based policies
Policy-based Matching specific traffic to a tunnel Policy selectors and VPN rules; availability and behavior depend on FortiOS and configuration

A route-based design is often a practical choice for new site-to-site deployments because it works well with static or dynamic routing and makes traffic policies easier to manage. However, a peer or existing configuration may require a different approach.

Compare core IPsec configuration choices

SettingPurposeWhat to compareMismatch impactCheck during setup
IKE versionEstablishes the negotiation methodBoth peers support the chosen versionTunnel negotiation failsPeer compatibility
AuthenticationConfirms peer identityPre-shared key or certificateAuthentication failsMatching credentials
Phase 1 proposalsProtects the IKE exchangeEncryption and integrity algorithmsPhase 1 failsMatching proposals
Diffie-Hellman groupCreates shared key materialSupported group on each peerNegotiation failsMatching group
Phase 1 lifetimeSets IKE security association durationPeer lifetime valuesRekey problems may occurCompatible values
Phase 2 selectorsDefines protected trafficLocal and remote subnetsTunnel may establish but traffic failsMirrored subnet definitions
Phase 2 proposalsProtects tunneled trafficEncryption and integrity algorithmsPhase 2 failsMatching proposals
Firewall policyPermits traffic through the tunnelInterfaces, addresses, and servicesTraffic is blockedPolicy direction and NAT

Compiled November 2026; check the provider's site for current details.

Configure a site-to-site tunnel

FortiGate’s VPN wizard can provide a starting point, but review the generated settings carefully. The examples below describe the configuration concepts, not universal values to copy. VPN on Linux: How to Choose, Install, and Connect

1. Confirm the network details

Before configuring either gateway, collect:

  • Each peer’s public IP address or hostname
  • The local and remote subnets that must communicate
  • The internet-facing interface on each FortiGate
  • Whether either site is behind NAT
  • The authentication method and shared secret, or certificate details
  • Compatible Phase 1 and Phase 2 proposals

Make sure the local subnet on one side matches the remote subnet on the other. Overlapping address ranges can prevent routing or cause ambiguous traffic selection.

2. Define Phase 1 and Phase 2

On the FortiGate, create an IPsec tunnel and configure the peer and authentication settings. Use a strong, unique pre-shared key or an appropriate certificate. Both peers must agree on the relevant negotiation parameters.

Check the following on both gateways: Intune Global Protect VPN Per App: Setup and Platform Differences

  • IKE version and negotiation mode
  • Encryption and integrity algorithms
  • Diffie-Hellman group and key lifetime
  • Phase 2 encryption and integrity proposals
  • Phase 2 traffic selectors or subnets
  • NAT traversal settings, when NAT is present

Prefer current, secure algorithms supported by both peers. Avoid weakening settings simply to make a connection work. Instead, identify the exact mismatch and choose a secure compatible configuration.

3. Add routes and firewall policies

A tunnel can show as established while user traffic still fails. For a route-based tunnel, add a route for the remote network through the IPsec interface, or configure an appropriate dynamic routing protocol. Then create firewall policies that permit the required traffic from the local network to the VPN interface and back.

Review each policy’s:

  • Incoming and outgoing interfaces
  • Source and destination addresses
  • Allowed services
  • NAT setting
  • Logging options

For many site-to-site configurations, NAT is disabled between the protected networks unless the design specifically requires address translation. Apply least privilege: allow only the networks and services users need. FortiClient VPN for Windows 11: Download, Install, and Connect

Verify the tunnel and traffic

After configuring both peers, check that Phase 1 and Phase 2 are established. FortiGate’s VPN monitor and IPsec status views can help confirm whether the tunnel is up. Then test traffic between hosts on the allowed subnets.

A useful verification sequence is:

  1. Confirm each FortiGate can reach the other peer over the internet.
  2. Check that Phase 1 is established.
  3. Check that the expected Phase 2 selectors are active.
  4. Confirm routes point to the tunnel for remote destinations.
  5. Review firewall policies and traffic logs.
  6. Test a permitted service from a host at each site.

A successful ping is not always a reliable test: ICMP may be blocked even when the application works. Test an actual required service, such as HTTPS, and check logs on both ends. Also confirm that the endpoint’s own firewall allows the test traffic.

IPsec VPN FortiGate: Setup, Configuration, and Troubleshooting: Key points

Troubleshoot common problems

If the tunnel does not come up, start with the negotiation settings rather than changing several options at once. Free Proton VPN: What You Get and How to Use It

  • Phase 1 fails: Check peer addresses, reachability, IKE version, authentication, and Phase 1 proposals. Verify that UDP 500 and, when NAT traversal is used, UDP 4500 are not blocked.
  • Phase 1 is up but Phase 2 fails: Compare encryption proposals, selectors, lifetimes, and subnet definitions on both sides.
  • Tunnel is up but traffic fails: Check routes, firewall policies, NAT, local host firewalls, and whether traffic matches the configured selectors.
  • Only one direction works: Review return routes and policies at both sites. Stateful inspection does not remove the need for a valid path back.
  • The tunnel drops intermittently: Investigate internet stability, peer timeouts, rekey settings, duplicate tunnels, and changes in public IP addresses.

FortiGate’s event logs and IPsec diagnostic tools can reveal negotiation errors. If using the command line, follow the troubleshooting commands documented for your FortiOS release, and collect diagnostic output during a failed negotiation. Avoid leaving verbose debugging enabled longer than necessary.

Troubleshoot symptoms by likely cause and check

SymptomLikely areaFirst checkFortiGate checkNext action
Tunnel does not establishPeer reachabilityPeer address and connectivityIKE negotiation statusConfirm peer settings
Phase 1 failsIKE configurationVersion and authenticationPhase 1 proposals and logsAlign peer parameters
Phase 2 failsIPsec configurationSelectors and proposalsPhase 2 statusMatch subnets and proposals
Tunnel is up, traffic failsRouting or policyRoutes and firewall policiesTraffic logs and countersPermit intended traffic
One-way trafficReturn pathRemote routes and policiesSession and policy logsCheck both traffic directions
Some applications failMTU or fragmentationPacket size and pathInterface and tunnel countersInvestigate fragmentation
Tunnel drops during rekeyLifetime or negotiationPeer rekey settingsVPN event logsCompare lifetime settings
Name-based access failsDNS configurationDNS server and resolutionDNS traffic policyCheck DNS reachability

Compiled November 2026; check the provider's site for current details.

Recommendation

For most new site-to-site deployments, use a route-based FortiGate IPsec VPN with carefully matched proposals, explicit routes, and narrowly scoped firewall policies. Document the peer settings and protected subnets, then test both tunnel negotiation and real application traffic. If the connection still fails, troubleshoot Phase 1, Phase 2, routing, and policies in that order rather than making broad security changes. Is Cato a VPN? How Cato Networks Securely Connects Users and Sites