Fortinet Fortigate Infrastructure Lab Guide For Fortios 72
Fortinet Fortigate Infrastructure Lab Guide For Fortios 72
© FORTINET
FortiGate Infrastructure
Lab Guide
for FortiOS 7.2
DO NOT REPRINT
© FORTINET
Fortinet Training Institute - Library
https://training.fortinet.com
https://docs.fortinet.com
https://kb.fortinet.com
https://fusecommunity.fortinet.com/home
Fortinet Forums
https://forum.fortinet.com
https://support.fortinet.com
FortiGuard Labs
https://www.fortiguard.com
https://www.fortinet.com/nse-training
https://home.pearsonvue.com/fortinet
https://helpdesk.training.fortinet.com/support/home
8/30/2022
DO NOT REPRINT
© FORTINET
TABLE OF CONTENTS
Change Log 6
Network Topology 7
Lab 1: Routing 8
VM Usernames and Passwords 10
Exercise 1: Configuring Route Failover 11
Verify the Routing Configuration 11
Configure a Second Default Route 12
Configure the Firewall Policies 13
View the Routing Table 15
Configure Link Health Monitors 16
Test the Route Failover 17
Restore the Routing Table 19
Exercise 2: Configuring Equal Cost Multipath and Policy Routing 21
Configure Administrative Distance 21
Change the ECMP Load Balancing Algorithm 22
Verify Traffic Routing 22
Configure Priority 24
Verify ECMP 24
Configure a Policy Route for HTTPS Traffic 26
Verify the Policy Route 27
Lab 2: VDOM Configuration 30
Exercise 1: Creating VDOMs and VDOM Objects 32
Create a VDOM 32
Create a Per-VDOM Administrator 33
Move an Interface to a Different VDOM 34
Add the DNS Service to an Interface 35
Test the Per-VDOM Administrator Account 36
Execute Per-VDOM CLI Commands 36
Exercise 2: Configuring an Inter-VDOM Link 38
Create an Inter-VDOM Link 38
Configure Routing Between VDOMs 39
Configure Firewall Policies for Inter-VDOM Traffic 41
Test the Inter-VDOM Link 42
DO NOT REPRINT
© FORTINET
Lab 3: Fortinet Single Sign-On Configuration 44
Exercise 1: Configuring FortiGate for FSSO Authentication 46
Review the FSSO Configuration on FortiGate 46
Assign FSSO Users to a Firewall Policy 48
Test FSSO 49
Lab 4: ZTNA 52
Lab 5: SSL VPN 53
Exercise 1: Configuring Web Mode SSL VPN 55
Configure the SSL VPN Settings 55
Create a Firewall Policy for SSL VPN 56
Test the SSL VPN Access 58
Add an Administrator-Based Bookmark to the SSL VPN Portal 60
Test SSL VPN Access Using the Predefined Bookmark 61
Examine the Web Mode Mechanism (Reverse HTTP Proxy) 62
Monitor an SSL VPN User 62
Exercise 2: Configuring SSL VPN Tunnel Mode 64
Add Tunnel Mode 64
Configure the Routing for Tunnel Mode 65
Configure FortiClient for SSL VPN Connections 65
Test SSL VPN in Tunnel Mode 66
Review VPN Events 67
Lab 6: IPsec VPN Configuration 69
Exercise 1: Configuring a Dial-Up IPsec VPN Between Two FortiGate Devices 72
Create Phase 1 and Phase 2 on Local-FortiGate (Dial-Up Server) 72
Create Firewall Policies for VPN Traffic on Local-FortiGate (Dial-Up Server) 74
Create Phase 1 and Phase 2 on Remote-FortiGate (Dial-Up Client) 75
Create a Static Route for VPN Traffic on Remote-FortiGate (Dial-Up Client) 77
Create the Firewall Policies for VPN Traffic on Remote-FortiGate (Dial-Up Client) 78
Test and Monitor the VPN 79
Exercise 2: Configuring a Static IPsec VPN Between Two FortiGate Devices 82
Create Phase 1 and Phase 2 on Local-FortiGate 83
Create a Static Route for VPN Traffic on Local-FortiGate 85
Create Firewall Policies for VPN Traffic on Local-FortiGate 85
Test and Monitor the VPN 87
Exercise 3: Configuring Redundant Static IPsec VPN Tunnels Between Two
FortiGate Devices 88
Prerequisites 88
Check the IPsec VPN Tunnel on Local-FortiGate 89
Review the VPN Configuration on Both FortiGate Devices 90
Test and Monitor the VPN 90
Create a Backup VPN Tunnel Using the IPsec Wizard 91
DO NOT REPRINT
© FORTINET
Review the Objects the IPsec Wizard Created 93
Adjust Routing for the Backup VPN Tunnel on Local-FortiGate 95
Review the Backup VPN Configuration on Remote-FortiGate 96
Test VPN Redundancy 96
Lab 7: High Availability 99
Lab HA Topology 99
Exercise 1: Configuring HA 103
Configure HA Settings on Local-FortiGate 103
Configure HA Settings on Remote-FortiGate 104
Observe and Verify the HA Synchronization Status 104
Verify FortiGate Roles in an HA Cluster 105
Verify Firewall Policy Configuration 106
View Session Statistics 107
Exercise 2: Triggering an HA Failover 108
Trigger a Failover by Rebooting the Primary FortiGate 108
Verify the HA Failover and FortiGate Roles 108
Trigger an HA Failover by Resetting the HA Uptime 109
Observe HA Leave and Join Messages Using Diagnostic Commands 110
Exercise 3: Configuring the HA Management Interface 112
Access the Secondary FortiGate CLI Through the Primary FortiGate CLI 112
Set Up a Reserved HA Management Interface 113
Configure and Access the Primary FortiGate Using the Reserved HA Management
Interface 114
Configure and Access the Secondary FortiGate Using the Reserved HA Management
Interface 114
Disconnect Remote-FortiGate From the Cluster 115
Restore the Remote-FortiGate Configuration 116
Lab 8: Diagnostics Performance 118
Exercise 1: Determining What Is Happening Now 120
Run Diagnostic Commands 120
Exercise 2: Troubleshooting a Connectivity Problem 122
Identify the Problem 122
Use the Sniffer 122
Use the Debug Flow Tool 123
Fix the Problem 123
Test the Fix 124
DO Change
NOTLogREPRINT
© FORTINET
Change Log
This table includes updates to the FortiGate Infrastructure 7.2 Lab Guide dated 6/13/2022 to the updated
document version dated 8/30/2022.
Change Location
In this lab, you will configure the router settings and test scenarios to learn how FortiGate makes routing
decisions.
Objectives
l Route traffic based on the destination IP address, as well as other criteria
l Balance traffic among multiple paths
l Implement route failover
l Implement policy routing
l Diagnose a routing problem
Time to Complete
Estimated: 50 minutes
5. Click OK to reboot.
© FORTINET
VM Usernames and Passwords
VM Username Password
In the lab network, Local-FortiGate has two interfaces connected to the internet: port1 and port2. In this exercise,
you will configure the port1 connection as the primary internet link and the port2 connection as the backup internet
link. Local-FortiGate should use the port2 connection only if the port1 connection is down. To achieve this
objective, you will configure two default routes with different administrative distances, as well as two link health
monitors.
After you complete the challenge, see Configure a Second Default Route on page 12.
© FORTINET
Note that, by default, static routes have a Distance value of 10 and a Priority value of 1.
You will create a second default route using the port2 interface. To make sure this second default route remains
the standby route, you will assign it a higher distance.
After you complete the challenge, see Configure the Firewall Policies on page 13.
© FORTINET
To configure a second default route
1. Continuing on the Local-FortiGate GUI, click Network > Static Routes.
2. Click Create New.
3. Configure the following settings:
Field Value
Interface port2
Administrative Distance 20
6. Click OK.
A second default route is added.
You will modify the existing Full_Access firewall policy to log all sessions. You will also create a second firewall
policy to allow traffic through the secondary interface.
© FORTINET
Take the Expert Challenge!
l Continuing on the Local-FortiGate GUI, enable logging for all sessions in the existing Full_Access
firewall policy.
l Create a second firewall policy named Backup_Access.
l Configure the Backup_Access policy to allow traffic from port3 to port2 with NAT enabled.
l Enable logging on the Backup_Access policy for all sessions.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After you complete the challenge, see View the Routing Table on page 15
All Sessions logging ensures that all traffic is logged and not only sessions inspected
by security profiles. This will assist you in verifying traffic routing using the Forward
Traffic logs.
4. Click OK.
5. Click Create New.
6. Configure a second firewall policy with the following settings:
Field Value
Name Backup_Access
© FORTINET
Field Value
Source LOCAL_SUBNET
Destination all
Schedule always
Service ALL
Action Accept
NAT Enabled
7. Click OK.
The Local-FortiGate configuration now has two default routes with different distances. You will view the routing
table to see which route was installed in the routing table and which route was installed in the routing table
database.
3. Enter the following command to list the routing table database entries:
get router info routing-table database
© FORTINET
The port2 default route has a higher administrative distance than the port1 default route. When two or more
routes to the same destination have different distances, the higher distance route is not installed in the
routing table, but you can still see it in the routing table database.
You will configure two link health monitors to monitor the status of both the port1 and port2 routes.
2. Enter the following commands to configure another link health monitor for port2:
config system link-monitor
edit port2-monitor
set srcintf port2
set server 4.2.2.2
set gateway-ip 10.200.2.254
set protocol ping
set update-static-route enable
© FORTINET
next
end
First, you will access various websites and use the Forward Traffic logs to verify that the port1 route is being
used. Next, you will force a failover by reconfiguring the port1 link health monitor to ping an invalid IP address. You
will then generate some more traffic, and use the Forward Traffic logs to verify that the port2 route is being used.
5. On the Local-Client VM, open a few new tabs in the browser, and visit a few websites, such as:
© FORTINET
l http://neverssl.com
l http://www.testingmcafeesites.com
l http://eu.httpbin.org
6. On the Local-FortiGate GUI, click Log & Report > Forward Traffic.
7. Click the refresh icon.
8. Locate the relevant log entries for the three websites you accessed, and verify that their Destination Interface
indicates port1.
This verifies that the port1 route is currently the route in use.
© FORTINET
2. Click Dashboard > Network, and then click Routing to expand it to full screen.
3. Verify that the port2 route replaced the port1 route in the routing table.
This verifies that the Local-FortiGate is using the port2 default route.
Before starting the next exercise, you will restore the port1 link health monitor server configuration with a valid
host address, which will restore the port1 default route as the best route in the routing table.
© FORTINET
To restore the port1 health monitor configuration
1. Return to the Local-FortiGate CLI session, and then enter the following commands:
config system link-monitor
edit port1-monitor
set server 4.2.2.1
next
end
In this exercise, you will configure equal cost multi-path (ECMP) routing on Local-FortiGate to load balance the
internet traffic between port1 and port2. After that, you will configure a policy route to route HTTPS traffic through
port1 only.
To establish ECMP, first you will configure multiple static routes with the same administrative distance.
After you complete the challenge, see Change the ECMP Load Balancing Algorithm on page 22.
5. Click OK.
© FORTINET
To verify the routing table
1. Continuing on the Local-FortiGate GUI, click Dashboard > Network, and then click Routing to expand it to full
screen.
2. Verify that both default routes are installed in the routing table.
By default, the ECMP load balancing algorithm is based on source IP address. This works well when there are
multiple clients generating traffic. In the lab network, because you have only one client (Local-Client), the source
IP address method will not balance any traffic to the second route. Only one route will always be used. For this
reason, you will change the load balancing method to use both source and destination IP addresses. Using this
method, as long as the traffic goes to multiple destination IP addresses, FortiGate load balances the traffic across
both routes.
You will generate some HTTP traffic and verify traffic routing using the Forward Traffic logs.
© FORTINET
Take the Expert Challenge!
l On the Local-Client VM, open a few new browser tabs, and then generate some HTTP traffic.
l Verify the traffic routing on Local-FortiGate, using the Forward Traffic logs.
l Identify why all the outgoing packets are still being routed through port1.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After you complete the challenge, see Configure Priority on page 24.
Why are all the outgoing packets still being routed through port1?
The port2 route is not being used to route internet traffic. Why?
At the beginning of this exercise, you set a distance of 10 on the port2 route but you didn't change its priority.
The port2 route priority is still 5 and you configured it in the previous exercise (see Configure a Second
Default Route on page 12). In addition, the port1 route has distance and priority values of 10 and 1,
respectively.
When two routes to the same destination have the same distance, both remain in the routing table.
However, if the priorities are different, the route with the lowest priority value—port1 in this case—is used.
To achieve ECMP with static routes, the distance and priority values must be the same for all routes.
© FORTINET
Configure Priority
You will change the priority value for the port2 route to match the port1 route.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
To configure priority
1. Continuing on the Local-FortiGate GUI, click Network > Static Routes.
2. Double-click the port2 default route to edit it.
3. Click the + sign to expand the Advanced Options section.
4. Change the Priority value to 1.
5. Click OK.
Verify ECMP
Now that both port1 and port2 routes share the same distance and priority values, they are eligible for ECMP.
First, you will verify the routing table, and then you will verify traffic routing using the Forward Traffic logs.
© FORTINET
The filter 'tcp[13]&2==2' matches packets with the SYN flag on, so the output will
show all SYN packets for port 80 (HTTP).
© FORTINET
The SYN packets are egressing both port1 and port2. This verifies that Local-FortiGate is now load
balancing all internet traffic across both routes.
You will force all HTTPS traffic to egress through port1 using a policy route. All other traffic should remain
unaffected and balanced between port1 and port2. To implement this, you will configure a policy route.
Field Value
Protocol TCP
© FORTINET
4. Click OK.
First, you will verify the routing table, and then you will verify policy routing by generating HTTPS traffic and
viewing the CLI sniffer output.
© FORTINET
diagnose sniffer packet any 'not host 172.16.100.1 and not host 172.16.100.3 and tcp
[13]&2==2 and port 443' 4
As before, this sniffer filter matches packets with the SYN flag on, but this time for port
443 (HTTPS).
2. On the Local-Client VM, open new tabs in the browser, and then visit a few HTTPS websites, such as:
l https://www.fortiguard.com
l https://support.fortinet.com
3. On the Local-FortiGate CLI session, and then press Ctrl+C to stop the sniffer.
4. Analyze the sniffer output.
The SYN packets are egressing port1 only. This verifies that Local-FortiGate is applying the policy route for
HTTPS traffic.
2. On the Local-Client VM, open new tabs in the browser, and then visit a few HTTP websites, such as:
l http://neverssl.com
l http://www.testingmcafeesites.com
l http://eu.httpbin.org
3. On the Local-FortiGate CLI session, press Ctrl+C to stop the sniffer.
4. Analyze the sniffer output.
© FORTINET
HTTP (port 80) traffic remains unaffected by the policy route, and is still load balanced across both port1 and
port2 routes.
The Local-FortiGate configuration still has the two link health monitors for port1 and port2. Do they also
enable routing failover for ECMP scenarios?
Yes. If Local-FortiGate detects a problem in any of the routes, the link monitor removes the corresponding
route, and all internet traffic is routed through the remaining route.
In this lab, you will examine how to create a virtual domain (VDOM) and configure an inter-VDOM link.
Objectives
l Use VDOMs to split a FortiGate into multiple virtual devices
l Create an administrative account and limit access to one VDOM
l Use inter-VDOM links to route traffic between VDOMs
Time to Complete
Estimated: 40 minutes
Topology
The goal of this lab is to create the following topology. You will use VDOMs to logically split Local-FortiGate into
two virtual firewalls: the root VDOM and the customer VDOM. Both VDOMs are running in NAT mode, so all
internet traffic coming from Local-Client must first pass through the customer VDOM, and then through the root
VDOM.
5. Click OK to reboot.
In this exercise, you will examine how to add a new VDOM. Then, you will create an inter-VDOM link between the
VDOM you added and the root VDOM. You will also create an administrator account that has access to only one
VDOM.
The configuration file for this exercise already has VDOMs enabled. You will use only
multi-vdom mode in this exercise.
Create a VDOM
A FortiGate with VDOMs enabled includes a root VDOM. You can create additional VDOMs to split the physical
FortiGate into multiple virtual firewalls. In the next steps, you will add a second VDOM.
To create a VDOM
1. Connect to the Local-FortiGate GUI, and then log in with the username admin and password password.
You will notice that the FortiGate menu has changed. This is because VDOMs are enabled. There is now a
drop-down list at the top of the menu, and a VDOM drop-down list on the title bar. In the VDOM drop-down list,
you can select global settings or VDOM-specific settings for the root VDOM. The default setting is Global.
Field Value
Type Traffic
6. Click OK.
© FORTINET
Notice that the drop-down list at the top of the menu and the VDOM drop-down list show a third option—the
VDOM-specific settings for customer.
You will create an administrator account that has access to the customer VDOM only.
Field Value
Password fortinet
4. In the Virtual Domains list, remove root to restrict the new administrator's access to customer.
© FORTINET
5. Click OK.
The customer-admin account can log in only through an interface in the customer VDOM. Therefore, move the
port3 interface, which connects to the internal network, to the customer VDOM.
4. Click OK.
5. Click OK to confirm the configuration.
© FORTINET
Add the DNS Service to an Interface
For Local-Client, the DNS server is port3. First, you will enable the DNS database in the Feature Visibility
section. Then, you will add DNS service to port3.
4. Click Apply.
Field Value
Interface port3
© FORTINET
3. Click OK.
4. Log out of the Local-FortiGate GUI.
To see what access is available to the customer-admin account, try logging in to the FortiGate-Local GUI as
customer-admin.
4. Log out of the Local-FortiGate GUI, and then log in again with the username admin and password password.
This account has access to the global settings and all VDOMs.
Logging in with the admin account gives you full access to the root VDOM, as well as the
FortiGate system resources. Logging in with the customer-admin account gives you access to
the customer VDOM only, and does not give you access to the system resource details.
After you enable VDOMs, the GUI menu structure and CLI tree structure change. You will examine the differences
on the CLI for VDOMs.
© FORTINET
To execute per-VDOM CLI commands
1. On the Local-FortiGate CLI, log in with the username admin and password password.
2. Try to run the following command to list the routing table:
get router info routing-table all
Did the CLI reject this command? To run this command when VDOMs are enabled,
you must specify the VDOM first, in order for FortiGate to know which VDOM routing
table to display.
Be careful when you type VDOM names with the edit command.
VDOM names are case-sensitive, and the edit command can both modify and
create a VDOM. For example, if you enter edit Root, you will not enter the pre-
existing root VDOM. Instead, you will create and enter a new VDOM named Root.
4. Now that you have specified the VDOM, try looking at the routing table again, using the following command:
get router info routing-table all
The command works now. The information displayed in the routing table is specific to the customer VDOM.
Remember that each VDOM has its own routing table.
In this exercise, you will examine how to route traffic between two VDOMs using an inter-VDOM link.
You will create an inter-VDOM link to route traffic between two VDOMs.
Field Value
Field Value
© FORTINET
7. Click OK.
After you create the inter-VDOM link, notice the two inter-VDOM subinterfaces that were added in the root
and customer VDOMs (expand vlink). These interfaces are named vlink0 and vlink1. You can use them to
route traffic between two VDOMs.
You will add the static routes to both VDOMs to route traffic between them. The objective is to have internet traffic
from Local-Client cross the customer VDOM first, and then cross the root VDOM, before the traffic goes to the
Linux server and the internet.
© FORTINET
To configure routing between VDOMs
1. Continuing on the Local-FortiGate GUI, in the VDOM drop-down list, select the customer VDOM.
Field Value
Destination Subnet
0.0.0.0/0.0.0.0
Interface vlink1
5. Click OK.
Now, you will specify a route for the root VDOM to the internal network.
Field Value
Destination Subnet
10.0.1.0/24
Interface vlink0
© FORTINET
10. Click OK.
You will create firewall policies to allow internet traffic to pass through the customer and root VDOMs.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After you complete the challenge, see Test the Inter-VDOM Link on page 42.
Field Value
Name Internet
Source all
Destination all
Schedule always
Service ALL
Action ACCEPT
© FORTINET
Field Value
NAT <disable>
5. Click OK.
Field Value
Name Internet
Source all
Destination all
Schedule always
Service ALL
Action ACCEPT
NAT <enable>
5. Click OK.
You will test your configuration to confirm that internet traffic is being routed through the two VDOMs and the inter-
VDOM link.
2. Open a terminal window, and then run a traceroute command to an internet public IP address.
traceroute 4.2.2.2
© FORTINET
3. Check the output.
The first hop IP address is 10.0.1.254, which is port3 in the customer VDOM. The second hop IP address
is 10.10.100.1, which is the inter-VDOM link in the root VDOM. The third hop IP address is
10.200.1.254, which is the Linux server.
In this lab, you will test user authentication using FSSO. The lab uses a demo environment to emulate the
behavior of an active FSSO DC agent from the Local-Client VM using a Python script. Therefore, you will not
configure a DC agent to send logon events from the Local-Client VM.
Objectives
l Review the SSO configuration on FortiGate
l Test the transparent or automatic user identification by generating user logon events
l Monitor the SSO status and operation
Time to Complete
Estimated: 35 minutes
5. Click OK to reboot.
In this exercise, you will configure FortiGate for FSSO and test user authentication. The lab uses a demo
environment to emulate the behavior of an active FSSO DC agent from the Local-Client VM using a Python script.
Therefore, you will not configure a DC agent to send logon events from the Local-Client VM.
In the real world, you must configure FortiGate to identify users by polling their logon
events using an FSSO agent, and you must install and configure a collector agent.
FSSO agents are available on the Fortinet Support website
(http://support.fortinet.com).
For FortiGate to communicate and poll information from the FSSO collector agent,
you must assign the polled user to a firewall user group, and then add the user group
as a source on a firewall policy.
Finally, you can verify the user logon event that FortiGate collects. This event is
generated after a user logs in to the Windows Active Directory domain. Therefore, no
firewall authentication is required.
You will review the FSSO configuration and FSSO user groups on FortiGate. FSSO allows FortiGate to
automatically identify the users who connect using SSO. Then, you will add FSSO user groups to the firewall
policies.
To review the FSSO server and FSSO user group configuration on FortiGate
1. Connect to the Local-FortiGate GUI, and then log in with the username admin and password password.
2. Click Security Fabric > External Connectors.
3. Select TrainingDomain, and then click Edit.
4. Review the Endpoint/Identity status in the upper-right corner of the screen, and see that the status is
Disconnected.
Leave the window open.
© FORTINET
To run a script to simulate a user logon event
1. On the Local-Client VM, open a terminal window, and then enter the following commands to simulate a user logon
event:
cd Desktop/FSSO/
python2 fssoreplay.py -l 8000 -f sample.log
2. Keep the terminal window open.
The script continues to run in the background.
© FORTINET
Field Value
Name Training
Members TRAININGAD/AD-USERS
The FSSO user is automatically listed because of the selected group type—FSSO.
3. Click OK.
You will assign your FSSO user group as a source on a firewall policy. This allows you to control access to
network resources based on user identity.
To test the connection without assigning the FSSO user group to a firewall policy
1. On the Local-Client VM, open a new browser, and then go to https://www.fortinet.com.
You can see that all users can access the Fortinet website.
© FORTINET
Test FSSO
After a user logs in, they are automatically identified based on their IP address. As a result, FortiGate allows the
user to access network resources as policy decisions are made.
To test the connection after assigning the FSSO user to the firewall policy
1. On the Local-Client VM, open a new browser tab, and then go to http://support.fortinet.com.
The Python script that is running on Local-Client is already sending user logon events
with the following information:
l user: aduser1
l IP: 10.0.1.10
In this case, the website loads successfully because aduser1 belongs to the
configured user group on a firewall policy.
To review the connection status between the FSSO collector agent and FortiGate
1. On the Local-FortiGate CLI, log in with the username admin and password password.
2. Enter the following commands to show the connection status between FortiGate and each collector agent:
diagnose debug enable
diagnose debug authd fsso server-status
3. Observe the CLI output.
Your FortiGate is connected to the FSSO collector agent.
© FORTINET
Server Name Connection Status Version Address
----------- ----------------- ------- -------
TrainingDomain connected FSAE server 1.1 10.0.1.10
You generated a logon event in the Local-Client VM using the script, and it was
forwarded to FortiGate.
3. Select a log, and then click Details to view more information about it.
© FORTINET
In this lab, you will examine how to configure an SSL VPN connection in tunnel and web modes. You will also
manage user groups and portals for an SSL VPN.
Objectives
l Configure and connect to an SSL VPN
l Enable authentication security
l Configure a firewall policy for SSL VPN users to access private network resources
l Customize the SSL VPN portal for web mode
l Configure FortiClient for the SSL VPN connection in tunnel mode
Time to Complete
Estimated: 40 minutes
4. Select the configuration with the comment local-SSL-VPN.conf, and then click Revert.
5. Click OK to reboot.
On FortiGate, there are two modes you can configure to allow remote access through SSL VPN: web mode and
tunnel mode.
In this exercise, you will examine how to test web mode, which allows SSL VPN users to connect from the
Remote-Client VM to resources located in the local subnet (10.0.1.0/24).
You will configure the SSL VPN settings to allow the remote connection shown in the following image:
Username student
Password fortinet
The SSL_VPN_USERS group was preconfigured for the purpose of this lab.
To review the settings of this group, click User & Authentication > User Groups.
© FORTINET
To configure the SSL VPN settings for web access
1. Continuing on the Local-FortiGate GUI, click VPN > SSL-VPN Settings.
2. In the Connection Settings section, configure the following settings:
Field Value
3. In the Tunnel Mode Client Settings section, verify the following setting:
Field Value
4. In the Authentication/Portal Mapping section, select All Other Users/Groups, and then click Edit.
5. In the Portal drop-down list, select web-access, and then click OK.
6. Click Apply to save the changes.
Notice the warning message displayed at the top of this page. It indicates that you must create a firewall policy
for SSL VPN connections.
You will create a firewall policy that allows traffic to the local subnet (10.0.1.0/24) from remote users connected
to the SSL VPN portal.
© FORTINET
Field Value
Name SSL-VPN-Access
Destination LOCAL_SUBNET
Schedule always
Service ALL
Action ACCEPT
NAT Disabled
The SSL VPN firewall policy allows traffic only from users in the SSL_VPN_Users
group.
© FORTINET
You must log out of the Local-Client VM before proceeding to the next step of the lab.
You will test the SSL VPN by accessing resources remotely in the local subnet (10.0.1.0/24).
For this, you will connect to the SSL VPN portal using the Remote-Client VM, and then you will create an RDP
connection to the Local-Client VM.
© FORTINET
Stop and think!
For SSL connections, FortiGate is using a built-in certificate, which is signed by a certificate authority that
the browser does not trust.
3. Click Advanced, and then click Accept the Risk and Continue.
The remote login page opens.
Field Value
Host 10.0.1.10
3. Keep the default values for the remaining settings, and then click Launch.
4. Log in with the username Administrator and password password.
5. Click OK.
You are now remotely connected to the Local-Client VM.
© FORTINET
You must log out of the Local-Client VM before proceeding to the next step of the lab.
You will customize the SSL VPN portal with a new color and a predefined bookmark.
Field Value
Theme Neutrino
5. In the Predefined Bookmarks section, click Create New, and then configure the following settings:
Field Value
Name Local-Client VM
Type HTTP/HTTPS
URL http://10.0.1.10
6. Click OK.
7. Click OK again to save the portal settings.
© FORTINET
Test SSL VPN Access Using the Predefined Bookmark
You will connect to the SSL VPN portal on the Remote-Client VM again to access the resources in the local subnet
(10.0.1.0/24).
For this, you will access the Local-Client VM using the predefined bookmark on the SSL VPN portal.
Notice that the SSL VPN portal looks different and provides fewer settings.
© FORTINET
Examine the Web Mode Mechanism (Reverse HTTP Proxy)
You will examine the reverse HTTP proxy mechanism to learn how SSL VPN connections in web mode work.
If you were on the local network while accessing the website, the address would be http://10.0.1.10.
But, because you are accessing the website remotely through the FortiGate HTTP proxy, the URL is different.
https://10.200.1.1:10443 Indicates that the connection is SSL/TLS-encrypted, and that the portal is
on the FortiGate port1 SSL VPN gateway
/proxy/..../http/ Indicates that the connection is being handled by the FortiGate HTTP
reverse proxy
10.0.1.10/ Indicates the destination IP address of the website inside your private
network, which you are accessing through the VPN
FortiGate encrypts the connection to the browser, but the destination server IP address
in the URL is displayed in cleartext, not hidden from users. The secondary connection,
from the FortiGate HTTP proxy to the bookmarked website, is not encrypted.
You will monitor and disconnect an SSL VPN user from the FortiGate GUI.
© FORTINET
3. Right-click student, and then select End Session.
4. Click OK.
The student user no longer appears in the SSL VPN monitor.
In this exercise, you will examine how to change the SSL VPN settings to allow remote access to the resources in
the local subnet (10.0.1.0/24), but perform a connection in tunnel mode from the Remote-Client VM.
You will use the remote access module of FortiClient, which supports the Fortinet SSL VPN client.
You will change the SSL VPN portal mapping settings to use tunnel-access, to allow connections in tunnel mode
only.
The full-access setting available on FortiGate supports both web and tunnel modes.
4. In the Portal drop-down list, select tunnel-access, and then click OK.
5. Click Apply.
© FORTINET
Configure the Routing for Tunnel Mode
Notice that in tunnel mode, FortiClient establishes one or more routes in the SSL VPN user's host after the tunnel
is connected. Traffic destined to the internal subnets is correctly routed through the tunnel.
4. Click OK.
SSL VPN connections in tunnel mode require FortiClient. You will use FortiClient, which is installed on the
Remote-Client VM, to test your configuration.
Field Value
Server 10.200.1.1
© FORTINET
Test SSL VPN in Tunnel Mode
You will connect using the student account to test tunnel mode.
2. Click Connect.
3. Click Continue to accept the certificate.
The tunnel is connected.
© FORTINET
This time, you are not using the reverse HTTP proxy as in the case of web-access mode. The IP traffic is
directly encapsulated over HTTPS and sent through the tunnel.
3. Click student > Logout to log out of the SSL VPN portal.
You will review the VPN events for both of the SSL VPN connections you performed in this lab (web and tunnel
modes).
The most recent tunnel-up log shows one IP address under Remote IP. This log shows the recent
connection to the SSL VPN portal. Even though the SSL VPN portal presented a warning message and did
not allow remote access to the local resources, FortiGate shows that an SSL VPN connection was
established and the tunnel was up.
© FORTINET
The second most recent tunnel-up log in the VPN event list shows the SSL VPN connection in tunnel mode
through FortiClient. Notice this log presents two IP addresses:
l Remote IP: IP address of the remote user's gateway (egress interface)
l Tunnel IP: IP address FortiGate assigns to the virtual network adapter fortissl
Aside from SSL VPN connections in web mode showing one IP address and in tunnel mode showing two IP
addresses, which other indicator shows how SSL VPN users are connected?
Notice the following Tunnel Type indicators in the log details shown in the previous step:
l ssl-web is for web mode
l ssl-tunnel is for tunnel mode
In this lab, you will configure site-to-site IPsec VPN tunnels between two FortiGate devices. First, you will
configure a dial-up tunnel, and then a static tunnel. Then, you will add a second VPN tunnel that will act as a
backup tunnel between the FortiGate devices.
Objectives
l Deploy a site-to-site VPN between two FortiGate devices
l Set up dial-up and static remote gateways
l Configure redundant VPNs between two FortiGate devices
Time to Complete
Estimated: 50 minutes
Make sure that you restore the correct configuration on each FortiGate, using the
following steps. Failure to restore the correct configuration on each FortiGate will
prevent you from doing the lab exercises.
5. Click OK to reboot.
5. Click OK to reboot.
In this exercise, you will configure a dial-up VPN between Local-FortiGate and Remote-FortiGate. Local-FortiGate
will act as the dial-up server and Remote-FortiGate will act as the dial-up client.
You will configure the IPsec VPN by creating phase 1 and phase 2.
Field Value
Name ToRemote
4. Click Next.
5. In the Network section, configure the following settings:
Field Value
Interface port1
Field Value
Mode Aggressive
Peer ID Remote-FortiGate
© FORTINET
Setting a peer ID is useful when there are multiple dial-up tunnels on the FortiGate
acting as the dial-up server, and you want dial-up clients to connect to a specific tunnel.
Field Value
l You do not need to add a static route because it is a dial-up VPN. FortiGate
dynamically adds or removes appropriate routes to each dial-up peer, each time
the peer VPN is trying to connect.
l Even though you could have configured 10.0.2.0/24 as the Remote Address
instead of 0.0.0.0/0, it is more convenient to use the latter for scalability
purposes. That is, when you have multiple remote peers, each with different remote
subnets, using 0.0.0.0/0 as the remote subnet results in the dial-up server
accepting any subnet during the tunnel negotiation. This allows multiple remote
peers to use the same phase 2 selector configuration. For this exercise, there is
only one remote peer (Remote-FortiGate). Local-FortiGate then learns about the
remote subnet 10.0.2.0/24 when Remote-FortiGate connects to the tunnel.
However, if there are more remote peers with different remote subnets, you do not
need to change the existing dial-up server configuration for the additional remote
peers to be able to connect.
© FORTINET
Create Firewall Policies for VPN Traffic on Local-FortiGate (Dial-Up Server)
You will create two firewall policies between port3 and To Remote—one for each traffic direction.
Field Value
Name Remote_out
Source LOCAL_SUBNET
Destination REMOTE_SUBNET
Schedule always
Service ALL
Action ACCEPT
Field Value
Name Remote_in
Source REMOTE_SUBNET
Destination LOCAL_SUBNET
Schedule always
Service ALL
Action ACCEPT
© FORTINET
8. In the Firewall/Network Options section, disable NAT.
9. Click OK.
Field Value
Name ToLocal
4. Click Next.
5. In the Network section, configure the following settings:
Field Value
IP Address 10.200.1.1
Interface port4
Field Value
© FORTINET
Field Value
Mode Aggressive
Field Value
Local ID Remote-FortiGate
The local ID should be the same as the peer ID that you configured on Local-FortiGate,
which is acting as the dial-up server.
Field Value
© FORTINET
Except for Local Address and Remote Address, all phase 1 and phase 2 settings
on both VPN peers mirror each other. For dial-up IPsec VPN, the local and remote
addresses do not have to mirror for the tunnel to come up.
You will create one static route on Remote-FortiGate. This step was not necessary on Local-FortiGate because,
as the dial-up server, it automatically adds the route for the remote network after the tunnel comes up.
Field Value
Destination Subnet
10.0.1.0/24
Interface ToLocal
© FORTINET
4. Click OK.
You will create two firewall policies between port6 and To Local—one for each traffic direction.
Field Value
Name Local_out
Source REMOTE_SUBNET
Destination LOCAL_SUBNET
Schedule always
Service ALL
Action ACCEPT
© FORTINET
6. Click Create New again.
7. Configure the following settings:
Field Value
Name Local_in
Source LOCAL_SUBNET
Destination REMOTE_SUBNET
Schedule always
Service ALL
Action ACCEPT
Now that you configured the VPN on both FortiGate devices, you will test the VPN.
3. Right-click the VPN, and then click Bring Up > All Phase 2 Selectors to bring up the tunnel.
© FORTINET
The Name column of the VPN now contains a green up arrow, which indicates that the tunnel is up. If
required, click the refresh button in the upper-right corner to refresh the widget information.
Do you always have to manually bring up the tunnel after you create it?
No. With the current configuration, the tunnel will stay down until you manually bring it up, or there is traffic
that should be routed through the tunnel. Because you are not generating traffic between the 10.0.2.0/24
and 10.0.1.0/24 subnets yet, the tunnel is still down. If you had generated the required traffic while the
tunnel was down, it would have come up automatically.
You can initiate a tunnel only from Remote-FortiGate because it is the dial-up client.
4. On the Remote-Client VM, open a terminal window, and then enter the following command to ping the Local-Client
VM:
ping 10.0.1.10
The ping should work.
© FORTINET
Notice the address listed in the Gateway IP column for that route.
In this exercise, you will configure a static VPN between Local-FortiGate and Remote-FortiGate. You will also
configure a static route on Local-FortiGate for VPN traffic.
Before beginning this lab, you must restore a configuration file to Local-FortiGate.
Make sure that you restore the correct configuration on Local-FortiGate, using the
following steps. Failure to restore the correct configuration on Local-FortiGate will
prevent you from doing the lab exercise.
© FORTINET
5. Click OK to reboot.
You will configure the IPsec VPN by creating phase 1 and phase 2.
Field Value
Name ToRemote
4. Click Next.
5. In the Network section, configure the following settings:
© FORTINET
Field Value
IP Address 10.200.3.1
Interface port1
Field Value
Mode Aggressive
Field Value
© FORTINET
Create a Static Route for VPN Traffic on Local-FortiGate
Field Value
Destination Subnet
10.0.2.0/24
Interface ToRemote
4. Click OK.
You will create two firewall policies between port3 and ToRemote—one for each traffic direction.
© FORTINET
Field Value
Name Remote_out
Source LOCAL_SUBNET
Destination REMOTE_SUBNET
Schedule always
Service ALL
Action ACCEPT
Field Value
Name Remote_in
Source REMOTE_SUBNET
Destination LOCAL_SUBNET
Schedule always
Service ALL
Action ACCEPT
© FORTINET
Test and Monitor the VPN
3. Right-click the VPN, and then click Bring Up > All Phase 2 Selectors.
4. In the top-right corner, click the refresh button to refresh the widget information.
The Name column of the VPN now contains a green up arrow, which indicates that the tunnel is up.
5. On the Remote-Client VM, open a terminal window, and then enter the following command to ping the Local-Client
VM:
ping 10.0.1.10
The ping should work.
In this exercise, you will configure one more VPN tunnel between Local-FortiGate and Remote-FortiGate for
redundancy purposes. You must first restore a configuration file on Remote-FortiGate.
Prerequisites
Before beginning this exercise, you must restore a configuration file on Remote-FortiGate.
Make sure that you restore the correct configuration on Remote-FortiGate, using the
following steps. Failure to restore the correct configuration on Remote-FortiGate will
prevent you from doing the lab exercise.
After you load the configurations, Remote-FortiGate will be preconfigured for VPN
redundancy. This exercise provides instructions to review the configuration for
Remote-FortiGate.
5. Click OK to reboot.
© FORTINET
Check the IPsec VPN Tunnel on Local-FortiGate
You just restored a configuration file to Remote-FortiGate. You will now check the status of the ToRemote VPN
on Local-FortiGate.
If the ToRemote VPN still appears up, wait a few more seconds, and then press
Ctrl+R to refresh the page. The tunnel will be brought down automatically by dead
peer detection (DPD) approximately 60 seconds after the configuration is restored on
Remote-FortiGate.
3. Right-click the VPN, and then click Bring Up > All Phase 2 Selectors.
4. In the upper-right corner, click the refresh button to refresh the widget information.
The Name column of the VPN shows a red down arrow, indicating that the tunnel is still down.
After you restore the configuration on Remote-FortiGate, the configuration for the
tunnel on Remote-FortiGate no longer mirrors the configuration on Local-FortiGate,
which is why the tunnel does not come up this time. You will fix this in the next
procedure.
© FORTINET
Review the VPN Configuration on Both FortiGate Devices
Phase 1 and phase 2 settings on both peers are no longer a mirror of each other. You will review the VPN
configuration on each FortiGate and identify the differences. After that, you will apply the changes to the Local-
FortiGate configuration so it mirrors the configuration on Remote-FortiGate.
What are the differences in the VPN configuration between the two FortiGate devices?
Authentication
l Local-FortiGate uses aggressive mode for IKE, while Remote-FortiGate uses main mode.
Field Value
3. Click OK.
Now that you fixed the VPN configuration on Local-FortiGate, you will test the VPN. Instead of bringing up the
tunnel manually, you will generate traffic to bring the tunnel up.
© FORTINET
To test the VPN
1. On the Remote-Client VM, open a terminal window, and then enter the following command to ping the Local-Client
VM:
ping 10.0.1.10
The ping should work.
The first few pings will fail while FortiGate negotiates and establishes the VPN.
You will configure a backup VPN tunnel on Local-FortiGate, named ToRemoteBackup, for redundancy
purposes. To configure the new tunnel, you will use the IPsec wizard. On the Remote-FortiGate, the backup VPN
tunnel was preconfigured and named ToLocalBackup.
Field Value
Name ToRemoteBackup
3. Click Next.
4. Configure the following settings:
© FORTINET
Field Value
5. Click Next.
6. Configure the following settings:
Field Value
7. Click Next.
8. Click Create.
You should see the following screen:
© FORTINET
You will review the objects that the IPsec wizard created.
2. Click Cancel.
3. Click Policy & Objects > Addresses, and then click the + icon to expand Address Group.
Observe the following new firewall address objects:
l ToRemoteBackup_local_subnet_1, a member of the ToRemoteBackup_local address group
l ToRemoteBackup_remote_subnet_1, a member of the ToRemoteBackup_remote address group
© FORTINET
5. Click Network > Static Routes, and then view the static route the wizard added.
© FORTINET
Stop and think!
Why did the IPsec wizard add a second route using the blackhole interface?
FortiGate drops all packets routed to the blackhole interface. The IPsec wizard added two static routes: one
to the IPsec virtual interface, with a distance of 10, and one to the blackhole interface, with a distance of 254.
The route with the lowest distance, the one to the IPsec virtual interface, takes precedence. However, if the
VPN is down, the route to the blackhole interface becomes active, even though it was originally the route
with the higher distance. So, traffic destined to the VPN is now routed to the blackhole interface and
dropped. The route to the blackhole interface prevents FortiGate from sending VPN traffic to the default
route while the VPN is down. The route to the blackhole interface also prevents FortiGate from creating
unnecessary sessions in the session table.
You will increase the administrative distance of the static route the IPsec wizard created for the
ToRemoteBackup VPN, so the tunnel is only used when the ToRemote VPN is down.
Field Value
Administrative Distance 20
© FORTINET
4. Click OK.
For the purpose of this lab, the backup VPN configuration on Remote-FortiGate was preconfigured for you. The
configuration also includes a zone to reduce the number of firewall policies needed for the redundant VPNs. You
will review this configuration.
You will test the VPN failover. You will use the sniffer tool to monitor which VPN tunnel the traffic is using.
© FORTINET
28.040086 port3 in 10.0.1.10 -> 10.0.2.10: icmp: echo request
28.040107 ToRemote out 10.0.1.10 -> 10.0.2.10: icmp: echo request
28.041188 ToRemote in 10.0.2.10 -> 10.0.1.10: icmp: echo reply
28.041196 port3 out 10.0.2.10 -> 10.0.1.10: icmp: echo reply
Now, you will simulate a failure in the ToRemote VPN, and observe how FortiGate starts using the secondary
ToRemoteBackup VPN.
8. Wait about a minute for DPD to detect the failure in ToRemote, and as a result, for FortiGate to reroute the traffic
through ToRemoteBackup.
9. Return to the Local-FortiGate CLI session, and then view the sniffer output again.
Notice that the ToRemoteBackup VPN is being used now.
546.352063 port3 in 10.0.1.10 -> 10.0.2.10: icmp: echo request
546.352090 ToRemoteBackup out 10.0.1.10 -> 10.0.2.10: icmp: echo request
546.353546 ToRemoteBackup in 10.0.2.10 -> 10.0.1.10: icmp: echo reply
546.353560 port3 out 10.0.2.10 -> 10.0.1.10: icmp: echo reply
10. On the Local-FortiGate GUI, click Network > Interfaces.
11. Click the + sign beside port1 to view the subinterfaces using port1.
12. Right-click ToRemote, and then click Set Status > Enable to re-enable the VPN interface.
© FORTINET
13. Return to the Local-FortiGate CLI session, and then view the sniffer output again.
Notice that the ToRemote VPN is being used again.
589.622935 port3 in 10.0.1.10 -> 10.0.2.10: icmp: echo request
589.622948 ToRemote out 10.0.1.10 -> 10.0.2.10: icmp: echo request
589.624057 ToRemote in 10.0.2.10 -> 10.0.1.10: icmp: echo reply
589.624072 port3 out 10.0.2.10 -> 10.0.1.10: icmp: echo reply
14. Press Ctrl+C to stop the ping.
15. Close the Local-FortiGate CLI window.
In this lab, you will examine how to set up a FortiGate Clustering Protocol (FGCP) high availability (HA) cluster of
FortiGate devices. You will explore active-active HA mode and observe FortiGate HA behavior. You will also
perform an HA failover and use diagnostic commands to observe the election of a new primary device in the
cluster. Finally, you will configure management ports on FortiGate devices to reach each FortiGate individually for
management purposes.
Objectives
l Set up an HA cluster using FortiGate devices
l Observe HA synchronization and interpret diagnostic output
l Perform an HA failover
l Manage individual cluster members by configuring a reserved management interface
Time to Complete
Estimated: 40 minutes
Lab HA Topology
After you upload the required configurations to each FortiGate, the logical topology will change to the following:
You must restore the configuration to Local-FortiGate first, and then to Remote-
FortiGate.
5. Click OK to reboot.
5. Click OK to reboot.
FortiGate HA uses FGCP, which uses a heartbeat link for HA-related communications to discover other FortiGate
devices in the same HA group, elect a primary device, synchronize configuration, and detect failed devices in an
HA cluster.
In this exercise, you will examine how to configure HA settings on both FortiGate devices. You will observe the HA
synchronization status, and use diagnose commands to verify that the configuration is in sync on both FortiGate
devices.
Field Value
Mode Active-Active
Password Fortinet
© FORTINET
3. Click OK.
Now that you have configured HA on both FortiGate devices, you will verify that HA is established and that the
configurations are fully synchronized.
The checksums for all cluster members must match for the FortiGate devices to be synchronized.
© FORTINET
secondary succeeded to sync external files with primary
secondary starts to sync with primary
logout all admin users
3. When prompted, log back in to the Remote-FortiGate CLI with the username admin and password password.
4. To check the HA synchronization status, enter the following command:
diagnose sys ha checksum show
5. On the Local-FortiGate CLI, enter the following command to check the HA synchronization status:
diagnose sys ha checksum show
7. Alternatively, you can run the following CLI command on any member to view the checksums of all members:
diagnose sys ha checksum cluster
After the checksums of both FortiGate devices match, you will verify the cluster member roles to confirm the
primary and secondary devices.
2. On both FortiGate devices, view the Current HA mode line, and then write down the device serial number
(Serial-Number).
Notice that Local-FortiGate is a-a primary and Remote-FortiGate is a-a secondary.
In the primary election process, the first criterion checked is the number of connected monitored ports.
Because you didn't configure monitored ports, then the next criterion is checked.
Because you disabled the override setting, then the next criterion checked is HA uptime. Because you
enabled HA on both devices about the same time, then the HA uptime difference is less than five minutes,
and therefore, the next criterion, priority, is checked.
Local-FortiGate has a priority of 200, which is greater than Remote-FortiGate, which has a priority of 100.
The result is that Local-FortiGate is elected primary.
3. On the Local-FortiGate CLI , enter the following command to confirm the reason for the primary election:
get system ha status
4. In the output, look for the Primary selected using section to identify the reason for the latest primary election
event.
© FORTINET
Your output should look similar to the following example:
The output confirms that Local-FortiGate was elected primary because of its higher
priority.
If you see that the election reason is a higher uptime, then that is probably because
you rebooted one of the members, and as a result, the HA uptime of that device was
reset. The reboot then caused the HA uptime difference to be more than five minutes.
By default, a FortiGate HA active-active cluster load balances only sessions that are subject to proxy inspection.
For this reason, you will verify that the matching firewall policy is configured to perform proxy inspection.
© FORTINET
The firewall policy P3_to_P1 has been preconfigured for you. The firewall policy
matches the internet traffic that you will generate in the next task, and is configured to
perform antivirus and web filtering proxy-based inspection on the matching traffic. This
way, the primary FortiGate will distribute some of the matching sessions to the
secondary FortiGate.
3. Click Cancel.
The primary FortiGate handles more sessions than the secondary FortiGate. This is
because the primary handles:
l Cluster management traffic (local-in and local-out connections)
l Non-TCP firewall traffic
l TCP firewall traffic that is not subject to proxy-based inspection or any inspection
l TCP firewall traffic that is subject to proxy-based inspection and that isn't distributed
to the secondary
You set up an HA cluster. In this exercise, you will examine how to trigger an HA failover, and observe the
renegotiation among devices to elect a new primary device and redistribute the sessions.
You will reboot the primary FortiGate in the cluster to trigger a failover.
After you have performed these steps, see Triggering an HA Failover on page 108.
4. To trigger a failover, on the Local-FortiGate CLI, enter the following command to reboot Local-FortiGate:
execute reboot
You will verify the HA failover, and check the roles of FortiGate in an HA cluster.
© FORTINET
To verify the HA failover and FortiGate roles
1. On the Local-Client VM, check the terminal and video that you started earlier.
Because of the failover, Remote-FortiGate is now the primary processor of traffic. Your ping and video should
still be running.
When Local-FortiGate finishes rebooting and rejoins the cluster, does it rejoin as the secondary device, or
resume its initial role of primary device?
4. To see the status of all cluster members, enter the following command on any FortiGate in the cluster:
get system ha status
You should see that Local-FortiGate rejoins the cluster as a secondary device. It lost its role as the primary
device.
The output of get system ha status has been cut to fit this page.
Local-FortiGate becomes the secondary device in the cluster because it has a lower
HA uptime than Local-Remote. In addition, the HA uptime difference between the
members is more than 5 minutes.
You will trigger a failover by resetting the HA uptime on the current primary FortiGate—which should be Remote-
FortiGate—and then you will verify the role of Remote-FortiGate in the HA cluster.
© FORTINET
After you reset the HA uptime on Remote-FortiGate, Local-FortiGate becomes the
member with the highest HA uptime. Because the HA uptime difference between the
members is more than five minutes, then Local-FortiGate is elected as the new
primary.
The HA synchronization process is responsible for FGCP packets that communicate cluster status and build the
cluster. You will use real-time diagnostic commands to observe this process.
The diagnose debug application hatalk 0 command stops the debug. You
will use this command later.
© FORTINET
The output shows that the current primary FortiGate is sending heartbeat packets and trying to synchronize
its configuration with the configuration of the secondary FortiGate.
5. To stop the debug output on Local-FortiGate, press the up arrow key twice, select the second-last command (in
this case, diagnose debug application hatalk 0), and then press Enter.
In this exercise, you will examine how to configure a spare interface in the cluster as a reserved HA management
interface. This allows both FortiGate devices to be reachable for management purposes regardless of the
member role.
If a reserved HA management interface is not configured, your cluster management connections are handled by
the primary FortiGate. However, you can access the CLI of the secondary FortiGate from the primary FortiGate
CLI, or by using the secondary console connection.
You can also configure an in-band HA management interface, which is an alternative to the reserved HA
management interface, and does not require reserving an interface that is only for management access.
Access the Secondary FortiGate CLI Through the Primary FortiGate CLI
You will connect to the secondary FortiGate CLI through the primary FortiGate CLI.
To access the secondary FortiGate CLI through the primary FortiGate CLI
1. On the Local-FortiGate CLI, log in with the username admin and password password.
2. Enter the following command to access the secondary FortiGate CLI through the primary FortiGate heartbeat
interface:
execute ha manage <id> admin
© FORTINET
4. Enter the following command to get the status of the secondary FortiGate:
get system status
You will use an unused interface on the FortiGate devices in an HA cluster to configure a reserved HA
management interface and a unique IP address on each member. This way, you can access each member
directly regardless of its role.
4. Enable Management Interface Reservation, and then in the Interface field, select port7.
5. Click OK.
© FORTINET
You will configure and verify access to the primary FortiGate using the reserved HA management interface.
To configure and verify access to the primary FortiGate using the reserved HA management
interface
1. On the Local-FortiGate CLI, log in with the username admin and password password.
2. Enter the following commands to configure port7:
config system interface
edit port7
set ip 10.0.1.253/24
set allowaccess ping ssh snmp http
end
Even though this address overlaps with port3, which is not allowed by default
(FortiGate does not allow overlapped subnets by default), it is allowed here because
the routing entries for the reserved HA management interface are excluded from the
routing table.
3. On the Local-Client VM, open a browser, and then log in to the Local-FortiGate GUI at 10.0.1.253 (note the IP
address) with the username admin and password password.
This verifies connectivity to port7.
You will configure and verify access to the secondary FortiGate using the reserved HA management interface.
© FORTINET
Take the Expert Challenge!
After the configuration is ready, see Configuring the HA Management Interface on page 112.
To configure and verify access to the secondary FortiGate using the management interface
1. On the Remote-FortiGate CLI, enter the following command to verify that the reserved HA management interface
was synchronized with the secondary device:
show system ha
Look for ha-mgmt-status and config ha-mgmt-interfaces. These should already be set.
4. On the Local-Client VM, open a browser, and then log in to the Remote-FortiGate GUI at 10.0.1.252 (note the IP
address) with the username admin and password password.
This will verify connectivity to port7.
Each device in the cluster now has its own management IP address for monitoring purposes.
You will disconnect Remote-FortiGate from the cluster. Remote-FortiGate will prompt you to configure an IP
address on any port on Remote-FortiGate so that you can access it after the disconnection.
© FORTINET
2. Click System > HA.
3. Right-click Remote-FortiGate, and then click Remove device from HA cluster.
Field Value
Interface port3
IP/Netmask 10.0.1.251/24
5. Click OK.
This removes the FortiGate from the HA cluster.
You will restore the Remote-FortiGate configuration, so that you can use Remote-FortiGate in the next labs.
Failure to perform these steps will prevent you from doing the next exercises.
© FORTINET
5. Click OK to reboot.
Failure to perform these steps will prevent you from doing the next exercises.
In this lab, you will run diagnostic commands to learn about the current status of FortiGate. You will also use the
sniffer and debug flow tools to troubleshoot and fix a connectivity problem.
Objectives
l Identify normal behavior for your network
l Monitor for abnormal behavior, such as traffic spikes
l Diagnose problems at the physical and network layers
l Diagnose connectivity problems using the debug flow
l Diagnose resource problems, such as high CPU or memory usage
Time to Complete
Estimated: 30 minutes
5. Click OK to reboot.
In this exercise, you will use CLI commands to get information about FortiGate, such as traffic volume, CPU
usage, memory usage, and the ARP table.
You will run some diagnostic commands and take note of some of the information displayed.
Field Value
Current HA mode
Hostname
CPU utilization
Memory utilization
© FORTINET
Enter the following CLI commands to find the information requested above:
get system status
get system performance status
get hardware nic port1
get system arp
diagnose sys top 1
(Press Shift+P to order the processes by CPU usage, Shift+M to order them by
memory usage, or Q to stop.)
In this exercise, you will use the sniffer and debug flow to troubleshoot a network connectivity problem.
As you will see in this procedure, there is a network connectivity problem between the Local-Client VM and the
Linux server.
The ping is failing. You will use the sniffer and debug flow tools on Local-FortiGate to find out why.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After you complete the challenge, see Troubleshooting a Connectivity Problem on page 122.
You will start troubleshooting by sniffing the ICMP traffic going to the Linux server.
© FORTINET
15.444343 port3 in 10.0.1.10 -> 10.200.1.254: icmp: echo request
20.545397 port3 in 10.0.1.10 -> 10.200.1.254: icmp: echo request
The packets are arriving on FortiGate, but FortiGate is not routing them.
You will run the debug flow tool to get information about why the packets are being dropped.
The output should be similar to the following example. FortiGate receives the ICMP packet from 10.0.1.10
to 10.200.1.254 from port3.
id=20085 trace_id=1 func=print_pkt_detail line=5363 msg="vd-root received a packet
(proto=1, 10.0.1.10:1->10.200.1.254:2048) from port3. type=8, code=0, id=1,
seq=33."
It drops the packet. The debug flow shows the error message.
id=20085 trace_id=1 func=fw_forward_handler line=586 msg="Denied by forward policy
check (policy 0)"
The Denied by forward policy check message indicates that the traffic is denied by a firewall policy.
It could be either a denied policy explicitly configured by the administrator, or the implicit denied policy for
traffic that does not match a configured policy.
The policy 0 indicates that the traffic was denied by the default implicit policy. If the traffic was blocked by
an explicitly configured policy, its policy ID number would be indicated in this output, instead of 0.
Now that you found the cause of the problem, you will fix the problem.
© FORTINET
To fix the problem
1. Connect to the Local-FortiGate GUI, and then log in with the username admin and password password.
2. Click Policy & Objects > Firewall Policy.
3. Look at the firewall policies.
The Full_Access firewall policy does not allow ICMP traffic (only HTTP)—this is why FortiGate is dropping
the ping packets.
You will test to confirm that the configuration change fixed the problem.
There should not be any output yet, because the ping is not running.
5. Return to the terminal window, and then start the ping again.
ping 10.200.1.254
Additionally, you can see the debug flow logs from the return (ping reply) packets.
© FORTINET
id=20085 trace_id=5 func=print_pkt_detail line=5363 msg="vd-root received a packet
(proto=1, 10.200.1.254:62464->10.200.1.1:0) from port1. type=0, code=0, id=62464,
seq=83."
id=20085 trace_id=5 func=resolve_ip_tuple_fast line=5438 msg="Find an existing
session, id-000003f2, reply direction"
id=20085 trace_id=5 func=__ip_session_run_tuple line=3178 msg="DNAT 10.200.1.1:0-
>10.0.1.10:1"
id=20085 trace_id=5 func=vf_ip_route_input_common line=2583 msg="find a route:
flag=04000000 gw-10.0.1.10 via port3"
The procedure in this exercise describes what you should usually do when
troubleshooting connectivity problems on FortiGate. Sniff the traffic first to check that
the packets are arriving on FortiGate and that FortiGate is routing them correctly. If the
sniffer shows that the traffic is being dropped by FortiGate, use the debug flow tool to
find out why.
No part of this publication may be reproduced in any form or by any means or used to make any
derivative such as translation, transformation, or adaptation without permission from Fortinet Inc.,
as stipulated by the United States Copyright Act of 1976.
Copyright© 2022 Fortinet, Inc. All rights reserved. Fortinet®, FortiGate®, FortiCare® and FortiGuard®, and certain other marks are registered trademarks of Fortinet,
Inc., in the U.S. and other jurisdictions, and other Fortinet names herein may also be registered and/or common law trademarks of Fortinet. All other product or company
names may be trademarks of their respective owners. Performance and other metrics contained herein were attained in internal lab tests under ideal conditions, and
actual performance and other results may vary. Network variables, different network environments and other conditions may affect performance results. Nothing herein
represents any binding commitment by Fortinet, and Fortinet disclaims all warranties, whether express or implied, except to the extent Fortinet enters a binding written
contract, signed by Fortinet’s General Counsel, with a purchaser that expressly warrants that the identified product will perform according to certain expressly-identified
performance metrics and, in such event, only the specific performance metrics expressly identified in such binding written contract shall be binding on Fortinet. For
absolute clarity, any such warranty will be limited to performance in the same ideal conditions as in Fortinet’s internal lab tests. In no event does Fortinet make any
commitment related to future deliverables, features, or development, and circumstances may change such that any forward-looking statements herein are not accurate.
Fortinet disclaims in full any covenants, representations,and guarantees pursuant hereto, whether express or implied. Fortinet reserves the right to change, modify,
transfer, or otherwise revise this publication without notice, and the most current version of the publication shall be applicable.