China Route Planner
FortiGate IPsec Debug: A Practical Guide to Finding VPN Problems
VPN

FortiGate IPsec Debug: A Practical Guide to Finding VPN Problems

Learn how to debug FortiGate IPsec VPNs with focused commands, interpret common errors, and verify tunnel traffic safely.

Charlotte Adams
· 9 min read

FortiGate IPsec debug is most useful when you narrow the output to the affected VPN, reproduce the problem, and read the IKE messages alongside tunnel status, routes, policies, and traffic counters. Begin with diagnose vpn ike gateway list and diagnose vpn tunnel list, then enable a filtered IKE debug only if the status does not explain the failure. When you finish, turn debugging off.

The commands below apply to FortiGate’s FortiOS CLI, but exact output and available options can vary by FortiOS version and VPN type. Run them in the correct VDOM and confirm the VPN’s phase 1 name before filtering.

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.

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 →

Choose the right FortiGate diagnostic tool for the problem

ToolBest starting questionWhat it showsUse whenMain limitation
VPN statusIs the tunnel up?Tunnel and phase statusFirst checkLimited detail on failure
IKE debugWhere did negotiation fail?IKE exchange messagesTunnel will not establishCan produce verbose output
IPsec statusAre IPsec security associations present?Phase 2 and SA stateIKE appears successfulDoes not prove traffic passes
Packet captureAre packets reaching or leaving the FortiGate?Packet headers and directionSuspect packet deliveryRequires traffic to inspect
Packet flow debugWhere is traffic being dropped or routed?Policy, route, and drop decisionsRouting or policy is unclearNeeds careful filters
Traffic testCan the endpoints exchange traffic?End-to-end reachabilityTunnel appears establishedA failed test needs further diagnosis

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

Start with VPN status

First establish whether the problem is that the tunnel will not negotiate, or that an apparently established tunnel will not carry traffic.

Use these commands to inspect IKE and IPsec status:

get vpn ipsec tunnel summary
diagnose vpn ike gateway list
diagnose vpn tunnel list

Look for the expected gateway and phase 2 selectors, assigned peer address, negotiation state, and packet counters. Counter names and formatting differ between releases. If the tunnel is down, investigate IKE and phase 1 negotiation. If it is up but counters do not increase when you generate traffic, check selectors, routing, policy, and the test traffic itself.

Confirm that the configured peer address, authentication method, proposals, local interface, and phase 2 networks match the remote device. Also verify reachability to the peer through the intended WAN interface. V2Ray Free: What It Means and How to Choose a Safe Option

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

Run a focused IKE debug

Use a filter to limit output to the relevant gateway. On many FortiOS versions, the following sequence filters debug messages by the phase 1 name:

diagnose debug reset
diagnose vpn ike log-filter clear
diagnose vpn ike log-filter name <phase1-name>
diagnose debug console timestamp enable
diagnose debug application ike -1
diagnose debug enable

Replace <phase1-name> with the exact phase 1 interface name. Some versions use different IKE log-filter syntax. Check the CLI help with diagnose vpn ike log-filter? if a command is not accepted.

Reproduce the failure once, note the timestamp and relevant messages, then stop the debug:

diagnose debug disable
diagnose debug reset

Do not leave verbose debugging enabled. It can produce substantial output, make a busy CLI session difficult to use, and expose network details in logs. If several VPNs share a peer or the issue is intermittent, capture only as much output as needed and use the narrowest filter your FortiOS version supports. Cisco Secure Client AnyConnect VPN: Setup, Features, and Troubleshooting

Match common IKE negotiation symptoms to likely checks

SymptomLikely area to checkUseful evidenceNext action
No peer responsePeer reachability or UDP pathIKE debug and packet captureCheck peer address and network path
Phase 1 proposal mismatchIKE encryption, authentication, or DH settingsProposal details in debugCompare both peers’ phase 1 settings
Authentication failurePre-shared key or identityAuthentication messagesVerify credentials and peer IDs
Phase 1 succeeds, Phase 2 failsIPsec proposal or selectorsPhase 2 negotiation messagesCompare proposals and traffic selectors
No matching proposalEncryption, integrity, or DH mismatchNegotiation failure textAlign the relevant proposals
Repeated negotiation attemptsPeer response or configuration mismatchRepeated IKE exchangesCheck reachability and both configurations

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

Interpret common negotiation failures

IKE debug messages are clues, not always definitive diagnoses. Read them in sequence and compare both peers’ configuration and logs.

Message or symptom Common areas to check
No response from peer or repeated retransmissions Peer reachability, WAN routing, UDP 500/4500, upstream filtering, or NAT
Authentication failure Pre-shared key or certificate, peer identity, certificate validity, or authentication settings
No matching proposal IKE version, encryption, authentication, PRF, DH group, or lifetime compatibility
Phase 1 comes up but phase 2 fails Phase 2 proposals, PFS settings, selectors, or subnet definitions
Tunnel is up but traffic fails Routes, firewall policies, NAT, selectors, return path, or host-side filtering

A proposal mismatch can be as simple as different encryption or Diffie-Hellman settings. Compare the full proposal sets on both ends rather than changing settings at random. With certificate-based authentication, check certificate trust, expiration, identity, and the chain expected by the peer. FortiClient VPN: What It Is, How to Set It Up, and When to Use It

For phase 2, verify that local and remote traffic selectors agree from each device’s perspective. A subnet defined as local on one side must correspond to the remote subnet on the other. If one side uses a broad selector and the other uses narrower selectors, confirm that the intended selectors are actually negotiated.

If the tunnel is up but traffic does not pass

An established IKE or IPsec tunnel confirms negotiation, not end-to-end connectivity. Check each part of the forwarding path:

  • Confirm the destination route points to the IPsec interface or the correct policy-based VPN path.
  • Verify an IPv4 or IPv6 firewall policy exists in the correct direction and uses the intended source and destination interfaces.
  • Check whether NAT is enabled where it should not be, or omitted where it is required by the design.
  • Compare the traffic’s source and destination addresses with the negotiated phase 2 selectors.
  • Check the return route and any firewall rules on the remote network.
  • Generate a controlled test, such as a ping from a host with an address inside the negotiated local subnet, and watch the tunnel counters.

For a quick packet-level check, use a narrowly scoped sniffer:

diagnose sniffer packet any 'host <test-host> and host <remote-host>' 4 20 l

Replace the placeholders with the actual endpoints. A sniffer can help establish whether packets arrive at the FortiGate and whether replies return, but interface selection and filter syntax matter. Avoid broad captures on a busy production device, and do not assume that seeing an encrypted packet on the WAN proves the inner traffic is permitted. NordVPN China Doesn’t Work? Causes, Fixes, and Alternatives

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

Decide what to check when the tunnel is up but traffic fails

ObservationCheck firstDiagnostic optionWhat to verify
No traffic reaches the FortiGateSource host and upstream pathPacket capturePackets arrive at the expected interface
Traffic arrives but is deniedFirewall policyPacket flow debugMatching policy permits the traffic
Traffic uses the wrong routeRouting table and route selectionPacket flow debugRoute points toward the IPsec interface
One direction works onlyReturn route and reverse policyPacket flow debugBoth directions have valid paths and policies
Phase 2 is up but traffic is absentSelectors and generated trafficIPsec status and packet captureTraffic matches the negotiated selectors
Tunnel shows no usable SAPhase 2 negotiationIPsec status and IKE debugSecurity associations are established

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

Use packet flow debug when routing or policy is unclear

If IKE is established but packets are being dropped or sent along the wrong path, packet flow debug can show how FortiGate processes a particular flow. Apply tight source and destination filters and a small trace limit:

diagnose debug reset
diagnose debug flow filter saddr <source-ip>
diagnose debug flow filter daddr <destination-ip>
diagnose debug flow show function-name enable
diagnose debug flow trace start 20
diagnose debug enable

Generate the test traffic, then stop and clear the debug: Thunder VPN PC: How to Use It on Windows and What to Know

diagnose debug disable
diagnose debug flow trace stop
diagnose debug reset

Look for routing decisions, policy matches, and drop reasons. Packet flow output can be detailed and may include sensitive addresses. Use it only for a specific flow, and account for features or traffic paths that may affect what the trace shows. For large or busy environments, check Fortinet’s documentation for the relevant FortiOS version before collecting extensive diagnostics.

Recommendation

Debug FortiGate IPsec issues in stages: verify tunnel status, run a filtered IKE debug for negotiation failures, and use focused packet checks for traffic failures. Change one setting at a time, compare both peers, and confirm the result with counters and a test flow. Always disable debugging when finished and remove sensitive information before sharing output.

© 2026 Wayfarer Lantern Media · Wayfarer Lantern Media Ltd.