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.
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
| Check | What to inspect | What it can reveal | Next step |
|---|---|---|---|
| Peer reachability | Remote gateway address | Whether the peer can be reached | Verify routing and connectivity |
| Interface status | WAN interface state | Whether the path is available | Restore interface connectivity |
| Existing tunnel | Tunnel status | Whether a tunnel is already established | Check negotiation or traffic |
| Event logs | VPN-related events | Recent failures or state changes | Note the error and timestamp |
| Configuration | Local and remote settings | Mismatched peer or proposal values | Compare both sides |
| Scope | One tunnel or several | Whether the issue is isolated | Check shared links or settings |
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 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.
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 symptom | Likely area | What to verify | Useful next check |
|---|---|---|---|
| No response from peer | Reachability | Peer address and network path | Confirm routing and upstream access |
| Proposal mismatch | Phase 1 | Encryption, authentication, and DH settings | Compare Phase 1 proposals |
| Authentication failure | Credentials or identity | Pre-shared key and peer identity | Check both peers’ authentication settings |
| Phase 1 established, Phase 2 fails | Phase 2 | Selectors and Phase 2 proposals | Compare subnet and proposal values |
| No matching selector | Traffic selectors | Local and remote subnets | Check selector definitions on both peers |
| Negotiation succeeds, traffic fails | Data path | Routes, policies, and NAT | Trace 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.
Phase 1 and Phase 2 compatibility checks
| Setting | Phase | Compare on both peers | Mismatch may prevent |
|---|---|---|---|
| Peer identity | Phase 1 | Expected local and remote IDs | Phase 1 authentication |
| Authentication method | Phase 1 | Compatible authentication settings | Phase 1 negotiation |
| Pre-shared key | Phase 1 | Same key on each peer | Phase 1 authentication |
| Encryption proposal | Phase 1 | Supported encryption choices | Phase 1 negotiation |
| DH group | Phase 1 | Compatible Diffie-Hellman groups | Phase 1 negotiation |
| Encryption proposal | Phase 2 | Compatible Phase 2 choices | Phase 2 negotiation |
| PFS setting | Phase 2 | Enablement and group, if used | Phase 2 negotiation |
| Traffic selectors | Phase 2 | Matching local and remote subnets | Child 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.
