IPSec site-to-site IKEv2 between Peplink B One Plus and FortiGate

This guide shows how to configure an IPsec IKEv2 site-to-site VPN between a Peplink B One Plus and a FortiGate firewall.

The goal is to provide secure communication between the Peplink LAN 192.168.50.0/24 and the FortiGate LAN 192.168.1.0/24.

Network Topology

Peplink B One Plus
WAN Interface: WAN 2
Public IP: 87.121.118.170
Local Network: 192.168.50.0/24

FortiGate
WAN Interface: BackUp (wan2)
Public IP: 87.121.118.173
Local Network: 192.168.1.0/24

VPN Networks:
192.168.50.0/24 <--- IPsec IKEv2 ---> 192.168.1.0/24

Open the Peplink IPsec VPN configuration and create a new profile.

Configure the basic VPN settings:

Name: Fortigate
Active: Enabled
IKE Version: IKEv2
Remote Gateway: 87.121.118.173
IPsec Type: Policy-based
Local Network: 192.168.50.0/24
Remote Network: 192.168.1.0/24
Authentication: Pre-shared Key

Use the same strong pre-shared key on both Peplink and FortiGate.

Configure the IKEv2 Phase 1 proposal:

Encryption: AES-CBC-256
Authentication: SHA256
DH Group: Group 5
SA Lifetime: 86400 seconds

Configure the IPsec ESP proposal:

Encryption: AES-CBC-128
Authentication: SHA256
PFS Group: Group 5
SA Lifetime: 43200 seconds

Under WAN Connection Priority, select WAN 2 as the preferred connection.

Configure IPsec on FortiGate

Create a new IPsec tunnel on the FortiGate and configure the network parameters:

IP Version: IPv4
Remote Gateway: Static IP Address
Remote IP: 87.121.118.170
Interface: BackUp (wan2)
Local Gateway: Primary IP
Local Public IP: 87.121.118.173
NAT Traversal: Enable
Keepalive: 10
DPD: On Demand
DPD Retry Count: 3
DPD Retry Interval: 20 seconds

Configure FortiGate Authentication and Phase 1

Configure the same pre-shared key and matching IKEv2 parameters:

Authentication: Pre-shared Key
IKE Version: IKEv2
Encryption: AES256
Authentication: SHA256
Diffie-Hellman: Group 5
Key Lifetime: 86400 seconds

Configure FortiGate Phase 2

Create the Phase 2 selector for the two protected networks:

Name: Peplink
Local Address: 192.168.1.0/24
Remote Address: 192.168.50.0/24

The Phase 2 cryptographic parameters must match the Peplink configuration:

Encryption: AES128
Authentication: SHA256
PFS Group: Group 5
Key Lifetime: 43200 seconds

Configure FortiGate Firewall Policies

Allow traffic between the FortiGate LAN and the IPsec tunnel. Firewall policies should permit communication in both required directions:

192.168.1.0/24 -> IPsec Tunnel -> 192.168.50.0/24
192.168.50.0/24 -> IPsec Tunnel -> 192.168.1.0/24

Source NAT should normally be disabled for traffic between the two VPN networks.

After both sides are configured, the Peplink IPsec VPN status should become active and show the protected networks:

Fortigate WAN 2
192.168.50.0/24 <-> 192.168.1.0/24

Verify the VPN on FortiGate

Check the IPsec tunnel status from the FortiGate CLI:

get vpn ipsec tunnel summary

For detailed IPsec Security Association information:

diagnose vpn tunnel list

Check the IKE gateway status:

get vpn ike gateway

Test Traffic Through the VPN

Test communication between hosts in the two networks:

Peplink LAN: 192.168.50.0/24
FortiGate LAN: 192.168.1.0/24

If the tunnel is established but traffic does not pass, verify the Phase 2 selectors, firewall policies and that NAT is not applied to VPN traffic.


Screenshot with configurations

Below is screenshot with configurations on both sides.