Deploying FortiGate-VM A-A HA load balancer sandwich
FortiOS supports deploying FortiGate-VM bring your own license (BYOL) for IBM Cloud. IBM Cloud users can purchase and deploy FortiGate-VMs. The following describes the steps that you take to create and access FortiGate-VM BYOL in active-active (A-A) state in IBM Cloud.
This scenario uses the following load balancers (LB):
- External LB, which sends traffic from the Internet to the FortiGate-VMs
- Internal load balancer, which sends internal traffic to the FortiGate-VMs.
The following lists the steps to configure this deployment:
- Create a new virtual private cloud (VPC). See To create a new VPC:.
- Deploy the FortiGate-VMs. See To deploy the FortiGate-VMs:.
- Allow IP address spoofing. See To allow IP address spoofing:.
- Configure access for the FortiGate-VMs. See To configure access for the FortiGate-VM:.
- Access the FortiGate-VMs. See To access the FortiGate-VMs:.
- Create a network load balancer (NLB). See To create NLBs:.
- Create and change route tables. See To create and change route tables:.
- (Optional) Create an Ubuntu instance in the workload subnet for testing. See (Optional) To create an Ubuntu instance in workload subnet for testing:.
- Test the FortiGate-VMs. See To test the FortiGate-VMs:.
To create a new VPC:
- Go to VPC Infrastructure > Network > VPCs.
- Select the Geography and Region.
- Enter a name.
- Click Create.
- Deselect Create a default prefix for each zone.
Deselecting Create a default prefix for each zone is recommended so you can have more control on the subnets that you are creating.
- Click Create virtual private cloud.
- Configure the subnet:
- Click the subnet that you created.
- Go to the Address prefixes tab.
- Click Create.
- Set your IP Range and Location.
- Click Create.
- Go to the Overview tab.
- You must create at least two subnets for the FortiGate-VM: one external (public) and one internal. This example also creates an optional subnet to add a virtual machine for testing purposes. Scroll to Subnets in this VPC session and click Create. Configure the following subnets:
- Configure the external (public) subnet:
- Ensure to select the desired VPC.
- Set the IP address range for the subnet.
- Enable the Public gateway attach.
- Configure other fields as desired. In this example, the external subnet is named external.
- Click Create subnet.
- Configure the internal subnet:
- Click Create in the Subnets page.
- Ensure to select the desired VPC.
- Set the IP address range for the subnet.
- Leave Public gateway unselected.
- Configure other fields as desired. In this example, the internal subnet is named internal.
- Click Create subnet.
- (Optional) Repeat the steps for the internal subnet to create the workload subnet. This example names this subnet workload.
- Configure the external (public) subnet:
To deploy the FortiGate-VMs:
See Deploying FortiGate-VM on IBM Cloud.
To allow IP address spoofing:
- In VPC Infrastructure, go to and select the FortiGate port1.
- Under Network interfaces, select and edit eth0/port1 or the interface used in the public/external subnet.
- Enable Allow IP spoofing.
- Click Save.
To configure access for the FortiGate-VM:
- Go to VPC Infrastructure > Compute > Virtual server instances.
- Select FortiGate 01 (fgtaa-01).
- Scroll to Network interfaces and edit eth0.
- In Floating IP address, select Reserve a new floating IP.
- Click Save.
- Copy the generated Floating IP and note it for later.
- Click the associated security group.
- Go to the Rules tab and edit the existing rule or create a new rule allowing all TCP and UDP traffic.
- Repeat steps 1-6 for FortiGate 02 (fgtaa-02).
To access the FortiGate-VMs:
- Log in to FortiGate 01:
- Using your browser, access FortiGate 01 with the floating IP address that you created: https://<Floating IP address>.
- Ignore certificate issues.
- Click Accept on Login Disclaimer.
- Log in using the following credentials:
- For the username, enter admin.
- For the password, enter the virtual server instance ID. You can find this value in IBM Cloud.
- Change the default password and log in.
- If you did not license the FortiGate-VM during deployment with user data, you must do so now. FortiGate reboots after you insert the license. Log in again.
- If you created an optional subnet to the workload, you must create a route to access it. Create the route:
- Go to Network > Static Routes.
- Click Create New
- In the Destination field, select Subnet, then enter the workload subnet.
- In the Gateway Address field, enter the port2 subnet first valid IP address.
- Click OK.
- Open the FortiOS CLI and run the following commands to enable system probe-response:
config system probe-response
set mode http-probe
end
config sys interface
edit port1
set allowaccess ping https ssh http fgfm probe-response
next
edit port2
set allowaccess ping https ssh http fgfm probe-response
end
- Repeat steps 1-6 for FortiGate 02.
You can use FortiManager or the autoscale feature on FortiOS to sync config between the VMs. This example uses the autoscale feature. It does not enable autoscaling and only syncs the config.
- Note the FortiGate 01 port2 address.
- On FortiGate 01, open the CLI and enter the following:
config system auto-scale set status enable set role primary set sync-interface "port2" set psksecret "averystrongpassword" end
- On FortiGate 02, open the CLI and enter the following:
config system auto-scale set status enable set role secondary set sync-interface "port2" set primary-ip FGT_01_PORT2_IP set psksecret "averystrongpassword" end
-
Execute the following command to check the autoscale sync status of both FortiGates. If both FortiGates are not visible in the output, log out, wait a couple of minutes, and log in again:
diagnose sys ha autoscale-peers
To create NLBs:
- You must create one LB for external traffic and another for internal traffic:
- Go to VPC Infrastructure > Network > Load balancers. Click Create+.
- Choose Network load balancer.
- Configure the region, name, and VPC as desired. This example names the LB external-nlb.
- Leave the type as public.
- In Subnet, select the external subnet that you created.
- Create a backend pool:
- In Back-end pools, click Create pool.
- Enter a name. This example names the LB beext-pool.
- Click Create.
- Attach the external subnet to the backend line:
- In the backend line created, click Attach server.
- Select the external subnet.
- Select both FortiGates and in the Server port field, enter 8008.
- Click Attach.
- Create a listener:
- Under Front-end listeners, click Create listener.
- Select the back-end pool that you created.
- If desired, you can choose to redirect only one port or a port range. These ports are forwarded to FortiGate external interfaces. Click Create.
- Ensure that the security group used allows all desired traffic.
- Click Create load balancer.
- Create the internal load balancer:
- Go to VPC Infrastructure > Network > Load balancers. Click Create+.
- Choose Network load balancer.
- Configure the region, name, and VPC as desired. This example names the LB internal-nlb.
- For Type, select Private.
- Enable Routing mode.
- In Subnet, select the internal subnet that you created.
- Create a backend pool:
- In Back-end pools, click Create pool.
- Enter a name. This example names the LB beint-pool.
- Click Create.
- Attach the external subnet to the backend line:
- In the backend line created, click Attach server.
- Select the internal subnet.
- Select both FortiGates and in the Server port field, enter 8008.
- Click Attach.
- Create a listener:
- Under Front-end listeners, click Create listener.
- Select the backend pool that you created.
- Ensure that the security group used allows all desired traffic.
- Click Create load balancer.
- Wait for both LB statuses to change to Active.
- When their statuses show as Active, click them and copy their IP addresses. The internal LB shows two IP addresses. Only copy the first IP address.
To create and change route tables:
You must change route tables to the newly created LB.
- Create a route table:
- Go to VPC Infrastructure > Network > Routing tables.
- Select your VPC and click Create+.
- Name the table as desired. This example names the table rtb-external.
- Leave all the fields at their default values and click Create routing table.
- In the newly created route table, click its number of attached subnets.
- Click Attach+, select the external subnet, and click Attach.
- Return to the routing table list and click the other route table with the VPC default tag.
- Configure a route for the external subnet:
- Scroll to Routes and click Create+.
- Name the route as desired. This example names the route tointernet.
- In the Destination CIDR field, enter 0.0.0.0/0.
- For Action, select Deliver.
- In the Next hop field, enter the internal LB IP address.
- Save.
- Configure a route for the internal subnet:
- Click Create+ under Routes.
- Name the route as desired. This example names the route tointernal.
- In the Destination CIDR field, enter 10.6.1.0/24. This is your internal subnet CIDR.
- For Action, select Delegate.
- Save.
- Configure a route for the optional workload subnet:
- Click Create+ under Routes.
- Name the route as desired. This example names the route toworkload.
- In the Destination CIDR field, enter 10.6.2.0/24. This is your workload subnet CIDR.
- For Action, select Delegate.
- Save.
(Optional) To create an Ubuntu instance in workload subnet for testing:
- Go to VPC Infrastructure > Compute > Virtual server instances.
- Click Create.
- Configure the Ubuntu instance:
- Configure Region, Zone, and Name as desired. This example names the Ubuntu instance ubuntu-testing-01.
- Under Image and profile, click Change image.
- Search for and select Ubuntu, and save.
- Choose the desired profile.
- Choose or create an SSH key.
- Under Networking, select the VPC previously created.
- Edit Network interfaces on eth0 and select the workload subnet.
- Click Create virtual server.
To test the FortiGate-VMs:
- As your FortiGate-VMs are under the external LB, access the FortiGate by entering the external LB public IP address and the FortiGate HTTPS port.
- Create a virtual IP object (VIP). This example redirects port 2222 to port 22 (SSH). Complete the configuration as fits your environment and remember that you have to set this port in the external LB to forward the traffic.
- Go to Policy & Objects > Firewall Policy and click Create New.
- Configure as follows:
- For Type, select Standard.
- From the Incoming Interface dropdown list, select port1.
- From the Outgoing Interface dropdown list, select port2.
- For Source, select all.
- For Destination, select the VIP that you created.
- For Service, select SSH.
- For Action, select Accept.
- Configure other fields as desired.
- Test the access. You should have access to your Ubuntu instance.