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.


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 question | First check | FortiGate command or tool | What to look for | Next step |
|---|---|---|---|---|
| Tunnel appears down | Check tunnel status | `get vpn ipsec tunnel summary` | Whether the tunnel is established | Inspect IKE negotiation |
| Peer is unreachable | Check basic connectivity | `execute ping <peer-IP>` | Whether the peer responds | Verify routing and reachability |
| IKE negotiation fails | Run a focused IKE debug | `diagnose debug application ike -1` | Error messages and negotiation progress | Match the log to the negotiation stage |
| Debug output is excessive | Limit the debug scope | Filter by peer or tunnel where supported | Relevant messages only | Reproduce the issue and review output |
| Phase 1 does not complete | Compare Phase 1 settings | Check both peers’ Phase 1 configuration | Matching proposals and authentication | Correct mismatched settings |
| Phase 2 does not complete | Compare Phase 2 settings | Check both peers’ Phase 2 configuration | Matching selectors and proposals | Correct mismatched settings |
| Tunnel is up but traffic fails | Check policies and routing | Review firewall policy and route | Traffic allowed and routed into the tunnel | Check selectors and counters |
| Debugging is complete | Stop debug output | `diagnose debug disable` | Debug is no longer running | Confirm behavior with a fresh test |
Compiled November 2026; check the provider's site for current details.
| VPN | Obfuscation | From / month | Plan | Free plan | Refund | Alipay | UnionPay | Crypto | Website opens in China | Trustpilot | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Turn on manually Shadow | $2.49/mo | 27 months: $59.99 | Yes | 7 days | ✓ | ✓ | ✓ | ✓ | Official site blocked; our special link opens (4.4 s) | 4.2/5 (195 reviews) | |
| Turn on manually Obfuscated Servers / NordWhisper | $3.49/mo | 27 months: $94.23 | No | 30 days | ? | ✗ | ✓ | ✓ | ✗ Blocked | 4.2/5 (51,628 reviews) | |
| ✓ On by default all servers | $3.00/mo | 28 months: $84 | No | 30 days | ✗ | ✗ | ✓ | ✗ | ✗ Blocked | 4.4/5 (29,706 reviews) | |
| ✓ On by default Camouflage, with OpenVPN | See site | See site | No | 30 days | ✗ | ✗ | ✗ | ✓ | ✗ Blocked | 4.3/5 (31,823 reviews) | |
| Turn on manually Stealth, free plan too | $2.99/mo | 12 months: $35.88 | Yes | 30 days | ✗ | ✗ | ✗ | ✓ | ✗ Blocked | 2.1/5 (1,040 reviews) | |
| Turn on manually StealthVPN / OpenWeb | $12.50/mo | 24 months: $300 | No | See site | ✗ | ✗ | ✗ | ✓ | ✗ Blocked | 1.3/5 (110 reviews) | |
| Turn on manually Shadowsocks, OpenVPN only | $2.03/mo | 40 months: $81.2 | No | 30 days | ✗ | ✗ | ✗ | ✗ | ✗ Blocked | 4.2/5 (11,033 reviews) | |
| Turn on manually selected servers | $2.19/mo | 28 months: $61.32 | No | 45 days | ✗ | ✗ | ✗ | ✓ | ✗ Blocked | 4.0/5 (24,178 reviews) | |
| Turn on manually switch to OpenVPN | $1.69/mo | 60 months: $101.55 | No | 31 days | ? | ? | ✗ | ✓ | ✗ Blocked | 4.4/5 (17,994 reviews) | |
| ✓ On by default TrustTunnel | $2.99/mo | 24 months: $71.76 | Yes | 30 days | ✓ | ✗ | ✓ | ✓ | Official site blocked; our special link opens (3.7 s) | 4.3/5 (290 reviews) | |
| Turn on manually QUIC / Shadowsocks / LWO | $5.61/mo | €5/mo | No | 14 days | ✗ | ✗ | ✗ | ✓ | ✗ Blocked | 3.2/5 (192 reviews) | |
| Turn on manually Stealth / WStunnel | $5.75/mo | 12 months: $69 | Yes | See site | ✗ | ✗ | ✗ | ✓ | ✗ Blocked | 4.7/5 (13,355 reviews) | |
| Turn on manually Scramble, OpenVPN TCP | See site | See site | No | 30 days | ✓ | ✗ | ✗ | ✗ | ✗ Blocked | 4.4/5 (2,695 reviews) | |
| Not listed | $7.08/mo | 12 months: $84.99 | Yes | 30 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
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 result | What it indicates | Likely area to check | Useful comparison | Practical next action |
|---|---|---|---|---|
| No IKE messages | Negotiation has not visibly started | Peer reachability or debug scope | Peer IP and debug filter | Verify connectivity and reproduce |
| Peer is contacted | IKE traffic reaches the peer | Phase 1 settings | Authentication and proposals | Compare both peers’ Phase 1 configuration |
| Phase 1 completes | IKE security association is established | Phase 2 settings | Selectors and proposals | Review Phase 2 on both peers |
| Phase 1 proposal mismatch | Peers cannot agree on Phase 1 | Phase 1 proposals | Encryption, authentication, and related settings | Make supported settings match |
| Authentication error | Peer identity or credentials are rejected | Authentication configuration | IDs and authentication method | Confirm identities and credentials |
| Phase 2 negotiation fails | Child security association is not established | Phase 2 configuration | Selectors and proposals | Align Phase 2 settings |
| Tunnel establishes | Negotiation completed | Data-plane configuration | Routes, policies, and selectors | Test traffic through the tunnel |
| Messages are unclear | Failure point is not yet isolated | Debug scope and log context | Relevant peer and negotiation sequence | Capture 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.
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
| Check | What to compare or verify | Signs of a problem | When to prioritize | Next action |
|---|---|---|---|---|
| Firewall policy | Policy permits the intended traffic | Traffic is denied or unmatched | First, when tunnel status is up | Review policy match and logs |
| Routing | Route points traffic to the IPsec tunnel | Traffic follows another route | When packets do not enter the tunnel | Correct the route |
| Phase 2 selectors | Local and remote traffic ranges match | Intended traffic is outside the selectors | When only some traffic fails | Align selectors on both peers |
| Traffic counters | Encapsulation and decapsulation activity | One direction has no activity | During a controlled traffic test | Use counters to locate the failing direction |
| Source and destination | Test addresses fall within policy and selectors | Test traffic uses unexpected addresses | When results differ by host or subnet | Repeat with an in-scope test pair |
| Peer reachability | Remote peer remains reachable | Connectivity to the peer is lost | When the tunnel drops during testing | Recheck basic connectivity |
| IKE status | Tunnel remains established during the test | Negotiation restarts or fails | When traffic loss is intermittent | Capture a focused IKE debug |
| Debug output | Logs show the relevant peer and test | Output is missing or overly broad | When other checks do not isolate the issue | Narrow 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