NewIP VPN Notes
VPN

FortiGate IPsec Debug: A Practical Guide to Finding VPN Problems

By Ethan Marlowe · · 10 min
FortiGate IPsec Debug: A Practical Guide to Finding VPN Problems

Learn how to debug FortiGate IPsec VPNs with focused CLI commands, interpret IKE output, and avoid common troubleshooting mistakes.

nord-vpn-microsoft-edge
nord-vpn-microsoft-edge

FortiGate IPsec debug helps identify why a VPN tunnel will not establish or pass traffic. Start with get vpn ipsec tunnel summary and diagnose vpn tunnel list, then check routing and configuration. If the cause is unclear, run a brief, filtered IKE debug with diagnose debug application ike -1. Read the output alongside the tunnel configuration, and turn debugging off as soon as you have a useful capture.

Choosing the next diagnostic step

Symptom or questionFirst checkFortiGate command or toolWhat to look forNext step
Tunnel appears downCheck tunnel status`get vpn ipsec tunnel summary`Whether the tunnel is establishedInspect IKE negotiation
Peer is unreachableCheck basic connectivity`execute ping <peer-IP>`Whether the peer respondsVerify routing and reachability
IKE negotiation failsRun a focused IKE debug`diagnose debug application ike -1`Error messages and negotiation progressMatch the log to the negotiation stage
Debug output is excessiveLimit the debug scopeFilter by peer or tunnel where supportedRelevant messages onlyReproduce the issue and review output
Phase 1 does not completeCompare Phase 1 settingsCheck both peers’ Phase 1 configurationMatching proposals and authenticationCorrect mismatched settings
Phase 2 does not completeCompare Phase 2 settingsCheck both peers’ Phase 2 configurationMatching selectors and proposalsCorrect mismatched settings
Tunnel is up but traffic failsCheck policies and routingReview firewall policy and routeTraffic allowed and routed into the tunnelCheck selectors and counters
Debugging is completeStop debug output`diagnose debug disable`Debug is no longer runningConfirm behavior with a fresh test

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.

Start with tunnel status and basic checks

Before enabling debug output, confirm what is actually failing: IKE negotiation, IPsec Phase 2, or traffic forwarding. A tunnel can appear established while the protected traffic still fails because of a route, policy, selector, or NAT issue.

Useful initial commands include:

get vpn ipsec tunnel summary
diagnose vpn tunnel list

Check the relevant tunnel’s status, peer address, phase information, and traffic counters. Then verify:

  • The peer’s public IP address is reachable.
  • The local and remote subnets match the intended VPN design.
  • Routes point protected traffic toward the correct IPsec interface or tunnel.
  • Firewall policies allow the traffic in both directions.
  • NAT is disabled for VPN traffic unless the design specifically requires it.
  • The FortiGate’s system time and the peer’s time are reasonable, especially when certificates are used.

Configuration names and command details can vary across FortiOS versions and VPN types. If a command is unavailable, consult the CLI reference for the version running on the device. Fortinet VPN: What It Does, How to Get Started, and What to Know

FortiGate IPsec Debug: A Practical Guide to Finding VPN Problems: Checklist

Run a focused IKE debug

IKE debug output can reveal negotiation failures, but unrestricted output may be noisy on a busy firewall. Filter the debug to the affected peer when your FortiOS version supports it.

A common sequence is:

diagnose vpn ike log-filter clear
diagnose vpn ike log-filter rem-addr4 <peer-public-IP>
diagnose debug reset
diagnose debug console timestamp enable
diagnose debug application ike -1
diagnose debug enable

Now reproduce the problem, for example, initiate the tunnel or generate traffic that should bring it up. Capture only the relevant output, then stop debugging:

diagnose debug disable
diagnose debug reset
diagnose vpn ike log-filter clear

Replace <peer-public-IP> with the remote gateway’s actual IPv4 address. Filter syntax can differ by FortiOS release, so check the device’s command help if the filter is rejected. For a remote peer using IPv6, use the corresponding address filter supported by that release. VPN Free Extension Edge: How to Choose One for Microsoft Edge

Avoid leaving debug enabled longer than necessary. A broad, high-volume debug can make output difficult to interpret and may add load to the device.

Interpret the negotiation stage

Use the sequence of messages to find where negotiation stops. Exact wording varies, but the failure category is often more useful than any single line.

Debug pattern or symptom Likely area to investigate
No response from the peer Reachability, upstream filtering, wrong peer IP, or NAT traversal
Proposal mismatch IKE version, encryption, authentication, integrity, or DH settings
Authentication failure Pre-shared key, certificate, identity, or peer-ID configuration
Phase 1 succeeds but Phase 2 fails Selectors, encryption proposals, PFS, or lifetimes
Tunnel is up but traffic fails Routes, firewall policies, NAT, selectors, or return path

A timeout does not automatically prove the remote firewall is down. Confirm that UDP 500 and, where needed, UDP 4500 can pass between the peers. If NAT is present, check that both sides support and correctly negotiate NAT traversal.

For authentication errors, compare the configured credentials and identities at both ends. A pre-shared key must match exactly. With certificates, check validity, trust chain, certificate selection, and whether each peer expects the identity the other side presents. NordVPN Extension for Edge: How to Install and Use It

Reading the IKE negotiation stage

Observed stage or resultWhat it indicatesLikely area to checkUseful comparisonPractical next action
No IKE messagesNegotiation has not visibly startedPeer reachability or debug scopePeer IP and debug filterVerify connectivity and reproduce
Peer is contactedIKE traffic reaches the peerPhase 1 settingsAuthentication and proposalsCompare both peers’ Phase 1 configuration
Phase 1 completesIKE security association is establishedPhase 2 settingsSelectors and proposalsReview Phase 2 on both peers
Phase 1 proposal mismatchPeers cannot agree on Phase 1Phase 1 proposalsEncryption, authentication, and related settingsMake supported settings match
Authentication errorPeer identity or credentials are rejectedAuthentication configurationIDs and authentication methodConfirm identities and credentials
Phase 2 negotiation failsChild security association is not establishedPhase 2 configurationSelectors and proposalsAlign Phase 2 settings
Tunnel establishesNegotiation completedData-plane configurationRoutes, policies, and selectorsTest traffic through the tunnel
Messages are unclearFailure point is not yet isolatedDebug scope and log contextRelevant peer and negotiation sequenceCapture a focused debug during a test

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

Check Phase 1 and Phase 2 settings

Phase 1 establishes the IKE security association. Compare both peers’ settings, including:

  • IKE version and authentication method.
  • Encryption and integrity algorithms.
  • Diffie–Hellman group.
  • Local and remote identities, if configured.
  • Peer address and interface.
  • Negotiation mode and relevant lifetime settings.

Phase 2 creates the IPsec security associations that protect data traffic. Check that both sides agree on the local and remote traffic selectors, encryption and integrity proposals, PFS settings, and any relevant lifetime values. V2Ray Free: What It Is, How to Use It Safely, and What to Check

Selectors must describe the same traffic from opposite perspectives. For example, one peer’s local subnet should match the other peer’s remote subnet. A successful Phase 1 with failed Phase 2 often points to a mismatch here, though proposals and PFS settings can also be responsible.

Make changes deliberately and compare the complete configuration on both devices. Avoid weakening encryption or authentication simply to make negotiation succeed. Use compatible, approved settings instead.

FortiGate IPsec Debug: A Practical Guide to Finding VPN Problems: Key points

If the tunnel is up but traffic does not pass

An established tunnel does not guarantee that packets are routed into it or permitted through it. Check the routing table and firewall policies, including the return path. Confirm that the policy’s source and destination interfaces, addresses, and services match the intended traffic.

Use tunnel counters to see whether packets are entering the IPsec connection. If counters remain unchanged while a test is running, the problem may be routing, policy matching, or traffic selectors. If outbound counters increase but inbound counters do not, investigate the remote peer, its return route and policy, and any upstream filtering. VPN Extension for Microsoft Edge: How to Choose and Use One

For packet-level investigation, use a targeted packet capture on the relevant interface. A capture can help distinguish between traffic that never reaches the FortiGate, traffic that is denied locally, and traffic that is sent toward the VPN but receives no reply. Keep captures narrow by specifying the host, protocol, or interface where possible.

Prioritizing checks when the tunnel is up but traffic does not pass

CheckWhat to compare or verifySigns of a problemWhen to prioritizeNext action
Firewall policyPolicy permits the intended trafficTraffic is denied or unmatchedFirst, when tunnel status is upReview policy match and logs
RoutingRoute points traffic to the IPsec tunnelTraffic follows another routeWhen packets do not enter the tunnelCorrect the route
Phase 2 selectorsLocal and remote traffic ranges matchIntended traffic is outside the selectorsWhen only some traffic failsAlign selectors on both peers
Traffic countersEncapsulation and decapsulation activityOne direction has no activityDuring a controlled traffic testUse counters to locate the failing direction
Source and destinationTest addresses fall within policy and selectorsTest traffic uses unexpected addressesWhen results differ by host or subnetRepeat with an in-scope test pair
Peer reachabilityRemote peer remains reachableConnectivity to the peer is lostWhen the tunnel drops during testingRecheck basic connectivity
IKE statusTunnel remains established during the testNegotiation restarts or failsWhen traffic loss is intermittentCapture a focused IKE debug
Debug outputLogs show the relevant peer and testOutput is missing or overly broadWhen other checks do not isolate the issueNarrow the debug and reproduce the failure

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

Final recommendation

Troubleshoot in order: check tunnel status, confirm reachability and configuration, run a short filtered IKE debug, then verify routes, policies, selectors, and counters. Save the relevant output before changing settings, make one change at a time, and always disable debugging when the capture is complete. Free VPN for Edge Extension: How to Choose One Safely

© 2026 Northlight Network Notes · Northlight Network Notes LLC