Study guide

6.2 IPsec VPN Phase 1 & Phase 2 Fundamentals

Fortinet FCP - FortiGate 7.6 Administrator Study Guide Exam

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

About the Fortinet FCP FortiGate Administrator Exam (FCP_FGT_AD-7.6) How to Study and Prepare for FortiOS 7.6 Certification

2 Chapter 1: Deployment & System Configuration

1.1 Initial Configuration, GUI/CLI Management & Admin Profiles 1.2 FortiGuard Services, Licensing & Firmware Upgrades 1.3 Virtual Domains (VDOMs) & System Operation Modes 1.4 Fortinet Security Fabric & Device Integration 1.5 High Availability (FGCP) Configuration & Election 1.6 System Logging, Diagnostics & Troubleshooting Tools 1.7 FortiGate CNF, FortiGate VM in Public Cloud & FortiSASE Administration

3 Chapter 2: Firewall Policies & NAT

2.1 Firewall Policy Matching & Object Management 2.2 Source Network Address Translation (SNAT) & IP Pools 2.3 Destination NAT (DNAT), Virtual IPs (VIPs) & Central NAT

4 Chapter 3: Content Inspection & Security Profiles

3.1 Flow-Based vs Proxy-Based Inspection Modes 3.2 Antivirus & FortiSandbox Integration 3.3 Intrusion Prevention System (IPS) Configuration 3.4 Web Filtering & Static URL Management 3.5 Application Control & Traffic Shaping 3.6 DNS Filtering & Botnet C&C Protection

5 Chapter 4: Authentication & FSSO

4.1 Local & Remote Authentication (LDAP, RADIUS, 2FA) 4.2 Fortinet Single Sign-On (FSSO) Architecture & Modes

6 Chapter 5: Routing & SD-WAN

5.1 Static Routing, Policy Routes & Reverse Path Forwarding 5.2 SD-WAN Architecture, Performance SLAs & Balancing Rules

7 Chapter 6: SSL VPN & IPsec VPN

6.1 SSL VPN Web Mode & Tunnel Mode Configuration 6.2 IPsec VPN Phase 1 & Phase 2 Fundamentals 6.3 Advanced IPsec Topologies (Hub-and-Spoke & ADVPN)

8 Chapter 7: SSL/SSH Inspection

7.1 SSL Certificate Inspection vs Deep SSL/SSH Inspection 7.2 CA Certificates, Port Handling & Inspection Exemptions

6.2 IPsec VPN Phase 1 & Phase 2 Fundamentals

Key Takeaways Explain This Topic AI

FortiOS natively defaults to route-based IPsec VPNs, where Phase 1 creates a virtual IPsec interface allowing standard routing decisions and firewall policies to govern VPN traffic.

IKE Phase 1 establishes a secure control channel between VPN peers using either Main Mode (6 messages, identity protection) or Aggressive Mode (3 messages, faster, unencrypted identity).

Diffie-Hellman (DH) groups (such as DH 14, 19, 20, 21) establish asymmetric key exchange security for Phase 1, while Perfect Forward Secrecy (PFS) forces independent DH key exchanges during Phase 2.

Phase 2 Quick Mode negotiates child security associations (SAs) and defines Phase 2 selectors; route-based IPsec typically sets selectors to 0.0.0.0/0 to delegate path selection to the routing table.

Troubleshooting IPsec negotiation relies on diagnose debug application ike -1 to inspect ISAKMP/IKE packet exchanges, proposal mismatches, and SA state transitions.

Last updated: July 2026

6.2 IPsec VPN Phase 1 & Phase 2 Fundamentals

Internet Protocol Security (IPsec) is a suite of standards that secures IP communications by authenticating and encrypting each IP packet in a data stream. In FortiOS 7.6, IPsec VPNs form the backbone of site-to-site connectivity, branch office interconnectivity, SD-WAN overlays, and remote-access remote worker infrastructure. IPsec establishes secure tunnels using the Internet Key Exchange (IKE) protocol, which operates in two distinct phases: IKE Phase 1 and IKE Phase 2 .

Route-Based vs. Policy-Based IPsec Architecture

FortiOS supports two distinct architectural implementations of IPsec VPNs: Route-Based and Policy-Based.

Feature Route-Based IPsec (Standard) Policy-Based IPsec (Legacy)

Virtual Interface Creation FortiOS automatically creates a virtual IPsec network interface upon Phase 1 creation No virtual interface is created

Traffic Forwarding Mechanism Governed by the FortiOS Routing Table (Static routes, BGP, OSPF, SD-WAN) Governed by Firewall Policy Matching (Policy encap action)

Phase 2 Selectors Set to 0.0.0.0/0 (Any to Any); subnets managed by routing Explicit local and remote subnets must match firewall policy

SD-WAN & Dynamic Routing Fully Supported Not Supported

NAT Support Standard Source/Destination NAT applied before IPsec encapsulation Complex policy-based NAT rules required

Exam Key Point: Route-based IPsec is the recommended best practice in FortiOS 7.6. Virtually all modern features—including SD-WAN, Auto-Discovery VPN (ADVPN), and dynamic routing protocols (BGP/OSPF)—require route-based IPsec virtual interfaces.

IKE Phase 1: Control Channel Negotiation

The primary objective of IKE Phase 1 is to authenticate the peer gateways and establish a secure, encrypted management channel (the IKE Security Association / SA ) to protect subsequent Phase 2 negotiations.

IKE Protocol Versions (IKEv1 vs. IKEv2)

IKEv1 : Legacy protocol. Uses separate exchanges for Phase 1 (Main/Aggressive Mode) and Phase 2 (Quick Mode).

IKEv2 : Modern standard in FortiOS 7.6. Reduces negotiation overhead (4 messages total for Phase 1 and initial Phase 2), natively supports EAP authentication, handles dynamic IP changes (MOBIKE), and improves resilience against Denial-of-Service attacks.

IKEv1 Negotiation Modes

When using IKEv1, Phase 1 can be configured in one of two negotiation modes:

Main Mode (6 Messages) :

Exchanges 6 packets to negotiate algorithms, exchange Diffie-Hellman keys, and verify identities.

Identity Protection : Identity payloads (IP addresses/certificates) are encrypted because authentication occurs after DH key exchange.

Requires static IP addresses on both peer gateways.

Aggressive Mode (3 Messages) :

Exchanges only 3 packets to achieve faster tunnel establishment.

No Identity Protection : Identity payloads and pre-shared key hashes are sent unencrypted in the initial exchange.

Required in IKEv1 dial-up scenarios where the remote peer has a dynamic IP address and pre-shared key authentication is used without certificates.

Phase 1 Parameters & Proposals

During Phase 1, peers must agree on four critical parameters:

Encryption Algorithm : AES-128, AES-256, AES-GCM-128, AES-GCM-256.

Authentication Hash : SHA-256, SHA-384, SHA-512 (or Null for GCM modes).

Diffie-Hellman (DH) Group : Determines the strength of the key exchange (e.g., Group 14 [2048-bit MODP], Group 19 [256-bit Elliptic Curve], Group 20 [384-bit EC], Group 21 [521-bit EC]).

Authentication Method : Pre-Shared Key (PSK) or PKI Digital Certificates (RSA/ECDSA signatures). config vpn ipsec phase1-interface

  • edit "To_Branch_Office"
  • set interface "port1"
  • set ike-version 2
  • set peertype any
  • set net-device enable
  • set proposal aes256-sha256 aes128-sha256
  • set dhgrp 14 19
  • set remote-gw 198.51.100.25
  • set psksecret ENC dXNlcnNlY3JldA==
  • next
  • end
  • IKE Phase 2: Data Channel Negotiation (Quick Mode)

Once Phase 1 establishes the secure IKE SA, IKE Phase 2 negotiates child security associations ( IPsec SAs ) used to encrypt and authenticate actual user payload traffic.

Key Phase 2 Parameters

Encapsulation Security Payload (ESP) Proposals : Defines encryption and authentication algorithms specifically for user data (e.g., set proposal aes256-sha256 ).

Phase 2 Selectors ( local-subnet & remote-subnet ) :

Defines the source and destination traffic subnets authorized to enter the IPsec tunnel.

In Route-Based IPsec , selectors are configured as 0.0.0.0/0 (Local) to 0.0.0.0/0 (Remote). This allows any traffic directed into the IPsec virtual interface by the routing table to be encrypted.

Both peers must have matching inverse selectors (Local Subnet on Gateway A must match Remote Subnet on Gateway B).

Perfect Forward Secrecy (PFS)

When PFS is enabled ( set dhgrp ), Phase 2 forces a brand-new, independent Diffie-Hellman key exchange for every Quick Mode SA creation.

Security Benefit : If an attacker compromises the long-term Phase 1 secret key in the future, they cannot retroactively decrypt past Phase 2 session traffic because Phase 2 keys were generated independently via PFS DH exchanges. config vpn ipsec phase2-interface

  • edit "To_Branch_Office_P2"
  • set phase1name "To_Branch_Office"
  • set proposal aes256-sha256
  • set dhgrp 14 19
  • set pfs enable
  • set auto-key-keep-alive enable
  • set src-subnet 0.0.0.0 0.0.0.0
  • set dst-subnet 0.0.0.0 0.0.0.0
  • next
  • end
  • Site-to-Site vs. Dial-Up IPsec Tunnels

Site-to-Site ( type static ) : Connects two fixed locations with known static public IP addresses. Both gateways actively initiate negotiation.

Dial-Up ( type dynamic ) : Used when remote gateways (spokes or FortiClient users) have dynamic public IP addresses. The Hub acts as a responder ( type dynamic ) and waits for incoming connections, identifying peers via Peer ID ( set peerid ) or digital certificates.

Diagnostic & Troubleshooting CLI Reference

Troubleshooting IPsec issues requires inspecting real-time IKE daemon events using diagnose debug application ike -1 . # 1. Enable real-time IKE debug output

  • diagnose debug reset
  • diagnose debug application ike -1
  • diagnose debug enable
  • # 2. Trigger tunnel renegotiation
  • diagnose vpn tunnel up To_Branch_Office_P2
  • # 3. View active IPsec SA summary
  • get vpn ipsec tunnel summary
  • # 4. View detailed Phase 1 & Phase 2 SA state
  • diagnose vpn tunnel list name To_Branch_Office_P2
  • Common Debug Log Indicators

no SA proposal chosen : Indicates a mismatch in Phase 1 or Phase 2 encryption/hash/DH algorithms.

PSK mismatch / authentication failed : Incorrect pre-shared key configured on one of the gateways.

selector mismatch : Local and remote subnets in Phase 2 do not match reciprocally between peers.

Loading diagram... IKE Phase 1 and Phase 2 Negotiation Sequence