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.
enguyen3467
Staff
Staff
Article Id 264530
Description

This article describes that due to the need to navigate the traffic between iBGP neighbors to a central FortiGate (a Hub) all the time, it was necessary to create a star topology with the Hub connecting to multiple Spoke using Site-to-Site IPsec tunnel.

It is necessary to make that the Hub will advertise Spoke’s internal subnet to the other Spokes with itself as the next hop 

Topology:  

 

Spoke-1 ==(To-Hub | To-Spoke-1)== Hub ==(To-Spoke-2 | To-Hub)== Spoke-2 

 

Tunnel interfaces on Hub and both spokes which creation is not covered in this article but they will be referenced in later section for firewall policies and BGP:

 

Hub: 

  1. Tunnel interface to Spoke 1 - 'To-Spoke-1'.
  2. Tunnel interface to Spoke 2 - 'To-Spoke-2'.

 

Spoke1:

  1. Tunnel interface to Hub - 'To-Hub'.

 

Spoke2: 

  1. Tunnel interface to Hub - 'To Hub'.

 

Additional internal networks will be 10.x.0.0/24 and 172.16.x.0/24 with: 

  • .0 belong to Hub 
  • .1 belong to Spoke-1 
  • .2 belong to Spoke-2 
Scope FortiGate v6.4.2 and above.
Solution

Be aware that implementing the star topology will produce a single point of failure (i.e. the Hub).

The recommendation is to configure the ADVPN tunnel with BGP as the routing protocol between the Hub and Spoke to mitigate this issue and decrease the workload of network processing on the Hub through the creation of a dynamic VPN tunnel (aka shortcuts) between Spokes.

 

For the creation of the Site-to-Site IPSec tunnel between the Hub and its Spokes, it is always recommended to create through the IPsec wizard to prevent any human error that may cause the tunnel not to come up. An additional benefit when using the wizard is that the firewall will automatically create an address group with address objects for the local and remote subnet(s), firewall policies for traffic between internal resources and tunnel, and a static route to reach the remote subnets through the IPsec tunnel and through the blackhole interface if the tunnel goes down.

 

enguyen3467_0-1689621424706.png

 

enguyen3467_1-1689621424714.png

 

To configure any advanced settings like changing the phase1 and phase2 proposals, it is possible to convert to a custom tunnel to see more settings:

 

enguyen3467_2-1689621424715.png

 

 

For phase2 configuration, in this example, local and remote subnets are set to all, and firewall policies will have source and destination addresses set to 'all'. It is possible to control which subnets got through the tunnel through the BGP advertisement and firewall policies to restrict subnets.

 

enguyen3467_3-1689621424716.png

 

enguyen3467_4-1689621424716.png

 

After going through the configuration, the following tunnels should be created and up on both phases on Hub and Spokes respectively:

 

enguyen3467_5-1689621424718.png

 

enguyen3467_6-1689621424720.png

 

enguyen3467_7-1689621424722.png

 

To establish the BGP neighbors between the Hub and Spokes, it is recommended to use the Loopback interface due to its nature of always staying up.

 

enguyen3467_8-1689621424723.png

 

enguyen3467_9-1689621424724.png

 

enguyen3467_10-1689621424725.png

 

Configure basic BGP configuration on the GUI on both Hub and Spoke:

 

enguyen3467_11-1689621424727.png

 

enguyen3467_12-1689621424728.png

 

enguyen3467_13-1689621424730.png

 

For any internal networks to route through the tunnel, a pair of firewall policies would be necessary for incoming and outgoing traffic between the tunnel and internal interfaces. This can be achieved with the IPSec wizard.

However, in the future, adding more internal interfaces with internal subnets to go through the tunnel, will be a requirement.

 

enguyen3467_14-1689621424733.png

 

After completing the configuration, we will dive into additional settings needed, configured either via the GUI or the CLI on each device.

 

Spoke:

Configure the following BGP settings. This can be achieved either through the CLI or through the GUI setting for newer FortiOS version (7.0.x or 7.2.x and above):

 

config router bgp

    set ibgp-multipath enable

    set additional-path enable

    config neighbor

        edit "192.168.0.1"

            set soft-reconfiguration enable

            set interface "To-Hub"<----- specify the interface used to participate in the BGP network.

                    set remote-as 65400

            set update-source "Loopback1"<----- specify the source IP used to reach the BGP neighbor

        next

    end

end

 

  • The first 2 commands after getting to the 'config router bgp' setting are used to make sure the Hub will advertise all the paths to the same destination as the best path.

 

Hub:

Since the Hub is the center point in the star topology to forward internal traffic from one spoke to another, a pair of firewall policies to allow traffic from one tunnel to another is needed.

Alternatively, to prevent any human errors while creating the firewall policies, these tunnels can be grouped in an interface zone and set to all intra-zone traffic.

The risk of missing a tunnel or two when configuring the firewall policies or when adding them to the interface zone is another concrete reason for configuring the Hub and Spoke model using the ADVPN tunnel instead.

 

Here is an example of the firewall policies pair needed:

 

enguyen3467_15-1689621424735.png

 

Configure the following BGP settings. This can be achieved either through the CLI or through the GUI settings for newer FortiOS version (7.0.x or 7.2.x and above):

 

config router bgp

    set ibgp-multipath enable

    set additional-path enable

    config neighbor

        edit "192.168.2.1"

            set next-hop-self-rr enable<----- To set the Hub as the next-hop when advertising to other Spoke.

            set soft-reconfiguration enable

            set interface "To-Spoke-2"

            set update-source "Loopback-Hub"

            set route-reflector-client enable <----- To enable the iBGP advertisement

        next

        edit "192.168.1.1"

            set next-hop-self-rr enable

            set soft-reconfiguration enable

            set interface "To-Spoke-1"

            set update-source "Loopback-Hub"

            set route-reflector-client enable

        next

    end

 

The 'next-hop-self' setting will not work on the next hop of iBGP routes reflected by the Hub.

It only modifies the next hop of local or eBGP learned routes.

 

After configuring all the settings needed, please reset the BGP session:

  • Soft reset: exec router clear bgp all soft
  • Hard reset: exec router clear bgp all
  • Restart the router software (for any configuration with route map/prefix-list configured):

execute router restart

 

To verify the BGP routes advertised by the Hub on each spoke. Pay attention to routes installed as static (S) by IKE process on the hub and spokes, namely:

On the hub to both spokes loopback addresses reachable via the tunnel interface:

On the hub:

S 192.168.1.1/32 [10/0] is directly connected, To-Spoke1

S 192.168.2.1/32 [10/0] is directly connected, To-Spoke2

On spoke 1:

S 192.168.0.1/32 [10/0] is directly connected, To-Hub

On spoke 2:

S 192.168.0.1/32 [10/0] is directly connected, To-Hub

 

enguyen3467_16-1689621424737.png

 

enguyen3467_17-1689621424740.png

 

enguyen3467_18-1689621424746.png

 

enguyen3467_19-1689621424753.png

 

Related documents: