FortiGate IPsec: Setup, Configuration, and Troubleshooting

Learn how FortiGate IPsec VPNs work, how to configure a site-to-site tunnel, and how to troubleshoot common issues.
FortiGate IPsec is Fortinet’s implementation of IPsec VPN technology, used to protect traffic between networks or between a device and a network. To configure a site-to-site tunnel, define the peer and IKE settings in Phase 1, specify protected traffic and encryption in Phase 2, then add routes and firewall policies. A tunnel can show as established while traffic still fails, so routing and policy checks are part of the setup, not an afterthought.
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 →
Compare FortiGate IPsec deployment options
| Option | Best suited for | Configuration approach | Routing needs | Main trade-off |
|---|---|---|---|---|
| Site-to-site tunnel | Connecting fixed networks | Configure matching tunnel endpoints | Routes to remote subnets | Requires coordination at both sites |
| Route-based tunnel | Flexible traffic routing | Use a tunnel interface | Static or dynamic routes | More routing setup |
| Policy-based tunnel | Policy-driven traffic selection | Match traffic with IPsec policies | Policy-based forwarding | Less flexible for complex routing |
| FortiGate wizard | Guided initial setup | Follow the interface prompts | Verify generated routes | Convenient, but review defaults |
| Manual configuration | Custom requirements | Set Phase 1 and Phase 2 directly | Configure routes explicitly | Greater control, more steps |
| Hub-and-spoke | Multiple branch sites | Connect branches through a hub | Plan spoke-to-hub routes | Hub can become a bottleneck |
Compiled November 2026; check the provider's site for current details.
What FortiGate IPsec does
IPsec encrypts and authenticates IP traffic across an untrusted network, such as the internet. FortiGate devices commonly use it to connect branch offices, data centers, cloud networks, or remote users.
A typical site-to-site VPN has two negotiation stages:
- Phase 1 (IKE): The FortiGate and its peer authenticate each other and establish a secure control channel.
- Phase 2 (IPsec): The peers negotiate the encryption and authentication used to protect the actual network traffic.
The tunnel may use IKEv1 or IKEv2. IKEv2 is generally preferred for new configurations when both peers support it. The two ends must use compatible settings. A mismatch in authentication, encryption, Diffie-Hellman groups, or key lifetime can prevent negotiation.
Site-to-site configuration overview
Before configuring a tunnel, collect the required information from both sides: How Much Is NordVPN per Month? Plans, Pricing, and What to Check
- Public IP address or hostname of the remote peer
- Local and remote network subnets
- Pre-shared key or certificate details
- IKE version and Phase 1 proposals
- Phase 2 encryption, authentication, and lifetime settings
- Whether the remote peer uses a fixed or dynamic public address
In the FortiGate interface, create a new IPsec tunnel using the site-to-site or custom setup option. For a custom configuration, the usual sequence is:
- Configure Phase 1. Set the remote gateway, interface, IKE version, authentication method, and matching proposals. Use a strong, unique pre-shared key if certificates are not being used.
- Configure Phase 2. Set the local and remote address ranges, encryption and authentication proposals, and any required PFS settings.
- Add routing. Route the remote subnet through the IPsec interface or use a supported dynamic routing method.
- Create firewall policies. Allow intended traffic between the internal interface and VPN interface. Add policies in both directions if traffic must flow both ways.
- Test and monitor. Confirm that the tunnel negotiates, then test access to a host in the remote subnet.
FortiOS menus and defaults vary by version, and the remote device’s configuration matters just as much as the local one. Use the peer’s documentation to confirm exact proposal names and subnet definitions.
Compare key Phase 1 and Phase 2 settings
| Setting | Phase | What it controls | Peer agreement needed | If mismatched |
|---|---|---|---|---|
| IKE version | Phase 1 | Key exchange protocol | Yes | Negotiation fails |
| Authentication method | Phase 1 | Peer identity verification | Yes | Authentication fails |
| Pre-shared key or certificate | Phase 1 | Peer credentials | Yes | Tunnel will not establish |
| Encryption algorithm | Phase 1 or 2 | Traffic confidentiality | Yes | Proposal mismatch |
| Integrity algorithm | Phase 1 or 2 | Data integrity checks | Yes | Proposal mismatch |
| Diffie-Hellman group | Phase 1 or 2 | Key generation strength | Yes | Negotiation may fail |
| Lifetime | Phase 1 or 2 | Rekey timing | Usually | Rekey issues may occur |
| Local and remote subnets | Phase 2 | Protected traffic selectors | Yes | Traffic may not match |
Compiled November 2026; check the provider's site for current details. Why Does VPN Work on Windows but Not Linux? Common Causes and Fixes
Phase 1 and Phase 2 settings
The following table summarizes the settings most often compared during troubleshooting.
| Setting | Phase 1 | Phase 2 |
|---|---|---|
| Purpose | Authenticates peers and establishes the IKE channel | Protects traffic between the defined networks |
| Common parameters | IKE version, peer address, authentication, proposals, lifetime | Local and remote selectors, proposals, PFS, lifetime |
| Common mismatch | IKE version, pre-shared key, or encryption proposal | Subnet selectors, encryption proposal, or PFS group |
| Typical symptom | Tunnel does not establish | Tunnel establishes, but traffic does not pass or Phase 2 remains down |
Use secure, mutually supported algorithms. Avoid legacy or weak options when possible, and follow current Fortinet and peer-device guidance. For a dynamic peer, configure the tunnel to accommodate its changing address rather than relying on a fixed remote IP.
Traffic selectors, often called local and remote subnets, must describe the same networks from opposite viewpoints. For example, if one side defines its local network as 10.10.0.0/16 and remote network as 10.20.0.0/16, the other side should define those networks in reverse.
Routing, policies, and NAT
An established IPsec tunnel does not automatically grant access to either network. FortiGate must have a route to the remote subnet, and firewall policies must permit the desired traffic. How Much Does NordVPN Cost? Plans, Pricing, and What to Check
Check these items:
- Route: The remote network points to the VPN interface or the appropriate routing mechanism.
- Policy: A policy allows traffic from the local LAN to the VPN and, when required, another allows return or initiated traffic in the opposite direction.
- NAT: Disable source NAT for ordinary site-to-site traffic unless the design specifically requires address translation.
- Address objects: Policy objects and Phase 2 selectors match the actual networks and masks.
- Return path: The remote network has a route back to the local subnet.
If overlapping address ranges exist at both sites, ordinary routing may not work as intended. Resolve the overlap through network redesign or a deliberate NAT strategy, and ensure both peers agree on the translated selectors and routes.
Troubleshoot FortiGate IPsec by symptom
| Symptom | First checks | Likely area | Useful action | Expected result |
|---|---|---|---|---|
| Tunnel is down | Peer reachability and Phase 1 settings | Phase 1 negotiation | Compare IKE and authentication settings | Phase 1 establishes |
| Phase 1 is up, Phase 2 is down | Proposals and traffic selectors | Phase 2 negotiation | Match algorithms and subnet selectors | Phase 2 establishes |
| Tunnel is up, no traffic passes | Routes and firewall policies | Forwarding | Add or correct route and allow policy | Traffic reaches remote subnet |
| One direction works | Return route and policy | Asymmetric routing | Verify routes and policies at both ends | Bidirectional traffic works |
| Internet traffic breaks over VPN | NAT and policy order | NAT or policy handling | Review NAT and VPN policies | Intended traffic uses the tunnel |
| Tunnel drops during rekey | Lifetimes and peer proposals | Rekey negotiation | Align lifetime and Phase 2 settings | Tunnel remains stable |
| Name-based peer fails | Peer ID and authentication settings | Peer identification | Check configured IDs at both ends | Peer is recognized |
| Intermittent connectivity | Logs, packet flow, and link stability | Network path or configuration | Trace traffic and review VPN events | Cause is isolated |
Compiled November 2026; check the provider's site for current details. FortiGate L2TP: Setup, Security, and Alternatives
Troubleshooting FortiGate IPsec
Start by identifying which stage is failing. Check the VPN monitor and event logs for negotiation status and error messages. Then verify configuration on both peers rather than changing settings at random.
A practical checklist:
- If Phase 1 fails, confirm peer reachability, IKE version, authentication details, proposals, and any upstream filtering of IKE traffic.
- If Phase 1 is up but Phase 2 fails, compare subnet selectors, Phase 2 proposals, PFS settings, and lifetimes.
- If both phases are up but traffic fails, inspect routes, firewall policies, NAT, host firewalls, and the remote return route.
- If the tunnel is intermittent, review connectivity, rekey behavior, dead-peer detection, and whether either endpoint changes its public address.
- If only some applications fail, check MTU and fragmentation behavior, as well as application-specific ports and policies.
FortiGate’s VPN monitor and logs can show whether a tunnel is up, but a successful ping is not always a complete test. ICMP may be blocked, while an application may depend on additional ports. Test the specific service from a host on each side, and use FortiOS diagnostic tools or packet captures when logs alone do not reveal where traffic stops. Diagnostic commands and syntax can differ across FortiOS releases, so consult the documentation for the installed version.
Recommendation
For a reliable FortiGate IPsec VPN, use IKEv2 and strong, mutually supported cryptographic settings where possible. Document the settings at both ends, keep subnet selectors and routes consistent, and verify firewall policies and NAT after negotiation succeeds. Test real application traffic in both directions, then monitor logs and tunnel status so configuration changes or connectivity problems are caught early. How Does Mullvad VPN Work? A Clear Guide to Its Privacy and Features
