China Route Planner
FortiGate IPsec: Setup, Configuration, and Troubleshooting
VPN

FortiGate IPsec: Setup, Configuration, and Troubleshooting

Learn how FortiGate IPsec VPNs work, how to configure a tunnel, and how to resolve common connection issues.

Theo Bernard
· 8 min read

FortiGate IPsec is Fortinet’s implementation of IPsec VPN technology on FortiGate firewalls. It encrypts traffic across untrusted networks, typically connecting two office networks or giving remote users secure access to company resources. A working VPN requires compatible settings on both peers, correct routing and firewall policies, and a way to verify that traffic is passing through the tunnel.

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 types

VPN typeTypical useEndpointsMain setup choiceBest fit
Site-to-siteConnect office networksFortiGate appliances or compatible peersPeer details and routed subnetsBranch connectivity
Remote accessConnect individual usersFortiGate and user devicesClient authentication and access policyMobile or home users
Route-basedCarry traffic through tunnel interfacesIPsec peersTunnel interfaces and routingFlexible routing and policies
Policy-basedMatch traffic with tunnel policiesIPsec peersSelectors and firewall policiesSimpler, narrowly scoped tunnels
IKEv1Negotiate IPsec security associationsCompatible peersIKE version and proposal compatibilityLegacy interoperability
IKEv2Negotiate IPsec security associationsCompatible peersIKE version and proposal compatibilitySupported modern deployments

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

What FortiGate IPsec Does

IPsec protects IP traffic by authenticating the VPN peers and encrypting data between them. On FortiGate, an IPsec VPN can be configured as a site-to-site tunnel between gateways or as a remote-access VPN for individual users.

An IPsec tunnel has two negotiation stages:

  • Phase 1 (IKE): Establishes a secure control channel between the peers. It covers authentication, encryption, integrity, and key-exchange settings.
  • Phase 2 (IPsec): Defines which traffic is protected and establishes the security associations used to encrypt that traffic.

Both sides need compatible proposals, authentication methods, and network definitions. They do not always need identical labels or interface names, but their effective settings must match.

FortiGate IPsec: Setup, Configuration, and Troubleshooting: Checklist

Common FortiGate IPsec VPN Types

VPN type Typical use Main configuration considerations
Site-to-site Connecting two offices or networks Peer addresses, local and remote subnets, routing, and firewall policies
Remote access Connecting users to a company network User authentication, client configuration, address assignment, and access controls
Route-based Sending selected traffic through a virtual tunnel interface Tunnel interface, routes, policies, and possibly dynamic routing
Policy-based Defining protected traffic through policies or selectors Traffic selectors and policy matching

Route-based VPNs are commonly used on FortiGate because they work naturally with routing and firewall policies. The right design depends on the FortiOS version, the peer device, and the network requirements. FortiGate L2TP: Setup, Security, and Alternatives

How to Configure a Basic Site-to-Site Tunnel

Before configuring either firewall, record the public IP addresses, internal subnets, and required security settings for both sites. Confirm that each site uses non-overlapping LAN address ranges. Overlapping subnets can make routing ambiguous and may require redesign or address translation.

1. Configure Phase 1

In the FortiGate VPN settings, create a new IPsec tunnel and specify the remote gateway. Set the authentication method, such as a pre-shared key or certificates, and select compatible IKE and cryptographic options.

Review these Phase 1 settings on both peers:

  • IKE version
  • Authentication method and credentials
  • Encryption and integrity algorithms
  • Diffie-Hellman group
  • Key lifetime
  • NAT traversal, if a peer is behind NAT

Use current, secure algorithms supported by both devices. Avoid outdated options where possible, and follow your organization’s security policy. FortiGate VPN Client: Setup, Configuration, and Troubleshooting

2. Configure Phase 2

Define the local and remote traffic selectors, often called local and remote subnets. Choose compatible encryption, integrity, and key lifetime settings.

For example, if one office uses 10.10.0.0/16 and the other uses 10.20.0.0/16, each side must describe those networks from its own perspective: the local subnet on one peer is the remote subnet on the other.

3. Add Routing and Firewall Policies

A negotiated tunnel does not automatically mean that users can communicate through it. Add routes directing the remote network to the IPsec tunnel, unless the design uses an appropriate dynamic-routing setup. Then create firewall policies permitting only the required traffic between the relevant interfaces and networks.

Check that: Best Free VPN Where You Can Choose Location: What to Look For

  • The policy uses the correct incoming and outgoing interfaces.
  • Source and destination address objects match the intended subnets.
  • Services are limited to what the business requires.
  • NAT is disabled for ordinary site-to-site traffic unless address translation is intentionally part of the design.

4. Test Traffic

Generate traffic between permitted devices on each side. Check the tunnel status and confirm that traffic counters increase. Testing only from a FortiGate itself may not follow the same path as traffic from a LAN client, so test with real endpoints as well.

Compare common FortiGate IPsec troubleshooting checks

SymptomCheck firstUseful evidenceLikely areaNext step
Tunnel will not establishPeer address and reachabilityIKE status and logsConnectivity or peer settingsConfirm addressing and peer configuration
Phase 1 failsIKE version and proposalsIKE negotiation logsAuthentication or proposal mismatchCompare settings on both peers
Phase 2 failsSelectors and IPsec proposalsPhase 2 status and logsSubnet or proposal mismatchAlign selectors and encryption settings
Tunnel is up, traffic failsRoutes and firewall policiesRouting table and policy hitsRouting or access controlVerify routes and permit policies
One subnet cannot communicateLocal and remote selectorsTunnel counters and traffic logsSelectors or subnet routesCheck both peers’ subnet definitions
Intermittent tunnelLink stability and rekey settingsEvent logs and tunnel statusNetwork changes or rekeyingReview logs and peer stability

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

Troubleshooting FortiGate IPsec

Start by identifying whether the issue is with negotiation, routing, policy, or the endpoint. A tunnel shown as “up” confirms that security associations exist, but it does not prove that the intended traffic can pass. Free VPN Choose Location: How to Pick a Server Safely

Tunnel Will Not Establish

Check the peer’s public IP address and confirm that the required connectivity is available. If a device is behind NAT, verify NAT traversal and any upstream firewall rules. Compare Phase 1 settings, then Phase 2 proposals and traffic selectors. A mismatch in one parameter can prevent negotiation.

For a controlled diagnostic session, FortiGate’s CLI can help show IKE activity. Common commands include:

diagnose vpn ike gateway list
diagnose vpn tunnel list

Debug commands can produce substantial output. Use them carefully, filter where supported, and disable debugging after collecting the needed information. Syntax and available options can vary by FortiOS release.

Tunnel Is Up, but Traffic Fails

Check the routes on both FortiGates and verify that firewall policies allow the traffic in each required direction. Confirm that the endpoints use the expected default gateways and that host firewalls are not blocking the connection. OVPN Explained: What It Is and How to Use It

Also inspect the Phase 2 selectors. If they exclude the source and destination addresses being tested, the traffic may not match the tunnel. Review policy hit counts and VPN byte counters to see whether packets are reaching the expected rules and tunnel.

Intermittent or Unstable Connections

Look for changing public IP addresses, unstable internet connectivity, mismatched lifetimes, or dead-peer detection settings. Check logs for rekey events and negotiation failures. If the tunnel crosses a device with short UDP timeouts, NAT traversal behavior may also be relevant.

Keep FortiOS and peer software maintained according to your organization’s change process. Before changing production VPN settings, document the current configuration and plan a maintenance window if the change could interrupt service.

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

Security and Maintenance Best Practices

A reliable FortiGate IPsec deployment should be both secure and easy to operate. Use strong, unique pre-shared keys when certificates are not practical, and store credentials securely. Restrict VPN access to necessary networks and services rather than allowing broad access by default. Proton Free VPN: What You Get and Whether It’s Worth Using

Other useful practices include:

  • Prefer modern IKE and cryptographic settings supported by both peers.
  • Use certificates where they fit the organization’s identity-management requirements.
  • Keep an accurate record of subnets, peer addresses, and proposals.
  • Monitor VPN logs and alert on unexpected tunnel failures.
  • Review access regularly, especially for remote users and third-party connections.
  • Back up configurations before making changes.

Choose FortiGate IPsec security and maintenance practices

PracticeMain benefitWhat to verifyOperational impactPriority
Use strong proposalsBetter cryptographic protectionPeer compatibilityMay require coordinated changesHigh
Prefer IKEv2 when supportedModern negotiation optionBoth peers support IKEv2May affect legacy peersHigh
Use strong authenticationReduces unauthorized access riskKeys or certificates are managed securelyRequires careful credential handlingHigh
Restrict firewall policiesLimits permitted tunnel trafficOnly required sources and services are allowedMore precise policy managementHigh
Keep FortiOS maintainedAccess to fixes and security updatesSupported release and upgrade notesRequires change planningHigh
Monitor tunnel status and logsFaster fault detectionEvents, negotiation failures, and trafficOngoing operational reviewMedium
Document peer and subnet settingsEasier troubleshooting and recoveryAddresses, selectors, and policy dependenciesRequires documentation upkeepMedium

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 tunnel with clearly defined routes and least-privilege firewall policies. Confirm that Phase 1 and Phase 2 settings match at both ends, then test with real network traffic and verify logs and counters. When a tunnel fails, troubleshoot negotiation first, followed by selectors, routing, firewall policies, and endpoint behavior. NordVPN Not Working in China? Causes and Fixes to Try

© 2026 Wayfarer Lantern Media · Wayfarer Lantern Media Ltd.