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.
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 | 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.
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
| Tool | Best starting question | What it shows | Use when | Main limitation |
|---|---|---|---|---|
| VPN status | Is the tunnel up? | Tunnel and phase status | First check | Limited detail on failure |
| IKE debug | Where did negotiation fail? | IKE exchange messages | Tunnel will not establish | Can produce verbose output |
| IPsec status | Are IPsec security associations present? | Phase 2 and SA state | IKE appears successful | Does not prove traffic passes |
| Packet capture | Are packets reaching or leaving the FortiGate? | Packet headers and direction | Suspect packet delivery | Requires traffic to inspect |
| Packet flow debug | Where is traffic being dropped or routed? | Policy, route, and drop decisions | Routing or policy is unclear | Needs careful filters |
| Traffic test | Can the endpoints exchange traffic? | End-to-end reachability | Tunnel appears established | A 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
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
| Symptom | Likely area to check | Useful evidence | Next action |
|---|---|---|---|
| No peer response | Peer reachability or UDP path | IKE debug and packet capture | Check peer address and network path |
| Phase 1 proposal mismatch | IKE encryption, authentication, or DH settings | Proposal details in debug | Compare both peers’ phase 1 settings |
| Authentication failure | Pre-shared key or identity | Authentication messages | Verify credentials and peer IDs |
| Phase 1 succeeds, Phase 2 fails | IPsec proposal or selectors | Phase 2 negotiation messages | Compare proposals and traffic selectors |
| No matching proposal | Encryption, integrity, or DH mismatch | Negotiation failure text | Align the relevant proposals |
| Repeated negotiation attempts | Peer response or configuration mismatch | Repeated IKE exchanges | Check 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
Decide what to check when the tunnel is up but traffic fails
| Observation | Check first | Diagnostic option | What to verify |
|---|---|---|---|
| No traffic reaches the FortiGate | Source host and upstream path | Packet capture | Packets arrive at the expected interface |
| Traffic arrives but is denied | Firewall policy | Packet flow debug | Matching policy permits the traffic |
| Traffic uses the wrong route | Routing table and route selection | Packet flow debug | Route points toward the IPsec interface |
| One direction works only | Return route and reverse policy | Packet flow debug | Both directions have valid paths and policies |
| Phase 2 is up but traffic is absent | Selectors and generated traffic | IPsec status and packet capture | Traffic matches the negotiated selectors |
| Tunnel shows no usable SA | Phase 2 negotiation | IPsec status and IKE debug | Security 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.

