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.
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
| Check | What to inspect | Typical clue | Next action |
|---|---|---|---|
| Peer reachability | Remote gateway address | Peer does not respond | Check routing and reachability |
| Interface status | WAN interface link | Interface is down | Restore the WAN link |
| Phase 1 settings | IKE version and proposals | Settings do not match | Compare both peers’ settings |
| Authentication | Pre-shared key or certificate | Authentication failure | Verify credentials and certificate details |
| Phase 2 settings | Selectors and proposals | Proxy ID or proposal mismatch | Compare selectors and encryption settings |
| Local traffic | Source address and route | Traffic uses the wrong path | Check policy and routing |
| Remote traffic | Remote subnet and return route | Replies do not return | Check remote routing and policy |
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 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.
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
| Goal | Command or filter | Scope | When to use |
|---|---|---|---|
| Inspect IKE negotiation | `diagnose debug application ike -1` | IKE activity | When the tunnel fails to establish |
| Limit output to a peer | `diagnose vpn ike log-filter dst-addr4 <peer-IP>` | One peer address | When other VPNs create noise |
| Enable debug output | `diagnose debug enable` | Debug session | After setting the relevant filter |
| Stop debug output | `diagnose debug disable` | Debug session | As soon as enough evidence is collected |
| Clear the IKE log filter | `diagnose vpn ike log-filter clear` | IKE log filter | Before changing to another peer |
| Check tunnel status | `get vpn ipsec tunnel summary` | Tunnel summary | Before 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.
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 stage | Example clue | Likely area to compare | Next step |
|---|---|---|---|
| Peer contact | No response from peer | Reachability or remote gateway | Check routing and peer availability |
| IKE version | Version mismatch | Phase 1 settings | Confirm both peers use the same version |
| Proposal selection | No matching proposal | Encryption, authentication, or DH settings | Compare Phase 1 proposals |
| Authentication | Authentication fails | Key or certificate | Verify the configured credentials |
| Phase 2 selection | Selector mismatch | Local and remote subnets | Compare traffic selectors |
| SA installation | SA is not installed | Negotiation or configuration | Inspect the preceding debug messages |
| Tunnel established | No data passes | Policy, routing, or selectors | Check 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.
