Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
eip1
/ 50
eip2
/ 50
This labs demontrates how to secure and manage outbound traffic using FortiGate next-gen firewall and multiple public IP addresses.
Using FortiGate as a secure gateway for cloud workloads provides traffic monitoring going way beyond cloud native solutions available in Google Cloud. Thanks to its next-gen firewall capabilities FortiGate can apply precise access policies based on VM and K8S metadata, internet service types, website categories, geography and more. Thanks to use of external Network Load Balancer, it's also possible to allow connections using specific public IP addresses depending on the type of traffic. In this lab you focus on enabling outbound connectivity and managing multiple public IPs associated with FortiGate HA cluster.
In this lab you complete the following tasks:
Before you start completing the lab tasks it is worth spending a moment learning your lab environment and consoles. You can skip this part if you are already familiar with Fortinet Qwiklabs.
Qwiklabs environment will create a dedicated temporary access to the Google Cloud for you. You do not need your own accout to complete the labs. The environment will be available for a limited time - there is no possibility to pause the lab so make sure you have time to complete it. If you don't make it - don't worry, you can start the lab again later.
The webpage you are reading right now is your Lab Console. You will find the instructions how to complete each step here. On the right you can find navigation frame with links to individual sections of the lab. After you start the lab, on the left side under the Start Lab / End Lab button you will find the time left for the lab, a button opening your GCP Console and a series of information you will need to complete the lab. Start your lab now if you haven't done so yet.
Clicking the Open Console button on top left will open a new browser tab with Google login form. Use the
On the left you will find a list of all services available in GCP which can be toggled on and off using the "burger menu" icon in the top-left corner. Commonly used in Fortinet labs are Compute Engine, VPC network, and Network services. The latter is not visible in the default view and can be found after expanding the list using MORE PRODUCTS link at the bottom. Feel free to use pin / unpin button visible after hovering over list elements to build your own list of most used services.
Products, individual resources and documentation can be also easily found using the search bar located at the top of the screen.
FortiGate virtual appliances can be managed using web GUI available over HTTPS protocol on the default port or using command line interface in GUI or via SSH. Configuration of FortiGate HA cluster is managed only using the primary instance and automatically replicated to secondary instance. Secondary instance management console can be optionally accessed using its public IP address to verify the clustering and replication status.
The initially deployed architecture consists of a pair of FortiGate appliances deployed in the usual active-passive high-availability setup, two workload servers and a proxy. All three workload servers are deployed behind the firewalls without public IP address - they can be reached from Internet and they can reach Internet only through FortiGates.
Initially there are 4 public IP addresses:
ELB frontend is configured in FortiGate as a Virtual IP and redirected to the proxy server giving access to workload server1 (
Both workload servers are running a simple web application showing their names and IP address used when they try to access Internet (every HTTP connection to the server makes it initiate a new connection to Internet). Throughout this lab you will be manipulating settings to change the IP address shown by server1 and server2.
Once your lab is provisioned, open your Google Cloud web console by clicking the Open console button. Explore the initial setup, in particular:
Start by opening web page for Test server 1 (you can find the link in Lab Details on the left side of the instructions). You will notice that the web app reports the public address which can be found in Cloud Console VPC network / IP addresses section - the one attached to Cloud NAT.
Open the FortiGate console to trace the connection logs:
In the Source section of Log Details you will notice that FortiGate performed a source NAT to its private IP address on port1 interface (in 172.20.0.0/24 subnet). After processing by FortiGate, the connection was source-NATted again by Cloud NAT before being finally passed to Internet with the public IP reported by the web app.
To control the public IP address used by the connection you have to modify the settings in firewall policy:
The IP address reported by the web app has changed to the same one you used to access the web app - the frontend address of External Load Balancer. If you check the FortiGate traffic logs you will notice that now FortiGate source-NATs the connection straight to the public IP address. No secondary NAT is performed in this setup.
To reserve a new public IP address for use with the FortiGate cluster you have to define a new frontend for the external load balancer by performing the following steps:
Each load balancer frontend generates its own health probes, which need to be responded. In a standard design health probes are responded directly by FortiGate and the easiest way to configure then will be:
In order to use the new external IP address for outbound traffic you have to:
In this lab you use a dynamic address object to differentiate public IP based on Google Cloud network tag. Dynamic addresses based on metadata are commonly used in public cloud environments and greatly enhance agility of your firewall configuration.
FortiGate uses objects called IP Pools to configure source NAT. To configure a new one:
To see if we can use different public addresses for different workloads you'll create a dynamic address selecting all VMs with via-new-public-ip network tag (in this lab - server2 VM instance).
In this subtask you create a new firewall policy, that makes only server2 use the new public IP address while server1 keeps using the previous one.
Open the web page for server2 (
Public address configuration remains unchanged upon the HA failover event. To simulate it:
Note that in public cloud both FortiGate instances can use the same public IP address without triggering a duplicated IP problem.
You completed the lab and learned how to manage outbound traffic using multiple public IP addresses. Thank you for using Fortinet Qwiklabs.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one