VPN

Fortigate IPsec Debug: A Practical Guide to Finding VPN Problems

方屿白··9 min
Fortigate IPsec Debug: A Practical Guide to Finding VPN Problems

Learn how to debug FortiGate IPsec VPNs with targeted CLI commands, interpret common errors, and avoid disruptive troubleshooting.

To perform a FortiGate IPsec debug, first check the tunnel status and confirm that routing and basic connectivity are correct. If those checks do not reveal the problem, use FortiGate’s IKE debug commands to capture negotiation events. Filter the output to the affected peer, reproduce the issue, and disable debugging as soon as you have enough information. This approach helps identify whether a failure involves IKE negotiation, authentication, traffic selectors, or the underlying network.

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 →

Basic FortiGate IPsec troubleshooting checks

CheckWhat to inspectWhat it can revealNext step
Peer reachabilityRemote gateway addressWhether the peer can be reachedVerify routing and connectivity
Interface statusWAN interface stateWhether the path is availableRestore interface connectivity
Existing tunnelTunnel statusWhether a tunnel is already establishedCheck negotiation or traffic
Event logsVPN-related eventsRecent failures or state changesNote the error and timestamp
ConfigurationLocal and remote settingsMismatched peer or proposal valuesCompare both sides
ScopeOne tunnel or severalWhether the issue is isolatedCheck shared links or settings

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 verbose output, confirm that you are troubleshooting the correct tunnel and that the FortiGate can reach the remote peer.

Useful commands include:

get vpn ipsec tunnel summary
diagnose vpn tunnel list
show vpn ipsec phase1-interface
show vpn ipsec phase2-interface

The summary provides a quick view of tunnel status. The detailed tunnel listing can show negotiated security associations, counters, and selector information. Configuration commands let you compare the configured Phase 1 and Phase 2 settings with those expected by the remote gateway.

Check the route to the peer’s public IP as well: Could Virgin Be Blocking My VPN? How to Find Out and Fix It

get router info routing-table details <peer-public-ip>
execute ping <peer-public-ip>

A ping failure does not always prove the peer is unreachable. Firewalls may block ICMP. Still, confirm that the route uses the intended interface and that upstream devices permit the required traffic. IPsec commonly needs UDP 500 and UDP 4500, and may use ESP when NAT traversal is not in use.

Also verify that the relevant firewall policies, local-in policies, and routing rules allow the VPN’s intended traffic. A tunnel can establish successfully while user traffic still fails because of a missing route or policy.

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

Run a focused IKE debug

FortiGate IKE debugging is most useful while a tunnel is attempting to establish or rekey. On many FortiOS versions, a typical command sequence is:

diagnose vpn ike log-filter clear
diagnose vpn ike log-filter rem-addr4 <peer-public-ip>
diagnose debug application ike -1
diagnose debug enable

Reproduce the failure, then stop debugging immediately: Why Will Virgin Internet Not Allow Cisco VPN Connect Client?

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

Command syntax and available filters can vary by FortiOS release. Check the CLI help or the FortiOS documentation for the installed version if a command is not recognized. Some versions use different filter options, or provide additional ways to filter by local address, interface, or VPN name.

Keep the capture short. Unfiltered IKE output can be noisy, and prolonged debugging can burden the system or make important messages harder to find. Avoid collecting output during peak activity unless necessary, especially on a busy appliance.

What to look for

Follow the sequence of events rather than focusing on one line. Determine whether the exchange reaches IKE negotiation, authentication, and child-SA or Phase 2 setup. Look for repeated retries, negotiation timeouts, or messages that identify a rejected proposal or selector.

Do not publish debug output without reviewing it. Logs can expose public IP addresses, usernames, certificate details, and other operational information. VPN Security Solution: How to Choose the Right Protection

Focused IKE debug messages and likely causes

Message or symptomLikely areaWhat to verifyUseful next check
No response from peerReachabilityPeer address and network pathConfirm routing and upstream access
Proposal mismatchPhase 1Encryption, authentication, and DH settingsCompare Phase 1 proposals
Authentication failureCredentials or identityPre-shared key and peer identityCheck both peers’ authentication settings
Phase 1 established, Phase 2 failsPhase 2Selectors and Phase 2 proposalsCompare subnet and proposal values
No matching selectorTraffic selectorsLocal and remote subnetsCheck selector definitions on both peers
Negotiation succeeds, traffic failsData pathRoutes, policies, and NATTrace traffic through the firewall

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

Common messages and likely causes

The wording varies between FortiOS versions, but recurring patterns often point to a specific category of problem.

Debug pattern Common causes What to check
No response or negotiation timeout Peer unreachable, wrong peer address, blocked UDP 500/4500, or upstream NAT issue Routing, interface, upstream ACLs, NAT traversal, and whether the peer is online
No proposal chosen or proposal mismatch IKE version, encryption, integrity, Diffie-Hellman group, or lifetime mismatch Compare Phase 1 settings on both gateways
Authentication failed Pre-shared key mismatch, identity mismatch, or certificate problem Credentials, peer ID settings, certificate validity, and trust chain
Phase 1 succeeds but Phase 2 fails Phase 2 proposal or traffic-selector mismatch Encryption and integrity settings, PFS, local and remote subnets
Tunnel is up but traffic does not pass Missing route or policy, incorrect selectors, or return-path issue Routing table, firewall policy, NAT exemption, counters, and remote-side routes

Treat these as starting points, not definitive diagnoses. A log message may describe a negotiation symptom while the underlying cause lies in a setting on the other gateway or an intermediate device. VPN for Home Network: How to Choose and Set It Up

Check Phase 1 and Phase 2 compatibility

IPsec negotiation depends on both peers agreeing on compatible parameters. Compare the settings on both sides rather than assuming that a configuration is correct because the tunnel worked previously.

For Phase 1, verify:

  • IKE version and mode
  • Encryption and integrity algorithms
  • Diffie-Hellman group
  • Pre-shared key or certificate authentication
  • Local and peer identity settings
  • NAT traversal and, where relevant, dead peer detection

For Phase 2, verify:

  • Encryption and integrity algorithms
  • Perfect Forward Secrecy settings and group
  • Key lifetime
  • Local and remote subnet selectors
  • Whether the peer expects a broad selector or separate subnet pairs

A mismatch in selectors can prevent Phase 2 from forming even when Phase 1 is established. If the remote gateway uses policy-based selectors, make sure the FortiGate’s configured networks correspond to what that device expects. VPN Best in 2026: How to Choose the Right VPN

After making changes, clear or renegotiate the affected tunnel only when it is safe to do so. Clearing an active tunnel interrupts traffic and may affect users or dependent services.

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

Phase 1 and Phase 2 compatibility checks

SettingPhaseCompare on both peersMismatch may prevent
Peer identityPhase 1Expected local and remote IDsPhase 1 authentication
Authentication methodPhase 1Compatible authentication settingsPhase 1 negotiation
Pre-shared keyPhase 1Same key on each peerPhase 1 authentication
Encryption proposalPhase 1Supported encryption choicesPhase 1 negotiation
DH groupPhase 1Compatible Diffie-Hellman groupsPhase 1 negotiation
Encryption proposalPhase 2Compatible Phase 2 choicesPhase 2 negotiation
PFS settingPhase 2Enablement and group, if usedPhase 2 negotiation
Traffic selectorsPhase 2Matching local and remote subnetsChild SA establishment

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

Distinguish tunnel negotiation from traffic problems

An established tunnel does not guarantee that application traffic can cross it. If the tunnel is up, inspect the security associations and traffic counters, then test with a source address that belongs to the intended local subnet. Top VPN for Android: Best Options for Privacy, Speed, and Streaming

Check these items:

  • A route exists for the remote network and points to the correct IPsec interface.
  • Firewall policies permit traffic in the required direction.
  • NAT is not unintentionally changing addresses that must match the Phase 2 selectors.
  • The remote gateway has a route and policy allowing return traffic.
  • Host firewalls and application services permit the connection.
  • The traffic is using the expected source interface and address.

Where supported and appropriate, use packet captures or flow debugging to follow a test packet through the FortiGate. These tools help distinguish packets that never arrive from packets that are denied, misrouted, or sent into the tunnel without a reply. Keep captures narrowly filtered to the test host and relevant ports.

Recommendation

Use a step-by-step workflow: confirm reachability and routes, inspect the tunnel summary, compare Phase 1 and Phase 2 settings, then run a short, peer-filtered IKE debug if negotiation still fails. Stop debugging promptly, protect the output, and change one setting at a time. This makes Fortigate IPsec debug safer, faster, and more useful for identifying the actual cause.