FortiGate Infrastructure 6.0 Lab Guide V2-Online-Unlocked
FortiGate Infrastructure 6.0 Lab Guide V2-Online-Unlocked
FortiGate Infrastructure 6.0 Lab Guide V2-Online-Unlocked
Fortinet Document Library
http://docs.fortinet.com
Fortinet Knowledge Base
http://kb.fortinet.com
Fortinet Forums
https://forum.fortinet.com
Fortinet Support
https://support.fortinet.com
FortiGuard Labs
http://www.fortiguard.com
Feedback
Email: courseware@fortinet.com
11/7/2018
TABLE OF CONTENTS
Change Log 7
Virtual Lab Basics 8
Network Topology 8
Lab Environment 8
Remote Access Test 9
Logging In 10
Disconnections and Timeouts 12
Screen Resolution 12
Sending Special Keys 13
Student Tools 14
Troubleshooting Tips 14
Lab 1: Routing 17
Exercise 1: Configuring Route Failover 18
Verify the Routing Configuration 18
Configure a Second Default Route 19
Configure the Firewall Policies 20
View the Routing Table 22
Configure Link Health Monitors 23
Test the route failover 23
Restore the routing table 26
Exercise 2: Equal Cost Multipath and Policy Routing 28
Configure Administrative Distance 28
Change the ECMP Load Balancing Method 29
Verify Traffic Routing 29
Configure Priority 30
Verify ECMP 31
Configure Policy Route for HTTPS Traffic 32
Verify the Policy Route 34
Lab 2: SD-WAN 37
Exercise 1: SD-WAN 38
Remove Interface References 38
Configure SD-WAN Load Balancing 39
Create a Static Route for the SD-WAN Interface 41
Create a Firewall Policy for SD-WAN Load Balancing 42
Verify the SD-WAN Load Balancing Configuration 42
Lab 3: Virtual Domains 44
Exercise 1: Creating VDOMs and VDOM Objects 46
Create a VDOM 46
Create a Per-VDOM Administrator 47
Move an Interface to a Different VDOM 48
Add DNS service to an Interface 49
Test the Per-VDOM Administrator Account 50
Execute Per-VDOM CLI Commands 51
Exercise 2: Inter-VDOM Link 53
Create an Inter-VDOM Link 53
Configure Routing Between VDOMs 54
Configure Firewall Policies for Inter-VDOM Traffic 56
Test the Inter-VDOM Link 58
Lab 4: Transparent Mode 59
Exercise 1: Transparent Mode VDOM 61
Create a Transparent Mode VDOM 61
Moving an Interface to a Different VDOM 62
Exercise 2: Inter-VDOM Link 64
Create an Inter-VDOM Link 64
Create firewall policies 65
Route Inter-VDOM traffic 69
Test the Transparent Mode VDOM 69
Lab 5: Configuring a Site-to-Site IPsec VPN 72
Exercise 1: Configuring Route-Based IPsec VPN 74
Create a VPN Using the VPN Wizard 74
Review the Objects Created by the VPN Wizard 75
Exercise 2: Configuring Policy-Based IPsec VPN 79
Show Policy-Based VPN Settings in the GUI 79
Create a Policy-Based VPN 79
Create a Firewall Policy for a Policy-Based VPN 81
Move a Firewall Policy 82
Exercise 3: Testing and Monitoring the VPN 84
Test the VPN 84
Exercise 4: Configuring an IPsec VPN Between Two FortiGate Devices 86
Prerequisites 86
Create Phases 1 and 2 on Local-FortiGate 87
Create a Static Route for a Route-based VPN on Local-FortiGate 88
Create an Interface Zone on Local-FortiGate 88
Create Firewall Policies for VPN Traffic on Local-FortiGate 89
Review the VPN Configuration on Remote-FortiGate 91
Test the IPsec VPN 91
Exercise 5: Configuring a Backup IPsec VPN 92
Configure a Backup VPN on Local-FortiGate 92
Review the Backup VPN Configuration on Remote-FortiGate 93
Test the VPN Redundancy 93
Lab 6: Fortinet Single Sign-On (FSSO) 95
Exercise 1: Configuring FSSO Collector Agent-Based Polling Mode 97
Install the FSSO Collector Agent 97
Configure the FSSO Collector Agent 99
Configure SSO on FortiGate 102
Assign Polled FSSO Users to a Firewall Policy 104
Test FSSO 105
Lab 7: High Availability (HA) 109
Lab HA Topology 109
Exercise 1: Configuring High Availability (HA) 112
Configure HA Settings on Local-FortiGate 112
Configure HA Settings on Remote-FortiGate 113
Observe and Verify the HA Synchronization Status 113
Verify FortiGate Roles in a HA Cluster 114
View Session Statistics 115
Exercise 2: High Availability Failover 116
Trigger Failover by Rebooting the Primary FortiGate 116
Verify the HA Failover and FortiGate Roles 117
Trigger an HA Failover by Resetting the HA Uptime 118
Observe HA Failover Using Diagnostic Commands 118
Exercise 3: Configuring the HA Management Interface 120
Access the Secondary FortiGate through the Primary FortiGate CLI 120
Set Up a Management Interface 121
Configure and Access the Primary FortiGate Using the Management Interface 121
Configure and Access the Secondary FortiGate Using the Management Interface 122
Disconnect FortiGate From the Cluster 123
Restore the Remote-FortiGate Configuration 124
Lab 8: Web Proxy 126
Exercise 1: Configuring an Explicit Web Proxy 127
Show the Explicit Web Proxy Settings 127
Enable Explicit Web Proxy 127
Create an Authentication Scheme 127
Create an Authentication Rule 128
Create a Proxy Policy 128
Configure Firefox for Explicit Web Proxy 129
Test the Explicit Web Proxy Configuration 131
List the Active Explicit Web Proxy Users 132
List the Active Explicit Web Proxy Sessions 132
Exercise 2: Configuring the Transparent Web Proxy 134
Disable the Explicit Web Proxy in Firefox 134
Redirect the Traffic to the Transparent Web Proxy 135
Create the Proxy Policies 137
Testing the Transparent Web Proxy 138
Lab 9: Diagnostics 140
Exercise 1: Knowing What is Happening Now 141
Execute Diagnostic Commands 141
Exercise 2: Troubleshooting a Connectivity Problem 143
Identify the Problem 143
Use the Sniffer 143
Use the Debug Flow Tool 144
Fix the Problem 145
Test the Fix 145
Change Log
Change Log
This table includes updates to the FortiGate Infrastructure 6.0 Lab Guide dated 5/13/2018 to the updated
document version dated 8/9/2018.
Change Location
Fixed FIT in the network topology diagram Virtual Lab Basics on page 8
This table includes updates to the FortiGate Infrastructure 6.0 Lab Guide dated 8/9/2018 to this updated
document version dated 11/7/2018.
Change Location
Updated the entire Virtual Lab Basics section "Virtual Lab Basics" on page 8
In this course, you will use a virtual lab for hands-on exercises. This section explains how to connect to the lab
and its virtual machines. It also shows the topology of the virtual machines in the lab.
If your trainer asks you to use a different lab, such as devices physically located in your
classroom, then ignore this section. This section applies only to the virtual lab
accessed through the Internet. If you do not know which lab to use, please ask your
trainer.
Network Topology
Lab Environment
Fortinet's virtual lab for hands-on exercises is hosted on remote data centers that allow each student to have their
own training lab environment or point of deliveries (PoD).
Before starting any course, check if your computer can connect to the remote data center successfully. The
remote access test fully verifies if your network connection and your web browser can support a reliable
connection to the virtual lab.
You do not have to be logged in to the lab portal in order to run the remote access test.
If your computer connects successfully to the virtual lab, you will see the message All tests passed!:
Logging In
After you run the remote access test to confirm that your system can run the labs successfully, you can proceed to
log in.
You will receive an email from your trainer with an invitation to auto-enroll in the class. The email will contain a
link and a passphrase.
Your system dashboard appears, listing the virtual machines (VMs) in your lab topology.
l From the box of the VM you want to open, click View VM.
When you open a VM, your browser uses HTML5 to connect to it. Depending on the VM you select, the web
browser provides access to either the GUI of a Windows or Linux VM, or the CLI-based console access of a
Fortinet VM.
For most lab exercises, you will connect to a jumpbox VM, that could be either a Windows or a Linux VM.
From the jumpbox VM, you will connect over HTTPS and SSH to all other Fortinet VMs in the lab
environment.
If your computer’s connection to the VM times out or closes, to regain access, return to the window or tab that
contains the list of VMs for your session, and reopen the VM.
Screen Resolution
To configure screen resolution in the HTML5 client, use the Resolution drop-down list on the left. You can also
change the color depth:
You can use the Virtual Keyboard panel to either send the Ctrl-Alt-Del combination, or the Windows key:
From the Virtual Keyboard panel, you can also copy text to the guest VM's clipboard:
Student Tools
There are three icons on the left for messaging the instructor, chatting with the class, and requesting assistance:
Troubleshooting Tips
l Do not connect to the virtual lab environment through Wi-Fi, 3G, VPN tunnels, or other low-bandwidth or high-
latency connections.
l Prepare your computer's settings by disabling screen savers and changing the power saving scheme so that your
computer is always on, and does not go to sleep or hibernate.
l For best performance, use a stable broadband connection, such as a LAN.
l You can run a remote access test from within your lab dashboard. It will measure your bandwidth, latency and
general performance:
l If the connection to any VM or the virtual lab portal closes unexpectedly, try to reconnect. If you can't reconnect,
notify the instructor.
l If you can't connect to a VM, on the dashboard, open the VM action menu, and select Reset:
l If that does not solve the access problem, you can try to revert the VM back to its initial state. Open the VM action
menu, and select Revert:
Reverting to the VM's initial state will undo all of your work. Try other solutions first.
l During the labs, if the VM is waiting for a response from the authentication server, a license message similar to the
following example appears:
In this lab, you will configure the router settings, and try 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
Prerequisites
Before beginning this lab, you must restore a configuration file to Local-FortiGate.
In the lab network, Local-FortiGate has two interfaces connected to the Internet: port1 and port2. During 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
configure two link health monitors.
After you complete the challenge, see Configure a Second Default Route on page 19.
Note that, by default, static routes have a Distance value of 10, and a Priority value of 0.
You will create a second default route using the port2 interface. To make sure this second default route remains
inactive, you will assign it a higher distance.
After you complete the challenge, see Configure the Firewall Policies on page 20.
Field Value
Gateway 10.200.2.254
Interface port2
Administrative Distance 20
4. Click the plus (+) icon to expand the Advanced Options section.
5. In the Priority field, enter a value of 5.
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.
After you complete the challenge, see View the Routing Table on page 22
All Sessions logging ensures that all traffic is logged, and not just sessions inspected
by security profiles. This will assist 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
Source LOCAL_SUBNET
Field Value
Destination all
Schedule always
Service ALL
Action Accept
NAT <enable>
The Local-FortiGate configuration now has two default routes with different distances. You will view the routing
table to see which one is active.
4. Enter the following CLI command to list both active and inactive routes:
get router info routing-table database
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 lower distance route is always active.
You will configure two link health monitors to monitor the status of both the port1 and port2 routes.
First you will access various websites, and use the Forward Traffic logs to verify that 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. Open a few new tabs in the web browser, and go to a few websites:
l http://www.pearsonvue.com/fortinet
l http://cve.mitre.org
l http://www.eicar.org
4. Return to the browser tab where you are logged into the Local-FortiGate GUI, and click Log & Report > Forward
Traffic.
5. Click the refresh icon.
6. 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 active and in use.
Before starting the next exercise, you will restore the port1 link health monitor's server configuration with a valid
host address, which will restore the port1 default route as the active route in the routing table.
In this exercise, you'll configure equal cost multipath (ECMP) routing on Local-FortiGate to balance the Internet
traffic between port1 and port2. After that, you'll 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 Method on page 29.
5. Click OK.
By default, the ECMP load balancing method is based on source IP. This works well when there are multiple
clients generating traffic. In the lab network, because you have only one client (Local-Windows), the source IP
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. Using this method, as long as the
traffic goes to multiple destination IP addresses, FortiGate will balance the traffic across both routes.
You will generate some HTTP traffic and verify traffic routing using the Forward Traffic logs.
After you complete the challenge, see Configure Priority on page 30.
Why are all the outgoing packets still being routed through port1?
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 plus (+) icon to expand the Advanced Options section.
4. Change the Priority value to 0.
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 verify traffic routing using the Forward Traffic logs.
The filter 'tcp[13]&2==2' matches packets with the SYN flag on, so the output will show
all SYN packets to port 80 (HTTP).
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
4. Click OK.
First, you will verify the routing table, and then verify policy routing by generating HTTPS traffic and viewing the
CLI sniffer output.
3. Verify that the policy route is added to the policy route table.
As before, this sniffer filter matches packets with the SYN flag on, but this time for port
443 (HTTPS).
2. On the Local-Windows VM, open new tabs in the web browser, and then go to a few HTTPS websites:
l https://www.fortiguard.com
l https://support.fortinet.com
3. Return to the LOCAL-FORTIGATE PuTTY 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-Windows VM, open new tabs in the web browser, and then go to a few HTTP websites:
l http://www.pearsonvue.com/fortinet/
l http://cve.mitre.org
l http://www.eicar.org
3. Return to the open LOCAL-WINDOWS PuTTY session, and press Ctrl+C to stop the sniffer.
4. Analyze the sniffer output:
HTTP (port 80) traffic remains unaffected by the policy route, and is still load balanced across both port1 and
port2 routes.
Yes. If Local-FortiGate detects a problem in any of the routes, the link monitor will remove the
corresponding route, and all Internet traffic will be routed through the remaining route.
Objectives
l Configure SD-WAN load balancing.
l Configure routes and firewall policies for SD-WAN.
l Verify SD-WAN load balancing.
Time to Complete
Estimated: 20 minutes
Prerequisites
Before beginning this lab, you must restore a configuration file to Local-FortiGate.
In this exercise, you will configure SD-WAN using the port1 and port2 interfaces on Local-FortiGate.
Before you can add port1 and port2 as SD-WAN member interfaces, you must remove all configuration elements
referencing the two interfaces.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After you complete the challenge, see Configure SD-WAN Load Balancing on page 39.
4. Click OK.
5. Click Policy & Objects > IPv4 Policy.
6. Select the Full_Access policy, and then click Delete.
7. Click OK.
You will configure SD-WAN load balancing for all Internet traffic between port1 and port2.
After you complete the challenge, see Create a Static Route for the SD-WAN Interface on page 41
Field Value
Interface port1
Gateway 10.200.1.254
Status <enable>
5. In the SD-WAN Interface Members section, click again + sign to add the second interface.
6. Configure the following:
Field Value
Interface port2
Gateway 10.200.2.254
Status <enable>
7. Click Apply.
8. Click Network > SD-WAN Rules.
9. Right click on sd-wan rule and click Edit.
You will create a default route using the sd-wan virtual interface.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After you complete the challenge, see Create a Firewall Policy for SD-WAN Load Balancing on page 42.
Field Value
Destination Subnet
0.0.0.0/0.0.0.0
Interface SD-WAN
Administrative Distance 10
4. Click OK.
You will create the firewall policy to allow the Internet traffic to pass from port3 to the sd-wan interface.
Field Value
Name SDWAN_Access
Source LOCAL_SUBNET
Destination all
Schedule always
Service ALL
Action Accept
NAT <enable>
4. Click OK.
First, you will review the Local-FortiGate routing table to examine the routes installed for SD-WAN. Then, you will
use the CLI packet capture tool to verify whether or not FortiGate is load balancing HTTP traffic between the SD-
WAN member interfaces.
4. Verify that both default routes for port1 and port2 have the same distance value and are active in the routing
table.
After you create a static route for the SD-WAN interface, FortiGate automatically
adds individual routes, with the same distance value, for all member interfaces. This
ensures all routes will be active in the routing table, which makes them eligible for load
balancing.
2. On the Local-Windows VM, open new tabs in the web browser, and go to a few websites:
l http://www.pearsonvue.com/fortinet/
l http://cve.mitre.org
l http://www.eicar.org
3. Return to the open LOCAL-FORTIGATE PuTTY session, and press Ctrl+C to stop the sniffer.
4. Analyze the sniffer output.
The SYN packets are egressing both port1 and port2. This verifies that Local-FortiGate is now load
balancing all Internet traffic across SD-WAN member interfaces.
In this lab, you will create one 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 Route traffic between VDOMs by using inter-VDOM links.
Time to Complete
Estimated: 25 minutes
Topology
The goal of the lab is to create the following topology. You will use VDOMs to logically split the 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-Windows must pass through the customer VDOM first, and then the root
VDOM.
Prerequisites
Before beginning this lab, you must restore a configuration file to Local-FortiGate.
During this exercise, you will 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 will have access to only one
VDOM.
The configuration file for this exercise already has VDOMs enabled.
Create a VDOM
A FortiGate with enabled VDOMs always includes a root VDOM. Administrators 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. On the Local-Windows VM, open a browser and log in to the Local-FortiGate GUI at 10.0.1.254 with the user
name 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 menu at the top of the menu. In the drop-down menu, you can select the global settings or the
VDOM-specific settings for the root VDOM. The default setting is Global.
Field Value
5. Click OK.
Notice that the drop-down menu at the top of the menu shows a third option: the VDOM-specific settings for
customer:
You will create an administrator account that has access only to the customer VDOM .
Field Value
Password fortinet
4. Remove root from the Virtual Domains list to restrict the new administrator's can access to customer only.
5. Click OK.
The account customer-admin will be able to log in only through an interface in the customer VDOM. So, move
the port3 interface, which connects to the internal network, to the customer VDOM.
4. Click OK.
For Local-Windows, 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
3. Click OK.
4. Log out of the Local-FortiGate GUI.
To see what access is available to the customer-admin account, try logging on to the FortiGate-Local GUI as
customer-admin.
3. Log out of the Local-FortiGate GUI, and log in back with the user name admin and password password, which
has access to the global settings and all VDOMs.
Logging in with the admin account gives you full access to both the root VDOM as well as the
FortiGate system resources. Logging in with the customer-admin account provides access
only to the customer VDOM, and does not provide access to the system resource details.
After you enable VDOMs , the structure of the GUI menu and the tree structure of the CLI changes. In this
exercise, you will examine the differences in the CLI for VDOMs.
Did the CLI reject the command? To execute this command when VDOMs are
enabled, you must specify the VDOM first, in order for FortiGate to know which
VDOM’s routing table to display.
config vdom
edit customer
VDOM names are case sensitive, and the edit command can both modify and create
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.
5. Now that you've specified the VDOM, try looking at the routing table again.
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.
next
edit root
This time, the information displayed in the routing table belongs to the root VDOM. You will observe that this
table is different from the one for the customer VDOM.
In this exercise, you will 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
7. Click OK.
After creating the inter-VDOM link, notice the two inter-VDOM sub-interfaces added within 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-Windows crossing the customer VDOM first and then the root VDOM, before the traffic goes
to the Linux server and the Internet.
Field Value
Destination Subnet
0.0.0.0/0.0.0.0
Gateway 10.10.100.1
Interface vlink1
5. Click OK.
Now, you will specify a route for the root VDOM to the internal network.
Field Vlaue
Destination Subnet
10.0.1.0/24
Gateway 10.10.100.2
Interface vlink0
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 58.
Field Value
Name Internet
Source all
Destination all
Schedule always
Service ALL
Action ACCEPT
NAT <disable>
5. Click OK.
Field Value
Name Internet
Source all
Destination all
Schedule always
Service ALL
Action ACCEPT
NAT <enable>
5. Click OK.
Now, 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 command prompt window, and then execute a traceroute command to an Internet public IP address:
tracert –d 4.2.2.2
In this lab, you will create a transparent mode VDOM. You will also configure an inter-VDOM link, this time
between a transparent mode VDOM and a NAT mode VDOM.
Objectives
l Configure a transparent mode VDOM.
l Configure an inter-VDOM link.
Time to Complete
Estimated: 20 minutes
Lab Topology
The goal of this lab is to create the topology below. You will use VDOMs to logically split the Local-FortiGate into
two virtual firewalls: the root VDOM and the inspect VDOM. The root VDOM is in NAT mode. The inspect
VDOM is in transparent mode and will be inspecting the traffic for virus protection. So all Internet traffic coming
from Local-Windows must transverse first the root VDOM, and then the inspect VDOM.
Prerequisites
Before beginning this lab, you must restore a configuration file to Local-FortiGate.
3. Ensure the Scope is set for Global, then click Local PC, and then click Upload.
4. Click Desktop > Resources > FortiGate-Infrastructure > Layer2 > local-layer-2.conf, and then click
Open.
5. Click OK.
6. Click OK to reboot.
The configuration file for this exercise already has VDOMs enabled. In this exercise, you need to create only a
transparent mode VDOM called inspect and then move the interface to the inspect VDOM.
You will create a new VDOM, and then change its operation mode to transparent.
Field Value
5. Click OK.
6. Continuing on the Local-Windows VM, open PuTTY and connect over SSH to the LOCAL-FORTIGATE saved
session.
7. At the login prompt, enter the user name admin and password password.
8. Enter the following command to change the inspect VDOM operation mode from the default NAT mode to
transparent mode:
config vdom
edit inspect
config system settings
set opmode transparent
set manageip 10.200.1.200/24
end
end
It is the management IP address for the transparent mode VDOM. Interfaces that belong to a transparent
mode VDOM do not have IP addresses, but the VDOM itself has one. You can use this IP address for
administrative access to the device and this VDOM.
4. Click OK.
In this exercise, you will create an inter-VDOM link. Then, you will create the firewall policies that allow Internet
access across both VDOMs. Finally, you will configure and test antivirus inspection in the inspect VDOM.
Create the inter-VDOM link for routing traffic from the root VDOM to the Internet through the inspect VDOM.
Field Value
Field Value
7. Click OK.
The Interfaces page displays with the updated configurations.
8. Review the inter-VDOM link interfaces you just created (expand vlink).
Note that vlink0 and vlink1 are logical interfaces that you can use to route traffic between the root and
inspect VDOMs. An IP address is configurable only on the NAT mode VDOM interface.
You will create firewall policies to allow Internet traffic to pass through both VDOMs. You will also enable antivirus
inspection in the inspect VDOM.
l Create two firewall policies to allow Internet traffic to pass through both VDOMs. One policy will be from
vlink1 to port1 and the other will be from port3 to vlink0.
l In the inspect VDOM, enable the default antivirus inspection profile on firewall policy.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After you complete the challenge, see Route Inter-VDOM traffic on page 69.
Field Value
Name Inspected_Internet
Source all
Destination all
Schedule always
Service ALL
Action ACCEPT
5. In the Security Profiles section, turn on the AntiVirus switch, and then, in the antivirus profile drop-down menu,
select g-default.
6. Click OK.
Field Value
Name Internet
Field Value
Source all
Destination all
Schedule always
Service ALL
Action ACCEPT
6. Click OK.
To route traffic from Local-Windows to the inspect VDOM, you must create a default route in the root VDOM.
Field Value
Destination Subnet
0.0.0.0/0.0.0.0
Gateway 10.200.1.254
Interface vlink0
4. Click OK.
You will use the traceroute command to confirm that Internet traffic is crossing the inter-VDOM link. Then, you
will try to download a virus to confirm that antivirus inspection in the inspect VDOM is working.
tracert –d 10.200.3.1
A transparent VDOM does not route packets like a NAT VDOM. Instead, it forwards frames based on the
destination MAC addresses as a LAN Layer 2 switch. A traceroute shows the IP addresses of all the routers
along a path to a destination. The inspect VDOM is not acting as a router, but as a Layer 2 switch.
http://www.eicar.org
6. Confirm that the antivirus profile in the inspect VDOM blocks the following action.
Remember that the root VDOM is the unrestricted Internet side of the inter-VDOM link. In the next steps
you will review the logs for the inspect VDOM.
In this lab, you will configure a point-to-point IPsec VPN between two FortiGate devices. You will also configure
redundant VPN tunnels with failover capability between the two FortiGate devices.
Objectives
l Deploy a site-to-site VPN between two FortiGate devices.
l Compare route-based to policy-based VPNs.
l Monitor VPN tunnels.
l Configure redundant VPNs between two FortiGate devices.
Time to Complete
Estimated: 60 minutes
Prerequisites
Before beginning this lab, you must restore a configuration file to Remote-FortiGate and Local-FortiGate.
Make sure to 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 exercise.
During this lab, you will configure an IPsec tunnel between Local-FortiGate and the Remote-FortiGate for
communication between the Local-Windows VM and Remote-Windows VM.
Now, you will configure Local-FortiGate using the VPN wizard, which creates the IPsec in route-based mode.
Field Value
Name ToRemote
5. Click Next .
6. Configure the following settings:
Field Value
IP Address 10.200.3.1
7. Click Next.
8. Configure the following settings:
Field Value
9. Click Create.
You should see the following screen:
Now, you will review the objects that were created by the VPN wizard.
You will need this information to configure the other FortiGate. The quick mode selectors on both sides must
mirror each other. In other words, the Local Address on one side must match the Remote Address on the
other side.
3. Click Cancel.
4. Click Network > Interfaces.
5. Click the plus (+) icon that appears beside port1.
You will see a new virtual interface named ToRemote (matching the phase 1 name).
The wizard created the VPN using a route-based configuration. FortiGate automatically adds an IPsec
virtual interface for each VPN configured as route-based. This does not happen in a policy-based
configuration.
A route-based VPN requires firewall policies and at least one route to the remote network. As you will see, the
wizard has created all of these additional objects for you.
5. Click Policy & Objects > Addresses, and then click + sign to expand Address and Address Group.
Observe two new firewall address objects: ToRemote_local_subnet_1, and ToRemote_remote_subnet_
1.
7. Click Network > Static Routes, and look at the static route added by the wizard.
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
higher-distance route. 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.
For learning purposes, you will configure the second FortiGate device differently. During this exercise, you will
create the VPN on Remote-FortiGate using a policy-based configuration, without using the wizard.
By default, policy-based configurations are hidden in the GUI. Now, you will show policy-based VPN settings in
the GUI.
Field Value
Name ToLocal
4. Click Next.
5. Disable Enable IPsec Interface Mode.
Field Value
IP Address 10.200.1.1
Interface port4
Field Value
Now the quick mode selectors on both sides mirror each other. If that is not the case,
the tunnel will not come up.
Now, you will create a firewall policy to allow traffic. In a policy-based configuration, only one policy is required to
allow traffic initiated on either side. The policy is applied bidirectionally.
Field Value
Source REMOTE_SUBNET
Destination LOCAL_SUBNET
Schedule always
Service ALL
Action IPsec
Field Value
4. Click OK.
This is probably the first time you have seen the action IPsec for a firewall policy. In
previous exercises, the available actions were Accept and Deny only. IPsec is
displayed in the GUI only when the policy-based VPN settings are not hidden.
The new policy was created below the firewall policy for Internet traffic. Now, you will need to move the new
policy up for the VPN traffic to match it.
The VPN wizard creates the IPsec using a route-based configuration, which always requires additional
routes (usually static routes) to route the traffic through the IPsec virtual interface. This is usually not
required in a policy-based configuration. Policy-based configurations require the VPN traffic to match a
firewall policy with the action IPsec. Because traffic from 10.0.2.0/24 to 10.0.1.0/24 matches the
existing default route, and so the IPsec firewall policy from port6 to port4, no additional routes are needed.
You have finished the configuration on both FortiGate devices. Now, you will test the VPN.
The Status column of the VPN contains a green up arrow, indicating that the tunnel is up.
No. In the current configuration, the tunnel will stay down until you either bring it up manually, or there is
traffic that should be routed through the tunnel. Because you are not generating traffic between
10.0.1.0/24 and 10.0.2.0/24 yet, the tunnel is still down. If you had generated the required traffic
while the tunnel was down, it would have come up automatically.
4. On the Local-Windows VM, open a command prompt window, and then run the following command to ping
Remote-Windows:
ping 10.0.2.10
You will notice that counters for Incoming Data and Outgoing Data have increased. This indicates that the
traffic between 10.0.1.10 and 10.0.2.10 is successfully being encrypted and routed through the tunnel.
In this exercise, you will configure one VPN for redundancy between Local-FortiGate and Remote-FortiGate.
Prerequisites
Before beginning this lab, you must restore a configuration file on Remote-FortiGate and Local-FortiGate.
Make sure to 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 exercise.
Once you load the configurations, Remote-FortiGate will be pre-configured for VPN
redundancy. The steps to configure Remote-FortiGate are included in this exercise,
however, this exercise provides instructions where you can review this configuration
for Remote-FortiGate.
Now, you will configure the IPsec VPN by creating phases 1 and 2.
Field Value
Name Remote_1
4. Click Next.
5. In the Network section, configure the following settings:
Field Value
IP Address 10.200.3.1
Interface port1
Field Value
The VPN was created as route-based. This means that the VPN requires at least one route (static or dynamic) to
forward the traffic through the tunnel. Now, you will create a static route for that purpose.
Field Value
Destination Subnet
10.0.2.0/24
Interface Remote_1
4. Click OK.
Now, you will create an interface zone that will includes the two IPsec virtual interfaces (the virtual IPsec
interfaces for the primary and secondary VPNs). It is not mandatory to have an interface zone for redundant
VPNs, but it minimizes the number of firewall policies you must create later.
Field Value
Name VPN
4. Click OK.
You will add a second VPN interface to the zone in a later exercise, when you
configure a backup VPN.
Now, you will create two firewall policies between port3 and VPN , one for each traffic direction.
Field Value
Name Remote_out
Source LOCAL_SUBNET
Field Value
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
For the purposes of this lab, Remote-FortiGate is preconfigured for you. This configuration was included in the
configuration file you uploaded at the beginning of this exercise. You can review this configuration by completing
the steps that follow.
Now, you will test the VPN by generating some traffic and confirming that the VPN comes up.
FortiGate may not have previously established the VPN. If so, the first few pings will
fail while FortiGate negotiates and establishes the VPN.
3. Return to the browser tab where you are logged into the Local-FortiGate GUI, and click Monitor > IPsec
Monitor.
4. Confirm that the Remote_1 VPN is up.
You should see a green arrow in the Status column.
In this exercise, you will create a second route-based VPN for redundancy. This time, configure the VPN from
Local-FortiGate port2 to Remote-FortiGate port5.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After you complete the challenge, see Review the Backup VPN Configuration on Remote-FortiGate on
page 93.
Field Value
Destination Subnet
10.0.2.0/24
Interface Remote_2
Administrative Distance 20
6. Click OK.
7. Click Network > Interfaces.
8. Edit the zone VPN .
9. In the Interface Members field, add Remote_2.
10. Click OK.
For the purpose of this lab, Remote-FortiGate is preconfigured for you. This configuration was included in the
configuration file you uploaded at the beginning of the previous exercise. You can review this configuration by
completing the steps that follow.
Now, you will test the VPN failover. You will use the sniffer tool to monitor which VPN the traffic is using.
4. Open a command prompt window, and then run a continuous ping to Remote-Windows:
ping –t 10.0.2.10
5. Return the the PuTTY session and view the sniffer output.
It will show that Local-FortiGate is routing the packets through the VPN Remote_1:
Now, you will simulate a failure in the VPN Remote_1 and observe how the FortiGate starts using the
secondary VPN Remote_2.
6. Return to the browser tab where you are logged into the Local-FortiGate GUI, and click Network > Interfaces.
7. Edit port1.
8. Set the Interface State to Disabled to bring down the tunnel Remote_1.
9. Click OK.
10. Wait a few minutes until FortiGate detects the failure in the VPN Remote_1 and reroutes the traffic through
Remote_2.
11. Return to the PuTTY session and view the sniffer output again.
Notice that the VPN Remote_2 is being used now:
Omitting these last steps may prevent you from doing the next exercise.
In this lab, you will configure Fortinet's solution for single sign-on (FSSO). FSSO enables FortiGate to identify
users by collecting user logon activity from Windows Active Directory.
This includes installing and configuring the domain controller agent and FSSO collector agent in order to monitor
and consolidate the user logon events and send them to FortiGate.
You will also configure the SSO option on FortiGate to enable communication with the collector agent,
specifically to poll event log information.
Objectives
l Install and configure the Fortinet domain controller agent.
l Install and configure the FSSO collector agent.
l Configure SSO 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
Prerequisites
Before beginning this lab, you must restore a configuration file to Local-FortiGate.
To configure FortiGate to identify users by polling their logon events using a Fortinet Single Sign-On (FSSO)
agent, you must install and configure a collector agent.
The following FSSO agents are available on the Fortinet Support website
(http://support.fortinet.com):
l DC agent
l Collector agent for Microsoft servers: FSSO_Setup
l Collector agent for Novell directories: FSSO_Setup_edirectoryController agent for
Citrix servers: TSAgent_Setup
Then, you will configure your FortiGate to communicate and poll information from the FSSO collector agent. For
this, you must assign the polled user to a firewall user group and add the user group as a source on a firewall
policy.
Finally, you can verify the user logon event collected by FortiGate. This event is generated after a user logs on to
the Windows Active Directory domain. Therefore, no firewall authentication is required.
In this section, you will install the FSSO collector agent on a Windows server.
3. Click Next.
4. Accept the license agreement, and then click Next.
5. Accept the default destination folder, and then click Next.
6. Supply the following credentials, and then click Next:
l User Name: .\Administrator
l Password: password
The password is the administrative user password of the Local-Windows VM.
In this procedure, you will configure the FSSO collector agent to allow FortiGate to poll information from it using
collector agent-based polling mode without a DC agent.
You will use this password later when configuring FortiGate. This password allows
FortiGate to communicate and poll the logon events from the FSSO collector agent.
To select a DC to monitor
1. Continuing in the Fortinet Single Sign On Agent Configuration wizard, in the Common Tasks section, click
Show Monitored DCs to specify the monitored domain controller.
2. Click Select DC to Monitor.
3. In the Working Mode section, make sure the following elements are selected in order to poll the logon sessions
from the domain controller:
l Polling Mode (Polling logon sessions from Domain Controller)
l Check Windows Security Event Logs
Collector agent-based polling mode has three options for collecting login information:
4. In the Domain controller monitored by this collector agent section, select the TRAININGAD/Win-
Internal.trainingAD.training.lab check box to monitor by FSSO collector agent.
5. Click OK.
6. Once complete, click Refresh Now.
You will see a logon event for 10.0.1.10, which is the IP address for the Local-Windows VM.
7. Click Close.
6. Click OK.
7. Click OK.
FortiGate will poll this monitored group after you configure the SSO settings on FortiGate.
In this procedure, you will set up the SSO server on FortiGate. This process allows FortiGate to automatically
identify the user who connects using SSO. Then, you must add the polled FSSO users to an FSSO user group,
before configuring your firewall policies.
Field Value
Name TrainingDomain
Field Value
Password Fortinet
Note: This is the password you specified while configuring the Fortinet
Single Sign-On Agent. This password allows the FortiGate to
communicate and poll the logon events from the FSSO collector agent.
5. Click View.
You will see the monitored group named: TRAININGAD/AD-USERS.
Apply and Refresh allows FortiGate to communicate and poll information from the FSSO collector agent.
If FortiGate does not refresh with the correct polled information, it could be a password mismatch. The
agent IP password must be the same as the password you set up in the Authentication section during
the FSSO collector agent configuration.
Field Value
Name Training
Field Value
Members TRAININGAD/AD-USERS
The polled FSSO user is automatically listed because of the selected group type:
FSSO.
3. Click OK.
In this procedure, you will assign your polled FSSO user 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 polled FSSO user to any firewall policy
1. On the Local-Windows VM, open a new browser tab, and go to https://www.fortinet.com.
You will note that all users can access the Fortinet website.
5. Click OK.
Test FSSO
After a user logs on to the Windows Active Directory domain, the user is automatically identified based on their
IP. As a result, FortiGate allows the user to access network resources as policy decisions are made.
For the purposes of this lab, you will generate a user logon event and monitor FortiGate to observe how it
identifies the user.
To test the connection after assigning the polled FSSO user to the firewall policy
1. On the Local-Windows VM, open a new browser tab, and go to http://support.fortinet.com.
Because the current logged in user is not within the TRAININGAD/AD-USERS group.
To review the connection status between the FSSO collector agent and FortiGate
1. Continuing on the Local-Windows VM, open PuTTY and connect over SSH to the LOCAL-FORTIGATE saved
session.
2. At the login prompt, enter the user name admin and password password.
3. Enter the following command to show the connection status between FortiGate and each collector agent.
To monitor communication between the FSSO collector agent and the FortiGate (1)
1. In the VM List, from the box of the Local-FortiGate, click View VM to open the FortiGate console.
2. Login as admin and password password.
3. Enter the below commands:
diagnose debug enable
diagnose debug application authd 8256
You will return to this output after generating a logon event. Continue to the next procedure.
Field Value
Note: This user has been preconfigured for you in Active Directory.
Password Training!
5. Press Enter.
To monitor communication between the FSSO collector agent and the FortiGate (2)
1. Return to the console session of the Local-FortiGate VM, and view the output of the diagnose command:
You have generated a logon event in the Local-Windows VM and it has been captured
by your domain controller, polled by your collector agent, and forwarded to FortiGate.
You may see two IP addresses because the Local-Windows VM has two NICs in your
lab environment.
----FSSO logons----
IP:10.0.1.10 User: ADUSER1 Groups: TRAINING/AD-USERS
Workstation: WIN-INTERNAL.TRAININGAD.TRAINING.LAB MemberOf: Training
Total number of logons listed: 1, filtered: 0
----end of FSSO logons----
You may see two IP addresses because the Local-Windows VM has two NICs in your
lab environment.
You may see two IP addresses because the Local-Windows VM has two NICs in your
lab environment.
Field Value
Password password
5. Press Enter.
In this lab, you will 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 in the cluster.
Finally, you will configure management port(s) on each FortiGate 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: 45 minutes
Lab HA Topology
After you upload the required configurations to each FortiGate, the logical topology will change to the following:
Prerequisites
Before beginning this lab, you must restore a configuration file to each FortiGate.
Use the procedure that follows to restore the correct configuration to each FortiGate.
Failure to restore the correct configuration to each FortiGate will prevent you from
doing the lab exercise.
FortiGate High Availability (HA) uses the FortiGate Clustering Protocol (FGCP), which uses a heartbeat link for
HA-related communications to discover other FortiGate devices in same HA group, elect a primary device,
synchronize configuration, and detect failed devices in an HA cluster.
In this exercise, you will configure HA settings on both FortiGate devices. You will observe the HA synchronize
status, and verify the configuration is in sync on both FortiGate devices using the diagnose commands.
Now, you will configure HA-related settings using the Local-FortiGate GUI.
Field Value
Mode Active-Active
Password Fortinet
3. Click OK.
Now, you will configure HA-related settings on Remote-FortiGate using the console.
config system ha
set group-name Training
set mode a-a
set password Fortinet
set hbdev port2 0
set session-pickup enable
set override disable
set priority 100
end
Now that you have configured HA on both FortiGate devices, you will verify that HA has been established and the
configurations are fully synchronized.
The checksums for all cluster members must match, in order for the FortiGate devices to be in a synchronized
state.
3. When prompted, log back in to the Remote-FortiGate console as admin and password password..
4. To check the HA synchronize status, run the following command: .
9. Alternatively, you can run the following command on the console of any FortiGate in the cluster, to view the
checksums of all cluster members:
After the checksums of both FortiGate devices match, you will verify the cluster member roles to confirm the
primary and secondary devices.
In this configuration, the FortiGate device that is named Local-FortiGate is the master
in the HA cluster because override is disabled and monitored ports are not configured.
Next, the cluster checks for priority—Local-FortiGate, which has a priority of 200, has
greater priority than Remote-FortiGate, which has a priority of 100.
The primary FortiGate will have more sessions than the secondary FortiGate. This is
because all management traffic is with the primary; all non-TCP traffic is also handled
by the primary. By default, only TCP sessions that require a security profiles inspection
are load balanced between the primary and secondary FortiGate devices.
You have set up an HA cluster. Now, you will 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 failover.
After you have performed these steps, seeVerify the HA Failover and FortiGate Roles on page 117.
http://www.dailymotion.com
ping 4.2.2.2 -t
4. To trigger a failover, on the Local-FortiGate console, run the following command to reboot the Local-FortiGate.
execute reboot
Now, you will verify the HA failover, and check the roles of FortiGate in an HA cluster.
2. To verify that Remote-FortiGate is acting as the primary device in the HA cluster, on the Remote-FortiGate
console, run the following command:
3. To see the status of all cluster members, run the following command on any FortiGate in the cluster:
You should see that Local-FortiGate rejoins the cluster as a secondary. It has lost its role of primary:
Now, you will trigger a failover by resetting the HA uptime on the current primary FortiGate—which should be
Remote-FortiGate—and verifying FortiGate's role in the HA cluster.
By resetting the HA uptime, you are forcing the cluster to use the next parameter to
determine which FortiGate has more priority for becoming the primary. As per the
configuration, Local-FortiGate has a priority of 200, and Remote-FortiGate has a
priority of 100. Local-FortiGate will become the primary device in the cluster.
2. Remote-FortiGate now has the backup role in the cluster. On the Remote-FortiGate console, run the following
command to verify it:
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.
3. On the Remote-FortiGate console, run the following command to reboot the Remote-FortiGate:
execute reboot
The output will show that the current primary FortiGate is sending heartbeat packets and trying to
synchronize its configuration with the secondary FortiGate’s configuration.
6. 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 hasync 0), and then press the Enter key.
7. Return to Local-Windows VM and close the command prompt to stop the continuous ping.
8. Close the browser.
In this exercise, you will configure a spare interface in the cluster to be a nonsynchronizing management
interface. This will allow both FortiGate devices to be reachable only for SNMP and management purposes.
If a management interface is not configured, you will have access to the GUI of only the primary FortiGate in the
cluster. However, you can connect to the secondary FortiGate only through the primary FortiGate's CLI or through
the console connection.
You can also configure an in-band HA management interface, which is an alternative to the reserved HA
management interface feature and does not require reserving an interface that is only for management access.
You will connect to the secondary FortiGate through the CLI of the primary FortiGate.
5. Run the following command to get the status of the secondary FortiGate:
7. To return to the CLI of Local-FortiGate, run the following command to return to the primary:
exit
You will use an unused interface on the FortiGate devices in an HA cluster to configure a management interface.
This allows you to configure a different IP address for this interface for each FortiGate in the HA cluster.
4. Enable Management Interface Reservation, and in the Interface field, select port7.
5. Click OK.
Configure and Access the Primary FortiGate Using the Management Interface
You will configure and verify access to the primary FortiGate using the management interface.
To configure and verify access to the primary FortiGate using the management interface
1. From the VM List, on the Local-FortiGate console, log in as admin and password password.
2. Run the following commands to configure port7:
Even though this address overlaps with port3, and would not usually be allowed
(FortiGate does not allow overlapping subnets), it is allowed here because the
interface now has a special purpose, and is excluded from the routing table.
3. Return to the Local-Windows VM, open a browser and log in to the Local-FortiGate GUI at 10.0.1.253 (note
the IP address) as admin and password password.
This will verify connectivity to port7.
You will configure and verify access to the secondary FortiGate using the management interface.
l Verify that port7 has no configuration, and then configure the port7 IP/Netmask as
10.0.1.252/24 with the same allowaccess configured for Local-FortiGate port7.
2. On the Local-Windows VM, log in to the Remote-FortiGate GUI (admin/password) using the port7 IP
address to verify connectivity.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After the configuration is ready, see Disconnect FortiGate From the Cluster on page 123.
To configure and verify access to the secondary FortiGate using the management interface
1. From the VM List, on the Remote-FortiGate console, log in as admin and password password.
2. Verify that the non synchronizing interface settings have been synced to the secondary:
show system ha
4. Configure port7:
Each device in the cluster now has its own management IP address for monitoring purposes.
You will disconnect Remote-FortiGate from the cluster. FortiGate will prompt you to configure an IP address on
any port on FortiGate so that you can access it after disconnecting.
Field Value
Interface port3
IP/Netmask 10.0.1.251/24
5. Click OK.
This removes FortiGate from the HA cluster.
Now, you will restore the Remote-FortiGate configuration so that you can use the Remote-FortiGate in the next
labs.
Failure to perform these steps will prevent you from doing the next exercise.
2. On the Local-Windows VM, open a browser and log in to the Remote-FortiGate GUI at 10.0.1.251 with the
user name admin and password password.
3. In the upper-right corner of the screen, click admin, and then click Configuration > Restore.
Failure to perform these steps will prevent you from doing the next exercises.
In this lab, you will learn how to configure FortiGate to be an explicit and transparent web proxy.
Objectives
l Configure FortiGate to act as a web proxy.
l Apply security policies to web proxy traffic based on HTTP headers.
l Authenticate, authorize, and monitor web proxy users.
Time to Complete
Estimated: 40 minutes
Prerequisites
Before beginning this lab, you must restore a configuration file to Local-FortiGate.
During this exercise, you will configure the FortiGate to act as an explicit web proxy. You will also configure the
FortiGate to authenticate and authorize Internet access for specific users. The authentication enforcement is
done with an authentication scheme and an authentication rule. The authorization is done by adding the allowed
user groups to the source of the proxy policy.
After that, you will manually configure Firefox with the proxy IP address and port.
By default, the explicit web proxy settings are hidden on the GUI. You will show them.
You will create an authentication scheme to use the local user database for web proxy authentication.
2. At the login prompt, enter the user name admin and password password.
3. Enter the following commands to create the authentication scheme:
config authentication scheme
edit WebProxyScheme
set method form
set user-database local
next
end
You will enforce web proxy authentication by creating an authentication rule that matches all traffic coming from
the internal subnet. You will use the authentication scheme created in the previous procedure.
You will create the policy to allow explicit proxy traffic to access the Internet. Only the user student will be
authorized to browse the Internet through the proxy.
Field Value
Enabled On port3
Field Value
Destination all
Schedule always
Service webproxy
Action ACCEPT
4. Click OK.
You have configured Local-FortiGate as an explicit web proxy. Now, you will configure Firefox to use the explicit
web proxy.
2. Click Options.
Field Value
Port 8080
7. Click OK.
8. Close Firefox.
Field Value
Password fortinet
After entering these credentials, you should have Internet access through the explicit web proxy.
You will execute a CLI command to display the list of active web proxy users.
For each explicit web proxy connection to a website, two TCP connections are usually created: one from the client
to the proxy, and one from the proxy to the server.
You will run some debug commands to list the sessions established between the client and the proxy. Then, you
will list the sessions established between the proxy and the servers.
To list the active explicit web proxy sessions between the client and the proxy
1. Continuing on the Local-Windows VM, open a few tabs in Firefox, and generate some HTTP traffic, such as:
l http://www.pearsonvue.com/fortinet/
l http://cve.mitre.org
l http://www.eicar.org
2. Return to the Local-FortiGate PuTTY session, and type these CLI commands:
You can also use the grep command to display only the source and destination IP addresses and ports for
each session:
diagnose sys session list | grep hook=pre
Why don’t you see any public IP address listed in those sessions?
Two TCP sessions are usually created for any client-to-server connection that goes through an explicit web
proxy: one from the client to the proxy, and one from the proxy to the server. By using the destination port
8080 as the filter, you are listing only the sessions from the client (10.0.1.10) to the proxy's internal
interface (10.0.1.254).
To list the active explicit web proxy sessions between the proxy and the servers
1. Continuing on the Local-Windows VM, open a few tabs in Firefox, and generate some HTTP traffic, such as:
l http://www.pearsonvue.com/fortinet/
l http://cve.mitre.org
l http://www.eicar.org
2. Return to the Local-FortiGate PuTTY session, and type these CLI commands:
Why don’t you see the IP address of the Windows server (10.0.1.10)?
By using the destination port 80 as the filter, you are listing only the sessions from the proxy's external
interface (10.200.1.1) to the server. The client's IP, in these cases, is not the source or the destination.
During this exercise, you will configure the FortiGate to act as a transparent web proxy. You will use a proxy
address to selectively block web traffic to the Fortinet website while allowing traffic to other destinations.
With transparent web proxy, browsers do not need to be explicitly configured to send traffic to the proxy
IP address. HTTP packets are transparently inspected by the proxy as they flow from the client to the server.
3. Click Options.
4. Scroll down to the Network Proxy section and click Settings.
5. Select No proxy.
6. Click OK.
7. Close Firefox.
To transparently redirect HTTP packets to the web proxy, the web traffic must match an allowed firewall policy
that is using a proxy options profile with the setting HTTP Policy Redirect enabled. So, you will create a proxy
options profile with this setting enabled and assign it to the outbound firewall policy.
Field Value
Name HTTP_Redirect
5. Click OK.
4. Click OK.
You will create two proxy policies. One policy will block traffic to any hostname that contains eicar.org. The
other policy will allow traffic to any other destination. For the first policy, you will use a proxy address to match
traffic using the information in the host field of the HTTP headers.
Field Value
Name EICAR
Note that the regex pattern that you entered starts with a dot.
4. Click OK.
l Configure the first proxy policy to block traffic to the EICAR website using the proxy address created in To
create a proxy address on page 137.
l Configure a second proxy policy to allow all other traffic.
If you require assistance, or to verify your work, use the step-by-step instructions that follow.
After you complete the challenge, seeTesting the Transparent Web Proxy on page 138.
Field Value
Source LOCAL_SUBNET
Schedule always
Service webproxy
Action DENY
4. Click OK.
Field Value
Source LOCAL_SUBNET
Destination all
Schedule always
Service webproxy
Action ACCEPT
4. Click OK.
In this lab, you will run some 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 your network’s normal behavior.
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
Prerequisites
Before beginning this lab, you must restore a configuration file to Local-FortiGate.
During this exercise you will use CLI commands to get information about FortiGate, such as traffic volume, CPU
usage, memory usage, and ARP table.
You will execute some diagnostic commands and take note of some of the information displayed.
Field Value
Current HA mode
Hostname
CPU utilization
Memory utilization
Use the following CLI commands to find the information requested above:
get system status
get system performance status
get hardware nic port1
diagnose ip arp list
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.)
During 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-Windows VM and the
Linux server.
ping -t 10.200.1.254
The ping is failing. You will use the sniffer and debug flow tools in Local-FortiGate to find out why.
3. Do not close the command prompt window. Keep the ping running.
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 Fix on page 145.
You will start troubleshooting by sniffing the ICMP traffic going to the Linux server.
The packets are arriving to FortiGate, but FortiGate is not routing them.
To get information about why the packets are being dropped, you will run the debug flow tool.
Output should be similar to what is shown below. The 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 message Denied by forward policy check 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 any configured policy.
The policy 0 indicates that the traffic was denied by the default implicit policy. If the traffic were blocked
by an explicitly configured policy, its policy ID number would be indicated in this output, instead of the
number zero.
Now that we have found the cause of the problem, let's fix it.
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 command prompt window, and start the ping again:
ping -t 10.200.1.254
Additionally, you will see the debug flow logs from the return (ping reply) packets:
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 a FortiGate. Sniffer the traffic first, to check
that the packets are arriving to FortiGate, and that FortiGate is properly routing them.
If the sniffer shows that the traffic is being dropped by FortiGate, use the debug flow
tool to find out why.