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.
JaskiratM
Staff
Staff
Article Id 253018
Description

 

This article describes how to configure redundant IPSEC tunnel to AWS VPC on premise FortiGate.

Scope

 

JaskiratM_1-1681879705551.png

 

 

An on-premise FortiGate is connecting to an AWS VPC. The perquisites  required before following this article:

- VPC already created in the AWS environment.

- EC2 instances already deployed in AWS VPC.

- The Network Interfaces have Source check disabled:
https://community.fortinet.com/t5/FortiGate/Technical-TIP-Traffic-from-AWS-LAN-hosts-toward-remote-s...

- Also, there are no routing issues in the VPC:
https://community.fortinet.com/t5/FortiGate/Troubleshooting-Tip-General-troubleshooting-approach-to/...

 

Solution

 

1) Log in to the AWS management console and navigate to the VPC. Once inside the VPC management console, scroll the navigation pane on the left and reach out to the Virtual Private Gateway section under the VPN section:

 

JaskiratM_2-1681879820925.png

 

2) Select 'Create virtual private gateway' on the top right section of the screen. This will prompt a name for the Virtual Private Gateway.

Provide a name and select 'Create Virtual Private Gateway':

 

'Create a Virtual Private Gateway':

 

JaskiratM_3-1681879877389.png

 

 

 

3) The Virtual private gateway created above needs to be attached to the VPC (Virtual Private Cloud). Select the newly created VPG and perform an action to attach the VPG to the VPC:

 

JaskiratM_4-1681879923062.png

Choose the VPC to associate this VPG with and select 'Attach VPC':

JaskiratM_5-1681879923065.png

 

4) In the VPC management console, scroll the navigation pane on the left and reach out to the Customer Gateway section under the VPN section:

 

JaskiratM_6-1681879997094.png

 

Select 'Create Customer gateway' on the top right section of the screen. This will prompt for a name, Gateway IP address of the FortiGate, Certificates (if any), and Device(optional) for the Customer Gateway. Provide all the information and select 'Create Customer Gateway':

 

JaskiratM_7-1681880056912.png

 

5) In the VPC management console, scroll the navigation pane on the left and reach out to the 'Site-to-Site VPN connections' section under the VPN section:

JaskiratM_8-1681880103153.png


Select 'Create VPN Connection' on the top right section of the screen. This will prompt for a name, Virtual Private gateway, customer gateway, and phase-2 selectors. Provide a name, the same Virtual Private gateway created in step-2 and the same Customer gateway created in step-4.

JaskiratM_9-1681880138570.png


The next option will be to choose the 'Routing-options'.

 

SCENARIO-A: Dynamic.

If this option is chosen, the AWS environment will set up BGP automatically and will include that BGP information in the configuration file that it provides after the setup so that it can be configured on the FortiGate and the routing information can be exchanged.

Follow the below article to setup BGP on the tunnel interface in FortiGate:
https://community.fortinet.com/t5/FortiGate/Technical-Note-Dynamic-routing-BGP-over-IPsec-tunnel/ta-...



SCENARIO-B: STATIC.

If this option is chosen, static routing needs to be set up on the FortiGate along with the static route to the local subnet of FortiGate in AWS VPC. This can be achieved by going to the routing table of the VPC and adding a route as shown below:

JaskiratM_10-1681880176438.png

 

Make sure to choose the Target as the VPG created in step-2.

6) Provide the Phase-2 selector information (if-any) and select 'Create VPN Connection':

JaskiratM_11-1681880211638.png

 

7) Once the VPN connection has been completed, select download configuration:

JaskiratM_12-1681880261162.png

 

Choose the appropriate options for FortiOS versions and IKE versions according to the needs:

JaskiratM_13-1681880291221.png

 

8) The file will include information for the two IPSEC VPN connections along with 2 two BGP configurations (if Dynamic-routing was selected in step-9) Configure the IPSEC VPN tunnel and BGP (If included) by following the below articles:

https://community.fortinet.com/t5/FortiGate/Technical-Note-Dynamic-routing-BGP-over-IPsec-tunnel/ta-...

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Redundant-IPSEC-Tunnel-using-single-WAN-co...

 

10) Now a VERY IMPORTANT thing to note is that the two tunnels will be up all the time and AWS will use a random algorithm to handle traffic if FortiGate is doing load balancing for traffic across the tunnels. This could result in asymmetric routing as a packet could be sent out VPN-TUNNEL-1 and the reply to that traffic could be sent back via VPN-TUNNEL-2.

So, the redundancy logic needs to be established on the FortiGate using static route priority or SD-WAN or monitoring the tunnels, or altering the BGP routes learned from AWS.

 

Follow the articles below and choose the option that works best:

- Static Route priority:

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Redundant-IPSEC-Tunnel-using-single-WAN-co...

- SD-WAN:

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Configure-IPsec-VPN-with-SD-WAN/ta-p/20984...

- Monitoring tunnels:

https://docs.fortinet.com/document/fortigate/6.2.13/cookbook/432685/manual-redundant-vpn-configurati...

- BGP route alteration:
https://community.fortinet.com/t5/FortiGate/Technical-Tip-BGP-prefix-compared-to-static-locally-orig...
https://community.fortinet.com/t5/FortiGate/Technical-Tip-Use-BGP-Weight-attribute-to-prefer-default...

 

11) Once the steps above have been followed and the IPSEC tunnels have been configured on FortiGate, the tunnel should come up:

JaskiratM_14-1681880382724.png

 

Related documents:

https://community.fortinet.com/t5/FortiGate/Technical-Tip-BGP-prefix-compared-to-static-locally-orig...
https://community.fortinet.com/t5/FortiGate/Technical-Tip-Use-BGP-Weight-attribute-to-prefer-default...

https://docs.fortinet.com/document/fortigate/6.2.13/cookbook/432685/manual-redundant-vpn-configurati...

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Configure-IPsec-VPN-with-SD-WAN/ta-p/20984...

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Redundant-IPSEC-Tunnel-using-single-WAN-co...

https://community.fortinet.com/t5/FortiGate/Technical-Note-Dynamic-routing-BGP-over-IPsec-tunnel/ta-...

Contributors