VPN

FortiGate IPsec: Setup, Configuration, and Troubleshooting

方屿白··7 min
FortiGate IPsec: Setup, Configuration, and Troubleshooting

Learn how FortiGate IPsec VPNs work, how to configure a site-to-site tunnel, and how to troubleshoot common issues.

FortiGate IPsec is Fortinet’s implementation of IPsec VPN technology, used to protect traffic between networks or between a device and a network. To configure a site-to-site tunnel, define the peer and IKE settings in Phase 1, specify protected traffic and encryption in Phase 2, then add routes and firewall policies. A tunnel can show as established while traffic still fails, so routing and policy checks are part of the setup, not an afterthought.

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 FortiGate IPsec deployment options

OptionBest suited forConfiguration approachRouting needsMain trade-off
Site-to-site tunnelConnecting fixed networksConfigure matching tunnel endpointsRoutes to remote subnetsRequires coordination at both sites
Route-based tunnelFlexible traffic routingUse a tunnel interfaceStatic or dynamic routesMore routing setup
Policy-based tunnelPolicy-driven traffic selectionMatch traffic with IPsec policiesPolicy-based forwardingLess flexible for complex routing
FortiGate wizardGuided initial setupFollow the interface promptsVerify generated routesConvenient, but review defaults
Manual configurationCustom requirementsSet Phase 1 and Phase 2 directlyConfigure routes explicitlyGreater control, more steps
Hub-and-spokeMultiple branch sitesConnect branches through a hubPlan spoke-to-hub routesHub can become a bottleneck

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

What FortiGate IPsec does

IPsec encrypts and authenticates IP traffic across an untrusted network, such as the internet. FortiGate devices commonly use it to connect branch offices, data centers, cloud networks, or remote users.

A typical site-to-site VPN has two negotiation stages:

  • Phase 1 (IKE): The FortiGate and its peer authenticate each other and establish a secure control channel.
  • Phase 2 (IPsec): The peers negotiate the encryption and authentication used to protect the actual network traffic.

The tunnel may use IKEv1 or IKEv2. IKEv2 is generally preferred for new configurations when both peers support it. The two ends must use compatible settings. A mismatch in authentication, encryption, Diffie-Hellman groups, or key lifetime can prevent negotiation.

FortiGate IPsec: Setup, Configuration, and Troubleshooting: Checklist

Site-to-site configuration overview

Before configuring a tunnel, collect the required information from both sides: How Much Is NordVPN per Month? Plans, Pricing, and What to Check

  • Public IP address or hostname of the remote peer
  • Local and remote network subnets
  • Pre-shared key or certificate details
  • IKE version and Phase 1 proposals
  • Phase 2 encryption, authentication, and lifetime settings
  • Whether the remote peer uses a fixed or dynamic public address

In the FortiGate interface, create a new IPsec tunnel using the site-to-site or custom setup option. For a custom configuration, the usual sequence is:

  1. Configure Phase 1. Set the remote gateway, interface, IKE version, authentication method, and matching proposals. Use a strong, unique pre-shared key if certificates are not being used.
  2. Configure Phase 2. Set the local and remote address ranges, encryption and authentication proposals, and any required PFS settings.
  3. Add routing. Route the remote subnet through the IPsec interface or use a supported dynamic routing method.
  4. Create firewall policies. Allow intended traffic between the internal interface and VPN interface. Add policies in both directions if traffic must flow both ways.
  5. Test and monitor. Confirm that the tunnel negotiates, then test access to a host in the remote subnet.

FortiOS menus and defaults vary by version, and the remote device’s configuration matters just as much as the local one. Use the peer’s documentation to confirm exact proposal names and subnet definitions.

Compare key Phase 1 and Phase 2 settings

SettingPhaseWhat it controlsPeer agreement neededIf mismatched
IKE versionPhase 1Key exchange protocolYesNegotiation fails
Authentication methodPhase 1Peer identity verificationYesAuthentication fails
Pre-shared key or certificatePhase 1Peer credentialsYesTunnel will not establish
Encryption algorithmPhase 1 or 2Traffic confidentialityYesProposal mismatch
Integrity algorithmPhase 1 or 2Data integrity checksYesProposal mismatch
Diffie-Hellman groupPhase 1 or 2Key generation strengthYesNegotiation may fail
LifetimePhase 1 or 2Rekey timingUsuallyRekey issues may occur
Local and remote subnetsPhase 2Protected traffic selectorsYesTraffic may not match

Compiled November 2026; check the provider's site for current details. Why Does VPN Work on Windows but Not Linux? Common Causes and Fixes

Phase 1 and Phase 2 settings

The following table summarizes the settings most often compared during troubleshooting.

Setting Phase 1 Phase 2
Purpose Authenticates peers and establishes the IKE channel Protects traffic between the defined networks
Common parameters IKE version, peer address, authentication, proposals, lifetime Local and remote selectors, proposals, PFS, lifetime
Common mismatch IKE version, pre-shared key, or encryption proposal Subnet selectors, encryption proposal, or PFS group
Typical symptom Tunnel does not establish Tunnel establishes, but traffic does not pass or Phase 2 remains down

Use secure, mutually supported algorithms. Avoid legacy or weak options when possible, and follow current Fortinet and peer-device guidance. For a dynamic peer, configure the tunnel to accommodate its changing address rather than relying on a fixed remote IP.

Traffic selectors, often called local and remote subnets, must describe the same networks from opposite viewpoints. For example, if one side defines its local network as 10.10.0.0/16 and remote network as 10.20.0.0/16, the other side should define those networks in reverse.

Routing, policies, and NAT

An established IPsec tunnel does not automatically grant access to either network. FortiGate must have a route to the remote subnet, and firewall policies must permit the desired traffic. How Much Does NordVPN Cost? Plans, Pricing, and What to Check

Check these items:

  • Route: The remote network points to the VPN interface or the appropriate routing mechanism.
  • Policy: A policy allows traffic from the local LAN to the VPN and, when required, another allows return or initiated traffic in the opposite direction.
  • NAT: Disable source NAT for ordinary site-to-site traffic unless the design specifically requires address translation.
  • Address objects: Policy objects and Phase 2 selectors match the actual networks and masks.
  • Return path: The remote network has a route back to the local subnet.

If overlapping address ranges exist at both sites, ordinary routing may not work as intended. Resolve the overlap through network redesign or a deliberate NAT strategy, and ensure both peers agree on the translated selectors and routes.

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

Troubleshoot FortiGate IPsec by symptom

SymptomFirst checksLikely areaUseful actionExpected result
Tunnel is downPeer reachability and Phase 1 settingsPhase 1 negotiationCompare IKE and authentication settingsPhase 1 establishes
Phase 1 is up, Phase 2 is downProposals and traffic selectorsPhase 2 negotiationMatch algorithms and subnet selectorsPhase 2 establishes
Tunnel is up, no traffic passesRoutes and firewall policiesForwardingAdd or correct route and allow policyTraffic reaches remote subnet
One direction worksReturn route and policyAsymmetric routingVerify routes and policies at both endsBidirectional traffic works
Internet traffic breaks over VPNNAT and policy orderNAT or policy handlingReview NAT and VPN policiesIntended traffic uses the tunnel
Tunnel drops during rekeyLifetimes and peer proposalsRekey negotiationAlign lifetime and Phase 2 settingsTunnel remains stable
Name-based peer failsPeer ID and authentication settingsPeer identificationCheck configured IDs at both endsPeer is recognized
Intermittent connectivityLogs, packet flow, and link stabilityNetwork path or configurationTrace traffic and review VPN eventsCause is isolated

Compiled November 2026; check the provider's site for current details. FortiGate L2TP: Setup, Security, and Alternatives

Troubleshooting FortiGate IPsec

Start by identifying which stage is failing. Check the VPN monitor and event logs for negotiation status and error messages. Then verify configuration on both peers rather than changing settings at random.

A practical checklist:

  • If Phase 1 fails, confirm peer reachability, IKE version, authentication details, proposals, and any upstream filtering of IKE traffic.
  • If Phase 1 is up but Phase 2 fails, compare subnet selectors, Phase 2 proposals, PFS settings, and lifetimes.
  • If both phases are up but traffic fails, inspect routes, firewall policies, NAT, host firewalls, and the remote return route.
  • If the tunnel is intermittent, review connectivity, rekey behavior, dead-peer detection, and whether either endpoint changes its public address.
  • If only some applications fail, check MTU and fragmentation behavior, as well as application-specific ports and policies.

FortiGate’s VPN monitor and logs can show whether a tunnel is up, but a successful ping is not always a complete test. ICMP may be blocked, while an application may depend on additional ports. Test the specific service from a host on each side, and use FortiOS diagnostic tools or packet captures when logs alone do not reveal where traffic stops. Diagnostic commands and syntax can differ across FortiOS releases, so consult the documentation for the installed version.

Recommendation

For a reliable FortiGate IPsec VPN, use IKEv2 and strong, mutually supported cryptographic settings where possible. Document the settings at both ends, keep subnet selectors and routes consistent, and verify firewall policies and NAT after negotiation succeeds. Test real application traffic in both directions, then monitor logs and tunnel status so configuration changes or connectivity problems are caught early. How Does Mullvad VPN Work? A Clear Guide to Its Privacy and Features