FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Mrinmoy
Staff
Staff
Article Id 217333
Description This article describes configuring Site-to-site IPSec VPN in Central SNAT mode with overlapping subnets.
Scope

FortiGate 6.0 or above.

Solution

Let's consider there are 2 sites (head office and branch) where the following configuration shows a site-to-site IPSec VPN based on the following criteria:

 

1) Route-based VPN.

 

2) Overlapping networks. Both sites have the same LAN subnet 192.168.1.0/24.

 

3) In the head office firewall, Central SNAT is configured.

 

4) In branch office firewall policy-based NAT is configured.

 

Mrinmoy_0-1657825625033.png

 

As there is an overlapping network (192.168.1.0/24), the 10.10.1.0/24 subnet will be used for the head office and 10.10.2.0/24 for the branch.

 

 ****************************************************************

Configure VPN in Head office firewall:

 

1) Create a new VPN connection (VPN-->IPSec Tunnels --> Create new).

 

Mrinmoy_1-1657825625035.png

 

2) Now configure the VPN. Here authentication is preshared kay. Remote IP is the WAN IP of the Branch office. 

 

Mrinmoy_2-1657825625041.jpeg

 

3) Create 2 static routes (Network-->Static Routes) one for remote subnet 10.10.2.0/24 and another for blackhole.

 

Static Route-1: Branch office subnet

 

Mrinmoy_3-1657825625045.jpeg

 

Static Route-2: Blackhole

 

Mrinmoy_4-1657825625047.jpeg

 

4) Create 2 Addresses (Policy & Object --> Addresses).

 

The first address (Head office original IP) for the subnet is 192.168.1.0/24 and the second is Branch office new subnet 10.10.2.0/24.

 

Address 1: Head office original IP.

 

Mrinmoy_5-1657825625048.jpeg

Address 2: Branch office.

 

Mrinmoy_6-1657825625049.jpeg

 

5) Create IP-Pool (Policy & Object --> IP Pool)  for the head office's new NATTED subnet 10.10.1.0/24.

 

Mrinmoy_7-1657825625052.jpeg

 

6) Create Virtual IP (Policy & Object --> DNAT & Virtual IPs).

 

Mrinmoy_8-1657825625055.jpeg

7) Create 2 firewall policies (Policy & Object --> Firewall Policy); one for outbound (Head office to Branch) and another is inbound (from branch to head office).

 

Outbound Policy# Head office to Branch:

 

Mrinmoy_9-1657825625058.jpeg

 

Inbound Policy# From Branch to Head office:

 

Mrinmoy_10-1657825625062.jpeg

 

8 ) Now, finally create a Central SNAT policy (Policy & Object --> Central SNAT) for outbound traffic.

 

For inbound, The Virtual IP object 'Head-Office-New-IP-To-Original-IP' is created to perform DNAT, no need to add to the inbound policy.

 

Mrinmoy_11-1657825625065.jpeg

*****************************************************************

Configure VPN in Branch office firewall:

 

1) Create a new VPN connection (VPN-->IPSec Tunnels--> Create new).

 

Mrinmoy_12-1657825625066.png

 

2) Now configure the VPN. Here authentication is preshared key. Remote IP is the WAN IP of the Head office firewall.

 

Mrinmoy_13-1657825625071.jpeg

 

3) Create 2 static routes (Network-->Static Routes) one for remote subnet 10.10.1.0/24 and another for blackhole.

 

Static Route-1# For Head office.

 

Mrinmoy_14-1657825625074.jpeg

Static Route-2# For Blackhole.

 

Mrinmoy_15-1657825625075.jpeg

 

4) Create 2 Addresses (Policy & Object --> Addresses).

 

The first address (Branch office original IP) for the subnet is 192.168.1.0/24 and the second is the Head office new subnet 10.10.1.0/24.

 

Address-1: Branch office original IP.

 

Mrinmoy_16-1657825625077.jpeg

 

Address-2: Head office new IP.

 

Mrinmoy_17-1657825625078.jpeg

5) Create IP-Pool (Policy & Object -->IP Pool) for the branch office  new NATTED subnet 10.10.2.0/24.

 

Mrinmoy_18-1657825625081.jpeg

6) Create Virtual IP (Policy & Object --> Virtual IPs).

 

Mrinmoy_19-1657825625084.jpeg

 

7) Create 2 firewall policies (Policy & Object --> Firewall Policy) one for outbound (Branch to Head office) and another inbound (from head office to Branch office).

 

For outbound, NAT should enable but for inbound no, NAT is required.

 

Policy-1: Outbound (Branch to Head office)

 

Mrinmoy_20-1657825625087.jpeg

 

Policy-1: Inbound (from Head office to Branch office).

 

Mrinmoy_21-1657825625090.jpeg

 

***************************************************************

Test the configuration:

 

After successful completion of the configuration, both tunnels should be up:

 

Mrinmoy_22-1657825625090.png

 

Mrinmoy_23-1657825625091.png

 

From the Head office Test the PC (IP 192.168.1.11).

 

Mrinmoy_24-1657825625095.png

 

From the Branch office Test the PC (IP 192.168.1.22).

 

Mrinmoy_25-1657825625097.png

 

Contributors