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
FortiGate Fabric Connector (also known as "SDN Connector") for Google Cloud is a powerful tool which allows leveraging cloud metadata instead of IP addresses and subnets when configuring firewall policies. In this lab you configure the connector and learn how to create dynamic address objects in FortiGate next-gen firewall.
Note: this lab does not cover using SDN Connector for HA failover.
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. In this lab you will use 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.
This lab resources (VM instances and VPC networks) are distributed across two projects - IDs of both will be listed on the left once the lab starts and provisions. Use the drop-down located in the top bar to switch between the projects. Initially the RECENT tab will show only one project, go to ALL to show all. You might find it convenient to open two consoles - one for each project.
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.
In this lab you complete the following tasks:
This lab uses a simplified architecture with a single FortiGate. Two protected servers are connected to two different VPC networks located in separate projects. VPC networks are connected using VPC Peering. Both servers are assigned a network tag demo-tag
Google IAM offers thousands of very precise permissions defining access to the services. Often permissions are mapped 1-to-1 with API methods (eg. compute.instances.stop or compute.instances.start). Individual permissions are grouped into Roles to make them manageable. Besides default roles you can create custom roles for special use. You will now create a custom read-only role for FortiGate SDN Connector.
Roles cannot be assigned direcly to VM instances as they do not have an IAM identity themselves. Google Cloud IAM supports two types of identities: user accounts and service accounts. In the next step you will create a new service account and assign it the custom role created earlier in your project.
Write down or copy the service account e-mail. You will need it later in Task 4.
Once you have your service account ready you can configure VM instances to use it. FortiGates can impersonate either a manually configured service account or use metadata service to leverage the service account assigned to a VM. For FortiGates running in Google Cloud it is recommended to use the IAM metadata.
It's time to configure FortiGate to resolve dynamic addresses.
Start by configuring FortiGate to query Google Compute API for metadata:
Now configure a new address object, which you can later use in firewall policy:
Service accounts and custom roles are linked to projects but service accounts (just like user accounts) can be given access to multiple projects. You first configure a copy of the FortigateSdnReader role in second project and then assign it to the existing service account.
FortiGate automatically detects only the project it is running in. In multi-project deployments you have to explicitly provide the list of all projects in the configuration.
Automatic retrieval of service account token you used above is available only for network virtual appliances running in Google Cloud. But you can use external fabric connector with any FortiGate regardless of form factor or cloud it is running in. In this case authentication of SDN Connector must be configured manually. In this task you reconfigure SDN connector to use manual key configuration instead of automatic token retrieval from IAM metadata.
jq utility: cat service_account-key.json | jq ".private_key" -r
-----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- and replace \\n with \r\n
In FortiGate web console click the terminal button to open FortiGate CLI. To debug the GCP connector issue the following commands:
You learned how to configure FortiGate to leverate cloud metadata for automatic discovery of network addresses. You can now end the lab by clicking End lab button.
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