Skip to content

Site-to-Site IPsec IKEv2 Route-Based VPN Tunnel Deployment

SOP-NET-003 Standard Operating Procedure v1.0.0
Last Updated 2026-10-14
Author Systems Administration Team
đŸ’ģ Target OS / Systems:
Fortinet FortiGate (FortiOS)Cisco IOS-XE / ASApfSense / OPNsense

Before you begin

  • Applies to:Route-based site-to-site VPN deployment using IPsec and IKEv2.
  • Where to start:Start with the management consoles for both VPN peers and coordinate the change between sites.
  • What you need:Have approved peer addresses, routed prefixes, authentication material, and the agreed IKE and IPsec settings.
Guide tools
Guide tools
0/0 Steps (0%)

Scope, Architecture & Modern Cryptographic Baseline

Connecting enterprise branches, remote corporate sites, and cloud providers (Azure / AWS) requires secure, high-throughput encrypted tunnels.

This procedure establishes a Route-Based Virtual Tunnel Interface (VTI) utilizing IKEv2. Unlike legacy policy-based VPNs, route-based tunnels decouple encryption from traffic selectors, treating the tunnel as a native routable interface.

Cryptographic Baseline Specification (NIST / NSA Suite B Compliant)

Phase ParameterEnterprise Standard BaselineLegacy Insecure (STRICTLY BANNED)
IKE ProtocolIKEv2 (Strictly enforced)IKEv1 (Banned)
Phase 1 EncryptionAES-256-GCM (or AES-256-CBC)3DES, DES, Blowfish
Phase 1 Hash / PRFSHA-384 (or SHA-256)MD5, SHA-1
Diffie-Hellman GroupGroup 19 (ECP-256) or Group 21 (ECP-384)Group 1, Group 2, Group 5
Phase 2 EncryptionAES-256-GCM (Integrated Auth)3DES, NULL
Perfect Forward SecrecyPFS Enabled (DH Group 19 / 21)PFS Disabled
Dead Peer Detection (DPD)Enabled (Periodic 10s, Retry 3)DPD Disabled

Reference Interconnect Topology

ParameterHeadquarters (HQ)Branch Office (BR)
Public Gateway IP198.51.100.1203.0.113.1
Internal Subnet10.10.0.0/16 (Site 10)10.20.0.0/16 (Site 20)
Tunnel P2P Subnet172.16.255.1 / 30172.16.255.2 / 30
Pre-Shared Key (PSK)Cryptographically random 32+ character secret

Implementation Path A: Fortinet FortiGate (FortiOS)

Configure on the Headquarters FortiGate via CLI:

01

Configure Phase 1 (IKEv2 Proposal)

FortiOS Phase 1

Define the IKEv2 Phase 1 interface with AES-256-GCM encryption, SHA-384 PRF, and Diffie-Hellman groups 19 and 21.

config vpn ipsec phase1-interface
edit "VPN-TO-BRANCH01"
set interface "wan1"
set ike-version 2
set keylife 86400
set peertype any
set net-device disable
set proposal aes256gcm-prfsha384 aes256-sha384
set dpd on-idle
set dpd-retryinterval 10
set dhgrp 19 21
set remote-gw 203.0.113.1
set psksecret "SuperSecretRandom32CharPreSharedKey!"
next
end

02

Configure Phase 2 (IPsec VTI Interface)

FortiOS Phase 2

Configure the Phase 2 selector with AES-256-GCM and wildcard 0.0.0.0 traffic selectors to enable route-based encapsulation.

config vpn ipsec phase2-interface
edit "VPN-TO-BRANCH01-P2"
set phase1name "VPN-TO-BRANCH01"
set proposal aes256gcm
set dhgrp 19 21
set keylifeseconds 28800
set src-subnet 0.0.0.0 0.0.0.0
set dst-subnet 0.0.0.0 0.0.0.0
next
end

03

Assign IP to Tunnel Interface & Create Static Route

FortiOS Routing

Assign point-to-point IP addresses to the tunnel virtual interface and define a static route targeting the remote branch network.

config system interface
edit "VPN-TO-BRANCH01"
set ip 172.16.255.1 255.255.255.255
set remote-ip 172.16.255.2 255.255.252
set allowaccess ping
next
end
config router static
edit 102
set dst 10.20.0.0 255.255.0.0
set device "VPN-TO-BRANCH01"
next
end

04

Configure Bi-Directional Firewall Policies

FortiOS Policy

Create firewall rules permitting traffic flow between the local internal server/user networks and the remote VPN tunnel interface.

config firewall policy
edit 201
set name "LAN-TO-BRANCH-IPSEC"
set srcintf "vlan20-servers" "vlan30-users"
set dstintf "VPN-TO-BRANCH01"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
edit 202
set name "BRANCH-TO-LAN-IPSEC"
set srcintf "VPN-TO-BRANCH01"
set dstintf "vlan20-servers"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
end

Implementation Path B: Cisco IOS-XE Router / Firewall

Configure on Cisco IOS-XE router at Headquarters:

05

Configure IKEv2 Proposal & Keyring

Cisco IKEv2

Define the IKEv2 crypto proposal, policy, pre-shared key keyring, and identity match profile on Cisco IOS-XE.

configure terminal
crypto ikev2 proposal PROP-IKEV2-SECURE
encryption aes-gcm-256
prf sha384
group 19
exit
crypto ikev2 policy POL-IKEV2-SECURE
proposal PROP-IKEV2-SECURE
exit
crypto ikev2 keyring KEYRING-BRANCH01
peer BRANCH01
address 203.0.113.1
pre-shared-key SuperSecretRandom32CharPreSharedKey!
exit
exit
crypto ikev2 profile PROF-IKEV2-BRANCH01
match identity remote address 203.0.113.1 255.255.255.255
authentication remote pre-share
authentication local pre-share
keyring local KEYRING-BRANCH01
dpd 10 3 on-demand
exit

06

Configure IPsec Transform-Set & Profile

Cisco IPsec

Create the ESP-GCM-256 transform set in transport mode and bind it to the IPsec profile with Perfect Forward Secrecy (PFS Group 19).

crypto ipsec transform-set TS-AES256-GCM esp-gcm 256
mode transport
exit
crypto ipsec profile PROF-IPSEC-VTI
set transform-set TS-AES256-GCM
set ikev2-profile PROF-IKEV2-BRANCH01
set pfs group19
exit

07

Configure Virtual Tunnel Interface (VTI) & Routing

Cisco VTI

Define the Tunnel interface, protect it with the IPsec profile, and add a static route directing branch traffic into the tunnel.

interface Tunnel100
description VTI-TO-BRANCH01
ip address 172.16.255.1 255.255.255.252
tunnel source GigabitEthernet0/0/0
tunnel mode ipsec ipv4
tunnel destination 203.0.113.1
tunnel protection ipsec profile PROF-IPSEC-VTI
exit
ip route 10.20.0.0 255.255.0.0 Tunnel100
write memory

Implementation Path C: pfSense / OPNsense Firewall

08

Configure Phase 1 & Routed VTI Phase 2

pfSense IKEv2

In VPN → IPsec → Tunnels, configure IKEv2 Phase 1 with AES-GCM (256 bits), PRF SHA384, DH Group 19, and create a Routed (VTI) Phase 2.

Phase 1:
- Key Exchange version: IKEv2
- Interface: WAN
- Remote Gateway: 203.0.113.1
- Encryption: AES-GCM (256 bits) | PRF: SHA384 | DH Group: 19 (256-bit ECP)
- Lifetime: 86400 | DPD: Enable (Delay 10, Retries 3)
Phase 2 (Routed VTI):
- Mode: Routed (VTI)
- Local Network: 172.16.255.2/30 | Remote Network: 172.16.255.1/30
- Protocol: ESP | Encryption: AES256-GCM | PFS Group: 19

09

Assign Interface & Create Static Route

pfSense Routing

Assign the new ipsec VTI interface, configure the gateway, add a static route for the headquarters network, and allow IPsec traffic.

1. Interfaces -> Assignments: Assign the new ipsec VTI interface.
2. System -> Routing -> Gateways: Verify gateway 172.16.255.1.
3. System -> Routing -> Static Routes: Route 10.10.0.0/16 via 172.16.255.1.
4. Firewall -> Rules -> IPsec: Add pass rule for required corporate traffic.

Operational Verification & Emergency Rollback Procedure

10

Validate Phase 1 / Phase 2 SAs & Ping Across VTI

Verification

Verify security associations across both gateways and confirm bidirectional ping reachability over the encrypted tunnel interface.

# On Fortinet FortiGate:
diagnose vpn ike gateway list name "VPN-TO-BRANCH01"
diagnose vpn tunnel list name "VPN-TO-BRANCH01-P2"
# On Cisco IOS-XE:
show crypto ikev2 sa
show crypto session detail
# Ping validation across tunnel:
ping 172.16.255.2 source 172.16.255.1

11

Administrative Tunnel Shutdown & Debug Isolation

Rollback

If an unstable tunnel flaps continuously, administratively disable the Phase 1 interface and inspect debug logs for mismatched cryptographic proposals.

# On FortiGate:
config vpn ipsec phase1-interface
edit "VPN-TO-BRANCH01"
set status disable
end
# On Cisco IOS-XE:
interface Tunnel100
shutdown
# Debug proposal mismatches:
# FortiOS: diagnose debug application ike -1
# Cisco: debug crypto ikev2

Comments