遊戲連線站
VPN

FortiGate IPsec Debug: A Practical Guide to Finding VPN Problems

By 杭予安 · · 9 min
FortiGate IPsec Debug: A Practical Guide to Finding VPN Problems

Learn the FortiGate IPsec debug commands, how to read their output, and how to troubleshoot safely.

FortiGate IPsec debug helps identify why a VPN tunnel will not establish or pass traffic. Start by checking the tunnel status and confirming that traffic can reach the peer. Then enable IKE debugging with a filter for the remote gateway, reproduce the issue, and read the output for the failing negotiation step. Always stop debugging and reset the filter after collecting evidence.

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 →

Quick checks for common FortiGate IPsec symptoms

CheckWhat to inspectTypical clueNext action
Peer reachabilityRemote gateway addressPeer does not respondCheck routing and reachability
Interface statusWAN interface linkInterface is downRestore the WAN link
Phase 1 settingsIKE version and proposalsSettings do not matchCompare both peers’ settings
AuthenticationPre-shared key or certificateAuthentication failureVerify credentials and certificate details
Phase 2 settingsSelectors and proposalsProxy ID or proposal mismatchCompare selectors and encryption settings
Local trafficSource address and routeTraffic uses the wrong pathCheck policy and routing
Remote trafficRemote subnet and return routeReplies do not returnCheck remote routing and policy

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 basic checks

Before enabling debug output, confirm the tunnel configuration and network conditions. Debug logs are most useful when you know what should happen and can reproduce the failure.

Check the tunnel status:

get vpn ipsec tunnel summary

For more detail about a named tunnel, use:

diagnose vpn tunnel list name <tunnel_name>

Also check that: V2Ray Free: What It Is, How to Choose a Safe Option, and What to Expect

  • The remote gateway address is correct and reachable.
  • UDP 500 and UDP 4500 are allowed between the peers.
  • The local and remote encryption, authentication, and Diffie-Hellman settings match.
  • The Phase 1 and Phase 2 proposals, selectors, and lifetimes are compatible.
  • The firewall policies, routes, and NAT settings allow the intended traffic.

If the tunnel is up but applications cannot communicate, the problem may be routing, policy, selectors, or a downstream device, not IKE negotiation.

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

Run a focused IKE debug

IKE debug is the main tool for examining Phase 1 and Phase 2 negotiation. Use a peer filter to reduce unrelated output. Replace the example address with the remote VPN gateway’s public IP.

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 generate the connection attempt, for example, by sending traffic through the tunnel or initiating it from the peer. Review the output in the FortiGate CLI. When you have enough information, stop the debug:

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

The exact output and available filter options can vary by FortiOS version. Use diagnose vpn ike log-filter? to check the syntax supported by your device. Cisco Secure Client AnyConnect VPN: Setup, Features, and Troubleshooting

Avoid leaving debug enabled. It can produce a large volume of output, make the console difficult to use, and add unnecessary load, particularly on a busy firewall.

Choose a focused IKE debug command

GoalCommand or filterScopeWhen to use
Inspect IKE negotiation`diagnose debug application ike -1`IKE activityWhen the tunnel fails to establish
Limit output to a peer`diagnose vpn ike log-filter dst-addr4 <peer-IP>`One peer addressWhen other VPNs create noise
Enable debug output`diagnose debug enable`Debug sessionAfter setting the relevant filter
Stop debug output`diagnose debug disable`Debug sessionAs soon as enough evidence is collected
Clear the IKE log filter`diagnose vpn ike log-filter clear`IKE log filterBefore changing to another peer
Check tunnel status`get vpn ipsec tunnel summary`Tunnel summaryBefore or after a debug run

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

Read the output by negotiation stage

IKE messages can be verbose. Focus first on where the exchange stops and on error messages near that point. FortiClient VPN: How It Works, How to Set It Up, and What to Know

What you observe Likely area to investigate
No IKE messages appear Peer filter, traffic trigger, routing, upstream access, or UDP 500/4500 reachability
Phase 1 fails Peer address, authentication, IKE version, proposals, identity, or key
Phase 1 succeeds but Phase 2 fails Encryption proposals, selectors, PFS, or lifetime mismatch
Tunnel establishes but traffic fails Routes, firewall policies, selectors, NAT, or return path

Common messages point to specific checks:

  • No proposal chosen: Compare the encryption, authentication, and key exchange proposals on both peers.
  • Authentication failed: Verify the pre-shared key or certificate settings, peer identity, and time or certificate validity where relevant.
  • Peer ID mismatch: Check the configured local and remote IDs. The ID may differ from the peer’s public IP.
  • No matching IPsec selector: Compare the local and remote subnets and Phase 2 selectors on both devices.
  • Timeout or retransmission: Check reachability, packet filtering, NAT, and whether the remote peer is responding.

Treat these messages as clues rather than proof of a single cause. Compare the FortiGate output with logs from the remote VPN device, especially when configuration appears to match.

Check traffic after the tunnel comes up

A successful IKE exchange does not guarantee that application traffic will pass. Confirm that the right traffic is routed into the tunnel and that the remote side has a valid return path.

Inspect the tunnel and routing information: NordVPN China Doesn’t Work? Causes, Fixes, and Alternatives

diagnose vpn tunnel list name <tunnel_name>
get router info routing-table details <remote_subnet>

Then check the relevant firewall policy. Confirm that it references the correct incoming and outgoing interfaces, allows the required services, and does not apply unintended NAT. Make sure the remote peer has matching selectors and a route back to the FortiGate’s local subnet.

If needed, use a packet sniffer to verify whether traffic reaches the FortiGate and whether encrypted packets leave the interface. For example:

diagnose sniffer packet any 'host <peer_public_ip> and (udp port 500 or udp port 4500)' 4 0 l

Use an appropriate traffic filter and stop a running capture with Ctrl+C. A sniffer can help distinguish an IKE reachability issue from a negotiation or policy issue, but it does not replace checking both peers’ configurations.

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

Debug safely and collect useful evidence

Keep troubleshooting focused. Filter for one peer, reproduce one failure, and note the time, tunnel name, FortiOS version, and the exact traffic that triggered the attempt. Share only the relevant log lines with your network or support team. Thunder VPN PC: How to Use It Safely on a Computer

Avoid posting full debug output publicly. It may reveal public IP addresses, network ranges, identities, and configuration details. Redact sensitive information before sharing.

Before ending the session, run:

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

If commands behave differently from the examples, consult the FortiOS CLI reference for your installed version. Syntax and diagnostic options may change between releases.

Match negotiation clues to the next troubleshooting step NordVPN Not Logging In? Causes and Fixes That Usually Work

Negotiation stageExample clueLikely area to compareNext step
Peer contactNo response from peerReachability or remote gatewayCheck routing and peer availability
IKE versionVersion mismatchPhase 1 settingsConfirm both peers use the same version
Proposal selectionNo matching proposalEncryption, authentication, or DH settingsCompare Phase 1 proposals
AuthenticationAuthentication failsKey or certificateVerify the configured credentials
Phase 2 selectionSelector mismatchLocal and remote subnetsCompare traffic selectors
SA installationSA is not installedNegotiation or configurationInspect the preceding debug messages
Tunnel establishedNo data passesPolicy, routing, or selectorsCheck traffic flow in both directions

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

Recommendation

For FortiGate IPsec debug, first verify reachability, tunnel status, and routing. Then run a peer-filtered IKE debug while reproducing the problem, identify the stage where negotiation stops, and compare that setting on both peers. If the tunnel is established but traffic still fails, shift attention to selectors, routes, policies, NAT, and the return path. Disable debugging and clear the filter as soon as you have the evidence you need.

© 2026 Fernhollow Play Media · Fernhollow Play Media Ltd.