FortiOS 7.0.7 Administration Guide
FortiOS 7.0.7 Administration Guide
FortiOS 7.0.7
FORTINET DOCUMENT LIBRARY
https://docs.fortinet.com
FORTINET BLOG
https://blog.fortinet.com
NSE INSTITUTE
https://training.fortinet.com
FORTIGUARD CENTER
https://www.fortiguard.com
FEEDBACK
Email: [email protected]
Change Log 20
Getting started 21
Differences between models 21
Low encryption models 21
Using the GUI 21
Connecting using a web browser 22
Menus 22
Tables 23
Entering values 25
GUI-based global search 27
Loading artifacts from a CDN 28
Using the CLI 28
Connecting to the CLI 28
CLI basics 31
Command syntax 37
Subcommands 40
Permissions 42
FortiExplorer Management 42
Getting started with FortiExplorer 43
Connecting FortiExplorer to a FortiGate with WiFi 46
Configure FortiGate with FortiExplorer using BLE 47
Running a security rating 49
Upgrading to FortiExplorer Pro 49
Basic administration 50
Basic configuration 50
Registration 52
FortiCare and FortiGate Cloud login 54
Transfer a device to another FortiCloud account 57
Configuration backups 59
LEDs 63
Alarm levels 67
Troubleshooting your installation 68
Dashboards and Monitors 71
Using dashboards 71
Using widgets 72
Widgets 74
Viewing device dashboards in the Security Fabric 76
Creating a fabric system and license dashboard 77
Example 77
Dashboards 78
Resetting the default dashboard template 79
Status dashboard 79
Security dashboard 81
Network dashboard 83
Change Log
Not all FortiGates have the same features, particularly entry-level models (models 30 to 90). A number of features on
these models are only available in the CLI.
Consult your model's QuickStart Guide, hardware manual, or the Feature / Platform Matrix for
further information about features that vary by model.
FortiGate models differ principally by the names used and the features available:
l Naming conventions may vary between FortiGate models. For example, on some models the hardware switch
interface used for the local area network is called lan, while on other units it is called internal.
l Certain features are not available on all models. Additionally, a particular feature may be available only through the
CLI on some models, while that same feature may be viewed in the GUI on other models.
If you believe your FortiGate model supports a feature that does not appear in the GUI, go to System > Feature
Visibility and confirm that the feature is enabled. For more information, see Feature visibility on page 2043.
Some FortiGate models support a low encryption (LENC) license. With an LENC license, FortiGate devices are
considered low encryption models and are identified by LENC, for example FG-100E-LENC.
LENC models cannot use or inspect high encryption protocols, such as 3DES and AES. LENC models only use 56-bit
DES encryption to work with SSL VPN and IPsec VPN, and they are unable to perform SSL inspection.
For a list of FortiGate models that support an LENC license, see FortiGate LENC Models.
This section presents an introduction to the graphical user interface (GUI) on your FortiGate.
The following topics are included in this section:
l Connecting using a web browser
l Menus
l Tables
l Entering values
l GUI-based global search
l Loading artifacts from a CDN on page 28
For information about using the dashboards, see Dashboards and Monitors on page 71.
In order to connect to the GUI using a web browser, an interface must be configured to allow administrative access over
HTTPS or over both HTTPS and HTTP. By default, an interface has already been set up that allows HTTPS access with
the IP address 192.168.1.99.
Browse to https://192.168.1.99 and enter your username and password. If you have not changed the admin account’s
password, use the default user name, admin, and leave the password field blank.
The GUI will now display in your browser, and you will be required to provide a password for the administrator account.
1. Go to Network > Interfaces and edit the interface you wish to use for access. Take note of its assigned IP address.
2. In Administrative Access, select HTTPS, and any other protocol you require. You can also select HTTP, although
this is not recommended as the connection will be less secure.
3. Click OK.
4. Browse to the IP address using your chosen protocol.
The GUI will now be displayed in your browser.
Menus
If you believe your FortiGate model supports a menu that does not appear in the GUI, go to
System > Feature Visibility and ensure the feature is enabled. For more information, see
Feature visibility on page 2043.
The GUI contains the following main menus, which provide access to configuration options for most FortiOS features:
Dashboard The dashboard displays various widgets that display important system
information and allow you to configure some system options.
For more information, see Dashboards and Monitors on page 71.
Network Options for networking, including configuring system interfaces and routing
options.
For more information, see Network on page 130.
Policy & Objects Configure firewall policies, protocol options, and supporting content for policies,
including schedules, firewall addresses, and traffic shapers.
For more information, see Policy and Objects on page 713.
Security Profiles Configure your FortiGate's security features, including Antivirus, Web Filter, and
Application Control.
VPN Configure options for IPsec and SSL virtual private networks (VPNs).
For more information, see IPsec VPNs on page 1252 and SSL VPN on page
1541.
User & Authentication Configure user accounts, groups, and authentication methods, including external
authentication and single sign-on (SSO).
WiFi & Switch Controller Configure the unit to act as a wireless network controller, managing the wireless
Access Point (AP) functionality of FortiWiFi and FortiAP units.
On certain FortiGate models, this menu has additional features allowing for
FortiSwitch units to be managed by the FortiGate.
For more information, see Wireless configuration on page 1845 and Switch
Controller on page 1846.
Security Fabric Access the physical topology, logical topology, automation, and settings of the
Fortinet Security Fabric.
For more information, see Fortinet Security Fabric on page 2089.
Tables
Many GUI pages contain tables of information that can be filtered and customized to display specific information in a
specific way. Some tables allow content to be edited directly on that table, or rows to be copied and pasted.
Navigation
Some tables contain information and lists that span multiple pages. Navigation controls will be available at the bottom of
the page.
Filters
Filters are used to locate a specific set of information or content in a table. They can be particularly useful for locating
specific log entries. The filtering options vary, depending on the type of information in the log.
Depending on the table content, filters can be applied using the filter bar, using a column filter, or based on a cell's
content. Some tables allow filtering based on regular expressions.
Administrators with read and write access can define filters. Multiple filters can be applied at one time.
1. Click Add Filter at the top of the table. A list of the fields available for filtering is shown.
2. Select the field to filter by.
3. Enter the value to filter by, adding modifiers as needed.
4. Press Enter to apply the filter.
1. Click the filter icon on the right side of the column header
2. Choose a filter type from the available options.
3. Enter the filter text, or select from the available values.
4. Click Apply.
Column settings
1. Right a column header, or click the gear icon on the left side of the header row that appears when hovering the
cursor over the headers.
2. Select columns to add or remove.
3. Click Apply.
To resize a column:
1. Click the dots or filter icon on the right side of the column header and select Resize to Contents.
1. Right a column header, or click the gear icon on the left side of the header row that appears when hovering the
cursor over the headers.
2. Click Best Fit All Columns.
1. Right a column header, or click the gear icon on the left side of the header row that appears when hovering the
cursor over the headers.
2. Click Reset Table.
Resetting a table does not remove filters.
Editing objects
In some tables, parts of a configuration can be edited directly in the table. For example, security profiles can be added to
an existing firewall policy by clicking the edit icon in a cell in the Security Profiles column.
Copying rows
In some tables, rows can be copied and pasted using the right-click menu. For example, a policy can be duplicated by
copying and pasting it.
Entering values
Numerous fields in the GUI and CLI require text strings or numbers to be entered when configuring the FortiGate. When
entering values in the GUI, you will be prevented from entering invalid characters, and a warning message will be shown
explaining what values are not allowed. If invalid values are entered in a CLI command, the setting will be rejected when
you apply it.
l Text strings on page 25
l Numbers on page 26
Text strings
Text strings are used to name entities in the FortiGate configuration. For example, the name of a firewall address,
administrator, or interface are all text strings.
The following characters cannot be used in text strings, as they present cross-site scripting (XSS) vulnerabilities:
l “ - double quotes
l ' - single quote
l > - greater than
l < - less than
Most GUI text fields prevent XSS vulnerable characters from being added.
VDOM names and hostnames can only use numbers (0-9), letters (a-z and A-Z), dashes, and
underscores.
The tree CLI command can be used to view the number of characters allowed in a name field. For example, entering
the following commands show that a firewall address name can contain up to 80 characters, while its FQDN can contain
256 characters:
Numbers
Numbers are used to set sizes, rated, addresses, port numbers, priorities, and other such numeric values. They can be
entered as a series of digits (without commas or spaces), in a dotted decimal format (such as IP addresses), or
separated by colons (such as MAC addresses). Most numeric values use base 10 numbers, while some use
hexadecimal values.
Most GUI and CLI fields prevent invalid numbers from being entered. The CLI help text includes information about the
range of values allowed for applicable settings.
The global search option in the GUI allows users to search for keywords appearing in objects and navigation menus to
quickly access the object and configuration page. Click the magnifying glass icon in the top-left corner of the banner to
access the global search.
The global search includes the following features:
l Keep a history of frequent and recent searches
l Sort results alphabetically by increasing or decreasing order, and relevance by search weight
l Search by category
l Search in Security Fabric members (accessed by the Security Fabric members dropdown menu in the banner)
Examples
In this example, searching for the word ZTNA yields the following results:
l Firewall policy object 9, which contains ZTNA in the property value, Name. The name of the policy is ZTNA-TCP.
l ZTNA server object ZTNA-webserver, which contains ZTNA in the property value, Name.
l ZTNA navigation menu item under Policy & Objects > ZTNA.
Since CMDB objects have a higher search weight (50) than navigation objects (20), the navigation menu result appears
at the bottom.
In this example, searching for the address 10.88.0.1 yields the following results:
l Address object EMS that has a subnet of 10.88.0.1/32, which matches the search term.
l Virtual IP object Telemetry-VIP that has a mapped IP range of 10.88.0.1, which matches the search term.
l Address objects all, FIREWALL_AUTH_PORTAL_ADDRESS, and FABRIC_DEVICE that have IP subnets of
0.0.0.0/0, which the searched term falls into.
l Address group object All_Grp that contains members addresses that have IP subnets of 0.0.0.0/0, which the
searched term falls into.
Sorting by Relevance will display address objects that are more closely matched at the top (10.88.0.1), and more loosely
matched at the bottom ( 0.0.0.0).
To improve GUI performance, loading static GUI artifacts cached in CDN (content delivery network) servers closer to the
user instead of the FortiGate can be enabled. This allows the GUI to load more quickly with less latency for
administrators who are accessing the FortiGate remotely. Upon failure, the files fall back to loading from the FortiGate.
The CDN is only used after successful administrator logins.
The Command Line Interface (CLI) can be used in lieu of the GUI to configure the FortiGate. Some settings are not
available in the GUI, and can only be accessed using the CLI.
This section briefly explains basic CLI usage. For more information about the CLI, see the FortiOS CLI Reference.
l Connecting to the CLI on page 28
l CLI basics on page 31
l Command syntax on page 37
l Subcommands on page 40
l Permissions on page 42
You can connect to the CLI using a direct console connection, SSH, the FortiExplorer app on your iOS device, or the CLI
console in the GUI.
You can access the CLI outside of the GUI in three ways:
l Console connection: Connect your computer directly to the console port of your FortiGate.
l SSH access: Connect your computer through any network interface attached to one of the network ports on your
FortiGate.
l FortiExplorer: Connect your device to the FortiExplorer app on your iOS device to configure, manage, and monitor
your FortiGate. See FortiExplorer Management on page 42 for details.
To open a CLI console, click the _> icon in the top right corner of the GUI. The console opens on top of the GUI. It can be
minimized and multiple consoles can be opened.
To edit policies and objects directly in the CLI, right-click on the element and select Edit in CLI.
Console connection
A direct console connection to the CLI is created by directly connecting your management computer or console to the
FortiGate using its DB-9 or RJ-45 console port.
Direct console access to the FortiGate may be required if:
l You are installing the FortiGate for the first time and it is not configured to connect to your network.
l You are restoring the firmware using a boot interrupt. Network access to the CLI will not be available until after the
boot process has completed, making direct console access the only option.
To connect to the FortiGate console, you need:
l A console cable to connect the console port on the FortiGate to a communications port on the computer. Depending
on your device, this is one of:
l null modem cable (DB-9 to DB-9)
1. Using the console cable, connect the FortiGate unit’s console port to the serial communications (COM) port on your
management computer.
2. Start a terminal emulation program on the management computer, select the COM port, and use the following
settings:
Data bits 8
Parity None
Stop bits 1
SSH access
SSH access to the CLI is accomplished by connecting your computer to the FortiGate using one of its network ports. You
can either connect directly, using a peer connection between the two, or through any intermediary network.
If you do not want to use an SSH client and you have access to the GUI, you can access the
CLI through the network using the CLI console in the GUI.
SSH must be enabled on the network interface that is associated with the physical network port that is used.
If your computer is not connected either directly or through a switch to the FortiGate, you must also configure the
FortiGate with a static route to a router that can forward packets from the FortiGate to the computer. This can be done
using a local console connection, or in the GUI.
To connect to the FortiGate CLI using SSH, you need:
l A computer with an available serial communications (COM) port and RJ-45 port
l An appropriate console cable
l Terminal emulation software
l A network cable
l Prior configuration of the operating mode, network interface, and static route.
1. Using the network cable, connect the FortiGate unit’s port either directly to your computer’s network port, or to a
network through which your computer can reach the FortiGate.
2. Note the number of the physical network port.
3. Using direct console connection, connect and log into the CLI.
4. Enter the following command:
config system interface
edit <interface_str>
append allowaccess ssh
next
end
Where <interface_str> is the name of the network interface associated with the physical network port, such as
port1.
5. Confirm the configuration using the following command to show the interface’s settings:
show system interface <interface_str>
For example:
show system interface port1
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
set allowaccess ping https ssh
set type hard-switch
set stp enable
set role lan
set snmp-index 6
next
end
Once the FortiGate is configured to accept SSH connections, use an SSH client on your management computer to
connect to the CLI.
The following instructions use PuTTy. The steps may vary in other terminal emulators.
If three incorrect log in or password attempts occur in a row, you will be disconnected. If this
occurs, wait for one minute, then reconnect and attempt to log in again.
CLI basics
Basic features and characteristics of the CLI environment provide support and ease of use for many CLI tasks.
Help
Press the question mark (?) key to display command help and complete commands.
l Press the question mark (?) key at the command prompt to display a list of the commands available and a
description of each command.
l Enter a command followed by a space and press the question mark (?) key to display a list of the options available
for that command and a description of each option.
l Enter a command followed by an option and press the question mark (?) key to display a list of additional options
available for that command option combination and a description of each option.
l Enter a question mark after entering a portion of a command to see a list of valid complete commands and their
descriptions. If there is only one valid command, it will be automatically filled in.
Left or Right arrow Move the cursor left or right within the command line.
Ctrl + C Abort current interactive commands, such as when entering multiple lines.
If you are not currently within an interactive command such as config or edit,
this closes the CLI connection.
\ then Enter Continue typing a command on the next line for a multiline command.
For each line that you want to continue, terminate it with a backslash ( \ ). To
complete the command, enter a space instead of a backslash, and then press
Enter.
Command tree
Enter tree to display the CLI command tree. To capture the full output, connect to your device using a terminal
emulation program and capture the output to a log file. For some commands, use the tree command to view all
available variables and subcommands.
Command abbreviation
You can abbreviate words in the command line to their smallest number of non-ambiguous characters.
For example, the command get system status could be abbreviated to g sy stat.
When configuring a list, the set command will remove the previous configuration.
For example, if a user group currently includes members A, B, and C, the command set member D will remove
members A, B, and C. To avoid removing the existing members from the group, the command set members A B C D
must be used.
To avoid this issue, the following commands are available:
Environment variables
The following environment variables are support by the CLI. Variable names are case-sensitive.
$USERFROM The management access type (ssh, jsconsole, and so on) and the IPv4 address of the
administrator that configured the item.
$USERNAME The account name of the administrator that configured the item.
For example, to set a FortiGate device's host name to its serial number, use the following CLI command:
config system global
set hostname $SerialNum
end
Special characters
The following characters cannot be used in most CLI commands: <, >, (, ), #, ', and "
If one of those characters, or a space, needs to be entered as part of a string, it can be entered by using a special
command, enclosing the entire string in quotes, or preceding it with an escape character (backslash, \).
To enter a question mark (?) or a tab, Ctrl + V or Ctrl + Shift + - must be entered first.
Question marks and tabs cannot be copied into the CLI Console or some SSH clients. They
must be typed in.
Character Keys
' \'
(as part of a string value, not to begin or end
the string)
" \"
(as part of a string value, not to begin or end
the string)
\ \\
The get, show, and diagnose commands can produce large amounts of output. The grep command can be used to
filter the output so that it only shows the required information.
The grep command is based on the standard UNIX grep, used for searching text output based on regular expressions.
For example, the following command displays the MAC address of the internal interface:
get hardware nic internal | grep Current_HWaddr
Current_HWaddr 00:09:0f:cb:c2:75
The following command will display all TCP sessions that are in the session list, including the session list line number in
the output:
get system session list | grep -n tcp
The following command will display all of the lines in the HTTP replacement message that contain URL or url:
show system replacemsg http | grep -i url
The -f option is available to support contextual output, in order to show the complete configuration. The following
example shows the difference in the output when -f is used versus when it is not used:
Characters such as ñ and é, symbols, and ideographs are sometimes acceptable input. Support varies depending on the
type of item that is being configured. CLI commands, objects, field names, and options must use their exact ASCII
characters, but some items with arbitrary names or values can be input using your language of choice. To use other
languages in those cases, the correct encoding must be used.
Input is stored using Unicode UTF-8 encoding, but is not normalized from other encodings into UTF-8 before it is stored.
If your input method encodes some characters differently than in UTF-8, configured items may not display or operate as
expected.
Regular expressions are especially impacted. Matching uses the UTF-8 character values. If you enter a regular
expression using a different encoding, or if an HTTP client sends a request in a different encoding, matches may not be
what is expected.
For example, with Shift-JIS, backslashes could be inadvertently interpreted as the symbol for the Japanese yen ( ¥ ), and
vice versa. A regular expression intended to match HTTP requests containing monetary values with a yen symbol may
not work it if the symbol is entered using the wrong encoding.
For best results:
l use UTF-8 encoding, or
l use only characters whose numerically encoded values are the same in UTF-8, such as the US-ASCII characters
that are encoded using the same values in ISO 8859-1, Windows code page 1252, Shift-JIS, and other encoding
methods, or
l for regular expressions that must match HTTP requests, use the same encoding as your HTTP clients.
HTTP clients may send requests in encodings other than UTF-8. Encodings usually vary
based on the client’s operating system or input language. If the client's encoding method
cannot be predicted, you might only be able to match the parts of the request that are in
English, as the values for English characters tend to be encoded identically, regardless of the
encoding method.
If the FortiGate is configured to use an encoding method other than UTF-8, the management computer's language may
need to be changed, including the web browse and terminal emulator. If the FortiGate is configured using non-ASCII
characters, all the systems that interact with the FortiGate must also support the same encoding method. If possible, the
same encoding method should be used throughout the configuration to avoid needing to change the language settings
on the management computer.
The GUI and CLI client normally interpret output as encoded using UTF-8. If they do not, configured items may not
display correctly. Exceptions include items such as regular expression that may be configured using other encodings to
match the encoding of HTTP requests that the FortiGate receives.
Screen paging
By default, the CLI will pause after displaying each page worth of text when a command has multiple pages of output.
this can be useful when viewing lengthy outputs that might exceed the buffer of terminal emulator.
When the display pauses and shows --More--, you can:
l Press Enter to show the next line,
l Press Q to stop showing results and return to the command prompt,
l Press an arrow key, Insert, Home, Delete, End, Page Up, or Page Down to show the next few pages,
l Press any other key to show the next page, or
l Wait for about 30 seconds for the console to truncate the output and return to the command prompt.
When pausing the screen is disabled, press Ctrl + C to stop the output and log out of the FortiGate.
The baud rate of the local console connection can be changed from its default value of 9600.
The FortiGate configuration file can be edited on an external host by backing up the configuration, editing the
configuration file, and then restoring the configuration to the FortiGate.
Editing the configuration file can save time is many changes need to be made, particularly if the plain text editor that you
are using provides features such as batch changes.
4. Restore the modified configuration to the FortiGate. See Configuration backups on page 59 for details.
The FortiGate downloads the configuration file and checks that the model information is correct. If it is correct, the
configuration file is loaded and each line is checked for errors. If a command is invalid, that command is ignored. If
the configuration file is valid, the FortiGate restarts and loads the downloaded configuration.
Command syntax
When entering a command, the CLI console requires that you use valid syntax and conform to expected input
constraints. It rejects invalid commands. Indentation is used to indicate the levels of nested commands.
Each command line consists of a command word, usually followed by configuration data or a specific item that the
command uses or affects.
Notation
Brackets, vertical bars, and spaces are used to denote valid syntax. Constraint notations, such as <address_ipv4>,
indicate which data types or string patterns are acceptable value input.
All syntax uses the following conventions:
Angle brackets < > Indicate a variable of the specified data type.
Square brackets [ ] Indicate that the variable or variables are optional.
For example:
show system interface [<name_str>]
To show the settings for all interfaces, you can enter show system interface
To show the settings for the Port1 interface, you can enter show system interface
port1.
Any field that is optional will use square-brackets. The overall config command will still be valid whether or not the option
is configured.
Square-brackets can be used is to show that multiple options can be set, even intermixed with ranges. The following
example shows a field that can be set to either a specific value or range, or multiple instances:
config firewall service custom
set iprange <range1> [<range2> <range3> ...]
end
next
The next command is used to maintain a hierarchy and flow to CLI commands. It is at the same indentation level as the
preceding edit command, to mark where a table entry finishes.
The following example shows the next command used in the subcommand entries:
After configuring table entry <2> then entering next, the <2> table entry is saved and the console returns to the
entries prompt:
You can now create more table entries as needed, or enter end to save the table and return to the filepattern table
element prompt.
end
The end command is used to maintain a hierarchy and flow to CLI commands.
The following example shows the same command and subcommand as the next command example, except end has
been entered instead of next after the subcommand:
Entering end will save the <2> table entry and the table, and exit the entries subcommand entirely. The console
returns to the filepattern table element prompt:
Subcommands
Subcommands are available from within the scope of some commands. When you enter a subcommand level, the
command prompt changes to indicate the name of the current command scope. For example, after entering:
config system admin
Applicable subcommands are available until you exit the command, or descend an additional level into another
subcommand. Subcommand scope is indicated by indentation.
For example, the edit subcommand is only available in commands that affects tables, and the next subcommand is
available only in the edit subcommand:
config system interface
edit port1
set status up
next
end
The available subcommands vary by command. From a command prompt under the config command, subcommands
that affect tables and fields could be available.
Table subcommands
show Show the configuration. Only table entries that are not set to default values are
shown.
end Save the configuration and exit the current config command.
Purging the system interface or system admin tables does not reset default table
values. This can result in being unable to connect to or log in to the FortiGate, requiring the
FortiGate to be formatted and restored.
Field subcommands
For example, the command set fsso enable sets the fsso field to the value
enable.
get List the configuration of the current table entry, including default and customized
values.
show Show the configuration. Only values that are not set to default values are shown.
next Save changes to the table entry and exit the edit command so that you can
configure the next table entry.
end Save the configuration and exit the current config command.
Permissions
Administrator (or access) profiles control what CLI commands an administrator can access by assigning read, write, or
no access to each area of FortiOS. For information, see Administrator profiles on page 1850.
Read access is required to view configurations. Write access is required to make configuration changes. Depending on
your account's profile, you may not have access to all CLI commands. To have access to all CLI commands, an
administrator account with the super_admin profile must be used, such as the admin account.
Accounts assigned the super_admin profile are similar to the root administrator account. They have full permission to
view and change all FortiGate configuration options, including viewing and changing other administrator accounts.
To increase account security, set strong passwords for all administrator accounts, and change the passwords regularly.
FortiExplorer Management
FortiExplorer for iOS is a user-friendly application that helps you to rapidly provision, deploy, and monitor Security Fabric
components from your iOS device.
FortiExplorer for iOS requires iOS 10.0 or later and is compatible with iPhone, iPad, and Apple TV. It is supported by
FortiOS 5.6 and later, and is available on the App Store for iOS devices.
FortiExplorer is also available for support on Android on the Google Play Store. Steps for
configuring FortiExplorer for Android may differ from what is included in the guide.
Advanced features are available with the purchase of FortiExplorer Pro. Paid features include the ability to add more
than two devices, and firmware upgrades for devices with active licenses.
Up to six members can use this app with 'Family Sharing' enabled in the App Store.
Firmware upload requires a valid firmware license. Users can download firmware for models
with a valid support contract.
If your FortiGate is accessible on a wireless network, you can connect to it using FortiExplorer provided that your
iOS device is on the same network. See Connecting FortiExplorer to a FortiGate with WiFi. If your 200F series or 80F
series FortiGate is in close proximity, you can connect to it using FortiExplorer using Bluetooth Low Energy (BLE). See
Configure FortiGate with FortiExplorer using BLE on page 47. Otherwise, you will need to physically connect your iOS
device to the FortiGate using a USB cable.
1. Connect your iOS device to your FortiGate USB A port. If prompted on your iOS device, Trust this computer.
2. Open FortiExplorer and select your FortiGate from the FortiGate Devices list . A blue USB icon will indicate that you
are connected over a USB connection.
9. Optionally, configure Administrative Access to allow HTTPS access. This will allow administrators to access the
FortiGate GUI using a web browser.
10. Go to Network > Interfaces and configure the local network (internal) interface.
11. Set the Address mode as before and configure Administrative Access if required.
12. Configure a DHCP Server for the internal network subnet.
13. Return to the internal interface using the < button at the top of the screen.
14. Go to Network > Static Routes and configure the static route to the gateway.
15. Go to Policy & Objects > Firewall Policy and edit the Internet access policy. Enter a Name for the policy, enable the
required Security Profiles, configure Logging Options, then tap OK.
You can wirelessly connect to the FortiGate if your iOS device and the FortiGate are both connected to the same
wireless network.
1. Open the FortiExplorer app and tap Add on the Devices page.
2. On the Add Device By page, tap HTTPS.
5. Tap Done.
6. If the FortiGate device identity cannot be verified, tap Connect at the prompt.
FortiExplorer opens the FortiGate management interface to the Device Status page.
FortiGate 200F series and 80F series devices can be initially configured in FortiExplorer using Bluetooth Low Energy
(BLE).
The state of the status LED on the device shows if BLE is enabled. See the device QuickStart guides for more
information about LED states: FortiGate 200F Series QuickStart Guide and FortiGate 80F Series QuickStart Guide.
When the status LED is flashing green, pressing and holding the reset button for five seconds
or longer will reset the device to factory default settings.
BLE is enabled or disabled in the following scenarios after the FortiGate boots up:
l In factory default settings:
l After the FortiGate has finished booting up (when the console login prompt is shown), the status LED will be
flashing amber or red to indicate that BLE is enabled.
l If the FortiGate is configured without using BLE, BLE will immediately be disabled and the status LED will turn
solid green.
l If the FortiGate is configured using BLE, the LED will continue flashing until the configuring device disconnects
from BLE, after which BLE is disabled and the status LED turns sold green.
l Not in factory default configuration:
l One minute after the FortiGate has finished booting up (when the console login prompt is shown), the status
LED will turn solid green. Press and hold the reset button for one second. The status LED will start flashing to
indicate that BLE is enabled.
l If no BLE connection is made with the FortiGate, BLE will be disabled after one minute and the status LED will
turn solid green.
l If the FortiGate is configured without using BLE, BLE will immediately be disabled and the status LED will turn
solid green.
l If the FortiGate is configured using BLE, the LED will continue flashing until the configuring device disconnects
from BLE, after which BLE is disabled and the status LED turns sold green.
To enable BLE for one minute when the FortiGate is running and not in factory default configuration:
After configuring your network, run a security rating check to identify vulnerabilities and highlight best practices that
could improve your network's security and performance.
Go to Security Fabric > Security Rating and follow the steps to determine the score. See Security rating on page 2221 for
more information.
FortiExplorer Pro allows you to add unlimited devices, and download firmware images for devices with active licenses.
1. In FortiExplorer, go to Settings.
2. Tap Manage Subscription.
3. Follow the on-screen prompts.
Basic administration
This section contains information about basic FortiGate administration that you can do after you installing the unit in your
network.
l Basic configuration on page 50
l Registration on page 52
l FortiCare and FortiGate Cloud login on page 54
l Transfer a device to another FortiCloud account on page 57
l Configuration backups on page 59
Basic configuration
This topic will help you configure a few basic settings on the FortiGate as described in the Using the GUI on page 21 and
Using the CLI on page 28 sections, including:
l Configuring an interface on page 50
l Configuring the hostname on page 51
l Configuring the default route on page 51
l Ensuring internet and FortiGuard connectivity on page 51
Configuring an interface
It is unlikely the default interface configuration will be appropriate for your environment and typically requires some effort
of the administrator to use these settings, such as being physically near the FortiGate to establish a serial connection.
Therefore, the first step is to configure an interface that can be used to complete the FortiGate configuration.
Setting the FortiGate’s hostname assists with identifying the device, and it is especially useful when managing multiple
FortiGates. Choose a meaningful hostname as it is used in the CLI console, SNMP system name, device name for
FortiGate Cloud, and to identify a member of an HA cluster.
1. Go to System > Settings.
2. Enter a name in the Host name field.
3. Click Apply.
Setting the default route enables basic routing to allow the FortiGate to return traffic to sources that are not directly
connected. The gateway address should be your existing router or L3 switch that the FortiGate is connected to. If you are
directly connecting to the FortiGate, you may choose your endpoint’s IP address as the gateway address. Set the
interface to be the interface the gateway is connected to.
This step is not necessary for the configuration; however, it is necessary in order to keep your FortiGate up to date
against the latest threats. Updates are provided to FortiGates that are registered and make a request to the FortiGuard
network to verify if there are any more recent definitions.
Use execute ping <domain.tld> to ensure the DNS resolution is able to resolve the following FortiGuard servers:
l fds1.fortinet.com
l service.fortiguard.net
l update.fortiguard.net
You also need to ensure the necessary ports are permitted outbound in the event your FortiGate is behind a filtering
device. Refer to the Ports and Protocols document for more information.
Registration
The FortiGate, and then its service contract, must be registered to have full access to Fortinet Customer Service and
Support, and FortiGuard services. The FortiGate can be registered in either the FortiGate GUI or the FortiCloud support
portal. The service contract can be registered from the FortiCloud support portal.
The service contract number is needed to complete registrations on the FortiCloud support
portal. You can find this 12-digit number in the email that contains your service registration
document (sent from [email protected]) in the service entitlement summary.
1. Connect to the FortiGate GUI. A dialog box appears, which indicates the steps you should take to complete the
setup of your FortiGate. These steps include:
a. Specify Hostname
b. Change Your Password
c. Dashboard Setup
d. Upgrade Firmware
If you completed the Basic configuration on page 50, the hostname and password steps are already marked as
complete (checkmark). If you chose to deploy the latest firmware, the Upgrade Firmware step is marked as
complete.
2. Click Begin to complete the dashboard setup. Two options appear (Optimal and Comprehensive).
3. Select the desired setting and click OK. The Dashboard > Status page opens. Note that the licenses are grayed out
because the device or virtual machine is not registered.
4. Go to System > FortiGuard and click Enter Registration Code.
5. Enter the contract registration code from your service registration document.
6. Click OK.
1. Go to support.fortinet.com and log in using your FortiCloud account credentials. If you do not have an account, click
Register to create one.
2. In the left-side menu, click Register Product.
3. Enter the product serial number or license certificate number for a VM, select an end user type, then click Next.
4. Enter the Support Contract number and FortiCloud Key (optionally, enter a product description), then click Next.
5. Review the product entitlement information, select the checkbox to accept the terms, then click Confirm.
6. Go to Products > Product List. The FortiGate is now visible in the product list.
With FortiCloud, FortiOS supports a unified login to FortiCare and FortiGate Cloud. The FortiGate Cloud setup is a
subset of the FortiCare setup.
l If the FortiGate is not registered, activating FortiGate Cloud will force you to register with FortiCare.
l If a FortiGate is registered in FortiCare using a FortiCloud account, then only that FortiCloud account can be used to
activate FortiGate Cloud.
l If a different FortiCloud account was already used to activate FortiGate Cloud, then a notification asking you to
migrate to FortiCloud is shown in the GUI after upgrading FortiOS.
The CLI can be used to activate FortiGate Cloud without registration, or with a different FortiCloud account.
To activate FortiGate Cloud and register with FortiCare at the same time:
3. Enter the password for the account that was used to register the FortiGate.
4. Click OK.
The FortiGate Cloud widget now shows the activated FortiCloud account.
To migrate from the activated FortiGate Cloud account to the registered FortiCloud account:
1. Go to System > FortiGuard.
2. In the FortiCare Support row, click Actions > Transfer FortiGate to Another Account.
4. Enter the target FortiCloud Account name and Password, then click Next.
5. Review the information in the From and To fields, then click Transfer.
To activate FortiGate Cloud using an account that is not used for registration:
1. Enter the following with the credentials for the account being used to activate FortiGate Cloud:
# execute fortiguard-log login <account_id> <password>
Result=Success
A FortiCloud account that is not used for the support portal account cannot be used to register
FortiGate. Attempting to activate FortiGate Cloud with this type of account will fail.
Master account users can transfer a device from one FortiCloud/FortiCare account to another. Users can transfer a
device up to three times within a twelve-month time period. If more transfers are required within the twelve-month time
period, contact Technical Support to request the transfer.
Requirements:
3. In the Current FortiCloud Account fields, enter the username and password for the current account. In the Target
FortiCloud Account fields, enter the new username and password.
4. Click Next.
After the transfer is complete, the new the FortiCloud account is displayed in the Licenses widget.
Configuration backups
Once you successfully configure the FortiGate, it is extremely important that you backup the configuration. In some
cases, you may need to reset the FortiGate to factory defaults or perform a TFTP upload of the firmware, which will erase
the existing configuration. In these instances, the configuration on the device will have to be recreated, unless a backup
can be used to restore it. You should also backup the local certificates, as the unique SSL inspection CA and server
certificates that are generated by your FortiGate by default are not saved in a system backup.
We also recommend that you backup the configuration after any changes are made, to ensure you have the most current
configuration available. Also, backup the configuration before any upgrades of the FortiGate’s firmware. Should anything
happen to the configuration during the upgrade, you can easily restore the saved configuration.
Always backup the configuration and store it on the management computer or off-site. You have the option to save the
configuration file to various locations including the local PC, USB key, FTP, and TFTP server. FTP and TFTP are only
configurable through the CLI.
If you have VDOMs, you can back up the configuration of the entire FortiGate or only a specific VDOM. Note that if you
are using FortiManager or FortiGate Cloud, full backups are performed and the option to backup individual VDOMs will
not appear.
You can also backup and restore your configuration using Secure File Copy (SCP). See How
to download/upload a FortiGate configuration file using secure file copy (SCP).
You enable SCP support using the following command:
config system global
set admin-scp enable
end
For more information about this command and about SCP support, see config system global.
1. Click on the user name in the upper right-hand corner of the screen and select Configuration > Backup.
2. Direct the backup to your Local PC or to a USB Disk.
The USB Disk option will not be available if no USB drive is inserted in the USB port. You can also backup to the
FortiManager using the CLI.
3. If VDOMs are enabled, indicate whether the scope of the backup is the entire FortiGate configuration (Global) or
only a specific VDOM configuration (VDOM).
If backing up a VDOM configuration, select the VDOM name from the list.
4. Enable Encryption. Encryption must be enabled on the backup file to back up VPN certificates.
5. Enter a password, and enter it again to confirm it. This password will be required to restore the configuration.
6. Click OK.
7. When prompted, select a location on the PC or USB disk to save the configuration file. The configuration file will
have a .conf extension.
or:
execute backup config usb <backup_filename> [<backup_password>]
or for FTP, note that port number, username are optional depending on the FTP site:
execute backup config ftp <backup_filename> <ftp_server>[<:ftp_port>] [<user_name>]
[<password>] [<backup_password>]
or for TFTP:
execute backup config tftp <backup_filename> <tftp_servers> [<backup_password>]
or for SFTP:
execute backup config sftp <backup_filename> <sftp_server>[<:sftp_port>] <user> <password>
[<backup_password>]
Use the same commands to backup a VDOM configuration by first entering the commands:
config vdom
edit <vdom_name>
See Backing up and restoring configurations in multi VDOM mode on page 1916 for more information.
The configuration can be backed up to IPv4 and IPv6 FTP, TFTP, and SFTP servers.
The configuration can be restored from IPv4 and IPv6 FTP and TFTP servers.
Restoring a configuration
1. Click on the user name in the upper right-hand corner of the screen and select Configuration > Restore.
2. Identify the source of the configuration file to be restored: your Local PC or a USB Disk.
The USB Disk option will not be available if no USB drive is inserted in the USB port. You can restore from the
FortiManager using the CLI.
3. Click Upload, locate the configuration file, and click Open.
4. Enter the password if required.
5. Click OK.
or:
execute restore config usb <backup_filename> [<backup_password>]
or for FTP, note that port number, username are optional depending on the FTP site:
execute restore config ftp <backup_filename> <ftp_server>[<:port>] [<user_name>]
[<password>] [<backup_password>]
or for TFTP:
execute restore config tftp <backup_filename> <tftp_server> [<backup_password>]
The FortiGate will load the configuration file and restart. Once the restart has completed, verify that the configuration has
been restored.
Troubleshooting
When restoring a configuration, errors may occur, but the solutions are usually straightforward.
Configuration file error This error occurs when attempting to upload a configuration file that is
incompatible with the device. This may be due to the configuration file being for a
different model or being saved from a different version of firmware.
Solution: Upload a configuration file that is for the correct model of FortiGate
device and the correct version of the firmware.
Invalid password When the configuration file is saved, it can be protected by a password. The
password entered during the upload process is not matching the one associated
with the configuration file.
Solution: Use the correct password if the file is password protected.
Configuration revision
You can manage multiple versions of configuration files on models that have a 512MB flash memory and higher.
Revision control requires either a configured central management server or the local hard drive, if your FortiGate has this
feature. Typically, configuration backup to local drive is not available on lower-end models.
The central management server can either be a FortiManager unit or FortiGate Cloud.
If central management is not configured on your FortiGate unit, a message appears instructing you to either
l Enable central management, or
l Obtain a valid license.
When revision control is enabled on your FortiGate unit, and configuration backups have been made, a list of saved
revisions of those backed-up configurations appears.
Configuration revisions are viewed by clicking on the user name in the upper right-hand corner of the screen and
selecting Configuration > Revisions.
This procedure exports a server (local) certificate and private key together as a password protected PKCS12 file. The
export file is created through a customer-supplied TFTP server. Ensure that your TFTP server is running and accessible
to the FortiGate before you enter the command.
where:
l <cert_name> is the name of the server certificate.
l <filename> is a name for the output file.
l <tftp_ip> is the IP address assigned to the TFTP server host interface.
1. Move the output file from the TFTP server location to the management computer.
2. Go to System > Certificates and click Import > Local.
3. Select the certificate type, then click Upload in the Certificate file field.
4. On the management computer, browse to the file location, select it, and click Open.
5. If the Type is Certificate, upload the Key file as well.
6. If required, enter the Password that is required to upload the file or files.
7. Click OK.
There may be a need to reset the FortiGate to its original defaults; for example, to begin with a fresh configuration. There
are two options when restoring factory defaults. The first resets the entire device to the original out-of-the-box
configuration.
You can reset the device with the following CLI command:
execute factoryreset
LEDs
Check your device's QuickStart guide for specific LED information: FortiGate QuickStart
Guides.
The following faceplates show where the LEDs are typically found on FortiGate models:
Green Normal
Off No alarms
Off HA disabled
Green SVC is on
Green 3G / 4G service is on
Power Supply OK Flashing Green Standby rail and main output off
Power Supply Fail Flashing Amber Power supply warning event detected
Off No output
Port LEDs
Green Connected
Green Connected
Alarm levels
Minor alarm
Also called an IPMI non-critical (NC) alarm, it indicates a temperature or power level outside of the normal operating
range that is not considered a problem. For a minor temperature alarm, the system could respond by increasing the fan
speed. A non-critical threshold can be an upper non-critical (UNC) threshold (for example, a high temperature or a high
power level) or a lower non-critical (LNC) threshold (for example, a low power level).
Major alarm
Also called an IPMI critical or critical recoverable (CR) alarm, it indicates that the system is unable to correct the cause of
the alarm, and that intervention is required. For example, the cooling system cannot provide enough cooling to reduce
the temperature. It can also mean that the conditions are approaching the outside limit of the allowed operating range. A
critical threshold can also be an upper critical (UC) threshold (such as a high temperature or high power level) or a lower
critical (LC) threshold (such as a low power level).
Critical alarm
Also called an IPMI non-recoverable (NR) alarm, it indicates that the system has detected a temperature or power level
that is outside of the allowed operating range and physical damage is possible.
If your FortiGate does not function as desired after installation, try the following troubleshooting tips:
1. Check for equipment issues
Verify that all network equipment is powered on and operating as expected. Refer to the QuickStart Guide for
information about connecting your FortiGate to the network.
2. Check the physical network connections
Check the cables used for all physical connections to ensure that they are fully connected and do not appear
damaged, and make sure that each cable connects to the correct device and the correct Ethernet port on that
device.
3. Verify that you can connect to the internal IP address of the FortiGate
Connect to the GUI from the FortiGate’s internal interface by browsing to its IP address. From the PC, try to ping the
internal interface IP address; for example, ping 192.168.1.99. If you cannot connect to the internal interface,
verify the IP configuration of the PC. If you can ping the interface but can't connect to the GUI, check the settings for
administrative access on that interface. Alternatively, use SSH to connect to the CLI, and then confirm that HTTPS
has been enabled for Administrative Access on the interface.
4. Check the FortiGate interface configurations
Check the configuration of the FortiGate interface connected to the internal network (under Network > Interfaces)
and check that Addressing mode is set to the correct mode.
5. Verify the security policy configuration
Go to Policy & Objects > Firewall Policy and verify that the internal interface to Internet-facing interface security
policy has been added and is located near the top of the policy list. Check the Active Sessions column to ensure that
traffic has been processed (if this column does not appear, right-click on the table header and select Active
Sessions). If you are using NAT mode, check the configuration of the policy to make sure that NAT is enabled and
that Use Outgoing Interface Address is selected.
6. Verify the static routing configuration
Go to Network > Static Routes and verify that the default route is correct. Go to Monitor > Routing Monitor and verify
that the default route appears in the list as a static route. Along with the default route, you should see two routes
shown as Connected, one for each connected FortiGate interface.
7. Verify that you can connect to the Internet-facing interface’s IP address
Ping the IP address of the Internet-facing interface of your FortiGate. If you cannot connect to the interface, the
FortiGate is not allowing sessions from the internal interface to Internet-facing interface. Verify that PING has been
enabled for Administrative Access on the interface.
8. Verify that you can connect to the gateway provided by your ISP
Ping the default gateway IP address from a PC on the internal network. If you cannot reach the gateway, contact
your ISP to verify that you are using the correct gateway.
9. Verify that you can communicate from the FortiGate to the Internet
Access the FortiGate CLI and use the command execute ping 8.8.8.8. You can also use the execute
traceroute 8.8.8.8 command to troubleshoot connectivity to the Internet.
10. Verify the DNS configurations of the FortiGate and the PCs
Check for DNS errors by pinging or using traceroute to connect to a domain name; for example: ping
www.fortinet.com.
If the name cannot be resolved, the FortiGate or PC cannot connect to a DNS server and you should confirm that
the DNS server IP addresses are present and correct.
11. Confirm that the FortiGate can connect to the FortiGuard network
Once the FortiGate is on your network, you should confirm that it can reach the FortiGuard network. First, check the
License Information widget to make sure that the status of all FortiGuard services matches the services that you
have purchased. Go to System > FortiGuard, and, in the Filtering section, click Test Connectivity. After a minute, the
GUI should indicate a successful connection. Verify that your FortiGate can resolve and reach FortiGuard at
service.fortiguard.net by pinging the domain name. If you can reach this service, you can then verify the
connection to FortiGuard servers by running the command diagnose debug rating. This displays a list of
FortiGuard IP gateways you can connect to, as well as the following information:
lWeight: Based on the difference in time zone between the FortiGate and this server
lRTT: Return trip time
l Flags: D (IP returned from DNS), I (Contract server contacted), T (being timed), F (failed)
14. Use FortiExplorer if you cannot connect to the FortiGate over Ethernet
If you cannot connect to the FortiGate GUI or CLI, you may be able to connect using FortiExplorer. Refer to the
QuickStart Guide or see the section on FortiExplorer for more details.
15. Either reset the FortiGate to factory defaults or contact Fortinet Support for assistance
To reset the FortiGate to factory defaults, use the CLI command execute factoryreset. When prompted, type
y to confirm the reset.
If you require further assistance, visit the Fortinet Support website.
FortiOS includes predefined dashboards so administrators can easily monitor device inventory, security threats, traffic,
and network health. You can customize the appearance of a default dashboard to display data pertinent to your Security
Fabric or combine widgets to create custom dashboards. Many dashboards also allow you to switch views between
fabric devices.
Each dashboard contains a set of widgets that allow you to view drilldown data and take actions to prevent threats. Use
widgets to perform tasks such as viewing device inventory, creating and deleting DHCP reservations, and disconnecting
dial-up users. You can add or remove widgets in a dashboard or save a widget as a standalone monitor.
Monitors display information in both text and visual format. Use monitors to change views, search for items, view
drilldown information, or perform actions such as quarantining an IP address. FortiView monitors for the top categories
are located below the dashboards. All of the available widgets can be added to the tree menu as a monitor.
Using dashboards
You can combine widgets to create custom dashboards. You can also use the dropdown in the tree menu to switch to
another device in the Security Fabric.
1. Under Dashboard, click the Add Dashboard button. The Add Dashboard window opens.
2. Enter a name in the Name field and click OK. The new dashboard opens.
To edit a dashboard:
1. Click the Actions menu next to the dashboard and selectEdit Dashboard.
To delete a dashboard:
1. Click the Actions menu next to the dashboard and select Delete Dashboard.
1. In the tree menu, click the device name and select a fabric device from dropdown.
Using widgets
You can convert a widget to a standalone monitor, change the view type, configure tables, and filter data.
2. In the widget, click Save as Monitor. The Add Monitor window opens.
3. (Optional) Enter a new name for the monitor in the Name field.
4. Click OK.
1. Click the menu dropdown at the right side of the widget and select Settings.
1. Hover over the left side of the table header and click Configure Table.
Option Description
Best Fit All Columns Resizes all of the columns in a table to fit their content.
3. Click Apply.
Option Description
Group by this Column Groups the table rows by the contents in the selected column.
3. Click Apply.
4. To filter a column, enter a value in the Filter field, and click Apply.
Widgets
Dashboards are created per VDOM when VDOM mode is enabled.For information about VDOM mode, see Virtual
Domains on page 1893.
Category Widgets
Category Widgets
l Applications FortiView Cloud Applications
l FortiView Destination Interfaces FortiView
l Destination Owners FortiView Destinations
l FortiView Policies FortiView Sessions
l FortiView Source Interfaces FortiView
l Sources FortiView VPN FortiView Web
l Categories FortiView Countries/Regions
l FortiView Destination Firewall Objects
l FortiView Interface Pairs FortiView Search
l Phrases FortiView Servers FortiView Source
l Firewall Objects FortiView Sources - WAN
l FortiView Traffic Shaping
Network l DHCP
l Interface Bandwidth
l IP Pool Utilization
l IPsec
l Routing
l SD-WAN
l SSL-VPN
l Top IP Pools by Assigned IPs
System l Administrators
l Botnet Activity
l HA Status
l License Status
l System Information
l Top System Events
l Virtual Machine
Category Widgets
l FortiClient Detected Vulnerabilities
l GTP Tunnel Rate
l GTP Tunnels
l Host Scan Summary
l Quarantine
l Top Endpoint Vulnerabilities
l Top Failed Authentication
l Top FortiSandbox Files
l Top Threats
l Top Threats - WAN
Use the device dropdown to view the dashboards in downstream fabric devices. You can also create dedicated device
dashboards or log in and configure fabric devices.
To view the dashboards in fabric devices, click the device dropdown at the left side of the page, and select a device from
the list.
The device dropdown is available in the Status, Security, Network, Users & Devices, and WiFi
dashboards. You can also enable the dropdown when you create a dashboard.
To log in to or configure a fabric device, hover over the device name until the device dialog opens and then select Login
or Configure.
Create a dashboard summary page to monitor all the fabric devices in a single view. You can use this dashboard to
monitor aspects of the devices such as system information, VPN and routing.
Example
The following image is an example of a Fabric System & License dashboard to monitor the System Information,
Licenses, and Memory usage for Branch_Office_01 and Branch_Office_02.
1. Click the Add Dashboard button. The Add Dashboard window opens.
2. In the Name field, enter a name such as Fabric System & Licenses, and click OK. The new dashboard appears.
3. In the banner, click Add Widget. The Add Dashboard Widget window opens. You can use the Search field to search
for a specific widget (for example, License Status, System Information, and Memory Usage).
4. Click the Add button next to widget. The Add Dashboard Widget window opens.
5. In the Fabric member area, select Specify and select a device in the Security Fabric.
Dashboards
A dashboard is a collection of widgets that show the status of your devices, network, and Security Fabric at a glance.
Widgets are condensed monitors that display a summary of the key details about your FortiGate pertaining to routing,
VPN, DHCP, devices, users, quarantine, and wireless connections.
The following dashboards are included in the dashboard templates:
Status l Comprehensive l View the device serial number, licenses, and administrators
l Optimal l View the status of devices in the security fabric
l Monitor CPU and Memory usage
l Monitor IPv4 and IPv6 sessions
l View VMs and Cloud devices
Users & Devices l Optimal l View users and devices connected to the network
l Identify threats from individual users and devices
l View FortiGuard and FortiClient data
l Monitor traffic bandwidth over time
You can use the GUI to change the default dashboard template. The Optimal template contains a set of popular default
dashboards and FortiView monitors. The Comprehensive template contains a set of default dashboards as well as all of
the FortiView monitors.
Resetting the default template will delete any custom dashboards and monitors, and reset the
widget settings.
1. Click the Actions menu next to Add Dashboard or Add Monitor and click Reset All Dashboards. The Dashboard
Setup window opens.
Status dashboard
The Status dashboard provides an overview of your FortiGate device and the devices in your Security Fabric. If your
FortiGate is a Virtual Machine, information about the Virtual Machine is also displayed in the dashboard.
The System Information widget contains links to the Settings module where you can update the System Time, Uptime,
and WAN IP.
A notification will appear in the Firmware field when a new version of FortiOS is released. Click Update firmware in
System > Firmware to view the available versions and update FortiOS.
The Security Fabric widget provides a visual overview of the devices connected to the fabric and their connection status.
Hover of a device icon to view more information about the device.
Click a device in the fabric to:
l View the device in the physical or logical topology
l Register, configure, deauthorize, or log in to the device
l Open Diagnostics and Tools
l View the FortiClient Monitor
These options will vary depending on the device.
Click Expand & Pin hidden content to view all the devices in the fabric at once.
Viewing administrators
The Administrators widget displays the active administrators and their access interface. Click the username to view the
Active Administrator Sessions monitor. You can use the monitor to end an administrator's session.
Resource widgets
The resource widgets show the current usage statistics for CPU, Memory, and Sessions.
Click the CPU monitor to show the per core CPU usage.
You can switch between IPv4, IPv6, or IPv4+IPv6 in the Sessions monitor.
Security dashboard
The widgets in the Security dashboard provide a snapshot of the current threats and vulnerabilities targeting your
Security Fabric.
Widget Description
Compromised Hosts by Shows the session information for a compromised host. See Viewing session
Verdict information for a compromised host on page 82.
Top Threats by Threat Level Shows the top traffic sessions aggregated by threat.
You can expand the widget to view drilldown information about the Threat, Threat
Category, Threat Level, Threat Score and Sessions.
You can use the Compromised Hosts by Verdict widget to view the session information for a compromised host.
2. Double-click a compromised host to view the session information. You can also right-click a compromised host, and
select View Sessions.
3. Double-click a session, or right-click the session and select View Sessions to view the information.
Network dashboard
The widgets in the Network dashboard show information related to networking for this FortiGate and other devices
connected to your Security Fabric. Use this dashboard to monitor the status of Routing, DHCP, SD-WAN, IPsec and SSL
VPN tunnels. All of the widgets in the Network dashboard can be expanded to full screen and saved as a monitor.
The Network dashboard contains the following widgets:
Widget Description
Static & Dynamic Routing Shows the static and dynamic routes currently active in your routing table. The
widget also includes policy routes, BGP neighbors and paths, and OSPF
neighbors.
See Static & Dynamic Routing monitor on page 84.
DHCP Shows the addresses leased out by FortiGate's DHCP servers. See DHCP
monitor on page 87.
SD-WAN Shows a summary of the SD-WAN status, including ADVPN shortcut information.
IPsec Shows the connection statuses of your IPsec VPN site to site and dial-up tunnels.
See IPsec monitor on page 88.
SSL-VPN Shows a summary of remote active users and the connection mode. See SSL-
VPN monitor on page 90.
Widget Description
The Static & Dynamic Routing Monitor displays the routing table on the FortiGate, including all static and dynamic
routing protocols in IPv4 and IPv6. You can also use this monitor to view policy routes, BGP neighbors and paths, and
OSPF neighbors.
BGP Paths
OSPF Neighbors
Sample output:
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
Sample output:
list route policy info(vf=root):
DHCP monitor
The DHCP monitor shows all the addresses leased out by FortiGate's DHCP servers. You can use the monitor to revoke
an address for a device, or create, edit, and delete address reservations.
To filter or configure a column in the table, hover over the column heading and click
Filter/Configure Column.
To revoke a lease:
To create a DHCP reservation:
4. Click OK.
1. Right-click a device in the table and click Show in FortiView. The FortiView Sources by Bytes widget is displayed.
IPsec monitor
The IPsec monitor displays all connected Site to Site VPN, Dial-up VPNs, and ADVPN shortcut tunnel information. You
can use the monitor to bring a phase 2 tunnel up or down or disconnect dial-up users. A notification appears in the
monitor when users have not enabled two-factor authentication.
To filter or configure a column in the table, hover over the column heading and click
Filter/Configure Column.
3. Hover over a record in the table. A tooltip displays the Phase 1 and Phase 2 interfaces. A warning appears next to a
user who has not enabled two-factor authentication.
To reset statistics:
Sample output:
list all ipsec tunnel in vd 0
------------------------------------------------------
name=fct-dialup ver=1 serial=4 10.100.67.5:0->0.0.0.0:0 tun_id=0.0.0.0 dst_mtu=0
bound_if=3 lgwy=static/1 tun=intf/0 mode=dialup/2 encap=none/512 options[0200]=frag-rfc
accept_traffic=1 overlay_id=0
SSL-VPN monitor
The SSL-VPN monitor displays remote user logins and active connections. You can use the monitor to disconnect a
specific connection. The monitor will notify you when VPN users have not enabled two-factor authentication.
To filter or configure a column in the table, hover over the column heading and click
Filter/Configure Column.
To disconnect a user:
Sample output
SSL VPN Login Users:
Index User Group Auth Type Timeout From HTTP in/out HTTPS in/out
0 amitchell TAC 1(1) 296 10.100.64.101 3838502/11077721 0/0
1 mmiles Dev 1(1) 292 10.100.64.101 4302506/11167442 0/0
The Users & Devices dashboard shows the current status of users and devices connected to your network. All of the
widgets can be expanded to view as monitor. In monitor view, you can create firewall addresses, deauthenticate a user,
or remove a device from the network.
The User & Devices dashboard contains the following widgets:
Widget Description
Device Inventory Shows a summary of the hardware and software that is connected to the network.
See Device inventory on page 91.
Firewall Users Shows a summary of the users logged into the network.
FortiSwitch NAC VLANs Shows a summary of VLANs assigned to devices by FortiSwitch NAC policies.
Device inventory
You can enable device detection to allow FortiOS to monitor your networks and gather information about devices
operating on those networks, including:
l MAC address
l IP address
l Operating system
l Hostname
l Username
l Endpoint tags
l When FortiOS detected the device and on which interface
You can enable device detection separately on each interface in Network > Interfaces.
Device detection is intended for devices directly connected to your LAN and DMZ ports. The widget is only available
when your Interface Role is LAN, DMZ or Undefined. It is not available when the role is WAN.
You can also manually add devices to Device Inventory to ensure that a device with multiple interfaces displays as a
single device.
To filter or configure a column in the table, hover over the column heading, and click
Filter/Configure Column. See Device inventory and filtering on page 92.
The Device Inventory widget contains a series of summary charts that provide an overview of the hardware, operating
system, status, and interfaces. You can use these clickable charts to simplify filtering among your devices.
5. To combine filters, hover over a column heading and click Filter/Configure Column.
6. Click the filter icon in the top-right corner of the chart to remove the filter.
Filter examples
1. In the Status chart, click Offline in the legend or on the chart itself.
Assets detected by device detection appear in the Device Inventory widget. You can manage policies around devices by
adding a new device object (MAC-based address) to a device. Once you add the MAC-based address, the device can be
used in address groups or directly in policies.
2. Hover over the Device Inventory widget, and click Expand to Full Screen. The Device Inventory monitor is
displayed.
3. Click a device, then click Firewall Device Address. The New Address dialog is displayed.
4. In the Name field, give the device a descriptive name so that it is easy to in the Device column.
5. Configure the MAC Address.
6. Click OK, then refresh the page. The MAC address icon appears in the Address column next to the device name.
The Firewall Users monitor displays all firewall users currently logged in. You can use the monitor to diagnose user-
related logons or to highlight and deauthenticate a user.
To filter or configure a column in the table, hover over the column heading and click
Filter/Configure Column.
To deauthenticate a user:
WiFi dashboard
The WiFi dashboard provides an overview of your WiFi network's performance, including FortiAP status, channel
utilization, WiFi clients and associated information, login failures, and signal strength.
The WiFi dashboard can be customized per your requirements. To learn more about using and modifying dashboards
and widgets, see Dashboards and Monitors on page 71.
This section describes the following monitors available for the WiFi Dashboard:
l FortiAP Status monitor on page 96
l Clients by FortiAP monitor on page 98
The FortiAP Status monitor displays the status and the channel utilization of the radios of FortiAP devices connected to a
FortiGate. It also provides access to tools to diagnose and analyze connected APs.
1. Right-click an Access Point in the table, and click Diagnostics and Tools. The Diagnostics and Tools dialog opens.
2. To monitor and analyze the FortiAP device, click on the tabs in the Diagnostics and Tools dialog, such as Clients,
Spectrum Analysis, VLAN Probe, and so on.
The Diagnostics and Tools dialog is similar to the device dialog from WiFi & Switch Controller > Managed FortiAPs. To
learn more about the various tabs and their functions, see Spectrum analysis of FortiAP E models, VLAN probe report,
and Standardize wireless health metrics.
The Clients by FortiAP monitor allows you to view detailed information about the health of individual WiFi connections in
the network. It also provides access to tools to diagnose and analyze connected wireless devices.
1. Right-click a client in the table and select Diagnostics and Tools. The Diagnostics and Tools - <device> page is
displayed.
Health status
The Status section displays the overall health for the wireless connection. The overall health of the connection is:
l Good if the value range for all three conditions are Good
l Fair or poor if one of the three conditions is Fair or Poor respectively.
l Performance
l Applications
l Destinations
l Policies
l Logs
Monitors
FortiGate supports both FortiView and Non-FortiView monitors. FortiView monitors are driven by traffic information
captured from logs and real-time data. Non-FortiView monitors capture information from various real-time state tables on
the FortiGate.
Non-FortiView monitors
Non-FortiView monitors capture information on various state tables, such as the routes in the routing table, devices in
the device inventory, DHCP leases in the DHCP lease table, connected VPNs, clients logged into the wireless network,
and much more. These monitors are useful when troubleshooting the current state of the FortiGate, and to identify
whether certain objects are in the state table or not. For more information, see Dashboards on page 78.
FortiView monitors
FortiView is the FortiOS log view tool and comprehensive monitoring system for your network. FortiView integrates real-
time and historical data into a single view on your FortiGate. It can log and monitor network threats, keep track of
administration activities, and more.
Use FortiView monitors to investigate traffic activity such as user uploads and downloads, or videos watched on
YouTube. You can view the traffic on the whole network by user group or by individual. FortiView displays the
information in both text and visual format, giving you an overall picture of your network traffic activity so that you can
quickly decide on actionable items.
FortiView is integrated with many UTM functions. For example, you can quarantine an IP address directly in FortiView or
create custom devices and addresses from a FortiView entry.
The logging range and depth will depend on the FortiGate model.
The Optimal template contains a set of popular default dashboards and FortiView monitors. The Comprehensive
template contains a set of default dashboards as well as all of the FortiView monitors. See Dashboards on page 78.
Template Monitors
FortiView monitors are available in the tree menu under Dashboards. The menu contains several default monitors for the
top categories. Additional FortiView monitors are available as widgets that can be added to the dashboards. You can
also add FortiView monitors directly to the tree menu with the Add (+) button.
Dashboard Usage
FortiView Sources Displays Top Sources by traffic volume and drilldown by Source.
FortiView Destinations Displays Top Destinations by traffic volume and drilldown by Destination.
FortiView Applications Displays Top Applications by traffic volume and drilldown by Application.
FortiView Web Sites Displays Top Websites by session count and drilldown by Domain.
FortiView Policies Displays Top Policies by traffic volume and drilldown by Policy number
FortiView Sessions Displays Top Sessions by traffic source and can be used to end sessions.
Usage is based on default settings. The pages may be customized further and sorted by other fields.
You can quarantine a host and ban an IP from all of the core FortiView monitors.
Non-core FortiView monitors are available in the Add monitor pane. You can add a FortiView widget to a dashboard or
the tree menu as a monitor.
1. In the tree menu, under the monitors section, click Add Monitor (+). The Add Monitor window opens.
2. Click Add next to a monitor. You can use the Search field to search for a specific monitor.
3. In the FortiGate area, select All FortiGates or Specify to select a FortiGate device in the security fabric.
4. (Optional) In the Data Source area, select Specify and select a source device.
5. From the Time Period dropdown, select the time period. This option is not available in all monitors.
6. In the Visualization area, select Table View or Bubble Chart.
7. From the Sort By dropdown, select the sorting method.
8. Click Add Monitor. The monitor is added to the tree menu.
Monitors by category
Usage is based on the default settings. The monitors may be customized further and sorted by other fields.
LANDMARK
Threats Threat level/Threat Score/Sessions Displays top threats and drilldown by threat.
WAN
Threats Threat Level/Threat Score/Sessions Displays top threats and drilldown by threat.
All Segments
Use the FortiView interface to customize the view and visualizations within a monitor to find the information you are
looking for. The tools in the top menu bar allow you to change the time display, refresh or customize the data source, and
filter the results. You can also right-click a table in the monitor to view drilldown information for an item.
Use the Time Display dropdown to select the time period to display on the current monitor. Time display options vary
depending on the monitor and can include real-time information (now) and historical information (1 hour, 24 hours, and 7
days).
You can create a custom time range by selecting an area in table with your cursor.
The icon next to the time period identifies the data source (FortiGate Disk, FortiAnalyzer, or FortiGate Cloud). You can
hover over the icon to see a description of the device.
Data source
FortiView gathers information from a variety of data sources. If there are no log disk or remote logging configured, the
data will be drawn from the FortiGate's session table, and the Time Period is set to Now.
When Data Source is set to Best Available Device, FortiAnalyzer is selected when available,
then FortiGate Cloud, and then FortiGate Disk.
Drilldown information
Double-click or right-click an entry in a FortiView monitor and select Drill Down to Details to view additional details about
the selected traffic activity. Click the Back icon in the toolbar to return to the previous view.
You can group drilldown information into different drilldown views. For example, you can group the drilldown information
in the FortiView Destinations monitor by Sources, Applications, Threats, Policies, and Sessions.
Double-click an entry to view the logs in Sessions view. Double-click a session to view the logs.
Graph l The graph shows the bytes sent/received in the time frame. real time does not include a
chart.
l Users can customize the time frame by selecting a time period within the graph.
Summary of l Shows information such as the user/avatar, avatar/source IP, bytes, and sessions total
for the time period.
l Can quarantine host (access layer quarantine) if they are behind a FortiSwitch or
FortiAP.
l Can ban IP addresses, adds the source IP address into the quarantine list.
Tabs l Drilling down entries in any of these tabs (except sessions tab) will take you to the
underlying traffic log in the sessions tab.
l Applications shows a list of the applications attributed to the source IP. This can include
scanned applications (using Application Control in a firewall policy or unscanned
applications.
config log gui-display
set fortiview-unscanned-apps enable
end
l Destinations shows destinations grouped by IP address/FQDN.
l Threats lists the threats caught by UTM profiles. This can be from antivirus, IPS, Web
Filter, Application Control, etc.
l Web Sites contains the websites which were detected either with webfilter, or through
FQDN in traffic logs.
l Web Categories groups entries into their categories as dictated by the Web Filter
Database.
l Policies groups the entries into which polices they passed through or were blocked by.
l Sessions shows the underlying logs (historical) or sessions (real time). Drilldowns from
other tabs end up showing the underlying log located in this tab.
l Search Phrases shows entries of search phrases on search engines captured by a Web
Filter UTM profile, with deep inspection enabled in firewall policy.
l More information can be shown in a tooltip while hovering over these entries.
To view matching logs or download a log, click the Security tab in the Log Details .
You can enable FortiView from SSD disk, FortiAnalyzer and FortiGate Cloud.
Restrictions
Configuration
A firewall policy needs to be in place with traffic logging enabled. For optimal operation with FortiView, internal interface
roles should be clearly defined as LAN. DMZ and internet facing or external interface roles should be defined as WAN.
To include sniffer traffic and local-deny traffic when FortiView from Disk:
Troubleshooting
Use execute report flush-cache and execute report recreate-db to clear up any irregularities that may
be caused by upgrading or cache issues.
Traffic logs
1. Go to Log & Report, and select either the Forward Traffic, Local Traffic, or Sniffer Traffic views.
2. In the top menu bar, click Log location and select Disk.
Connect FortiGate to a FortiAnalyzer to increase the functionality of FortiView. Adding a FortiAnalyzer is useful when
adding monitors such as the Compromised Hosts. FortiAnalyzer also allows you to view historical information for up to
seven days.
Requirements
l A FortiGate or FortiOS
l A compatible FortiAnalyzer (see Compatibility with FortiOS)
To configure logging to the FortiAnalyzer, see Configuring FortiAnalyzer on page 2100
When Data Source is set to Best Available Device, FortiAnalyzer is selected when
available, then FortiGate Cloud, and then FortiGate Disk.
This function requires a FortiGate that is registered and logged into a compatible FortiGate Cloud. When using FortiGate
Cloud, the Time Period can be set to up to 24 hours.
To configure logging to FortiGate Cloud, see Configuring FortiGate Cloud on page 2102.
You can select FortiGate Cloud as the data source for all available FortiView pages and
widgets.
FortiView sources
The FortiView Sources monitor displays top sources sorted by Bytes, Sessions or Threat Score. The information can be
displayed in real time or historical views. You can use the monitor to create or edit a firewall device address or IP address
definitions, and temporarily or permanently ban IPs.
1. In the Device column, hover over the device MAC address. An information window opens.
Use the Name field to assign a descriptive name to a device so it is easier to find it in the
Device column. After you finish configuring the device, refresh the page to see the new
name in the monitor.
1. In the Device column, hover over the device MAC address. An information window opens.
Use the Name field to assign a descriptive name to a device so it is easier to find it in the
Device column. After you finish configuring the device, refresh the page to see the new
name in the monitor.
To ban an IP address:
1. In the Device column, hover over the device MAC address. An information window opens.
FortiView Sessions
The FortiView Sessions monitor displays Top Sessions by traffic source and can be used to end sessions.
To view the FortiView Sessions dashboard, go to Dashboard > FortiView Sessions.
The session table displayed on the FortiView Sessions monitor is useful when verifying open connections. For example,
if you have a web browser open to browse the Fortinet website, you would expect a session entry from your computer on
port 80 to the IP address for the Fortinet website. You can also use a session table to investigate why there are too many
sessions for FortiOS to process.
You can filter the sessions displayed in the session table by setting up the available filtering options.
1. Click on the Add Filter button at the top of the session table.
2. Select the required filtering option. The session table updates to the filter selection.
3. You may add one or more filters depending upon your requirements. To add more filters, repeat the above steps for
a different set of filters.
You can be very specific with how you use filters and target sessions based on different filter combinations. For example,
you may want to view all sessions from a device with a particular IP by adding the Source IP filter. Similarly, you may
need to target all the sessions having a particular Destination IP and Destination Port, and so on.
You may also view the session data in the CLI.
The session table output in the CLI is very large. You can use the supported filters in the CLI to show only the data you
need.
See Using a session table on page 2535 to learn more about using the supported filters in the CLI.
You may also decide to end a particular session or all sessions for administrative purposes.
1. Select the session you want to end. To select multiple sessions, hold the Ctrl or Shift key on your keyboard while
clicking the sessions.
2. Right-click on the selected sessions, click on End Session(s) or End All Sessions.
The FortiView Source Firewall Objects and FortiView Destination Firewall Objects monitors leverage UUID to resolve
firewall object address names for improved usability.
Requirements
To have a historical Firewall Objects-based view, address objects' UUIDs need to be logged.
end
2. In the Search field, type Destination Firewall Objects and click the Add button next to the dashboard name.
3. In the FortiGate area, select the FortiGate(s) from the dropdown.
4. In the Data Source area, select Best Available Device or Specify. For information, see Using the FortiView interface
on page 106.
5. From the Time Period dropdown, select the time period. Select now for real-time information, or (1 hour, 24 hours,
and 7 days) for historical information.
6. In the Visualization area, select Table View or Bubble Chart.
7. From the Sort By dropdown, select Bytes, Sessions, Bandwidth, or Packets.
8. Click Add Monitor. The monitor is added to the tree menu.
1. Open the FortiView Source Firewall Objects or FortiView Destination Firewall Objects monitor.
2. Right-click on any Source or Destination Object and click Drill Down to Details.
3. Click the tabs to sort the sessions by Application, Destinations, Web Sites, or Policies.
5. To views sessions, right-click an entry and click View Sessions, or click the Sessions tab.
6. To end a session, right-click an entry in the Sessions tab and select End Sessions or End All Sessions.
You can use FortiGuard web categories to populate the category fields in various FortiView monitors such as FortiView
Web Categories, FortiView Websites or FortiView Sources. To view the categories in a monitor, the web filter profile
must be configured to at least monitor for a FortiGuard category based on a web filter and applied to a firewall policy for
outbound traffic.
2. In the Search field, type FortiView Web Categories and click the Add button next to the monitor name.
3. In the FortiGate area, select the FortiGate(s) from the dropdown.
4. In the Data Source area, click Best Available Device or Specify to select a device in the security fabric.
5. From the Time Period dropdown, select a time period greater than Now.
6. From the Sort By dropdown, select Bytes, Sessions, Bandwidth, or Packets.
7. Click Add Monitor. The widget is added to the tree menu.
The web filter category name appears in the Category column of the dashboard.
Click an entry in the table. The category name appears at the top of the Summary of box.
Click the Web Sites tab. The category name appears in the Category column.
Click the Sessions tab. The category name appears in the Category Description column.
The category name also appears in the Category column in the FortiView Websites and FortiView Sources monitors.
Cloud applications
All cloud applications require SSL Inspection set to deep-inspection on the firewall policy. For example, Facebook_
File.Download can monitor Facebook download behavior which requires SSL deep-inspection to parse the deep
information in the network packets.
1. In the Application Signature page, ensure the Behavior column is displayed. If necessary, add the Behavior column.
a. Hover over the left side of the table column headings to display the Configure Table icon.
b. Click Configure Table and select Behavior.
c. Click Apply.
2. Click the filter icon in the Behavior column and select Cloud to filter by Cloud. Then click Apply.
3. The Application Signature page displays all applications with cloud behavior.
4. Use the Search box to search for applications. For example, you can search for youtube.
On the Edit Application Sensor page in the Categories section, the eye icon next to a category means that category is
monitored and logged.
2. In the Search field, enter FortiView Cloud Applications and click the Add button next to the monitor.
3. In the FortiGate area, select the FortiGate(s) from the dropdown.
4. In the Data Source area, click Best Available Device or Specify to select a device in the security fabric.
5. From the Time Period dropdown, select a time period greater than Now.
6. From the Sort By dropdown, select Bytes, Sessions, or Files (Up/Down).
7. Click Add Monitor. The monitor is added to the tree menu.
8. Open the monitor. If SSL deep inspection is enabled on the relative firewall, then the monitor shows the additional
details that are logged, such as Files (Up/Down) and Videos Played.
l For YouTube, the Videos Played column is triggered by the YouTube_Video.Play cloud application sensor.
This shows the number of local network users who logged into YouTube and played YouTube videos.
l For Dropbox, the Files (Up/Down) column is triggered by Dropbox_File.Download and Dropbox_File.Upload
cloud application sensors. This shows the number of local network users who logged into Dropbox and
uploaded or downloaded files.
1. In the tree menu, click the FortiView Cloud Applications monitor to open it.
2. For details about a specific entry, double-click the entry or right-click the entry and select Drill Down to Details.
3. To see all the sessions for an application, click Sessions.
In this example, the Application Name column shows all applications related to YouTube.
4. To view log details, double-click a session to display the Log Details pane.
Sessions monitored by SSL deep inspection (in this example, Youtube_Video.Play) captured deep information such
as Application User, Application Details, and so on. The Log Details pane also shows additional deep information
such as application ID, Message, and so on.
Sessions not monitored by SSL deep inspection (YouTube) did not capture the deep information.
5. To display a specific time period, select and drag in the timeline graph to display only the data for that time period.
This example describes how to monitor network traffic for YouTube using FortiView Applications view with SSL deep
inspection.
To view the application signature description, click the ID link in the information window.
7. On the test PC, log into YouTube and play some videos.
8. On the FortiGate, go to Log & Report > Application Control and look for log entries for browsing and playing
YouTube videos.
In this example, note the Application User and Application Details. Also note that the Application Control ID is 38569
showing that this entry was triggered by the application sensor YouTube_Video.Play.
This example describes how to monitor network traffic for YouTube using FortiView cloud application view without SSL
deep inspection.
2. On the test PC, log into YouTube and play some videos.
3. On the FortiGate, go to Log & Report > Application Control and look for log entries for browsing and playing
YouTube videos.
In this example, the log shows only applications with the name YouTube. The log cannot show YouTube application
sensors which rely on SSL deep inspection.
Interfaces
Physical and virtual interfaces allow traffic to flow between internal networks, and between the internet and internal
networks. FortiGate has options for setting up interfaces and groups of subnetworks that can scale as your organization
grows. You can create and edit VLAN, EMAC-VLAN, switch interface, zones, and so on.
The following topics provide information about interfaces:
l Interface settings on page 131
l Aggregation and redundancy on page 137
l VLANs on page 140
l Enhanced MAC VLANs on page 146
l Inter-VDOM routing on page 149
l Software switch on page 154
l Hardware switch on page 156
l Zone on page 160
l Virtual wire pair on page 162
l PRP handling in NAT mode with virtual wire pair on page 166
l Virtual VLAN switch on page 166
l Failure detection for aggregate and redundant interfaces on page 172
l VLAN inside VXLAN on page 173
Interface settings
Administrators can configure both physical and virtual FortiGate interfaces in Network > Interfaces. There are different
options for configuring interfaces when FortiGate is in NAT mode or transparent mode.
The available options will vary depending on feature visibility, licensing, device model, and other factors. The following
list is not comprehensive.
Alias Enter an alternate name for a physical interface on the FortiGate unit. This
field appears when you edit an existing physical interface. The alias does not
appear in logs.
The maximum length of the alias is 25 characters.
Type The configuration type for the interface, such as VLAN, Software Switch.
802.3ad Aggregate, and others.
VRF ID Virtual Routing and Forwarding (VRF) allows multiple routing table instances
to coexist on the same router. One or more interface can have a VRF, and
packets are only forwarded between interfaces with the dame VRF.
Virtual Domain Select the virtual domain to add the interface to.
Only administrator accounts with the super_admin profile can change the
Virtual Domain.
Interface Members This section can have different formats depending on the Type.
Members can be selected for some interface types:
l Software Switch or Hardware Switch: Specify the physical and wireless
Role Set the role setting for the interface. Different settings will be shown or hidden
when editing an interface depending on the role:
l LAN: Used to connected to a local network of endpoints. It is default role
Traffic mode This option is only available when Type is WiFi SSD.
l Tunnel: Tunnel to wireless controller
Address
configuration is enabled, you can add both an IPv4 and an IPv6 address.
l DHCP: Get the interface IP address and other network settings from a
DHCP server.
l Auto-managed by IPAM: Assign subnets to prevent duplicate
IP/Netmask If Addressing Mode is set to Manual, enter an IPv4 address and subnet mask
for the interface. FortiGate interfaces cannot have multiple IP addresses on
the same subnet.
IPv6 addressing mode Select the addressing mode for the interface:
l Manual: Add an IP address and netmask for the interface.
l DHCP: Get the interface IP address and other network settings from a
DHCP server.
l Delegated: Select an IPv6 upstream interface that has DHCPv6 prefix
delegation enabled, and enter an IPv6 subnet if needed. The interface will
get the IPv6 prefix from the upstream DHCPv6 server that is connected to
the IPv6 upstream interface, and form the IPv6 address with the subnet
configured on the interface.
IPv6 Address/Prefix If Addressing Mode is set to Manual and IPv6 support is enabled, enter an
IPv6 address and subnet mask for the interface. A single interface can have an
IPv4 address, IPv6 address, or both.
Auto configure IPv6 address Automatically configure an IPv6 address using Stateless Address Auto-
configuration (SLAAC).
This option is available when IPv6 addressing mode is set to Manual.
DHCPv6 prefix delegation Enable/disable DHCPv6 prefix delegation, which can be used to delegate IPv6
prefixes from an upstream DHCPv6 server to another interface or downstream
device.
When enabled, there is an option to enable a DHCPv6 prefix hint that helps the
DHCPv6 server provide the desired prefix.
Create address object This option is available when Role is set to LAN or DMZ.
matching subnet Enable this option to automatically create an address object that matches the
interface subnet.
Administrative Access
IPv4 Administrative Access Select the types of administrative access permitted for IPv4 connections to this
interface. See Configure administrative access to interfaces on page 135.
IPv6 Administrative Access Select the types of administrative access permitted for IPv6 connections to this
interface. See Configure administrative access to interfaces on page 135.
DHCP Server Enable a DHCP server for the interface. See DHCP server on page 286.
Stateless Address Auto- Enable to provide IPv6 addresses to connected devices using SLAAC.
configuration (SLAAC)
You can also enable Stateful serverto configure the DHCPv6 server to be
stateful. Manually enter the IP range, or use Delegated mode to delegate IP
prefixes from an upstream DHCPv6 server connected to the upstream
interface.
Network
Device Detection Enable/disable passively gathering device identity information about the
devices on the network that are connected to this interface.
Security Mode Enable/disable captive portal authentication for this interface. After enabling
captive portal authentication, you can configure the authentication portal, user
and group access, custom portal messages, exempt sources and
destinations/services, and redirect after captive portal.
DSL Settings
Traffic Shaping
Outbound shaping profile Enable/disable traffic shaping on the interface. This allows you to enforce
bandwidth limits on individual interfaces. See Interface-based traffic shaping
profile on page 893 for more information.
Miscellaneous
4. Click OK.
end
next
end
You can configure the protocols that administrators can use to access interfaces on the FortiGate. This helps secure
access to the FortiGate by restricting access to a limited number of protocols. It helps prevent users from accessing
interfaces that you don't want them to access, such as public-facing ports.
As a best practice, you should configure administrative access when you're setting the IP address for a port.
Speed Test Allow this interface to listen to speed test sender requests.
To allow the FortiGate to be configured as speed test server, configure the following:
config system global
set speedtest-server {enable | disable}
end
For more detail, see Speed tests run from the hub to the spokes in dial-up IPsec
tunnels on page 634.
HTTPS Allow secure HTTPS connections to the FortiGate GUI through this interface. If
configured, this option is enabled automatically.
HTTP Allow HTTP connections to the FortiGate GUI through this interface. This option can
only be enabled if HTTPS is already enabled.
PING The interface responds to pings. Use this setting to verify your installation and for
testing.
SNMP Allow a remote SNMP manager to request SNMP information by connecting to this
interface.
Security Fabric Allow Security Fabric access. This enables FortiTelemetry and CAPWAP.
Connection
Only supported FEC (forward error correction) implementations are allowed to be configured on 10G, 25G, 40G, and
100G interfaces based on the speed that is selected.
l For 1000M, 10G, or 40G interfaces, FEC is not supported and the option is disabled.
l For 25G and 100G interfaces, FEC is automatically set to cl91-rs-fec by default.
Since the speed changed to 1000G, the mediatype setting automatically changes to sr4, and the forward-error-
correction setting automatically changes to cl91-rs-fec. When the speed was 40G, the forward-error-
correction setting was disabled.
Link aggregation (IEEE 802.3ad) enables you to bind two or more physical interfaces together to form an aggregated
(combined) link. This new link has the bandwidth of all the links combined. If a link in the group fails, traffic is transferred
automatically to the remaining interfaces. The only noticeable effect is reduced bandwidth.
This feature is similar to redundant interfaces. The major difference is a redundant interface group only uses one link at a
time, where an aggregate link group uses the total bandwidth of the functioning links in the group, up to eight (or more).
An interface is available to be an aggregate interface if:
l It is a physical interface and not a VLAN interface or subinterface.
l It is not already part of an aggregate or redundant interface.
l It is in the same VDOM as the aggregated interface. Aggregate ports cannot span multiple VDOMs.
l It does not have an IP address and is not configured for DHCP or PPPoE.
l It is not referenced in any security policy, VIP, IP Pool, or multicast policy.
l It is not an HA heartbeat interface.
l It is not one of the FortiGate-5000 series backplane interfaces.
When an interface is included in an aggregate interface, it is not listed on the Network > Interfaces page. Interfaces still
appear in the CLI although configuration for those interfaces do not take affect. You cannot configure the interface
individually and it is not available for inclusion in security policies, VIPs, IP pools, or routing.
Sample configuration
This example creates an aggregate interface on a FortiGate-140D POE using ports 3-5 with an internal IP address of
10.1.1.123, as well as the administrative access to HTTPS and SSH.
Redundancy
In a redundant interface, traffic only goes over one interface at any time. This differs from an aggregated interface where
traffic goes over all interfaces for increased bandwidth. This difference means redundant interfaces can have more
robust configurations with fewer possible points of failure. This is important in a fully-meshed HA configuration.
An interface is available to be in a redundant interface if:
l It is a physical interface and not a VLAN interface.
l It is not already part of an aggregated or redundant interface.
l It is in the same VDOM as the redundant interface.
l It does not have an IP address and is not configured for DHCP or PPPoE.
l It has no DHCP server or relay configured on it.
l It does not have any VLAN subinterfaces.
l It is not referenced in any security policy, VIP, or multicast policy.
l It is not monitored by HA.
l It is not one of the FortiGate-5000 series backplane interfaces.
When an interface is included in a redundant interface, it is not listed on the Network > Interfaces page. You cannot
configure the interface individually and it is not available for inclusion in security policies, VIPs, or routing.
Sample configuration
FortiGate models that have an internal switch that supports modifying the distribution algorithm can use enhanced
hashing to help distribute traffic evenly, or load balance, across links on the Link Aggregation (LAG) interface.
The enhanced hashing algorithm is based on a 5-tuple of the IP protocol, source IP address, destination IP address,
source port, and destination port.
Different computation methods allow for more variation in the load balancing distribution, in case one algorithm does not
distribute traffic evenly between links across different XAUIs. The available methods are:
The following NP6 non-service FortiGate models support this feature: 1200D, 1500D,
1500DT, 3000D, 3100D, 3200D, 3700D, and 5001D.
For example, to use XOR16 and include all of the fields in the 5-tuple to compute the link in the LAG interface that the
packet is distributed to:
config system npu
set lag-out-port-select enable
config sw-eh-hash
set computation xor16
set ip-protocol include
set source-ip-upper-16 include
set source-ip-lower-16 include
set destination-ip-upper-16 include
set destination-ip-lower-16 include
set source-port include
set destination-port include
set netmask-length 32
end
end
VLANs
Virtual Local Area Networks (VLANs) multiply the capabilities of your FortiGate unit and can also provide added network
security. VLANs use ID tags to logically separate devices on a network into smaller broadcast domains. These smaller
domains forward packets only to devices that are part of that VLAN domain. This reduces traffic and increases network
security.
In NAT mode, the FortiGate unit functions as a layer-3 device. In this mode, the FortiGate unit controls the flow of
packets between VLANs and can also remove VLAN tags from incoming VLAN packets. The FortiGate unit can also
forward untagged packets to other networks such as the Internet.
In NAT mode, the FortiGate unit supports VLAN trunk links with IEEE 802.1Q-compliant switches or routers. The trunk
link transports VLAN-tagged packets between physical subnets or networks. When you add VLAN subinterfaces to the
FortiGate's physical interfaces, the VLANs have IDs that match the VLAN IDs of packets on the trunk link. The FortiGate
unit directs packets with VLAN IDs to subinterfaces with matching IDs.
You can define VLAN subinterfaces on all FortiGate physical interfaces. However, if multiple virtual domains are
configured on the FortiGate unit, you only have access to the physical interfaces on your virtual domain. The FortiGate
unit can tag packets leaving on a VLAN subinterface. It can also remove VLAN tags from incoming packets and add a
different VLAN tag to outgoing packets.
Normally in VLAN configurations, the FortiGate unit's internal interface is connected to a VLAN trunk, and the external
interface connects to an Internet router that is not configured for VLANs. In this configuration, the FortiGate unit can
apply different policies for traffic on each VLAN interface connected to the internal interface, which results in less
network traffic and better security.
Sample topology
In this example, two different internal VLAN networks share one interface on the FortiGate unit and share the connection
to the Internet. This example shows that two networks can have separate traffic streams while sharing a single interface.
This configuration can apply to two departments in a single company or to different companies.
There are two different internal network VLANs in this example. VLAN_100 is on the 10.1.1.0/255.255.255.0 subnet, and
VLAN_200 is on the 10.1.2.0/255.255.255.0 subnet. These VLANs are connected to the VLAN switch.
The FortiGate internal interface connects to the VLAN switch through an 802.1Q trunk. The internal interface has an IP
address of 192.168.110.126 and is configured with two VLAN subinterfaces (VLAN_100 and VLAN_200). The external
interface has an IP address of 172.16.21.2 and connects to the Internet. The external interface has no VLAN
subinterfaces.
When the VLAN switch receives packets from VLAN_100 and VLAN_200, it applies VLAN ID tags and forwards the
packets of each VLAN both to local ports and to the FortiGate unit across the trunk link. The FortiGate unit has policies
that allow traffic to flow between the VLANs, and from the VLANs to the external network.
Sample configuration
In this example, both the FortiGate unit and the Cisco 2950 switch are installed and connected and basic configuration
has been completed. On the switch, you need access to the CLI to enter commands. No VDOMs are enabled in this
example.
General configuration steps include:
1. Configure the external interface.
2. Add two VLAN subinterfaces to the internal network interface.
3. Add firewall addresses and address ranges for the internal and external networks.
4. Add security policies to allow:
l the VLAN networks to access each other.
Policies 1 and 2 do not need NAT enabled, but policies 3 and 4 do need NAT enabled.
config firewall policy
edit 1
set srcintf VLAN_100
set srcaddr VLAN_100_Net
set dstintf VLAN_200
set dstaddr VLAN_200_Net
set schedule always
set service ALL
set action accept
set nat disable
set status enable
next
edit 2
set srcintf VLAN_200
set srcaddr VLAN_200_Net
set dstintf VLAN_100
set dstaddr VLAN_100_Net
set schedule always
set service ALL
set action accept
set nat disable
set status enable
next
edit 3
set srcintf VLAN_100
set srcaddr VLAN_100_Net
set dstintf external
set dstaddr all
set schedule always
set service ALL
set action accept
set nat enable
set status enable
next
edit 4
set srcintf VLAN_200
set srcaddr VLAN_200_Net
set dstintf external
set dstaddr all
set schedule always
set service ALL
set action accept
set nat enable
set status enable
next
end
In transparent mode, the FortiGate unit behaves like a layer-2 bridge but can still provide services such as antivirus
scanning, web filtering, spam filtering, and intrusion protection to traffic. Some limitations of transparent mode is that you
cannot use SSL VPN, PPTP/L2TP VPN, DHCP server, or easily perform NAT on traffic. The limits in transparent mode
apply to IEEE 802.1Q VLAN trunks passing through the unit.
You can insert the FortiGate unit operating in transparent mode into the VLAN trunk without making changes to your
network. In a typical configuration, the FortiGate unit internal interface accepts VLAN packets on a VLAN trunk from a
VLAN switch or router connected to internal network VLANs. The FortiGate external interface forwards VLAN-tagged
packets through another VLAN trunk to an external VLAN switch or router and on to external networks such as the
Internet. You can configure the unit to apply different policies for traffic on each VLAN in the trunk.
To pass VLAN traffic through the FortiGate unit, you add two VLAN subinterfaces with the same VLAN ID, one to the
internal interface and the other to the external interface. You then create a security policy to permit packets to flow from
the internal VLAN interface to the external VLAN interface. If required, create another security policy to permit packets to
flow from the external VLAN interface to the internal VLAN interface. Typically in transparent mode, you do not permit
packets to move between different VLANs. Network protection features such as spam filtering, web filtering, and anti-
virus scanning, are applied through the UTM profiles specified in each security policy, enabling very detailed control over
traffic.
When the FortiGate unit receives a VLAN-tagged packet on a physical interface, it directs the packet to the VLAN
subinterface with the matching VLAN ID. The VLAN tag is removed from the packet and the FortiGate unit then applies
security policies using the same method it uses for non-VLAN packets. If the packet exits the FortiGate unit through a
VLAN subinterface, the VLAN ID for that subinterface is added to the packet and the packet is sent to the corresponding
physical interface.
Sample topology
In this example, the FortiGate unit is operating in transparent mode and is configured with two VLANs: one with an ID of
100 and the other with ID 200. The internal and external physical interfaces each have two VLAN subinterfaces, one for
VLAN_100 and one for VLAN_200.
The IP range for the internal VLAN_100 network is 10.100.0.0/255.255.0.0, and for the internal VLAN_200 network is
10.200.0.0/255.255.0.0.
The internal networks are connected to a Cisco 2950 VLAN switch which combines traffic from the two VLANs onto one
in the FortiGate unit's internal interface. The VLAN traffic leaves the FortiGate unit on the external network interface,
goes on to the VLAN switch, and on to the Internet. When the FortiGate units receives a tagged packet, it directs it from
the incoming VLAN subinterface to the outgoing VLAN subinterface for that VLAN.
In this example, we create a VLAN subinterface on the internal interface and another one on the external interface, both
with the same VLAN ID. Then we create security policies that allow packets to travel between the VLAN_100_int
interface and the VLAN_100_ext interface. Two policies are required: one for each direction of traffic. The same is
required between the VLAN_200_int interface and the VLAN_200_ext interface, for a total of four security policies.
Sample configuration
There are two main steps to configure your FortiGate unit to work with VLANs in transparent mode:
1. Add VLAN subinterfaces.
2. Add security policies.
You can also configure the protection profiles that manage antivirus scanning, web filtering, and spam filtering.
The Media Access Control (MAC) Virtual Local Area Network (VLAN) feature in Linux allows you to configure multiple
virtual interfaces with different MAC addresses (and therefore different IP addresses) on a physical interface.
FortiGate implements an enhanced MAC VLAN consisting of a MAC VLAN with bridge functionality. Because each MAC
VLAN has a unique MAC address, virtual IP addresses (VIPs) and IP pools are supported, and you can disable Source
Network Address Translation (SNAT) in policies.
MAC VLAN cannot be used in a transparent mode virtual domain (VDOM). In a transparent mode VDOM, a packet
leaves an interface with the MAC address of the original source instead of the interface’s MAC address. FortiGate
implements an enhanced version of MAC VLAN where it adds a MAC table in the MAC VLAN which learns the MAC
addresses when traffic passes through.
If you configure a VLAN ID for an enhanced MAC VLAN, it won’t join the switch of the underlying interface. When a
packet is sent to this interface, a VLAN tag is inserted in the packet and the packet is sent to the driver of the underlying
interface. When the underlying interface receives a packet, if the VLAN ID doesn’t match, it won’t deliver the packet to
this enhanced MAC VLAN interface.
When using a VLAN ID, the ID and the underlying interface must be a unique pair, even if the
belong to different VDOMs. This is because the underlying, physical interface uses the VLAN
ID as the identifier to dispatch traffic among the VLAN and enhanced MAC VLAN interfaces.
If you use an interface in an enhanced MAC VLAN, do not use it for other purposes such as a management interface, HA
heartbeat interface, or in Transparent VDOMs.
If a physical interface is used by an EMAC VLAN interface, you cannot use it in a Virtual Wire Pair.
In high availability (HA) configurations, enhanced MAC VLAN is treated as a physical interface. It’s assigned a unique
physical interface ID and the MAC table is synchronized with the secondary devices in the same HA cluster.
Example 1: Enhanced MAC VLAN configuration for multiple VDOMs that use the same
interface or VLAN
In this example, a FortiGate is connected, through port 1 to a router that’s connected to the Internet. Three VDOMs share
the same interface (port 1) which connects to the same router that’s connected to the Internet. Three enhanced MAC
VLAN interfaces are configured on port 1 for the three VDOMs. The enhanced MAC VLAN interfaces are in the same IP
subnet segment and each have unique MAC addresses.
The underlying interface (port 1) can be a physical interface, an aggregate interface, or a VLAN interface on a physical or
aggregate interface.
Example 2: Enhanced MAC VLAN configuration for shared VDOM links among multiple
VDOMs
In this example, multiple VDOMs can connect to each other using enhanced MAC VLAN on network processing unit
(NPU) virtual link (Vlink) interfaces.
FortiGate VDOM links (NPU-Vlink) are designed to be peer-to-peer connections and VLAN interfaces on NPU Vlink
ports use the same MAC address. Connecting more than two VDOMs using NPU Vlinks and VLAN interfaces is not
recommended.
Example 3: Enhanced MAC VLAN configuration for unique MAC addresses for each
VLAN interface on the same physical port
Some networks require a unique MAC address for each VLAN interface when the VLAN interfaces share the same
physical port. In this case, the enhanced MAC VLAN interface is used the same way as normal VLAN interfaces.
To configure this, use the set vlanid command for the VLAN tag. The VLAN ID and interface must be a unique pair,
even if they belong to different VDOMs.
Inter-VDOM routing
VDOM links allow VDOMs to communicate internally without using additional physical interfaces.
Inter-VDOM routing is the communication between VDOMs. VDOM links are virtual interfaces that connect VDOMs. A
VDOM link contains a pair of interfaces, each one connected to a VDOM and forming either end of the inter-VDOM
connection.
When VDOMs are configured on your FortiGate unit, configuring inter-VDOM routing and VDOM links is like creating a
VLAN interface. VDOM links can be managed in either the CLI or in the network interface list in the GUI.
VDOM link does not support traffic offload. If you want to use traffic offload, use NPU-VDOM-
LINK.
By default, VDOM links are created as point-to-point (ppp) links. If required, the link type can
be changed in the CLI.
For example, when running OSPF in IPv6, a link-local address is required in order to
communicate with OSPF neighbors. For a VDOM link to obtain a link-local address its type
must be set to ethernet.
config global
config system vdom-link
edit "<vdom-link-name>"
set type {ppp | ethernet}
next
end
config system interface
edit "<vdom-link-name0>"
set vdom "<VDOM Name>"
set type vdom-link
next
edit "<vdom-link-name1>"
set vdom "<VDOM Name>"
set type vdom-link
next
end
end
config global
config system vdom-link
delete <VDOM-LINK-Name>
end
end
Example
This example shows how to configure a FortiGate unit to use inter-VDOM routing.
Two departments of a company, Accounting and Sales, are connected to one FortiGate. The company uses a single ISP
to connect to the Internet.
This example includes the following general steps. We recommend following the steps in the order below.
To enable VDOMs:
You will be logged out of the device when VDOM mode is enabled.
config global
config vdom
edit Accounting
next
edit Sales
next
end
end
Next, configure the physical interfaces. This example uses three interfaces on the FortiGate unit: port2 (internal), port3
(DMZ), and port1 (external). Port2 and port3 interfaces each have a department’s network connected. Port1 is for all
traffic to and from the Internet and uses DHCP to configure its IP address, which is common with many ISPs.
config global
config system interface
edit port2
set alias AccountingLocal
set vdom Accounting
set mode static
set ip 172.100.1.1 255.255.0.0
set allowaccess https ping ssh
set description "The accounting dept. internal interface"
next
edit port3
set alias SalesLocal
set vdom Sales
set mode static
set ip 192.168.1.1 255.255.0.0
set allowaccess https ping ssh
set description "The sales dept. internal interface"
next
edit port1
set alias ManagementExternal
set vdom root
set mode dhcp
set allowaccess https ssh snmp
set description "The system wide management interface."
next
end
end
To complete the connection between each VDOM and the management VDOM, add the two VDOM links. One pair is the
Accounting – management link and the other is the Sales – management link.
When configuring inter-VDOM links, you do not have to assign IP addresses to the links unless you are using advanced
features such as dynamic routing that require them. Not assigning IP addresses results in faster configuration and more
available IP addresses on your networks.
config global
config system vdom-link
edit AccountVlnk
next
end
config system interface
edit AccountVlnk0
set vdom Accounting
config global
config system vdom-link
edit SalesVlnk
next
end
config system interface
edit SalesVlnk0
set vdom Sales
set ip 12.12.12.2 255.255.255.0
set allowaccess https ping ssh
set description "Sales side of the VDOM link"
next
edit SalesVlnk1
set vdom root
set ip 12.12.12.1 255.255.255.0
set allowaccess https ping ssh
set description "Management side of the VDOM link"
next
end
end
With the VDOMs, physical interfaces, and VDOM links configured, the firewall must now be configured to allow the
proper traffic. Firewalls are configured per-VDOM, and firewall objects and routes must be created for each VDOM
separately.
config vdom
edit Accounting
config firewall policy
edit 1
set name "Accounting-Local-to-Management"
set srcintf port2
set dstintf AccountVlnk0
set srcaddr all
set dstaddr all
set action accept
set schedule always
config vdom
edit Sales
config firewall policy
edit 3
set name "Sales-local-to-Management"
set srcintf port3
set dstintf SalesVlnk0
set srcaddr all
set dstaddr all
set action accept
set schedule always
set service ALL
set nat enable
next
end
next
edit root
config firewall policy
edit 4
set name "Sales-VDOM-to-Internet"
set srcintf SalesVlnk1
set dstintf port1
set srcaddr all
set dstaddr all
set action accept
set schedule always
set service ALL
set nat enable
next
end
next
end
When the inter-VDOM routing has been configured, test the configuration to confirm proper operation. Testing
connectivity ensures that physical networking connections, FortiGate unit interface configurations, and firewall policies
are properly configured.
The easiest way to test connectivity is to use the ping and traceroute commands to confirm the connectivity of
different routes on the network.
Test both from AccountingLocal to the internet and from SalesLocal to the internet.
Software switch
A software switch is a virtual switch that is implemented at the software or firmware level and not at the hardware level. A
software switch can be used to simplify communication between devices connected to different FortiGate interfaces. For
example, using a software switch, you can place the FortiGate interface connected to an internal network on the same
subnet as your wireless interfaces. Then devices on the internal network can communicate with devices on the wireless
network without any additional configuration on the FortiGate unit, such as additional security policies.
A software switch can also be useful if you require more hardware ports for the switch on a FortiGate unit. For example, if
your FortiGate unit has a 4-port switch, WAN1, WAN2, and DMZ interfaces, and you need one more port, you can create
a soft switch that can include the four-port switch and the DMZ interface, all on the same subnet. These types of
applications also apply to wireless interfaces, virtual wireless interfaces, and physical interfaces such as those in
FortiWiFi and FortiAP units.
Similar to a hardware switch, a software switch functions like a single interface. It has one IP address and all the
interfaces in the software switch are on the same subnet. Traffic between devices connected to each interface are not
regulated by security policies, and traffic passing in and out of the switch are controlled by the same policy.
When setting up a software switch, consider the following:
l Ensure that you have a back up of the configuration.
l Ensure that you have at least one port or connection, such as the console port, to connect to the FortiGate unit. If
you accidentally combine too many ports, you need a way to undo errors.
l The ports that you include must not have any link or relation to any other aspect of the FortiGate unit, such as DHCP
servers, security policies, and so on.
l For increased security, you can create a captive portal for the switch to allow only specific user groups access to the
resources connected to the switch.
Some of the difference between software and hardware switches are:
Processing Packets are processed in software by the Packets are processed in hardware by the
CPU. hardware switch controller, or SPU where
applicable.
To add an interface to a software switch, it cannot be referenced by an existing configuration and its IP address must be
set to 0.0.0.0/0.0.0.0.
Example
For this example, the wireless interface (WiFi) needs to be on the same subnet as the DMZ1 interface to facilitate
wireless synchronizing from an iPhone and a local computer. Because synchronizing between two subnets is
problematic, putting both interfaces on the same subnet allows the synchronizing will work. The software switch will
accomplish this.
1. Clear the interfaces and back up the configuration:
a. Ensure the interfaces are not used for other security policy or for other use on the FortiGate unit.
b. Check the WiFi and DMZ1 ports to ensure that DHCP is not enabled and that there are no other dependencies
on these interfaces.
c. Save the current configuration so that it can be recovered if something foes wrong.
2. Merge the WiFi port and DMZ1 port to create a software switch named synchro with an IP address of 10.10.21.12
and administrative access for HTTPS, SSH and PING:
config system switch-interface
edit synchro
set vdom "root"
set type switch
set member dmz1 wifi
next
end
config system interface
edit synchro
set ip 10.10.21.12 255.255.255.0
set allowaccess https ssh ping
next
end
After the switch is set up, you add security policies, DHCP servers, and any other settings that are required.
Hardware switch
A hardware switch is a virtual switch interface that groups different ports together so that the FortiGate can use the group
as a single interface. Supported FortiGate models have a default hardware switch called either internal or lan. The
hardware switch is supported by the chipset at the hardware level.
Ports that are connected to the same hardware switch behave like they are on the same physical switch in the same
broadcast domain. Ports can be removed from a hardware switch and assigned to another switch or used as standalone
interfaces.
Some of the difference between hardware and software switches are:
Processing Packets are processed in hardware by the Packets are processed in software by the
hardware switch controller, or SPU where CPU.
applicable.
3. Select interfaces to add or remove them from the hardware switch, then click Close.
To add an interface to a hardware switch, it cannot be referenced by an existing configuration and its IP address
must be set to 0.0.0.0/0.0.0.0.
4. Click OK.
Removed interfaces will now be listed as standalone interfaces in the Physical Interface section.
To add an interface to a hardware switch, it cannot be referenced by an existing configuration and its IP address must be
set to 0.0.0.0/0.0.0.0.
802.1X is supported under the hardware switch interface on the following NP6 platforms: FG-30xE, FG-40xE, and FG-
110xE.
In this example, port3 and port4 are part of a hardware switch interface. The hardware switch acts as a virtual switch so
that devices can connect directly to these ports and perform 802.1X authentication on the port.
Prerequisites:
4. Click OK.
end
next
end
Zone
Zones are a group of one or more physical or virtual FortiGate interfaces that you can apply security policies to control
inbound and outbound traffic. Grouping interfaces and VLAN subinterfaces into zones simplifies the creation of security
policies where a number of network segments can use the same policy settings and protection profiles.
When you add a zone, you select the names of the interfaces and VLAN subinterfaces to add to the zone. Each interface
still has its own address. Routing is still done between interfaces, that is, routing is not affected by zones. You can use
security policies to control the flow of intra-zone traffic.
For example, in the sample configuration below, the network includes three separate groups of users representing
different entities on the company network. While each group has its own set of ports and VLANs in each area, they can
all use the same security policy and protection profiles to access the Internet. Rather than the administrator making nine
separate security policies, he can make administration simpler by adding the required interfaces to a zone and creating
three policies.
Sample configuration
You can configure policies for connections to and from a zone but not between interfaces in a zone. For this example,
you can create a security policy to go between zone 1 and zone 3, but not between WAN2 and WAN1, or WAN1 and
DMZ1.
To configure a zone to include the internal interface and a VLAN using the CLI:
To configure a firewall policy to allow any interface to access the Internet using the CLI:
Intra-zone traffic
In the zone configuration you can set intrazone deny to prohibit the different interfaces in the same zone to talk to
each other.
For example, if you have ten interfaces in your zone and the intrazone setting is deny. You now want to allow traffic
between a very small number of networks on different interfaces that are part of the zone but you do not want to disable
the intra-zone blocking.
In this example, the zone VLANs are defined as: 192.168.1.0/24, 192.168.2.0/24, ... 192.168.10.0/24.
This policy allows traffic from 192.168.1.x to 192.168.2.x even though they are in the same zone and intra-zone blocking
is enabled. The intra-zone blocking acts as a default deny rule and you have to specifically override it by creating a policy
within the zone.
A virtual wire pair consists of two interfaces that do not have IP addressing and are treated like a transparent mode
VDOM. All traffic received by one interface in the virtual wire pair can only be forwarded to the other interface, provided a
virtual wire pair firewall policy allows this traffic. Traffic from other interfaces cannot be routed to the interfaces in a virtual
wire pair. Redundant and 802.3ad aggregate (LACP) interfaces can be included in a virtual wire pair.
Virtual wire pairs are useful for a typical topology where MAC addresses do not behave normally. For example, port
pairing can be used in a Direct Server Return (DSR) topology where the response MAC address pair may not match the
request’s MAC address pair.
Example
In this example, a virtual wire pair (port3 and port4) makes it easier to protect a web server that is behind a FortiGate
operating as an Internal Segmentation Firewall (ISFW). Users on the internal network access the web server through the
ISFW over the virtual wire pair.
Interfaces used in a virtual wire pair cannot be used to access the ISFW FortiGate. Before
creating a virtual wire pair, make sure you have a different port configured to allow admin
access using your preferred protocol.
next
end
You can create a virtual wire pair policy that includes different virtual wire pairs in NGFW profile and policy mode. This
reduces overhead to create multiple similar policies for each VWP. In NGFW policy mode, multiple virtual wire pairs can
be configured in a Security Virtual Wire Pair Policy and Virtual Wire Pair SSL Inspection & Authentication policy.
The virtual wire pair settings must have wildcard VLAN enabled. When configuring a policy in the CLI, the virtual wire pair
members must be entered in srcintf and dstintf as pairs.
Name test-vwp-1
c. Click OK.
d. Click Create New > Virtual Wire Pair and create another pair with the following settings:
Name test-vwp-2
e. Click OK.
2. Configure the policy:
a. Go to Policy & Objects > Firewall Virtual Wire Pair Policy and click Create New.
b. In the Virtual Wire Pair field, click the + to add test-vwp-1 and test-vwp-2. Select the direction for each of the
selected virtual wire pairs.
PRP (Parallel Redundancy Protocol) is supported in NAT mode for a virtual wire pair. This preserves the PRP RCT
(redundancy control trailer) while the packet is processed by the FortiGate.
The hardware switch ports on FortiGate models that support virtual VLAN switches can be used as a layer 2 switch.
Virtual VLAN switch mode allows 802.1Q VLANs to be assigned to ports, and the configuration of one interface as a
trunk port.
The following FortiGate series are supported in FortiOS 7.0: 60F, 80F, 100E, 100F, 140E, 200F, 300E, 400E, 1100E,
1800F, 2600F, 3000F, 3500F, 4200F, and 4400F.
The virtual-switch-vlan option must be enabled in the CLI to configure VLAN switch mode from the GUI or CLI.
After this setting is enabled, any previously configured hardware switches will appear in the Network > Interfaces page
under VLAN Switch.
Basic configurations
Hardware switch ports can be configured as either a VLAN switch port or a trunk port. The available interfaces and
allowable VLAN IDs that can be used depend on the FortiGate model. It is recommended to remove ports from the
default VLAN switch before you begin configurations.
In this example, two FortiGates in an HA cluster are connected to two ISP routers. Instead of connecting to external L2
switches, each FortiGate connects to each ISP router on the same hardware switch port on the same VLAN. A trunk port
connects the two FortiGates to deliver the 802.1Q tagged traffic to the other. A full mesh between the FortiGate cluster
and the ISP routers is achieved where no single point of failure will cause traffic disruptions.
This example assumes that the HA settings are already configured. The interface and VLAN switch settings are identical
between cluster members and synchronized. See HA using a hardware switch to replace a physical switch on page 1946
for a similar example that does not use a VLAN switch.
4. Configure firewall policies to allow outgoing traffic on the ISP1 and ISP2 interfaces:
config firewall policy
edit 1
set srcintf "port11"
set dstintf "ISP1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
edit 2
set srcintf "port11"
set dstintf "ISP2"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
In this example, two hardware switch ports are assigned VLAN10, and two ports are assigned VLAN20 on FortiGate B.
The wan2 interface is designated as the trunk port, and is connected to the upstream FortiGate A. The corresponding
VLAN subinterfaces VLAN10 and VLAN20 on the upstream FortiGate allow further access to other networks.
The available interfaces and VLAN IDs varies between FortiGate models. The FortiGate B in
this example is a 60F model.
To configure FortiGate B:
To configure FortiGate A:
3. Configure firewall policies that allow traffic from the VLAN10 and VLAN20 interfaces to the internet:
config firewall policy
edit 0
set name "VLAN10-out"
set srcintf "VLAN10"
set dstintf "wan1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
edit 0
set name "VLAN20-out"
set srcintf "VLAN20"
set dstintf "wan1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
When an aggregate or redundant interface goes down, the corresponding fail-alert interface changes to down. When an
aggregate or redundant interface comes up, the corresponding fail-alert interface changes to up.
Fail-detect for aggregate and redundant interfaces can be configured using the CLI.
edit "agg1"
set vdom "root"
set fail-detect enable
set fail-alert-method link-down
set fail-alert-interfaces "port3"
set type aggregate
set member "port1" "port2"
next
end
VLANs can be assigned to VXLAN interfaces. In a data center network where VXLAN is used to create an L2 overlay
network and for multitenant environments, a customer VLAN tag can be assigned to VXLAN interface. This allows the
VLAN tag from VLAN traffic to be encapsulated within the VXLAN packet.
1. Configure VXLAN:
config system vxlan
edit "vxlan1"
set interface port1
set vni 1000
set remote-ip 173.1.1.1
next
end
3. Configure software-switch:
config system switch-interface
edit sw1
set vdom root
set member vlan100 vxlan100
set intra-switch-policy implicit
next
end
1. Configure VXLAN:
config system vxlan
edit "vxlan2"
set interface port25
set vni 1000
set remote-ip 173.1.1.2
next
end
2. Configure system interface:
config system interface
edit vlan100
set vdom root
set vlanid 100
set interface port20
next
edit vxlan100
set type vlan
set vlanid 100
set vdom root
This captures the VXLAN traffic between 172.1.1.1 and 172.1.1.2 with the VLAN 100 tag inside.
QinQ (802.1ad) allows multiple VLAN tags to be inserted into a single frame, and can be configured on supported
FortiGate devices.
In this example, the customer connects to a provider that uses 802.1ad double-tagging to separate their customer
VLANs. The FortiGate connecting to the provider double-tags its frames with an outer provider-tag (S-Tag) and an inner
customer-tag (C-Tag).
The customer identifies itself with the provider-tag (S-Tag) 232 and uses the customer-tag (C-Tag) 444 for traffic to its
VLAN.
1. Configure the interface to the provider that uses the outer tag (S-Tag):
config system interface
edit "vlan-8021ad"
set vdom "root"
set vlan-protocol 8021ad
set device-identification enable
set role lan
set snmp-index 47
2. Configure a dynamic VLAN interface that uses the inner tag (C-Tag):
config system interface
edit "DVLAN"
set vdom "vdom1"
set device-identification enable
set role lan
set snmp-index 48
set interface "vlan-8021ad"
set vlanid 444
next
end
QinQ (802.1Q in 802.1Q) is supported for FortiGate VM models, where multiple VLAN tags can be inserted into a single
frame.
In this example, the FortiGate VM is connected to a provider vSwitch and then a customer switch. The FortiGate
encapsulates the frame with an outer 802.1Q tag of VLAN 100 and an inner 802.1Q tag of VLAN 200; port5 is used as
the physical port. The provider vSwitch strips the outer tag and forwards traffic to the appropriate customer. Then the
customer switch strips the inner tag and forwards the packet to the appropriate customer VLAN.
1. Configure the interface to the provider that uses the outer tag:
config system interface
edit "vlan-8021q"
set vdom "root"
set device-identification enable
set role lan
set interface "port5"
set vlan-protocol 8021q
set vlanid 100
next
end
2. Configure the interface to the provider that uses the inner tag:
config system interface
edit "vlan-qinq8021q"
set vdom "root"
set ip 1.1.1.71 255.255.255.0
set allowaccess ping https ssh snmp http
set device-identification enable
set role lan
set interface "vlan-8021q"
set vlanid 200
next
end
2. Verify the packet capture frame header output captured from the FortiGate's port5:
Frame 2: 106 bytes on wire (848 bits), 106 bytes captured (848 bits)
Ethernet II, Src: VMware_93:ae:8f (00:50:56:93:ae:8f), Dst: VMware_93:e3:72
(00:50:56:93:e3:72)
Destination: VMware_93:e3:72 (00:50:56:93:e3:72)
Source: VMware_93:ae:8f (00:50:56:93:ae:8f)
Type: 802.1Q Virtual LAN (0x8100)
802.1Q Virtual LAN, PRI: 0, DEI: 0, ID: 100
000. .... .... .... = Priority: Best Effort (default) (0)
...0 .... .... .... = DEI: Ineligible
.... 0000 0110 0100 = ID: 100
Type: 802.1Q Virtual LAN (0x8100)
802.1Q Virtual LAN, PRI: 0, DEI: 0, ID: 200
000. .... .... .... = Priority: Best Effort (default) (0)
...0 .... .... .... = DEI: Ineligible
.... 0000 1100 1000 = ID: 200
Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 1.1.1.71, Dst: 1.1.1.72
Internet Control Message Protocol
The outer tag (first tag) is an 802.1Q tag with VLAN ID 100. The inner tag (second tag) is also an 802.1Q tag with
VLAN ID 200.
IPAM (IP address management) is available locally on the FortiGate. A standalone FortiGate, or a Fabric root in the
Security Fabric, can act as the IPAM server. Interfaces configured to be auto-managed by IPAM will receive an address
from the IPAM server's address/subnet pool. DHCP Server is automatically enabled in the GUI, and the address range is
populated by IPAM. Users can customize the address pool subnet and the size of a subnet that an interface can request.
pool-subnet <class IP and Set the IPAM pool subnet, class A or class B subnet.
netmask>
status {enable | disable} Enable/disable IP address management services.
In previous FortiOS versions, the set fortiipam-integration option was configured under config system
global.
The following options are available for allocating the subnet size:
config system interface
set managed-subnetwork-size {32 | 64 | 128 | 256 |512 | 1024 | 2048 | 4096 | 8192 |
16384 | 32768 | 65536}
end
Example
In this example, FGT_AA is the Security Fabric root with IPAM enabled. FGT_BB and FGT_CC are downstream Fabric
devices and retrieve IPAM information from FGT_AA. The Fabric interface on all FortiGates is port2. FGT_AA acts as
the DHCP server, and FGT_BB acts as the DHCP client.
3. In this example, IPAM is not enabled yet. Click Enable IPAM. The Edit Fabric Connector pane opens.
4. Enter the Pool subnet (only class A and B are allowed) and click OK. The root FortiGate is now the IPAM server in
the Security Fabric. The following is configured in the backend:
config system interface
edit "port3"
set vdom "root"
set ip 172.31.0.1 255.255.255.0
set type physical
set device-identification enable
set snmp-index 5
set ip-managed-by-fortiipam enable
end
next
end
IPAM is managing a 172.31.0.0/16 network and assigned port3 a /24 network by default.
The IP/Netmask field in the Address section has been automatically assigned a class C IP by IPAM. The Address
range and Netmask fields in the DHCP Server section have also been automatically configured by IPAM.
5. Click OK.
6. Log in to FGT-BB and set the Addressing Mode of port4 to Auto-Managed by IPAM. The subnet assigned from the
pool on the root is 172.31.1.1/24.
7. Log in to FG_CC and set the Addressing Mode of port34 to Auto-Managed by IPAM. The subnet assigned from the
pool on the root is 172.31.2.1/24.
Any interface on a downstream FortiGate can be managed by the IPAM server. The interface
does not have to be directly connected to the Fabric root FortiGate.
1. Go to Security Fabric > Fabric Connectors and double-click the IP Address Management (IPAM) card.
2. Edit the pool subnet if needed.
3. In the right-side pane, click View Allocated IP Addresses to view the subnet allocations (port34, port3, and port3)
and DHCP lease information. On FGT_BB, port3 is a DHCP client and the DHCP server interface (FGT_AA port3) is
managed by IPAM, so it is displayed in the Manually Configured section.
4. Click OK.
On downstream FortiGates, the settings on the IP Address Management (IPAM) card cannot be changed if IPAM is
enabled on the root FortiGate.
Diagnostics
Changing the maximum transmission unit (MTU) on FortiGate interfaces changes the size of transmitted packets. Most
FortiGate device's physical interfaces support jumbo frames that are up to 9216 bytes, but some only support 9000 or
9204 bytes.
To avoid fragmentation, the MTU should be the same as the smallest MTU in all of the networks between the FortiGate
and the destination. If the packets sent by the FortiGate are larger than the smallest MTU, then they are fragmented,
slowing down the transmission. Packets with the DF flag set in the IPv4 header are dropped and not fragmented .
On many network and endpoint devices, the path MTU is used to determine the smallest MTU and to transmit packets
within that size.
l ASIC accelerated FortiGate interfaces, such as NP6, NP7, and SOC4 (np6xlite), support MTU sizes up to 9216
bytes.
l FortiGate VMs can have varying maximum MTU sizes, depending on the underlying interface and driver.
l Virtual interfaces, such as VLAN interfaces, inherit their MTU size from their parent interface.
To manually test the maximum MTU size on a path, you can use the ping command on a Windows computer.
For example, you can send ICMP packets of a specific size with a DF flag, and iterate through increasing sizes until the
ping fails.
l The -f option specifies the Do not Fragment (DF) flag.
l The -l option specifies the length, in bytes, of the Data field in the echo Request messages. This does not include
the 8 bytes for the ICMP header and 20 bytes for the IP header. Therefore, if the maximum MTU is 1500 bytes, then
the maximum supported data size is: 1500 - 8 - 20 = 1472 bytes.
The second test fails, so the maximum MTU size on the path is 1472 bytes + 8-byte ICMP header + 20-byte IP
header = 1500 bytes
The TCP maximum segment size (MSS) is the maximum amount of data that can be sent in a TCP segment. The MSS is
the MTU size of the interface minus the 20 byte IP header and 20 byte TCP header. By reducing the TCP MSS, you can
effectively reduce the MTU size of the packet.
The TCP MSS can be configured in a firewall policy, or directly on an interface.
One-arm sniffer
You can use a one-arm sniffer to configure a physical interface as a one-arm intrusion detection system (IDS). Traffic
sent to the interface is examined for matches to the configured security profile. The matches are logged, and then all
received traffic is dropped. Sniffing only reports on attacks; it does not deny or influence traffic.
You can also use the one-arm sniffer to configure the FortiGate to operate as an IDS appliance to sniff network traffic for
attacks without actually processing the packets. To configure a one-arm IDS, enable sniffer mode on a physical interface
and connect the interface to the SPAN port of a switch or a dedicated network tab that can replicate the traffic to the
FortiGate.
If the one-arm sniffer option is not available, this means the interface is in use. Ensure that the interface is not selected in
any firewall policies, routes, virtual IPs, or other features where a physical interface is specified. The option also does not
appear it the role is set to WAN. Ensure the role is set to LAN, DMZ, or undefined.
The following table lists some of the one-arm sniffer settings you can configure:
Field Description
Filters Enable this setting to include filters that define a more granular sniff of network
traffic. Select specific hosts, ports, VLANs, and protocols.
In all cases, enter a number or range for the filter type. The standard protocols
are:
l UDP: 17
l TCP: 6
l ICMP: 1
Include IPv6 Packets If the network is running IPv4 and IPv6 addresses, enable this setting to sniff both
types; otherwise, the FortiGate will only sniff IPv4 traffic.
Include Non-IPv6 Packets Enable this setting for a more intense content scan of the traffic.
Security Profiles The following profiles are configurable in the GUI and CLI:
l Antivirus
l Web filter
l Application control
l IPS
l File filter
l DLP
l IPS DoS
Traffic scanned on the one-arm sniffer interface is processed by the CPU, even if there is an SPU, such as NPU or CP,
present. The one-arm sniffer may cause higher CPU usage and perform at a lower level than traditional inline scanning,
which uses NTurbo or CP to accelerate traffic when present.
The absence of high CPU usage does not indicate the absence of packet loss. Packet loss may occur due to the
capacity of the TAP devices hitting maximum traffic volume during mirroring, or on the FortiGate when the kernel buffer
size is exceeded and it is unable to handle bursts of traffic.
Sample configuration
The following example shows how to configure a file filter profile that blocks PDF and RAR files used in a one-arm sniffer
policy.
4. In the Security Profiles section, enable File Filter and click Edit. The Edit File Filter Profile pane opens.
5. In the Rules table, click Create New.
The Integrate Interface option on the Network > Interfaces page helps migrate a physical port into another interface or
interface type such as aggregate, software switch, redundant, zone, or SD-WAN zone. The FortiGate will migrate object
references either by replacing the existing instance with the new interface, or deleting the existing instance based on the
user's choice. Users can also change the VLAN ID of existing VLAN sub-interface or FortiSwitch VLANs.
The interface migration wizard does not support turning an aggregate, software switch,
redundant, zone, or SD-WAN zone interface back into a physical interface.
Integrating an interface
In this example, a DHCP server interface is integrated into a newly created redundant interface, which transfers the
DHCP server to a redundant interface.
To integrate an interface:
Alternatively, select an interface in the list. Then right-click and select Integrate Interface.
4. Select Create an Interface. Enter a name (rd1) and set the Type to Redundant.
5. Click Next. The References sections lists the associated services with options to Replace Instance or Delete Entry.
6. For the DHCP server Action, select Replace Instance and click Create.
7. The migration occurs automatically and the statuses for the object and reference change to Updated entry. Click
Close.
Captive portals
A captive portal is used to enforce authentication before web resources can be accessed. Until a user authenticates
successfully, any HTTP request returns the authentication page. After successfully authenticating, a user can access the
requested URL and other web resources, as permitted by policies. The captive portal can also be configured to only
allow access to members of specific user groups.
Captive portals can be hosted on the FortiGate or an external authentication server. They can be configured on any
network interface, including VLAN and WiFi interfaces. On a WiFi interface, the access point appears open, and the
client can connect to access point with no security credentials, but then sees the captive portal authentication page. See
Captive Portal Security, in the FortiWiFi and FortiAP Configuration Guide for more information.
All users on the interface are required to authenticate. Exemption lists can be created for devices that are unable to
authenticate, such as a printer that requires access to the internet for firmware upgrades.
1. Go to Network > Interfaces and edit the interface that the users connect to. The interface Role must be LAN or
Undefined.
2. Enable Security mode.
User access Select if the portal applies to all users, or selected user groups:
l Restricted to Groups: restrict access to the selected user groups. The
Login page is shown when a user tried to log in to the captive portal.
l Allow all: all users can log in, but access will be defined by relevant
policies. The Disclaimer page is shown when a user tried to log in to the
captive portal.
Customize portal messages Enable to use custom portal pages, then select a replacement message
group. See Captive portals on page 195.
Exempt sources Select sources that are exempt from the captive portal.
Each exemption is added as a rule in an automatically generated exemption
list.
Exempt Select destinations and services that are exempt from the captive portal.
destinations/services Each exemption is added as a rule in an automatically generated exemption
list.
Redirect after Captive Portal Configure website redirection after successful captive portal authentication:
l Original Request: redirect to the initially browsed to URL .
next
end
next
end
Portal pages are HTML files that can be customized to meet user requirements.
Most of the text and some of the HTML in the message can be changed. Tags are enclosed by double percent signs
(%%); most of them should not be changed because they might carry information that the FortiGate unit needs. For
information about customizing replacement messages, see Modifying replacement messages on page 2020.
The images on the pages can be replaced. For example, your organization's logo can replace the Fortinet logo. For
information about uploading and using new images in replacement messages, see Replacement message images on
page 2022.
The following pages are used by captive portals:
Login Failed Page Reports that incorrect credentials were entered, and requests correct credentials.
The %%FAILED_MESSAGE%% tag provides the Firewall authentication failed.
Please try again. text.
Disclaimer Page A statement of the legal responsibilities of the user and the host organization that
the user must agree to before proceeding. This page is shown users that are
trying to log in when User access is set to Allow all.
Declined Disclaimer Page Shown if the user does not agree to the statement on the Disclaimer page. Access
is denied until the user agrees to the disclaimer.
DNS
Domain name system (DNS) is used by devices to locate websites by mapping a domain name to a website’s IP
address.
A FortiGate can serve different roles based on user requirements:
l A FortiGate can control what DNS server a network uses.
l A FortiGate can function as a DNS server.
FortiGuard Dynamic DNS (DDNS) allows a remote administrator to access a FortiGate's Internet-facing interface using a
domain name that remains constant even when its IP address changes.
FortiOS supports DNS configuration for both IPv4 and IPv6 addressing. When a user requests a website, the FortiGate
looks to the configured DNS servers to provide the IP address of the website in order to know which server to contact to
complete the transaction.
The FortiGate queries the DNS servers whenever it needs to resolve a domain name into an IP address, such as for NTP
or web servers defined by their domain names.
The following topics provide information about DNS:
l Important DNS CLI commands on page 198
l DNS domain list on page 200
l FortiGate DNS server on page 201
l DDNS on page 204
l DNS latency information on page 207
l DNS over TLS and HTTPS on page 209
l DNS troubleshooting on page 214
For a FortiGate with multiple logical CPUs, you can set the DNS process number from 1 to the number of logical CPUs.
The default DNS process number is 1.
config system global
set dnsproxy-worker-count <integer>
end
DNS protocols
cache-notfound-responses
When enabled, any DNS requests that are returned with NOT FOUND can be stored in the cache. The DNS server is not
asked to resolve the host name for NOT FOUND entries. By default, this option is disabled.
dns-cache-limit
Set the number of DNS entries that are stored in the cache (0 to 4294967295, default = 5000). Entries that remain in the
cache provide a quicker response to requests than going out to the Internet to get the same information.
dns-cache-ttl
The duration that the DNS cache retains information, in seconds (60 to 86400 (1 day), default = 1800).
VDOM DNS
When the FortiGate is in multi-vdom mode, DNS is handled by the management VDOM. However in some cases,
administrators may want to configure custom DNS settings on a non-management VDOM. For example, in a multi-
tenant scenario, each VDOM might be occupied by a different tenant, and each tenant might require its own DNS server.
config vdom
edit <vdom>
config system vdom-dns
You can configure up to eight domains in the DNS settings using the GUI or the CLI.
When a client requests a URL that does not include an FQDN, FortiOS resolves the URL by traversing through the DNS
domain list and performing a query for each domain until the first match is found.
By default, FortiGate uses FortiGuard's DNS servers:
l Primary: 96.45.45.45
l Secondary: 96.45.46.46
You can also customize the DNS timeout time and the number of retry attempts.
7. Click Apply.
In the following example, the local DNS server has the entry for host1 mapped to the FQDN of host1.sample.com, and
the entry for host2 is mapped to the FQDN of host2.example.com.
The DNS timeout and retry settings can be customized using the CLI.
config system dns
set timeout <integer>
set retry <integer>
end
timeout <integer> The DNS query timeout interval, in seconds (1 - 10, default = 5).
retry <integer> The number of times to retry the DNS query (0 - 5, default - 2).
You can create local DNS servers for your network. Depending on your requirements, you can either manually maintain
your entries (primary DNS server), or use it to refer to an outside source (secondary DNS server).
A local, primary DNS server requires that you to manually add all URL and IP address combinations. Using a primary
DNS server for local services can minimize inbound and outbound traffic, and access time. Making it authoritative is not
recommended, because IP addresses can change, and maintaining the list can become labor intensive.
A secondary DNS server refers to an alternate source to obtain URL and IP address combinations. This is useful when
there is a primary DNS server where the entry list is maintained.
FortiGate as a DNS server also supports TLS and HTTPS connections to a DNS client. See DNS over TLS and HTTPS
on page 209 for details.
By default, DNS server options are not available in the FortiGate GUI.
Example configuration
This section describes how to create an unauthoritative primary DNS server. The interface mode is recursive so that, if
the request cannot be fulfilled, the external DNS servers will be queried.
d. Configure the remaining settings as needed. The options vary depending on the selected Type.
e. Click OK.
11. Add more DNS entries as needed.
12. Click OK.
13. Enable DNS services on an interface:
a. Go to Network > DNS Servers.
b. In the DNS Service on Interface table, click Create New.
c. Select the Interface for the DNS server, such as wan2.
d. Set the Mode to Recursive.
e. Click OK.
DDNS
If your external IP address changes regularly and you want a static domain name, you can configure the external
interface to use a dynamic DNS (DDNS) service. This ensures that external users and customers can always connect to
your company firewall. You can configure FortiGuard as the DDNS server using the GUI or CLI.
A license or subscription is not required to use the DDNS service, but configuring DDNS in the GUI is not supported if:
l The FortiGate model is a 1000-series or higher.
l The FortiGate is a VM.
l The DNS server is not using FortiGuard as the DNS.
Sample topology
In this example, FortiGuard DDNS is enabled and the DDNS server is set to float-zone.com. Other DDNS server options
include fortiddns.com and fortidyndns.com.
6. Click Apply.
To configure the FortiGuard DDNS service as an IPv4 DDNS server in the CLI:
To configure the FortiGuard DDNS service as an IPv6 DDNS server in the CLI:
If you do not have a FortiGuard subscription, or want to use a different DDNS server, you can configure a DDNS server
for each interface. Only the first configure port appears in the GUI.
The available commands vary depending on the selected DDNS server.
To configure an IPv6 DDNS client with generic DDNS on port 3 in the CLI:
When using a public IP that is not assigned to the FortiGate, the FortiGate cannot trigger an update when the IP address
changes. The FortiGate can be configured to refresh DDNS IP addresses by periodically checking the DDNS server at
an update interval.
Disable cleartext
When clear-text is disabled, FortiGate uses the SSL connection to send and receive DDNS updates.
A DHCP server has an override command option that allows DHCP server communications to go through DDNS to
perform updates for the DHCP client. This enforces a DDNS update of the A field every time even if the DHCP client
does not request it. This allows support for the allow, ignore, and deny client-updates options.
Troubleshooting
To debug DDNS:
Not available:
FortiDDNS status:
ddns_ip=0.0.0.0, ddns_ip6=::, ddns_port=443 svr_num=0 domain_num=0
Available:
FortiDDNS status:
ddns_ip=208.91.113.230, ddns_ip6=::, ddns_port=443 svr_num=1 domain_num=3
svr[0]= 208.91.113.230
domain[0]= fortiddns.com
domain[1]= fortidyndns.com
domain[2]= float-zone.com
High latency in DNS traffic can result in an overall sluggish experience for end-users. In the DNS Settings pane, you can
quickly identify DNS latency issues in your configuration.
Go to Network > DNS to view DNS latency information in the right side bar. If you use FortiGuard DNS, latency
information for DNS, DNS filter, web filter, and outbreak prevention servers is also visible. Hover your pointer over a
latency value to see when it was last updated.
To view the latency from web filter and outbreak protection servers using the CLI:
Service : Web-filter
Status : Enable
License : Contract
Service : Antispam
Status : Disable
IP Weight RTT Flags TZ Packets Curr Lost Total Lost Updated Time
173.243.138.194 10 0 DI -8 700 0 2 Tue Jan 22 08:02:44
2019
173.243.138.195 10 0 -8 698 0 4 Tue Jan 22 08:02:44
2019
173.243.138.198 10 0 -8 698 0 4 Tue Jan 22 08:02:44
2019
173.243.138.196 10 0 -8 697 0 3 Tue Jan 22 08:02:44
2019
173.243.138.197 10 1 -8 694 0 0 Tue Jan 22 08:02:44
2019
96.45.33.64 10 22 D -8 701 0 6 Tue Jan 22 08:02:44
2019
64.26.151.36 40 62 -5 704 0 10 Tue Jan 22 08:02:44
2019
64.26.151.35 40 62 -5 703 0 9 Tue Jan 22 08:02:44
2019
209.222.147.43 40 70 D -5 696 0 1 Tue Jan 22 08:02:44
2019
66.117.56.42 40 70 -5 697 0 3 Tue Jan 22 08:02:44
2019
66.117.56.37 40 71 -5 702 0 9 Tue Jan 22 08:02:44
2019
65.210.95.239 40 74 -5 695 0 1 Tue Jan 22 08:02:44
2019
65.210.95.240 40 74 -5 695 0 1 Tue Jan 22 08:02:44
2019
45.75.200.88 90 142 0 706 0 12 Tue Jan 22 08:02:44
2019
45.75.200.87 90 155 0 714 0 20 Tue Jan 22 08:02:44
2019
45.75.200.85 90 156 0 711 0 17 Tue Jan 22 08:02:44
2019
45.75.200.86 90 159 0 704 0 10 Tue Jan 22 08:02:44
2019
62.209.40.72 100 157 1 701 0 7 Tue Jan 22 08:02:44
2019
62.209.40.74 100 173 1 705 0 11 Tue Jan 22 08:02:44
2019
62.209.40.73 100 173 1 699 0 5 Tue Jan 22 08:02:44
2019
121.111.236.179 180 138 9 706 0 12 Tue Jan 22 08:02:44
2019
121.111.236.180 180 138 9 704 0 10 Tue Jan 22 08:02:44
2019
DNS over TLS (DoT) is a security protocol for encrypting and encapsulating DNS queries and responses over the TLS
protocol. DoT increases user privacy and security by preventing eavesdropping and manipulation of DNS data via man-
in-the-middle attacks. Similarly, DNS over HTTPS (DoH) provides a method of performing DNS resolution over a secure
HTTPS connection. DoT and DoH are supported in explicit mode where the FortiGate acts as an explicit DNS server that
listens for DoT and DoH requests. Local-out DNS traffic over TLS and HTTPS is also supported.
Basic configurations for enabling DoT and DoH for local-out DNS queries
Before enabling DoT or DoH, ensure that they are supported by the DNS servers. The legacy FortiGuard DNS servers
(208.91.112.53 and 208.91.112.52) do not support DoT or DoH queries, and will drop these packets. At times, the
latency status of the DNS servers might also appear high or unreachable.
Disabling DoT and DoH is recommended when they are not supported by the DNS servers.
1. Go to Network > DNS Servers.
2. In the DNS Service on Interface section, edit an existing interface, or create a new one.
3. Select a Mode, and DNS Filter profile.
5. Click OK.
Examples
The following examples demonstrate how configure DNS settings to support DoT and DoH queries made to the
FortiGate.
DoT
The following example uses a DNS filter profile where the education category is blocked.
4. Send a DNS query over TLS (this example uses kdig on an Ubuntu client) using the FortiGate as the DNS server.
The www.ubc.ca domain belongs to the education category:
root@client:/tmp# kdig -d @10.1.100.173 +tls +header +all www.ubc.ca
;; DEBUG: Querying for owner(www.ubc.ca.), class(1), type(1), server(10.1.100.173), port
(853), protocol(TCP)
;; DEBUG: TLS, received certificate hierarchy:
;; DEBUG: #1,
C=US,ST=California,L=Sunnyvale,O=Fortinet,OU=FortiGate,CN=FG3H1E5818903681,EMAIL=support
@fortinet.com
;; DEBUG: SHA-256 PIN: Xhkpv9ABEhxDLtWG+lGEndNrBR7B1xjRYlGn2ltlkb8=
;; DEBUG: #2, C=US,ST=California,L=Sunnyvale,O=Fortinet,OU=Certificate
Authority,CN=fortinet-subca2001,[email protected]
;; DEBUG: SHA-256 PIN: 3T8EqFBjpRSkxQNPFagjUNeEUghXOEYp904ROlJM8yo=
;; DEBUG: #3, C=US,ST=California,L=Sunnyvale,O=Fortinet,OU=Certificate
Authority,CN=fortinet-ca2,[email protected]
;; DEBUG: SHA-256 PIN: /QfV4N3k5oxQR5RHtW/rbn/HrHgKpMLN0DEaeXY5yPg=
;; DEBUG: TLS, skipping certificate PIN check
;; DEBUG: TLS, skipping certificate verification
;; TLS session (TLS1.2)-(ECDHE-RSA-SECP256R1)-(AES-256-GCM)
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 56719
;; Flags: qr rd; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 0
;; QUESTION SECTION:
;; www.ubc.ca. IN A
;; ANSWER SECTION:
www.ubc.ca. 60 IN A 208.91.112.55
;; Received 44 B
;; Time 2021-03-12 23:11:27 PST
The IP returned by the FortiGate for ubc.ca belongs to the FortiGuard block page, so the query was blocked
successfully.
DoH
The following example uses a DNS filter profile where the education category is blocked.
DNS troubleshooting
The following diagnose command can be used to collect DNS debug information. If you do not specify worker ID, the
default worker ID is 0.
# diagnose test application dnsproxy
worker idx: 0
1. Clear DNS cache
2. Show stats
3. Dump DNS setting
4. Reload FQDN
5. Requery FQDN
6. Dump FQDN
7. Dump DNS cache
8. Dump DNS DB
9. Reload DNS DB
10. Dump secure DNS policy/profile
11. Dump Botnet domain
12. Reload Secure DNS setting
13. Show Hostname cache
14. Clear Hostname cache
15. Show SDNS rating cache
16. Clear SDNS rating cache
17. DNS debug bit mask
18. DNS debug obj mem
99. Restart dnsproxy worker
FDG_SERVER:96.45.45.220:45
FGD_CATEGORY_VERSION:8
SERVER_LDB: gid=eb19, tz=-480, error_allow=0
FGD_REDIR_V4:208.91.112.55 FGD_REDIR_V6:
This section contains instructions for configuring explicit and transparent proxies.
l Explicit web proxy on page 216
l Transparent proxy on page 220
l FTP proxy on page 218
l Proxy policy addresses on page 222
l Proxy policy security profiles on page 229
l Explicit proxy authentication on page 233
l Transparent web proxy forwarding on page 239
l Upstream proxy authentication in transparent proxy mode on page 242
l Multiple dynamic header count on page 244
l Restricted SaaS access on page 246
l Explicit proxy and FortiSandbox Cloud on page 255
l Proxy chaining on page 257
l WAN optimization SSL proxy chaining on page 262
l Agentless NTLM authentication for web proxy on page 270
l Multiple LDAP servers in Kerberos keytabs and agentless NTLM domain controllers on page 273
l Learn client IP addresses on page 274
l Explicit proxy authentication over HTTPS on page 275
l mTLS client certificate authentication on page 277
l CORS protocol in explicit web proxy when using session-based, cookie-enabled, and captive portal-enabled SAML
authentication on page 283
Explicit web proxy can be configured on FortiGate for proxying HTTP and HTTPS traffic.
To deploy explicit proxy, individual client browsers can be manually configured to send requests directly to the proxy, or
they can be configured to download proxy configuration instructions from a Proxy Auto-Configuration (PAC) file.
When explicit proxy is configured on an interface, the interface IP address can be used by client browsers to forward
requests directly to the FortiGate. FortiGate also supports PAC file configuration.
e. Click Apply.
2. Create an explicit web proxy policy:
a. Go to Policy & Objects > Proxy Policy.
b. Click Create New.
c. Set Proxy Type to Explicit Web and Outgoing Interface to port1.
d. Also set Source and Destination to all, Schedule to always, Service to webproxy, and Action to ACCEPT.
This example creates a basic policy. If required, security profiles can be enabled, and deep
SSL inspection can be selected to inspect HTTPS traffic.
This example creates a basic policy. If required, security profiles can be enabled, and deep
SSL inspection can be selected to inspect HTTPS traffic.
FTP proxy
FTP proxies can be configured on the FortiGate so that FTP traffic can be proxied. When the FortiGate is configured as
an FTP proxy, FTP client applications should be configured to send FTP requests to the FortiGate.
e. Click Apply.
2. Create an explicit FTP proxy policy:
a. Go to Policy & Objects > Proxy Policy.
b. Click Create New.
c. Set Proxy Type to FTP and Outgoing Interface to port1.
d. Also set Source and Destination to all, Schedule to always, and Action to ACCEPT.
This example creates a basic policy. If required, security profiles can be enabled.
next
end
This example creates a basic policy. If required, security profiles can be enabled.
Transparent proxy
In a transparent proxy deployment, the user's client software, such as a browser, is unaware that it is communicating
with a proxy.
Users request internet content as usual, without any special client configuration, and the proxy serves their requests.
FortiGate also allows users to configure in transparent proxy mode.
To redirect HTTPS traffic, SSL inspection is required.
This example creates a basic policy. If required, security profiles can be enabled, and deep
SSL inspection can be selected to inspect HTTPS traffic.
3. No special configuration is required on the client to use FortiGate transparent proxy. As the client is using the
FortiGate as its default gateway, requests will first hit the regular firewall policy, and then be redirected to the
transparent proxy policy.
Proxy addresses are designed to be used only by proxy policies. The following address types are available:
l Host regex match on page 223
l URL pattern on page 223
l URL category on page 224
l HTTP method on page 225
l HTTP header on page 226
l User agent on page 226
l Advanced (source) on page 227
l Advanced (destination) on page 228
The fast policy match function improves the performance of IPv4 explicit and transparent web proxies on FortiGate
devices.
When enabled, after the proxy policies are configured, the FortiGate builds a fast searching table based on the different
proxy policy matching criteria. When fast policy matching is disabled, web proxy traffic is compared to the policies one at
a time from the beginning of the policy list.
Fast policy matching is enabled by default, and can be configured with the following CLI command:
config web-proxy global
set fast-policy-match {enable | disable}
end
In this address type, a user can create a hostname as a regular expression. Once created, the hostname address can be
selected as a destination of a proxy policy. This means that a policy will only allow or block requests that match the
regular expression.
This example creates a host regex match address with the pattern qa.[a-z]*.com.
4. Click OK.
URL pattern
In this address type, a user can create a URL path as a regular expression. Once created, the path address can be
selected as a destination of a proxy policy. This means that a policy will only allow or block requests that match the
regular expression.
This example creates a URL pattern address with the pattern /filetypes/.
4. Click OK.
URL category
In this address type, a user can create a URL category based on a FortiGuard URL ID. Once created, the address can be
selected as a destination of a proxy policy. This means that a policy will only allow or block requests that match the URL
category.
The example creates a URL category address for URLs in the Education category. For more information about
categories, see https://fortiguard.com/webfilter/categories.
For information about creating and using custom local and remote categories, see Web rating override on page 1238
and Threat feeds on page 2386.
l Name to url-category,
4. Click OK.
To see a list of all the categories and their numbers, when editing the address, enter set category ?.
HTTP method
In this address type, a user can create an address based on the HTTP request methods that are used. Multiple method
options are supported, including: CONNECT, DELETE, GET, HEAD, OPTIONS, POST, PUT, and TRACE. Once
created, the address can be selected as a source of a proxy policy. This means that a policy will only allow or block
requests that match the selected HTTP method.
The example creates a HTTP method address that uses the GET method.
next
end
HTTP header
In this address type, a user can create a HTTP header as a regular expression. Once created, the header address can
be selected as a source of a proxy policy. This means that a policy will only allow or block requests where the HTTP
header matches the regular expression.
This example creates a HTTP header address with the pattern Q[A-B].
User agent
In this address type, a user can create an address based on the names of the browsers that are used as user agents.
Multiple browsers are supported, such as Chrome, Firefox, Internet Explorer, and others. Once created, the address can
be selected as a source of a proxy policy. This means that a policy will only allow or block requests from the specified
user agent.
This example creates a user agent address for Google Chrome.
Advanced (source)
In this address type, a user can create an address based on multiple parameters, including HTTP method, User Agent,
and HTTP header. Once created, the address can be selected as a source of a proxy policy. This means that a policy will
only allow or block requests that match the selected address.
This example creates an address that uses the get method, a user agent for Google Chrome, and an HTTP header with
the pattern Q[A-B].
edit 1
set header-name "Header_Test"
set header "Q[A-B]"
next
end
next
end
Advanced (destination)
In this address type, a user can create an address based on URL pattern and URL category parameters. Once created,
the address can be selected as a destination of a proxy policy. This means that a policy will only allow or block requests
that match the selected address.
This example creates an address with the URL pattern /about that are in the Education category. For more information
about categories, see https://fortiguard.com/webfilter/categories.
4. Click OK.
Security profiles must be created before they can be used in a policy, see Security Profiles on
page 1025 for information.
Source all
Destination all
Schedule always
Service webproxy
Action ACCEPT
AntiVirus av
IPS Sensor-1
ICAP default
Transparent proxy
Source all
Destination all
Schedule always
Service webproxy
Action ACCEPT
AntiVirus av
IPS Sensor-1
ICAP default
next
end
FTP proxy
Source all
Destination all
Schedule always
Action ACCEPT
AntiVirus av
IPS Sensor-1
FortiGate supports multiple authentication methods. This topic explains using an external authentication server with
Kerberos as the primary and NTLM as the fallback.
next
end
Since we are using an external authentication server with Kerberos authentication as the primary and NTLM as the
fallback, Kerberos authentication is configured first and then FSSO NTLM authentication is configured.
For successful authorization, the FortiGate checks if user belongs to one of the groups that is permitted in the security
policy.
Name ldap-kerberos
Server IP 172.18.62.220
d. Click OK
2. Define Kerberos as an authentication service. This option is only available in the CLI. For information on generating
a keytab, see Generating a keytab on a Windows server on page 238.
3. Configure FSSO NTLM authentication:
FSSO NTLM authentication is supported in a Windows AD network. FSSO can also provide NTLM authentication
service to the FortiGate unit. When a user makes a request that requires authentication, the FortiGate initiates
NTLM negotiation with the client browser, but does not process the NTLM packets itself. Instead, it forwards all the
NTLM packets to the FSSO service for processing.
a. Go to Security Fabric > External Connectors.
b. Click Create New and select FSSO Agent on Windows AD from the Endpoint/Identity category.
c. Set the Name to FSSO, Primary FSSO Agent to 172.16.200.220, and enter a password.
d. Click OK.
4. Create a user group for Kerberos authentication:
a. Go to User & Authentication > User Groups.
b. Click Create New.
c. Set the Name to Ldap-Group, and Type to Firewall.
d. In the Remote Groups table, click Add, and set the Remote Server to the previously created ldap-kerberos
server.
e. Click OK.
5. Create a user group for NTLM authentication:
For information on generating a keytab, see Generating a keytab on a Windows server on page 238.
3. Configure FSSO NTLM authentication:
config user fsso
edit "1"
set server "172.18.62.220"
set password *********
next
end
Explicit proxy authentication is managed by authentication schemes and rules. An authentication scheme must be
created first, and then the authentication rule.
Create an explicit proxy policy and assign a user group to the policy
To create an explicit proxy policy and assign a user group to it in the GUI:
To create an explicit proxy policy and assign a user group to it in the CLI:
Log in using a domain and system that would be authenticated using the Kerberos server, then enter the diagnose
wad user list CLI command to verify:
# diagnose wad user list
ID: 8, IP: 10.1.100.71, VDOM: vdom1
user name : [email protected]
duration : 389
auth_type : IP
auth_method : Negotiate
pol_id : 1
g_id : 1
user_based : 0
expire : no
LAN:
bytes_in=4862 bytes_out=11893
WAN:
bytes_in=7844 bytes_out=1023
Log in using a system that is not part of the domain. The NTLM fallback server should be used:
# diagnose wad user list
ID: 2, IP: 10.1.100.202, VDOM: vdom1
A keytab is used to allow services that are not running Windows to be configured with service instance accounts in the
Active Directory Domain Service (AD DS). This allows Kerberos clients to authenticate to the service through Windows
Key Distribution Centers (KDCs).
For an explanation of the process, see https://docs.microsoft.com/en-us/windows-server/administration/windows-
commands/ktpass.
For example:
ktpass -princ HTTP/[email protected] -mapuser FGT -pass ***********
-crypto all -ptype KRB5_NT_PRINCIPAL -out fgt.keytab
In FortiOS, there is an option to enable proxy forwarding for transparent web proxy policies and regular firewall policies
for HTTP and HTTPS.
In previous versions of FortiOS, you could forward proxy traffic to another proxy server (proxy chaining) with explicit
proxy. Now, you can forward web traffic to the upstream proxy without having to reconfigure your browsers or publish a
proxy auto-reconfiguration (PAC) file.
Once configured, the FortiGate forwards traffic generated by a client to the upstream proxy. The upstream proxy then
forwards it to the server.
Web traffic over HTTP/HTTPS can be forwarded selectively by the FortiGate's transparent web proxy to an upstream
web proxy to avoid overwhelming the proxy server. Traffic can be selected by specifying the proxy address, which can
be based on a FortiGuard URL category.
The FortiGuard web filter service must be enabled on the downstream FortiGate.
Topology
Forwarding behavior
The forward server will be ignored if the proxy policy matching for a particular session needs the FortiGate to see
authentication information inside the HTTP (plain text) message. For example, assume that user authentication is
required and a forward server is configured in the transparent web proxy, and the authentication method is an active
method (such as basic). When the user or client sends the HTTP request over SSL with authentication information to the
FortiGate, the request cannot be forwarded to the upstream proxy. Instead, it will be forwarded directly to the original
web server (assuming deep inspection and http-policy-redirect are enabled in the firewall policy).
The FortiGate will close the session before the client request can be forwarded if all of the following conditions are met:
l The certificate inspection is configured in the firewall policy that has the http-policy-redirect option enabled.
l A previously authenticated IP-based user record cannot be found by the FortiGate's memory during the SSL
handshake.
l Proxy policy matching needs the FortiGate to see the HTTP request authentication information.
This means that in order to enable user authentication and use webproxy-forward-server in the transparent web
proxy policy at the same time, the following best practices should be followed:
l In the firewall policy that has the http-policy-redirect option enabled, set ssl-ssh-profile to use the
deep-inspection profile.
l Use IP-based authentication rules; otherwise, the webproxy-forward-server setting in the transparent web
proxy policy will be ignored.
l Use a passive authentication method such as FSSO. With FSSO, once the user is authenticated as a domain user
by a successful login, the web traffic from the user's client will always be forwarded to the upstream proxy as long as
the authenticated user remains unexpired. If the authentication method is an active authentication method (such as
basic, digest, NTLM, negotiate, form, and so on), the first session containing authentication information will bypass
the forward server, but the following sessions will be connected through the upstream proxy.
Sample configuration
On the downstream FortiGate proxy, there are two category proxy addresses used in two separate transparent web
proxy policies as the destination address:
l In the policy with upstream_proxy_1 as the forward server, the proxy address category_infotech is used to
match URLs in the information technology category.
l In the policy with upstream_proxy_2 as the forward server, the proxy address category_social is used to
match URLs in the social media category.
A downstream proxy FortiGate that needs to be authenticated by the upstream web proxy can use the basic
authentication method to send its username and password, in the base64 format, to the upstream web proxy for
authentication. If the authentication succeeds, web traffic that is forwarded from the downstream proxy FortiGate to the
upstream proxy can be accepted and forwarded to its destinations.
In this example, a school has a FortiGate acting as a downstream proxy that is configured with firewall policies for each
user group (students and staff). In each policy, a forwarding server is configured to forward the web traffic to the
upstream web proxy.
The username and password that the upstream web proxy uses to authenticate the downstream proxy are configured on
the forwarding server, and are sent to the upstream web proxy with the forwarded HTTP requests.
Username Password
On the downstream FortiGate, configure forwarding servers with the usernames and passwords for authentication on
the upstream web proxy, then apply those servers to firewall policies for transparent proxy. For explicit web proxy, the
forwarding servers can be applied to proxy policies.
When the transparent proxy is configured, clients can access websites without configuring a web proxy in their browser.
The downstream proxy sends the username and password to the upstream proxy with forwarded HTTP requests to be
authenticated.
Multiple dynamic headers are supported for web proxy profiles, as well as Base64 encoding and the append/new
options.
Administrators only have to select the dynamic header in the profile. The FortiGate will automatically display the
corresponding static value. For example, if the administrator selects the $client-ip header, the FortiGate will display
the actual client IP address.
The supported headers are:
2. Configure FSSO:
config user fsso
edit "1"
set server "172.18.62.220"
set password *********
next
end
6. Create a web proxy profile that adds a new dynamic and custom Via header:
config web-proxy profile
edit "test"
set log-header-change enable
config headers
edit 1
set name "client-ip"
set content "$client-ip"
next
edit 2
set name "Proxy-Name"
set content "$proxy_name"
next
edit 3
set name "user"
set content "$user"
next
edit 4
set name "domain"
set content "$domain"
next
edit 5
set name "local_grp"
set content "$local_grp"
next
edit 6
set name "remote_grp"
set content "$remote_grp"
next
edit 7
set name "Via"
set content "Fortigate-Proxy"
next
end
next
end
7. In the proxy policy, append the web proxy profile created in the previous step:
config firewall proxy-policy
edit 1
set proxy explicit-web
set dstintf "port1"
set srcaddr "all"
set dstaddr "all"
set service "web"
set action accept
set schedule "always"
set logtraffic all
set groups "NTLM-FSSO"
set webproxy-profile "test"
set utm-status enable
set av-profile "av"
set webfilter-profile "content"
set ssl-ssh-profile "deep-custom"
next
end
8. Once traffic is being generated from the client, look at the web filter logs to verify that it is working.
The corresponding values for all the added header fields are shown at Log & Report > Web Filter, in the Change
headers section at the bottom of the Log Details pane.
1: date=2019-02-07 time=13:57:24 logid="0344013632" type="utm" subtype="webfilter"
eventtype="http_header_change" level="notice" vd="vdom1" eventtime=1549576642 policyid=1
transid=50331689 sessionid=1712788383 user="TEST21@FORTINETQA" group="NTLM-FSSO"
profile="test" srcip=10.1.100.116 srcport=53278 dstip=172.16.200.46 dstport=80
srcintf="port2" srcintfrole="undefined" dstintf="port1" dstintfrole="undefined" proto=6
service="HTTP" url="http://172.16.200.46/" agent="curl/7.22.0" chgheaders="Added=client-
ip: 10.1.100.116|Proxy-Name: 1.1 100D.qa|user: TEST21|domain: FORTINETQA|local_grp:
NTLM-FSSO|remote_grp: FORTINETQA/FSSO|Via: Fortigate-Proxy"
Large organizations may want to restrict SaaS access to resources like Microsoft Office 365, Google Workspace, and
Dropbox by tenant to block non-company login attempts and secure the users from accessing non-approved cloud
resources. Many cloud vendors enable this by applying tenant restrictions for access control. For example, users
accessing Microsoft 365 applications with tenant restrictions through the corporate proxy will only be allowed to log in as
the company’s tenant and access the organization’s applications.
To implement this, access requests from the clients pass through the company’s web proxy, which inserts headers to
notify the SaaS service to apply tenant restrictions with the permitted tenant list. Users are redirected the SaaS service
login page, and are only allowed to log in if they belong to the permitted tenant list.
For more information, refer to the vendor-specific documentation:
l Office 365: Restrict access to a tenant
l Google Workspace: Block access to consumer accounts
l Dropbox: Network control
Basic configuration
A web proxy profile can specify access permissions for Microsoft Office 365, Google Workspace, and Dropbox by
inserting vendor-defined headers that restrict access to the specific accounts. Custom headers can also be inserted for
any destination. The web proxy profile can then be applied to a firewall policy to control the header's insertion.
To implement Office 365 tenant restriction, Google Workspace account access control, and Dropbox
network access control:
2. Apply the web proxy profile to a policy. SSL deep inspection must be used in the firewall policy:
The following table lists the vendor-specific config headers settings that must be configured in the web proxy profile
(config web-proxy profile):
Tenants.
l Enter the directory ID
for Restrict-
Access-Context.
Due to vendors' changing requirements, these settings may no longer comply with the vendors' official guidelines. See
the vendor documentation for more details.
In this example, a web proxy profile is created to control permissions for Microsoft Office 365 to allow corporate domains
and deny personal accounts, such as Hotmail and Outlook that are accessed through login.live.com.
1. When a user attempts to access login.microsoftonline.com, login.microsoft.com, or login.windows.net, the traffic will
match a proxy inspection mode firewall policy with the assigned web proxy profile.
2. The web proxy profile adds new headers to the customer tenant, indicating the allowed domain and restricted
access for personal accounts. Next, the FortiGate starts a new connection with the Microsoft Office 365 domain
controller including the new headers.
3. The Microsoft Office 365 domain controller assesses this data and will allow or deny this access, then sends a reply
to the FortiGate.
4. The FortiGate sends a reply to the client.
The FortiGate will only indicate the correct domains to be allowed or denied through the headers to Microsoft. The
custom sign-in portal in the browser is generated by Microsoft.
Configuration summary
Ensure that the firewall certificate is installed on the client machines. A company certificate
signed by an internal CA is recommended.
l A web filter profile in proxy mode with static URL filters for the SNI URLs
l A web proxy profile that adds new headers to the customer tenant
l A firewall policy using proxy mode inspection that applies the configured SSL SSL inspection, web filter, and web
proxy profiles
The Restrict-Access-To-Tenants and Restrict-Access-Context headers are inserted for incoming requests
to: login.microsoftonline.com, login.microsoft.com, and login.windows.net, which are part of the Microsoft Office
365 address group.
To restrict access to personal accounts using the login.live.com domain, the sec-Restrict-Tenant-Access-
Policy header is inserted and uses restrict-msa as the header content.
Before configuring the FortiGate, collect the information related to the company domain in the Office 365 contract.
l Restrict-Access-To-Tenants: your <domain.com>
l Restrict-Access-Context: Directory ID
To find the Directory ID related to the domain, locate it in the Azure portal, or use the
whatismytenantid.com open tool.
2. Configure the SSL inspection profile. In this example, the deep-inspection profile is cloned, and the live.com
FQDN is removed from the exemption list.
a. Clone the deep-inspection profile:
config firewall ssl-ssh-profile
clone "deep-inspection" to "Tenant"
end
b. Edit the Tenant profile and remove live.com from the config ssl-exempt list.
3. Configure the URL filter list:
config webfilter urlfilter
edit 1
set name "Auto-webfilter-urlfilter"
config entries
edit 1
set url "login.microsoftonline.com"
set action allow
next
edit 2
set url "login.microsoft.com"
set action allow
next
edit 3
set url "login.windows.net"
set action allow
next
edit 4
set url "login.live.com"
set action allow
next
end
next
end
5. Configure the web proxy profile (enter the header names exactly as shown):
config web-proxy profile
edit "SaaS-Tenant-Restriction"
set header-client-ip pass
set header-via-request pass
set header-via-response pass
set header-x-forwarded-for pass
set header-x-forwarded-client-cert pass
set header-front-end-https pass
set header-x-authenticated-user pass
set header-x-authenticated-groups pass
set strip-encoding disable
set log-header-change disable
config headers
edit 1
set name "Restrict-Access-To-Tenants"
set dstaddr "login.microsoft.com" "login.microsoftonline.com"
"login.windows.net"
set action add-to-request
set base64-encoding disable
set add-option new
set protocol https http
set content <domain>
next
edit 2
set name "Restrict-Access-Context"
set dstaddr "login.microsoftonline.com" "login.microsoft.com"
"login.windows.net"
set action add-to-request
set base64-encoding disable
set add-option new
set protocol https http
set content <directory_ID>
next
edit 3
1. Get a client to log in with their corporate email using the login.microsoftonline.com domain.
4. After the client enters their credentials, a message appears that they cannot access this resource because it is
restricted by the cross-tenant access policy.
To verify the header insertion for corporate domains and personal accounts:
2. After a client attempts to access corporate domains, verify that the header information is sent to the Microsoft Active
Directory:
[I][p:234][s:2481][r:33] wad_dump_fwd_http_req :2567 hreq=0x7fc75f0cd468
Forward request to server:
POST /common/GetCredentialType?mkt=en-US HTTP/1.1
Host: login.microsoftonline.com
Connection: keep-alive
Content-Length: 1961
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="101", "Google Chrome";v="101"
hpgrequestid: d7f706a8-1143-4cdd-ad52-1cc69dc7bb00
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/101.0.4951.54 Safari/537.36
client-request-id: 5c3d196d-5939-45cc-a45b-232b9ed13fce
...
Restrict-Access-To-Tenants: fortinet-us.com
Restrict-Access-Context: ********-****-452f-8535-************
3. After a client attempts to access a personal account, verify that the header information is sent to the Microsoft Active
Directory:
[I][p:234][s:2519][r:34] wad_dump_fwd_http_req :2567 hreq=0x7fc75f0ce6a8
Forward request to server:
GET /oauth20_authorize.srf?client_id=4765445b-32c6-49b0-83e6-
1d93765276ca&scope=openid+profile+https%3a%2f%2fround-lake.dustinice.workers.dev%3a443%2fhttps%2fwww.office.com%2fv2%2fOfficeHome.All&red
irect_uri=https%3a%2f%2fround-lake.dustinice.workers.dev%3a443%2fhttps%2fwww.office.com%2flandingv2&response_type=code+id_
token&state=7tAtndYhcA3132S--UOTyLVEtyIZs8FgndTpeYM9mJ1EeA-
X5nfqrSalnnPH41cHxfHGug6N5cbliK676v6xZgszgH_
JARVKrptZwBvjI2cbnZ4mttYNNdK1FTlbEtu5VBjgtBOX2u6v3F_
9g7UikCpGTnBRGhvO2pyTndT3EEIyAHvhg9LsKRtY3kxce8dQkfk1iDjLcc3q-01r4rpxSx2xZSbwg_
KkAN3kCRQ9uLfE0ziHAcpvunuKmzGBWKnBhC4sJJkXrMEfXwCg4nsOjg&response_mode=form_
post&nonce=637877163655610380.MjNjZmM4NzQtOTU5My00OGZlLTk0NTItZTE5NDU2YjVlODdjNjViOTQwYm
UtOTZlMS00M2Y5LTkyN2MtN2QyMjgwNjcxY2Uz&x-client-SKU=ID_NETSTANDARD2_0&x-client-
Ver=6.12.1.0&uaid=5c3d196d593945cca45b232b9ed13fce&msproxy=1&issuer=mso&tenant=common&u
i_locales=en-US&epct=AQABAAAAAAD--DLA3VO7QrddgJg7WevrfA6SLaDsJUcjb1Bg9OKonF3d_
lfNJsdDAIH5hlJdUSGejEBIqsko-A7JX67PzaGdEJgOIGa37VhJzGTYBZ-KgATe9FHssnNmLjM_
dojr0dAT83xDhiqQTN2-UcYdcP2s3vPainF7Nqes5ecXRaEoE9Vw9-
sN7jfASOkPRWW03aI6buz0niABvA860YOWDb98vdJWPGkWE-euDr6n8_
zI5iAA&jshs=0&username=****************%40outlook.com&login_
hint=***************%40outlook.com HTTP/1.1
Host: login.live.com
Connection: keep-alive
...
Referer: https://login.microsoftonline.com/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
sec-Restrict-Tenant-Access-Policy: restrict-msa
Explicit proxy connections can leverage FortiSandbox Cloud for advanced threat scanning and updates. This allows
FortiGates behind isolated networks to connect to FortiCloud services.
Proxy chaining
For the explicit web proxy you can configure web proxy forwarding servers to use proxy chaining to redirect web proxy
sessions to other proxy servers. Proxy chaining can be used to forward web proxy sessions from the FortiGate unit to
one or more other proxy servers on your network or on a remote network. You can use proxy chaining to integrate the
FortiGate explicit web proxy with a web proxy solution that you already have in place.
A FortiGate unit can forward sessions to most web proxy servers including a remote FortiGate unit with the explicit web
proxy enabled. No special configuration of the explicit web proxy on the remote FortiGate unit is required.
You can deploy the explicit web proxy with proxy chaining in an enterprise environment consisting of small satellite
offices and a main office. If each office has a FortiGate unit, users at each of the satellite offices can use their local
FortiGate unit as an explicit web proxy server. The satellite office FortiGate units can forward explicit web proxy sessions
to an explicit web proxy server at the central office. From here the sessions can connect to web servers on the Internet.
FortiGate proxy chaining does not support web proxies in the proxy chain authenticating each other.
The following examples assume explicit web proxy has been enabled.
Proxy Address Type Select the type of IP address of the forwarding server. A forwarding server can
have an FQDN or IP address.
Port Enter the port number on which the proxy receives connections. Traffic leaving
the FortiGate explicit web proxy for this server has its destination port number
changed to this number.
Server Down Action Select the action the explicit web proxy will take if the forwarding server is
down.
l Block: Blocks the traffic if the remote server is down.
l Use Original Server: Forwards the traffic from the FortiGate to its
4. Click OK.
Example
The following example adds a web proxy forwarding server named fwd-srv at address proxy.example.com and port
8080.
By default, a FortiGate unit monitors a web proxy forwarding server by forwarding a connection to the remote server
every 10 seconds. The remote server is assumed to be down if it does not respond to the connection. FortiGate
continues checking the server. The server is assumed to be back up when the server sends a response. If you enable
health checking, the FortiGate unit attempts to get a response from a web server every 10 seconds by connecting
through the remote forwarding server.
You can configure health checking for each remote server and specify a different website to check for each one.
If the remote server is found to be down you can configure the FortiGate unit to block sessions until the server comes
back up or to allow sessions to connect to their destination, bypassing the remote forwarding server. You cannot
configure the FortiGate unit to fail over to another remote forwarding server.
Server Down Action Select the action the explicit web proxy will take if the forwarding server is
down.
l Block: Blocks the traffic if the remote server is down.
l Use Original Server: Forwards the traffic from the FortiGate to its
4. Click OK.
Example
The following example enables health checking for a web proxy forwarding server and sets the server down option to
bypass the forwarding server if it is down.
You can add multiple web proxy forwarding servers to a forwarding server group and then add the server group to an
explicit web proxy policy instead of adding a single server. Forwarding server groups are created from the FortiGate CLI
but can be added to policies from the web-based manager (or from the CLI).
When you create a forwarding server group you can select a load balancing method to control how sessions are load
balanced to the forwarding servers in the server group. Two load balancing methods are available:
l Weighted load balancing sends more sessions to the servers with higher weights. You can configure the weight for
each server when you add it to the group.
l Least-session load balancing sends new sessions to the forwarding server that is processing the fewest sessions.
When you create a forwarding server group you can also enable affinity. Enable affinity to have requests from the same
client processed by the same server. This can reduce delays caused by using multiple servers for a single multi-step
client operation. Affinity takes precedence over load balancing.
You can also configure the behavior of the group if all of the servers in the group are down. You can select to block traffic
or you can select to have the traffic pass through the FortiGate explicit proxy directly to its destination instead of being
sent to one of the forwarding servers.
Example
The following example adds a forwarding server group that uses weighted load balancing to load balance traffic to three
forwarding servers. Server weights are configured to send most traffic to server2. The group has affinity enabled
and blocks traffic if all of the forward servers are down.
You can enable proxy chaining for web proxy sessions by adding a web proxy forwarding server or server group to an
explicit web proxy policy. In a policy you can select one web proxy forwarding server or server group. All explicit web
proxy traffic accepted by this security policy is forwarded to the specified web proxy forwarding server or server group.
1. Go to Policy & Objects > Proxy Policy and click Create New.
2. Configure the policy settings:
Source Internal_subnet
Destination all
Schedule always
Service webproxy
Action Accept
3. Enable Web Proxy Forwarding Server and select the forwarding server, (for example,fwd-srv).
4. Click OK.
Example
The following example adds a security policy that allows all users on the 10.31.101.0 subnet to use the explicit web
proxy for connections through the wan1 interface to the Internet. The policy forwards web proxy sessions to a remote
forwarding server named fwd-srv.
A FortiGate can handle TLS 1.3 traffic in both deep and certificate inspection modes.
Example
The following example demonstrates that the Squid server and the FortiGate can handle TLS 1.3 traffic.
The following output from the Squid server demonstrates that the FortiGate supports TLS 1.3 traffic and forwards the
hello retry request back to the client PC. The client PC then sends the client hello again, and the connection is
successfully established.
An SSL server does not need to be defined for WAN optimization (WANOpt) SSL traffic offloading (traffic acceleration).
The server side FortiGate uses an SSL profile to resign the HTTP server's certificate, both with and without an external
proxy, without an SSL server configured. GCM and ChaCha ciphers can also be used in the SSL connection.
Examples
In these examples, HTTPS traffic is accelerated without configuring an SSL server, including with a proxy in between,
and when the GCM or ChaCha ciphers are used.
Example 1
In this example, the server certificate is resigned by the server side FortiGate, and HTTPS traffic is accelerated without
configuring an SSL server.
HTTPS traffic with the GCM or ChaCha cipher can pass though WANOpt tunnel.
To configure FGT_A:
4. Configure a firewall policy in proxy mode with WANOpt enabled and the WANOpt profile selected:
config firewall policy
edit 1
set name "WANOPT-A"
To configure FGT_D:
3. Create an SSL profile with deep inspection on HTTPS port 443. The default Fortinet_CA_SSL certificate is used to
resign the server certificate:
config firewall ssl-ssh-profile
edit "ssl"
config https
set ports 443
set status deep-inspection
end
next
end
4. Configure a firewall policy in proxy mode with WANOpt enabled and passive WANOpt detection:
config firewall policy
edit 1
set name "WANOPT-B"
set srcintf "port27"
set dstintf "port23"
set action accept
set srcaddr "all"
1. On the client PC, curl a 10MB test sample for the first time:
root@client:/tmp# curl -k https://172.16.200.144/test_10M.pdf -O
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9865k 100 9865k 0 0 663k 0 0:00:14 0:00:15 --:--:-- 1526k
The tunnel bytes are mostly unchanged, but the LAN bytes are doubled. This means that the bytes of the second
curl come from the cache, showing that the traffic is accelerated.
To confirm that a curl using the GCM cipher is accepted and accelerated:
1. On the client PC, curl a 10MB test sample with the GCM cipher:
root@client:/tmp# curl -v -k --ciphers DHE-RSA-AES128-GCM-SHA256
https://172.16.200.144/test_10M.pdf -O
* Trying 172.16.200.144...
* TCP_NODELAY set
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0*
Connected to 172.16.200.144 (172.16.200.144) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: DHE-RSA-AES128-GCM-SHA256
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [100 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [1920 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [783 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [262 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
To confirm that a curl using the ChaCha cipher is accepted and accelerated:
1. On the client PC, curl a 10MB test sample with the ChaCha cipher:
root@client:/tmp# curl -v -k --ciphers ECDHE-RSA-CHACHA20-POLY1305
https://172.16.200.144/test.doc -O
* Trying 172.16.200.144...
* TCP_NODELAY set
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0*
Connected to 172.16.200.144 (172.16.200.144) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ECDHE-RSA-CHACHA20-POLY1305
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
Example 2
To reconfigure FGT_A:
To reconfigure FGT_D:
1. Configure a new firewall policy for traffic passing from port27 to port29:
config firewall policy
edit 1
set name "WANOPT-B"
set srcintf "port27"
set dstintf "port29"
set action accept
set srcaddr "all"
set dstaddr "all"
set schedule "always"
set service "ALL"
set utm-status enable
set inspection-mode proxy
set wanopt enable
set wanopt-detection passive
set nat enable
next
end
1. On the client PC, curl the same 10MB test sample through the explicit proxy:
root@client:/tmp# curl -x 100.100.100.174:8080 -v -k https://172.16.200.144/test_10M.pdf
-O
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9865k 100 9865k 0 0 663k 0 0:00:01 0:00:01 --:--:-- 1526k
Agentless Windows NT LAN Manager (NTLM) authentication includes support for the following items:
l Multiple servers
l Individual users
You can use multiple domain controller servers for the agentless NTLM. They can be used for load balancing and high
service stability.
You can also use user-based matching in groups for Kerberos and agentless NTLM. In these scenarios, FortiOS
matches the user's group information from an LDAP server.
To support multiple domain controllers for agentless NTLM using the CLI:
This configuration uses a round-robin method. When the first user logs in, the FortiGate sends the authentication
request to the first domain controller. Later when another user logs in, the FortiGate sends the authentication
request to another domain controller.
5. Verify the behavior after the user successfully logs in:
# diagnose wad user list
ID: 1825, IP: 10.1.100.71, VDOM: vdom1
user name : test1
duration : 497
auth_type : Session
auth_method : NTLM
pol_id : 1 g_id : 5
user_based : 0 e
xpire : 103
LAN:
bytes_in=2167 bytes_out=7657
WAN:
bytes_in=3718 bytes_out=270
This implementation lets you configure a single user instead of a whole group. The FortiGate will now allow the user
named test1.
Multiple LDAP servers in Kerberos keytabs and agentless NTLM domain controllers
Multiple LDAP servers can be configured in Kerberos keytabs and agentless NTLM domain controllers for multi-forest
deployments.
To use multiple LDAP servers in Kerberos keytabs and agentless NTLM domain controllers:
Learning the actual client IP addresses is imperative for authorization. This function identifies the real client IP address
when there is a NATing device between the FortiGate and the client.
config web-proxy global
set learn-client-ip {enable | disable}
set learn-client-ip-from-header {true-client-ip | x-real-ip | x-forwarded-for}
set learn-client-ip-srcaddr <address> ... <address>
end
Example
In this example, the real client IP address is used to match a policy for FSSO authentication.
When a HTTP request requires authentication in an explicit proxy, the authentication can be redirected to a secure
HTTPS captive portal. Once authentication is complete, the client can be redirected back to the original destination over
HTTP.
Example
A user visits a website via HTTP through the explicit web proxy on a FortiGate. The user is required to authenticate by
either basic or form IP-based authentication for the explicit web proxy service. The user credentials need to be
transmitted over the networks in a secured method over HTTPS rather than in plain text. The user credentials are
protected by redirecting the client to a captive portal of the FortiGate over HTTPS for authentication where the user
credentials are encrypted and transmitted over HTTPS.
In this example, explicit proxy authentication over HTTPS is configured with form IP-based authentication. Once
configured, you can enable authorization for an explicit web proxy by configuring users or groups in the firewall proxy
policy.
6. Configure a firewall proxy policy with users or groups (see Explicit web proxy on page 216).
Verification
When a client visits a HTTP website, the client will be redirected to the captive portal for authentication by HTTPS. For
example, the client could be redirected to a URL by a HTTP 303 message similar to the following:
HTTP/1.1 303 See Other
Connection: close
Content-Type: text/html
Cache-Control: no-cache
Location:
https://fgt.fortinetqa.local:7831/XX/YY/ZZ/cpauth?scheme=http&4Tmthd=0&host=172.16.200.46&port=80&rule=75&uri
=Lw==&
Content-Length: 0
The captive portal URL used for authentication is https://fgt.fortinetqa.local:7831/.... Once the authentication is complete
with all user credentials protected by HTTPS, the client is redirected to the original HTTP website they intended to visit.
FortiGate supports client certificate authentication used in mutual Transport Layer Security (mTLS) communication
between a client and server. Clients are issued certificates by the CA, and an access proxy configured on the FortiGate
uses the new certificate method in the authentication scheme to identify and approve the certificate provided by the client
when they try to connect to the access proxy. The FortiGate can also add the HTTP header X-Forwarded-Client-Cert to
forward the certificate information to the server.
Examples
Example 1
In this example, clients are issued unique client certificates from your CA. The FortiGate authenticates the clients by their
user certificate before allowing them to connect to the access proxy. The access server acts as a reverse proxy for the
web server that is behind the FortiGate.
This example assumes that you have already obtained the public CA certificate from your CA, the root CA of the client
certificate has been imported (CA_Cert_1), and the client certificate has been distributed to the endpoints.
1. Configure user authentication. Both an authentication scheme and rule must be configured, as the authentication is
applied on the access proxy:
config authentication scheme
edit "mtls"
set method cert
set user-cert enable
next
end
config authentication rule
edit "mtls"
set srcintf "port2"
set srcaddr "all"
set dstaddr "all"
set active-auth-method "mtls"
next
end
3. Configure the users. Users can be matched based on either the common-name on the certificate or the trusted
issuer.
l Verify the user based on the common name on the certificate:
config user certificate
edit "single-certificate"
set type single-certificate
set common-name "client.fortinet.com"
next
end
4. Configure the access proxy VIP. The SSL certificate is the server certificate that is presented to the user as they
connect:
5. Configure the access proxy policy, including the real server to be mapped. To request the client certificate for
authentication, client-cert is enabled:
config firewall access-proxy
edit "mTLS-access-proxy"
set vip "mTLS"
set client-cert enable
set empty-cert-action accept
config api-gateway
edit 1
config realservers
edit 1
set ip 172.16.200.44
next
end
next
end
next
end
6. Configure the firewall policy to allow the client to connect to the access proxy:
config firewall policy
edit 1
set srcintf "port2"
set dstintf "any"
set action accept
set srcaddr "all"
set dstaddr "mTLS"
set schedule "always"
set service "ALL"
set inspection-mode proxy
set logtraffic all
set nat enable
next
end
7. Configure the proxy policy to apply authentication and the security profile, selecting the appropriate user object
depending on the user type:
config firewall proxy-policy
edit 3
set proxy access-proxy
set access-proxy "mTLS-access-proxy"
set srcintf "port2"
set srcaddr "all"
set dstaddr "all"
1. In a web browser, access the VIP address. This example uses Chrome.
2. When prompted, select the client certificate, then click OK.
Example 2
In this example, the same configuration as in Example 1 is used, with a web proxy profile added to enable adding the
client certificate to the HTTP header X-Forwarded-Client-Cert. The header is then forwarded to the server.
1. Repeat steps 1 to 6 of Example 1, using the common name on the certificate to verify the user.
2. Configure a web proxy profile that adds the HTTP x-forwarded-client-cert header in forwarded requests:
config web-proxy profile
edit "mtls"
set header-x-forwarded-client-cert add
next
end
3. Configure the proxy policy to apply authentication, the security profile, and web proxy profile:
config firewall proxy-policy
edit 3
set uuid af5e2df2-c321-51eb-7d5d-42fa58868dcb
set proxy access-proxy
set access-proxy "mTLS-access-proxy"
set srcintf "port2"
set srcaddr "all"
The WAD debug shows that the FortiGate adds the client certificate information to the HTTP header. The added header
cannot be checked using the sniffer, because the FortiGate encrypts the HTTP header to forward it to the server.
1. Enable WAD debug on all categories:
# diagnose wad debug enable category all
GET / HTTP/1.1
Host: 10.1.100.200
User-Agent: curl/7.68.0
Accept: */*
l When the FortiGate adds the client certificate in to the HTTP header and forwards the client HTTP request:
[0x7fc8d4bc4910] Forward request to server:
GET / HTTP/1.1
Host: 172.16.200.44
User-Agent: curl/7.68.0
Accept: */*
X-Forwarded-Client-Cert: -----BEGIN CERTIFICATE-----
MIIFXzCCA0egAwI...aCFHDHlR+wb39s=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIFpTCCA42gAwI...OtDtetkNoFLbvb
-----END CERTIFICATE-----
The FortiGate explicit web proxy supports the Cross-Origin Resource Sharing (CORS) protocol, which allows the
FortiGate to process a CORS preflight request and an actual CORS request properly, in addition to a simple CORS
request when using session-based, cookie-enabled, and captive portal-enabled SAML authentication. This allows a
FortiGate explicit web proxy user with this specific configuration to properly view a web page requiring CORS with
domains embedded in it other than its own domain.
The client sends the initial CORS preflight request (OPTIONS with the origin header) to the web server through
FortiGate's web proxy and receives a CORS 200 OK response (with headers, such as Access-Control-Allow-
Origin). The FortiGate will not redirect the client to the captive capital for authentication:
> OPTIONS /bidRequest HTTP/1.1
> Host: c2shb.pubgw.yahoo.com
> User-Agent: curl/7.61.1
> Accept: */*
> Access-Control-Request-Method: GET
> Access-Control-Request-Headers: content-type,x-openrtb-version
> Origin: https://www.cnn.com
...
< HTTP/1.1 200 OK
< Date: Thu, 19 May 2022 01:49:17 GMT
< Content-Length: 0
< Server: ATS/9.1.0.46
< Access-Control-Allow-Origin: https://www.cnn.com
< Access-Control-Allow-Methods: GET,POST,OPTIONS
< Access-Control-Allow-Headers: X-Requested-With,Content-Type,X-Openrtb-Version
< Access-Control-Allow-Credentials: true
< Access-Control-Max-Age: 600
< Age: 0
< Connection: keep-alive
< Set-Cookie: A3=d=AQABBB2ihWICEIUyD_Du5ol8tMdKKWxspR8FEgEBAQHzhmKPYgAAAAAA_
eMAAA&S=AQAAAlU0dAheQx6euvcPs8ErK4I; Expires=Fri, 19 May 2023 07:49:17 GMT; Max-
Age=31557600; Domain=.yahoo.com; Path=/; SameSite=None; Secure; HttpOnly
Once the initial preflight request for the client is successful, the client sends the real CORS request (GET request with
origin header) to the FortiGate, The FortiGate then replies with a 30x response to redirect the client to the captive portal.
The 30x response includes CORS headers such as Access-Control-Allow-Origin:
> GET /bidRequest HTTP/1.1
> Host: c2shb.pubgw.yahoo.com
> User-Agent: curl/7.61.1
> Accept: */*
> Origin: https://www.cnn.com
...
Once the client's real CORS request is redirected to the captive portal, the client senda another preflight to the captive
portal. The captive portal then replies with a 20x response, which includes CORS headers such as Access-Control-
Allow-Origin:
> OPTIONS
/test/saml/login/?cptype=ckauth&scheme=https&4Tmthd=1&host=gql.reddit.com&port=443&rule=98&u
ri=Lw==&cdata=pqWlpQM5dcCnpaWliqWlpcjEwszGmJbGksbAk5WTl8aTwJDGnJ2Tl52QxpHDkYPW18aYlJWLlIuUlZ
WLlJGWpQ== HTTP/1.1
> Host: fgt9.myqalab.local:7831
> Connection: keep-alive
> Accept: */*
> Access-Control-Request-Method: GET
> Access-Control-Request-Headers: authorization,content-type,x-reddit-compression,x-reddit-
loid,x-reddit-session
> Origin: null
> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36
> Sec-Fetch-Mode: cors
> Sec-Fetch-Site: cross-site
> Sec-Fetch-Dest: empty
> Referer: https://www.reddit.com/
> Accept-Encoding: gzip, deflate, br
> Accept-Language: en-US,en;q=0.9
...
< HTTP/1.1 204 No Content
< Access-Control-Max-Age: 86400
< Access-Control-Allow-Methods: GET
< Access-Control-Allow-Headers: authorization,content-type,x-reddit-compression,x-reddit-
loid,x-reddit-session
< Access-Control-Allow-Origin: null
< Access-Control-Allow-Credentials: true
If a simple CORS request (no preflight request sent before it) is used, when the FortiGate receives the simple request, it
replies with a 30x response that includes CORS headers, such as Access-Control-Allow-Origin:
DHCP server
A DHCP server leases IP addresses from a defined address range to clients on the network that request dynamically
assigned addresses.
A DHCP server can be in server or relay mode. In server mode, you can define one or more address ranges it assigns
addresses from, and options such as the default gateway, DNS server, lease time, and other advanced options. In relay
mode, the interface forwards DHCP requests from DHCP clients to an external DHCP server and returns the responses
to the DHCP clients. The DHCP server must have appropriate routing so that its response packets to the DHCP clients
arrive at the unit.
l DHCP options on page 289
l IP address assignment with relay agent information option on page 290
l DHCP client options on page 292
2. On the DHCP server settings for the interface, set the status to disable:
config system dhcp server
edit 17
set status disable
set dns-service default
set default-gateway 10.1.1.5
set netmask 255.255.255.0
set interface "port2"
next
end
A FortiGate interface can be configured to work in DHCP server mode to lease out addresses, and at the same time
relay the DHCP packets to another device, such as a FortiNAC to perform device profiling.
The DHCP message to be forwarded to the relay server under the following conditions:
l dhcp-relay-request-all-server is enabled
l Message type is either DHCPDISCOVER or DHCPINFORM
l Client IP address in client message is 0
l Server ID is NULL in the client message
l Server address is a broadcast address (255.255.255.255)
l Server address is 0
DHCP options
When adding a DHCP server, you can include DHCP codes and options. The DHCP options are BOOTP vendor
information fields that provide additional vendor-independent configuration parameters to manage the DHCP server. For
example, you might need to configure a FortiGate DHCP server that gives out a separate option as well as an IP
address, such as an environment that needs to support PXE boot with Windows images.
The option numbers and codes are specific to the application. The documentation for the application indicates the values
to use. Option codes are represented in a option value/HEX value pairs. The option is a value between 1 and 255.
You can add up to three DHCP code/option pairs per DHCP server.
For detailed information about DHCP options, see RFC 2132, DHCP Options and BOOTP Vendor Extensions.
Option 82
The DHCP relay agent information option (option 82 in RFC 3046) helps protect the FortiGate against attacks such as
spoofing (forging) of IP addresses and MAC addresses, and DHCP IP address starvation.
This option is disabled by default. However, when dhcp-relay-service is enabled, dhcp-relay-agent-option
becomes enabled.
See IP address assignment with relay agent information option on page 290 for an example.
Option 42
Option 82 (DHCP relay information option) helps protect the FortiGate against attacks such as spoofing (or forging) of IP
and MAC addresses, and DHCP IP address starvation.
The following CLI variables are included in the config system dhcp server > config reserved-address
command:
8. Click OK.
When an interface is in DHCP addressing mode, DHCP client options can be configured in the CLI. For example, a
vendor class identifier (usually DCHP client option 60) can be specified so that a request can be matched by a specific
DHCP offer.
Multiple options can be configured, but any options not recognized by the DHCP server are discarded.
Variable Description
code <integer> DHCP client option code (0 - 255, default = 0).
See Dynamic Host Configuration Protocol (DHCP) and Bootstrap Protocol
(BOOTP) Parameters for a list of possible options.
type {hex | string | ip | DHCP client option type (default = hex).
fqdn}
value <string> DHCP client option value.
ip <ip> DHCP client option IP address. This option is only available when type is ip.
Static routing
Static routing is one of the foundations of firewall configuration. It is a form of routing in which a device uses manually-
configured routes. In the most basic setup, a firewall will have a default route to its gateway to provide network access. In
a more complex setup with dynamic routing, ADVPN, or SD-WAN involved, you would still likely find static routes being
deployed.
This section explores concepts in using static routing and provides examples in common use cases:
l Routing concepts on page 294
l Policy routes on page 306
l Equal cost multi-path on page 308
l Dual internet connections on page 312
The following topics include additional information about static routes:
l Deploying the Security Fabric on page 2174
l Security Fabric over IPsec VPN on page 2195
l Adding a static route on page 480
l NAT mode on page 1902
l NAT and transparent mode on page 1911
Routing concepts
Default route
The default route has a destination of 0.0.0.0/0.0.0.0, representing the least specific route in the routing table. It is
a catch all route in the routing table when traffic cannot match a more specific route. Typically this is configured with a
static route with an administrative distance of 10. In most instances, you will configure the next hop interface and the
gateway address pointing to your next hop. If your FortiGate is sitting at the edge of the network, your next hop will be
your ISP gateway. This provides internet access for your network.
Sometimes the default route is configured through DHCP. On some desktop models, the WAN interface is preconfigured
in DHCP mode. Once the WAN interface is plugged into the network modem, it will receive an IP address, default
gateway, and DNS server. FortiGate will add this default route to the routing table with a distance of 5, by default. This
will take precedence over any default static route with a distance of 10. Therefore, take caution when you are configuring
an interface in DHCP mode, where Retrieve default gateway from server is enabled. You may disable it and/or change
the distance from the Network > Interfaces page when you edit an interface.
Dynamic Gateway When enabled, a selected DHCP/PPPoE interface will automatically retrieve
its dynamic gateway.
Destination l Subnet
Enter the destination IP address and netmask. A value of
0.0.0.0/0.0.0.0 creates a default route.
l Named Address
Select an address or address group object. Only addresses with static
route configuration enabled will appear on the list. This means a
geography type address cannot be used.
l Internet Service
Select an Internet Service. These are known IP addresses of popular
services across the Internet.
Interface Select the name of the interface that the static route will connect through.
Gateway Address Enter the gateway IP address. When selecting an IPsec VPN interface or SD-
WAN creating a blackhole route, the gateway cannot be specified.
Administrative Distance Enter the distance value, which will affect which routes are selected first by
different protocols for route management or load balancing. The default is 10.
Advanced Options Optionally, expand Advanced Options and enter a Priority. When two routes
have an equal distance, the route with a lower priority number will take
precedence. The default is 0.
3. Click OK.
You can configure FQDN firewall addresses as destination addresses in a static route, using either the GUI or the CLI.
In the GUI, to add an FQDN firewall address to a static route in the firewall address configuration, enable the Static
Route Configuration option. Then, when you configure the static route, set Destination to Named Address.
Routing table
A routing table consists of only the best routes learned from the different routing protocols. The most specific route
always takes precedence. If there is a tie, then the route with a lower administrative distance will be injected into the
routing table. If administrative distances are also equal, then all the routes are injected into the routing table, and Cost
and Priority become the deciding factors on which a route is preferred. If these are also equal, then FortiGate will use
Equal cost multi-path on page 308 to distribute traffic between these routes.
You can view routing tables in the FortiGate GUI under Dashboard > Network > Static & Dynamic Routing by default.
Expand the widget to see the full page. Additionally, if you want to convert the widget into a dashboard, click on the Save
as Monitor icon on the top right of the page.
You can also monitor policy routes by toggling from Static & Dynamic to Policy on the top right corner of the page. The
active policy routes include policy routes that you created, SD-WAN rules, and Internet Service static routes. It also
supports downstream devices in the Security Fabric.
The following figure show an example of the static and dynamic routes in the Routing Monitor:
To view more columns, right-click on the column header to select the columns to be displayed:
Field Description
Network The IP addresses and network masks of destination networks that the FortiGate can reach.
Interfaces The interface through which packets are forwarded to the gateway of the destination network.
Field Description
Distance The administrative distance associated with the route. A lower value means the route is
preferable compared to other routes to the same destination.
Type The type values assigned to FortiGate routes (Static, Connected, RIP, OSPF, or BGP):
l Connected: All routes associated with direct connections to FortiGate interfaces
l Static: The static routes that have been added to the routing table manually
l RIPNG: All routes learned through RIP version 6 (which enables the sharing of routes
l OSPF6: All routes learned through OSPF version 6 (which enables the sharing of routes
l HA: RIP, OSPF, and BGP routes synchronized between the primary unit and the
Metric The metric associated with the route type. The metric of a route influences how the FortiGate
dynamically adds it to the routing table. The following are types of metrics and the protocols
they are applied to:
l Hop count: Routes learned through RIP
l Multi-Exit Discriminator (MED): Routes learned through BGP. By default, the MED value
associated with a BGP route is zero. However, the MED value can be modified
dynamically. If the value was changed from the default, the Metric column displays a non-
zero value.
Priority In static routes, priorities are 0 by default. When two routes have an equal distance, the route
with the lower priority number will take precedence.
VRF Virtual routing and forwarding (VRF) allows multiple routing table instances to co-exist. VRF
can be assigned to an Interface. Packets are only forwarded between interfaces with the
same VRF.
Up Since The total accumulated amount of time that a route learned through RIP, OSPF, or BGP has
been reachable.
Viewing the routing table using the CLI displays the same routes as you would see in the GUI.
If VDOMs are enabled on the FortiGate, all routing-related CLI commands must be run within a VDOM and not in the
global context.
Examining an entry:
Value Description
B BGP. The routing protocol used.
192.168.0.0/24 The destination of this route, including netmask.
[20/0] 20 indicates an administrative distance of 20 out of a range of 0 to 255. 0 is an
additional metric associated with this route, such as in OSPF.
172.31.0.1 The gateway or next hop.
MPLS The interface that the route uses.
The routing database consists of all learned routes from all routing protocols before they are injected into the routing
table. This likely lists more routes than the routing table as it consists of routes to the same destinations with different
distances. Only the best routes are injected into the routing table. However, it is useful to see all learned routes for
troubleshooting purposes.
Selected routes are marked by the > symbol. In the above example, the OSPF route to destination 172.31.0.0/30 is
not selected.
The kernel routing table makes up the actual Forwarding Information Base (FIB) that used to make forwarding decisions
for each packet. The routes here are often referred to as kernel routes. Parts of this table are derived from the routing
table that is generated by the routing daemon.
Value Description
tab Table number: It will either be 254 (unicast) or 255 (multicast).
vf Virtual domain of the firewall: It is the VDOM index number. If
VDOMs are not enabled, this number is 0.
type Type of routing connection. Valid values include:
l 0 - unspecific
l 1 - unicast
l 2 - local
l 3 - broadcast
l 4 - anycast
l 5 - multicast
l 6 - blackhole
l 7 - unreachable
l 8 - prohibited
proto Type of installation that indicates where the route came from.
Valid values include:
l 0 - unspecific
l 2 - kernel
l 14 - FortiOS
l 15 - HA
l 16 - authentication based
l 17 - HA1
Route cache
The route cache contains recently used routing entries in a table. It is consulted before the routing table to speed up the
route look-up process.
The size of the route cache is calculated by the kernel, but can be modified.
Route look-up
Route look-up typically occurs twice in the life of a session. Once when the first packet is sent by the originator and once
more when the first reply packet is sent from the responder. When a route look-up occurs, the routing information is
written to the session table and the route cache. If routing changes occur during the life of a session, additional routing
look-ups may occur.
FortiGate performs a route look-up in the following order:
1. Policy-based routes: If a match occurs and the action is to forward, traffic is forwarded based on the policy route.
2. Route Cache: If there are no matches, FortiGate looks for the route in the route cache.
3. Forwarding Information Base, otherwise known as the kernel routing table.
4. If no match occurs, the packet is dropped.
When there are many routes in your routing table, you can perform a quick search by using the search bar to specify your
criteria, or apply filters on the column header to display only certain routes. For example, if you want to only display static
routes, you may use "static" as the search term, or filter by the Type field with value Static.
Route look-up on the other hand provides a utility for you to enter criteria such as Destination, Destination Port, Source,
Protocol and/or Source Interface, in order to determine the route that a packet will take. Once you click Search, the
corresponding route will be highlighted.
You can also use the CLI for a route look-up. The CLI provides a basic route look-up tool.
Blackhole routes
Sometimes upon routing table changes, it is not desirable for traffic to be routed to a different gateway. For example, you
may have traffic destined for a remote office routed through your IPsec VPN interface. When the VPN is down, traffic will
try to re-route to another interface. However, this may not be viable and traffic will instead be routed to your default route
through your WAN, which is not desirable. Traffic may also be routed to another VPN, which you do not want. For such
scenarios, it is good to define a blackhole route so that traffic is dropped when your desired route is down. Upon
reconnection, your desired route is once again added to the routing table and your traffic will resume routing to your
desired interface. For this reason, blackhole routes are created when you configure an IPsec VPN using the IPsec
wizard.
Route priority for a Blackhole route can only be configured from the CLI.
Whenever a packet arrives at one of the interfaces on a FortiGate, the FortiGate determines whether the packet was
received on a legitimate interface by doing a reverse look-up using the source IP address in the packet header. This
protects against IP spoofing attacks. If the FortiGate does not have a route to the source IP address through the interface
on which the packet was received, the FortiGate drops the packet as per Reverse Path Forwarding (RPF) check. There
are two modes of RPF – feasible path and strict. The default feasible RPF mode checks only for the existence of at least
one active route back to the source using the incoming interface. The strict RPF check ensures the best route back to the
source is used as the incoming interface.
You can remove RPF state checks without needing to enable asymmetric routing by disabling state checks for traffic
received on specific interfaces. Disabling state checks makes a FortiGate less secure and should only be done with
caution for troubleshooting purposes.
To remove Reverse Path Forwarding checks from the state evaluation process in the CLI:
Asymmetric routing
Asymmetric routing occurs when request and response packets follow different paths that do not cross the same firewall.
In the following topology, traffic between PC1 and PC2 takes two different paths.
Traffic from PC1 to PC2 goes through the FortiGate, while traffic from PC2 to PC1 does not.
In TCP, if the packets in the request and response directions follow different paths, the FortiGate will block the packets,
since the TCP three-way handshake is not established through the FortiGate.
4. The ICMP reply bypasses the FortiGate, but it reaches PC1. The ping is successful.
5. Subsequent ICMP requests are allowed by the FortiGate.
This setting should be used only when the asymmetric routing issue cannot be resolved by ensuring both directions of
traffic pass through the FortiGate.
When asymmetric routing is enabled and occurs, the FortiGate cannot inspect all traffic. Potentially malicious traffic may
pass through and compromise the security of the network.
Asymmetric routing behaves as follows when it is permitted by the FortiGate:
TCP packets
1. The TCP SYN is allowed by the FortiGate. The FortiGate creates a session, checks the firewall policies, and applies
the configuration from the matching policy (UTM inspection, NAT, traffic shaping, and so on).
2. The TCP SYN/ACK bypasses the FortiGate.
3. The TCP ACK is allowed by the FortiGate. The packet matches the previously created session.
4. Subsequent TCP packets are allowed by the FortiGate. The packets in the session can also be offloaded where
applicable.
ICMP packets
UDP packets
Asymmetric routing does not affect UDP packets. UDP packets are checked by the session table regardless of
asymmetric routing. A policy is required to allow UDP.
Routing changes
When routing changes occur, routing look-up may occur on an existing session depending on certain configurations.
When a routing change occurs, FortiGate flushes all routing information from the session table and performs new routing
look-up for all new packets on arrival by default. You can modify the default behavior using the following commands:
config system interface
edit <interface>
set preserve-session-route enable
next
end
By enabling preserve-session-route, the FortiGate marks existing session routing information as persistent.
Therefore, routing look-up only occurs on new sessions.
When SNAT is enabled, the default behavior is opposite to that of when SNAT is not enabled. After a routing change
occurs, sessions with SNAT keep using the same outbound interface as long as the old route is still active. This may be
the case if the priority of the static route was changed. You can modify this default behavior using the following
commands:
config system global
set snat-route-change enable
end
By enabling snat-route-change, sessions with SNAT will require new route look-up when a routing change occurs.
This will apply a new SNAT to the session.
Policy routes
Policy routing allows you to specify an interface to route traffic. This is useful when you need to route certain types of
network traffic differently than you would if you were using the routing table. You can use the incoming traffic's protocol,
source or destination address, source interface, or port number to determine where to send the traffic.
When a packet arrives, the FortiGate starts at the top of the policy route list and attempts to match the packet with a
policy. For a match to be found, the policy must contain enough information to route the packet. At a minimum, this
requires the outgoing interface to forward the traffic, and the gateway to route the traffic to. If one or both of these are not
specified in the policy route, then the FortiGate searches the routing table to find the best active route that corresponds
to the policy route. If no routes are found in the routing table, then the policy route does not match the packet. The
FortiGate continues down the policy route list until it reaches the end. If no matches are found, then the FortiGate does a
route lookup using the routing table.
In this example, a policy route is configured to send all FTP traffic received at port1 out through port4 and to a next hop
router at 172.20.120.23. To route FTP traffic, the protocol is set to TCP (6) and the destination ports are set to 21 (the
FTP port).
Protocol TCP
Destination ports 21 - 21
4. Click OK.
A routing policy is added to the bottom of the table when it is created. Routing policies can be moved to a different
location in the table to change the order of preference. In this example, routing policy 3 will be moved before routing
policy 2.
Equal cost multi-path (ECMP) is a mechanism that allows a FortiGate to load-balance routed traffic over multiple
gateways. Just like routes in a routing table, ECMP is considered after policy routing, so any matching policy routes will
take precedence over ECMP.
ECMP pre-requisites are as follows:
l Routes must have the same destination and costs. In the case of static routes, costs include distance and priority
l Routes are sourced from the same routing protocol. Supported protocols include static routing, OSPF, and BGP
ECMP and SD-WAN implicit rule are essentially similar in the sense that an SD-WAN implicit rule is processed after SD-
WAN service rules are processed. See Implicit rule on page 527 to learn more.
The following table summarizes the different load-balancing algorithms supported by each:
SD-WAN
ECMP Description
GUI CLI
SD-WAN
ECMP Description
GUI CLI
l If SD-WAN is enabled, the above option is not available and ECMP is configured under the SD-WAN settings:
config system sdwan
set status enable
set load-balance-mode {source-ip-based* | weight-based | usage-based | source-dest-
ip-based | measured-volume-based}
end
For ECMP in IPv6, the mode must also be configured under SD-WAN:
# diagnose sys vd list
system fib version=63
list virtual firewall info:
name=root/root index=0 enabled fib_ver=40 use=168 rt_num=46 asym_rt=0 sip_helper=0, sip_nat_
trace=1, mc_fwd=0, mc_ttl_nc=0, tpmc_sk_pl=0
ecmp=source-ip-based, ecmp6=source-ip-based asym_rt6=0 rt6_num=55 strict_src_check=0 dns_
log=1 ses_num=20 ses6_num=0 pkt_num=19154477
Result:
Both routes are added to the routing table and load-balanced based on the source IP.
Result:
Both routes are added to the routing table, but traffic is routed to port2 which has a lower priority value with a default of
0.
Result:
Both routes are added to the routing table, but 80% of the sessions to 10.10.30.0/24 are routed to vpn2HQ1, and
20% are routed to vpn2HQ2.
Result:
The network 192.168.80.0/24 is advertised by two BGP neighbors. Both routes are added to the routing table, and
traffic is load-balanced based on Source IP.
For multiple BGP paths to be added to the routing table, you must enable ebgp-multipath for eBGP or ibgp-
multipath for iBGP. These settings are disabled by default.
Dual internet connections, also referred to as dual WAN or redundant internet connections, refers to using two FortiGate
interfaces to connect to the Internet. This is generally accomplished with SD-WAN, but this legacy solution provides the
means to configure dual WAN without using SD-WAN. You can use dual internet connections in several ways:
l Link redundancy: If one interface goes down, the second interface automatically becomes the main connection.
l Load sharing: This ensures better throughput.
l Use a combination of link redundancy and load sharing.
Link redundancy ensures that if your Internet access is no longer available through a certain port, the FortiGate uses an
alternate port to connect to the Internet.
In this scenario, two interfaces, WAN1 and WAN2, are connected to the Internet using two different ISPs. WAN1 is the
primary connection. In the event of a failure of WAN1, WAN2 automatically becomes the connection to the Internet. For
this configuration to function correctly, you must configure the following settings:
l Link health monitor on page 313: To determine when the primary interface (WAN1) is down and when the
connection returns.
l Routing on page 314: Configure a default route for each interface.
l Security policies on page 315: Configure security policies to allow traffic through each interface to the internal
network.
Adding a link health monitor is required for routing failover traffic. A link health monitor confirms the device interface
connectivity by probing a gateway or server at regular intervals to ensure it is online and working. When the server is not
accessible, that interface is marked as down.
Set the interval (how often to send a ping) and failtime (how many lost pings are considered a failure). A smaller
interval value and smaller number of lost pings results in faster detection, but creates more traffic on your network.
The link health monitor supports both IPv4 and IPv6, and various other protocols including ping, tcp-echo, udp-echo,
http, and twamp.
Option Description
set update-cascade-interface {enable | This option is used in conjunction with fail-detect and fail-
disable} alert options in interface settings to cascade the link
failure down to another interface. See the Bring other
interfaces down when link monitor fails KB article for
details.
set update-static-route {enable | disable} When the link fails, all static routes associated with the
interface will be removed.
Routing
You must configure a default route for each interface and indicate your preferred route as follows:
l Specify different distances for the two routes. The lower of the two distance values is declared active and placed in
the routing table.
Or
l Specify the same distance for the two routes, but give a higher priority to the route you prefer by defining a lower
value. Both routes will be added to the routing table, but the route with a higher priority will be chosen as the best
route
In the following example, we will use the first method to configure different distances for the two routes. You might not be
able to connect to the backup WAN interface because the FortiGate does not route traffic out of the backup interface.
The FortiGate performs a reverse path look-up to prevent spoofed traffic. If an entry cannot be found in the routing table
that sends the return traffic out through the same interface, the incoming traffic is dropped.
3. Click OK.
4. Repeat the above steps to set Interface to wan2 and Administrative Distance to 20.
next
edit 2
set dst 0.0.0.0 0.0.0.0
set device wan2
set gateway <gateway_address>
set distance 20
next
end
Security policies
When you create security policies, you need to configure duplicate policies to ensure that after traffic fails over WAN1,
regular traffic is allowed to pass through WAN2, as it did with WAN1. This ensures that failover occurs with minimal effect
to users.
Load sharing may be accomplished in a few of the following ways of the many possible ways:
l By defining a preferred route with a lower distance, and specifying policy routes to route certain traffic to the
secondary interface.
l By defining routes with same distance values but different priorities, and specifying policy routes to route certain
traffic to the secondary interface.
l By defining routes with same distance values and priorities, and use equal-cost multi-path (ECMP) routing to
equally distribute traffic between the WAN interfaces.
In our example, we will use the first option for our configuration. In this scenario, because link redundancy is not required,
you do not have to configure a link monitor.
FortiGate will continue to route traffic to the primary WAN. This results in traffic
interruptions.
l If the primary WAN interface of a FortiGate is down due to physical link issues, the
FortiGate will remove routes to it and the secondary WAN routes will become active.
Traffic will failover to the secondary WAN.
Routing
Configure routing as you did in Scenario 1: Link redundancy and no load-sharing on page 313 above.
Policy routes
By configuring policy routes, you can redirect specific traffic to the secondary WAN interface. This works in this case
because policy routes are checked before static routes. Therefore, even though the static route for the secondary WAN
is not in the routing table, traffic can still be routed using the policy route.
In this example, we will create a policy route to route traffic from one address group to the secondary WAN interface.
Incoming interface Define the source of the traffic. For example, internal.
Source Address If we prefer to route traffic only from a group of addresses, define an address or
address group, and add here.
Destination Address Because we want to route all traffic from the address group here, we do not specify a
destination address.
Outgoing interface Select the secondary WAN as the outbound interface. For example, wan2.
Gateway address Input the gateway address for your secondary WAN.
Because its default route has a higher distance value and is not added to the routing
table, the gateway address must be added here.
3. Click OK.
Security policies
Your security policies should allow all traffic from internal to WAN1. Because link redundancy is not needed, you do
not need to duplicate all WAN1 policies to WAN2. You will only need to define policies used in your policy route.
In this scenario, both the links are available to distribute Internet traffic with the primary WAN being preferred more.
Should one of the interfaces fail, the FortiGate will continue to send traffic over the other active interface. The
configuration is a combination of both the link redundancy and the load-sharing scenarios. The main difference is that
the configured routes have equal distance values, with the route with a higher priority being preferred more. This ensures
both routes are active in the routing table, but the route with a higher priority will be the best route.
Link monitor must be configured for both the primary and the secondary WAN interfaces. This ensures that if the primary
or the secondary WAN fails, the corresponding route is removed from the routing table and traffic re-routed to the other
WAN interface.
For configuration details, see sample configurations in Scenario 1: Link redundancy and no load-sharing on page 313.
Routing
Both WAN interfaces must have default routes with the same distance. However, preference is given to the primary
WAN by giving it a higher priority.
Policy routes
The policy routes configuration is very similar to that of the policy routes in Scenario 2: Load-sharing and no link
redundancy on page 315, except that the gateway address should not be specified. When a policy route is matched and
the gateway address is not specified, the FortiGate looks at the routing table to obtain the gateway. In case the
secondary WAN fails, traffic may hit the policy route. Because there is no gateway specified and the route to the
secondary WAN is removed by the link monitor, the policy route will by bypassed and traffic will continue through the
primary WAN. This ensures that the policy route is not active when the link is down.
Security policies
When you create security policies, you need to configure duplicate policies to ensure that after traffic fails over WAN1,
regular traffic is allowed to pass through WAN2, as it was with WAN1. This ensures that failover occurs with minimal
effect to users.
Dynamic routing
Dynamic routing protocols attempt to build a map of the network topology to identify the best routes to reach different
destinations. Instead of manually defining static routes, which is not scalable, dynamic routing typically involves defining
neighbors and peer routers that share their network topology and routing updates with each other. Protocols like
distance vector, link state, and path vector are used by popular routing protocols. FortiGate supports RIP, OSPF, BGP,
and IS-IS, which are interoperable with other vendors. When different dynamic routing protocols are used, the
administrative distance of each protocol helps the FortiGate decide which route to pick.
Go to System > Feature Visibility and enable Advanced Routing to configure dynamic routing
options in the GUI. See Feature visibility on page 2043 for more information.
RIP
Routing Information Protocol (RIP) is a distance-vector routing protocol that is intended for small and relatively
homogeneous networks. It works well when there are minimal redundant paths and limited hop counts. FortiGate
supports RIP version 1 (RFC 1058), RIP version 2 (RFC 2453), and RIPng (RFC 2080).
Basic configuration
To configure the FortiGate to participate in RIP using the most basic configurations in the GUI:
To configure the FortiGate to participate in RIP using the most basic configurations in the CLI:
Enabling Inject default route (default-information-originate) advertises a default route into the FortiGate's
RIP network.
end
Default metric
The default metric setting sets the default metric for all redistributed routes. If the default metric is set to five, and static
routes are redistributed, then static routes have a metric of five. This value can be overridden by setting a specific metric
value for a protocol. For example, the static route metric can be set to two, overriding the default metric.
config router rip
set default-metric 5
config redistribute "static"
set status enable
set metric 2
end
end
The default metric is five, but redistributed static routes have a metric of two. So, the default metric is overridden and the
metric for redistributed static routes is two.
Timers
RIP uses the update, timeout, and garbage timers to regulate its performance. The default timer settings are effective in
most configurations. When customizing the settings, you must ensure that the new settings are compatible with your
local routers and access servers.
Go to Network > RIP and expand the Advanced Options to configure the timers in the GUI, or use the CLI:
config router rip
set timeout-timer <seconds>
set update-timer <seconds>
set garbage-timer <seconds>
end
Update timer
The update timer sets the interval between routing updates. The default value is 30 seconds. Randomness is added to
help prevent network congestion due to multiple routers trying to update their neighbors simultaneously. The update
timer must be at least three times shorter than the timeout timer.
If there is significant RIP traffic on the network, you can increase the update timer to send fewer updates. You must apply
the same increase to all routers on the network to avoid timeouts that degrade your network speed.
Timeout timer
The timeout timer is the maximum amount of time that a reachable route is kept in the routing table since its last update.
The default value is 180 seconds. If an update for the route is received before the timeout period elapses, then the timer
is reset. The timeout timer should be at least three times longer than the update timer.
If routers are not responding to updates in time, increasing the timeout timer can help. A longer timeout timer results in
longer update periods, and the FortiGate could wait a considerable amount of time for all of the timers to expire on an
unresponsive route.
Garbage timer
The garbage timer is the amount of time that the FortiGate advertises a route as unreachable before deleting the route
from the routing table. The default value is 120 seconds.
If the timer is short, older routes are removed from the routing table more quickly, resulting in a smaller routing table. This
can be useful for large networks, or if the network changes frequently.
RIP version 1 (RIPv1) has no authentication. RIP version 2 (RIPv2) uses text passwords or authentication keys to
ensure that the routing information exchanged between routers is reliable. For authentication to work, both the sending
and receiving routers must be set to use authentication and must be configured with the same password or keys. An
authentication key that uses authentication key chains is more secure than a text password because the intervals when
the key is valid can be configured.
A key chain is a list of one or more authentication keys that each have send and receive lifetimes. Keys are used to
authenticate routing packets only during the keys specified lifetimes. The FortiGate migrates from one key to the next
according to the scheduled lifetimes. The sending and receiving routers should have synchronized system dates and
times to ensure that both ends are using the same keys at the same times. You can overlap the key lifetimes to make
sure that a key is always available, even if there is some difference in the system times.
To configure a key chain with two sequentially valid keys and use it in a RIP interface:
By default, an active RIP interface keeps the FortiGate routing table current by periodically asking neighbors for routes
and sending out route updates. This can generate a significant amount of extra traffic in a large network.
A passive RIP interface listens to updates from other routers, but does not send out route updates. This can reduce
network traffic when there are redundant routers in the network that would always send out essentially the same
updates.
This example shows how to configure a passive RIPv2 interface on port1 using MD5 authentication.
end
end
RIP next generation (RIPng) is an extension of RIPv2 that includes support for IPv6. See Basic RIPng example on page
336 and IPv6 tunneling on page 468 for more information.
All of the FortiGate routers are configured as shown, using netmask 255.255.255.0. Firewall policies have been
configured to allow the required traffic to flow across the interfaces.
After configuring each router, you can check the status of the connections by viewing the RIP database, RIP interfaces,
and routing table. See Verifying the configuration on page 329.
After the network is configured, you can test it to ensure that when network events occur, such as a downed link, routing
updates are triggered and converge as expected. See Testing the configuration and routing changes on page 333.
ISP router
d. Click OK.
e. Repeat these steps for port3.
5. Under Advanced Options, enable Inject Default Route.
This setting allows the ISP router to share its default 0.0.0.0 routes with other routers in the RIP network.
6. Click Apply.
Router2 and Router3 RIP configurations have different IP addresses, but are otherwise the same.
10.12.101.0/255.255.255.0
10.11.201.0/255.255.255.0
Router2
10.14.201.0/255.255.255.0
172.20.120.0/255.255.255.0
10.12.101.0/255.255.255.0
10.11.202.0/255.255.255.0
Router3
10.14.202.0/255.255.255.0
172.20.121.0/255.255.255.0
Router1 and Router4 RIP configurations have different IP addresses, but are otherwise the same.
10.11.101.0/255.255.255.0
Router1 10.11.201.0/255.255.255.0
10.11.202.0/255.255.255.0
10.14.101.0/255.255.255.0
Router4 10.14.201.0/255.255.255.0
10.14.202.0/255.255.255.0
edit 2
set prefix 10.14.201.0 255.255.255.0
next
edit 3
set prefix 10.14.202.0 255.255.255.0
next
end
set passive-interface "port1"
config interface
edit "port1"
set receive-version 2
set send-version 2
next
edit "port2"
set receive-version 2
set send-version 2
next
edit "port3"
set receive-version 2
set send-version 2
next
end
end
The interface's names are shown in the debugs. The same commands should also be run on the other routers.
To verify the configuration after the ISP router, Router2, and Route3 have been configured:
This verification can be done after the ISP router, Router2, and Router3 have been configured. Only Router2's debugs
are shown.
1. Check the RIP interface information:
# get router info rip interface
Router2 is up, line protocol is up
RIP is not enabled on this interface
ssl.Router2 is up, line protocol is up
RIP is not enabled on this interface
vdr2link1 is up, line protocol is up
Routing Protocol: RIP
Receive RIPv2 packets only
Send RIPv2 packets only
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IP interface address:
172.20.120.102/24
vd12link1 is up, line protocol is up
Routing Protocol: RIP
Receive RIPv2 packets only
Send RIPv2 packets only
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IP interface address:
10.11.201.102/24
RIP starts exchanging routes as soon as the networks are added to the Router2 and Router3 configurations
because the RIP interfaces are active by default, and start sending and receiving RIP updates when a matching
interface on the subnet is found. The interface configuration allows the interface settings to be fine tuned, in this
case to specify only RIPv2 support.
2. Check the RIP database:
# get router info rip database
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, K - Kernel,
C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP
Network Next Hop Metric From If Time
R 0.0.0.0/0 172.20.120.5 2 172.20.120.5 vdr2link1 02:55
Rc 10.11.201.0/24 1 vd12link1
R 10.11.202.0/24 10.12.101.103 2 10.12.101.103 vd23link0 02:33
Rc 10.12.101.0/24 1 vd23link0
Rc 10.14.201.0/24 1 vd42link1
R 10.14.202.0/24 10.12.101.103 2 10.12.101.103 vd23link0 02:33
Rc 172.20.120.0/24 1 vdr2link1
R 172.20.121.0/24 10.12.101.103 2 10.12.101.103 vd23link0 02:33
Router2 has learned the default gateway from the ISP router, and has learned of other networks from Router3.
4. If firewall policies are correctly configured, the outside network can be reached:
To verify the configuration after Router1 and Router4 have also been configured:
This verification can be done after Router1 and Router4 have been configured. Only Router1's debugs are shown.
1. Check the RIP interface information:
# get router info rip interface
Router1 is up, line protocol is up
RIP is not enabled on this interface
ssl.Router1 is up, line protocol is up
RIP is not enabled on this interface
vd12link0 is up, line protocol is up
Routing Protocol: RIP
Receive RIPv2 packets only
Send RIPv2 packets only
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IP interface address:
10.11.201.101/24
vd13link0 is up, line protocol is up
Routing Protocol: RIP
Receive RIPv2 packets only
Send RIPv2 packets only
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IP interface address:
10.11.202.101/24
LoSales is up, line protocol is up
Routing Protocol: RIP
Receive RIPv2 packets only
Send RIPv2 packets only
Passive interface: Enabled
Split horizon: Enabled with Poisoned Reversed
IP interface address:
10.11.101.101/24
127.0.0.1/8
4. If firewall policies are correctly configured, the accounting network and the internet are reachable from the sales
network:
# execute ping-options source 10.11.101.101
# execute ping 10.14.101.104
PING 10.14.101.104 (10.14.101.104): 56 data bytes
64 bytes from 10.14.101.104: icmp_seq=0 ttl=254 time=0.1 ms
64 bytes from 10.14.101.104: icmp_seq=1 ttl=254 time=0.0 ms
64 bytes from 10.14.101.104: icmp_seq=2 ttl=254 time=0.0 ms
64 bytes from 10.14.101.104: icmp_seq=3 ttl=254 time=0.0 ms
64 bytes from 10.14.101.104: icmp_seq=4 ttl=254 time=0.0 ms
--- 10.14.101.104 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.0/0.0/0.1 ms
# execute traceroute 10.14.101.104
traceroute to 10.14.101.104 (10.14.101.104), 32 hops max, 3 probe packets per hop, 84
byte packets
1 10.11.202.103 0.079 ms 0.029 ms 0.013 ms
2 10.14.101.104 0.043 ms 0.020 ms 0.010 ms
After the network is configured, test it to ensure that when network events occur, such as a downed link, routing updates
are triggered and converge as expected.
In the following examples, we disable certain links to simulate network outages, then verify that routing and connectivity
is restored after the updates have converged.
In this example, a link outage occurs on port3 of the ISP router. Consequently, all routers must use Router2, and not
Router3, to reach the internet. Note the RIP database before and after the link failure, and the time taken for the route
updates to propagate and return to a functioning state.
Router4's debugs are shown.
Before:
# get router info rip database
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, K - Kernel,
C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP
Network Next Hop Metric From If Time
R 0.0.0.0/0 10.14.202.103 3 10.14.202.103 vd43link0 02:31
R 10.11.101.0/24 10.14.202.103 3 10.14.202.103 vd43link0 02:31
R 10.11.201.0/24 10.14.201.102 2 10.14.201.102 vd42link0 02:47
R 10.11.202.0/24 10.14.202.103 2 10.14.202.103 vd43link0 02:31
R 10.12.101.0/24 10.14.202.103 2 10.14.202.103 vd43link0 02:31
Rc 10.14.101.0/24 1 LoAccounting
Rc 10.14.201.0/24 1 vd42link0
Rc 10.14.202.0/24 1 vd43link0
R 172.20.120.0/24 10.14.201.102 2 10.14.201.102 vd42link0 02:47
R 172.20.121.0/24 10.14.202.103 2 10.14.202.103 vd43link0 02:31
# get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
Routing table for VRF=0
R* 0.0.0.0/0 [120/3] via 10.14.202.103, vd43link0, 02:45:15
R 10.11.101.0/24 [120/3] via 10.14.202.103, vd43link0, 02:44:49
R 10.11.201.0/24 [120/2] via 10.14.201.102, vd42link0, 02:45:15
After:
l You might see different routes, and the routes might change, while convergence is occurring. During convergence,
the metric for your default route increases to 16.
# get router info rip database
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, K - Kernel,
C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP
Network Next Hop Metric From If Time
R 0.0.0.0/0 10.14.202.103 16 10.14.202.103 vd43link0 01:50
l After convergence is complete, the RIP database will look similar to the following:
# get router info rip database
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, K - Kernel,
C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP
Network Next Hop Metric From If Time
R 0.0.0.0/0 10.14.201.102 3 10.14.201.102 vd42link0 02:53
R 10.11.101.0/24 10.14.202.103 3 10.14.202.103 vd43link0 03:00
R 10.11.201.0/24 10.14.201.102 2 10.14.201.102 vd42link0 02:53
R 10.11.202.0/24 10.14.202.103 2 10.14.202.103 vd43link0 03:00
R 10.12.101.0/24 10.14.202.103 2 10.14.202.103 vd43link0 03:00
Rc 10.14.101.0/24 1 LoAccounting
Rc 10.14.201.0/24 1 vd42link0
Rc 10.14.202.0/24 1 vd43link0
R 172.20.120.0/24 10.14.201.102 2 10.14.201.102 vd42link0 02:53
l The default router should point to Router2, with the same number of hops:
# get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
Routing table for VRF=0
R* 0.0.0.0/0 [120/3] via 10.14.201.102, vd42link0, 00:05:24
R 10.11.101.0/24 [120/3] via 10.14.202.103, vd43link0, 02:58:13
R 10.11.201.0/24 [120/2] via 10.14.201.102, vd42link0, 02:58:39
R 10.11.202.0/24 [120/2] via 10.14.202.103, vd43link0, 02:58:39
R 10.12.101.0/24 [120/2] via 10.14.202.103, vd43link0, 02:58:39
C 10.14.101.0/24 is directly connected, LoAccounting
C 10.14.201.0/24 is directly connected, vd42link0
In addition to the link failure on the ISP router in example, port1 and port3 on Router2 have also failed. This means that
Router4 must go through Router3, Router1, Router2, then the ISP router to reach the internet. Note that, for a period of
time, some routes' metrics increase to 16. If no better routes are found for these networks, then they eventually
disappear.
After the convergence completes, the RIP database and routing table on Router4 should resemble the following:
# get router info rip database
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, K - Kernel,
C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP
Network Next Hop Metric From If Time
R 0.0.0.0/0 10.14.202.103 5 10.14.202.103 vd43link0 02:54
R 10.11.101.0/24 10.14.202.103 3 10.14.202.103 vd43link0 02:54
R 10.11.201.0/24 10.14.202.103 3 10.14.202.103 vd43link0 02:54
R 10.11.202.0/24 10.14.202.103 2 10.14.202.103 vd43link0 02:54
Rc 10.14.101.0/24 1 LoAccounting
Rc 10.14.202.0/24 1 vd43link0
R 172.20.120.0/24 10.14.202.103 4 10.14.202.103 vd43link0 02:54
# get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
Routing table for VRF=0
R* 0.0.0.0/0 [120/5] via 10.14.202.103, vd43link0, 00:03:54
R 10.11.101.0/24 [120/3] via 10.14.202.103, vd43link0, 03:10:12
R 10.11.201.0/24 [120/3] via 10.14.202.103, vd43link0, 00:03:54
R 10.11.202.0/24 [120/2] via 10.14.202.103, vd43link0, 03:10:38
C 10.14.101.0/24 is directly connected, LoAccounting
C 10.14.202.0/24 is directly connected, vd43link0
R 172.20.120.0/24 [120/4] via 10.14.202.103, vd43link0, 00:03:54
Reaching the internet on the default gateway now requires five hops from Router4:
# execute traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 32 hops max, 3 probe packets per hop, 84 byte packets
1 10.14.202.103 0.087 ms 0.026 ms 0.012 ms
2 10.11.202.101 0.045 ms 0.024 ms 0.025 ms
3 10.11.201.102 0.048 ms 0.024 ms 0.015 ms
4 172.20.120.5 0.050 ms 0.028 ms 0.019 ms
5 * * *
In this example, a small network is configured with RIP next generation (RIPng). Two FortiGates are connected to the
internal network and the ISP, providing some redundancy to help ensure that the internal network can always reach the
internet.
The FortiGates are running in NAT mode with VDOMs disabled, and firewall policies have already been configured to
allow traffic to flow across the interfaces.
All of the internal computers and other network devices support IPv6 addressing and are running RIPng (where
applicable), so no static routing is required. Internal network devices only need to know the FortiGate's internal interface
network addresses.
On each FortiGate, the interfaces are configured first, and then RIPng. No redistribution or authentication is configured.
In the RIPng configuration, only the interface names are required. The ISP router and the other FortiGate are configured
as neighbors. Declaring the neighbors reduces the discovery traffic when the routers start. There is no specific command
to include a subnet in the RIP broadcast, and RIPng can only be configured using the CLI.
To configure Router1:
next
edit port2
set allowaccess ping https ssh
set type physical
set description "ISP and Internet"
set alias "ISP"
config ipv6
set ip6-address 2002:ac14:7865::/0
end
next
end
2. Configure RIPng:
config router ripng
config neighbor
edit 1
set ip6 2002:a0b:6566::
set interface port1
next
edit 2
set ip6 2002:ac14:7805::
set interface port2
next
end
config interface
edit port1
next
edit port2
next
end
end
To configure Router2:
2. Configure RIPng:
config router ripng
config neighbor
edit 1
set ip6 2002:a0b:6565::
set interface port1
next
edit 2
set ip6 2002:ac14:7805::
set interface port2
next
end
config interface
edit port1
next
edit port2
next
end
end
The following commands can be used to check the RIPng information on the FortiGates, and can help track down
issues:
To view the local scope IPv6 addresses used as next-hops by RIPng on the FortiGate:
This information is similar to the diagnose ipv6 route list command, but it is presented in an easier to read
format.
To view the brief output on the RIP information for the interface listed:
This includes information such as, if the interface is up or down, what routing protocol is being used, and whether
passive interface or split horizon is enabled.
OSPF
Open Shortest Path First (OSPF) is a link state routing protocol that is commonly used in large enterprise networks with
L3 switches, routers, and firewalls from multiple vendors. It can quickly detect link failures, and converges network traffic
without networking loops. It also has features to control which routes are propagated, allowing for smaller routing tables,
and provides better load balancing on external links when compared to other routing protocols.
To configure OSPF in the GUI, go to Network > OSPF:
Option Description
Router ID A unique ID to identify your router in the network, typically in the format x.x.x.x.
Areas The areas that the router is part of. For each are area, define the Area ID, Type,
and Authentication method.
Networks The networks that OSPF is enabled in, and the area that they belong to.
Interfaces OSPF interfaces for transmitting and receiving packets. Configure interface
properties, such as Network Type, Cost, Hello interval, and others.
Advanced Options Settings for Inject Default Route, Passive Interfaces, and Redistribute.
Redistribution can be enabled by protocol and the metric for each protocol can be
configured.
port1 10.11.101.1
Router1 (DR)
port2 10.11.102.1
port3 192.168.102.1
port1 10.11.101.2
port3 192.168.103.2
port1 10.11.102.3
port3 172.20.120.3
l Firewall policies are already configured to allow unfiltered traffic in both directions between all of the connected
interfaces.
l The interfaces are already configured, and NAT is only used for connections to public networks. The costs for all of
the interfaces is left at 0.
l The OSPF network belongs to Area 0, and is not connected to any other OSPF networks. All of the routers are part
of the backbone 0.0.0.0 area, so no inter-area communications are needed.
l Router3 redistributes BGP routes into the OSPF AS and peers with the ISP BGP Router over eBGP. For information
about configuring BGP, see BGP on page 350.
l The advertised networks - 10.11.101.0, 10.11.102.0, and 10.11.103.0 - are summarized by 10.11.0.0/16. Additional
networks are advertised individually by the /24 subnet.
Router1
Area ID 0.0.0.0
Type Regular
Authentication None
4. Click OK.
5. In the Networks table, click Create New and set the following:
Area 0.0.0.0
6. Click OK.
7. In the Networks table, click Create New again and set the following:
Area 0.0.0.0
8. Click OK.
9. In the Interfaces table, click Create New and set the following:
Name Router1-Internal-DR
Interface port1
Cost 0
Priority 255
Authentication None
Name Router1-External
Interface port2
Cost 0
Authentication None
Router2
Area ID 0.0.0.0
Type Regular
Authentication None
4. Click OK.
5. In the Networks table, click Create New and set the following:
Area 0.0.0.0
6. Click OK.
7. In the Networks table, click Create New again and set the following:
Area 0.0.0.0
8. Click OK.
9. In the Interfaces table, click Create New and set the following:
Name Router2-Internal
Interface port1
Cost 0
Priority 250
Authentication None
Name Router2-External
Interface port2
Cost 0
Authentication None
set dead-interval 40
set hello-interval 10
next
end
config network
edit 1
set prefix 10.11.0.0 255.255.0.0
next
edit 2
set prefix 192.168.103.0 255.255.255.0
next
end
end
Router3
Area ID 0.0.0.0
Type Regular
Authentication None
6. Click OK.
7. In the Networks table, click Create New and set the following:
Area 0.0.0.0
8. Click OK.
9. In the Interfaces table, click Create New and set the following:
Name Router3-Internal
Interface port1
Cost 0
Authentication None
Name Router3-Internal2
Interface port2
Cost 0
Authentication None
edit 1
set prefix 172.20.120.0 255.255.255.0
next
end
end
Both the network connectivity and OSPF routing are tested. When a link goes down, routes should converge as
expected.
Working state
l Router3:
Router3 # get router info ospf neighbor
OSPF process 0, VRF 0:
Neighbor ID Pri State Dead Time Address Interface
10.11.101.1 1 Full/Backup 00:00:34 10.11.102.1 port1
10.11.101.2 1 Full/Backup 00:00:38 10.11.103.2 port2
Router3 # get router info ospf status
Routing Process "ospf 0" with ID 10.11.103.3
Process uptime is 18 hours 52 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Do not support Restarting
This router is an ASBR (injecting external routing information)
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Refresh timer 10 secs
Number of incomming current DD exchange neighbors 0/5
Number of outgoing current DD exchange neighbors 0/5
Number of external LSA 3. Checksum 0x021B78
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 2
External LSA database is unlimited.
Number of LSA originated 16
Number of LSA received 100
Number of areas attached to this router: 1
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 2(2)
Number of fully adjacent neighbors in this area is 2
Area has no authentication
SPF algorithm last executed 00:37:36.690 ago
SPF algorithm executed 13 times
Number of LSA 6. Checksum 0x03eafa
Router3 # get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
Routing table for VRF=0
B* 0.0.0.0/0 [20/0] via 172.20.120.5, port3, 01:10:12
O 10.11.101.0/24 [110/2] via 10.11.103.2, port2, 00:39:34
[110/2] via 10.11.102.1, port1, 00:39:34
C 10.11.102.0/24 is directly connected, port1
C 10.11.103.0/24 is directly connected, port2
C 172.20.120.0/24 is directly connected, port3
O 192.168.102.0/24 [110/2] via 10.11.102.1, port1, 02:24:59
O 192.168.103.0/24 [110/2] via 10.11.103.2, port2, 02:14:32
B 192.168.160.0/24 [20/0] via 172.20.120.5, port3, 19:08:39
B 192.168.170.0/24 [20/0] via 172.20.120.5, port3, 01:10:12
l Router2:
Router2 # get router info ospf neighbor
OSPF process 0, VRF 0:
Neighbor ID Pri State Dead Time Address Interface
10.11.101.1 255 Full/DR 00:00:35 10.11.101.1 port1
10.11.103.3 1 Full/DR 00:00:38 10.11.103.3 port3
Router2 # get router info ospf status
Routing Process "ospf 0" with ID 10.11.101.2
Process uptime is 2 hours 53 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Do not support Restarting
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Refresh timer 10 secs
Number of incomming current DD exchange neighbors 0/5
Number of outgoing current DD exchange neighbors 0/5
Number of external LSA 3. Checksum 0x021979
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 2
External LSA database is unlimited.
Number of LSA originated 5
Number of LSA received 128
Number of areas attached to this router: 1
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 3(3)
Number of fully adjacent neighbors in this area is 2
Area has no authentication
SPF algorithm last executed 00:47:49.990 ago
SPF algorithm executed 15 times
Number of LSA 6. Checksum 0x03e8fb
Router2 # get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
Routing table for VRF=0
O*E2 0.0.0.0/0 [110/10] via 10.11.103.3, port2, 01:03:58
l Router2:
Router2 # get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
Routing table for VRF=0
O*E2 0.0.0.0/0 [110/10] via 10.11.103.3, port2, 01:16:36
C 10.11.101.0/24 is directly connected, port1
O 10.11.102.0/24 [110/2] via 10.11.101.1, port1, 00:02:27
C 10.11.103.0/24 is directly connected, port2
O 192.168.102.0/24 [110/2] via 10.11.101.1, port1, 01:01:39
C 192.168.103.0/24 is directly connected, port3
O E2 192.168.160.0/24 [110/10] via 10.11.103.3, port2, 01:52:09
O E2 192.168.170.0/24 [110/10] via 10.11.103.3, port2, 01:32:17
l Router1:
Router1 # get router info routing-table all
Routing table for VRF=0
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
O*E2 0.0.0.0/0 [110/10] via 10.11.101.2, port1, 00:05:14
C 10.11.101.0/24 is directly connected, port1
C 10.11.102.0/24 is directly connected, port2
O 10.11.103.0/24 [110/2] via 10.11.101.2, port1, 00:05:15
C 192.168.102.0/24 is directly connected, port3
O 192.168.103.0/24 [110/2] via 10.11.101.2, port1, 01:03:50
O E2 192.168.160.0/24 [110/10] via 10.11.101.2, port1, 00:05:14
O E2 192.168.170.0/24 [110/10] via 10.11.101.2, port1, 00:05:14
BGP
Border Gateway Protocol (BGP) is a standardized routing protocol that is used to route traffic across the internet. It
exchanges routing information between Autonomous Systems (AS) on the internet and makes routing decisions based
on path, network policies, and rule sets. BGP contains two distinct subsets: internal BGP (iBGP) and external BGP
(eBGP). iBGP is intended for use within your own networks. eBGP is used to connect different networks together and is
the main routing protocol for the internet backbone.
To configure BGP in the GUI, go to Network > BGP:
Option Description
Router ID A unique ID to identify your router in the network, typically in the format x.x.x.x.
Neighbors The neighbors that the FortiGate will be peering with. Configure the remote
router's AS number, any other properties used for peering with the neighbor, and
IPv4 and IPv6 filtering.
Neighbor Groups The neighbor groups that share the same outbound policy configurations.
Neighbor Ranges The source address range of BGP neighbors that will be automatically assigned
to a neighbor group.
IPv4 & IPv6 Networks The networks to be advertised to other BGP routers.
IPv4 & IPv6 Redistribute Enable redistribution by protocol. Specify either All routes, or Filter by route map.
Dampening Enable route flap dampening to reduce the propagation of flapping routes.
Graceful Restart Enable BGP graceful restart, which causes the adjacent routers to keep routes
active while the BGP peering is restarted on the FortiGate. This is useful in HA
instances when failover occurs.
Advanced Options Various advanced settings, such as Local Preference, Distance internal,
Keepalive, Holdtime, and others
In this example, BGP is configured on two FortiGate devices. The FortiGates are geographically separated, and form
iBGP peering over a VPN connection. FGT_A also forms eBGP peering with ISP2.
FGT_A learns routes from ISP2 and redistributes them to FGT_B while preventing any iBGP routes from being
advertised.
The internal networks behind the FortiGates can communicate with each other, and the internal networks behind FGT_B
can traverse FGT_A to reach networks that are advertised by ISP2.
l FGT_A and FGT_B have static routes to each other through ISP1. ISP1 does not participate in BGP.
l The IPsec VPN tunnel between FGT_A and FGT_B is configured with wildcard 0.0.0.0/0 networks for phase2 local
and remote selectors. The VPN interfaces have IP addresses already configured and are used for peering between
FGT_A and FGT_B.
l FGT_A is configure to peer with ISP2 on 10.10.108.86.
l The firewall policies between FGT_A and FGT_B are not NATed. The firewall policies egressing on wan2 are
NATed.
IP 10.100.201.88
Remote AS 64511
5. Click OK.
IP 10.100.201.86
Remote AS 64511
5. Click OK.
6. Under Networks, set IP/Netmask to 192.168.88.0/24.
7. Click Apply.
8. In the CLI, set the interface used as the source IP address of the TCP connection (where the BGP session,
TCP/179, is connecting from) for the neighbor (update-source) to toFGTA.
To see the neighborship status, network, and routing table command outputs for the completed example, see
Troubleshooting and debugging on page 355.
By establishing eBGP peering with ISP2, learned routes will have a distance of 20 and will automatically be propagated
to iBGP peers. iBGP peers do not change the next hop when they advertise a route. To make FGT_B receive a route
with FGT_A as the next hop, and not ISP 2's network, Next hop self (next-hop-self) is enabled for routes advertised
to FGT_B.
Additionally, to peer with another router that is multiple hops away, enable ebg-enforce-multihop in the neighbor
configuration.
In this example, the iBGP routes are automatically advertised to the eBGP neighbor, so a route map is created to deny
iBGP routes from being advertised to ISP 2. Prefixes from ISP 2 are advertised to FGT_A and FGT_B, but no prefixes
are advertised from FGT_A to ISP 2.
IP 10.10.102.87
Remote AS 64512
c. Click OK.
d. In the Neighbors table, edit the previously created entry, 10.100.201.88.
e. Under IPv4 Filtering, select Next hop self.
f. Click OK.
g. Click Apply.
To see the neighborship status, network, and routing table command outputs for the completed example, see
Troubleshooting and debugging on page 355.
Firewall policies
When troubleshooting issues, logically step through the debugs. For example, if peering cannot be established between
FGT_A and FGT_B:
1. Verify the basic connectivity between the FGT_A wan1 interface and the FGT_B port1 interface.
2. Verify that the VPN between FGT_A and FGT_B is established.
3. Verify the connectivity between the VPN interfaces.
4. Check the neighborship status on each peer. Use the BGP state to help determine the possible issue, for example:
Idle state The local FortiGate has not started the BGP process with the neighbor. This could be
because the eBGP peer is multiple hops away, but multihop is not enabled.
Connect The local FortiGate has started the BGP process, but has not initiated a TCP connection,
possibly due to improper routing.
Active The local FortiGate has initiated a TCP connection, but there is no response. This might
indicate issues with the delivery or the response from the remote peer.
5. If there are issues establishing the TCP connection, use the command diagnose sniffer packet any 'tcp
and port 179' to identify the problem at the packet level.
The following outputs show instances where all of the configurations are completed, peering has formed, and routes
have been exchanged. The debug output during each configuration step might differ from these outputs. These debug
outputs can be used to help identify what might be missing or misconfigured on your device.
Nexthop local: ::
BGP connection: non shared network
Last Reset: 01:56:09, due to BGP Notification sent
Notification Error Message: (CeaseUnspecified Error Subcode)
# get router info bgp neighbors <neighbor's IP> can also be used to verify the status of a specific
neighbor.
During BGP operations, routes can be propagated between BGP peers and redistributed from other routing protocols. In
some situations, advertising routes from one peer to another might need to be prevented.
The Basic BGP example on page 351 explains using a route map to filter routes that are learned from iBGP to prevent
them from propagating to an eBGP peer. In this example, a distribution list is used to prevent certain routes from one
peer from being advertised to another peer.
l A company has its own web and email servers in an OSPF area, and needs to advertise routes to these resources
to external peers. Users, routers, and other server all reside in the OSPF area.
l The FortiGate acts as the BGP border router, redistributing routes from the company's network to its BGP peers. It
is connected to the OSPF area using its DMZ interface.
l Two ISP managed BGP peers in an AS (Peer 1 and Peer 2) are used to access the internet, and routes must not to
be advertised from Peer 1 to Peer 2. The manufacturers of these routers, and information about other devices on
the external BGP AS, are not known.
l Routes to the BGP peers are redistributed so that external locations can access the web and email servers in the
OSPF area. The FortiGate device's external interfaces and the BGP peers are in different ASs, and form eBGP
peers.
l Other networking devices must be configured for BGP. The peer routers must be updated with the FortiGate
device's BGP information, including IP addresses, AS number, and any specific capabilities that are used, such as
IPv6, graceful restart, BFD, and so on.
l It is assumed that security policies have been configured to allow traffic between the networks and NAT is not used.
To tighten security, only the required services should be allowed inbound to the various servers.
l In a real life scenario, public IP addresses would be used in place of private IP addresses.
Configuring BGP
In this example, Peer 1 routes are blocked from being advertised to Peer 2 using an access list. All incoming routes from
Peer 1 are blocked when updates are sent to Peer 2.
Routes learned from OSPF are redistributed into BGP. EBGP multi path is enabled to load-balance traffic between the
peers using ECMP. See Equal cost multi-path on page 308 for more information.
2. Configure BGP:
a. Go to Network > BGP.
b. Set Local AS to 65001
c. Set Router ID to 10.11.201.110.
d. In the Neighbors table, click Create New and set the following:
IP 172.21.111.5
Remote AS 65001
e. Click OK.
f. In the Neighbors table, click Create New again and set the following:
IP 172.22.222.5
Remote AS 65001
Distribute list out Enable, and select the block_peer1 access list.
g. Click OK.
h. Under IPv4 Redistribute, enable OSPF and select ALL.
i. Expand Best Path Selection and enable EBGP multi path.
j. Click Apply.
2. Configure BGP:
config router bgp
set as 65001
set router-id 10.11.201.110
set ebgp-multipath enable
config neighbor
edit "172.21.111.5"
set remote-as 65001
next
edit "172.22.222.5"
set distribute-list-out "block_peer1"
set remote-as 65001
next
end
Configuring OSPF
In this example, all of the traffic is within the one OSPF area, and there are other OSPF routers in the network. When
adjacencies are formed, other routers receive the routes advertised from the FortiGate that are redistributed from BGP.
Area ID 0.0.0.0
Type Regular
Authentication None
4. Click OK.
5. In the Networks table, click Create New and set the following:
Area 0.0.0.0
6. Click OK.
7. In the Interfaces table, click Create New and set the following:
Name OSPF_dmz_network
Interface dmz
8. Click OK.
9. Enable Redistribute BGP and set Metric value to 1.
10. Click Apply.
edit 1
set prefix 10.11.201.0 255.255.255.0
next
end
config redistribute "bgp"
set status enable
set metric 1
end
end
To test this configuration, run the standard connectivity checks, and also make sure that routes are being passed
between protocols as expected. Use the following checklist to help verify that the FortiGate is configured successfully:
1. Check that the FortiGate has established peering with BGP Peer 1 and Peer 2:
# get router info bgp summary
# get router info bgp neighbors
2. Check that the FortiGate has formed adjacency with OSPF neighbors:
# get router info ospf status
# get router info ospf neighbors
3. Check the routing table on the FortiGate to make sure that routes from both OSPF and BGP are included:
# get router info routing-table all
4. Check devices in the OSPF network for internet connectivity and to confirm that routes redistributed from BGP are
in their routing tables.
5. Check the routing table on Peer 2 to confirm that no routes from Peer 1 are included.
6. Check that the routes from the internal OSPF network are redistributed to Peer 1 and Peer 2.
7. Verify connectivity to the HTTP and email servers.
By default, BGP routes are not considered when a BGP next hop requires recursive resolution. They are considered
when recursive-next-hop is enabled. Recursive resolution will resolve to one level.
Example
To see the change in the routing table when the option is enabled:
The second BGP route's next hop is now recursively resolved by another BGP route.
When there are multiple ECMP routes to a BGP next hop, all of them are considered for the next hop recursive
resolution. This ensures that the outgoing traffic can be load balanced.
In this example, there are two static routes. The FortiGate has learned two BGP routes from Router 1 that have the same
next hop at 10.100.100.1. The next hop is resolved by the two static routes.
To verify that the routes are added to the BGP routing table:
BGP conditional advertisement allows the router to advertise a route only when certain conditions are met. Multiple
conditions can be used together, with conditional route map entries treated as an AND operator, and IPv6 is supported.
In this example, the FortiGate only advertises routes to its neighbor 2.2.2.2 if it learns multiple BGP routes defined in its
conditional route map entry. All conditionals must be met.
edit 1
set match-ip-address "281"
next
end
next
end
In this output, the condition is that the routes in route maps 2814, 2224 and comm1 do not exist. However, routes for
2814 and 2224 exist, so the conditions are not met.
In this output, the condition is that the routes in route maps map-222 and map-282 exist. However, routes for map-222
exist, but map-282 does not, so the conditions are not met.
IPv6 example 1
In this example, the FortiGate advertises its local network to the secondary router when the primary router is down. The
FortiGate detects the primary router is down in the absence of a learned route.
l When the FortiGate learns route 2003:172:28:1::/64 from the primary router, it does not advertise its local route
(2003:172:22:1::/64) to the secondary router.
l When the FortiGate does not learn route 2003:17:28:1::/64 from the primary router, advertises its local route
(2003:172:22:1::/64) to the secondary router.
l The BGP conditional advertisement condition is set to be true if the condition route map (2003:172:28:1::/64) is not
matched (non-exist).
config rule
edit 1
set match-ip6-address "adv-222"
next
end
next
edit "map-281"
config rule
edit 1
set match-ip6-address "lrn-281"
next
end
next
end
3. Configure BGP:
config router bgp
set as 65412
set router-id 1.1.1.1
set ibgp-multipath enable
set network-import-check disable
set graceful-restart enable
config neighbor
edit "2003::2:2:2:2"
set soft-reconfiguration6 enable
set remote-as 65412
set update-source "loopback1"
config conditional-advertise6
edit "map-221"
set condition-routemap "map-281"
set condition-type non-exist
next
end
next
edit "2003::3:3:3:3"
set soft-reconfiguration6 enable
set remote-as 65412
set update-source "loopback1"
next
end
end
In this configuration, if route map map-281 does not exist, then the FortiGate advertises route map map-221 to
neighbor 2003::2:2:2:2.
4. Verify the routing table:
# get router info6 routing-table bgp
B 2003:172:28:1::/64 [200/0] via 2003::3:3:3:3 (recursive via
****::***:***:****:****, port9), 01:23:45
B 2003:172:28:2::/64 [200/0] via 2003::3:3:3:3 (recursive via
****::***:***:****:****, port9), 23:09:22
When the FortiGate learns 2003:172:28:1::/64, it will not advertise its local route 2003:172:22:1::/64 to neighbor
2003::2:2:2:2. If the FortiGate has not learned 2003:172:28:1::/64, it will advertise its local route 2003:172:22:1::/64 to
neighbor 2003::2:2:2:2.
IPv6 example 2
With the same IPv6 prefix lists and route maps, when the FortiGate does learn 2003:172:28:1::/64, it advertises local
route 2003:172:22:1::/64 to the secondary router. The BGP conditional advertisement condition is set to be true if the
condition route map is matched (exist).
1. Configure BGP:
config router bgp
config neighbor
edit "2003::2:2:2:2"
config conditional-advertise6
edit "map-221"
set condition-routemap "map-281"
set condition-type exist
next
end
next
end
end
When the FortiGate learns 2003:172:28:1::/64, it will advertise its local route 2003:172:22:1::/64 to neighbor
2003::2:2:2:2. If the FortiGate has not learned route 2003:172:28:1::/64, it will not advertise its local route
2003:172:22:1::/64 to neighbor 2003::2:2:2:2.
The FortiGate uses one of the three approaches to handle malformed attributes in BGP UPDATE messages, in order of
decreasing severity:
1. Notification and Session reset
2. Treat-as-withdraw
3. Attribute discard
When a BGP UPDATE message contains multiple malformed attributes, the most severe approach that is triggered by
one of the attributes is followed. See RFC 7606 for more information.
The following table lists the BGP attributes, and how FortiGate handles a malformed attribute in the UPDATE message:
Unknown If the BGP flag does not indicate that this is an optional attribute, this malformed
attribute is handled by the notification message approach.
This example shows how the ORIGIN attribute can be malformed, and how it is handled.
ORIGIN attribute length not one The prefix will be gone and the BGP session will not be reset.
ORIGIN attribute value is invalid The prefix will be gone and the BGP session will not be reset.
Two ORIGIN attributes with The attributes are ignored, the BGP session will not be reset, and the BGP route
different values will remain.
For example, if the FortiGate receives a malformed UPDATE packet from the neighbor at 27.1.1.124 that has no ORIGIN
attribute, the BGP session is reset and the state of the neighbor is shown as Idle, the first state of the BGP
neighborship connection.
# get router info bgp summary
VRF 0 BGP router identifier 27.1.1.125, local AS number 125
BGP table version is 6
1 BGP AS-PATH entries
0 BGP community entries
Tag-match mode can be configured to increase flexibility when controlling how BGP routes' next hops are resolved:
config router bgp
set tag-resolve-mode {disable | preferred | merge}
end
Best-match (disable) Resolve the BGP route's next hops with best-matched routes. This is the default
setting.
Tag-match (preferred) Resolve the BGP route's next hops with routes that have the same tag. If there
are no results, resolve the next hops with best-matched routes.
Tag-and-best-match (merge) Merge tag-match with best-match if they are using different routes, then let
shortcuts hide their parents. The results exclude the next hops of tag-match
whose interfaces have appeared in best-match.
In these examples:
l Each spoke has two IPsec tunnels to each hub, and one BGP peer on loopback interface to each hub (route-
reflector).
l The loopbacks are exchanged with IKE between the spokes and hubs. They are installed as static routes that are
used to provide reachability for establishing BGP neighbors.
l The summary BGP routes from the loopback IP address ranges that originated on the hubs are advertised to the
spokes for resolving the BGP next hop s on the spokes.
l The spokes' PC LAN subnets are reflected by the hubs.
l Spoke_1 receives BGP routes (the LAN subnet and loopback IP summary) from Hub_1 with tag 1 and from Hub_2
with tag 2.
l SD-WAN is enabled on Spoke_1, and all of the tunnels are SD-WAN members.
If the connections between Hub_1 and Spoke_2 are down, traffic from PC_3 to PC_4 can still go through Hub_1
because of the best-match resolving on Spoke_1, but packets will be dropped on Hub_1. When tag-match is enabled on
Spoke_1, the spoke will resolve the PC_4 LAN route to Hub2, and traffic will be forwarded to Hub_2 and reach its
destination.
172.31.0.0/25 is the loopback IP summary originated by both Hub_1 and Hub_2. The next hop of the PC_4 LAN
route is resolved to Hub_1 (H1_T11, H1_T22) and Hub_2 (H2_T11, H2_T22) based on the loopback IP summary
route.
2. When connections between Spoke_2 and Hub_1 fails due to the BGP neighbor, tunnels, or physical ports going
down, the PC_4 LAN route can be still resolved to Hub_1 and Hub_2 because the loopback IP summary can still be
received from both Hub_1 and Hub_2:
Spoke_1(root) # get router info routing-table all
C 10.0.3.0/24 is directly connected, port4
B 10.0.4.0/24 [200/0] via 172.31.0.66 (recursive via H1_T11 tunnel 172.31.1.1),
00:03:06
(recursive via H1_T22 tunnel 10.0.0.2), 00:03:06
(recursive via H2_T11 tunnel 172.31.1.101), 00:03:06
(recursive via H2_T22 tunnel 10.0.0.4), 00:03:06
B 172.31.0.0/25 [200/0] via 172.31.0.1 (recursive via H1_T11 tunnel 172.31.1.1),
23:55:34
(recursive via H1_T22 tunnel 10.0.0.2), 23:55:34
[200/0] via 172.31.0.2 (recursive via H2_T11 tunnel 172.31.1.101), 23:55:34
(recursive via H2_T22 tunnel 10.0.0.4), 23:55:34
...
3. If traffic sent from PC_3 to PC_4 goes through Hub_1, packets are dropped because there is no PC_4 LAN route on
Hub_1:
Spoke_1 (root) # diagnose sniffer packet any 'host 10.0.4.2' 4
interfaces=[any]
filters=[host 10.0.4.2]
11.261264 port4 in 10.0.3.2 -> 10.0.4.2: icmp: echo request
11.261349 H1_T11 out 10.0.3.2 -> 10.0.4.2: icmp: echo request
12.260268 port4 in 10.0.3.2 -> 10.0.4.2: icmp: echo request
12.260291 H1_T11 out 10.0.3.2 -> 10.0.4.2: icmp: echo request
4. If the tag-match mode is set to tag-match (preferred) on Spoke_1, then the PC_4 LAN route can only be resolved
to Hub_2 because of tag-match checking:
Spoke_1(root) # get router info routing-table all
C 10.0.3.0/24 is directly connected, port4
B 10.0.4.0/24 [200/0] via 172.31.0.66 tag 2 (recursive via H2_T11 tunnel
172.31.1.101), 00:02:35
(recursive via H2_T22 tunnel 10.0.0.4), 00:02:35
B 172.31.0.0/25 [200/0] via 172.31.0.1 tag 1 (recursive via H1_T11 tunnel
172.31.1.1), 03:18:41
(recursive via H1_T22 tunnel 10.0.0.2), 03:18:41
[200/0] via 172.31.0.2 tag 2 (recursive via H2_T11 tunnel 172.31.1.101),
03:18:41
(recursive via H2_T22 tunnel 10.0.0.4), 03:18:41
...
Spoke_1 (root) # get router info routing-table details 10.0.4.0/24
5. If traffic is again sent from PC_3 to PC_4, it will go through Hub_2 and reach the destination:
Spoke_1 (root) # diagnose sniffer packet any 'host 10.0.4.2' 4
interfaces=[any]
filters=[host 10.0.4.2]
7.216948 port4 in 10.0.3.2 -> 10.0.4.2: icmp: echo request
7.217035 H2_T11 out 10.0.3.2 -> 10.0.4.2: icmp: echo request
7.217682 H2_T11 in 10.0.4.2 -> 10.0.3.2: icmp: echo reply
7.217729 port4 out 10.0.4.2 -> 10.0.3.2: icmp: echo reply
After the shortcut from Spoke_1 to Spoke_2 is established, Spoke_1 will only resolve the PC_4 LAN route to the
shortcut, because of best-match resolving, prohibiting SD-WAN failover. When tag-and-best-match is enabled on
Spoke_1, the spoke can resolve the PC_4 LAN route to the shortcut and to other alternative tunnels, allowing SD-WAN
failover.
1. Unset tag-resolve-mode and resume the connections between Spoke_2 and Hub_1. The routing table on
Spoke_1 changes to the initial state:
Spoke_1(root) # get router info routing-table all
C 10.0.3.0/24 is directly connected, port4
B 10.0.4.0/24 [200/0] via 172.31.0.66 [2] (recursive via H1_T11 tunnel
172.31.1.1), 00:01:54
(recursive via H1_T22 tunnel 10.0.0.2), 00:01:54
(recursive via H2_T11 tunnel 172.31.1.101), 00:01:54
(recursive via H2_T22 tunnel 10.0.0.4), 00:01:54
B 172.31.0.0/25 [200/0] via 172.31.0.1 (recursive via H1_T11 tunnel 172.31.1.1),
03:30:35
(recursive via H1_T22 tunnel 10.0.0.2), 03:30:35
[200/0] via 172.31.0.2 (recursive via H2_T11 tunnel 172.31.1.101), 03:30:35
(recursive via H2_T22 tunnel 10.0.0.4), 03:30:35
S 172.31.0.1/32 [15/0] via H1_T11 tunnel 172.31.1.1, [1/0]
[15/0] via H1_T22 tunnel 10.0.0.2, [1/0]
S 172.31.0.2/32 [15/0] via H2_T11 tunnel 172.31.1.101, [1/0]
[15/0] via H2_T22 tunnel 10.0.0.4, [1/0]
C 172.31.0.65/32 is directly connected, Loopback0
...
3. If the tag-match mode is set to tag-and-best-match (merge) on Spoke_1, then the PC_4 LAN route is resolved to
the H1_T11_0 shortcut based on best-match resolving, and to H1_T11, H1_T22, H2_T11, H2_T22 based on
tag-match resolving. It is then resolved to H1_T11, H1_T22, H2_T11, H2_T22 after letting the shortcut hide its
parent tunnel.
Spoke_1 (root) # get router info routing-table all
C 10.0.3.0/24 is directly connected, port4
B 10.0.4.0/24 [200/0] via 172.31.0.66 tag 1 (recursive via H1_T11_0 tunnel
10.0.0.40), 00:07:36
(recursive via H1_T22 tunnel 10.0.0.2), 00:07:36
[200/0] via 172.31.0.66 tag 2 (recursive via H1_T11_0 tunnel 10.0.0.40),
00:07:36
(recursive via H2_T11 tunnel 172.31.1.101), 00:07:36
(recursive via H2_T22 tunnel 10.0.0.4), 00:07:36
B 172.31.0.0/25 [200/0] via 172.31.0.1 tag 1 (recursive via H1_T11 tunnel
172.31.1.1), 03:48:26
(recursive via H1_T22 tunnel 10.0.0.2), 03:48:26
[200/0] via 172.31.0.2 tag 2 (recursive via H2_T11 tunnel 172.31.1.101),
03:48:26
(recursive via H2_T22 tunnel 10.0.0.4), 03:48:26
S 172.31.0.1/32 [15/0] via H1_T11 tunnel 172.31.1.1, [1/0]
[15/0] via H1_T22 tunnel 10.0.0.2, [1/0]
S 172.31.0.2/32 [15/0] via H2_T11 tunnel 172.31.1.101, [1/0]
[15/0] via H2_T22 tunnel 10.0.0.4, [1/0]
C 172.31.0.65/32 is directly connected, Loopback0
S 172.31.0.66/32 [15/0] via H1_T11_0 tunnel 10.0.0.40, [1/0]
...
Spoke_1 (root) # get router info routing-table details 10.0.4.0/24
4. If the H1_T11_0 shortcut goes out of SLA, traffic will switch to tunnel H1_T22 and shortcut H1_T22_0 is triggered.
The PC_4 LAN route is resolved to H1_T11, H1_T22, H2_T11, H2_T22.
Spoke_1 (root) # get router info routing-table all
C 10.0.3.0/24 is directly connected, port4
Members(2):
1: Seq_num(6 H2_T11), alive, sla(0x1), gid(0), cfg_order(0), cost(0), selected
2: Seq_num(9 H2_T22), alive, sla(0x1), gid(0), cfg_order(3), cost(0), selected
Src address(1):
10.0.0.0-10.255.255.255
Dst address(1):
10.0.0.0-10.255.255.255
Troubleshooting BGP
There are some features in BGP that are used to deal with problems that may arise. Typically, the problems with a BGP
network that has been configured involve routes going offline frequently. This is called route flap and causes problems
for the routers using that route.
To see if a new route is being properly added to the routing table, you can clear all or some BGP neighbor connections
(sessions) using the execute router clear bgp command.
For example, if you have 10 routes in the BGP routing table and you want to clear the specific route to IP address
10.10.10.1, enter the following CLI command:
# execute router clear bgp ip 10.10.10.1
To remove all routes for AS number 650001, enter the following CLI command:
# execute router clear bgp as 650001
Route flap
When routers or hardware along a route go offline and back online that is called a route flap. Flapping is the term that is
used if these outages continue, especially if they occur frequently.
Route flap is a problem in BGP because each time a peer or a route goes down, all the peer routers that are connected to
that out-of-service router advertise the change in their routing tables. This creates a lot of administration traffic on the
network and the same traffic re-occurs when that router comes back online. If the problem is something like a faulty
network cable that alternates online and offline every 10 seconds, there could easily be an overwhelming amount of
routing updates sent out unnecessarily.
Another possible reason for route flap occurs with multiple FortiGate devices in HA mode. When an HA cluster fails over
to the secondary unit, other routers on the network may see the HA cluster as being offline, resulting in route flap. While
this doesn't occur often, or more than once at a time, it can still result in an interruption in traffic which is disruptive for
network users. The easy solution for this problem is to increase the timers on the HA cluster, such as TTL timers, so they
don't expire during the failover process. Also, configuring graceful restart on the HA cluster helps with a smooth failover.
The first method of dealing with route flap is to check your hardware. If a cable is loose or bad, it can easily be replaced
and eliminate the problem. If an interface on the router is bad, either avoid using that interface or swap in a functioning
router. If the power source is bad on a router, either replace the power supply or use a power conditioning backup power
supply. These quick and easy fixes can save you from configuring more complex BGP options. However, if the route flap
is from another source, configuring BGP to deal with the outages will ensure your network users uninterrupted service.
Some methods of dealing with route flap in BGP include:
l Holdtime timer on page 380
l Dampening on page 380
Holdtime timer
The first step to troubleshooting a flapping route is the holdtime timer. This timer reduces how frequently a route going
down will cause a routing update to be broadcast.
Once activated, the holdtime timer won't allow the FortiGate to accept any changes to that route for the duration of the
timer. If the route flaps five times during the timer period, only the first outage will be recognized by the FortiGate. For the
duration of the other outages, there won't be changes because the Fortigate is essentially treating this router as down. If
the route is still flapping after the timer expires, it will start again.
If the route isn't flapping (for example, if it goes down, comes up, and stays back up) the timer will still count down and the
route is ignored for the duration of the timer. In this situation, the route is seen as down longer than it really is but there
will be only the one set of route updates. This isn't a problem in normal operation because updates are not frequent.
The potential for a route to be treated as down when it's really up can be viewed as a robustness feature. Typically, you
don't want most of your traffic being routed over an unreliable route. So if there's route flap going on, it's best to avoid that
route if you can. This is enforced by the holdtime timer.
There are three different route flapping situations that can occur: the route goes up and down frequently, the route goes
down and back up once over a long period of time, or the route goes down and stays down for a long period of time.
These can all be handled using the holdtime timer.
For example, your network has two routes that you want to set the timer for. One is your main route (to 10.12.101.4) that
all of your Internet traffic goes through, and it can't be down for long if it's down. The second is a low speed connection to
a custom network that's used infrequently (to 10.13.101.4). The timer for the main route should be fairly short (for
example, 60 seconds). The second route timer can be left at the default, since it's rarely used.
Dampening
Dampening is a method that's used to limit the amount of network problems due to flapping routes. With dampening, the
flapping still occurs but the peer routers pay less and less attention to that route as it flaps more often. One flap doesn't
start dampening, but the second flap starts a timer where the router won't use that route because it is considered
unstable. If the route flaps again before the timer expires, the timer continues to increase. There's a period of time called
the reachability half-life, after which a route flap will be suppressed for only half the time. This half-life comes into effect
when a route has been stable for a while but not long enough to clear all the dampening completely. For the flapping
route to be included in the routing table again, the suppression time must expire.
If the route flapping was temporary, you can clear the flapping or dampening from the FortiGate device's cache by using
one of the execute router clear bgp CLI commands:
# execute router clear bgp dampening {<ip_address> | <ip_address/netmask>}
or
# execute router clear bgp flap-statistics {<ip_address> | <ip_address/netmask>}
For example, to remove route flap dampening information for the 10.10.0.0/16 subnet, enter the following CLI command:
# execute router clear bgp dampening 10.10.0.0/16
Graceful restart
next
end
end
Before the restart, the router sends its peers a message to say it's restarting. The peers mark all the restarting router's
routes as stale, but they continue to use the routes. The peers assume the router will restart, check its routes, and take
care of them, if needed, after the restart is complete. The peers also know what services the restarting router can
maintain during its restart. After the router completes the restart, the router sends its peers a message to say it's done
restarting.
Graceful restart is a means for a router to advertise that it is going to have a scheduled shutdown for a very short period
of time. When neighboring routers receive this notice, they will not remove that router from their routing table until after a
set time elapses. During that time, if the router comes back online, everything continues to function as normal. If that
router remains offline longer than expected, then the neighboring routers will update their routing tables as they assume
that the router will be offline for a long time.
The following example demonstrates if you want to configure graceful restart on the FortiGate where you expect the
FortiGate to be offline for no more than two minutes, and after three minutes the BGP network should consider the
FortiGate to be offline.
BFD
Bidirectional Forwarding Detection (BFD) is a protocol that you can use to quickly locate hardware failures in the
network. Routers running BFD communicate with each other and if a timer runs out on a connection then that router is
declared down. BFD then communicates this information to the routing protocol and the routing information is updated.
For more information about BFD, see BFD on page 383.
Sometimes the FortiGate may receive multiple BGP paths from neighbors and must decide which is the best path to
take. The following criteria are used to determine the best path.
Consider only routes with no AS loops and a valid next hop, and then:
1. Prefer the highest weight (this attribute is local to the FortiGate).
2. Prefer the highest local preference (applicable within AS).
3. Prefer the route originated by the local router (next hop = 0.0.0.0).
4. Prefer the shortest AS path.
5. Prefer the lowest origin code (IGP > EGP > incomplete).
BFD
Bidirectional Forwarding Detection (BFD) is a protocol that you can use to quickly locate hardware failures in the
network. Routers running BFD send packets to each other at a negotiated rate. If packets from a BFD-enabled router fail
to arrive, that router is declared to be down. BFD communicates this information to the associated routing protocols and
the routing information is updated. It helps detect one way device failure and is used for fast convergence of routing
protocols.
BFD can run on an entire FortiGate, selected interfaces, or on a protocol, such as BGP, for all configured interfaces. The
configuration hierarchy allows each lower level to override the BFD setting of the upper level. For example, if you enable
BFD for an entire FortiGate, you can disable BFD for an interface or for BGP.
Echo mode and authentication are not supported for BFD on the FortiGate.
BFD can be enabled per device, VDOM, or interface. Once enabled, a BFD neighbor should be defined. Finally, enable
BFD on a route or routing protocol.
BFD for static routes allows you to configure routing failover based on remote path failure detection. BFD removes a
static route from the routing table if the FortiGate can't reach the route's destination and returns the route to the routing
table if the route's destination is restored.
For example, you can add two static routes with BFD enabled. If one of the routes has a higher priority, all matching
traffic uses that route. If BFD determines that the link to the gateway of the route with the higher priority is down, the
higher priority route is removed from the routing table and all matching traffic uses the lower priority route. If the link to
the gateway for the higher priority route comes back up, BFD adds the route back into the routing table and all matching
traffic switches to use the higher priority route.
You can configure BFD for IPv4 and IPv6 static routes.
Example
The following example demonstrates the configuration of static routes between two FortiGates. There is a host behind
FortiGate 2 with an IP address of 1.1.1.1. FortiGate 1 has multiple paths to reach the host.
1. Configure FortiGate 1:
config system interface
edit "port1"
set vdom "root"
set ip 10.180.6.237 255.255.240.0
set allowaccess ping
set bfd enable
next
end
config router bfd
config neighbor
edit 10.180.4.136
set interface "port1"
next
end
end
2. Configure FortiGate 2:
config system interface
edit "port1"
set vdom "root"
set ip 10.180.4.136 255.255.240.0
set allowaccess ping
set bfd enable
next
end
config router bfd
config neighbor
edit 10.180.6.237
set interface "port1"
next
end
end
The route with the lower distance is preferred in the routing table.
If port1 on FortiGate 2 goes down or FortiGate 1 is unable to reach 10.180.4.126, the BFD neighborship will go down.
# get router info bfd neighbor
OurAddress NeighAddress State Interface LDesc/RDesc
10.180.6.237 10.180.4.136 DOWN port1 1/1
With BFD neighborship down, the FortiGate is unable to reach 1.1.1.1/32 through gateway 10.180.4.136. The routing
table will be updated so that the route through gateway 10.180.2.44 is active in the routing table.
# get router info routing-table all
S 1.1.1.1/32 [20/0] via 10.180.2.44, port1
C 10.180.0.0/20 is directly connected, port1
BFD removes a static route from the routing table if the FortiGate cannot reach the route's destination. The static route
will be returned to the routing table is the route's destination is restored.
You can configure BFD for Open Shortest Path First (OSPF) on a FortiGate. FortiGate supports BFD for OSPF for both
IPv4 and IPv6. BFD must be configured globally and per interface.
If BFD is configured when OSPF is not, no BFD packets will be sent. When both BFD and OSFP are configured, the
neighbors for both will be the same. Use the following commands to confirm that the neighbor IP addresses match:
# get router info ospf neighbor
# get router info bfd neighbor
While BGP can detect route failures, BFD can be configured to detect these failures more quickly, which allows for faster
responses and improved convergence. This can be balanced with the bandwidth BFD uses in its frequent route
checking.
The config router bgp commands allow you to set the addresses of the neighbor units that are also running BFD.
Both units must be configured with BFD in order to use it.
FortiGate BFD can support neighbors connected over multiple hops. When BFD is down, BGP sessions will be reset and
will try to re-establish neighbor connection immediately. See BFD for multihop path for BGP on page 388 for more
information.
Troubleshooting BFD
In BFD, a FortiGate can support neighbors connected over multiple hops. When BFD is down, BGP sessions are reset
and will try to immediately re-establish neighbor connections. Previously, BFD was only supported when two routers or
FortiGates were directly connected on the same network.
config router {bfd | bfd6}
config multihop-template
edit <ID>
set src <class_IP/netmask>
set dst <class_IP/netmask>
set bfd-desired-min-tx <integer>
set bfd-required-min-rx <integer>
set bfd-detect-mult <integer>
set auth-mode {none | md5}
set md5-key <password>
next
end
end
Example
This example includes IPv4 and IPv6 BFD neighbor configurations. The BFD neighbor is also a BGP neighbor that is in a
different AS.
4. The BGP neighbor is reset, and the FortiGate attempts to re-establish a connection with the neighbor. The timers
are reset once the neighbor connection is re-established:
# get router info bgp summary
VRF 0 BGP router identifier 1.1.1.1, local AS number 65412
BGP table version is 12
4 BGP AS-PATH entries
0 BGP community entries
5. The BGP routes are learned again, and there are new timers in the route tables:
# get router info routing-table bgp
Routing table for VRF=0
B 172.28.1.0/24 [20/0] via 172.16.201.2 (recursive via 172.16.200.4, port1),
00:00:15
B 172.28.2.0/24 [20/0] via 172.16.201.2 (recursive via 172.16.200.4, port1),
00:00:15
B 172.28.5.0/24 [20/0] via 172.16.201.2 (recursive via 172.16.200.4, port1),
00:00:15
B 172.28.6.0/24 [20/0] via 172.16.201.2 (recursive via 172.16.200.4, port1),
00:00:15
# get router info6 routing-table bgp
Routing table for VRF=0
B 2000:172:28:1::/64 [20/0] via 2000:172:16:201::2 (recursive via
2000:172:16:200::4, port1), 00:00:13
B 2000:172:28:2::/64 [20/0] via 2000:172:16:201::2 (recursive via
2000:172:16:200::4, port1), 00:00:13
B 2000:172:28:3::/64 [20/0] via 2000:172:16:201::2 (recursive via
2000:172:16:200::4, port1), 00:00:13
Routing objects
The following objects can be configured from the Network > Routing Objects page:
l Route maps on page 392
l Access lists on page 395
l Prefix lists on page 397
l AS path lists on page 400
l Community lists on page 401
Route maps
Route maps are a powerful tool to apply custom actions to dynamic routing protocols based on specific conditions. They
are used primarily in BGP to manipulate routes advertised by the FortiGate (route-map-out) or received routes from
other BGP routers (route-map-in).
Route maps can be used in OSPF for conditional default-information-originate, filtering external routes, or
matching specific routes for redistribution. Similarly, route maps can be used by RIP to match routes for redistribution.
A route map may have multiple rules that are processed from the top down. Each rule has an action to permit or deny.
The rules have criteria for matching a route based on various attributes, or setting attributes based on a matched route.
For example, a route map can be used to match BGP routes with a certain community string, and then set an AS path to
the matching route. This can be applied to a BGP neighbor by configuring the route map in setting for that neighbor.
To configure a route map that matches criteria based on other routing objects:
Route maps can be used by various routing protocols, such as RIP, OSPF, and BGP.
Access lists
Access lists are simple lists used for filtering routes based on a prefix consisting of an IPv4 or IPv6 address and netmask.
In RIP, an access list can be used in the distribute-list setting to filter received or advertised routes, or in an
offset-list to offset the hop count metric for a specific prefix.
In OSPF, an access list can be used in the distribute-list-in setting to act as a filter to prevent a certain route
from being inserted into the routing table. An access list can also be used in the distribute-list to filter the routes
that can be distributed from other protocols.
In BGP, an access list can be used to filter updates from a neighbor or to a neighbor.
distribute-list-in Enter the filter for IPv4 updates from this neighbor.
<string>
distribute-list-in6 Enter the filter for IPv6 updates from this neighbor.
<string>
distribute-list-in-vpnv4 Enter the filter for VPNv4 updates from this neighbor.
<string>
distribute-list-out Enter the filter for IPv4 updates to this neighbor.
<string>
distribute-list-out6 Enter the filter for IPv6 updates to this neighbor.
<string>
distribute-list-out-vpnv4 Enter the filter for VPNv4 updates to this neighbor.
<string>
In a route map, an access list can be used to match IP addresses and next hops.
Prefix lists
Similar to access lists, prefix lists are simple lists used for filtering routes based on a prefix consisting of an IPv4 or IPv6
address and netmask, but they use settings to specify the minimum (ge, greater than or equal) and maximum (le, less
than or equal) prefix length to be matched. For example, a prefix of 10.0.0.0/8 with a ge of 16 will match anything in the
10.0.0.0/8 network with /16 or above; 10.10.0.0/16 will match, and 10.10.0.0/12 will not match.
In RIP, an prefix list can be used in the distribute-list setting to filter received or advertised routes.
In OSPF, a prefix list can be used in the distribute-list-in setting to act as a filter to prevent a certain route from
being inserted into the routing table.
In BGP, a prefix list can be used to filter updates from a neighbor or to a neighbor.
prefix-list-in <string> Enter the IPv4 inbound filter for updates from this neighbor.
prefix-list-in6 <string> Enter the IPv6 inbound filter for updates from this neighbor.
prefix-list-in-vpnv4 Enter the inbound filter for VPNv4 updates from this neighbor.
<string>
prefix-list-out <string> Enter the IPv4 outbound filter for updates to this neighbor.
prefix-list-out6 <string> Enter the IPv6 outbound filter for updates to this neighbor.
prefix-list-out-vpnv4 Enter the outbound filter for VPNv4 updates to this neighbor.
<string>
In a route map, a prefix list can be used to match IP addresses and next hops.
match-ip-nexthop <string> Match a next hop IPv4 address passed by access-list or prefix-list.
match-ip6-nexthop Match a next hop IPv6 address passed by access-list6 or prefix-list6.
<string>
AS path lists
AS path lists use regular expressions to compare and match the AS_PATH attribute for a BGP route. They can be used
to filter inbound or outbound routes from a BGP neighbor, or as matching criteria in a route map to match an AS_PATH in
a BGP route.
filter-list-in <string> Enter the BGP filter for IPv4 inbound routes.
filter-list-in6 <string> Enter the BGP filter for IPv6 inbound routes.
filter-list-out <string> Enter the BGP filter for IPv4 outbound routes.
filter-list-out6 <string> Enter the BGP filter for IPv6 outbound routes.
next
end
Community lists
Community lists provide a means to filter BGP routes using a community string. They can be applied in a route map to
match routes that have the community string defined in the community list.
Multicast
Multicasting (also called IP multicasting) consists of using a single multicast source to send data to many receivers.
Multicasting can be used to send data to many receivers simultaneously while conserving bandwidth and reducing
network traffic. Multicasting can be used for one-way delivery of media streams to multiple receivers and for one-way
data transmission for news feeds, financial information, and so on. Many dynamic routing protocols such as RIPv2,
OSPF, and EIGRP use multicasting to share hello packets and routing information.
A FortiGate can operate as a Protocol Independent Multicast (PIM) version 2 router. FortiGates support PIM sparse
mode (RFC 4601) and PIM dense mode (RFC 3973), and can service multicast servers or receivers on the network
segment to which a FortiGate interface is connected. Multicast routing is not supported in transparent mode.
To support PIM communications, the sending and receiving applications, and all connecting PIM routers in between,
must be enabled with PIM version 2. PIM can use static routes, RIP, OSPF, or BGP to forward multicast packets to their
destinations. To enable source-to-destination packet delivery, sparse mode or dense mode must be enabled on the PIM
router interfaces. Sparse mode routers cannot send multicast messages to dense mode routers. If the FortiGate is
located between a source and a PIM router, between two PIM routers, or is connected directly to a receiver, you must
manually create a multicast policy to pass encapsulated (multicast) packets or decapsulated data (IP traffic) between the
source and destination.
PIM domains
A PIM domain is a logical area comprising a number of contiguous networks. The domain contains at least one bootstrap
router (BSR), and if sparse mode is enabled, a number of rendezvous points (RPs) and designated routers (DRs). When
PIM is enabled, the FortiGate can perform any of these functions at any time as configured.
A PIM domain can be configured in the GUI by going to Network > Multicast, or in the CLI using config router
multicast. Note that PIM version 2 must be enabled on all participating routers between the source and receivers. Use
config router multicast to set the global operating parameters.
When PIM is enabled, the FortiGate allocates memory to manage mapping information. The FortiGate communicates
with neighboring PIM routers to acquire mapping information and, if required, processes the multicast traffic associated
with specific multicast groups.
Instead of sending multiple copies of generated IP traffic to more than one specific IP destination address, PIM-enabled
routers encapsulate the data and use a Class D multicast group address (224.0.0.0 to 239.255.255.255) to forward
multicast packets to multiple destinations. A single stream of data can be sent because one destination address is used.
Client applications receive multicast data by requesting that the traffic destined for a certain multicast group address be
delivered to them.
There is sometimes confusion between the terms forwarding and routing. These two functions should not take place at
the same time. Multicast forwarding should be enabled when the FortiGate is in NAT mode and you want to forward
multicast packets between multicast routers and receivers. However, this function should not be enabled when the
FortiGate itself is operating as a multicast router, or has an applicable routing protocol that uses multicast.
Multicast forwarding is not supported on enhanced MAC VLAN interfaces. To use multicast with enhanced MAC VLAN
interfaces, use PIM (Multicast routing and PIM support on page 402).
There are two steps to configure multicast forwarding:
1. Enabling multicast forwarding on page 403
2. Configuring multicast policies on page 404
Multicast forwarding is enabled by default. If a FortiGate is operating in transparent mode, adding a multicast policy
enables multicast forwarding. In NAT mode you must use the multicast-forward setting to enable or disable
multicast forwarding.
When multicast-forward is enabled, the FortiGate forwards any multicast IP packets in which the TTL is 2 or higher
to all interfaces and VLAN interfaces, except the receiving interface. The TTL in the IP header will be reduced by 1. Even
though the multicast packets are forwarded to all interfaces, you must add multicast policies to allow multicast packets
through the FortiGate.
You can use the multicast-ttl-notchange option so that the FortiGate does not increase the TTL value for
forwarded multicast packets. Use this option only if packets are expiring before reaching the multicast router.
Disable multicast traffic from passing through the FortiGate without a policy check in
transparent mode
In transparent mode, the FortiGate does not forward frames with multicast destination addresses. The FortiGate should
not interfere with the multicast traffic used by routing protocols, streaming media, or other multicast communication. To
avoid any issues during transmission, you can disable multicast-skip-policy and configure multicast security
policies.
To disable multicast traffic from passing through the FortiGate without a policy check in transparent
mode:
end
Multicast packets require multicast policies to allow packets to pass from one interface to another. Similar to firewall
policies, in a multicast policy you specify the source and destination interfaces, and the allowed address ranges for the
source and destination addresses of the packets. You can also use multicast policies to configure source NAT and
destination NAT for multicast packets.
Keep the following in mind when configuring multicast policies:
l The matched forwarded (outgoing) IP multicast source IP address is changed to the configured IP address.
l The snat setting is optional. Use it when SNAT is needed.
IPv4 and IPv6 multicast policies can be configured in the GUI. Go to System > Feature
Visibility, and enable Multicast Policy and IPv6.
In this basic policy, multicast packets received on an interface are flooded unconditionally to all interfaces on the
forwarding domain, except the incoming interface.
config firewall multicast-policy
edit 1
set srcintf "any"
set dstintf "any"
set srcaddr "all"
set dstaddr "all"
next
end
The destination address (dstaddr) is a multicast address object. The all option corresponds to all multicast addresses
in the range 224.0.0.0-239.255.255.255.
This multicast policy only applies to the source port wan1 and the destination port internal.
config firewall multicast-policy
edit 1
set srcintf "wan1"
set dstintf "internal"
set srcaddr "all"
set dstaddr "all"
next
end
In this policy, packets are allowed to flow from wan1 to internal, and sourced by the address 172.20.120.129, which is
represented by the example_addr-1 address object.
This policy accepts multicast packets that are sent from a PC with IP address 192.168.5.18 to destination address range
239.168.4.0-255. The policy allows the multicast packets to enter the internal interface and then exit the external
interface. When the packets leave the external interface, their source address is translated to 192.168.18.10.
config firewall address
edit "192.168.5.18"
set subnet 192.168.5.18 255.255.255.255
next
end
config firewall multicast-address
edit "239.168.4.0"
set start-ip 239.168.4.0
set end-ip 239.168.4.255
next
end
config firewall multicast-policy
edit 1
set srcintf "internal"
set dstintf "external"
set srcaddr "192.168.5.18"
set dstaddr "239.168.4.0"
set snat enable
set snat-ip 192.168.18.10
next
end
To configure multicast policies in the GUI, enable Multicast Policy in System > Feature
Visibility.
FortiExtender
There are two configuration modes available on the FortiGate for FortiExtender integration: WAN extension mode and
LAN extension mode.
In WAN extension mode, the FortiExtender works as an extended WAN interface in IP pass-through mode. The
FortiGate manages FortiExtender over the CAPWAP protocol in IP pass-through mode, and is integrated into FortiOS as
a manageable interface.
Sample configurations in WAN extension mode could include connecting a FortiExtender to two FortiGates in HA active-
passive mode, or connecting two FortiExtenders to two FortiGates in HA active-active mode to provide dual active
redundancy for wireless WAN access.
For more information, see FortiExtender and FortiGate integration in the FortiExtender (Managed) Administration Guide.
The LAN extension configuration mode allows FortiExtender to provide remote thin edge connectivity back to the
FortiGate over a backhaul connection. A FortiExtender deployed at a remote location will discover the FortiGate access
controller (AC) and form an IPsec tunnel (or multiple tunnels when multiple links exist on the FortiExtender) back to the
FortiGate. A VXLAN is established over the IPsec tunnels to create an L2 network between the FortiGate and the
network behind the remote FortiExtender.
For more information, see FortiExtender as FortiGate LAN extension in the FortiExtender (Managed) Administration
Guide.
Adding a FortiExtender
To add a FortiExtender to the FortiGate, create a virtual FortiExtender interface, then add a FortiExtender and assign the
interface to the modem. Like other interface types, the FortiExtender interface can be used in static routes, SD-WAN
(see Manage dual FortiExtender devices), policies, and other functions.
4. Click OK.
7. Click OK.
8. In the extenders list, right-click on the FortiExtender and select Diagnostics and Tools to review the modem and SIM
status, and other details about the FortiExtender.
Direct IP is a public IP address that is assigned to a computing device, which allows the device to directly access the
internet.
When an LTE modem is enabled in FortiOS, a DHCP interface is created. As a result, the FortiGate can acquire direct IP
(which includes IP, DNS, and gateway) from the LTE network carrier.
Since some LTE modems require users to input the access point name (APN) for the LTE network, the LTE modem
configuration allows you to set the APN.
Shortly after the LTE modem joins its carrier network, wwan is enabled and granted direct IP:
config system interface
edit wwan
get
name : wwan
....
ip : 100.112.75.43 255.255.255.248
....
status : up
....
defaultgw : enable
DHCP Gateway : 100.112.75.41
Lease Expires : Thu Feb 21 19:33:27 2019
dns-server-override : enable
Acquired DNS1 : 184.151.118.254
Acquired DNS2 : 70.28.245.227
....
PCs can reach the internet via the following firewall policy:
config firewall policy
edit 5
set name "LTE"
set srcintf "port9"
set dstintf "wwan"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set utm-status enable
set fsso disable
set nat enable
next
end
When an LTE modem is enabled, you can view the LTE interface in the GUI and check the acquired IP, DNS, and
gateway.
4. Click Return.
Limitations
l Most LTE modems have a preset APN in their SIM card. Therefore, the APN does not need to be set in the FortiOS
configuration. In cases where the internet cannot be accessed, consult with your carrier and set the APN in the LTE
modem configuration (for example, inet.bell.ca):
config system lte-modem
set status enable
set apn "inet.bell.ca"
end
l Some models, such as the FortiGate 30E-3G4G, have built-in LTE modems. In this scenario, the LTE modem is
enabled by default. The firewall policy via the LTE interface is also created by default. Once you plug in a SIM card,
your network devices can connect to the internet.
LLDP reception
Device detection can scan LLDP as a source for device identification, but the FortiGate does not read or store the full
information. Enabling LLDP reception allows the FortiGate to receive and store LLDP messages, learn about active
neighbors, and makes the LLDP information available via the CLI, REST API, and SNMP.
You need to enable device-identification at the interface level, and then lldp-reception can be enabled on
three levels: globally, per VDOM, or per interface.
Note that the port index in the output corresponds to the port index from the following command:
# diagnose netlink interface list port2 port3 | grep index
if=port2 family=00 type=1 index=4 mtu=1500 link=0 master=0
if=port3 family=00 type=1 index=5 mtu=1500 link=0 master=0
{
"http_method":"GET",
"results":[
{
"mac":"90:9c:9c:c9:c9:90",
"chassis_id":"90:9C:9C:C9:C9:90",
"port":19,
"port_id":"port12",
"port_desc":"port12",
"system_name":"S124DN3W00000000",
"system_desc":"FortiSwitch-124D v3.6.6,build0416,180515 (GA)",
"ttl":120,
"addresses":[
{
"type":"ipv4",
"address":"192.168.1.99"
}
]
}
],
"vdom":"root",
"path":"network",
"name":"lldp",
"action":"neighbors",
"status":"success",
"serial":"FG201E4Q00000000",
"version":"v6.2.0",
"build":866
}
{
"http_method":"GET",
"results":[
{
"name":"port1",
"rx":320,
"neighbors":1
}
],
"vdom":"root",
"path":"network",
"name":"lldp",
"action":"ports",
"mkey":"port1",
"status":"success",
"serial":"FG201E4Q00000000",
"version":"v6.2.0",
"build":866
}
Virtual Routing and Forwarding (VRF) is used to divide the FortiGate's routing functionality (layer 3), including interfaces,
routes, and forwarding tables, into separate units. Packets are only forwarded between interfaces that have the same
VRF.
VDOMs divide the FortiGate into two or more complete and independent virtual units that include all FortiGate functions.
VDOMs can be used for routing segmentation, but that should not be the only reason to implement them when a less
complex solution (VRFs) can be used. VDOMs also support administration boundaries, but VRFs do not.
Up to 64 VRFs can be configured per VDOM for devices that support 200 VDOMs, but only ten VDOMs can be
configured by default on a FortiGate (more VDOMs can be configured on larger devices with additional licenses).
l Implementing VRF on page 414
l VRF routing support on page 415
l Route leaking between VRFs with BGP on page 420
l Route leaking between multiple VRFs on page 422
l VRF with IPv6 on page 432
l IBGP and EBGP support in VRF on page 436
l Support cross-VRF local-in and local-out traffic for local services on page 438
Implementing VRF
VRFs are always enabled and, by default, all routing is done in VRF 0. To use additional VRFs, assign a VRF ID to an
interface. All routes relating to that interface are isolated to that VRF specific routing table. Interfaces in one VRF cannot
reach interfaces in a different VRF.
If some traffic does have to pass between VRFs, route leaking can be used. See Route leaking between VRFs with BGP
on page 420.
4. Click OK.
5. To add the VRF column in the interface table, click the gear icon, select VRF, and click Apply.
VRF supports static routing, OSPF, and BGP. Other routing protocols require using VDOMs.
BGP
In this example, BGP is used to update the VRF that it is neighbors with.
The hub is configured with two neighbors connected to two interfaces. The branches are configured to match the hub,
with branch networks configured to redistribute into BGP.
Policies must be created on the hub and branches to allow traffic between them.
To verify the BGP neighbors and check the routing table on the hub:
OSPF
OSPF routes in VRFs work the same as BGP: the interface that OSPF is using is added to the VRF.
1. Configure OSPF:
config router ospf
set router-id 1.1.1.1
config area
edit 0.0.0.0
next
end
config ospf-interface
edit Branch101
set interface “port2”
set dead-interval 40
set hello-interval 10
next
edit Branch102
set dead-interval 40
set hello-interval 10
next
end
config network
edit 0
set prefix 10.101.101.0 255.255.255.0
next
edit 0
set prefix 10.102.102.0 255.255.255.0
next
edit 0
set prefix 192.168.1.0 255.255.255.0
next
end
end
Route leaking allows you to configure communication between VRFs. If route leaking is not configured, then the VRFs
are isolated. This example shows route leaking with BGP using virtual inter-VDOM links.
In this example, a hub FortiGate forms BGP neighbors with two branches. It learns the networks 192.168.101.0/24 and
192.168.102.0/24 from the neighbors and separates them into VRF 10 and VRF 20.
To leak the learned routes to each other, an inter-VDOM link (IVL) is formed. An IVL normally bridges two VDOMs, but in
this case the links reside on the same VDOM and are used to bridge the two VRFs. NPU links could also be used on
models that support it to deliver better performance.
VRF 10 has a leaked route to 192.168.102.0/24 on IVL link-10-20-0, and VRF 20 has a leaked route to 192.168.101.0/24
on IVL link-10-20-1,
next
end
next
edit VRF20_Route
config rule
edit 1
set prefix 192.168.102.0 255.255.255.0
next
end
next
end
4. Configure the VRF leak in BGP, specifying a source VRF, destination VRF, an the route map to use:
config router bgp
config vrf-leak
edit "10"
config target
edit "20"
set route-map "Leak_from_VRF10_to_VRF20"
set interface "link-10-20-0"
next
end
next
edit "20"
config target
edit "10"
set route-map "Leak_from_VRF20_to_VRF10"
set interface "link-10-20-1"
next
end
next
end
end
In this example, routing leaking between three VRFs in a star topology is configured. This allows the solution to be
scaled to more VRFs without building full mesh, one-to-one connections between each pair of VRFs. VLAN
subinterfaces are created on VDOM links to connect each VRF to the central VRF, allowing routes to be leaked from a
VRF to the central VRF, and then to the other VRFs. Static routes are used for route leaking in this example.
For instructions on creating route leaking between two VRFs, see Route leaking between VRFs with BGP on page 420.
Physical topology:
Logical topology:
In this example, a specific route is leaked from each of the VRFs to each of the other VRFs. VLAN subinterfaces are
created based on VDOM links to connect each VRF to the core VRF router.
Multi VDOM mode is enabled so that NP VDOM links can be used. The setup could be configured without enabling multi
VDOM mode by manually creating non-NP VDOM links, but this is not recommended as the links are not offloaded to the
NPU.
After VDOMs are enabled, all of the configuration is done in the root VDOM.
If multi VDOM mode is not used, the VDOM links can be manually created:
config system vdom-link
edit <name of vdlink>
next
end
set vlanid 10
next
edit "vlink1_Vlan_10"
set vdom "root"
set vrf 31
set ip 10.1.1.2 255.255.255.252
set allowaccess ping https ssh http
set alias "vlink1_Vlan_10"
set role lan
set interface "npu0_vlink1"
set vlanid 10
next
edit "vlink0_Vlan_11"
set vdom "root"
set vrf 11
set ip 11.1.1.1 255.255.255.252
set allowaccess ping https ssh http
set alias "vlink0_Vlan_11"
set role lan
set interface "npu0_vlink0"
set vlanid 11
next
edit "vlink1_Vlan_11"
set vdom "root"
set vrf 31
set ip 11.1.1.2 255.255.255.252
set allowaccess ping https ssh http
set alias "vlink1_Vlan_11"
set role lan
set interface "npu0_vlink1"
set vlanid 11
next
edit "vlink0_Vlan_12"
set vdom "root"
set vrf 12
set ip 12.1.1.1 255.255.255.252
set allowaccess ping https ssh http
set alias "vlink0_Vlan_12"
set role lan
set interface "npu0_vlink0"
set vlanid 12
next
edit "vlink1_Vlan_12"
set vdom "root"
set vrf 31
set ip 12.1.1.2 255.255.255.252
set allowaccess ping https ssh http
set alias "vlink1_Vlan_12"
set role lan
set interface "npu0_vlink1"
set vlanid 12
next
end
4. Configure a zone to allow intrazone traffic between VLANs in the central VRF:
6. Configure VRF10, VRF11, and VRF12 on the Internal and WAN VLAN sub-interfaces:
config system interface
edit "Internal_VRF10"
set vdom "root"
set vrf 10
set ip 172.16.10.1 255.255.255.0
set allowaccess ping https ssh http
set alias "Internal_VRF10"
set role lan
set interface "internal"
set vlanid 10
next
edit "Internal_VRF11"
set vdom "root"
set vrf 11
set ip 172.16.11.1 255.255.255.0
set allowaccess ping https ssh http
set alias "Internal_VRF11"
set role lan
set interface "internal"
set vlanid 11
next
edit "Internal_VRF12"
set vdom "root"
set vrf 12
set ip 172.16.12.1 255.255.255.0
set allowaccess ping https ssh http
set alias "Internal_VRF12"
set role lan
set interface "internal"
set vlanid 12
next
edit "wan1_VRF10"
set vdom "root"
set vrf 10
set ip 202.100.10.1 255.255.255.0
set allowaccess ping
set alias "wan1_VRF10"
set role wan
set interface "wan1"
set vlanid 10
next
edit "wan1_VRF11"
set vdom "root"
set vrf 11
set ip 202.100.11.1 255.255.255.0
set allowaccess ping
set alias "wan1_VRF11"
set role wan
set interface "wan1"
set vlanid 11
next
edit "wan1_VRF12"
set vdom "root"
set vrf 12
set ip 202.100.12.1 255.255.255.0
set allowaccess ping
set alias "wan1_VRF12"
set role wan
set interface "wan1"
set vlanid 12
next
end
7. Configure static routing and route leaking between each VRF and Core-VRF-Router:
config router static
edit 1
set dst 172.16.10.0 255.255.255.0
set gateway 10.1.1.1
set device "vlink1_Vlan_10"
set comment "VRF31_Core_Router"
next
edit 2
set dst 172.16.11.0 255.255.255.0
set gateway 11.1.1.1
set device "vlink1_Vlan_11"
set comment "VRF31_Core_Router"
next
edit 3
set dst 172.16.12.0 255.255.255.0
set gateway 12.1.1.1
set device "vlink1_Vlan_12"
set comment "VRF31_Core_Router"
next
edit 4
set dst 172.16.11.0 255.255.255.0
set gateway 10.1.1.2
set device "vlink0_Vlan_10"
set comment "VRF10_Route_Leaking"
next
edit 5
set dst 172.16.12.0 255.255.255.0
set gateway 10.1.1.2
set device "vlink0_Vlan_10"
set comment "VRF10_Route_Leaking"
next
edit 6
set dst 172.16.10.0 255.255.255.0
set gateway 11.1.1.2
set device "vlink0_Vlan_11"
set comment "VRF11_Route_Leaking"
next
edit 7
set dst 172.16.12.0 255.255.255.0
set gateway 11.1.1.2
set device "vlink0_Vlan_11"
set comment "VRF11_Route_Leaking"
next
edit 8
set dst 172.16.10.0 255.255.255.0
set gateway 12.1.1.2
set device "vlink0_Vlan_12"
set comment "VRF12_Route_Leaking"
next
edit 9
set dst 172.16.11.0 255.255.255.0
set gateway 12.1.1.2
set device "vlink0_Vlan_12"
set comment "VRF12_Route_Leaking"
next
edit 10
set gateway 202.100.10.254
set device "wan1_VRF10"
set comment "VRF10_Default_Route"
next
edit 11
set gateway 202.100.11.254
set device "wan1_VRF11"
set comment "VRF11_Default_Route"
next
edit 12
set gateway 202.100.12.254
In the GUI, go to Network > Static Routes to view the static routes:
next
edit 9
set name "VRF11_to_Internet_Policy"
set srcintf "Internal_VRF11"
set dstintf "wan1_VRF11"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set logtraffic all
set nat enable
next
edit 10
set name "VRF11_to_VRF_Leaking_Route"
set srcintf "Internal_VRF11"
set dstintf "vlink0_Vlan_11"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set logtraffic all
next
edit 11
set name "VRF_Leaking_Route_to_VRF11"
set srcintf "vlink0_Vlan_11"
set dstintf "Internal_VRF11"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set logtraffic all
next
edit 12
set name "VRF12_to_Internet_Policy"
set srcintf "Internal_VRF12"
set dstintf "wan1_VRF12"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set logtraffic all
set nat enable
next
edit 13
set name "VRF12_to_VRF_Leaking_Route"
set uuid 92bccf8e-b27b-51eb-3c56-6d5259af6299
set srcintf "Internal_VRF12"
set dstintf "vlink0_Vlan_12"
set srcaddr "all"
set dstaddr "all"
set action accept
In the GUI, go to Policy & Objects > Firewall Policy to view the policies.
IPv6 routes support VRF. Static, connected, OSPF, and BGP routes can be isolated in different VRFs. BGP IPv6 routes
can be leaked from one VRF to another.
config router bgp
config vrf-leak6
edit <origin vrf-id>
config target
edit <target vrf-id>
set route-map <route-map>
set interface <interface>
next
end
next
end
end
In this example, the route 2000:5:5:5::/64 learned from Router 1 is leaked to VRF 20 through the interface vlan552.
Conversely, the route 2009:3:3:3::/64 learned from Router 2 is leaked to VRF 10 through interface vlan55.
edit "from206"
config rule
edit 1
set match-ip6-address "2"
next
end
next
end
5. Configure the IPv6 route leaking (leak route 2000:5:5:5::/64 learned from Router 1 to VRF 20, then leak route
2009:3:3:3::/64 learned from Router 2 to VRF 10):
config router bgp
config vrf-leak6
edit "10"
config target
edit "20"
set route-map "from106"
set interface "vlan55"
next
end
next
edit "20"
config target
edit "10"
set route-map "from206"
set interface "vlan552"
next
end
next
end
end
In this example, a VRF is defined on static route 22 so that it will only appear in the VRF 20 routing table.
Support is included for internal and external border gateway protocols (IBGP and EBGP) in virtual routing and forwarding
(VRF).
FortiGate can establish neighbor connections with other FortiGates or routers, and the learned routes are put into
different VRF tables according to the neighbor's settings.
This example uses the following topology:
l BGP routes learned from the Router1 neighbor are put into vrf10.
l BGP routes learned from the Router2 neighbor are put into vrf20.
Results
After VRF is set for BGP, BGP routes are added to the VRF tables along with OSPF and connected routes:
# get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
This feature is also supported in the BGP neighbor groups. For example:
config router bgp
config neighbor-group
edit "FGT"
set update-source "port1"
next
end
config neighbor-range
edit 1
set prefix 172.16.201.0 255.255.255.0
set neighbor-group "FGT"
next
end
end
When local-out traffic such as SD-WAN health checks, SNMP, syslog, and so on are initiated from an interface on one
VRF and then pass through interfaces on another VRF, the reply traffic will be successfully forwarded back to the original
VRF.
Example
In this example, there is an NPU VDOM link that is configured on the root VDOM. Two VLANs, vrf10 and vrf20, are
created on either ends of the NPU VDOM link, each belonging to a different VRF.
When pinging from the vrf10 interface in VRF 10 to the destination server 172.16.202.2, since there is a single static
route for VRF 10 with a gateway of vrf20/10.32.70.2, traffic is sent to the next hop and subsequently routed through
port12 to the server.
As seen in the sniffer trace, the ICMP replies are received on port12 in VRF 20, then pass through vrf20, and are
ultimately forwarded back to vrf10 in VRF 10. The traffic flow demonstrates that local-out traffic sourced from one VRF
passing through another VRF can return back to the original VRF.
next
end
1. Execute a ping from the vrf10 interface in VRF 10 to the destination server (172.16.202.2):
# execute ping-options interface vrf10
# execute ping 172.16.202.2
PING 172.16.202.2 (172.16.202.2): 56 data bytes
64 bytes from 172.16.202.2: icmp_seq=0 ttl=254 time=0.1 ms
64 bytes from 172.16.202.2: icmp_seq=1 ttl=254 time=0.0 ms
NetFlow
NetFlow allows you to collect IP network traffic statistics for an interface, and then export those statistics for analysis.
NetFlow samplers, that sample every packet, are configured per interface. Full NetFlow is supported through the
information maintained in the firewall session.
To configure NetFlow:
config vdom
edit <vdom>
config system vdom-netflow
set vdom-netflow enable
set collector-ip <ip>
set collector-port <port>
set source-ip <ip>
end
next
end
If data are not seen on the NetFlow collector after it has been configured, use the following sniffer commands to verify if
the FortiGate and the collector are communicating:
l By collector port:
# diagnose sniffer packet 'port <collector-port>' 6 0 a
l By collector IP address:
# diagnose sniffer packet 'host <collector-ip>' 6 0 a
NetFlow uses the sflow daemon. The current NetFlow configuration can be viewed using test level 3 or 4:
# diagnose test application sflowd 3
# diagnose test application sflowd 4
Netflow Cache Stats:
vdoms=1 Collectors=1 Cached_intf=2 Netflow_enabled_intf=1 Live_sessions=0 Session cache max
count:71950
NetFlow templates
NetFlow uses templates to capture and categorize the data that it collects. FortiOS supports the following NetFlow
templates:
256 - STAT_OPTIONS
Option Length 28
Padding 0000
Scope fields
Data fields
257 - APP_ID_OPTIONS
Option Length 16
Padding 0000
Scope fields
Data fields
258 - IPV4
Data fields
259 - IPV6
Data fields
260 - ICMP4
Data fields
16 IP_DST_ADDR IP_DST_ADDR(12) 4
261 - ICMP6
Data fields
262 - IPV4_NAT
Data fields
21 postNAPTDestinationTransportPort postNAPTDestinationTransportPort 2
(228)
263 - IPV4_AF_NAT
Data fields
21 postNAPTDestinationTransportPort postNAPTDestinationTransportPort 2
(228)
264 - IPV6_NAT
Data fields
21 postNAPTDestinationTransportPort postNAPTDestinationTransportPort 2
(228)
265 - IPV6_AF_NAT
Data fields
21 postNAPTDestinationTransportPort postNAPTDestinationTransportPort 2
(228)
266 - ICMPV4_NAT
Data fields
20 postNAPTDestinationTransportPort postNAPTDestinationTransportPort 2
(228)
267 - ICMPV4_AF_NAT
Data fields
20 postNAPTDestinationTransportPort postNAPTDestinationTransportPort 2
(228)
268 - ICMPV6_NAT
Data fields
20 postNAPTDestinationTransportPort postNAPTDestinationTransportPort 2
(228)
269 - ICMPV6_AF_NAT
Data fields
20 postNAPTDestinationTransportPort postNAPTDestinationTransportPort 2
(228)
Examples
In the following examples, a FortiExtender and a VPN tunnel interface are configured with NetFlow sampling.
1. Configure a FortiExtender interface with NetFlow sampling enabled for both transmitted and received traffic:
config system interface
edit "fext-211"
set vdom "root"
set mode dhcp
set type fext-wan
set netflow-sampler both
set role wan
set snmp-index 8
set macaddr 2a:4e:68:a3:f4:6a
next
end
4. Check the session list for the FortiExtender interface and NetFlow flowset packet:
# diagnose sys session list
session info: proto=1 proto_state=00 duration=1732 expire=59 timeout=0 flags=00000000
socktype=0 sockport=0 av_idx=0 use=3
origin-shaper=
reply-shaper=
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ vlan_cos=0/255
state=may_dirty netflow-origin netflow-reply
statistic(bytes/packets/allow_err): org=145572/1733/1 reply=145572/1733/1 tuples=2
tx speed(Bps/kbps): 83/0 rx speed(Bps/kbps): 83/0
orgin->sink: org pre->post, reply pre->post dev=5->26/26->5
gwy=10.39.252.244/172.16.200.55
hook=post dir=org act=snat 172.16.200.55:61290->8.8.8.8:8(10.39.252.243:61290)
hook=pre dir=reply act=dnat 8.8.8.8:61290->10.39.252.243:0(172.16.200.55:61290)
misc=0 policy_id=1 auth_info=0 chk_client_info=0 vd=0
serial=00001298 tos=ff/ff app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id=00000000 rpdb_svc_id=0 ngfwid=n/a
npu_state=0x040000
no_ofld_reason: non-npu-intf
total session 1
5. The flowset packet can be captured on UDP port 2055 by a packet analyzer, such as Wireshark:
1. Configure a VPN interface with NetFlow sampling enabled for both transmitted and received traffic:
config system interface
edit "A-to-B_vpn"
set vdom "vdom1"
set type tunnel
set netflow-sampler both
set snmp-index 42
set interface "port3"
next
end
4. Check the session list for the VPN interface and NetFlow flowset packet (unencapsulated traffic going through the
VPN tunnel):
# diagnose sys session list
session info: proto=6 proto_state=01 duration=6 expire=3599 timeout=3600 flags=00000000
socktype=0 sockport=0 av_idx=0 use=3
origin-shaper=
reply-shaper=
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ vlan_cos=0/255
state=may_dirty npu netflow-origin netflow-reply
statistic(bytes/packets/allow_err): org=6433/120/1 reply=884384/713/1 tuples=2
tx speed(Bps/kbps): 992/7 rx speed(Bps/kbps): 136479/1091
orgin->sink: org pre->post, reply pre->post dev=10->52/52->10 gwy=10.2.2.2/10.1.100.22
hook=pre dir=org act=noop 10.1.100.22:43714->172.16.200.55:80(0.0.0.0:0)
hook=post dir=reply act=noop 172.16.200.55:80->10.1.100.22:43714(0.0.0.0:0)
pos/(before,after) 0/(0,0), 0/(0,0)
src_mac=00:0c:29:ac:ae:4f
misc=0 policy_id=5 auth_info=0 chk_client_info=0 vd=1
serial=00003b6c tos=ff/ff app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id=00000000 rpdb_svc_id=0 ngfwid=n/a
npu_state=0x000001 no_offload
npu info: flag=0x82/0x00, offload=0/0, ips_offload=0/0, epid=0/0, ipid=0/0,
vlan=0x0000/0x0000
vlifid=0/0, vtag_in=0x0000/0x0000 in_npu=0/0, out_npu=0/0, fwd_en=0/0, qid=0/0
no_ofld_reason: disabled-by-policy
total session 1
5. The flowset packet can be captured on UDP port 2055 by a packet analyzer, such as Wireshark:
sFlow
sFlow is a method of monitoring the traffic on your network to identify areas on the network that may impact performance
and throughput. FortiGate supports sFlow v5. sFlow collector software is available from a number of third-party software
vendors. For more information about sFlow, see www.sflow.org.
The packet information that the FortiGate's sFlow agent collects depends on the interface type:
l On an internal interface, when the interface receives packets from devices with private IP addresses, the collected
information includes the private IP addresses.
l On an external, or WAN, interface, when the interface receives to route to or from the internet, the collected
information includes the IP address of the WAN interface as the source or destination interface, depending on the
direction of the traffic. It does not include IP addresses that are NATed on another interface.
sFlow datagrams contain the following information:
l Packet headers, such as MAC, IPv4, and TCP
l Sample process parameters, such as rate and pool
l Input and output ports
l Priority (802.1p and ToS)
l VLAN (802.1Q)
l Source prefixes, destination prefixes, and next hop addresses
l BGP source AS, source peer AS, destination peer AS, communities, and local preference
l User IDs (TACACS, RADIUS) for source and destination
l Interface statistics (RFC 1573, RFC 2233, and RFC 2358)
Configuring sFlow
sFlow can be configured globally, then on traffic VDOMs and individual interfaces.
When configuring sFlow on a VDOM, the collector can be specified, or the collector that is configured globally can be
used.
sFlow is supported on some interface types, such as physical, VLAN, and aggregate. It is not supported on virtual
interfaces, such as VDOM link, IPsec, GRE, or SSL. When configuring sFlow on an interface, the rate that the agent
samples traffic, the direction of that traffic, and the frequency that the agent sends sFlow datagrams to the sFlow
collector can be specified. If sFlow is configured on the VDOM that the interface belongs to, the agent sends datagrams
to the collector configured for the VDOM. Otherwise, the datagrams are sent to the collector that is configured globally.
Configuring sFlow for an interface disables NP offloading for all traffic on that interface.
collector-ip <ipv4_ The IPv4 address of the sFlow collector that sFlow agents added to interface
address> (default = 0.0.0.0).
collector-port <port> The UDP port number used for sending sFlow datagrams (0 - 65535, default =
6343).
Only configured this option if required by the sFlow collector or your network
configuration.
source-ip <ipv4_address> The source IPv4 address that the sFlow agent used to send datagrams to the
collector (default = 0.0.0.0).
If this option is not configured, the FortiGate uses the IP address of the interface
that it sends the datagram through.
interface-select-method How the outgoing interface to reach the server is selected (default = auto).
{auto | sdwan |
specify}
interface <interface> The outgoing interface used to reach the server.
This option is only available when interface-select-method is specify.
config vdom
edit <vdom>
config system vdom-sflow
set vdom-sflow {enable | disable}
set collector-ip <ipv4_address>
set collector-port <port>
set source-ip <ipv4_address>
set interface-select-method {auto | sdwan | specify}
set interface <interface>
end
next
end
vdom-sflow {enable | Enable/disable the sFlow configuration for the current VDOM (default = disable).
disable}
collector-ip <ipv4_ The IPv4 address of the sFlow collector that sFlow agents added to interface
address> (default = 0.0.0.0).
If this option is not configured, the global setting will be used.
collector-port <port> The UDP port number used for sending sFlow datagrams (0 - 65535, default =
6343).
Only configured this option if required by the sFlow collector or your network
configuration.
If this option is not configured, the global setting will be used.
source-ip <ipv4_address> The source IPv4 address that the sFlow agent used to send datagrams to the
collector (default = 0.0.0.0).
If this option is not configured, the FortiGate uses the IP address of the interface
that it sends the datagram through.
interface-select-method How the outgoing interface to reach the server is selected (default = auto).
{auto | sdwan |
specify}
interface <interfae> The outgoing interface used to reach the server.
This option is only available when interface-select-method is specify.
Link monitor
The link monitor is a mechanism that allows the FortiGate to probe the status of a detect server in order to determine the
health of the link, next hop, or the path to the server. Ping, TCP echo, UDP echo, HTTP, and TWAMP protocols can be
used for the probes. Typically, the detect server is set to a stable server several hops away. Multiple servers can also be
configured with options to define the protocol and weights for each server.
The link monitor serves several purposes. In the most basic configuration, it can be used to detect failures and remove
routes associated with the interface and gateway to prevent traffic from routing out the failed link. More granularity is
added in 7.0 that allows only the routes specified in the link monitor to be removed from the routing table. With this
benefit, only traffic to specific routing destinations are removed, rather than all routing destinations.
Another enhancement starting in 7.0.1 is an option to toggle between enabling or disabling policy route updates when a
link health monitor fails.
The link monitor can also monitor remote servers for HA failover. Using the HA built-in link monitor, it is only able to
detect physical link failovers to trigger HA link failover. With the link monitor, remote servers can be used to monitor the
health of the path to the server in order to trigger HA failover.
Finally, the link monitor can cascade the failure to other interfaces. When the update-cascade-interface option is
enabled, the interface can be configured in conjunction with fail-detect enabled to trigger a link down event on other
interfaces.
The following topics provide more information about the link monitor:
l Link monitor with route updates on page 461
l Enable or disable updating policy routes when link health monitor fails on page 463
l Add weight setting on each link health monitor server on page 465
l Dual internet connections on page 312
When a link monitor fails, only the routes that are specified in the link monitor are removed from the routing table, instead
of all the routes with the same interface and gateway. If no routes are specified, then all of the routes are removed. Only
IPv4 routes are supported.
Example
In this example, the FortiGate has several routes to 23.2.2.2/32 and 172.16.202.2/24, and is monitoring the link agg1 by
pinging the server at 10.1.100.22. The link monitor uses the gateway 172.16.203.2.
When the link monitor fails, only the routes to the specified subnet using interface agg1 and gateway 172.16.203.2 are
removed.
Enable or disable updating policy routes when link health monitor fails
An option has been added to toggle between enabling or disabling policy route updates when a link health monitor fails.
By disabling policy route updates, a link health monitor failure will not cause corresponding policy-based routes to be
removed.
config system link-monitor
edit <name>
set update-policy-route {enable | disable}
next
end
Example
In the following topology, the FortiGate is monitoring the detect server, 10.1.100.22. The FortiGate has a policy-based
route to destination 172.16.205.10 using the same gateway (172.16.202.1) and interface (port22). By configuring
update-policy-route disable, the policy-based route is not removed when the link health monitor detects a
failure.
To disable updating policy routes when the link health monitor fails:
next
end
3. When the health link monitor status is up, verify that the policy route is active.
a. Verify the link health monitor status:
# diagnose sys link-monitor status
Link Monitor: test-1, Status: alive, Server num(1), HA state: local(alive), shared
(alive)
Flags=0x1 init, Create time: Fri May 28 15:20:15 2021
Source interface: port22 (14)
Gateway: 172.16.202.1
Interval: 500 ms
Service-detect: disable
Diffservcode: 000000
Class-ID: 0
Peer: 10.1.100.22(10.1.100.22)
Source IP(172.16.202.2)
Route: 172.16.202.2->10.1.100.22/32, gwy(172.16.202.1)
protocol: ping, state: alive
Latency(Min/Max/Avg): 0.374/0.625/0.510 ms
Jitter(Min/Max/Avg): 0.008/0.182/0.074
Packet lost: 0.000%
Number of out-of-sequence packets: 0
Fail Times(0/3)
Packet sent: 7209, received: 3400, Sequence(sent/rcvd/exp):
7210/7210/7211
4. When the health link monitor status is down, verify that the policy route is active:
a. Verify the link health monitor status:
# diagnose sys link-monitor status
Link Monitor: test-1, Status: die, Server num(1), HA state: local(die), shared(die)
Flags=0x9 init log_downgateway, Create time: Fri May 28 15:20:15 2021
Source interface: port22 (14)
Gateway: 172.16.202.1
Interval: 500 ms
Service-detect: disable
Diffservcode: 000000
Class-ID: 0
Peer: 10.1.100.22(10.1.100.22)
Source IP(172.16.202.2)
Route: 172.16.202.2->10.1.100.22/32, gwy(172.16.202.1)
protocol: ping, state: die
Packet lost: 11.000%
Number of out-of-sequence packets: 0
Recovery times(0/5) Fail Times(0/3)
If the update-policy-route setting is enabled, the link health monitor would be down and the policy-based
route would be disabled:
# diagnose firewall proute list
list route policy info(vf=root):
id=1 dscp_tag=0xff 0xff flags=0x8 disable tos=0x14 tos_mask=0xff protocol=0 sport=0-0
iif=41 dport=0-65535 oif=14(port22) gwy=172.16.202.1
source wildcard(1): 0.0.0.0/0.0.0.0
destination wildcard(1): 172.16.205.10/255.255.255.255
hit_count=1 last_used=2021-05-27 23:04:33
Prior to FortiOS 7.0.1, the link health monitor is determined to be dead when all servers are unreachable. Starting in
7.0.1, the link health monitor can configure multiple servers and allow each server to have its own weight setting. When
the link health monitor is down, it will trigger static route updates and cascade interface updates if the weight of all dead
servers exceeds the monitor's fail weight threshold.
config system link-monitor
edit <name>
set srcintf <interface>
set server-config {default | individual}
set fail-weight <integer>
config server-list
edit <id>
set dst <address>
set weight <integer>
next
end
next
end
Examples
In the following topology, there are two detect servers that connect to the FortiGate through a router: server 1
(10.1.100.22) and server 2 (10.1.100.55).
In this configuration, one server is dead and one server alive. The failed server weight is not over the threshold, so the
link health monitor status is alive.
2. Trigger server 2 to go down. The link monitor is still alive because the fail weight threshold has not been reached.
In this configuration, one server is dead and one server alive. The failed server weight is over the threshold, so the link
health monitor status is dead.
set weight 50
next
end
next
end
2. Trigger server 2 to go down. The link monitor is dead because the fail weight threshold has been reached.
3. Verify the link health monitor status:
# diagnose sys link-monitor status test-1
Link Monitor: test-1, Status: dead, Server num(2), HA state: local(dead), shared(dead)
Flags=0x9 init log_downgateway, Create time: Fri Jun 4 17:23:29 2021
Source interface: port22 (14)
Gateway: 172.16.202.1
Interval: 500 ms
Service-detect: disable
Diffservcode: 000000
Class-ID: 0
Fail-weight (40): activated
Peer: 10.1.100.22(10.1.100.22)
Source IP(172.16.202.2)
Route: 172.16.202.2->10.1.100.22/32, gwy(172.16.202.1)
protocol: ping, state: alive
Latency(Min/Max/Avg): 0.393/0.610/0.520 ms
Jitter(Min/Max/Avg): 0.009/0.200/0.095
Packet lost: 0.000%
Number of out-of-sequence packets: 0
Fail Times(0/3)
Packet sent: 680, received: 677, Sequence(sent/rcvd/exp): 681/681/682
Peer: 10.1.100.55(10.1.100.55)
Source IP(172.16.202.2)
Route: 172.16.202.2->10.1.100.55/32, gwy(172.16.202.1)
Fail weight 50 applied
protocol: ping, state: dead
Packet lost: 100.000%
Number of out-of-sequence packets: 0
Recovery times(0/5) Fail Times(1/3)
Packet sent: 680, received: 3, Sequence(sent/rcvd/exp): 681/4/5
IPv6
IPv6 tunneling
IPv6 tunneling involves tunneling IPv6 packets from an IPv6 network through an IPv4 network to another IPv6 network.
This is different than NAT because once the packet reaches its final destination, the true originating address of the
sender is still readable. The IPv6 packets are encapsulated within packets with IPv4 headers that carry their IPv6
payload through the IPv4 network. IPv6 tunneling is suitable in networks that have completely transitioned over to IPv6
but need an internet connection, which is still mostly IPv4 addresses.
Both IPv6 tunneling devices, whether they are a host or a network device, must be dual stack compatible. The tunneling
process is as follows:
1. The tunnel entry node creates an encapsulating IPv4 header and transmits the encapsulated packet.
2. The tunnel exit node receives the encapsulated packet.
3. The IPv4 header is removed.
4. The IPv6 header is updated and the IPv6 packet is processed.
There are two types of tunnels in IPv6 tunneling, automatic and configured. Automatic tunnels are configured by using
IPv4 address information embedded in an IPv6 address. The IPv6 address of the destination host includes information
about which IPv4 address the packet should be tunneled to. Configured tunnels are manually configured, and they are
used for IPv6 addresses that do not have any embedded IPv4 information. The IPv6 and IPv4 addresses of the tunnel
endpoints must be specified.
Tunnel configurations
There are four tunneling configurations available depending on which segment of the path between the endpoints of the
session the encapsulation takes place.
Type Description
Network device-to-network Dual stack capable devices connected by an IPv4 infrastructure can tunnel IPv6
device packets between themselves. The tunnel spans one segment of the path taken by
the IPv6 packets.
Host-to-network device Dual stack capable hosts can tunnel IPv6 packets to an intermediary IPv6 or IPv4
network device that is reachable through an IPv4 infrastructure. The tunnel spans
the first segment of the path taken by the IPv6 packets.
Host-to-host Dual stack capable hosts that are interconnected by an IPv4 infrastructure can
tunnel IPv6 packets between themselves. The tunnel spans the entire path taken
by the IPv6 packets.
Network device-to-host Dual stack capable network devices can tunnel IPv6 packets to their final
destination IPv6 or IPv4 host. The tunnel spans only the last segment of the path
taken by the IPv6 packets.
Regardless of whether the tunnel starts at a host or a network device, the node that does the encapsulation needs to
maintain soft state information, such as the maximum transmission unit (MTU), about each tunnel in order to process the
IPv6 packets.
6in4 tunnel
The following tunnel configuration tunnels IPv6 traffic over an IPv4 network. An internal IPv6 interface can be configured
under config system interface.
4in6 tunnel
Conversely, the following tunnel configuration tunnels IPv4 traffic over an IPv6 network.
The MTU of an IPv6 tunnel interface is calculated from the MTU of its parent interface minus headers.
Example
In this topology, FortiGate B and FortiGate D are connected over an IPv6 network. An IPv6 tunnel is formed, and IPv4
can be used over the IPv6 tunnel. The tunnel interface MTU is based on the physical interface MTU minus the IP and
TCP headers (40 bytes). On FortiGate B's physical interface port5, the MTU is set to 1320. The IPv6 tunnel is based on
port5, and its MTU value of 1280 is automatically calculated from the MTU value of its physical interface minus the
header. The same is true for port3 on FortiGate D.
1. Configure port5:
config system interface
edit "port5"
set vdom "root"
set type physical
set snmp-index 7
config ipv6
set ip6-address 2000:172:16:202::1/64
set ip6-allowaccess ping
end
set mtu-override enable
set mtu 1320
next
end
config ip6-extra-addr
edit fe80::2222/10
next
end
end
set interface "port5"
next
end
1. Configure port3:
config system interface
edit "port3"
set vdom "root"
set type physical
set snmp-index 5
config ipv6
set ip6-address 2000:172:16:202::2/64
set ip6-allowaccess ping
end
set mtu-override enable
set mtu 1320
next
end
next
end
SD-WAN overview
SD-WAN is a software-defined approach to managing Wide-Area Networks (WAN). It consolidates the physical
transport connections, or underlays, and monitors and load-balances traffic across the links. VPN overlay networks can
be built on top of the underlays to control traffic across different sites.
Health checks and SD-WAN rules define the expected performance and business priorities, allowing the FortiGate to
automatically and intelligently route traffic based on the application, internet service, or health of a particular connection.
WAN security and intelligence can be extended into the LAN by incorporating wired and wireless networks under the
same domain. FortiSwitch and FortiAP devices intgrate seamlessly with the FortiGate to form the foundation of an SD-
Branch.
Some of the key benefits of SD-WAN include:
l Reduced cost with transport independence across MPLS, 4G/5G LTE, and others.
l Reduced complexity with a single vendor and single-pane-of-glass management.
l Improve business application performance thanks to increased availability and agility.
l Optimized user experience and efficiency with SaaS and public cloud applications.
The control, data plane, and security layer can only be deployed on a FortiGate. The other two layers can help to scale
and enhance the solution. For large deployments, FortiManager and FortiAnalyzer provide the management and
orchestration capabilities FortiSwitch and FortiAP provide the components to deploy an SD-Branch.
Design principles
The Five-pillar approach, described in the SD-WAN / SD-Branch Architecture for MSSPs guide, is recommended when
designing a secure SD-WAN solution.
Underlay
Determine the WAN links that will be used for the underlay network, such as your broadband link, MPLS, 4G/5G LTE
connection, and others.
For each link, determine the bandwidth, quality and reliability (packet loss, latency, and jitter), and cost. Use this
information to determine which link to prefer, what type of traffic to send across the each link, and to help you the
baselines for health-checks.
Overlay
VPN overlays are needed when traffic must travel across multiple sites. These are usually site-to-site IPsec tunnels that
interconnect branches, datacenters, and the cloud, forming a hub-and-spoke topology.
The management and maintenance of the tunnels should be considered when determining the overlay network
requirements. Manual tunnel configuration might be sufficient in a small environment, but could become unmanageable
as the environment size increases. ADVPN can be used to help scale the solution; see ADVPN on page 1454 for more
information.
Routing
Traditional routing designs manipulate routes to steer traffic to different links. SD-WAN uses traditional routing to build
the basic routing table to reach different destinations, but uses SD-WAN rules to steer traffic. This allows the steering to
be based on criteria such as destination, internet service, application, route tag, and the health of the link. Routing in an
SD-WAN solution is used to identify all possible routes across the underlays and overlays, which the FortiGate balances
using ECMP.
In the most basic configuration, static gateways that are configured on an SD-WAN member interface automatically
provide the basic routing needed for the FortiGate to balance traffic across the links. As the number of sites and
destinations increases, manually maintaining routes to each destination becomes difficult. Using dynamic routing to
advertise routes across overlay tunnels should be considered when you have many sites to interconnect.
Security
Security involves defining policies for access control and applying the appropriate protection using the FortiGate's
NGFW features. Efficiently grouping SD-WAN members into SD-WAN zones must also be considered. Typically,
underlays provide direct internet access and overlays provide remote internet or network access. Grouping the
underlays together into one zone, and the overlays into one or more zones could be an effective method.
SD-WAN
The SD-WAN pillar is the intelligence that is applied to traffic steering decisions. It is comprised of four primary elements:
l SD-WAN zones
SD-WAN is divided into zones. SD-WAN member interfaces are assigned to zones, and zones are used in policies
as source and destination interfaces. You can define multiple zones to group SD-WAN interfaces together, allowing
logical groupings for overlay and underlay interfaces. Routing can be configured per zone.
See SD-WAN members and zones on page 488.
l SD-WAN members
Also called interfaces, SD-WAN members are the ports and interfaces that are used to run traffic. At least one
interface must be configured for SD-WAN to function.
See Configuring the SD-WAN interface on page 479.
l Performance SLAs
Also called health-checks, performance SLAs are used to monitor member interface link quality, and to detect link
failures. When the SLA falls below a configured threshold, the route can be removed, and traffic can be steered to
different links in the SD-WAN rule.
SLA health-checks use active or passive probing:
l Active probing requires manually defining the server to be probed, and generates consistent probing traffic.
l Passive probing uses active sessions that are passing through firewall policies used by the related SD-WAN
interfaces to derive health measurements. It reduces the amount of configuration, and eliminates probing
traffic. See Passive WAN health measurement on page 510 for details.
See Performance SLA on page 499.
l SD-WAN rules
Also called services, SD-WAN rules control path selection. Specific traffic can be dynamically sent to the best link,
or use a specific route.
Rules control the strategy that the FortiGate uses when selecting the outbound traffic interface, the SLAs that are
monitored when selecting the outgoing interface, and the criteria for selecting the traffic that adheres to the rule.
When no SD-WAN rules match the traffic, the implicit rule applies.
See SD-WAN rules on page 519.
The core functionalities of Fortinet's SD-WAN solution are built into the FortiGate. Whether the environment contains
one FortiGate, or one hundred, you can use SD-WAN by enabling it on the individual FortiGates.
At a basic level, SD-WAN can be deployed on a single device in a single site environment:
At a more advanced level, SD-WAN can be deployed in a multi-site, hub and spoke environment:
At an enterprise or MSSP level, the network can include multiple hubs, possibly across multiple regions:
For more details, see the SD-WAN / SD-Branch Architecture for MSSPs guide.
This section provides an example of how to start using SD-WAN for load balancing and redundancy.
In this example, two ISP internet connections, wan1 (DHCP) and wan2 (static), use SD-WAN to balance traffic between
them at 50% each.
First, SD-WAN must be enabled and member interfaces must be selected and added to a zone. The selected FortiGate
interfaces can be of any type (physical, aggregate, VLAN, IPsec, and others), but must be removed from any other
configurations on the FortiGate.
In this step, two interfaces are configured and added to the default SD-WAN zone (virtual-wan-link) as SD-WAN member
interfaces. This example uses a mix of static and dynamic IP addresses; your deployment could also use only one or the
other.
Once the SD-WAN members are created and added to a zone, the zone can be used in firewall policies, and the whole
SD-WAN can be used in static routes.
1. Configure the wan1 and wan2 interfaces. See Interface settings on page 131 for details.
a. Set the wan1 interface Addressing mode to DHCP and Distance to 10.
By default, a DHCP interface has a distance of 5, and a static route has a distance of
10. It is important to account for this when configuring your SD-WAN for 50/50 load
balancing by setting the DHCP interface's distance to 10.
8. Repeat the above steps for wan2, setting Gateway to the ISP's gateway: 10.100.20.2.
You must configure a default route for the SD-WAN. The default gateways for each SD-WAN member interface do not
need to be defined in the static routes table. FortiGate will decide what route or routes are preferred using Equal Cost
Multi-Path (ECMP) based on distance and priority.
SD-WAN rules define specific routing options to route traffic to an SD-WAN member.
If no routing rules are defined, the default Implicit rule is used. It can be configured to use one of five different load
balancing algorithms. See Implicit rule on page 527 for more details and examples.
This example shows four methods to equally balance traffic between the two WAN connections. Go to Network > SD-
WAN, select the SD-WAN Rules tab, and edit the sd-wan rule to select the method that is appropriate for your
requirements.
l Source IP (CLI command: source-ip-based):
Select this option to balance traffic equally between the SD-WAN members according to a hash algorithm based on
the source IP addresses.
l Session (weight-based):
Select this option to balance traffic equally between the SD-WAN members by the session numbers ratio among its
members. Use weight 50 for each of the 2 members.
l Source-Destination IP (source-dest-ip-based):
Select this option to balance traffic equally between the SD-WAN members according to a hash algorithm based on
the source and destination IP addresses.
l Volume (measured-volume-based):
Select this option to balance traffic equally between the SD-WAN members according to the bandwidth ratio among
its members.
SD-WAN zones can be used in policies as source and destination interfaces. Individual SD-WAN members cannot be
used in policies.
You must configure a policy that allows traffic from your organization's internal network to the SD-WAN zone. Policies
configured with the SD-WAN zone apply to all SD-WAN interface members in that zone.
Source all
Destination all
Schedule always
Service ALL
Action ACCEPT
Firewall / Network Options Enable NAT and set IP Pool Configuration to Use Outgoing Interface Address.
Logging Options Enable Log Allowed Traffic and select All Sessions. This allows you to verify
results later.
Performance SLA link monitoring measures the health of links that are connected to SD-WAN member interfaces by
sending probing signals through each link to a server, and then measuring the link quality based on latency, jitter, and
packet loss. If a link is broken, the routes on that link are removed and traffic is routed through other links. When the link
is working again, the routes are re-enabled. This prevents traffic being sent to a broken link and lost.
In this example, the detection server IP address is 208.91.112.53. A performance SLA is created so that, if ping fails per
the metrics defined, the routes to that interface are removed and traffic is detoured to the other interface. The ping
protocol is used, but other protocols could also be selected as required.
1. Go to Network > SD-WAN, select the Performance SLAs tab, and click Create New.
2. Enter a name for the SLA and set Protocol to Ping.
3. In the Server field, enter the detection server IP address (208.91.112.53 in this example).
4. In the Participants field, select Specify and add wan1 and wan2.
Results
The following GUI pages show the function of the SD-WAN and can be used to confirm that it is setup and running
correctly:
l Interface usage on page 483
l Performance SLA on page 484
l Routing table on page 485
l Firewall policy on page 486
Interface usage
Go to Network > SD-WAN and select the SD-WAN Zones tab to review the SD-WAN interfaces' usage.
Bandwidth
Select Bandwidth to view the amount of downloaded and uploaded data for each interface.
Volume
Select Volume to see donut charts of the received and sent bytes on the interfaces.
Sessions
Select Sessions to see a donut chart of the number of active sessions on each interface.
Performance SLA
Go to Network > SD-WAN, select the Performance SLAs tab, and select the SLA from the table (server in this example)
to view the packet loss, latency, and jitter on each SD-WAN member in the health check server.
Packet loss
Select Packet Loss to see the percentage of packets lost for each member.
Latency
Select Latency to see the current latency, in milliseconds, for each member.
Jitter
Routing table
Go to Dashboard > Network, expand the Routing widget, and select Static & Dynamic to review all static and dynamic
routes. For more information about the widget, see Static & Dynamic Routing monitor on page 84.
Firewall policy
Go to Policy & Objects > Firewall Policy to review the SD-WAN policy.
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
Results
SD-WAN bundles interfaces together into zones. Interfaces are first configured as SD-WAN members. This does not
change the interface, it just allows SD-WAN to reference the interface as a member. SD-WAN member interfaces can be
any interface supported by FortiGates, such as physical ports, VLAN interfaces, LAGs, IPsec tunnels, GRE tunnels, IPIP
tunnels, and FortiExtender interfaces. Once SD-WAN members are configured, they can be assigned to a zone. Zones
are used in policies as source and destination interfaces, in static routes, and in SD-WAN rules.
Multiple zones can be used to group SD-WAN interfaces for logical scenarios, such as overlay and underlay interfaces.
Using multiple zones in policies allows for more granular control over functions like resource access and UTM access.
Individual SD-WAN member interfaces cannot be used directly in policies, but they can be moved between SD-WAN
zones at any time. If a member interface requires a special SD-WAN consideration, it can be put into an SD-WAN zone
by itself.
SD-WAN zones and members can be used in IPv4 and IPv6 static routes to make route configurations more flexible. SD-
WAN zones and members can be used in SD-WAN rules to simplify the rule configuration. See Specify an SD-WAN
zone in static routes and SD-WAN rules on page 494 for more information.
When the Security Fabric is configured, SD-WAN zones are included in the Security Fabric topology views.
Topology
When configuring SD-WAN zones and members, it does not matter what order they are defined. In this example, the
members are defined first, and they will be placed temporarily in the default zone called virtual-wan-link. A zone must be
defined when creating a member, and the overlay and underlay zones will created in the next procedure. It is standard
practice to create SD-WAN members for each underlay and overlay interface, as most SD-WAN implementations apply
SD-WAN intelligence to both underlay and overlay networks.
The following options can be configured for SD-WAN members:
Gateway/IPv6 Gateway gateway/gateway6 Enter the default gateway for the interface.
For interfaces that already have a default
gateway, such as those configured using
DHCP, this field is pre-populated in the GUI.
To configure the SD-WAN members and add them to the default zone in the GUI:
1. Go to Network > SD-WAN, select the SD-WAN Zones tab, and click Create New > SD-WAN Member.
2. Set the Interface to WAN1.
3. Leave the SD-WAN Zone as virtual-wan-link.
4. Click OK.
5. Repeat these steps to create SD-WAN members for the WAN2, VPN1, and VPN2 interfaces.
To configure the SD-WAN members and add them to the default zone in the CLI:
(default).
l fib-best-match: members that meet the SLA are selected that match the longest
prefix in the routing table.
While SD-WAN zones are primarily used to logically group interfaces that are often used for the same purpose (such as
WAN1 and WAN2), sometimes an SD-WAN zone can have a single member. This is due to the constraint that SD-WAN
members may not be referenced directly in policies; however, SD-WAN members can be referenced directly in SD-WAN
rules.
In this example, two zones named Overlay and Underlay are configured, and the member interfaces are added to their
respective zones.
5. Click OK.
6. Repeat these steps to configure the Overlay zone with members VPN1 and VPN2.
Once SD-WAN zones are defined, they can be used in firewall policies. This section covers three policy scenarios:
l Datacenter resource access
l Direct internet access
l Remote internet access
SD-WAN zones are a critical component of SD-WAN rules. See Fields for configuring
WAN intelligence on page 523 for more information.
Datacenter resources are made available through the VPN branches or overlay. In this example, there are two SD-WAN
members in the overlay zone that the branch FortiGate can use to route traffic to and from the datacenter resource. The
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the following settings:
Name DC_Access
Source Branch_LAN
Destination DC_LAN
Action ACCEPT
This firewall policy allows traffic to any interfaces included in the zone. The SD-WAN rules
contain the intelligence used to select which members in the zone to use.
Direct internet access (DIA) is how a branch may access resources contained on the public internet. This can be non-
business resources (such as video streaming sites), or publically available business resources (such as vendor portals).
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the following settings:
Name DIA
Source Branch_LAN
Destination all
Action ACCEPT
Remote internet access (RIA) is the ability for a branch location to route public internet access requests across the
overlay and out one of the hub's (or datacenter's) WAN interfaces. This option is effective when a branch has a WAN
circuit with a local ISP and a second circuit that is private, such as MPLS. When the WAN circuit goes down, it is possible
to send traffic through the hub using the MPLS overlay.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the following settings:
Name RIA
Source Branch_LAN
Destination all
Action ACCEPT
SD-WAN zones can be used in IPv4 and IPv6 static routes, and in SD-WAN service rules. This makes route
configuration more flexible, and simplifies SD-WAN rule configuration.
Examples
In these two examples, three SD-WAN members are created. Two members, port13 and port15, are in the default zone
(virtual-wan-link), and the third member, to_FG_B_root, is in the SASE zone.
Example 1
In this example:
l Two service rules are created. Rule 1 uses the virtual-wan-link zone, and rule 2 uses the SASE zone.
l Two IPv4 static routes are created. The first route uses the virtual-wan-link zone, and the second route uses the
SASE zone.
1. Assign port13 and port15 to the virtual-wan-link zone and to_FG_B_root to the SASE zone:
config system sdwan
set status enable
config members
edit 1
set interface "port13"
set zone "virtual-wan-link"
set gateway 10.100.1.1
next
edit 2
set interface "port15"
set zone "virtual-wan-link"
set gateway 10.100.1.5
next
edit 3
set interface "to_FG_B_root"
set zone "SASE"
next
end
end
Both members of the virtual-wan-link zone are selected. In manual mode, the interface members are selected
based on the member configuration order. In SLA and priority mode, the order depends on the link status. If all of the
link statuses pass, then the members are selected based on the member configuration order.
2. Check the service rule 2 diagnostics:
# diagnose sys sdwan service 2
The default gateway has the members from the virtual-wan-link zone, and the route to 172.16.10.9.0/24 has the
single member from the SASE zone.
Example 2
In this example, two IPv6 static routes are created. The first route uses the virtual-wan-link zone, and the second route
uses the SASE zone.
1. Configure port13 and port15 with IPv6 addresses and assign them to the virtual-wan-link zone, and assign to_FG_
B_root to the SASE zone:
config system sdwan
set status enable
config members
edit 1
set interface "port13"
set zone "virtual-wan-link"
set gateway6 2004:10:100:1::1
set source6 2004:10:100:1::2
next
edit 2
set interface "port15"
set zone "virtual-wan-link"
set gateway6 2004:10:100:1::5
set source6 2004:10:100:1::6
next
edit 3
set interface "to_FG_B_root"
set zone "SASE"
next
end
end
The IPv6 default route includes the members from the virtual-wan-link zone, and the route to 2003:172:16:109::/64
has the single member from the SASE zone.
Performance SLA
Performance SLAs are used to measure the health of links that are connected to SD-WAN member interfaces by either
sending probing signals through each link to a server, or using session information that is captured by firewall policies
(see Passive WAN health measurement on page 510 for information), and measuring the link quality based on latency,
jitter, and packet loss. If a link fails all of the health checks, the routes on that link are removed from the SD-WAN link
load balancing group, and traffic is routed through other links. When the link passes SLA, the routes are reestablished.
This prevents traffic from being sent to a broken link and getting lost.
The following topics provide instructions on configuring performance SLA:
l Performance SLA overview on page 499
l Link health monitor on page 504
l Monitoring performance SLA on page 506
l Passive WAN health measurement on page 510
l Passive health-check measurement by internet service and application on page 516
Health checks
A health check is defined by a probe mode, protocol, and server. These three options specify what resource is being
evaluated and how the evaluation is done. Each health check should be configured specifically for that resource, so the
probe mode, protocol and server should be tailored for the particular service. For example, the health check for a VoIP
service will differ than one for a database replication service.
Performance SLA participants are the interfaces that will be evaluated for a given health check. They must be SD-WAN
member interfaces, but do not have to belong to the same zone. When selecting participants, only select participants
that you expect the service communications to use. For example, a health check for a corporate resource might only use
the overlay to access the service. Therefore, you would only add the VPN interfaces as participants.
There are six predefined performance SLA profiles for newly created VDOMs or factory reset FortiGate devices: AWS,
DNS, FortiGuard, Gmail, Google Search, and Office 365. These performance SLA profiles provide Fortinet
recommended settings for common services. To complete the performance SLA configuration, add the participants for
the service. You can adjust the default settings to suit your needs.
Probe mode
Protocol
Health checks support a variety of protocols and protocol specific options. The most commonly used protocols (ping,
HTTP, and DNS) can be configured in the GUI when creating a new performance SLA on the Network > SD-WAN >
Performance SLAs page. The following protocols and options can be configured in the CLI using the set protocol
<option> parameter:
l port: The FTP server initiates and establishes the data connection.
SD-WAN health checks can generate traffic that becomes quite high as deployments grow.
Take this into consideration when setting DoS policy thresholds. For details on setting DoS
policy thresholds, refer to DoS protection on page 784.
To use DNS as a health check, and define the IP address that the response must match:
To use TCP Open (SYN/SYN-ACK) and TCP Close (FIN/FIN-ACK) to verify connections:
Health check probe packets support DSCP markers for accurate link performance evaluation for high priority
applications. This allows the probe packet to match the real traffic it is providing measurements for, including how that
traffic is shaped by upstream devices based on the DSCP markers.
Server
An IP address or FQDN can be defined as the server that the probe packets will be sent to. Up to two servers can be
defined this way. When two servers are provided, both must fail in order for the health check to fail. This is to avoid a
scenario where one remote server is down and causes a false positive that the link is down. The FortiGate can still use
the interface associated with this health check to reach the remaining healthy server.
The purpose of the server is not simply to measure the health of the link, but rather the health of the path to a resource. It
is highly recommended to use an IP address or FQDN that reflects the resource so the traffic path is considered.
A server can only be used in one performance SLA at any given time.
SLA targets
SLA targets are a set of constraints that are used in SD-WAN rules to control the paths that traffic takes. The constraints
are:
l Latency threshold: latency for SLA to make a decision, in milliseconds (0 - 10000000, default = 5).
l Jitter threshold: jitter for SLA to make a decision, in milliseconds (0 - 10000000, default = 5).
l Packet loss threshold: packet loss for SLA to make a decision, in percentage (0 - 100, default = 0).
These settings should be specific to the service whose performance is being considered. You should attempt to
configure the constraints to be just under the maximum values for the application or service to function well. For
example, if your application requires less than 100 ms latency, then you should configure the SLA target to be 90 ms.
Misconfiguring these settings will cause the performance SLA to lose value. If the values are too tight, then you may
have traffic flipping between links before necessary. If the values are too loose, then performance may be impacted and
the FortiGate will do nothing about it.
In the GUI, one SLA target can be configured, but additional targets can be configured in the CLI. Once a second target
is configured in the CLI, additional targets can be configured from the GUI. Multiple SLA targets can be configured where
a server provides multiple services that have different values for acceptable performance. For example, Google provides
a DNS service and entertainment services (YouTube), so it is necessary to configure multiple SLA targets in this case
since you can only configure a server in one performance SLA.
Link status
The Link Status section of the performance SLA configuration consists of three settings that determine the frequency
that the link is evaluated, and the requirements to be considered valid or invalid:
l Check interval: the interval in which the FortiGate checks the interface, in milliseconds (500 - 3600000, default =
500).
l Failures before inactive: the number of failed status checks before the interface shows as inactive (1 - 3600, default
=5). This setting helps prevent flapping, where the system continuously transfers traffic back and forth between
links.
l Restore link after: the number of successful status checks before the interface shows as active (1 - 3600, default =
5). This setting also helps prevent flapping.
When a participant becomes inactive, the performance SLA causes the FortiGate to withdraw all static routes associated
with that interface. If there are multiple static routes using the same interface, they will all be withdrawn when the link
monitor is failing.
Performance SLA link health monitoring measures the health of links that are connected to SD-WAN member interfaces
by either sending probing signals through each link to a server, or using session information that is captured on firewall
policies (see Passive WAN health measurement on page 510 for information), and measuring the link quality based on
latency, jitter, and packet loss. If a link fails all of the health checks, the routes on that link are removed from the SD-WAN
link load balancing group, and traffic is routed through other links. When the link is working again the routes are
reestablished. This prevents traffic being sent to a broken link and lost.
When an SD-WAN member has multiple health checks configured, all of the checks must fail for the routes on that link to
be removed from the SD-WAN link load balancing group.
Two health check servers can be configured to ensure that, if there is a connectivity issue, the interface is at fault and not
the server. A server can only be used in one health check.
The FortiGate uses the first server configured in the health check server list to perform the health check. If the first server
is unavailable, then the second server is used. The second server continues to be used until it becomes unavailable, and
then the FortiGate returns to the first server, if it is available. If both servers are unavailable, then the health check fails.
You can configure the protocol that is used for status checks, including: Ping, HTTP, DNS, TCP echo, UDP echo, two-
way active measurement protocol (TWAMP), TCP connect, and FTP. In the GUI, only Ping, HTTP, and DNS are
available.
You can view link quality measurements by going to Network > SD-WAN and selecting the Performance SLAs tab. The
table shows the default health checks, the health checks that you configured, and information about each health check.
The values shown in the Packet Loss, Latency, and Jitter columns are for the health check server that the FortiGate is
currently using. The green up arrows indicate that the server is responding, and does not indicate if the health checks are
being met. See Results on page 483 for more information.
1. Go to Network > SD-WAN, select the Performance SLAs tab, and click Create New.
2. Set a Name for the SLA.
3. Set the Protocol that you need to use for status checks: Ping, HTTP, or DNS.
4. Set Server to the IP addresses of up to two servers that all of the SD-WAN members in the performance SLA can
reach.
5. Set Participants to All SD-WAN Members, or select Specify to choose specific SD-WAN members.
6. Set Enable probe packets to enable or disable sending probe packets.
7. Configure SLA Target:
If the health check is used in an SD-WAN rule that uses Manual or Best Quality strategies, enabling SLA Target is
optional. If the health check is used in an SD-WAN rule that uses Lowest Cost (SLA) or Maximum Bandwidth (SLA)
strategies, then SLA Target is enabled.
When SLA Target is enabled, configure the following:
l Latency threshold: Calculated based on last 30 probes (default = 5ms).
l Jitter threshold: Calculated based on last 30 probes (default = 5ms).
l Packet Loss threshold: Calculated based on last 100 probes (default = 0%).
= 500).
l Failures before inactive: The number of failed status checks before the interface shows as inactive (1 - 3600,
default =5). This setting helps prevent flapping, where the system continuously transfers traffic back and forth
between links
l Restore link after: The number of successful status checks before the interface shows as active (1 - 3600,
default = 5). This setting helps prevent flapping, where the system continuously transfers traffic back and forth
between links
9. In the Actions when Inactive section, enable Update static route to disable static routes for inactive interfaces and
restore routes when interfaces recover.
Link quality plays a significant role in link selection for SD-WAN. Investigate any prolonged issues with packet loss,
latency, or jitter to ensure that your network does not experience degraded performance or an outage.
You can monitor the link quality status of SD-WAN interface members by going to Network > SD-WAN and selecting the
Performance SLAs tab.
The live charts show the packet loss, latency, or jitter for the selected health check. Hover the cursor over a line in the
chart to see the specific value for that interface at that specific time.
The table shows information about each health check, including the configured servers, link quality data, and thresholds.
The colored arrow indicates the status of the interface when the last status check was performed: green means that the
interface was active, and red means that the interface was inactive. Hover the cursor over the arrow for additional
information.
The features adds an SD-WAN daemon function to keep a short, 10 minute history of SLA that can be viewed in the CLI.
Performance SLA results related to interface selection, session failover, and other information, can be logged. These
logs can then be used for long-term monitoring of traffic issues at remote sites, and for reports and views in
FortiAnalyzer.
The time intervals that Performance SLA fail and pass logs are generated in can be configured.
Timestamp: Fri Sep 4 10:42:37 2020, vdom root, health-check PingSLA, interface: wan2,
status: up, latency: 6.261, jitter: 0.257, packet loss: 0.000%.
Timestamp: Fri Sep 4 10:42:37 2020, vdom root, health-check PingSLA, interface: wan2,
status: up, latency: 6.229, jitter: 0.245, packet loss: 0.000%.
The FortiGate generates Performance SLA logs at the specified pass log interval (sla-pass-log-period) when SLA
passes.
date="2021-04-15" time="10:04:56" id=6951431609690095758 bid=52507 dvid=1047
itime=1618506296 euid=3 epid=3 dsteuid=3 dstepid=3 logver=700000066 logid="0113022925"
type="event" subtype="sdwan" level="information" msg="Health Check SLA status."
logdesc="SDWAN SLA information" status="up" interface="port1" eventtime=1618506296222639301
tz="-0700" eventtype="SLA" jitter="0.277" inbandwidthavailable="10.00Gbps"
outbandwidthavailable="10.00Gbps" bibandwidthavailable="20.00Gbps" packetloss="1.000%"
latency="186.071" slamap="0x1" healthcheck="BusinessCritical_CloudApps" slatargetid=1
outbandwidthused="40kbps" inbandwidthused="24kbps" bibandwidthused="64kbps"
devid="FGVM02TM20000000" vd="root" devname="Branch_Office_01" csf="fabric"
date="2021-04-15" time="10:04:56" id=6951431609690095759 bid=52507 dvid=1047
itime=1618506296 euid=3 epid=3 dsteuid=3 dstepid=3 logver=700000066 logid="0113022925"
type="event" subtype="sdwan" level="information" msg="Health Check SLA status."
logdesc="SDWAN SLA information" status="up" interface="port2" eventtime=1618506296223163068
tz="-0700" eventtype="SLA" jitter="0.204" inbandwidthavailable="10.00Gbps"
outbandwidthavailable="10.00Gbps" bibandwidthavailable="20.00Gbps" packetloss="0.000%"
latency="185.939" slamap="0x1" healthcheck="BusinessCritical_CloudApps" slatargetid=1
outbandwidthused="142kbps" inbandwidthused="23kbps" bibandwidthused="165kbps"
devid="FGVM02TM20000000" vd="root" devname="Branch_Office_01" csf="fabric"
The FortiGate generates Performance SLA logs at the specified fail log interval (sla-fail-log-period) when SLA
fails.
date="2021-04-15" time="10:04:59" id=6951431618280030243 bid=52507 dvid=1047
itime=1618506298 euid=3 epid=3 dsteuid=3 dstepid=3 logver=700000066 logid="0113022925"
type="event" subtype="sdwan" level="notice" msg="Health Check SLA status. SLA failed due to
being over the performance metric threshold." logdesc="SDWAN SLA information" status="down"
interface="To-HQ-MPLS" eventtime=1618506299718862835 tz="-0700" eventtype="SLA"
jitter="0.000" inbandwidthavailable="10.00Gbps" outbandwidthavailable="10.00Gbps"
bibandwidthavailable="20.00Gbps" packetloss="100.000%" latency="0.000" slamap="0x0"
healthcheck="BusinessCritical_CloudApps" slatargetid=1 metric="packetloss"
outbandwidthused="0kbps" inbandwidthused="0kbps" bibandwidthused="0kbps"
devid="FGVM02TM20000000" vd="root" devname="Branch_Office_01" csf="fabric"
date="2021-04-15" time="10:05:03" id=6951431639754866704 bid=52514 dvid=1046
itime=1618506303 euid=3 epid=3 dsteuid=3 dstepid=3 logver=700000066 logid="0113022925"
type="event" subtype="sdwan" level="notice" msg="Health Check SLA status. SLA failed due to
being over the performance metric threshold." logdesc="SDWAN SLA information" status="down"
interface="To-HQ-MPLS" eventtime=1618506304085863643 tz="-0700" eventtype="SLA"
jitter="0.000" inbandwidthavailable="10.00Gbps" outbandwidthavailable="10.00Gbps"
bibandwidthavailable="20.00Gbps" packetloss="100.000%" latency="0.000" slamap="0x0"
healthcheck="BusinessCritical_CloudApps" slatargetid=1 metric="packetloss"
outbandwidthused="6kbps" inbandwidthused="3kbps" bibandwidthused="9kbps"
devid="FGVM02TM20000000" vd="root" devname="Branch_Office_02" csf="fabric"
SLA log and interface information can be monitored using the REST API. This feature is also used by FortiManager as
part of its detailed SLA monitoring and drilldown features.
A comprehensive list of API calls with sample output is available on the Fortinet Developer Network.
SD-WAN passive WAN health measurement determines the health check measurements using session information that
is captured on firewall policies that have Passive Health Check (passive-wan-health-measurement) enabled.
Passive measurements analyze session information that is gathered from various TCP sessions to determine the jitter,
latency, and packet loss.
Using passive WAN health measurement reduces the amount of configuration required and decreases the traffic that is
produced by health check monitor probes doing active measurements. Passive WAN health measurement analyzes
real-life traffic; active WAN health measurement using a detection server might not reflect the real-life traffic.
By default, active WAN health measurement is enabled when a new health check is created. It can be changed to
passive or prefer passive:
passive Health is measured using traffic, without probes. No link health monitor needs to
be configured.
prefer-passive Health is measured using traffic when there is traffic, and using probes when
there is no traffic. A link health monitor must be configured, see Link health
monitor for details.
Example
In this example, the FortiGate is configured to load-balance between two WAN interfaces, port15 and port16. A health
check is configured in passive mode, and SLA thresholds are set. Passive WAN health measurement is enabled on the
SD-WAN policy.
Measurements are taken from YouTube traffic generated by the PC. When latency is introduced to the traffic on port15,
the passive health check trigger threshold is exceeded and traffic is rerouted to port16.
Probe packets can only be disabled in the CLI and when the probe mode is not
passive.
Name Background_Traffic
Application Click in the field, and in the Select Entries pane search for YouTube and
select all of the entries
c. Click OK.
Name Foreground_Traffic
Address all
e. Click OK.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the policy:
Name SD-WAN-HC-policy
Source all
Destination all
Schedule always
Service ALL
Action ACCEPT
3. Click OK.
edit 2
set zone "SD-WAN"
set interface "port16"
set gateway 172.16.210.2
next
end
config health-check
edit "Passive_Check"
set detect-mode passive
set members 1 2
config sla
edit 1
set latency-threshold 500
set jitter-threshold 500
set packetloss-threshold 10
next
edit 2
set latency-threshold 1000
set jitter-threshold 1000
set packetloss-threshold 10
next
end
next
end
config service
edit 1
set name "Background_Traffic"
set mode load-balance
set src "172.16.205.0"
set internet-service enable
set internet-service-app-ctrl 31077 33321 41598 31076 33104 23397 30201 16420
17396 38569 25564
config sla
edit "Passive_Check"
set id 2
next
end
set priority-member 1 2
next
edit 2
set name "Foreground_Traffic"
set mode sla
set src "172.16.205.0"
set protocol 1
set dst "all"
config sla
edit "Passive_Check"
set id 1
next
end
set priority-member 1 2
next
end
end
Results
Dst address(1):
8.8.8.8-8.8.8.8
When the latency is increased to 610ms on port15, the SLA is broken and pings are sent on port16:
Dst address(1):
8.8.8.8-8.8.8.8
Passive health measurement supports passive detection for each internet service and application.
If internet services or applications are defined in an SD-WAN rule with passive health check, SLA information for each
service or application will be differentiated and collected. SLA metrics (latency, jitter, and packet loss) on each SD-WAN
member in the rule are then calculated based on the relevant internet service's or application's SLA information.
In this example, three SD-WAN rules are created:
l Rule 1: Best quality (latency) using passive SLA for the internet services Alibaba and Amazon.
l Rule 2: Best quality (latency) using passive SLA for the applications Netflix and YouTube.
l Rule 3: Best quality (latency) using passive SLA for all other traffic.
After passive application measurement is enabled for rules one and two, the SLA metric of rule one is the average
latency of the internet services Alibaba and Amazon, and the SLA metric of rule two is the average latency of the
applications Netflix and YouTube.
end
end
5. Configure the firewall policy with passive WAN health measurement enabled:
config firewall policy
edit 1
1. On the PC, open the browser and visit the internet services and applications.
2. On the FortiGate, check the collected SLA information to confirm that each server or application on the SD-WAN
members was measured individually:
# diagnose sys link-monitor-passive interface
3. Verify that the SLA metrics on the members are calculated as expected:
# diagnose sys sdwan service
Dst address(1):
0.0.0.0-255.255.255.255
SD-WAN rules
SD-WAN rules, which are sometimes called service rules, identify traffic of interest, and then route the traffic based on a
strategy and the condition of the route or link between two devices. You can use many strategies to select the outgoing
interface and many performance service level agreements (SLAs) to evaluate the link conditions.
Use the following topics to learn about and create SD-WAN rules for your needs:
l SD-WAN rules overview on page 520
l Implicit rule on page 527
l Automatic strategy on page 531
l Manual strategy on page 532
l Best quality strategy on page 533
l Lowest cost (SLA) strategy on page 537
l Maximize bandwidth (SLA) strategy on page 540
l Manual interface speedtest on page 543
l Scheduled interface speedtest on page 544
SD-WAN rules control how sessions are distributed to SD-WAN members. You can configure SD-WAN rules from the
GUI and CLI.
From the GUI, go to Network > SD-WAN > SD-WAN Rules. When creating a new SD-WAN rule, or editing an existing
SD-WAN rule, use the Source and Destination sections to identify traffic, and use the Outgoing interfaces section to
configure WAN intelligence for routing traffic.
From the CLI, use the following command to configure SD-WAN rules:
config system sdwan
config service
edit <ID>
next
end
end
The following topics describe the fields used to configure SD-WAN rules:
l Fields for identifying traffic on page 521
l Fields for configuring WAN intelligence on page 523
l Additional fields for configuring WAN intelligence on page 526
This topic describes the fields in an SD-WAN rule used for defining the traffic to which the rule applies. Some fields are
available only in the CLI.
SD-WAN rules can identify traffic by a variety of means:
IPv4/6 ✓ ✓
MAC ✓ ✓
Group ✓ ✓
Users ✓ ✓
User groups ✓ ✓
In the GUI, go to Network > SD-WAN > SD-WAN Rules. Click Create New, or double-click an existing rule to open it for
editing. The Source and Destination sections are used to identify traffic for the rule:
In the CLI, edit the service definition ID number to identify traffic for the rule:
config system sdwan
config service
edit <ID>
<CLI commands from the following tables>
...
end
end
The following table describes the fields used for the name, ID, and IP version of the SD-WAN rule:
Name set name <string> The name does not need to relate to
the traffic being matched, but it is good
practice to have intuitive rule names.
IP version set addr-mode <ipv4 | ipv6> The addressing mode can be IPv4 or
IPv6.
To configure in the GUI, IPv6 must be
enabled from System > Feature
Visibility page.
The following table describes the fields used for source section of the SD-WAN rule:
Source
User group set users <user object> Individual users or user groups
set groups <group object>
The following table describes the fields used for the destination section of the SD-WAN rule:
Destination
Destination
This topic describes the fields in an SD-WAN rule used for configuring WAN intelligence, which processes and routes
traffic that matches the SD-WAN rule.
In the GUI, go to Network > SD-WAN > SD-WAN Rules. Click Create New, or double-click an existing rule to open it for
editing. The Outgoing Interfaces section is used to configure WAN intelligence for the rule:
By default, the configured order of interfaces and/or zones in a rule are used. Interfaces and zones that are selected first
have precedence over interfaces selected second and so on.
You can specify both interfaces and zones. When a zone is specified in the Zone preference field, it is equivalent to
selecting each of the contained interface members in the Interface preference section. Interface members in a zone
have lower priority than interfaces configured in the Interface preference section.
For example:
l There are 3 interfaces: port1, port2 and port3.
l Port2 is in Zone1
l An SD-WAN rule is created with Interface preference set to port3 and port1, and Zone preference set to Zone1.
Strategy
Strategy dictates how the interface and/or zone order changes as link conditions change. You can use the following
strategies:
l Automatic (auto): interfaces are assigned a priority based on quality. See Automatic strategy on page 531.
l Manual (manual): interfaces are manually assigned a priority. See Manual strategy on page 532.
l Best Quality (priority): interfaces are assigned a priority based on the link-cost-factor of the interface.
See Best quality strategy on page 533.
l Lowest cost (SLA) (sla): interfaces are assigned a priority based on selected SLA settings. See Lowest cost (SLA)
strategy on page 537.
l Maximize Bandwidth (SLA) (load-balance): traffic is distributed among all available links based on the selected
load balancing algorithm. See Maximize bandwidth (SLA) strategy on page 540.
Performance SLA
The best quality, lowest cost, and maximize bandwidth strategies are the most intelligent modes, and they leverage SLA
health checks to provide meaningful metrics for a given link. FortiGate uses the metrics to make intelligent decisions to
route traffic.
Automatic and manual strategies have pre-configured logic that do not leverage SLA health checks.
The goal of the performance SLA is to measure the quality of each SD-WAN member link. The following methods can be
used to measure the quality of a link:
l Active measurement
l Health-check traffic is sent to a server with a variety of protocols options.
l Latency
l Jitter
l Packet loss
l Passive measurement
l SLA metrics are measured on real or live traffic, reducing the amount of probe traffic that is sent and received.
l There is the option (prefer passive) to initiate probe traffic when no live traffic is present.
Performance SLA is utilized by auto, Lowest Cost (SLA), Maximize Bandwidth (SLA), and Best Quality strategies.
Lowest Cost (SLA) and Maximize Bandwidth SLA use SLA targets in a pass or fail style to evaluate whether a link is
considered for traffic. Best Quality compares a specific metric of the SLA to pick the best result.
Therefore it is integral to select or create an SLA target(s) that relates to the traffic targeted by the rule. It does not make
sense to evaluate a public resource, such as YouTube, when the rule matches Azure traffic.
See Performance SLA on page 499 for more details.
This topic describes the fields in an SD-WAN rule used for configuring WAN intelligence for egress traffic:
l Forward and/or reverse differentiated services code point (DSCP) on page 526
l Default and gateway options on page 526
For information about accessing fields for configuring WAN intelligence, see Fields for configuring WAN intelligence on
page 523.
The FortiGate differentiated services feature can be used to change the DSCP value for all packets accepted by a policy.
The packet's DSCP field for traffic initiating a session (forward) or for reply traffic (reverse) can be changed and enabled
in each direction separately by configuring it in the firewall policy using the Forward DSCP and Reverse DSCP fields.
From the CLI:
config system sdwan
config service
edit <ID>
...
set dscp-forward enable
...
next
end
end
Following are additional gateway options that can be set only in the CLI:
config system sdwan
config service
edit <ID>
...
set default enable
...
next
end
end
Implicit rule
SD-WAN rules define specific policy routing options to route traffic to an SD-WAN member. When no explicit SD-WAN
rules are defined, or if none of the rules are matched, then the default implicit rule is used.
In an SD-WAN configuration, the default route usually points to the SD-WAN interface, so each active member's
gateway is added to the routing table's default route. FortiOS uses equal-cost multipath (ECMP) to balance traffic
between the interfaces. One of five load balancing algorithms can be selected:
Source IP (source-ip-based) Traffic is divided equally between the interfaces, including the SD-WAN interface.
Sessions that start at the same source IP address use the same path.
This is the default selection.
Sessions (weight-based) The workload is distributing based on the number of sessions that are connected
through the interface.
The weight that you assign to each interface is used to calculate the percentage of
the total sessions that are allowed to connect through an interface, and the
sessions are distributed to the interfaces accordingly.
Sessions with the same source and destination IP addresses (src-ip and dst-
ip) are forwarded to the same path, but are still considered in later session ratio
calculations.
An interface's weight value cannot be zero.
Spillover (usage-based) The interface is used until the traffic bandwidth exceeds the ingress and egress
thresholds that you set for that interface. Additional traffic is then sent through the
next SD-WAN interface member.
Source-Destination IP (source- Traffic is divided equally between the interfaces. Sessions that start at the same
dest-ip-based) source IP address and go to the same destination IP address use the same path.
Volume (measured-volume- The workload is distributing based on the number of packets that are going
based) through the interface.
The volume weight that you assign to each interface is used to calculate the
percentage of the total bandwidth that is allowed to go through an interface, and
the bandwidth is distributed to the interfaces accordingly.
An interface's volume value cannot be zero.
You cannot exclude an interface from participating in load balancing using the implicit rule. If
the weight or volume were set to zero in a previous FortiOS version, the value is treated as a
one.
Interfaces with static routes can be excluded from ECMP if they are configured with a lower
priority than other static routes.
Examples
The following four examples demonstrate how to use the implicit rules (load-balance mode).
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
Example 1
Outgoing traffic is equally balanced between wan1 and wan2, using source-ip-based or source-dest-ip-based mode.
1. On the FortiGate, enable SD-WAN and add wan1 and wan2 as SD-WAN members, then add a policy and static
route. See SD-WAN quick start on page 478 for details.
2. Go to Network > SD-WAN and select the SD-WAN Rules tab.
3. Edit the sd-wan rule (the last default rule).
4. For the Load Balancing Algorithm, select either Source IP or Source-Destination IP.
5. Click OK.
1. Enable SD-WAN and add wan1 and wan2 as SD-WAN members, then add a policy and static route. See SD-WAN
quick start on page 478 for details.
2. Set the load balancing algorithm:
Source IP based:
config system sdwan
set load-balance-mode source-ip-based
end
Source-Destination IP based:
config system sdwan
set load-balance-mode source-dest-ip-based
end
Example 2
Outgoing traffic is balanced between wan1 and wan2 with a customized ratio, using weight-based mode: wan1 runs 80%
of the sessions, and wan2 runs 20% of the sessions.
Sessions with the same source and destination IP addresses (src-ip and dst-ip) will be forwarded to the same
path, but will still be considered in later session ratio calculations.
5. Click OK.
next
edit 2
set interface "wan2"
set weight 20
next
end
end
Example 3
Outgoing traffic is balanced between wan1 and wan2 with a customized ratio, using measured-volume-based mode:
wan1 runs 80% of the volume, and wan2 runs 20% of the volume.
Example 4
Load balancing can be used to reduce costs when internet connections are charged at different rates. For example, if
wan2 charges based on volume usage and wan1 charges a fixed monthly fee, we can use wan1 at its maximum
bandwidth, and use wan2 for overflow.
In this example, wan1's bandwidth is 10Mbps down and 2Mbps up. Traffic will use wan1 until it reaches its spillover limit,
then it will start to use wan2. Note that auto-asic-offload must be disabled in the firewall policy.
1. On the FortiGate, enable SD-WAN and add wan1 and wan2 as SD-WAN members, then add a policy and static
route. See SD-WAN quick start on page 478 for details.
2. Go to Network > SD-WAN and select the SD-WAN Rules tab.
3. Edit the sd-wan rule (the last default rule).
4. For the Load Balancing Algorithm, select Spillover.
5. Enter 10000 in the wan1 Ingress Spillover Threshold field, and 2000 in the wan1 Egress Spillover Threshold field.
6. Click OK.
Automatic strategy
The automatic strategy is a legacy rule that lets you select an outgoing interface based on its performance ranking
compared to the other SD-WAN interfaces. This is achieved by applying a performance SLA to rank the interfaces, and
then selecting the desired rank.
In this example, you have three SD-WAN interfaces to three different ISPs that all go to the public internet. WAN1 is your
highest quality link and should be reserved for business critical traffic. WAN2 and WAN3 are redundant backup links.
You noticed one non-critical application is taking up a lot of bandwidth and want to prioritize it to the lowest quality link at
any given time.
end
config health-check
edit "non-critical application"
set server "noncritical.application.com"
set members 1 2 3
config sla
edit 1
set latency-threshold 250
set jitter-threshold 50
set packletloss-threshold 3
next
end
next
end
config service
edit 1
set name "non-critical application"
set mode auto
set quality-link 3
set dst "non-critical-app-address-object"
set health-check "non-critical application"
next
end
end
The auto option is only available in the CLI. If you use the GUI to edit the rule, the auto option
will be overwritten because you cannot select auto in the GUI.
Manual strategy
In manual mode, no health checks are used. As a result, the decision making closer resembles logic than intelligence.
SD-WAN manual rules are similar to regular policy-based routes, but have the added features of application-aware
routing and BGP-tag routing. A manual strategy rule is comprised of the following parts:
l Defining the interfaces to be used
l Ordering the interfaces based on preference
4. Set the remaining options as desired, and click OK to create the rule.
l The command set mode manual will not appear in the configuration because it is the
default mode.
l The command set hold-down-time <integer> is an optional command that
controls how long to wait before switching back to the primary interface in the event of a
failover.
When using Best Quality mode, SD-WAN will choose the best link to forward traffic by comparing the link-cost-factor. A
link-cost factor is a specific metric of participating link(s) (such as, latency, packet loss, and so on) evaluated against a
target that you define (such as a health-check server), for example, the latency of WAN1 and WAN2 to your datacenter.
Below is a list of link-cost factors available to you:
Customized profile custom-profile-1 Select link based on customized profile. If selected, set the
following weights:
l packet-loss-weight: Coefficient of packet-loss.
bidirectional bandwidth.
Although SD-WAN intelligence selects the best quality link according to the selected metric, by default a preference or
advantage is given to the first configured SD-WAN member. This default is 10% and may be configured with the CLI
command set link-cost-threshold 10.
Example of how link-cost-threshold works:
config system sdwan
config members
edit 1
set interface "wan1"
next
edit 2
set interface "wan2"
next
end
config service
edit 1
set name "Best_Quality"
set mode priority
set priority-members 2 1
set dst "DC_net"
set health-check “DC_HealthCheck”
set link-cost-factor latency
set link-cost-threshold 10
next
end
end
In this example both WAN1 and WAN2 are assumed to have 200ms latency to the health-check server named DC_
HealthCheck. Because WAN2 is specified before WAN1 in priority-members, SD-WAN parses the two interfaces
metric as follows:
l WAN1: 200ms
l WAN2: 200ms / (1+10%) = ~182ms
As a result, WAN2 is selected because the latency is lower.
If the Downstream (inbandwidth), Upstream (outbandwidth), or Bandwidth (bibandwidth) quality criteria is used,
the FortiGate uses the upstream and downstream bandwidth values configured on the member interfaces to calculate
bandwidth.
The interface bandwidth configuration can be done manually, or the interface speedtest can be used to populate the
bandwidth values based on the speedtest results. See Manual interface speedtest on page 543 for details.
Example
In this example, your wan1 and wan2 SD-WAN interfaces connect to two ISPs that both go to the public internet, and you
want Gmail services to use the link with the least latency.
1. On the FortiGate, add wan1 and wan2 as SD-WAN members, then add a policy and static route. See SD-WAN
quick start on page 478 for more details.
2. Go to Network > SD-WAN, select the Performance SLAs tab, and click Create New.
3. Enter a name for the performance SLA, such as google, and set the Server to google.com. See Health checks for
more details.
4. Click OK.
5. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
6. Enter a name for the rule, such as gmail.
7. Configure the following settings:
8. Click OK.
As wan2 has a smaller latency, SD-WAN will put Seq_num(2) on top of Seq_num(1) and wan2 will be used to forward
Gmail traffic.
When using Lowest Cost (SLA) mode (sla in the CLI), SD-WAN will choose the lowest cost link that satisfies SLA to
forward traffic. The lowest possible cost is 0. If multiple eligible links have the same cost, the Interface preference order
will be used to select a link.
In this example, your wan1 and wan2 SD-WAN interfaces connect to two ISPs that both go to the public internet. The
cost of wan2 is less than that of wan1. You want to configure Gmail services to use the lowest cost interface, but the link
quality must meet a standard of latency: 10ms, and jitter: 5ms.
1. On the FortiGate, add wan1 and wan2 as SD-WAN members, then add a policy and static route. See SD-WAN
quick start on page 478 for more details.
2. Go to Network > SD-WAN, select the Performance SLAs tab, and click Create New.
3. Enter a name for the performance SLA, such as google, and set the Server to google.com.
4. Enable SLA Target. Set the Latency threshold to 10 ms, and the Jitter threshold to 5 ms. See Health checks for
more details.
5. Click OK.
6. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
7. Enter a name for the rule, such as gmail.
8. Configure the following settings:
9. Click OK.
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
The CLI command set minimum-sla-meet-members allows you to specify the number of
links that must meet SLA for the rule to take effect. If the number of members is less than the
minimum set with this command, the rule will not take effect.
When both wan1 and wan2 meet the SLA requirements, Gmail traffic will only use wan2. If only wan1 meets the SLA
requirements, Gmail traffic will only use wan1, even though it has a higher cost. If neither interface meets the
requirements, wan2 will be used.
If both interface had the same cost and both met the SLA requirements, the first link configured in set priority-
members would be used.
When using Maximize Bandwidth mode (load-balance in the CLI), SD-WAN will choose all of the links that satisfies
SLA to forward traffic based on a load balancing algorithm. The load balancing algorithm, or hash method, can be one of
the following:
round-robin All traffic are distributed to selected interfaces in equal portions and circular order.
This is the default method, and the only option available when using the GUI.
source-dest-ip- All traffic from a source IP to a destination IP is sent to the same interface.
based
inbandwidth All traffic are distributed to a selected interface with most available bandwidth for incoming traffic.
outbandwidth All traffic are distributed to a selected interface with most available bandwidth for outgoing traffic.
bibandwidth All traffic are distributed to a selected interface with most available bandwidth for both incoming
and outgoing traffic.
When the inbandwidth, outbandwidth), or bibandwidth load balancing algorithm is used, the FortiGate will
compare the bandwidth based on the configured upstream and downstream bandwidth values.
The interface speedtest can be used to populate the bandwidth values based on the speedtest results. See Manual
interface speedtest on page 543 for details.
next
end
In this example, your wan1 and wan2 SD-WAN interfaces connect to two ISPs that both go to the public internet. You
want to configure Gmail services to use both of the interface, but the link quality must meet a standard of latency: 10ms,
and jitter: 5ms. This can maximize the bandwidth usage.
1. On the FortiGate, add wan1 and wan2 as SD-WAN members, then add a policy and static route. See SD-WAN
quick start on page 478 for details.
2. Go to Network > SD-WAN, select the Performance SLAs tab, and click Create New.
3. Enter a name for the performance SLA, such as google, and set the Server to google.com.
4. Enable SLA Target. Set the Latency threshold to 10 ms, and the Jitter threshold to 5 ms. See Health checks for
more details.
5. Click OK.
6. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
7. Enter a name for the rule, such as gmail.
Field Setting
9. Click OK.
edit 1
set name "gmail"
set addr-mode ipv4
set mode load-balance
set hash-mode round-robin
set internet-service enable
set internet-service-name Google-Gmail
config sla
edit "google"
set id 1
next
end
set priority-members 1 2
next
end
end
The CLI command set minimum-sla-meet-members allows you to specify the number of
links that must meet SLA for the rule to take effect. If the number of members is less than the
minimum set with this command, the rule will not take effect.
When both wan1 and wan2 meet the SLA requirements, Gmail traffic will use both wan1 and wan2. If only one of the
interfaces meets the SLA requirements, Gmail traffic will only use that interface.
If neither interface meets the requirements but health-check is still alive, then wan1 and wan2 tie. The traffic will try to
balance between wan1 and wan2, using both interfaces to forward traffic.
An interface speedtest can be manually performed on WAN interfaces in the GUI. The results of the test can be added to
the interface's Estimated bandwidth. The estimated upstream and downstream bandwidths can be used in SD-WAN
service rules to determine the best link to use when either Maximize Bandwidth or Best Quality strategies are selected.
An SD-WAN Network Monitor license is required to use the speedtest. The License widget and the System > FortiGuard
page show the license status.
4. When the test completes, click OK in the Confirm pane to apply the results to the estimated bandwidth.
The results can also be applied later by clicking Apply results to estimated bandwidth.
The speedtest results are used to populate the Estimated bandwidth fields.
5. Click OK.
The FortiGate must be connected to FortiGuard, and able to reach either the AWS or Google
speedtest servers.
The SD-WAN Network Monitor service supports running a speed test based on a schedule. The test results are
automatically updated in the interface measured-upstream-bandwidth and measured-downstream-bandwidth
fields. These fields do not impact the interface inbound bandwidth, outbound bandwidth, estimated upstream bandwidth,
or estimated downstream bandwidth settings.
An SD-WAN Network Monitor license is required to use the speedtest. The License widget and the System > FortiGuard
page show the license status.
When the scheduled speed tests run, it is possible to temporarily bypass the bandwidth limits set on the interface and
configure custom maximum or minimum bandwidth limits. These configurations are optional.
config system speed-test-schedule
edit <interface>
set schedules <schedule> ...
set update-inbandwidth enable {enable | disable}
set update-outbandwidth enable {enable | disable}
set update-inbandwidth-maximum <integer>
set update-inbandwidth-minimum <integer>
set update-outbandwidth-maximum <integer>
set update-outbandwidth-minimum <integer>
next
end
In the following example, a speed test is scheduled on port1 at 10:00 AM, and another one at 14:00 PM.
Use a traffic shaper in a firewall shaping policy to control traffic flow. You can use it to control maximum and guaranteed
bandwidth, or put certain traffic to one of the three different traffic priorities: high, medium, or low.
An advanced shaping policy can classify traffic into 30 groups. Use a shaping profile to define the percentage of the
interface bandwidth that is allocated to each group. Each group of traffic is shaped to the assigned speed limit based on
the outgoing bandwidth limit configured on the interface.
For more information, see Traffic shaping on page 860.
Sample topology
Sample configuration
This example shows a typical customer usage where the customer's SD-WAN uses the default zone, and has two
member: wan1 and wan2, each set to 10Mb/s.
An overview of the procedures to configure SD-WAN traffic shaping and QoS with SD-WAN includes:
1. Give HTTP/HTTPS traffic high priority and give FTP low priority so that if there are conflicts, FortiGate will forward
HTTP/HTTPS traffic first.
2. Even though FTP has low priority, configure FortiGate to give it a 1Mb/s guaranteed bandwidth on each SD-WAN
member so that if there is no FTP traffic, other traffic can use all the bandwidth. If there is heavy FTP traffic, it can
still be guaranteed a 1Mb/s bandwidth.
3. Traffic going to specific destinations such as a VOIP server uses wan1 to forward, and SD-WAN forwards with an
Expedited Forwarding (EF) DSCP tag 101110.
To configure SD-WAN traffic shaping and QoS with SD-WAN in the GUI:
1. On the FortiGate, add wan1 and wan2 as SD-WAN members, then add a policy and static route.
See SD-WAN quick start on page 478.
2. Add a firewall policy with Application Control enabled. See Configuring firewall policies for SD-WAN on page 481.
3. Go to Policy & Objects > Traffic Shaping, select the Traffic Shapers tab, and edit low-priority.
a. Enable Guaranteed Bandwidth and set it to 1000 kbps.
4. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Policies tab, and click Create New.
a. Name the traffic shaping policy, for example, HTTP-HTTPS.
b. Set the following:
Source all
Destination all
c. Click OK.
5. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Policies tab, and click Create New.
a. Name the traffic shaping policy, for example, FTP.
b. Set the following:
Source all
Destination all
c. Click OK
6. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
a. Enter a name for the rule, such as Internet.
b. In the Destination section, click Address and select the VoIP server that you created in the firewall address.
c. Under Outgoing Interfaces select Manual.
d. For Interface preference select wan1.
e. Click OK.
7. Use CLI commands to modify DSCP settings. See the DSCP CLI commands below.
edit 2
set name "FTP"
set service "FTP" "FTP_GET" "FTP_PUT"
set dstintf "virtual-wan-link"
set traffic-shaper "low-priority"
set traffic-shaper-reverse "low-priority"
set srcaddr "all"
set dstaddr "all"
next
end
To configure SD-WAN traffic shaping and QoS with SD-WAN in the CLI:
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
To use the diagnose command to check if specific traffic is attached to the correct traffic shaper:
service(2):
[6:0x0:0/(1,65535)->(80,80)] helper:auto
[6:0x0:0/(1,65535)->(443,443)] helper:auto
To use the diagnose command to check if the correct traffic shaper is applied to the session:
To use the diagnose command to check the status of a shared traffic shaper:
name high-priority
maximum-bandwidth 131072 KB/sec
guaranteed-bandwidth 0 KB/sec
current-bandwidth 0 B/sec
priority 2
tos ff
packets dropped 0
bytes dropped 0
name low-priority
maximum-bandwidth 131072 KB/sec
guaranteed-bandwidth 125 KB/sec
current-bandwidth 0 B/sec
priority 4
tos ff
packets dropped 0
bytes dropped 0
name high-priority
maximum-bandwidth 131072 KB/sec
guaranteed-bandwidth 0 KB/sec
current-bandwidth 0 B/sec
priority 2
policy 1
tos ff
packets dropped 0
bytes dropped 0
name low-priority
maximum-bandwidth 131072 KB/sec
guaranteed-bandwidth 125 KB/sec
current-bandwidth 0 B/sec
priority 4
policy 2
tos ff
packets dropped 0
bytes dropped 0
SDN dynamic connector addresses can be used in SD-WAN rules. FortiGate supports both public (AWS, Azure, GCP,
OCI, AliCloud) and private (Kubernetes, VMware ESXi and NSX, OpenStack, ACI, Nuage) SDN connectors.
The configuration procedure for all of the supported SDN connector types is the same. This example uses an Azure
public SDN connector.
There are four steps to create and use an SDN connector address in an SD-WAN rule:
1. Configure the FortiGate IP address and network gateway so that it can reach the Internet.
2. Create an Azure SDN connector.
3. Create a firewall address to associate with the configured SDN connector.
4. Use the firewall address in an SD-WAN service rule.
Name azure1
Status Enabled
Directory ID 942b80cd-1b14-42a1-8dcf-4b21dece61ba
Application ID 14dbd5c5-307e-4ea4-8133-68738141feb1
5. Click OK.
Category Address
Name azure-address
Type Dynamic
Filter SecurityGroup=edsouza-centos
Interface Any
4. Click OK.
1. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
2. Set the Name to Azure1.
3. For the Destination Address select azure-address.
4. Configure the remaining settings as needed. See SD-WAN rules on page 519 for details.
5. Click OK.
Diagnostics
Use the following CLI commands to check the status of and troubleshoot the connector.
...
azd sdn connector azure1 start updating IP addresses
azd checking firewall address object azure-address-1, vd 0
IP address change, new list:
10.18.0.4
10.18.0.12
...
...
# diagnose sys sdwan service
This topic covers how to use application steering in a topology with multiple WAN links. The following examples illustrate
how to use different strategies to perform application steering to accommodate different business needs:
l Static application steering with a manual strategy on page 555
l Dynamic application steering with lowest cost and best quality strategies on page 557
Application matching
To apply application steering, SD-WAN service rules match traffic based on the applications that are in the application
signature database. To view the signatures, go to Security Profiles > Application Signatures and select Signature.
On the first session that passes through, the IPS engine processes the traffic in the application layer to match it to a
signature in the application signature database. The first session does not match any SD-WAN rules because the
signature has not been recognized yet. When the IPS engine recognizes the application, it records the 3-tuple IP
address, protocol, and port in the application control Internet Service ID list. To view the application and corresponding
3-tuple:
# diagnose sys sdwan internet-service-app-ctrl-list [app ID]
52.114.142.254
Microsoft.Teams(43541 4294837333): 52.114.142.254 6 443 Fri Jun 18 13:52:18 2021
The recognized application and 3-tuple stay in the application control list for future matches to occur. If there are no hits
on the entry for eight hours, the entry is deleted.
For services with multiple IP addresses, traffic might not match the expected SD-WAN rule
because the traffic is destined for an IP address that hat no previously been recognized by the
FortiGate. The diagnose sys sdwan internet-service-app-ctrl-list command
can be used to help troubleshoot such situations.
This example covers a typical usage scenario where the SD-WAN has two members: MPLS and DIA. DIA is primarily
used for direct internet access to internet applications, such as Office365, Google applications, Amazon, and Dropbox.
MPLS is primarily used for SIP, and works as a backup when DIA is not working.
This example configures all SIP traffic to use MPLS while all other traffic uses DIA. If DIA is not working, the traffic will
use MPLS.
1. Add port1 (DIA) and port2 (MPLS) as SD-WAN members, and configure a static route. See Configuring the SD-
WAN interface on page 479 for details.
2. Create a firewall policy with an Application Control profile configured. See Configuring firewall policies for SD-WAN
on page 481 for details.
3. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
4. Enter a name for the rule, such as SIP.
5. Click the Application field and select the applicable SIP applications from the Select Entries panel.
6. Under Outgoing Interfaces, select Manual.
7. For Interface preference, select MPLS.
8. Click OK.
9. Click Create New to create another rule.
10. Enter a name for the rule, such as Internet.
11. Click the Address field and select all from the panel.
12. Under Outgoing Interfaces, select Manual.
13. For Interface preference, select DIA.
14. Click OK.
To configure an SD-WAN rule to use SIP and DIA using the CLI:
All SIP traffic uses MPLS. All other traffic goes to DIA. If DIA is broken, the traffic uses MPLS. If you use VPN instead of
MPLS to run SIP traffic, you must configure a VPN interface, for example vpn1, and then replace member 1 from MPLS
to vpn1 for SD-WAN member.
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
To use the diagnose command to check performance SLA status using the CLI:
Dynamic application steering with lowest cost and best quality strategies
In this example, the SD-WAN has three members: two ISPs (DIA_1 and DIA_2) that are used for access to internet
applications, and an MPLS link that is used exclusively as a backup for business critical applications.
Business applications, such as Office365, Google, Dropbox, and SIP, use the Lowest Cost (SLA) strategy to provide
application steering, and traffic falls back to MPLS only if both ISP1 and ISP2 are down. Non-business applications, such
as Facebook and Youtube, use the Best Quality strategy to choose between the ISPs.
To configure the SD-WAN members, static route, and firewall policy in the GUI:
1. Add port1 (DIA_1), port2 (DIA_2), and port3 (MPLS) as SD-WAN members. Set the cost of DIA_1 and DIA_2 to 0,
and MPLS to 20. See Configuring the SD-WAN interface on page 479 for details.
2. Configure a static route. See Adding a static route on page 480 for details.
3. Create a firewall policy to allow traffic out on SD-WAN, with an Application Control profile configured. See
Configuring firewall policies for SD-WAN on page 481 for details.
To configure the SD-WAN rule and performance SLA checks for business critical application in the GUI:
1. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
2. Set the name to BusinessCriticalApps.
This rule will steer your business critical traffic to the appropriate link based on the Lowest Cost (SLA).
3. Set Source address to all.
4. Under Destination, set Application to your required applications. In this example: Microsoft.Office.365,
Microsoft.Office.Online, Google.Docs, Dropbox, and SIP.
5. Under Outgoing Interfaces, select Lowest Cost (SLA).
The lowest cost is defined in the SD-WAN member interface settings (see Configuring the SD-WAN interface on
page 479). The lowest possible cost is 0, which represents the most preferred link. In this example, DIA_1 and DIA_
2 both have a cost of 0, while MPLS has a cost of 20 because it is used for backup.
6. In Interface preference, add the interfaces in order of preference when the cost of the links is tied. In this example,
DIA_1, DIA_2, then MPLS.
MPLS will always be chosen last, because it has the highest cost. DIA_1 and DIA_2 have the same cost, so an
interface is selected based on their order in the Interface preference list.
7. Set Required SLA target to ensure that only links that pass your SLA target are chosen in this SD-WAN rule:
a. Click in the Required SLA target field.
b. In the Select Entries pane, click Create. The New Performace SLA pane opens.
c. Set Name to BusinessCriticalApps_HC.
This health check is used for business critical applications in your SD-WAN rule.
d. Leave Protocol set to Ping, and add up to two servers, such as office.com and google.com.
e. Set Participants to Specify, and add all three interfaces: DIA_1, DIA_2, and MPLS.
f. Enable SLA Target.
The attributes in your target determine the quality of your link. The SLA target of each link is compared when
determining which link to use based on the lowest cost. Links that meet the SLA target are preferred over links
that fail, and move to the next step of selection based on cost. If no links meet the SLA target, then they all
move to the next step.
In this example, disable Latency threshold and Jitter threshold, and set Packet loss threshold to 1.
g. Click OK.
h. Select the new performance SLA to set it as the Required SLA target.
When multiple SLA targets are added, you can choose which target to use in the SD-WAN rule.
To configure the SD-WAN rule and performance SLA checks for non-business critical application in the
GUI:
1. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
2. Set the name to NonBusinessCriticalApps.
This rule will steer your non-business critical traffic to the appropriate link based on the Best Quality. No SLA target
must be met, as the best link is selected based on the configured quality criteria and interface preference order.
3. Set Source address to all.
4. Under Destination, set Application to your required applications. In this example: Facebook, and Youtube.
5. Under Outgoing Interfaces, select Best Quality.
6. In Interface preference, add the interfaces in order of preference.
By default, a more preferred link has an advantage of 10% over a less preferred link. For example, when latency is
used, the preferred link’s calculated latency = real latency / (1+10%).
The preferred link advantage can be customized in the CLI when the mode is priority
(Best Quality) or auto:
config system sdwan
config service
edit <id>
set link-cost-threshold <integer>
next
end
end
To configure the SD-WAN members, static route, and firewall policy in the CLI:
edit 1
set interface "port1"
set gateway 172.16.20.2
next
edit 2
set interface "port2"
set gateway 172.17.80.2
next
edit 3
set interface "port3"
set gateway 10.100.20.2
set cost 20
next
end
end
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
3. Configure a static route. See Adding a static route on page 480 for details.
4. Create a firewall policy to allow traffic out on SD-WAN, with an Application Control profile configured. See
Configuring firewall policies for SD-WAN on page 481 for details.
To configure the SD-WAN rule and performance SLA checks for business critical application in the CLI:
next
end
set priority-members 1 2 3
next
end
end
To configure the SD-WAN rule and performance SLA checks for non-business critical application in the
CLI:
Verification
Check the following GUI pages, and run the following CLI commands to confirm that your traffic is being steered by the
SD-WAN rules.
Health checks
1. Go to Network > SD-WAN, select the Performance SLAs tab, and select each of the health checks from the list.
To verify the active members and hit count of the SD-WAN rule in the GUI:
The interface that is currently selected by the rule has a checkmark next to its name in the Members column. Hover
the cursor over the checkmark to open a tooltip that gives the reason why that member is selected. If multiple
members are selected, only the highest ranked member is highlighted (unless the mode is Maximize Bandwidth
(SLA)).
To verify the active members and hit count of the SD-WAN rule in the CLI:
1. Go to a dashboard and add the FortiView Cloud Applications widget sorted by bytes. See Cloud application view on
page 119 for details.
2. Drill down on an application, such as YouTube, then select the Sessions tab.
Differentiated Services Code Point (DSCP) tags can be used to categorize traffic for quality of service (QoS). SD-WAN
traffic steering on an edge device can be provided based on the DSCP tags.
This section provides an example of using DSCP tag-based traffic steering using secure SD-WAN. Traffic from the
customer service and marketing departments at a headquarters are marked with separate DSCP tags by the core switch
and passed to the edge FortiGate. The edge FortiGate reads the tags, then steers traffic to the preferred interfaces
based on the defined SD-WAN rules.
VoIP and social media traffic are steered. VoIP traffic from the customer service department is more important than
social media traffic. The edge FortiGate identifies the tagged traffic based on SD-WAN rules then steers the traffic:
l VoIP traffic is marked with DSCP tag 011100 and steered to the VPN overlay with the lowest jitter, to provide the
best quality voice communication with the remote PBX server.
l Social media traffic is marked with the DSCP tag 001100 and steered to the internet connection with the lowest cost.
The following is assumed to be already configured:
l Two IPsec tunnels (IPsec VPNs on page 1252):
l Branch-HQ-A on Internet_A (port 1)
l Branch-HQ-B on Internet_B (port 5)
l Four SD-WAN members in two zones (Configuring the SD-WAN interface on page 479):
l Overlay zone includes members Branch-HQ-A and Branch-HQ-B
l virtual-wan-link zone includes members Internet_A and Internet_B
Internet_A has a cost of 0 and Internet_B has a cost of 10. When using the lowest cost strategy, Internet_A will
be preferred. Both members are participants in the Default_DNS performance SLA.
l A static route that points to the SD-WAN interface (Adding a static route on page 480).
l Two firewall policies:
To virtual-wan-link Overlay
After the topology is configured, you can proceed with the configuration of the edge FortiGate:
l Configuring SD-WAN rules on page 568
l Results on page 569
Configure SD-WAN rules to govern the steering of DSCP tag-based traffic to the appropriate interfaces. Traffic is steered
based on the criteria that are configured in the SD-WAN rules.
In this example, three SD-WAN rules are configured to govern DSCP tagged traffic:
l VoIP-Steer for VoIP traffic.
l Facebook-DSCP-steer for Social media traffic.
l All-traffic for all of the Other web traffic.
After configuring the rules, go to Network > SD-WAN and select the SD-WAN Rules tab to check the rules.
VoIP traffic
To configure the rule for DSCP tagged VoIP traffic using the CLI:
The Manual (manual mode) strategy is used to select the preferred interface. Internet_B (port5, priority member 2) is set
as the preferred interface to steer all social media traffic to. For more information about configuring SD-WAN rules with
the manual strategy, see Manual strategy on page 532.
To configure SD-WAN rule for DSCP tagged social media traffic using the CLI:
To configure SD-WAN rule for all other web traffic using the CLI:
Results
These sections show the function of SD-WAN with respect to DSCP tagged traffic steering, and can help confirm that it is
running as expected:
Packet sniffing is used to verify the incoming DSCP tagged traffic. See Using the FortiOS built-in packet sniffer for more
information.
Wireshark is used to verify that VoIP traffic is tagged with the expected DSCP tag, 0x70 or 0x30.
# diagnose sniffer packet any '(ip and ip[1] & 0xfc == 0x70)' 6 0 l
# diagnose sniffer packet any '(ip and ip[1] & 0xfc == 0x30)' 6 0 l
To check that the expected DSCP tags and corresponding interfaces are used by the SD-WAN rules to
steer traffic:
Go to Network > SD-WAN and select the SD-WAN Rules tab to check the Hit Count on the SD-WAN interfaces.
To confirm that web traffic (port 443) flows through the correct underlay interface members, and VoIP traffic flows
through the correct overlay interface members, go to Dashboard > FortiView Policies and double click on the policy
name.
Web traffic is expected to leave on Interface_A (port1) or Interface_B (port5):
The longest match SD-WAN rule can match ECMP best routes. The rule will select the egress ports on ECMP specific
routes, and not the less specific routes, to transport traffic.
The service mode determines which egress port on the ECMP specific routes is selected to forward traffic:
l Manual (manual): The first configured alive port is selected.
l Best Quality (priority): The best quality port is selected.
l Lowest Cost (sla): The first configured or lower cost port in SLA is selected.
Example
By default, SD-WAN selects the outgoing interface from all of the links that have valid routes to the destination. In some
cases, it is required that only the links that have the best (or longest match) routes (single or ECMP) to the destination
are considered.
In this example, four SD-WAN members in two zones are configured. The remote PC (PC_2 - 10.1.100.22) is accessible
on port15 and port16, even though there are valid routes for all of the SD-WAN members. A single SD-WAN service rule
is configured that allows traffic to balanced between all four of the members, but only chooses between port15 and
port16 for the specific 10.1.100.22 address.
A performance SLA health check is configured to monitor 10.1.100.2. An SD-WAN service rule in Lowest Cost (SLA)
mode is configured to select the best interface to steer the traffic. In the rule, the method of selecting a member if more
than one meets the SLA (tie-break) is configured to select members that meet the SLA and match the longest prefix
in the routing table (fib-best-match). If there are multiple ECMP routes with the same destination, the FortiGate will
take the longest (or best) match in the routing table, and choose from those interface members.
1. The debug shows the SD-WAN service rule. All of the members meet SLA, and because no specific costs are
attached to the members, the egress interface is selected based on the interface priority order that is configured in
the rule:
FGT_A (root) # diagnose sys sdwan service
Src address(1):
172.16.205.0-172.16.205.255
Dst address(1):
0.0.0.0-255.255.255.255
2. The routing table shows that there are ECMP default routes on all of the members, and ECMP specific (or best)
routes only on port15 and port16:
FGT_A (root) # get router info routing-table static
Routing table for VRF=0
S* 0.0.0.0/0 [1/0] via 172.16.200.2, port1
[1/0] via 172.16.208.2, dmz
[1/0] via 172.16.209.2, port15
[1/0] via 172.16.210.2, port16
S 10.1.100.22/32 [10/0] via 172.16.209.2, port15
[10/0] via 172.16.210.2, port16
Because tie-break is set to fib-best-match, the first configured member from port15 and port16 is selected to
forward traffic to PC_2. For all other traffic, the first configured member from all four of the interfaces is selected to
forward traffic.
3. On PC-1, generate traffic to PC-2:
ping 10.1.100.22
Traffic is leaving on port15, the first configured member from port15 and port16.
In SD-WAN rules, the longest match routes will override the quality comparisons when all of the specific routes are out of
SLA.
With this feature in an SD-WAN rule:
l Lowest Cost (sla): Even though all of the egress ports on specific routes (longest matched routes) are out of SLA,
the SD-WAN rule still selects the first configured or lower-cost port from the egress ports to forward traffic.
l Best Quality (priority): Even though the egress ports on specific routes (longest matched routes) have worse
quality that all other ports on less specific routes, the SD-WAN rule still selects the best quality port from the ports on
specific routes to forward traffic.
This features avoids a situation where, if the members on specific routes (longest matched routes) are out of SLA or
have worse quality, the traffic might be forwarded to the wrong members in SLA (higher quality) on the default or
aggregate routes.
Example
In this example, four SD-WAN members in two zones are configured. The remote PC (PC_2 - 10.1.100.22) is accessible
on port15 and port16, even though there are valid routes for all of the SD-WAN members. A single SD-WAN service rule
is configured that allows traffic to balanced between all four of the members, but only chooses between port15 and
port16 for the specific 10.1.100.22 address. If neither port15 nor port16 meet the SLAs, traffic will be forwarded on one of
these interfaces, instead of on port1 or dmz.
A performance SLA health check is configured to monitor 10.1.100.2. An SD-WAN service rule in Lowest Cost (SLA)
mode is configured to select the best interface to steer the traffic. In the rule, the method of selecting a member if more
than one meets the SLA (tie-break) is configured to select members that meet the SLA and match the longest prefix
in the routing table (fib-best-match). If there are multiple ECMP routes with the same destination, the FortiGate will
take the longest (or best) match in the routing table, and choose from those interface members.
edit "1"
set server "10.1.100.2"
set members 0
config sla
edit 1
next
end
next
end
config service
edit 1
set name "1"
set mode sla
set dst "all"
set src "172.16.205.0"
config sla
edit "1"
set id 1
next
end
set priority-members 1 2 3 4
set tie-break fib-best-match
next
end
end
1. The debug shows the SD-WAN service rule. Both port15 and port16 are up, but out of SLA:
FGT_A (root) # diagnose sys sdwan service
Service(1): Address Mode(IPV4) flags=0x200 use-shortcut-sla
Gen(3), TOS(0x0/0x0), Protocol(0: 1->65535), Mode(sla), sla-compare-order
Members(4):
1: Seq_num(1 port1), alive, sla(0x1), gid(0), cfg_order(0), cost(0), selected
2: Seq_num(2 dmz), alive, sla(0x1), gid(0), cfg_order(1), cost(0), selected
3: Seq_num(3 port15), alive, sla(0x0), gid(0), cfg_order(2), cost(0), selected
4: Seq_num(4 port16), alive, sla(0x0), gid(0), cfg_order(3), cost(0), selected
Src address(1):
172.16.205.0-172.16.205.255
Dst address(1):
0.0.0.0-255.255.255.255
2. The routing table shows that there are ECMP default routes on all of the members, and ECMP specific (or best)
routes only on port15 and port16:
FGT_A (root) # get router info routing-table static
Routing table for VRF=0
S* 0.0.0.0/0 [1/0] via 172.16.200.2, port1
[1/0] via 172.16.208.2, dmz
[1/0] via 172.16.209.2, port15
[1/0] via 172.16.210.2, port16
S 10.1.100.22/32 [10/0] via 172.16.209.2, port15
[10/0] via 172.16.210.2, port16
Because tie-break is set to fib-best-match, even though both port15 and port16 are out of SLA, the first
configured member of the two (port15) is selected to forward traffic to PC_2. For all other traffic, the first configured
member from all of the interfaces that are in SLA is selected to forward traffic (port1).
3. On PC-1, generate traffic to PC-2:
ping 10.1.100.22
Traffic is leaving on port15, the first configured member from port15 and port16, even though both are out of SLA.
Advanced routing
Local out, or self-originating, traffic is traffic that originates from the FortiGate going to external servers and services. The
traffic can be from Syslog, FortiAnalyzer logging, FortiGuard services, remote authentication, and others.
By default, local out traffic relies on routing table lookups to determine the egress interface that is used to initiate the
connection. However, many types of local out traffic support selecting the egress interface based on SD-WAN or
manually specified interfaces. When manually specifying the egress interface, the source IP address can also be
manually configured.
Go to Network > Local Out Routing to configure the available types of local out traffic. Some types of traffic can only be
configured in the CLI.
By default Local Out Routing is not visible in the GUI. Go to System > Feature Visibility to
enable it. See Feature visibility on page 2043 for more information.
When VDOMs are enabled, the following entries are available on the local out routing page:
AWS_IP_Blacklist ldap
AWS_Malware_Hash Log
System TACACS
System DNS
System FortiGuard
System FortiSandbox
If a service is disabled, it is grayed out. To enable it, select the service and click Enable Service. If a service is enabled,
there is a Local Out Setting button in the gutter of that service's edit page to directly configure the local-out settings.
Examples
Auto Select the outgoing interface automatically based on the routing table.
SD-WAN Select the outgoing interface using the configured SD-WAN interfaces and
rules.
Use Interface IP Use the primary IP, which cannot be configured by the user.
Manually Selected an IP from the list, if the selected interface has multiple IPs
3. configured.
4. Click OK.
1. Go to User & Authentication > RADIUS Servers and double-click an entry to edit it.
2. Click Local Out Setting.
4. Click OK.
6. Click OK.
7. Click Exit Multi-Select Mode to return to the normal view.
Some local out routing settings can only be configured using the CLI.
PING
Traceroute
Central management
NTP server
DHCP proxy
dhcp-proxy-interface Specify the outgoing interface. This option is only available and must be
<interface> configured when interface-select-method is specify.
DHCP relay
dhcp-relay-interface Specify the outgoing interface. This option is only available and must be
<interface> configured when interface-select-method is specify.
Certificate renewal with SCEP traffic can use SD-WAN rules or a specific interface:
config vpn certificate setting
set interface-select-method {auto | sdwan | specify}
set interface <interface>
end
interface <interface> Specify the outgoing interface. This option is only available and must be
configured when interface-select-method is specify.
vdom <VDOM> Specify the VDOM. This option is only available and must be configured when
interface-select-method is sdwan or specify.
source-ip <IPv4 address> Specify the source IPv4 address. This option is only available and must be
configured when interface-select-method is sdwan or specify.
source-ip6 <IPv6 address> Specify the source IPv6 address. This option is only available and must be
configured when interface-select-method is sdwan or specify.
interface <interface> Specify the outgoing interface. This option is only available and must be
configured when interface-select-method is specify.
FortiClient EMS
FortiClient EMS endpoint control traffic can use SD-WAN rules or a specific interface:
config endpoint-control fctems
edit fctems1
set interface-select-method {auto | sdwan | specify}
set interface <interface>
end
end
SD-WAN rules can use Border Gateway Protocol (BGP) learned routes as dynamic destinations.
In this example, a customer has two ISP connections, wan1 and wan2. wan1 is used primarily for direct access to
internet applications, and wan2 is used primarily for traffic to the customer's data center.
The customer could create an SD-WAN rule using the data center's IP address range as the destination to force that
traffic to use wan2, but the data center's IP range is not static. Instead, a BGP tag can be used.
For this example, wan2's BGP neighbor advertises the data center's network range with a community number of 30:5.
This example assumes that SD-WAN is enabled on the FortiGate, wan1 and wan2 are added as SD-WAN members in
the virtual-wan-link SD-WAN zone, and a policy and static route have been created. See SD-WAN quick start on page
478 for details.
end
next
end
3. Configure BGP:
config router bgp
set as xxxxx
set router-id xxxx
config neighbor
edit "10.100.20.2"
set soft-reconfiguration enable
set remote-as xxxxx
set route-map-in "comm1"
next
end
end
Use the get router info bgp network command to check the network community:
# get router info bgp network
BGP table version is 5, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Use the get router info route-map-address command to check dynamic BGP addresses:
# get router info route-map-address
Extend-tag: 15, interface(wan2:16)
10.100.11.0/255.255.255.0
Use the diagnose firewall proute list command to check dynamic BGP addresses used in policy routes:
# diagnose firewall proute list
list route policy info(vf=root):
BGP supports multiple paths, allowing an ADVPN to advertise multiple paths. This allows BGP to extend and keep
additional network paths according to RFC 7911.
In this example, Spoke1 and Spoke2 each have four VPN tunnels that are connected to the Hub with ADVPN. The
Spoke-Hub has established four BGP neighbors on all four tunnels.
Spoke 1 and Spoke 2 can learn four different routes from each other.
set additional-path-select 4
config neighbor-group
edit "gr1"
set capability-default-originate enable
set remote-as 65505
set additional-path both
set adv-additional-path 4
set route-reflector-client enable
next
end
config neighbor-range
edit 1
set prefix 10.10.0.0 255.255.0.0
set neighbor-group "gr1"
next
end
config network
edit 12
set prefix 11.11.11.11 255.255.255.255
next
end
end
To configure a spoke:
end
config network
edit 3
set prefix 22.1.1.0 255.255.255.0
next
end
end
SD-WAN allows you to select different outbound WAN links based on performance SLAs. It is important that BGP
neighbors are aware of these settings, and changes to them.
BGP can adapt to changes in SD-WAN link SLAs in the following ways:
l Applying different route-maps based on the SD-WAN's health checks. For example, different BGP community
strings can be advertised to BGP neighbors when SLAs are not met.
l Traffic can be selectively forwarded based on the active BGP neighbor. If the SD-WAN service's role matches the
active SD-WAN neighbor, the service is enabled. If there is no match, then the service is disabled.
Example
In this topology, a branch FortiGate has two SD-WAN gateways serving as the primary and secondary gateways. The
gateways reside in different datacenters, but have a full mesh network between them.
This example shows how route-maps and service rules are selected based on performance SLAs and the member that
is currently active. Traffic flows through the primary gateway unless the neighbor's health check is outside of its SLA. If
that happens, traffic routes to the secondary gateway.
BGP NBR1 is the primary neighbor and BGP NBR2 is the secondary neighbor.
The branch FortiGate's wan1 and wan2 interfaces are members of the SD-WAN. When the SD-WAN neighbor status is
primary, it will advertise community 20:1 to BGP NBR1 and 20:5 to BGP NBR2. When the SD-WAN neighbor status is
secondary, it will advertise 20:5 to BGP NBR1 and 20:2 to BGP NBR2.
Only one of the primary or secondary neighbors can be active at one time. The SD-WAN neighbor status is used to
decide which neighbor is selected:
l Primary: The primary neighbor takes precedence if its SLAs are met.
l Secondary: If the primary neighbor's SLAs are not met, the secondary neighbor becomes active if its SLAs are met.
l Standalone: If neither the primary or secondary neighbor's SLAs are met, the SD-WAN neighbor status becomes
standalone.
Route map
SD-WAN is configured to let BGP advertise different communities when the SLA status changes. When the SLA is
missed, it triggers BGP to advertise a different community to its BGP neighbor based on its route-map. The BGP
neighbors can use the received community string to select the best path to reach the branch.
end
next
end
When SLAs are met, route-map-out-preferable is used. When SLAs are missed, route-map-out is used.
To configure SD-WAN:
3. Configure the SD-WAN neighbors and assign them a role and the health checks used to determine if the neighbor
meets the SLA:
SD-WAN neighbors can only be configured in the CLI.
config system sdwan
config neighbor
edit "10.100.1.1"
set member 1
set role primary
set health-check "ping"
set sla-id 1
next
edit "10.100.1.5"
set member 2
set role secondary
set health-check "ping2"
set sla-id 1
next
end
end
Service rules
Create SD-WAN service rules to direct traffic to the primary neighbor when its SLAs are met, and to the secondary
neighbor when the primary neighbor's SLAs are missed.
If neither the primary nor secondary neighbors are active, the SD-WAN neighbor status
becomes standalone. Only service rules with standalone-action enabled will continue to
pass traffic. This option is disabled by default.
Verification
map=0x1
Health Check(ping2):
Seq(2 port2): state(alive), packet-loss(0.000%) latency(3.916), jitter(2.373) sla_
map=0x1
Dst address:
0.0.0.0-255.255.255.255
Dst address:
0.0.0.0-255.255.255.255
Dst address:
0.0.0.0-255.255.255.255
Dst address:
0.0.0.0-255.255.255.255
Controlling traffic with BGP route mapping and service rules explained how BGP can apply different route-maps to the
primary and secondary SD-WAN neighbors based on SLA health checks.
In this example, SD-WAN neighbors that are not bound to primary and secondary roles are configured.
The FortiGate has multiple SD-WAN links and has formed BGP neighbors with both ISPs.
ISP1 is used primarily for outbound traffic, and has an SD-WAN service rule using the lowest cost algorithm applied to it.
When SLAs for ISP1 are not met, it will fail over to the MPLS line.
Inbound traffic is allowed by both WAN links, with each WAN advertising a community string when SLAs are met. When
SLAs are not met, the WAN links advertise a different community string.
This example uses two SD-WAN links. The topology can be expanded to include more links as needed.
When SLAs are met, route-map-out-preferable is used. When SLAs are missed, route-map-out is used.
To configure SD-WAN:
next
end
next
end
end
3. Configure the SD-WAN neighbors and assign them a role and the health checks used to determine if the neighbor
meets the SLA:
When no role is defined, the default role, standalone, is used.
config system sdwan
config neighbor
edit "192.168.2.1"
set member 1
set health-check "pingserver"
set sla-id 1
next
edit "172.31.0.1"
set member 2
set health-check "pingserver"
set sla-id 1
next
end
end
Service rules
Create SD-WAN service rules to direct traffic to the SD-WAN links based on the lowest cost algorithm The same SLA
health check and criteria that are used for the SD-WAN neighbor are used for this SD-WAN service rule.
When no roles are defined in the service rule, the default role, standalone, is used.
Verification
To verify that when both SLAs are met, port1 is selected due to its lower cost:
Dst address:
0.0.0.0-255.255.255.255
64512
172.31.0.2 from 172.31.0.2 (192.168.122.98)
Origin IGP metric 0, localpref 100, valid, external, best
Community: 64522:1
Last update: Fri May 1 00:11:28 2020
To verify that when neighbor ISP1 misses SLAs, MPLS is selected and BGP advertises a different
community string for ISP1:
Dst address:
0.0.0.0-255.255.255.255
VPN overlay
This topic provides an example of how to use SD-WAN and ADVPN together.
ADVPN (Auto Discovery VPN) is an IPsec technology that allows a traditional hub-and-spoke VPN’s spokes to establish
dynamic, on-demand, direct tunnels between each other to avoid routing through the topology's hub device. The primary
advantage is that it provides full meshing capabilities to a standard hub-and-spoke topology. This greatly reduces the
provisioning effort for full spoke-to-spoke low delay reachability, and addresses the scalability issues associated with
very large fully meshed VPN networks.
If a customer's head office and branch offices all have two or more internet connections, they can build a dual-hub
ADVPN network. Combined with SD-WAN technology, the customer can load-balance traffic to other offices on multiple
dynamic tunnels, control specific traffic using specific connections, or choose better performance connections
dynamically.
SD-WAN load-balance mode rules (or services) do not support ADVPN members. Other
modes' rules, such as SLA and priority, support ADVPN members.
Configuration example
A typical ADVPN configuration with SD-WAN usually has two hubs, and each spoke connects to two ISPs and
establishes VPN tunnels with both hubs.
This example shows a hub-and-spoke configuration using two hubs and one spoke:
l Hub1 and Hub2 both use wan1 to connect to the ISPs and port10 to connect to internal network.
l Spoke1 uses wan1 to connect to ISP1 and wan2 to connect to ISP2.
l wan1 sets up VPN to hub1.
l wan2 sets up VPN to hub2.
The SD-WAN is configured on the spoke. It uses the two VPN interfaces as members and two rules to control traffic to
headquarters or other spokes using ADVPN VPN interfaces. You can create more rules if required.
Firewall addresses Configure hub_subnets and spoke_subnets before using in policies. These can
be customized.
The GUI does not support some ADVPN related options, such as auto-discovery-sender, auto-discovery-receiver, auto-
discovery-forwarder, and IBGP neighbor-group setting, so this example only provides CLI configuration commands.
set dpd-retryinterval 5
next
end
config vpn ipsec phase2-interface
edit "hub-phase2"
set phase1name "hub-phase1"
set proposal aes128-sha1 aes256-sha1 3des-sha1 aes128-sha256 aes256-sha256 3des-
sha256
next
end
When net-device is disabled, a tunnel ID is generated for each dynamic tunnel. This ID, in
the form of an IP address, is used as the gateway in the route entry to that tunnel. The
tunnel-search option is removed in FortiOS 7.0.0 and later.
Hub2 configuration is the same as hub1 except the wan1 IP address, VPN interface IP address, and BGP neighbor-
range prefix.
To configure SD-WAN:
edit "ping"
set server "11.11.11.11"
set members 1 2
config sla
edit 1
set latency-threshold 200
set jitter-threshold 50
set packetloss-threshold 5
next
end
next
end
config service
edit 1
set mode sla
set dst "financial-department"
config sla
edit "ping"
set id 1
next
end
set priority-members 1 2
next
edit 2
set priority-members 2
set dst "engineering-department"
next
end
end
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
Use the following CLI commands to check status before spoke vs spoke shortcut VPN is established.
# get router info bgp summary
BGP router identifier 2.2.2.2, local AS number 65505
BGP table version is 13
3 BGP AS-PATH entries
0 BGP community entries
Use the following CLI commands to check status after spoke vs spoke shortcut VPN is established.
# get router info routing-table bgp
parent=vd2-1 index=0
proxyid_num=1 child_num=0 refcnt=18 ilast=8 olast=8 ad=r/2
stat: rxp=0 txp=0 rxb=0 txb=0
dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=0
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=vd2-1 proto=0 sa=1 ref=2 serial=1 auto-negotiate adr
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
SA: ref=3 options=1a227 type=00 soft=0 mtu=15262 expire=42893/0B replaywin=2048
seqno=1 esn=0 replaywin_lastseq=00000000 itn=0 qat=0
life: type=01 bytes=0/0 timeout=42901/43200
dec: spi=03e01a44 esp=aes key=16 c3b77a98e3002220e2373b73af14df6e
ah=sha1 key=20 d18d107c248564933874f60999d6082fd7a78948
enc: spi=864f6dba esp=aes key=16 eb6181806ccb9bac37931f9eadd4d5eb
ah=sha1 key=20 ab788f7a372877a5603c4ede1be89a592fc21873
dec:pkts/bytes=0/0, enc:pkts/bytes=0/0
npu_flag=00 npu_rgwy=13.1.1.3 npu_lgwy=12.1.1.2 npu_selid=51 dec_npuid=0 enc_npuid=0
------------------------------------------------------
name=spoke1-2-phase1_0 ver=1 serial=57 112.1.1.2:0->113.1.1.3:0 tun_id=113.1.1.3 dst_
mtu=15324
bound_if=90 lgwy=static/1 tun=intf/0 mode=dial_inst/3 encap=none/728 options[02d8]=npu
create_dev no-sysctl rgwy-chg frag-rfc accept_traffic=1
parent=vd2-2 index=0
SD-WAN monitors ADVPN shortcut link quality by dynamically creating link monitors for each ADVPN link. The dynamic
link monitor on the spoke will use ICMP probes and the IP address of the gateway as the monitored server. These ICMP
probes will not be counted as actual user traffic that keeps the spoke-to-spoke tunnel alive.
In a hub and spoke SD-WAN topology with shortcuts created over ADVPN, a downed or recovered shortcut can affect
which member is selected by an SD-WAN service strategy. When a downed shortcut tunnel recovers and the shortcut is
added back into the service strategy, the shortcut is held at a low priority until the hold down time has elapsed.
By default, the hold down time is zero seconds. It can be set to 0 - 10000000 seconds.
Example
In this example, the hold down time is set to 15 seconds, and then the SD-WAN service is looked at before and after the
hold down elapses after a downed shortcut recovers.
To view which SD-WAN member is selected before and after the hold down time elapses:
Members(4):
1: Seq_num(1 vd2-1), alive, packet loss: 27.000%, selected
2: Seq_num(2 vd2-2_0), alive, packet loss: 0.000%, selected
3: Seq_num(2 vd2-2), alive, packet loss: 0.000%, selected
4: Seq_num(1 vd2-1_0), alive, packet loss: 61.000%, selected
Dst address(1):
33.1.1.101-33.1.1.200
2: seq_num(2), interface(vd2-2):
1: vd2-2_0(88)
3: seq_num(1), interface(vd2-1):
1: vd2-1_0(86)
Members(4):
1: Seq_num(2 vd2-2_0), alive, packet loss: 0.000%, selected
2: Seq_num(2 vd2-2), alive, packet loss: 0.000%, selected
3: Seq_num(1 vd2-1), alive, packet loss: 24.000%, selected
4: Seq_num(1 vd2-1_0), alive, packet loss: 44.000%, selected
Dst address(1):
33.1.1.101-33.1.1.200\
OCVPN has the capability to enable SD-WAN in order to dynamically add its tunnel interfaces as SD-WAN members.
Users can configure SD-WAN health checks and service rules to direct traffic over the OCVPN tunnels.
The following example uses a dual hub and spoke topology. Each hub and spoke has two WAN link connections to the
ISP. The spokes generate two IPsec tunnels to each hub (four tunnels in total). BGP neighbors are established over
each tunnel and routes from the hubs and other spokes learned from all neighbors, which forms an ECMP scenario. All
tunnels are placed as SD-WAN members, so traffic can be distributed across tunnels based on the configured SD-WAN
service rules.
c. Enter the WAN interfaces (port15 and port16) and tunnel IP allocation block (10.254.0.0/16).
The WAN interface is position sensitive, meaning a tunnel will be created with the first
position interface on the hub to the first position interface on the spoke, and so on. In
this example, FGT_A (primary hub) will create two tunnels with FGT_C (spoke):
l FGT_A port15 <==> FGT_C internal1
d. Click Apply.
3. Configure the secondary hub with the same settings as the primary hub.
4. Configure the spoke:
a. Go to VPN > Overlay Controller VPN and set the Status to Enable.
b. For Role, select Spoke.
c. Enter the WAN interfaces (internal1 and internal2).
d. Enable Auto-discovery shortcuts.
e. Enable Add OCVPN tunnels to SD-WAN. The IPsec tunnels will be added automatically to the SD-WAN
members if SD-WAN is enabled.
f. Configure the overlays.
The overlay names on the spokes must match the names on the hub for the traffic to be
allowed through the same overlay.
g. Click Apply.
Firewall policies will be automatically generated by OCVPN between the local interfaces and the SD-WAN interface.
Each policy will define the proper local and remote networks for its source and destination addresses.
2. Configure the secondary hub with the same settings as the primary hub.
3. Configure the spoke:
config vpn ocvpn
set status enable
set sdwan enable
set wan-interface "internal1" "internal2"
config overlays
edit "overlay1"
config subnets
edit 1
set type interface
set interface "wan2"
next
end
next
edit "overlay2"
config subnets
edit 1
set type interface
set interface "loop1"
next
end
next
end
end
Firewall policies will be automatically generated by OCVPN between the local interfaces and the SD-WAN interface.
Each policy will define the proper local and remote networks for its source and destination addresses.
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
* - candidate default
mtu=1500
bound_if=9 lgwy=static/1 tun=intf/0 mode=dial_inst/3 encap=none/728 options[02d8]=npu
create_dev no-sysctl rgwy-chg frag-rfc accept_traffic=1 overlay_id=4
parent=_OCVPN2-1b index=0
proxyid_num=1 child_num=0 refcnt=15 ilast=0 olast=0 ad=r/2
stat: rxp=641 txp=1025 rxb=16436 txb=16446
dpd: mode=on-idle on=1 idle=20000ms retry=3 count=0 seqno=0
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=_OCVPN2-1b proto=0 sa=1 ref=3 serial=1 auto-negotiate adr
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
SA: ref=6 options=1a227 type=00 soft=0 mtu=1438 expire=42650/0B replaywin=1024
seqno=407 esn=0 replaywin_lastseq=00000280 itn=0 qat=0 hash_search_len=1
life: type=01 bytes=0/0 timeout=43186/43200
dec: spi=90f03d9d esp=aes key=16 6cb33685bbc67d5c85488e0176ecf7b0
ah=sha1 key=20 7d11b3babe62c840bf444b7b1f637b4324722a71
enc: spi=7bc94bda esp=aes key=16 b4d8fc731d411eb24448b4077a5872ca
ah=sha1 key=20 b724064d827304a6d80385ed4914461108b7312f
dec:pkts/bytes=641/16368, enc:pkts/bytes=2053/123426
npu_flag=03 npu_rgwy=172.16.15.4 npu_lgwy=172.16.18.3 npu_selid=1f dec_npuid=1 enc_
npuid=1
------------------------------------------------------
name=_OCVPN2-0a ver=2 serial=18 172.16.17.3:0->172.16.13.1:0 tun_id=172.16.17.3 dst_
mtu=1500
bound_if=8 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/536 options[0218]=npu create_
dev frag-rfc accept_traffic=1 overlay_id=1
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
SA: ref=6 options=1a227 type=00 soft=0 mtu=1438 expire=41653/0B replaywin=1024
seqno=887 esn=0 replaywin_lastseq=00000002 itn=0 qat=0 hash_search_len=1
life: type=01 bytes=0/0 timeout=42900/43200
dec: spi=90f03d9b esp=aes key=16 ee03f5b0f617a26c6177e91d60abf90b
ah=sha1 key=20 f60cbbc4ebbd6d0327d23137da707b7ab2dc49e6
enc: spi=a543a7d3 esp=aes key=16 1d37efab13a5c0347b582b2198b15cb8
ah=sha1 key=20 427ee4c82bac6f26f0bcabfe04328c7f57ce682e
dec:pkts/bytes=1/16316, enc:pkts/bytes=4229/264036
npu_flag=03 npu_rgwy=172.16.11.1 npu_lgwy=172.16.17.3 npu_selid=1d dec_npuid=1 enc_
npuid=1
------------------------------------------------------
name=_OCVPN2-0b ver=2 serial=19 172.16.18.3:0->172.16.14.1:0 tun_id=172.16.14.1 dst_
mtu=1500
bound_if=9 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/536 options[0218]=npu create_
dev frag-rfc accept_traffic=1 overlay_id=2
Forward Error Correction (FEC) is used to control and correct errors in data transmission by sending redundant data
across the VPN in anticipation of dropped packets occurring during transit. The mechanism sends out x number of
redundant packets for every y number of base packets.
Adaptive FEC considers link conditions and dynamically adjusts the FEC packet ratio:
l The FEC base and redundant packet relationship is dynamically adjusted based on changes to the network SLA
metrics defined in the SD-WAN SLA health checks. For example, when there is no or low packet loss in the network,
FEC can work on a low redundant level sending only one redundant packet for every 10 base packets. As packet
loss increases, the number of redundant packets sent can rise accordingly.
l FEC can be applied only to streams that are sensitive to packet loss. For Example, policies that allow the UDP
based VoIP protocol can enable FEC, while TCP based traffic policies do not. This reduces unnecessary bandwidth
consumption by FEC.
l Because FEC does not support NPU offloading, the ability to specify streams and policies that do not require FEC
allows those traffic to be offloaded. This means that all traffic suffers a performance impact.
In this example, an IPsec tunnel is configured between two FortiGates that both have FEC enabled. The tunnel is an SD-
WAN zone, and an SLA health-check is used to monitor the quality of the VPN overlay. The intention is to apply FEC to
UDP traffic that is passing through the VPN overlay, while allowing all other traffic to pass through without FEC. An FEC
profile is configured to adaptively increase redundant levels if the link quality exceeds a 10% packet loss threshold, or
the bandwidth exceeds 950 Mbps.
The DMZ interface and IPsec tunnel vd1-p1 are SD-WAN members. FEC is enabled on vd1-p1, and health-check works
on vd1-p1.
1. On both FortiGates, enable FEC and NPU offloading on the IPsec tunnel vd1-p1:
config vpn ipsec phase1-interface
edit "vd1-p1"
set npu-offload enable
set fec-egress enable
set fec-ingress enable
next
end
next
end
end
3. On FortiGate A, create a policy to specify performing FEC on UDP traffic, and a policy for other traffic:
config firewall policy
edit 1
set srcintf "port5"
set dstintf "virtual-wan-link"
set action accept
set srcaddr "172.16.205.0"
set dstaddr "all"
set schedule "always"
set service "ALL_UDP"
set fec enable
next
edit 2
set srcintf "any"
set dstintf "any"
set action accept
set srcaddr "all"
set dstaddr "all"
set schedule "always"
set service "ALL"
next
end
4. On FortiGate A, configure FEC mapping to bind network SLA metrics and FEC base and redundant packets:
config vpn ipsec fec
edit "m1"
config mappings
edit 1
set base 8
set redundant 2
set packet-loss-threshold 10
next
edit 2
set base 9
set redundant 3
set bandwidth-up-threshold 950000
next
end
next
end
The mappings are matched from top to bottom: packet loss greater than 10% with eight base and two redundant
packets, and then uploading bandwidth greater than 950 Mbps with nine base and three redundant packets.
5. On FortiGate A, apply the FEC mappings on vd1-p1:
config vpn ipsec phase1-interface
edit "vd1-p1"
set fec-health-check "1"
set fec-mapping-profile "m1"
set fec-base 10
set fec-redundant 1
next
end
The FEC base and redundant values are used when the link quality has not exceeded the limits specified in the FEC
profile mapping. If fec-codec is set to xor the base and redundant packet values will not be updated.
1. Send TCP and UDP traffic from PC1 to PC2, then check the sessions on FortiGate A:
# diagnose sys session list
Non-FEC protected TCP traffic is offloaded, while FEC protected UDP traffic is not offloaded
2. On FortiGate A, check the health-check result and the corresponding FEC base and redundant packets:
Because bandwidth-up is more than 950000kbps, base and redundant are set to 9 and 3:
# diagnose vpn tunnel fec vd1-p1
egress:
enabled=1 base=9 redundant=3 codec=0 timeout=10(ms)
encode=6621 encode_timeout=6621 encode_fail=0
tx_data=6880 tx_parity=18601
ingress:
enabled=1 timeout=50(ms)
fasm_cnt=0 fasm_full=0
ipsec_fec_chk_fail=0 complete=0
rx_data=0 rx_parity=0
recover=0 recover_timeout=0 recover_fail=0
rx=0 rx_fail=0
3. Make packet loss more than 10%, then check the health-check result and the corresponding FEC base and
redundant packets again:
# diagnose sys sdwan health-check
Health Check(1):
Seq(2 vd1-p1): state(alive), packet-loss(15.000%) latency(0.168), jitter(0.017),
bandwidth-up(999999), bandwidth-dw(999998), bandwidth-bi(1999997) sla_map=0x0
Because packet loss is more than 10%, entry one in FEC mapping is first matched, and base and redundant are set
to 8 and 2:
# diagnose vpn tunnel fec vd1-p1
egress:
enabled=1 base=8 redundant=2 codec=0 timeout=10(ms)
encode=6670 encode_timeout=6670 encode_fail=0
tx_data=6976 tx_parity=18748
ingress:
enabled=1 timeout=50(ms)
fasm_cnt=0 fasm_full=0
ipsec_fec_chk_fail=0 complete=0
rx_data=0 rx_parity=0
recover=0 recover_timeout=0 recover_fail=0
rx=0 rx_fail=0
This wizard is used to automatically set up multiple VPN tunnels to the same destination over multiple outgoing
interfaces. This includes automatically configuring IPsec, routing, and firewall settings, avoiding cumbersome and error-
prone configuration steps.
1. Go to Network > SD-WAN, select the SD-WAN Zones tab, and click Create New > SD-WAN Member.
2. In the Interface drop-down, click +VPN. The Create IPsec VPN for SD-WAN members pane opens.
When duplication rules are used, packets are duplicated on other good links within the SD-WAN zone and de-duplicated
on the destination FortiGate. Use force mode to force duplication on other links within the SD-WAN zone, or use on-
demand mode to trigger duplication only when SLA fails on the selected member.
The duplication rule is configured in the CLI by using the config duplication command. The following options can
be configured:
Parameter Description
l force: Duplicate packets across all interface members of the SD-WAN zone.
The duplication-max-num <integer> option under config system sdwan is the maximum number of
interface members that a packet is duplicated on in the SD-WAN zone (2 - 4, default = 2). If this value is set to 3, the
original packet plus two more copies are created. If there are three member interfaces in the SD-WAN zone and the
duplication-max-num is set to 2, the packet duplication follows the configuration order, so the packets are
duplicated on the second member.
Example
The packet duplication feature works best in a spoke-spoke or hub-and-spoke topology. In this example, a hub-and-
spoke ADVPN topology is used. Before shortcuts are established, Hub 1 forwards the duplicate packets from Spoke 1 to
Spoke 2. Once shortcuts are established, Hub 1 is transparent, and duplicate packets are exchanged directly between
the spokes.
1. Configure Spoke 1:
config system sdwan
set status enable
config zone
edit "virtual-wan-link"
next
edit "sdwanzone_v4"
next
end
config members
edit 1
set interface "t1"
set zone "sdwanzone_v4"
next
edit 4
set interface "t21"
set zone "sdwanzone_v4"
next
edit 2
set interface "t2"
set zone "sdwanzone_v4"
next
end
config health-check
edit "h1"
set server "10.34.1.1"
set interval 1000
set failtime 10
set members 1 2
config sla
edit 1
set packetloss-threshold 40
next
end
next
end
config duplication
edit 1
set srcaddr "all"
set dstaddr "all"
set srcintf "port1"
set dstintf "sdwanzone_v4"
set service "ALL"
set packet-duplication force
set packet-de-duplication enable
next
end
end
SD-WAN duplication rules can specify SD-WAN service rules to trigger packet duplication. This allows the duplication to
occur based on an SD-WAN rule instead of the source, destination, and service parameters in the duplication rule.
1. Packets can be forced to duplicate to all members of the same SD-WAN zone. See Duplicate packets on other zone
members on page 630 for details.
For example, in Spoke 1 set packet-duplication to force so that when a client sends a packet to the server, it
is duplicated to all members of the same zone as long as its health check is alive. If a members health check is
dead, then the member is removed from the SD-WAN duplication zone.
2. Packets can be duplicated to other members of the SD-WAN zone on-demand only when the condition of the link is
not good enough.
Set packet-duplication to on-demand so that, when all the SLAs of the member exceed threshold (sla_
map=0), the packet is duplicated. But when the SLAs are within threshold (sla_map!=0), the packet is not
duplicated.
3. Packets can be duplicated to all members of the same SD-WAN zone when the traffic matches one or more regular
SD-WAN service rules.
The following example shows the third type of packet duplication.
In this example, SD-WAN is configured with three members: vpn1, vpn2, and vpn3. Service rule 1 controls all traffic from
10.100.20.0/24 to 172.16.100.0/24 using member 1.
To send a duplicate of the traffic that matches service rule 1 using member 2, members 1 and 2 are added to the same
SD-WAN zone, and a duplication rule is configured with service-id set to 1.
To send a duplicate of the traffic that matches service rule 1 using member 2:
config members
edit 1
set interface "vpn1"
next
edit 2
set interface "vpn2"
next
edit 3
set interface "vpn3"
set zone "zone2"
next
end
config service
edit 1
set dst "172.16.100.0"
set src "10.100.20.0"
set priority-members 1
next
end
config duplication
edit 1
set service-id 1
set packet-duplication force
next
end
end
Speed tests run from the hub to the spokes in dial-up IPsec tunnels
In a hub and spoke SD-WAN topology that uses dial-up VPN overlays, QoS can be applied on individual tunnels based
on the measured bandwidth between the hub and spokes. The FortiGate can use the built in speed test to dynamically
populate the egress bandwidth to individual dial-up tunnels from the hub.
SD-WAN members on a spoke can switch routes when the speed test is running from the hub to the spoke. The speed
test results can be cached for reuse when a tunnel comes back after going down.
CLI commands
Allow upload speed tests to be run from the hub to spokes on demand for dial-up IPsec tunnel:
To limit the maximum and minimum bandwidth used in the speed test, enable set update-
inbandwidth and set update-outbandwidth. See Scheduled interface speedtest on
page 544 for more information.
speedtest-server {enable Enable/disable the speed test server on the spoke (default = disable). This setting
| disable} must be enabled on spoke FortiGates. This enables iPerf in server mode, which
listens on the default iPerf TCP port 5201.
Allow an SD-WAN member on the spoke to switch routes when it is on speed test from the hub to
spokes:
speedtest-bypass-routing Enable/disable bypass routing when doing a speed test on an SD-WAN member
{enable | disable} (default = disable).
set mode speedtest Use the speed test to select the neighbor.
Manually run uploading speed test on the physical interfaces of each tunnel of an dial-up IPsec
interface:
diagnose debug application Enable debug of the speed test module in the forticron daemon.
speedtest <int>
diagnose debug application Enable debug of the speed test server daemon.
speedtestd <int>
diagnose test application forticron List the scheduled speed tests.
9
diagnose test application forticron Show the cached speed test results.
10
diagnose test application forticron Write the cached speed test results to disk.
11
diagnose test application forticron Load the speed test results from disk.
12
diagnose test application forticron Cancel all pending speed tests.
99
Example
In this example, the hub is configured as a VPN dial-up server and both of the spokes are connected to the hub. It is
assumed that the VPN configuration is already done, with a dynamic gateway type and kernel device creation (net-
device) disabled. Only one SD-WAN interface is used, so there is only one VPN overlay member in the SD-WAN zone.
Multiple WAN interfaces and VPN overlays could be used.
The VPN interfaces and IP addresses are:
A recurring speed test is configured that runs on the hub over the dial-up interfaces. The speed tests are performed over
the underlay interface from the hub to the spoke. Each spoke is configured to operate as a speed test server and to allow
the speed test to run on its underlay interface. The spokes establish BGP peering with the hub over the VPN interface,
and advertises its loopback network to the hub. The specific configuration is only shown for FGT_B.
When the speed test is running, routing through the VPN overlay can be bypassed, and route maps are used to filter the
routes that are advertised to peers. The spoke's route map does not advertise any routes to the peer, forcing the hub to
use others paths to reach the spoke's network.
When no speed tests are running, the spoke's route map allows its network to be advertised on the hub.
When the speed test is complete, the measured egress bandwidth is dynamically applied to the VPN tunnel on the hub,
and the result is cached for future use, in case the tunnel is disconnected and reconnected again.
Three classes are used in the profile for low, medium, and high priority traffic. Each class is assigned a guaranteed
and maximum bandwidth as a percentage of the measured bandwidth from the speed test.
2. Use the shaping profile in the interface:
config system interface
edit "hub-phase1"
set egress-shaping-profile "profile_1"
next
end
3. Configure SD-WAN with bypass routing enabled for speed tests on member spoke11-p1:
config system sdwan
set speedtest-bypass-routing enable
config members
edit 1
set interface "spoke11-p1"
next
end
config neighbor
edit "10.10.100.254"
set member 1
set mode speedtest
next
end
end
next
end
config network
edit 1
set prefix 2.2.2.2 255.255.255.255
next
edit 2
set prefix 10.1.100.0 255.255.255.0
next
end
end
The tested out-bandwidth is more than the set maximum accepted value 1000. Will update the
tunnel's shaper by the set update-outbandwidth-maximum.
Apply shaping profile 'profile_1' with bandwidth 1000 to tunnel hub-phase1_0 of interface
hub-phase1
[6400e0] hub-phase1_1: physical_intf=port1, local_ip=172.16.200.1, server_ip=172.16.200.4
Wait for test 6400e0 to finish...
Speed-test result for test ID 6400e0:
Completed
measured upload bandwidth is 1002 kbps
measured time Sun Jun 20 15:56:39 2021
The tested out-bandwidth is more than the set maximum accepted value 1000. Will update the
tunnel's shaper by the set update-outbandwidth-maximum.
Apply shaping profile 'profile_1' with bandwidth 1000 to tunnel hub-phase1_1 of interface
hub-phase1
# diagnose netlink interface speed-test-tunnel hub-phase1 all
send speed test request for tunnel 'hub-phase1_0' of 'hub-phase1': 172.16.200.1 ->
172.16.200.2
send speed test request for tunnel 'hub-phase1_1' of 'hub-phase1': 172.16.200.1 ->
172.16.200.4
Results
1. Before the speed test starts, FGT_A can receive the route from FGT_B by BGP:
# get router info routing-table bgp
Routing table for VRF=0
B 2.2.2.2/32 [200/0] via 10.10.100.2 (recursive via 172.16.200.2, hub-phase1),
00:00:10
B 10.1.100.0/24 [200/0] via 10.10.100.2 (recursive via 172.16.200.2, hub-phase1),
00:00:10
2. At the scheduled time, the speed test starts for the hub-phase1 interface from hub to spoke:
The diagnose debug application speedtest -1 command can be used on both the hub and spokes to
check the speed test execution.
3. While the speed test is running, FGT_A does not receive the route from FGT_B by BGP:
# get router info routing-table bgp
Routing table for VRF=0
4. Speed tests results can be dynamically applied to the dial-up tunnel for egress traffic shaping:
# diagnose vpn tunnel list
------------------------------------------------------
name=hub-phase1_0 ver=2 serial=c 172.16.200.1:0->172.16.200.4:0 tun_id=172.16.200.4 dst_
mtu=1500 dpd-link=on remote_location=0.0.0.0 weight=1
...
egress traffic control:
bandwidth=737210(kbps) lock_hit=0 default_class=2 n_active_class=3
class-id=2 allocated-bandwidth=73720(kbps) guaranteed-
bandwidth=73720(kbps)
max-bandwidth=73720(kbps) current-bandwidth=0(kbps)
priority=low forwarded_bytes=52
dropped_packets=0 dropped_bytes=0
class-id=3 allocated-bandwidth=221163(kbps) guaranteed-
bandwidth=221162(kbps)
max-bandwidth=294883(kbps) current-bandwidth=0(kbps)
priority=medium forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
class-id=4 allocated-bandwidth=442325(kbps) guaranteed-
bandwidth=147441(kbps)
max-bandwidth=442325(kbps) current-bandwidth=0(kbps)
priority=high forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
------------------------------------------------------
name=hub-phase1_1 ver=2 serial=d 172.16.200.1:0->172.16.200.2:0 tun_id=172.16.200.2 dst_
mtu=1500 dpd-link=on remote_location=0.0.0.0 weight=1
...
egress traffic control:
bandwidth=726813(kbps) lock_hit=0 default_class=2 n_active_class=3
class-id=2 allocated-bandwidth=72681(kbps) guaranteed-
bandwidth=72681(kbps)
max-bandwidth=72681(kbps) current-bandwidth=0(kbps)
priority=low forwarded_bytes=123
dropped_packets=0 dropped_bytes=0
class-id=3 allocated-bandwidth=218044(kbps) guaranteed-
bandwidth=218043(kbps)
max-bandwidth=290725(kbps) current-bandwidth=0(kbps)
priority=medium forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
class-id=4 allocated-bandwidth=436087(kbps) guaranteed-
bandwidth=145362(kbps)
max-bandwidth=436087(kbps) current-bandwidth=0(kbps)
priority=high forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
Disable then reenable the IPsec VPN tunnel and the cached speed test results can be applied to the tunnel again:
# diagnose vpn tunnel list
------------------------------------------------------
name=hub-phase1_0 ver=2 serial=c 172.16.200.1:0->172.16.200.4:0 tun_id=172.16.200.4 dst_
mtu=1500 dpd-link=on remote_location=0.0.0.0 weight=1
...
egress traffic control:
bandwidth=737210(kbps) lock_hit=0 default_class=2 n_active_class=3
------------------------------------------------------
name=hub-phase1_1 ver=2 serial=d 172.16.200.1:0->172.16.200.2:0 tun_id=172.16.200.2 dst_
mtu=1500 dpd-link=on remote_location=0.0.0.0 weight=1
...
egress traffic control:
bandwidth=726813(kbps) lock_hit=0 default_class=2 n_active_class=3
Interface based QoS on individual child tunnels based on speed test results
In a hub and spoke SD-WAN topology that uses dial-up VPN overlays, QoS can be applied on individual tunnels based
on the measured bandwidth between the hub and spokes. The FortiGate can use the built in speed test to dynamically
populate the egress bandwidth to individual dial-up tunnels from the hub.
A bandwidth limit, derived from the speed test, and a traffic shaping profile can be applied on the dial-up IPsec tunnel
interface on the hub. A class ID and percentage based QoS settings can be applied to individual child tunnels using a
traffic shaping policy and profile.
CLI commands
If the interface is an IPsec dial-up server, then egress shaping profile type can only be set to policing; it cannot be set
to queuing:
config firewall shaping-profile
edit <profile-name>
The outbandwidth value is dynamically obtained from the speed test results for each individual child tunnel, and should
not be set manually:
config system interface
edit <dialup-server-phase1-name>
set egress-shaping-profile <profile-name>
set outbandwidth <bandwidth>
next
end
Example
In this example, the hub is configured as a VPN dial-up server and both of the spokes are connected to the hub. It is
assumed that the VPN configuration is already done, with a dynamic gateway type and kernel device creation (net-
device) disabled. Only one SD-WAN interface is used, so there is only one VPN overlay member in the SD-WAN zone.
Multiple WAN interfaces and VPN overlays could be used.
The VPN interfaces and IP addresses are:
The hub VPN has two child tunnels, one to each spoke.
The speed test configuration is shown in Speed tests run from the hub to the spokes in dial-up IPsec tunnels on page
634. This example shows applying a shaping profile to the hub's tunnel interface in order to apply interface based traffic
shaping to the child tunnels.
A traffic shaping policy is used to match and assign traffic to the classes in the shaping profile.
1. Configure the hub FortiGate (FGT_A) as in Speed tests run from the hub to the spokes in dial-up IPsec tunnels on
page 634.
In this example, all traffic through the hub-phase1 interface is put into class ID 3. Class IDs an be assigned based on
your traffic requirements.
4. At the schedules time, the speed test will start for the hub-phase1 interface from the hub to the spokes. The speed
test results can then be dynamically applied on individual child tunnels as egress traffic shaping, and the class ID
percentage based QoS settings is applicable on them as templates.
# diagnose vpn tunnel list
------------------------------------------------------
name=hub-phase1_0 ver=2 serial=c 172.16.200.1:0->172.16.200.4:0 tun_id=172.16.200.4 dst_
mtu=1500 dpd-link=on remote_location=0.0.0.0 weight=1
...
egress traffic control:
bandwidth=737210(kbps) lock_hit=0 default_class=2 n_active_class=3
class-id=2 allocated-bandwidth=73720(kbps) guaranteed-
bandwidth=73720(kbps)
max-bandwidth=73720(kbps) current-bandwidth=0(kbps)
priority=low forwarded_bytes=52
dropped_packets=0 dropped_bytes=0
class-id=3 allocated-bandwidth=221163(kbps) guaranteed-
bandwidth=221162(kbps)
max-bandwidth=294883(kbps) current-bandwidth=0(kbps)
priority=medium forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
class-id=4 allocated-bandwidth=442325(kbps) guaranteed-
bandwidth=147441(kbps)
max-bandwidth=442325(kbps) current-bandwidth=0(kbps)
priority=high forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
------------------------------------------------------
name=hub-phase1_1 ver=2 serial=d 172.16.200.1:0->172.16.200.2:0 tun_id=172.16.200.2 dst_
mtu=1500 dpd-link=on remote_location=0.0.0.0 weight=1
...
egress traffic control:
bandwidth=726813(kbps) lock_hit=0 default_class=2 n_active_class=3
class-id=2 allocated-bandwidth=72681(kbps) guaranteed-
bandwidth=72681(kbps)
max-bandwidth=72681(kbps) current-bandwidth=0(kbps)
priority=low forwarded_bytes=123
dropped_packets=0 dropped_bytes=0
class-id=3 allocated-bandwidth=218044(kbps) guaranteed-
bandwidth=218043(kbps)
max-bandwidth=290725(kbps) current-bandwidth=0(kbps)
priority=medium forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
class-id=4 allocated-bandwidth=436087(kbps) guaranteed-
bandwidth=145362(kbps)
max-bandwidth=436087(kbps) current-bandwidth=0(kbps)
priority=high forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
The guaranteed and maximum bandwidths equal 10% of the speed test result, as expected.
SSL VPN interfaces can be used in zones, simplifying firewall policy configuration in some scenarios.
Example
In this example, a zone is created that includes a physical interface (port4) and an SSL VPN interface. The zone is used
as the source interface in a firewall policy. PC1 is used for regular access with a firewall policy, and PC2 uses the SSL
VPN for access.
To create a zone that includes the port4 and ssl.root interfaces in the GUI:
4. Click OK.
5. Click Apply.
To configure a firewall policy with the zone as the source interface in the GUI:
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Set the policy name, such as policy_to_sslvpn_tunnel.
3. Set Incoming Interface to zone_sslvpn_and_port4.
4. Set Outgoing Interface to port1.
5. Configure the remaining settings as required.
6. Click OK.
Advanced configuration
This example shows how to convert a standalone FortiGate SD-WAN solution to a FGCP HA cluster with full-mesh WAN
set up. This configuration allows you to load balance your internet traffic between multiple ISP links. It also provides
redundancy for your internet connection if your primary ISP in unavailable, or if one of the FortiGates in the HA cluster
fails.
This example assumes that a standalone FortiGate has already been configured for SD-WAN by following the SD-WAN
quick start on page 478.
Standalone FortiGate:
FGCP HA cluster:
Enabling HA and re-cabling the WAN interfaces will cause network interruptions.
This procedure should be performed during a maintenance window.
After running the following commands, the FortiGate negotiates to establish an HA cluster. You might temporarily lose
connectivity with the FortiGate as FGCP negotiations take place and the MAC addresses of the FortiGate interfaces are
changed to HA virtual MAC addresses.
This configurations sets the HA mode to active-passive.
The ha1 and ha2 interfaces are configured as the heartbeat interfaces, with priorities set to 200 and 100 respectively.
Setting different priorities for the heartbeat interfaces is a best practice, but is not required.
If you have more than one cluster on the same network, each cluster should have a different group ID. Changing the
group ID changes the cluster interface's virtual MAC addresses. If the group IP causes a MAC address conflict on your
network, select a different group ID.
Enabling override and increasing the device priority means that this FortiGate always becomes the primary unit.
1. Go to System > Settings and change the Host name so that the FortiGate can be easily identified as the primary
unit.
2. Go to System > HA and configure the following options:
Mode Active-Passive
Password <password>
Override and the group ID can only be configured from the CLI.
3. Click OK.
Connectivity with the FortiGate will temporarily be lost.
1. Change the host name so that the FortiGate can be easily identified:
config system global
set hostname primary_FG
end
2. Configure HA:
config system ha
set mode a-p
set group-id 100
If HA mode does not start after running the above steps, ensure that none of the FortiGate's
interfaces use DHCP or PPPoE addressing.
The secondary FortiGate must be the same model and running the same firmware version as the primary FortiGate. The
HA settings are the same as the for the primary unit, except the secondary device has a lower priority and override is not
enabled.
It is best practice to reset the FortiGate to factory default settings prior to configuring HA. This
reduces the chance of synchronization problems.
# execute factoryreset
This operation will reset the system to factory default!
Do you want to continue? (y/n) y
1. Go to System > Settings and change the Host name so that the FortiGate can be easily identified as the backup unit.
2. Go to System > HA and configure the options the same as for the primary FortiGate, except with a lower priority:
Mode Active-Passive
Password <password>
3. Click OK.
1. Change the host name so that the secondary FortiGate can be easily identified:
config system global
set hostname secondary_FG
end
2. Configure HA:
config system ha
set mode a-p
set group-id 100
set group-name My-cluster
set password <password>
set priority 128
set hbdev ha1 200 ha2 100
end
1. Connect the heartbeat interfaces ha1 and ha2 between the primary and secondary FortiGate.
a. An HA primary device is selected. Because the primary FortiGate has a higher priority and override enabled, it
assumes the role of HA primary.
b. The secondary FortiGate synchronizes its configuration from the primary device.
2. Verify that the checksums match between the primary and secondary FortiGates:
# diagnose sys ha checksum cluster
is_manage_primary()=1, is_root_primary()=1
debugzone
global: 2b e9 81 38 c2 9d 4f db b7 0e 1f 49 42 c6 1e fb
root: af a6 48 c5 c2 9a 8b 81 a5 53 fb 27 e9 ae 01 6a
all: 89 1f 63 77 48 8a 30 ee 57 06 ca eb 71 e6 8e ad
checksum
global: 2b e9 81 38 c2 9d 4f db b7 0e 1f 49 42 c6 1e fb
root: af a6 48 c5 c2 9a 8b 81 a5 53 fb 27 e9 ae 01 6a
all: 89 1f 63 77 48 8a 30 ee 57 06 ca eb 71 e6 8e ad
is_manage_primary()=0, is_root_primary()=0
debugzone
global: 2b e9 81 38 c2 9d 4f db b7 0e 1f 49 42 c6 1e fb
root: af a6 48 c5 c2 9a 8b 81 a5 53 fb 27 e9 ae 01 6a
all: 89 1f 63 77 48 8a 30 ee 57 06 ca eb 71 e6 8e ad
checksum
global: 2b e9 81 38 c2 9d 4f db b7 0e 1f 49 42 c6 1e fb
root: af a6 48 c5 c2 9a 8b 81 a5 53 fb 27 e9 ae 01 6a
all: 89 1f 63 77 48 8a 30 ee 57 06 ca eb 71 e6 8e ad
If all of the cluster members have identical checksums, then their configurations are synchronized. If the checksums
are not the same, wait for a few minutes, then repeat the command. Some parts of the configuration might take a
significant amount of time to synchronize (tens of minutes).
After the device configurations are synchronized, you can connect the rest of the traffic interfaces. Making these
connections will disrupt traffic as cables are disconnected and reconnected.
Switches must be used between the cluster and the ISPs, and between the cluster and the internal network, as shown in
the topology diagram.
The HA Status dashboard widget shows the synchronization status. Hover over the host names of each FortiGate in the
widget to verify that they are synchronized and have the same checksum.
To view more information about the cluster status, including the number of sessions passing through the cluster
members, go to System > HA.
See Check HA synchronization status on page 1931 for more information.
Results
Testing HA failover
All traffic should currently be flowing through the primary FortiGate. If it becomes unavailable, traffic fails over to the
secondary FortiGate. When the primary FortiGate rejoins the cluster, the secondary FortiGate continues to operate as
the primary FortiGate.
To test this, ping a reliable IP address from a computer in the internal network, and then power off the primary FortiGate.
There will be a momentary pause in the ping results until traffic diverts to the backup FortiGate, allowing the ping traffic to
continue:
64 bytes from 184.25.76.114: icmp_seq=69 ttl=52 time=8.719 ms\
64 bytes from 184.25.76.114: icmp_seq=70 ttl=52 time=8.822 ms\
64 bytes from 184.25.76.114: icmp_seq=74 ttl=52 time=8.901 ms\
Request timeout for icmp_seq 75\
64 bytes from 184.25.76.114: icmp_seq=76 ttl=52 time=8.860 ms\
64 bytes from 184.25.76.114: icmp_seq=77 ttl=52 time=9.174 ms\
64 bytes from 184.25.76.114: icmp_seq=83 ttl=52 time=8.639 ms}
If you are using port monitoring, you can also unplug the primary FortiGate's internet facing
interface to test failover.
After the secondary FortiGate becomes the primary, you can log into the cluster using the same IP address as before the
fail over. If the primary FortiGate is powered off, you will be logged into the backup FortiGate. Check the host name to
verify what device you have logged into. The FortiGate continues to operate in HA mode, and if you restart the primary
FortiGate, it will rejoin the cluster and act as the backup FortiGate. Traffic is not disrupted when the restarted FortiGate
rejoins the cluster.
You can also use the CLI to force an HA failover. See Force HA failover for testing and demonstrations on page 1956 for
information.
To test a failover of the redundant internet configuration, you need to simulate a failed internet connection to one of the
ports. You can do this by disconnecting power from the wan1 switch, or by disconnecting the wan1 interfaces of both
FortiGates from ISP1.
After disconnecting, verify that users still have internet access
l Go to Dashboard > Network, and expand the SD-WAN widget. The Upload and Download columns for wan1 show
that traffic is not going through that interface.
l Go to Network > SD-WAN and select the SD-WAN Zones tab. The Bandwidth, Volume, and Sessions tabs show
that traffic is entirely diverted to wan2.
Users on the network should not notice the wan1 failure. If you are using the wan1 gateway IP address to connect to the
administrator dashboard, it will appear as though you are still connecting through wan1.
After verifying a successful failover, reestablish the connection to ISP1.
In this SD-WAN configuration, two FortiGates in an active-passive (A-P) HA pair are used to provide hardware
redundancy. Instead of using external switches to provide a mesh network connection to the ISP routers, the FortiGates
use their built-in hardware switches to connect to the ISP routers.
Only FortiGate models that have hardware switches can be used for this solution. Ports in a
software switch are not in a forwarding state when a FortiGate is acting as a secondary device
in a A-P cluster.
In this topology:
l Two hardware switches are created, HD_SW1 and HD_SW2.
l HD_SW1 is used to connect to ISP 1 Router and includes the internal1 and internal2 ports.
l HD_SW2 is used to connect to ISP 2 Router and includes the internal3 and internal4 ports.
l Another interface on each device is used as the HA heartbeat interface, connecting the two FortiGates in HA.
The FortiGates create two hardware switches to connect to ISP 1 and ISP2. When FGT_A is the primary device, it
reaches ISP 1 on internal1 in HD_SW1 and ISP 2 on internal4 in HD_SW2. When FGT_B is the primary device, it
reaches ISP 1 on internal2 in HD_SW1 and ISP 2 on internal3 on HD_SW2.
HA failover
This is not a standard HA configuration with external switches. In the case of a device failure, one of the ISPs will no
longer be available because the switch that is connected to it will be down.
For example, If FGT_A loses power, HA failover will occur and FGT_B will become the primary unit. Its connection to
internal2 on HD_SW1 will also be down, so it will be unable to connect to ISP 1. Its SD-WAN SLAs will be broken, and
traffic will only be routed through ISP 2.
If a hardware switch or switch interface is down, or the ISP router is down, the SD-WAN can detect the broken SLA and
continue routing to the other ISP.
For example, if FGT_A is the primary unit, and ISP 2 Router becomes unreachable, the SLA health checks on SD-WAN
will detect the broken SLA and cause traffic to stop routing to ISP 2.
Configuration
1. Configure two FortiGates with internal switches in an A-P HA cluster (follow the steps in HA active-passive cluster
setup on page 1924), starting by connecting the heartbeat interface.
2. When the HA cluster is up, connect to the primary FortiGate's GUI.
3. Remove the existing interface members from the default hardware switch:
a. Go to Network > Interfaces.
b. In the LAN section, double-click the internal interface to edit it.
c. In Interface Members, remove all of the interfaces
d. Click OK.
4. Configure the hardware switch interfaces for the two ISPs:
a. Go to Network > Interfaces and click Create New > Interface.
b. Enter a name (HD_SW1).
c. Set Type to Hardware Switch.
d. In Interface Members, add two interfaces (internal1 and internal2).
e. Set IP/Netmask to 192.168.1.2/24.
f. Configure the remaining settings as needed.
g. Click OK.
h. Repeat these steps to create a second hardware switch interface (HD_SW2) with two interface members
(internal3 and internal4) and IP/Netmask set to 192.168.3.2/24.
To configure SD-WAN:
1. On the primary FortiGate, go to Network > SD-WAN, select the SD-WAN Zones tab, and click Create New > SD-
WAN Member.
2. In the Interface dropdown, select HD_SW1.
3. Leave SD-WAN Zone set to virtual-wan-link.
4. Enter the Gateway address 192.168.1.1.
5. Click OK.
6. Repeat these steps to add the second interface (HD_SW2) with the gateway 192.168.3.1.
7. Click Apply.
Example 1
In this example, we create a template with two SD-WAN members configured without assigned interfaces that are used
in a performance SLA and SD-WAN rule. The template can be used to configure new devices, as in Example 2 on page
662. Interfaces are then assigned to the members, and the configuration becomes active.
1. Go to Network > SD-WAN, select the SD-WAN Zones tab, and click Create New > SD-WAN Member.
2. Leave all the settings set to their default values and click OK.
The members are disabled until interfaces are configured, but can still be used in performance SLAs and SD-WAN
rules.
4. Click OK.
1. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
2. Configure the rule, adding both members to the Interface preference field:
3. Click OK.
4. Click OK.
5. Repeat the above steps to assign an interface to the second member.
end
end
The SD-WAN configuration can now be used in as a template for new spokes, as in Example 2 on page 662.
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
Example 2
In this example, the configuration from Example 1 is copied onto a new FortiGate.
1. Optionally, change the console screen paging setting. See Screen paging on page 36 for details.
2. Open the CLI console.
3. If necessary, click Clear console to empty the console.
6. Edit the CLI configuration as necessary. For example, the first line that shows the show command should be
deleted, and the default health checks can be removed.
7. If required, save the CLI configuration as a text file.
The following instructions use PuTTy. The steps may vary in other terminal emulators.
1. Connect to the FortiGate. See Connecting to the CLI on page 28 for details.
2. Enter the following command:
show system sdwan
3. Select the output, press Ctrl + c to copy it, and then paste it into a text editor.
4. Edit the CLI configuration as necessary. For example, the default health checks can be removed.
5. If required, save the CLI configuration as a text file.
1. Connect to the new FortiGate. See Connecting to the CLI on page 28 for details.
2. Copy the SD-WAN configuration from the text editor.
3. Right-click to paste the SD-WAN configuration.
4. In necessary, press Enter to apply the last end command.
The SD-WAN configuration is copied to the new FortiGate.
If the interfaces do not exist, the SD-WAN members are created without interfaces, and are disabled until interfaces
are configured.
If no SD-WAN zone is specified, members are added to the default virtual-wan-link zone.
In this example, you configure a connection to a new cloud deployment that has some remote servers. SD-WAN is used
to steer traffic through the required overlay tunnel.
The on-premise FortiGate has two internet connections, each with a single VPN connection. The two VPN gateways are
configured on the cloud for redundancy, one terminating at the FortiGate-VM, and the other at the native AWS VPN
Gateway.
This example uses AWS as the Infrastructure as a Service (IaaS) provider, but the same configuration can also apply to
other services. A full mesh VPN setup is not shown, but can be added later if required.
To connect to the servers that are behind the cloud FortiGate-VM, virtual IP addresses (VIPs) are configured on port2 to
map to the servers:
l VPN traffic terminating on port1 is routed to the VIP on port2 to access the web servers.
l VPN traffic terminating on the VPN gateway accesses the VIPs on port2 directly.
There are four major steps to configure this setup:
1. Configuring the VPN overlay between the HQ FortiGate and cloud FortiGate-VM on page 665
2. Configuring the VPN overlay between the HQ FortiGate and AWS native VPN gateway on page 670
3. Configuring the VIP to access the remote servers on page 673
4. Configuring the SD-WAN to steer traffic between the overlays on page 676
After the configuration is complete, verify the traffic to ensure that the configuration is working as expected, see Verifying
the traffic on page 680.
Configuring the VPN overlay between the HQ FortiGate and cloud FortiGate-VM
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. Set Name to local_subnet_10_0_2_0.
3. Set IP/Netmask to 10.0.2.0/24.
4. Click OK.
4. Click Next.
5. Configure Network settings:
Interface port1
Version 1
Mode Aggressive
This setting allows the peer ID to be specified.
Peer ID IaaS
The other end of the tunnel needs to have its local ID set to IaaS.
Name Ent_Core
9. Click OK.
1. Go to Network > Interfaces and edit the Core_Dialup interface under port1.
2. Set IP to 172.16.200.1.
3. Set Remote IP/Netmask to 172.16.200.2 255.255.255.0. This is where remote health check traffic will come from.
4. Enable Administrative access for HTTPS, PING, and SSH.
5. Click OK.
4. Click OK.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the following:
Name Core_Dialup-to-port2
Source all
Destination local_subnet_10_0_2_0
Schedule always
Service ALL
Action ACCEPT
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. Set Name to remote_subnet_10_0_2_0.
3. Set IP/Netmask to 10.0.2.0/24.
4. Click OK.
IP Address 100.21.29.17
Interface port5
Version 1
Mode Aggressive
This setting allows the peer ID to be specified.
7. Leave the default Phase 1 Proposal settings, except set Local ID to IaaS.
8. Disable XAUTH.
9. Configure the Phase 2 Selector settings:
Name FGT_AWS_Tun
1. Go to Network > Interfaces and edit the FGT_AWS_Tun interface under port5.
2. Set IP to 172.16.200.2.
3. Set Remote IP/Netmask to 172.16.200.1 255.255.255.0.
4. Enable Administrative access for HTTPS, PING, and SSH.
5. Click OK.
Routing is defined when creating the SD-WAN interface. The firewall policy is created after the
SD-WAN interface is defined.
Configuring the VPN overlay between the HQ FortiGate and AWS native VPN
gateway
This example uses static routing. It is assumed that the AWS VPN Gateway is already configured, and that proper
routing is applied on the corresponding subnet.
See Creating routing tables and associate subnets in the AWS Administration Guide for configuration details.
1. Go to Virtual Private Network (VPN) > Customer Gateways to confirm that the customer gateway defines the
FortiGate IP address as its Gateway IP address, in this case 34.66.121.231.
2. Go to Virtual Private Network (VPN) > Virtual Private Gateways to confirm that a virtual private gateway (VPG) has
been created. In this case it is attached to the Cloud_onRamp VPC that contains the FortiGate and servers.
3. Go to Virtual Private Network (VPN) > Site-to-Site VPN Connections to confirm that site-to-site VPN connections
have been created and attached to the customer gateway and virtual private gateway.
If Routing Options is Static, the IP prefix of the remote subnet on the HQ FortiGate (10.100.88.0) is entered here.
AWS site-to-site VPN always creates two VPN tunnels for redundancy. In this example, only Tunnel 1 is used.
4. Click Download Configuration to download the FortiGate's tunnel configurations. The configuration can be referred
to when configuring the FortiGate VPN.
5. The new VPG is attached to your VPC, but to successfully route traffic to the VPG, proper routing must be defined.
Go to Virtual Private Cloud > Subnets, select the Cloud-OnRamp-VPN, and select the Route Table tab to verify that
there are at least two routes to send traffic over the VPG.
l 169.254.0.0/24 defines the tunnel IP address. Health check traffic originating from the FortiGate will come from
this IP range.
l 10.100.0.0/16 defines the remote subnet from the HQ FortiGate.
6. On the cloud FortiGate-VM EC2 instances, ensure that port1 and port2 both have Source/Dest. Check set to false.
This allows the FortiGate to accept and route traffic to and from a different network.
If you launched the instance from the AWS marketplace, this setting defaults to true.
7. If Optimal dashboards is selected, go to Dashboard > Network and expand the Routing widget to view the routing
table.
If Comprehensive dashboards is selected, go to Dashboard > Routing Monitor and select Static & Dynamic in the
widget toolbar to view the routing table:
IP Address 34.210.19.225
This address is taken from the downloaded AWS configuration file.
Interface port1
Version 1
Mode Main
7. Configure the Phase 1 Proposal settings using information from the downloaded AWS configuration file.
8. Disable XAUTH.
9. Configure the Phase 2 Selector settings:
Name AWS_VPG
1. Go to Network > Interfaces and edit the AWS_VPG interface under port1.
2. Set IP to 169.254.55.154.
3. Set Remote IP/Netmask to 169.254.55.153 255.255.255.0.
4. Enable Administrative access for HTTPS and PING.
5. Click OK.
Routing is defined when creating the SD-WAN interface. The firewall policy is created after the
SD-WAN interface is defined.
VIPs, interface IP addresses, and policies are created on the cloud FortiGate-VM to allow access to the remote servers.
1. On the FortiGate EC2 instance, edit the Elastic Network Interface that corresponds to port2. In this example,
Network Interface eth1.
2. Go to Actions > Manage IP Addresses.
3. Add two private IP address in the 10.0.2.0/24 subnet.
These address will be used in the VIPs on the FortiGate. This ensures that traffic to these IP addresses is routed to
the FortiGate by AWS.
1. Go to Policy & Objects > Virtual IPs and click Create New > Virtual IP.
2. Configure the following:
Name VIP-HTTP
Interface port2
3. Click OK.
4. Create a second VIP for the FTP server with the following settings:
Name VIP-FTP
Interface port2
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the following:
Name To-WebServer
Source all
Destination VIP-HTTP
Schedule always
Service ALL
Action ACCEPT
NAT Enabled
Name To-FTP
Source all
Destination VIP-FTP
Schedule always
Service ALL
Action ACCEPT
NAT Enabled
6. Click OK.
Configure the HQ FortiGate to use two overlay tunnels for SD-WAN, steering HTTPS and HTTP traffic through the FGT_
AWS_Tun tunnel, and SSH and FTP throguh the AWS_VPG tunnel.
1. Add SD-WAN member interfaces
2. Configure a route to the remote network
3. Configure firewall policies
4. Configure a health check
5. Configure SD-WAN rules
1. Go to Network > SD-WAN, select the SD-WAN Zones tab, and click Create New > SD-WAN Member.
2. Set Interface to AWS_VPG then click OK.
6. Click OK.
4. Click OK.
Individual routes to each tunnel are automatically added to the routing table with the same distance:
To configure firewall policies to allow traffic from the internal subnet to SD-WAN:
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the following:
Name ISFW-to-IaaS
Source all
Destination all
Schedule always
Service ALL
Action ACCEPT
NAT Enabled
As you are accessing the servers on the 10.0.2.0/24 subnet, it is preferable to use the FortiGate port2 interface as the
ping server for detection. This ensures that, if the gateway is not reachable in either tunnel, its routes are brought down
and traffic continues on the other tunnel.
1. Go to Network > SD-WAN, select the Performance SLAs tab, and click Create New.
2. Configure the following:
Name ping_AWS_Gateway
Protocol Ping
Server 10.0.2.10
Participants Specify
Add AWS_VPG and FGT_AWS_Tun as participants.
3. Click OK.
Health check probes originate from the VPN interface's IP address. This is why the phase2 selectors are configured
with Local Address set to all.
HTTPS and HTTP traffic is steered to the FGT_AWS_Tun tunnel, and SSH and FTP traffic is steered to the AWS_VPG
tunnel. The Manual algorithm is used in this example.
1. Go to Network > SD-WAN, select the SD-WAN Rules tab, and click Create New.
2. Configure the following:
Name http-to-FGT_AWS_Tun
Address remote_subnet_10_0_2_0
Protocol TCP
Port range 80 - 80
3. Click OK.
4. Create other SD-WAN rules as required:
To verify that pings are sent across the IPsec VPN tunnels
1. Go to Network > SD-WAN, select the Performance SLAs tab, select Packet Loss, and click the ping_AWS_Gateway
SLA:
1. Run the following CLI command to verify that HTTPS and HTTP traffic destined for the Web server at 10.0.2.20
uses FGT_AWS_Tun:
# diagnose sys session filter dst 10.0.2.20
# diagnose sys session list
2. Run the following CLI command to verify that SSH and FTP traffic destined for the FTP server at 10.0.2.21 uses
AWS_VPG:
# diagnose sys session filter dst 10.0.2.20
# diagnose sys session list
On the cloud FortiGate-VM, disable the firewall policy allowing Core_Dialup to port2.
1. Health-checks through the FGT_AWS_Tun tunnel fail:
a. Go to Network > SD-WAN, select the Performance SLAs tab, select Packet Loss, and click the ping_AWS_
Gateway SLA:
This topology diagram shows an overview of the network that is configured in this example:
Datacenter configuration
Dial-up, or dynamic, VPNs are used to facilitate zero touch provisioning of new spokes to establish VPN connections to
the hub FortiGate.
The exchange-interface-ip option is enabled to allow the exchange of IPsec interface IP addresses. This allows a
point to multipoint connection to the hub FortiGate.
The add-route option is disabled to allow multiple dial-up tunnels to be established to the same host that is advertising
the same network. This dynamic network discovery is facilitated by the BGP configuration; see Configure BGP on page
690 for details.
Wildcard security associations are defined for the phase2 interface because routing is used to determine if traffic is
subject to encryption and transmission through the IPsec VPN tunnel. The phase1 interface name must be 11 characters
or less.
A dynamic VPN configuration must be defined for each interface that connects to the internet.
To establish the BGP session, IP addresses must be assigned to the tunnel interfaces that BGP will use to peer.
The hub IP address is set to the address that the tunnels connect to. The remote IP address is set to highest unused IP
address that is part of the tunnel network. This establishes two connected routes directly back to the branch FortiGate in
the hub FortiGate's routing table.
Ping is allowed on the virtual interface to confirm that a point to point tunnel has been established between the hub and
branch FortiGates.
A loopback interface must be defined on the hub FortiGate to be used as a common probe point for the FortiGates that
are using SD-WAN. The FortiGates send a probe packet from each of their SD-WAN member interfaces so that they can
determine the best route according to their policies. Ping is allowed so that it can be used for measurements.
Configure BGP
next
edit 2
set prefix 10.200.0.0 255.255.255.0
next
edit 3
set prefix 10.200.3.0 255.255.255.0
next
end
end
Firewall policies
Centralized access is controlled from the hub FortiGate using Firewall policies. In addition to layer three and four
inspection, security policies can be used in the policies for layer seven traffic inspection.
It is best practice to only allow the networks and services that are required for communication through the firewall. The
following rules are the minimum that must be configured to allow SD-WAN to function:
For this example, a simple policy that allows all traffic is configured.
If there is a temporary loss of connectivity to the branch routes, it is best practice to send the traffic that is destined for
those networks into a blackhole until connectivity is restored.
Branch configuration
The branch must define its local tunnel interface IP address, and the remote tunnel interface IP address of the
datacenter FortiGate, to establish the point to multipoint VPN.
Configure BGP
BGP enables learning dynamic routes from the datacenter. The BGP configuration is normal, with the definition of the
datacenter FortiGate tunnel IP addresses set as BGP peers.
Routes that have the same network mask, administrative distance, priority, and AS length are automatically considered
for SD-WAN when the interfaces that those routes are on are added to the SD-WAN interface group.
In order to facilitate the fastest route failovers, configure the following timers to their lowest levels: scan-time,
advertisement-interval, keep-alive-timer, and holdtime-timer.
The distance-external option might need to be configured if you need routes that are learned from BGP to take
precedence over static routes.
Configure SD-WAN
SD-WAN configuration is required to load balance based on the quality of the links. It can be configured to select the best
link based on characteristics such as jitter, packet loss, and latency. A policy route is created by the FortiGate to select
the best link based on the defined criteria.
For SD-WAN interfaces, or members, the peer is defined to reference the BGP neighbor that is tied to that specific
interface.
The health check is the ping server that gathers the link characteristics used for link selection. It is recommended that the
minimum failtime be set to 2.
The service definition defines the criteria for the policy routes. It can match based on the following characteristics:
l Protocol
l Destination Address
l Source Address
l Identity Based Group
l Internet Service Definition
l Source Port
l Destination Port
l Destination Route Tag
To dynamically determine the networks of the policy routes, routes that are learned from a BGP neighbor are matched
against a route map, and a tag is defined for the matching routes. The service rules learn the networks based on these
tags, instead of defining objects based on the learned addresses' network prefixes . See Dynamic definition of SD-WAN
routes on page 697 for details on configuring the FortiGate to use the destination tags for the SD-WAN service definition.
Firewall configuration
Centralized access is controlled from the hub FortiGate using Firewall policies. In addition to layer three and four
inspection, security policies can be used in the policies for layer seven traffic inspection.
It is best practice to only allow the networks and services that are required for communication through the firewall. The
following rules are the minimum that must be configured to allow SD-WAN to function:
<internal <virtual wan <branch <datacenter Accept Always <allowed Allow traffic
interface> link> networks> networks> services> from branch
to datacenter
For this example, a simple policy that allows all traffic is configured.
Validation
The following commands can be used to validate the connections on the datacenter and branches.
Datacenter
Routing table:
VPN establishment:
Branch
SD-WAN validation:
Routing table:
VPN establishment:
Dynamic definitions of SD-WAN routes alleviate administrators from needing to know the destination of the traffic that is
being load balanced, which, in an environment where routes are constantly added and removed, required a significant
amount of administrative overhead.
The FortiGate can be configured to apply a route map to a BGP neighbor, and tag the routes that are learned from that
neighbor with the set-route-tag command. After those routes are assigned a tag ID in the route map, the ID can be
referenced in the SD-WAN rule.
Datacenter FortiGates should be configured to establish an OSPF neighbor relationship with the internal core router.
This allows the dynamic redistribution of routes to the branches that are receiving updates from the datacenter
FortiGates.
To ensure the fastest failover with OSPF, the following timers are set to their minimum levels: spf-timers, hello-
interval, dead-interval.
Bi-directional forwarding is enabled to allow the fastest convergence time if there is a failure with a peering neighbor.
To configure OSPF:
end
config redistribute "isis"
end
end
Troubleshooting SD-WAN
You can check the destination interface in Dashboard > FortiView Sessions in order to see which port the traffic is being
forwarded to.
The example below demonstrates a source-based load-balance between two SD-WAN members:
l If the source IP address is an even number, it will go to port13.
l If the source IP address is an odd number, it will go to port12.
This topic lists the SD-WAN related logs and explains when the logs will be triggered.
l When health-check has an SLA target and detects SLA changes, and changes to fail:
1: date=2021-04-20 time=21:32:33 eventtime=1618979553388763760 tz="-0700"
logid="0113022923" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
status" eventtype="Health Check" healthcheck="test" slatargetid=1 oldvalue="2"
newvalue="1" msg="Number of pass member changed."
2: date=2021-04-20 time=21:32:33 eventtime=1618979553388751880 tz="-0700"
logid="0113022923" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
status" eventtype="Health Check" healthcheck="test" slatargetid=1 member="1" msg="Member
status changed. Member out-of-sla."
l When health-check has an SLA target and detects SLA changes, and changes to pass:
1: date=2021-04-20 time=21:38:49 eventtime=1618979929908765200 tz="-0700"
logid="0113022923" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
status" eventtype="Health Check" healthcheck="test" slatargetid=1 oldvalue="1"
newvalue="2" msg="Number of pass member changed."
2: date=2021-04-20 time=21:38:49 eventtime=1618979929908754060 tz="-0700"
logid="0113022923" type="event" subtype="sdwan" level="information" vd="root"
logdesc="SDWAN status" eventtype="Health Check" healthcheck="test" slatargetid=1
member="1" msg="Member status changed. Member in sla."
SD-WAN calculates a link's session/bandwidth over/under its ratio and stops/resumes traffic:
l When SD-WAN calculates a link's session/bandwidth over its configured ratio and stops forwarding traffic:
1: date=2021-04-20 time=21:55:14 eventtime=1618980914728863220 tz="-0700"
logid="0113022924" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
volume status" eventtype="Volume" interface="R160" member="2" msg="Member enters into
conservative status with limited ablity to receive new sessions for too much traffic."
l When SD-WAN calculates a link's session/bandwidth according to its ratio and resumes forwarding traffic:
2: date=2021-04-20 time=22:12:52 eventtime=1618981972698753360 tz="-0700"
logid="0113022924" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
volume status" eventtype="Volume" interface="R160" member="2" msg="Member resume normal
status to receive new sessions for internal adjustment"
l When the SLA mode service rule's SLA qualified member changes. In this example R150 fails the SLA check, but is
still alive:
l When the SLA mode service rule's SLA qualified member changes. In this example R150 changes from fail to pass:
2: date=2021-04-20 time=22:41:51 eventtime=1618983711678827920 tz="-0700"
logid="0113022923" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
status" eventtype="Service" serviceid=1 service="test" seq="1,2" msg="Service
prioritized by SLA will be redirected in sequence order."
l When priority mode service rule member's link status changes. In this example R150 changes to better than R160,
and both are still alive:
1: date=2021-04-20 time=22:56:55 eventtime=1618984615708804760 tz="-0700"
logid="0113022923" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
status" eventtype="Service" serviceid=1 service="test" metric="packet-loss" seq="2,1"
msg="Service prioritized by performance metric will be redirected in sequence order."
l When priority mode service rule member's link status changes. In this example R160 changes to better than R150,
and both are still alive:
2: date=2021-04-20 time=22:56:58 eventtime=1618984618278852140 tz="-0700"
logid="0113022923" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
status" eventtype="Service" serviceid=1 service="test" metric="packet-loss" seq="1,2"
msg="Service prioritized by performance metric will be redirected in sequence order."
l When SD-WAN member passes the health-check again, it will resume forwarding logs:
2: date=2021-04-20 time=23:06:08 eventtime=1618985168018789600 tz="-0700"
logid="0113022923" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
status" eventtype="Service" interface="R150" member="1" serviceid=1 service="test"
gateway=10.100.1.1 msg="Member link is available. Start forwarding traffic. "
l When load-balance mode service rule's SLA qualified member changes. In this example R150 changes to not meet
SLA:
1: date=2021-04-20 time=23:10:24 eventtime=1618985425048820800 tz="-0700"
logid="0113022923" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
status" eventtype="Service" serviceid=1 service="test" member="2(R160)" msg="Service
will be load balanced among members with available routing."
l When load-balance mode service rule's SLA qualified member changes. In this example R150 changes to meet
SLA:
l When SLA fails, SLA link status logs will be generated with interval sla-fail-log-period:
1: date=2021-04-20 time=23:18:10 eventtime=1618985890469018260 tz="-0700"
logid="0113022925" type="event" subtype="sdwan" level="notice" vd="root" logdesc="SDWAN
SLA information" eventtype="SLA" healthcheck="test" slatargetid=1 interface="R150"
status="up" latency="0.061" jitter="0.004" packetloss="2.000%"
inbandwidthavailable="0kbps" outbandwidthavailable="200.00Mbps"
bibandwidthavailable="200.00Mbps" inbandwidthused="1kbps" outbandwidthused="1kbps"
bibandwidthused="2kbps" slamap="0x0" metric="packetloss" msg="Health Check SLA status.
SLA failed due to being over the performance metric threshold."
l When SLA passes, SLA link status logs will be generated with interval sla-pass-log-period:
2: date=2021-04-20 time=23:18:12 eventtime=1618985892509027220 tz="-0700"
logid="0113022925" type="event" subtype="sdwan" level="information" vd="root"
logdesc="SDWAN SLA information" eventtype="SLA" healthcheck="test" slatargetid=1
interface="R150" status="up" latency="0.060" jitter="0.003" packetloss="0.000%"
inbandwidthavailable="0kbps" outbandwidthavailable="200.00Mbps"
bibandwidthavailable="200.00Mbps" inbandwidthused="1kbps" outbandwidthused="1kbps"
bibandwidthused="2kbps" slamap="0x1" msg="Health Check SLA status."
This topic lists the SD-WAN related diagnose commands and related output.
l You can also use the diagnose netlink dstmac list command to check if you are over the limit.
FGT # diagnose netlink dstmac list R150
dev=R150 mac=00:00:00:00:00:00 vwl rx_tcp_mss=0 tx_tcp_mss=0 egress_overspill_
threshold=50000 egress_bytes=100982 egress_over_bps=1 ingress_overspill_
threshold=37500 ingress_bytes=40 ingress_over_bps=0 sampler_rate=0 vwl_zone_id=1
intf_qua=0
For example:
# diagnose sys link-monitor interface vd2-2
Interface(vd2-2): state(up, since Tue Jun 15 12:31:28 2021), bandwidth(up:1299bps,
down:0bps), session count(IPv4:2, IPv6:0), tx(2409919 bytes), rx(5292290 bytes), latency
(0.03), jitter(0.00), packet-loss(0.00).
To check BGP learned routes and determine if they are used in SD-WAN service:
Original VRF 0
20 10
10.100.1.5 from 10.100.1.5 (6.6.6.6)
Origin incomplete metric 0, route tag 15, localpref 100, valid, external, best
Community: 30:5
Advertised Path ID: 1
Last update: Thu Apr 22 10:25:50 2021
FGT # diagnose sys sdwan route-tag-list
Route-tag: 15, address: v4(1), v6(0)Last write/now: 6543391 6566007
service(1), last read route-tag 15 at 6543420
Prefix(24): Address list(1):
10.100.11.0-10.100.11.255 oif: 50 48
The bandwidth measuring tool is used to detect true upload and download speeds. Bandwidth tests can be run on
demand or automated using a script, and can be useful when configuring SD-WAN SLA and rules to balance SD-WAN
traffic.
The speed test tool requires a valid SD-WAN Bandwidth Monitoring Service license.
The speed test tool is compatible with iperf3.6 with SSL support. It can test the upload bandwidth to the FortiGate Cloud
speed test service. It can initiate the server connection and send download requests to the server. The tool can be run up
to 10 times a day .
FortiGate downloads the speed test server list. The list expires after 24 hours. One of the speed test servers is selected,
based on user input. The speed test runs, testing upload and download speeds. The test results are shown in the
command terminal.
You can run the speed test without specifying a server. The system will automatically choose one server from the list and
run the speed test.
# execute speed-test auto
The license is valid to run speed test.
Speed test quota for 2/1 is 9
current vdom=root
Run in uploading mode.
Connecting to host 35.230.2.124, port 5206
[ 16] local 172.16.78.185 port 2475 connected to 35.230.2.124 port 5206
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 16] 0.00-1.01 sec 11.0 MBytes 91.4 Mbits/sec 0 486 KBytes
[ 16] 1.01-2.00 sec 11.6 MBytes 98.4 Mbits/sec 0 790 KBytes
[ 16] 2.00-3.01 sec 11.0 MBytes 91.6 Mbits/sec 15 543 KBytes
[ 16] 3.01-4.01 sec 11.2 MBytes 94.2 Mbits/sec 1 421 KBytes
[ 16] 4.01-5.01 sec 11.2 MBytes 93.5 Mbits/sec 0 461 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 16] 0.00-5.01 sec 56.1 MBytes 93.8 Mbits/sec 16 sender
[ 16] 0.00-5.06 sec 55.8 MBytes 92.6 Mbits/sec receiver
To run the speed test on a local interface when there are multiple valid routes:
current vdom=root
Specified interface port1 does not comply with default outgoing interface port2 in routing
table!
Force to use the specified interface!
Run in uploading mode.
Connecting to host 35.197.18.234, port 5205
[ 11] local 172.16.78.202 port 20852 connected to 35.197.18.234 port 5205
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 11] 0.00-1.01 sec 10.7 MBytes 89.0 Mbits/sec 0 392 KBytes
[ 11] 1.01-2.01 sec 10.5 MBytes 88.5 Mbits/sec 1 379 KBytes
[ 11] 2.01-3.01 sec 11.3 MBytes 94.5 Mbits/sec 0 437 KBytes
[ 11] 3.01-4.01 sec 11.2 MBytes 94.3 Mbits/sec 0 478 KBytes
[ 11] 4.01-5.00 sec 11.3 MBytes 95.2 Mbits/sec 0 503 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 11] 0.00-5.00 sec 55.1 MBytes 92.3 Mbits/sec 1 sender
[ 11] 0.00-5.04 sec 54.5 MBytes 90.7 Mbits/sec receiver
You can monitor SD-WAN health check related statistics using SNMP. The MIB file can be downloaded by going to
System > SNMP and clicking Download FortiGate MIB File.
The following OIDs can be monitored:
Example
This example shows a SD-WAN health check configuration and its collected statistics.
next
end
config health-check
edit "pingserver"
set server "8.8.8.8"
set sla-fail-log-period 10
set sla-pass-log-period 20
set members 2 1 3
config sla
edit 1
set link-cost-factor jitter packet-loss
set packetloss-threshold 2
next
end
next
end
end
fgVWLHealthCheckLinkID .1.3.6.1.4.1.12356.101.4.9.2.1.1 1 2 3
fgVWLHealthCheckLinkSeq .1.3.6.1.4.1.12356.101.4.9.2.1.3 2 1 3
fgVWLHealthCheckLinkState .1.3.6.1.4.1.12356.101.4.9.2.1.4 0 0 0
fgVWLHealthCheckLinkPacketLoss .1.3.6.1.4.1.12356.101.4.9.2.1.9 0 0 0
Policies
The firewall policy is the axis around which most features of the FortiGate revolve. Many firewall settings end up relating
to or being associated with the firewall policies and the traffic they govern. Any traffic going through a FortiGate has to be
associated with a policy. These policies are essentially discrete compartmentalized sets of instructions that control the
traffic flow going through the firewall. These instructions control where the traffic goes, how it is processed, if it is
processed, and whether or not it is allowed to pass through the FortiGate.
When the firewall receives a connection packet, it analyzes the source address, destination address, and service (by
port number). It also registers the incoming interface, the outgoing interface it needs to use, and the time of day. Using
this information, the FortiGate firewall attempts to locate a security policy that matches the packet. If a policy matches
the parameters, then the FortiGate takes the required action for that policy. If it is Accept, the traffic is allowed to proceed
to the next step. If the action is Deny or a match cannot be found, the traffic is not allowed to proceed.
The two basic actions at the initial connection are either Accept or Deny:
l If the action is Accept, the policy permits communication sessions. There may be other packet processing
instructions, such as requiring authentication to use the policy or restrictions on the source and destination of the
traffic.
l If the action is Deny, the policy blocks communication sessions, and you can optionally log the denied traffic. If no
security policy matches the traffic, the packets are dropped. A Deny security policy is needed when it is required to
log the denied traffic, also called violation traffic.
One other action can be associated with the policy:
l IPsec: this is an Accept action that is specifically for IPsec VPNs.
Each field in a firewall policy that accepts multiple inputs, such as srcaddr and dstaddr, can
accept as many inputs as there are unique objects created. The maximum number of objects
depends on the model. See the Maximum Values Table for more details.
For traffic to flow through the FortiGate firewall, there must be a policy that matches its parameters:
l Incoming interface(s)
l Outgoing interface(s)
l Source address(es)
l User(s) identity
l Destination address(es)
l Internet service(s)
l Schedule
l Service
Without all six (possibly eight) of these things matching, the traffic is declined.
Traffic flow initiated from each direction requires a policy, that is, if sessions can be initiated from both directions, each
direction requires a policy.
Just because packets can go from point A to point B on port X does not mean that the traffic can flow from point B to point
A on port X. A policy must be configured for each direction.
When designing a policy, there is often reference to the traffic flow, but most communication is two-way so trying to
determine the direction of the flow might be confusing. If traffic is HTTP web traffic, the user sends a request to the
website, but most of the traffic flow will be coming from the website to the user or in both directions? For the purposes of
determining the direction for a policy, the important factor is the direction of the initiating communication. The user is
sending a request to the website, so this is the initial communication; the website is responding so the traffic is from the
user's network to the Internet.
FortiOS does not perform a reverse-path check on reply traffic that matches an allowed
session based on the IP tuple. The request traffic can be sent on one interface and the reply
traffic could return on another interface.
Profile-based next-generation firewall (NGFW) mode is the traditional mode where you create a profile (antivirus, web
filter, and so on) and then apply the profile to a policy.
In policy-based NGFW mode, you allow applications and URL categories to be used directly in security policies, without
requiring web filter or application control profiles.
In policy-based mode:
l Central NAT is always enabled. If no Central SNAT policy exists, you must create one. See Central SNAT on page
731 for more information.
l Pre-match rules are defined separately from security policies, and define broader rules, such as SSL inspection and
user authentication.
l The IPsec wizard is not supported.
If your FortiGate operates in NAT mode, rather than enabling source NAT in individual NGFW policies, go to Policy &
Objects > Central SNAT and add source NAT policies that apply to all matching traffic. In many cases, you may only
need one SNAT policy for each interface pair.
The NGFW mode is set per VDOM, and it is only available when the VDOM inspection mode is flow-based. You can
operate your entire FortiGate or individual VDOMs in NGFW policy mode.
config vdom
edit <vdom>
config system settings
set ngfw-mode policy-based
end
next
end
Security policies work with SSL Inspection & Authentication policies to inspect traffic. To allow traffic from a specific user
or user group, both Security and SSL Inspection & Authentication policies must be configured. A default SSL Inspection
& Authentication policy with the certificate-inspection SSL Inspection profile is preconfigured. Traffic will match the SSL
Inspection & Authentication policy first. If the traffic is allowed, packets are sent to the IPS engine for application, URL
category, user, and user group match, and then, if enabled, UTM inspection (antivirus, IPS, DLP, and email filter) is
performed.
SSL Inspection & Authentication policies are used to pre-match traffic before sending the packets to the IPS engine:
l There are no schedule or action options; traffic matching the policy is always redirected to the IPS engine.
l SSL inspection, formerly configured in the VDOM settings, is configured in an SSL Inspection & Authentication
policy.
l Users and user groups that require authentication must be configured in an SSL Inspection & Authentication policy.
Security policies work with SSL Inspection & Authentication policies to inspect traffic:
edit 4
set name "allow-QA-Email"
set srcintf "port18"
set dstintf "port17"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set url-category 23
set groups "QA"
next
end
Logs
In the application control and web filter logs, securityid maps to the security policy ID.
Application control log:
date=2019-06-17 time=16:35:47 logid="1059028704" type="utm" subtype="app-ctrl"
eventtype="signature" level="information" vd="vd1" eventtime=1560814547702405829 tz="-0700"
appid=15832 user="Jack" group="QA" srcip=10.1.100.102 dstip=157.240.3.29 srcport=56572
dstport=443 srcintf="port18" srcintfrole="undefined" dstintf="port17"
dstintfrole="undefined" proto=6 service="P2P" direction="incoming" policyid=1
sessionid=42445 appcat="Social.Media" app="Facebook" action="pass" hostname="external-sea1-
1.xx.fbcdn.net" incidentserialno=1419629662 url="/" securityid=2 msg="Social.Media:
Facebook," apprisk="medium" scertcname="*.facebook.com" scertissuer="DigiCert SHA2 High
Assurance Server CA"
Traffic logs:
date=2019-06-17 time=16:35:53 logid="0000000013" type="traffic" subtype="forward"
level="notice" vd="vd1" eventtime=1560814553778525154 tz="-0700" srcip=10.1.100.102
srcport=56572 srcintf="port18" srcintfrole="undefined" dstip=157.240.3.29 dstport=443
dstintf="port17" dstintfrole="undefined" poluuid="b740d418-8ed3-51e9-5a7b-114e99ab6370"
sessionid=42445 proto=6 action="server-rst" user="Jack" group="QA" policyid=1
policytype="consolidated" centralnatid=1 service="HTTPS" dstcountry="United States"
srccountry="Reserved" trandisp="snat" transip=172.16.200.2 transport=56572 duration=6
sentbyte=276 rcvdbyte=745 sentpkt=5 rcvdpkt=11 appid=15832 app="Facebook"
appcat="Social.Media" apprisk="medium" utmaction="allow" countapp=1 utmref=65531-294
You can combine Application Control and Web Filter in the same NGFW mode policy.
The following security profiles can be used in NGFW policy-based mode:
l AntiVirus
l Web Filter
l Intrusion Prevention
l File Filter
l Email Filter
Logging can also be enabled in security policies.
In NGFW policy-based mode, the application default service enforces applications running only on their default service
port. The applications specified in the policy are monitored, and if traffic is detected from a nonstandard port, it is
blocked, and a log entry is recorded with a port-violation event type.
If you are not using the default ports, and need to pick specific services, select Specify to select the required services.
Example
In this example, the standard port is enforced for HTTPS traffic using the HTTP.Audio application.
First, an SSL Inspection & Authentication policy is created do to traffic pre-match, and then a security policy is created to
allow the HTTP.Audio application when using the default port. Fetching an MP3 file from an HTTP server using port 443
is allowed, but is blocked when using a nonstandard port, such as 8443.
To enforce the HTTP.Audio application using the default port in the GUI:
1. Create a new SSL Inspection & Authentication policy, or use the default policy.
2. Go to Policy & Objects > Security Policy, and click Create New.
3. Enter a name for the policy, such as allow_HTTP.Audio.
4. Configure the ports as needed.
5. Set Service to App Default.
6. In the Application field, select HTTP.Audio.
8. Click OK.
To enforce the HTTP.Audio application using the default port in the CLI:
Logs
The application logs show logs with an event type of port-violation for traffic on port 8443 that is blocked, and an
event type of signature for traffic on port 443 that is allowed.
Blocked:
2: date=2019-06-18 time=16:15:40 logid="1060028736" type="utm" subtype="app-ctrl"
eventtype="port-violation" level="warning" vd="vd1" eventtime=1560899740218875746 tz="-0700"
appid=15879 srcip=10.1.100.22 dstip=172.16.200.216 srcport=52680 dstport=8443
srcintf="port13" srcintfrole="undefined" dstintf="port14" dstintfrole="undefined" proto=6
service="HTTPS" direction="incoming" policyid=1 sessionid=5041 appcat="Video/Audio"
app="HTTP.Audio" action="block" hostname="172.16.200.216" incidentserialno=1906780850
url="/app_data/story.mp3" securityid=2 msg="Video/Audio: HTTP.Audio," apprisk="elevated"
Allowed:
1: date=2019-06-18 time=16:15:49 logid="1059028704" type="utm" subtype="app-ctrl"
eventtype="signature" level="information" vd="vd1" eventtime=1560899749258579372 tz="-0700"
appid=15879 srcip=10.1.100.22 dstip=172.16.200.216 srcport=54527 dstport=443
srcintf="port13" srcintfrole="undefined" dstintf="port14" dstintfrole="undefined" proto=6
service="HTTPS" direction="incoming" policyid=1 sessionid=5064 appcat="Video/Audio"
app="HTTP.Audio" action="pass" hostname="172.16.200.216" incidentserialno=1139663486
url="/app_data/story.mp3" securityid=2 msg="Video/Audio: HTTP.Audio," apprisk="elevated"
In NGFW policy mode, if an application, application category, or application group is selected on a security policy, and
traffic logging is set to UTM or All, then application control logs will be generated. In addition, when a signature is set to
the ACCEPT action under a security policy, all corresponding child signatures will be assessed and logged as well.
1. Go to Policy & Objects > Security Policy and configure a new policy for YouTube.
2. Set Action to ACCEPT and Log Allowed Traffic to Security Events.
5. On FortiOS, go to Log & Report > Application Control and view the logs.
There are logs not only for YouTube, but also for YouTube_Video.Play, YouTube_Video.Access, and so on, as
verified from the Application Name column.
This topic provides a sample of firewall policy views and firewall policy lookup.
Policy views
In Policy & Objects policy list pages, there are two policy views: Interface Pair View and By Sequence view.
Interface Pair View displays the policies in the order that they are checked for matching traffic, grouped by the pairs of
incoming and outgoing interfaces in collapsible sections.
By Sequence displays policies in the order that they are checked for matching traffic without any grouping.
The default display is Interface Pair View. You can switch between the two views except if any or multiple interfaces are
applied in the policy. The FortiGate automatically changes the view on the policy list page to By Sequence whenever
there is a policy containing any or multiple interfaces as the Source or Destination interface. If the Interface Pair View is
grayed out, it is likely that one or more policies have used the any or multiple interfaces.
You can export the current view to CSV and JSON formats by clicking Export and selecting CSV or JSON. The file is
automatically downloaded.
Policy lookup
Sample configuration
This example uses the TCP protocol to show how policy lookup works:
1. On a Policy & Objects policy list page, click Policy Lookup and enter the traffic parameters.
The following topics provide instructions on configuring policies with source NAT:
l Static SNAT on page 724
l Dynamic SNAT on page 725
l Central SNAT on page 731
l Configuring an IPv6 SNAT policy on page 736
l SNAT policies with virtual wire pairs on page 738
Static SNAT
Network Address Translation (NAT) is the process that enables a single device such as a router or firewall to act as an
agent between the Internet or Public Network and a local or private network. This agent acts in real time to translate the
source or destination IP address of a client or server on the network interface. For the source IP translation, this enables
a single public address to represent a significantly larger number of private addresses. For the destination IP translation,
the firewall can translate a public destination address to a private address. So we don't have to configure a real public IP
address for the server deployed in a private network.
We can subdivide NAT into two types: source NAT (SNAT) and destination NAT (DNAT). This topic is about SNAT, We
support three NAT working modes: static SNAT, dynamic SNAT, and central SNAT.
In static SNAT all internal IP addresses are always mapped to the same public IP address. This is a port address
translation, Since we have 60416 available port numbers, this one public IP address can handle the conversion of
60,416 internal IP addresses.
Sample configuration
The following example of static SNAT uses an internal network with subnet 10.1.100.0/24 (vlan20) and an external/ISP
network with subnet 172.16.200.0/24 (vlan30).
When the clients in internal network need to access the servers in external network, We need to translate IP addresses
from 10.1.100.0/24 to an IP address 172.16.200.0/24, In this example, we implement static SNAT by creating a firewall
policy.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the required policy parameters.
3. Enable NAT and select Use Outgoing Interface Address. For packets that match this policy, its source IP address is
translated to the IP address of the outgoing interface.
4. If needed, enable Preserve Source Port to keep the same source port for services that expect traffic to come from a
specific source port. Disable Preserve Source Port to allow more than one connection through the firewall for that
service.
5. Click OK.
Dynamic SNAT
Dynamic SNAT maps the private IP addresses to the first available public address from a pool of addresses. In the
FortiGate firewall, this can be done by using IP pools. IP pools is a mechanism that allows sessions leaving the FortiGate
firewall to use NAT. An IP pool defines a single IP address or a range of IP addresses to be used as the source address
for the duration of the session. These assigned addresses are used instead of the IP address assigned to that FortiGate
interface.
IP pool types
FortiGate uses four types of IPv4 IP pools. This topic focuses on some of the differences between them.
Overload
This type of IP pool is similar to static SNAT mode. We need to define an external IP range that contains one or more IP
addresses. When there is only one IP address it is almost the same as static SNAT, the outgoing interface address is
used. When it contains multiple IP addresses, it is equivalent to an extended mode of static SNAT.
For instance, if we define an overload type IP pool with two external IP addresses (172.16.200.1—172.16.200.2), since
there are 60,416 available port numbers per IP, this IP pool can handle 60,416*2 internal IP addresses.
The mapped IP address can be calculated from the source IP address. The index number of the address in the pool is
the remainder of the source IP address, in decimal, divided by the number addresses in the pool.
To calculate the decimal value of the source IP address, either use an online calculator, or use
the following equation:
a.b.c.d = a * (256)3 + b * (256)2 + c * (256) + d
For example:
192.168.0.1 = 192 * (256)3 + 168 * (256)2 + 0 * (256) + 1 = 3232235521
One-to-one
This type of IP pool means that the internal IP address and the external (translated) IP address match one-to-one. The
port address translation (PAT) is disabled when using this type of IP pool. For example, if we define a one-to-one type IP
pool with two external IP addresses (172.16.200.1 - 172.16.200.2), this IP pool only can handle two internal IP
addresses.
For the overload and one-to-one IP pool types, we do not need to define the internal IP range. For the fixed port range
type of IP pool, we can define both internal IP range and external IP range. Since each external IP address and the
number of available port numbers is a specific number, if the number of internal IP addresses is also determined, we can
calculate the port range for each address translation combination. So we call this type fixed port range. This type of IP
pool is a type of port address translation (PAT).
For instance, if we define one external IP address (172.16.200.1) and ten internal IP addresses (10.1.100.1-
10.1.100.10), we have translation IP+Port combination like following table:
This type of IP pool is also a type of port address translation (PAT). It gives users a more flexible way to control the way
external IPs and ports are allocated. Users need to define Block Size/Block Per User and external IP range. Block Size
means how many ports each Block contains. Block per User means how many blocks each user (internal IP) can use.
The following is a simple example:
l External IP Range: 172.16.200.1—172.16.200.1
l Block Size: 128
l Block Per User: 8
Result:
l Total-PBAs: 472 (60416/128)
l Maximum ports can be used per User (Internal IP Address): 1024 (128*8)
l How many Internal IP can be handled: 59 (60416/1024 or 472/8)
Sample configuration
4. Click OK.
4. Click OK.
5. Click OK.
4. Click OK.
Central SNAT
The central SNAT table enables you to define and control (with more granularity) the address translation performed by
FortiGate. With the NAT table, you can define the rules for the source address or address group, and which IP pool the
destination address uses.
FortiGate reads the NAT rules from the top down until it hits a matching rule for the incoming address. This enables you
to create multiple NAT policies that dictate which IP pool is used based on source address, destination address, and
source port. NAT policies can be rearranged within the policy list. NAT policies are applied to network traffic after a
security policy.
The central SNAT table allows you to create, edit, delete, and clone central SNAT entries.
Sample configuration
1. In System > Settings, under System Operations Settings, enable Central SNAT.
2. Click Apply.
When central NAT is enabled, Policy & Objects displays the Central SNAT section.
The Central SNAT policy has many options:
Field Description
Type Specify whether you are performing SNAT on IPv4 or IPv6. This option only
appears when IPv6 is enabled under Feature Visibility.
Incoming Interface Specify one or more interfaces for the ingress traffic.
Outgoing Interface Specify one or more interfaces for the egress traffic.
NAT Enable or disable to perform NAT. When disabled, no source address translation
will occur.
Protocol Choose from any, TCP, UDP, SCTP, or specify the protocol number to match. For
example, for ICMP, click specify with the protocol number 1.
Explicit port mapping Enable in order to match this NAT policy only when the following ports are a
match:
l Choose an original source port from one to 65535. NAT'd port will be chosen
Field Description
Example one
Example two
Apply an IP Pool to all traffic from port3 to port2 that are TCP. NAT all other traffic using the outgoing interface IP.
set protocol 6
set nat-ippool "Overload-IPPOOL"
next
edit 2
set srcintf "port3"
set dstintf "port2"
set orig-addr "all"
set dst-addr "all"
next
end
A UDP session (protocol 17) is NAT’d to the outgoing interface IP address 192.168.2.86:
session info: proto=17 proto_state=01 duration=16 expire=163 timeout=0 flags=00000000
socktype=0 sockport=0 av_idx=0 use=3
origin-shaper=
reply-shaper=
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ helper=dns-udp vlan_cos=0/255
state=may_dirty
statistic(bytes/packets/allow_err): org=59/1/1 reply=187/1/1 tuples=2
tx speed(Bps/kbps): 3/0 rx speed(Bps/kbps): 11/0
orgin->sink: org pre->post, reply pre->post dev=9->6/6->9 gwy=192.168.2.1/192.168.0.10
hook=post dir=org act=snat 192.168.0.10:52177->4.2.2.1:53(192.168.2.86:61770)
hook=pre dir=reply act=dnat 4.2.2.1:53->192.168.2.86:61770(192.168.0.10:52177)
dst_mac=04:d5:90:5f:a2:2a
misc=0 policy_id=2 auth_info=0 chk_client_info=0 vd=0
serial=00011061 tos=ff/ff app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id=00000000 rpdb_svc_id=0 ngfwid=n/a
npu_state=0x040000
Example three
Apply an IP Pool to all traffic from port3 to port2 that have a specific original port range, mapping the ports to the same
NAT'd port range. Nat all other traffic using the outgoing interface IP.
Traffic with original port in the range between 50000-65535 will be NAT'd with the Overload type IP Pool. The mapped
port is in the same port range:
session info: proto=17 proto_state=01 duration=3 expire=176 timeout=0 flags=00000000
socktype=0 sockport=0 av_idx=0 use=3
origin-shaper=
reply-shaper=
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ helper=dns-udp vlan_cos=0/255
state=may_dirty
statistic(bytes/packets/allow_err): org=71/1/1 reply=123/1/1 tuples=2
tx speed(Bps/kbps): 23/0 rx speed(Bps/kbps): 40/0
orgin->sink: org pre->post, reply pre->post dev=9->6/6->9 gwy=192.168.2.1/192.168.0.10
hook=post dir=org act=snat 192.168.0.10:52540->4.2.2.1:53(192.168.2.201:52540)
hook=pre dir=reply act=dnat 4.2.2.1:53->192.168.2.201:52540(192.168.0.10:52540)
dst_mac=04:d5:90:5f:a2:2a
misc=0 policy_id=2 auth_info=0 chk_client_info=0 vd=0
serial=00011399 tos=ff/ff app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id=00000000 rpdb_svc_id=0 ngfwid=n/a
npu_state=0x040000
Traffic with original port outside the range of 50000-65535 will be NAT'd to the outgoing interface IP:
session info: proto=6 proto_state=01 duration=3 expire=3597 timeout=3600 flags=00000000
socktype=0 sockport=0 av_idx=0 use=3
origin-shaper=
reply-shaper=
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ vlan_cos=0/255
state=may_dirty
statistic(bytes/packets/allow_err): org=2262/10/1 reply=2526/11/1 tuples=2
tx speed(Bps/kbps): 741/5 rx speed(Bps/kbps): 828/6
orgin->sink: org pre->post, reply pre->post dev=9->6/6->9 gwy=192.168.2.1/192.168.0.10
hook=post dir=org act=snat 192.168.0.10:49805->142.250.68.66:443(192.168.2.86:62214)
hook=pre dir=reply act=dnat 142.250.68.66:443->192.168.2.86:62214(192.168.0.10:49805)
pos/(before,after) 0/(0,0), 0/(0,0)
dst_mac=04:d5:90:5f:a2:2a
misc=0 policy_id=2 auth_info=0 chk_client_info=0 vd=0
serial=0001139a tos=ff/ff app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id=00000000 rpdb_svc_id=0 ngfwid=n/a
npu_state=0x040000
Protocols which do not use ports, such as ICMP, will be NAT'd to the outgoing interface IP:
session info: proto=1 proto_state=00 duration=7 expire=59 timeout=0 flags=00000000
socktype=0 sockport=0 av_idx=0 use=3
origin-shaper=
reply-shaper=
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ vlan_cos=0/255
state=may_dirty
statistic(bytes/packets/allow_err): org=480/8/1 reply=480/8/1 tuples=2
tx speed(Bps/kbps): 66/0 rx speed(Bps/kbps): 66/0
orgin->sink: org pre->post, reply pre->post dev=9->6/6->9 gwy=192.168.2.1/192.168.0.10
hook=post dir=org act=snat 192.168.0.10:1->4.2.2.1:8(192.168.2.86:62209)
hook=pre dir=reply act=dnat 4.2.2.1:62209->192.168.2.86:0(192.168.0.10:1)
dst_mac=04:d5:90:5f:a2:2a
misc=0 policy_id=2 auth_info=0 chk_client_info=0 vd=0
serial=0001138b tos=ff/ff app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id=00000000 rpdb_svc_id=0 ngfwid=n/a
npu_state=0x040000
IPv4 and IPv6 central SNAT maps are displayed in the same table.
d. Click OK.
2. In the VDOM with central SNAT enabled (FG-traffic in this example), go to Policy & Objects > Central SNAT and
click Create New.
3. Configure the policy settings:
a. For Type, select IPv6.
b. Enter the interface, address, and IP pool information.
c. Configure the remaining settings as needed.
d. Click OK.
The matching SNAT traffic will be handled by the IPv6 central SNAT map.
edit 2
set type ipv6
set srcintf "wan2"
set dstintf "wan1"
set orig-addr6 "all"
set dst-addr6 "all"
set nat-ippool6 "test-ippool6-1"
next
end
next
end
Source NAT (SNAT) can be configured in IPv4 and IPv6 policies with virtual wire pair (VWP) interfaces, and between
VWP interfaces when central NAT is enabled.
To configure a policy using SNAT and a VWP interface when central NAT is disabled:
2. Create the IP pool. The IP pool must have a different subnet than the VWP peers.
config firewall ippool
edit "vwp-pool-1"
set startip 172.16.222.99
set endip 172.16.222.100
next
end
3. Create the IP pool. The IP pool must have a different subnet than the VWP peers.
config firewall ippool
edit "vwp-pool-1"
set startip 172.16.222.99
set endip 172.16.222.100
next
end
The following topics provide instructions on configuring policies with destination NAT:
l Static virtual IPs on page 740
l Virtual IP with services on page 743
l Virtual IPs with port forwarding on page 744
l Virtual server load balance on page 746
l Central DNAT on page 755
Static Virtual IPs (VIP) are used to map external IP addresses to internal IP addresses. This is also called destination
NAT, where a packet's destination is being NAT'd, or mapped, to a different address.
Static VIPs are commonly used to map public IP addresses to resources behind the FortiGate that use private
IP addresses. A static one-to-one VIP is when the entire port range is mapped. A port forwarding VIP is when the
mapping is configured on a specific port or port range.
Some of the VIP configuration options are:
Setting Description
VIP Type l IPv4 (config firewall vip) - The source and destination are both IPv4.
l IPv6 (config firewall vip6) - The source and destination are both
IPv6.
Setting Description
Note: IPv6 is only available when IPv6 is enabled in the Feature Visibility.
Interface (extintf) The external interface that the firewall policy source interface must match.
For example, if the external interface is port1, then the VIP can be used in a policy
from port1 to port3, but not in a policy from port2 to port3.
If the external interface is any, then the VIP can be used in any firewall policy.
External IP address/range In a static NAT VIP, the external IP address is the IP address that the FortiGate
(extip) listens for traffic on.
When the external interface in not any, 0.0.0.0 can be used to make the external
IP address equivalent to the external interface's IP address.
The external IP address is also used to perform SNAT for the mapped server
when the server outbound traffic with a destination interface that matches the
external interface. The firewall policy must also have NAT enabled.
IPv4 address/range (mappedip) The IPv4 address or range that the internal resource is being mapped to.
IPv6 address/range (ipv6- The IPv6 address or range that the internal resource is being mapped to.
mappedip)
srcintf-filter (CLI only) Listen for traffic to the external IP address only on the specified interface.
While the external interface restricts the policies where the VIP can be used, it
does not restrict listening to only the external interface. To restrict listening to only
a specific interface, srcint-filter must be configured.
nat-source-vip (CLI only) Force all of the traffic from the mapped server to perform SNAT with the external
IP address, regardless of the destination interface.
If srcint-filter is defined, then nat-source-vip only forces SNAT to be
performed when the destination matches the srcintf-filter interface.
In both cases, the firewall policy must have NAT enabled.
arp-reply (CLI only) Enable/disable responding to ARP requests on the external IP address (default =
enable).
Source address (src-filter) Restrict the source IP address, address range, or subnet that is allowed to access
the VIP.
Port Forwarding (portforward) Enable port forwarding to specify the port (mappedport) to map to.
Setting Description
If no services are configured, you can configure the protocol (protocol) to use
when forwarding packets, the external service port range (extport) to be
mapped to a port range on the destination network, and the mapped port range
(mappedport and ipv6-mappedport) on the destination network.
Port Mapping Type l One to one - Each external service port is mapped to one port. A range is
allowed, but the number of ports should be the same.
l Many to Many - The port mapping can be one to one, one to many, or many
to one. There are no restrictions on how many external ports must map to
internal ports.
Sample configuration
1. In Policy & Objects > Virtual IPs and click Create New > Virtual IP.
2. Select a VIP Type based on the IP versions used.
3. Enter a unique name for the virtual IP.
4. Enter values for the external IP address/range and map to IPv4/IPv6 address/range fields.
5. Click OK.
next
end
Virtual IP with services is a more flexible virtual IP mode. This mode allows users to define services to a single port
number mapping.
This topic shows how to use virtual IP with services enabled. This example has one public external IP address. We map
TCP ports 8080, 8081, and 8082 to an internal WebServer TCP port 80. This allows remote connections to communicate
with a server behind the firewall.
Sample configuration
1. In Policy & Objects > Virtual IPs and click Create New > Virtual IP.
2. Set VIP Type to IPv4.
3. Enter a unique name for the virtual IP and fill in the other fields.
4. Configure the fields in the Network section. For example:
l Set Interface to any.
l Set External IP Address/Range to 10.1.100.199.
l Set Mapped IP Address/Range to 172.16.200.55.
5. Enable Optional Filters and then enable Services.
6. In the Services field click + to display the Services pane.
7. In the Services pane select TCP_8080, TCP_8081, and TCP_8082.
8. Enable Port Forwarding and set Map to IPv4 port to 80.
9. Click OK.
l Access 10.1.100.199:8081 from external network and FortiGate maps to 172.16.200.55:80 in internal network.
l Access 10.1.100.199:8082 from external network and FortiGate maps to 172.16.200.55:80 in internal network.
If you need to hide the internal server port number or need to map several internal servers to the same public IP address,
enable port-forwarding for Virtual IP.
This topic shows how to use virtual IPs to configure port forwarding on a FortiGate unit. This example has one public
external IP address. We map TCP ports 8080, 8081, and 8082 to different internal WebServers' TCP port 80. This allows
remote connections to communicate with a server behind the firewall.
Sample configuration
9. Click OK.
10. Follow the above steps to create two additional virtual IPs.
a. For one virtual IP:
l Use a different Mapped IP Address/Range, for example, 172.16.200.56.
11. Create a Virtual IP Group and put the above three virtual IPs into that group.
l Access 10.1.100.199:8081 from external network and FortiGate maps to 172.16.200.56:80 in internal network.
l Access 10.1.100.199:8082 from external network and FortiGate maps to 172.16.200.57:80 in internal network
This topic shows a special virtual IP type: virtual server. Use this type of VIP to implement server load balancing.
The FortiOS server load balancing contains all the features of a server load balancing solution. You can balance traffic
across multiple backend servers based on multiple load balancing schedules including:
l Static (failover)
l Round robin
l Weighted (to account for different sized servers or based on the health and performance of the server including
round trip time and number of connections)
The load balancer supports HTTP, HTTPS, IMAPS, POP3S, SMTPS, SSL/TLS, and generic TCP/UDP and IP protocols.
Session persistence is supported based on the SSL session ID based on an injected HTTP cookie, or based on the
HTTP or HTTPS host. SSL/TLS load balancing includes protection from protocol downgrade attacks. Server load
balancing is supported on most FortiGate devices and includes up to 10,000 virtual servers on high end systems.
Sample topology
SSL/TLS offloading
FortiGate SSL/TLS offloading is designed for the proliferation of SSL/TLS applications. The key exchange and
encryption/decryption tasks are offloaded to the FortiGate unit where they are accelerated using FortiASIC technology
which provides significantly more performance than a standard server or load balancer. This frees up valuable resources
on the server farm to give better response to business operations. Server load balancing offloads most SSL/TLS
versions including SSL 3.0, TLS 1.0, and TLS 1.2, and supports full mode or half mode SSL offloading with DH key sizes
up to 4096 bits.
FortiGate SSL offloading allows the application payload to be inspected before it reaches your servers. This prevents
intrusion attempts, blocks viruses, stops unwanted applications, and prevents data leakage. SSL/TLS content inspection
supports TLS versions 1.0, 1.1, and 1.2 and SSL versions 1.0, 1.1, 1.2, and 3.0.
When creating a new virtual server, you must configure the following options:
l Virtual Server Type.
l Load Balancing Methods.
l Health check monitoring (optional).
l Session persistence (optional).
l Virtual Server IP (External IP Address).
l Virtual Server Port (External Port).
l Real Servers (Mapped IP Address & Port).
Select the protocol to be load balanced by the virtual server. If you select a general protocol such as IP, TCP, or UDP,
the virtual server load balances all IP, TCP, or UDP sessions. If you select specific protocols such as HTTP, HTTPS, or
SSL, you can apply additional server load balancing features such as Persistence and HTTP Multiplexing.
HTTP Select HTTP to load balance only HTTP sessions with the destination port number that matches the
Virtual Server Port setting. Change Virtual Server Port to match the destination port of the sessions
to be load balanced (usually port 80 for HTTP sessions). You can enable HTTP Multiplexing. You
can also set Persistence to HTTP Cookie to enable cookie-based persistence.
HTTPS Select HTTPS to load balance only HTTPS sessions with the destination port number that matches
the Virtual Server Port setting. Change Virtual Server Port to match the destination port of the
sessions to be load balanced (usually port 443 for HTTPS sessions). You can enable HTTP
Multiplexing. You can also set Persistence to HTTP Cookie to enable cookie-based persistence, or
you can set Persistence to SSL Session ID.
IMAPS Select IMAPS to load balance only IMAPS sessions with the destination port number that matches
the Virtual Server Port setting. Change Virtual Server Port to match the destination port of the
sessions to be load balanced (usually port 993 for IMAPS sessions). You can also set Persistence
to SSL Session ID.
POP3S Select POP3S to load balance only POP3S sessions with the destination port number that matches
the Virtual Server Port setting. Change Virtual Server Port to match the destination port of the
sessions to be load balanced (usually port 995 for POP3S sessions). You can also set Persistence
to SSL Session ID.
SMTPS Select SMTPS to load balance only SMTPS sessions with the destination port number that matches
the Virtual Server Port setting. Change Virtual Server Port to match the destination port of the
sessions to be load balanced (usually port 465 for SMTPS sessions). You can also set Persistence
to SSL Session ID.
SSL Select SSL to load balance only SSL sessions with the destination port number that matches the
Virtual Server Port setting. Change Virtual Server Port to match the destination port of the sessions
to be load balanced. You can also set Persistence to SSL Session ID.
TCP Select TCP to load balance only TCP sessions with the destination port number that matches the
Virtual Server Port setting. Change Virtual Server Port to match the destination port of the sessions
to be load balanced.
UDP Select UDP to load balance only UDP sessions with the destination port number that matches the
Virtual Server Port setting. Change Virtual Server Port to match the destination port of the sessions
to be load balanced.
IP Select IP to load balance all sessions accepted by the security policy that contains this virtual
server.
The load balancing method defines how sessions are load balanced to real servers.
All load balancing methods do not send traffic to real servers that are down or not responding. FortiGate can only
determine if a real server is not responding by using a health check monitor. You should always add at least one health
check monitor to a virtual server or to real servers; otherwise load balancing might try to distribute sessions to real
servers that are not functioning.
Static The traffic load is statically spread evenly across all real servers. Sessions are not assigned
according to how busy individual real servers are. This load balancing method provides some
persistence because all sessions from the same source address always go to the same real server.
Because the distribution is stateless, so if a real server is added, removed, or goes up or down, the
distribution is changed and persistence might be lost.
Round Robin Directs new requests to the next real server. This method treats all real servers as equals
regardless of response time or the number of connections. This method does not direct requests to
real servers that down or non responsive.
Weighted Real servers with a higher weight value receive a larger percentage of connections. Set the real
server weight when adding a real server.
Least Session Directs requests to the real server that has the least number of current connections. This method
works best in environments where the real servers or other equipment you are load balancing all
have similar capabilities. This load balancing method uses the FortiGate session table to track the
number of sessions being processed by each real server. The FortiGate unit cannot detect the
number of sessions actually being processed by a real server.
Least RTT Directs sessions to the real server with the lowest round trip time. The round trip time is determined
by a ping health check monitor. The default is 0 if no ping health check monitors are added to the
virtual server.
First Alive Directs sessions to the first live real server. This load balancing schedule provides real server
failover protection by sending all sessions to the first live real server. If a real server fails, all
sessions are sent to the next live real server. Sessions are not distributed to all real servers so all
sessions are processed by the first real server only.
HTTP Host Load balances HTTP host connections across multiple real servers using the host’s HTTP header
to guide the connection to the correct real server.
In the FortiGate GUI, you can configure health check monitoring so that the FortiGate unit can verify that real servers are
able respond to network connection attempts. If a real server responds to connection attempts, the load balancer
continues to send sessions to it. If a real server stops responding to connection attempts, the load balancer assumes
that the server is down and does not send sessions to it. The health check monitor configuration determines how the
load balancer tests real servers. You can use a single health check monitor for multiple load balancing configurations.
You can configure TCP, HTTP, DNS, and ping health check monitors. You usually set the health check monitor to use
the same protocol as the traffic being load balanced to it. For example, for an HTTP load balancing configuration, you
would normally use an HTTP health check monitor.
Session persistence
Use persistence to ensure a user is connected to the same real server every time the user makes an HTTP, HTTPS, or
SSL request that is part of the same user session. For example, if you are load balancing HTTP and HTTPS sessions to
a collection of eCommerce web servers, when users make a purchase, they will be starting multiple sessions as they
navigate the eCommerce site. In most cases, all the sessions started by this user during one eCommerce session
should be processed by the same real server. Typically, the HTTP protocol keeps track of these related sessions using
cookies. HTTP cookie persistence ensure all sessions that are part of the same user session are processed by the same
real server.
When you configure persistence, the FortiGate unit load balances a new session to a real server according to the load
balance method. If the session has an HTTP cookie or an SSL session ID, the FortiGate unit sends all subsequent
sessions with the same HTTP cookie or SSL session ID to the same real server.
Real servers
Add real servers to a load balancing virtual server to provide information the virtual server requires to send sessions to
the server. A real server configuration includes the IP address of the real server and port number the real server receives
sessions on. The FortiGate unit sends sessions to the real server’s IP address using the destination port number in the
real server configuration.
When configuring a real server, you can also specify the weight (if the load balance method is set to Weighted) and you
can limit the maximum number of open connections between the FortiGate unit and the real server. If the maximum
number of connections is reached for the real server, the FortiGate unit automatically switches all further connection
requests to other real servers until the connection number drops below the limit. Setting Maximum Connections to 0
means that the FortiGate unit does not limit the number of connections to the real server.
This example describes the steps to configure the load balancing configuration below. In this configuration, a FortiGate
unit is load balancing HTTP traffic from the Internet to three HTTP servers on the internal network. HTTP sessions are
accepted at the wan1 interface with destination IP address 172.20.120.121 on TCP port 8080, and forwarded from the
internal interface to the web servers. When forwarded, the destination address of the session is translated to the IP
address of one of the web servers.
This load balancing configuration also includes session persistence using HTTP cookies, round-robin load balancing,
and TCP health monitoring for the real servers. Ping health monitoring consists of the FortiGate unit using ICMP ping to
ensure the web servers can respond to network traffic.
General steps:
To see the virtual servers and health check monitors options in the GUI, Load Balance must be
selected in Feature Visibility > Additional Features. See Feature visibility on page 2043 on
page 1 for details.
l Type to Ping
l Interval to 10 seconds
l Timeout to 2 seconds
l Retry to 3 attempt(s)
4. Click OK.
l Type to HTTP
l Interface to wan1
l IP Address to 10.31.101.30
l Port to 80
l Max Connections to 0
l Mode to Active
6. Click OK. Configure two more real servers with IP addresses 10.31.101.40 and 10.31.101.50, and the same
settings as the first real server.
7. Click OK.
To create a security policy that includes the load balance virtual server as the destination address:
l Source to all
l Destination to Vserver-HTTP-1
l Schedule to always
l Service to ALL
l Action to ACCEPT
5. Enable NAT and set IP Pool Configuration to Use Outgoing Interface Address.
6. Enable AntiVirus and select an antivirus profile.
7. Click OK.
To configure HTTP load balancing to three real web servers in the CLI:
3. Add the load balancing virtual server to a policy as the destination address:
config firewall policy
edit 2
set name "LB-policy"
set inspection-mode proxy
set srcintf "wan1"
set dstintf "internal"
set srcaddr "all"
set dstaddr "Vserver-HTTP-1"
set action accept
Results
Central DNAT
Central NAT allows for the central configuration of SNAT (source NAT) and DNAT (destination NAT).
1. Go to System > Settings.
2. In the System Operation Settings, enable Central SNAT.
3. Click Apply.
When central NAT is enabled, virtual IPs (VIPs) are not configured in the firewall policy. The VIPs are configured as
separate objects where their status must be enabled.
This option is only available for IPv4 VIP and VIP46 objects.
Configuring a DNAT and VIP object in central NAT mode is similar to configuring a VIP when central NAT is disabled.
See Static virtual IPs on page 740 for more information on each setting.
VIP objects can carry over when switching from non-central NAT mode to central NAT mode or vice-versa. However, if a
VIP is assigned to a firewall policy in non-central NAT mode, it must be unassigned before switching to central NAT
mode.
In this example, a DNAT and VIP are configured to forward traffic from 10.1.100.130 to 172.16.200.44. This example
assumes that the firewall address, Addr_172.16.200.44/32, has already been configured.
e. Click OK.
2. Configure a firewall policy that allows traffic in the direction of the VIP:
a. Go to Policy & Objects > Firewall Policy and click Create New.
b. Configure the following settings:
Name VIP-port2toport3
Source all
Destination Addr_172.16.200.40
Schedule always
Service ALL
Action ACCEPT
c. Configure the other settings as needed. There is no SNAT configuration section, so central SNAT policies will
be applied.
d. Click OK.
2. Configure a firewall policy that allows traffic in the direction of the VIP:
config firewall policy
edit 3
set name "VIP-port2toport3"
set srcintf "port2"
set dstintf "port3"
set action accept
set srcaddr "all"
set dstaddr "Addr_172.16.200.40"
set schedule "always"
set service "ALL"
next
end
If the VIP status is disabled, it will not appear in the VIP table.
In this example, a one-to-one static NAT is enabled. Send a ping to 10.1.100.130, and the traffic will be forwarded to the
destination 172.16.200.44.
The following topics provide instructions on configuring policies with Internet Service:
l Using Internet Service in policy on page 758
l Using custom Internet Service in policy on page 760
l Using extension Internet Service in policy on page 762
l Global IP address information database on page 764
l IP reputation filtering on page 766
l Internet service groups in policies on page 767
l Allow creation of ISDB objects with regional information on page 771
l Internet service customization on page 773
This topic shows how to apply a predefined Internet Service entry into a policy.
The Internet Service Database is a comprehensive public IP address database that combines IP address range, IP
owner, service port number, and IP security credibility. The data comes from the FortiGuard service system. Information
is regularly added to this database, for example, geographic location, IP reputation, popularity & DNS, and so on. All this
information helps users define Internet security more effectively. You can use the contents of the database as criteria for
inclusion or exclusion in a policy.
From FortiOS version 5.6, Internet Service is included in the firewall policy. It can be applied to a policy only as a
destination object. From version 6.0, Internet Service can be applied both as source and destination objects in a policy.
You can also apply Internet Services to shaping policy.
There are three types of Internet Services you can apply to a firewall policy:
l Predefined Internet Services
l Custom Internet Services
l Extension Internet Services
Sample configuration
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Click in the Destination field.
3. In the Select Entries pane, click Internet Service and select Google-Gmail.
In the CLI, enable the internet-service first and then use its ID to apply the policy.
This example uses Google Gmail and its ID is 65646. Each Internet Service has a unique ID.
config firewall policy
edit 9
set name "Internet Service in Policy"
set srcintf "wan2"
set dstintf "wan1"
set srcaddr "all"
set internet-service enable
set internet-service-id 65646
set action accept
set schedule "always"
set utm-status enable
set av-profile "g-default"
set ssl-ssh-profile "certificate-inspection"
set nat enable
next
end
Result
Because the IP and services related to Google Gmail on the Internet are included in this Internet Service (65646), all
traffic to Google Gmail is forwarded by this policy.
CLI syntax
config firewall internet-service-custom
edit <name>
set comment <comment>
set reputation {1 | 2 | 3 | 4 | 5}
config entry
edit <ID>
set protocol <protocol #>
set dst <object_name>
config port-range
edit <ID>
set start-port <port #>
set end-port <port #>
next
end
next
end
end
end
Sample configuration
Result
In addition to the IP address, IP address ranges, and services allowed by Google.Gmail, this policy also allows the traffic
which access to 10.1.100.0/24 and TCP/80-443 and 172.16.200.0/24 and TCP/80.
Extension Internet Service lets you add custom or remove existing IP address and port ranges to an existing predefined
Internet Service entries. Using an extension type Internet Service is actually editing a predefined type Internet Service
entry and adding IP address and port ranges to it.
When creating an extension Internet Service and adding custom ranges, you must set following elements:
l IP or IP ranges
l Protocol number
l Port or port ranges
You must use CLI to add custom IP address and port entries into a predefined Internet Service.
You must use GUI to remove entries from a predefined Internet Service.
Sample configuration
To remove IP address and port entries from an existing Internet Service in the GUI:
To remove IP address and port entries from an existing Internet Service in the CLI:
Result
In addition to the IP addresses, IP address ranges, and services allowed by Google.Gmail, this policy also allows the
traffic which accesses 10.1.100.0/24 and UDP/53 and 172.16.200.0/24 and TCP/80-443. At the same time, the traffic
that accesses 2.20.183.160 is dropped because this IP address and port is disabled from Google.Gmail.
The Internet Service and IP Reputation databases download details about public IP address, including: ownership,
known services, geographic location, blocklisting information, and more. The details are available in drilldown
information, tooltips, and other mechanisms in the FortiView and other pages.
The global IP address database is an integrated database containing all public IP addresses, and is implemented in the
Internet Service Database.
115 Cybozu
116 VNC
Singularity: 20
Reputation: 2(Sites providing high risk services such as TOR, proxy, P2P, etc.)
Icon Id: 43
Second Level Domain: 1(other)
Direction: dst
Data source: irdb
IP reputation filtering
There are currently five reputation levels in the Internet Service Database (ISDB), and custom reputation levels can be
defined in a custom internet service. You can configure firewall policies to filter traffic according to the desired reputation
level. If the reputation level of either the source or destination IP address is equal to or greater than the level set in the
policy, then the packet is forwarded, otherwise, the packet is dropped.
The five default reputation levels are:
1 Known malicious sites, such as phishing sites or sites related to botnet servers
3 Unverified sites
5 Known and verified safe sites, such as Gmail, Amazon, and eBay
The default minimum reputation level in a policy is zero, meaning that the reputation filter is disabled.
For IP addresses that are not included in the ISDB, the default reputation level is three.
The default reputation direction is destination.
Example 1
Packets from the source IP address with reputation levels three, four, or five will be forwarded by this policy.
To set the reputation level and direction in a policy using the CLI:
Packets from the source IP address with reputation levels three, four, or five will be forwarded by this policy.
Example 2
This policy allows only outbound FTP traffic, if the destination server has a minimum reputation of 4.
To set the reputation level and direction in a policy using the CLI:
This feature provides support for Internet Service Groups in traffic shaping and firewall policies. Service groups can be
used as the source and destination of the policy. Internet Service Groups are used as criteria to match traffic; the shaper
will be applied when the traffic matches.
To use a group as a destination, internet-service must be enabled. To use a group as a source, internet-
service-src must be enabled.
The following CLI variables are available in the firewall policy and firewall shaping-policy commands:
Variable Description
internet-service-group <string> Internet Service group name.
internet-service-custom-group <string> Custom Internet Service group name.
internet-service-src-group <string> Internet Service source group name.
internet-service-src-custom-group <string> Custom Internet Service source group name.
Examples
Example 1
In this example, the PC is allowed to access Google, so all Google services are put into an Internet Service Group.
To configure access to Google services using an Internet Service Group using the CLI:
2. Create a firewall policy to allow access to all Google Services from the PC:
config firewall policy
edit 1
set name "PC to Google"
set srcintf "port2"
set dstintf "port1"
set srcaddr "all"
set internet-service enable
set internet-service-group "Google_Group"
To configure access to Google services using an Internet Service Group in the GUI:
Example 2
In this example, two office FTP servers are put into an Internet Custom Service Group, and the PC connection to the FTP
servers is limited to 1Mbps.
To put two FTP servers into a custom service group and limit the PC connection speed to them in the
CLI:
2. Create a custom internet server group and add the just created custom internet services to it:
config firewall internet-service-custom-group
edit "Internal_FTP"
set member "FTP_QA" "FTP_PM"
next
end
4. Create a firewall shaping policy to limit the speed from the PC to the internal FTP servers:
config firewall shaping-policy
edit 1
set name "For Internal FTP"
set internet-service enable
To put two FTP servers into a custom service group and limit the PC connection speed to the in the GUI:
1. Create custom internet services for the internal FTP servers using the CLI.
2. Create a custom internet server group and add the just created custom internet services to it using the CLI.
3. Create a traffic shaper to limit the maximum bandwidth:
a. Go to Policy & Objects > Traffic Shaping, select the Traffic Shapers tab, and click Create New.
b. Enter a Name for the shaper, such as Internal_FTP_Limit_1Mbps.
c. Set the Traffic Priority to Medium.
d. Enable Max Bandwidth and set it to 1000.
e. Enable Guaranteed Bandwidth and set it to 500.
f. Click OK.
4. Create a firewall shaping policy to limit the speed from the PC to the internal FTP servers:
a. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Policy tab, and click Create New.
b. Set the Destination to the just created custom internet service group, and apply the just create traffic shaper.
Geographic-based Internet Service Database (ISDB) objects allow users to define a country, region, and city. These
objects can be used in firewall policies for more granular control over the location of the parent ISDB object. ISDB
objects are now referenced in policies by name instead of ID.
c. Click OK.
2. View the IP ranges in the location-based internet service:
a. Go to Policy & Objects > Internet Service Database .
b. In the table, hover over the object created in step 1 and click View/Edit Entries. The list of IPs is displayed:
c. Click Return.
3. Add the ISDB object to a policy:
a. Go to Policy & Objects > Firewall Policy and create a new policy or edit an existing one.
b. For Destination, click Internet Service and select the ISDB object created in step 1.
c. Configure the other settings as needed.
d. Click OK.
Internet Service Database (ISDB) entries can be tuned for their environments by adding custom ports and port ranges,
as well as port mapping.
end
next
end
next
end
Warning: Configuration will only be applied after rebooting or using the 'execute internet-
service refresh' command.
NAT64 policy translates IPv6 addresses to IPv4 addresses so that a client on an IPv6 network can communicate
transparently with a server on an IPv4 network.
NAT64 policy is usually implemented in combination with the DNS proxy called DNS64. DNS64 synthesizes AAAA
records from A records and is used to synthesize IPv6 addresses for hosts that only have IPv4 addresses. DNS proxy
and DNS64 are interchangeable terms.
Sample topology
In this example, a host on the internal IPv6 network communicates with ControlPC.qa.fortinet.com that only has
IPv4 address on the Internet. Central NAT is disabled.
1. The host on the internal network does a DNS lookup for ControlPC.qa.fortinet.com by sending a DNS query
for an AAAA record for ControlPC.qa.fortinet.com.
2. The DNS query is intercepted by the FortiGate DNS proxy. The DNS proxy performs an A-record query for
ControlPC.qa.fortinet.com and gets back an RRSet containing a single A record with the IPv4 address
172.16.200.55.
3. The DNS proxy then synthesizes an AAAA record. The IPv6 address in the AAAA record begins with the configured
NAT64 prefix in the upper 96 bits and the received IPv4 address in the lower 32 bits. By default, the resulting IPv6
address is 64:ff9b::172.16.200.55.
4. The host on the internal network receives the synthetic AAAA record and sends a packet to the destination address
64:ff9b::172.16.200.55.
5. The packet is routed to the FortiGate internal interface (port10) where it is accepted by the NAT64 security policy.
6. The FortiGate translates the destination address of the packets from IPv6 address 64:ff9b::172.16.200.55 to
IPv4 address 172.16.200.55 and translates the source address of the packets to 172.16.200.200 (or another
address in the IP pool range) and forwards the packets out the port9 interface to the Internet.
Sample configuration
c. Click OK.
4. Configure the IPv6 VIP for the destination IPv6 addresses:
These are all of the IPv6 addresses that the FortiGate DNS proxy synthesizes when an IPv6 device performs a DNS
query that resolves to an IPv4 Address. In this example, the synthesized IPv6 address in the AAAA record begins
with the configured NAT64 prefix in the upper 96 bits, so the VIP is for all the IPv6 addresses that begin with 64:ff9b.
a. Go to Policy & Objects > Virtual IPs and click Create New > Virtual IP.
b. Enter the following:
Name vip6
c. Click OK.
5. Configure the IPv6 firewall address for the internal network:
a. Click Create New > Address.
b. Enter the following:
Name internal-net6
IP/Netmask 2001:db8:1::/48
c. Click OK.
6. Configure the IP pool containing the IPv4 address that is used as the source address of the packets exiting port9:
a. Go to Policy & Objects > IP Pools and click Create New.
b. Enter the following:
Name exit-pool4
Type Overload
NAT64 Enable
External IP address/range must start and end on the boundaries of a valid subnet. For
example, 172.16.200.0-172.16.200.7 and 172.16.200.16-172.16.200.31 are a valid
subnets (/29 and /28 respectively).
c. Click OK.
7. Configure the NAT64 policy:
a. Go to Policy & Objects > Firewall Policy and click Create New.
b. Enter the following:
Name policy64-1
Source internal-net6
Destination vip6
Schedule always
Service ALL
Action ACCEPT
NAT NAT64
c. Click OK.
6. Configure the IP pool containing the IPv4 address that is used as the source address of the packets exiting port9:
config firewall ippool
edit "exit-pool4"
set startip 172.16.200.200
set endip 172.16.200.207
set nat64 enable
next
end
External IP address/range must start and end on the boundaries of a valid subnet. For
example, 172.16.200.0-172.16.200.7 and 172.16.200.16-172.16.200.31 are a valid
subnets (/29 and /28 respectively).
Enabling DNS64 means that all IPv6 traffic received by the current VDOM can be subject to NAT64 if the source and
destination address matches an NAT64 security policy.
By default, the setting always-synthesize-aaaa-record is enabled. If you disable this setting, the DNS proxy
(DNS64) will attempt to find an AAAA records for queries to domain names and therefore resolve the host names to IPv6
addresses. If the DNS proxy cannot find an AAAA record, it synthesizes one by adding the NAT64 prefix to the A record.
config system dns64
set status {enable | disable}
set dns64-prefix <ipv6-prefix>
set always-synthesize-aaaa-record {enable | disable}
end
NAT46 policy
NAT46 refers to the mechanism that allows IPv4 addressed hosts to communicate with IPv6 hosts. Without such a
mechanism, IPv4 environments cannot connect to IPv6 networks.
Sample topology
In this example, an IPv4 client tries to connect to an IPv6 server. A VIP is configured on FortiGate to map the server IPv6
IP address 2000:172:16:200:55 to an IPv4 address 10.1.100.55. On the other side, an IPv6 IP pool is configured
and the source address of packets from client are changed to the defined IPv6 address. In this setup, the client PC can
access the server by using IP address 10.1.100.55.
Sample configuration
1. Enable IPv6:
a. Go to System > Feature Visibility.
b. In the Core Features section, enable IPv6.
c. Click Apply.
2. Configure the VIP:
a. Go to Policy & Objects > Virtual IPs and click Create New > Virtual IP.
b. Enter the following:
Name vip46_server
Interface port2
c. Click OK.
3. Configure the IPv6 IP pool:
a. Go to Policy & Objects > IP Pools and click Create New.
b. Enter the following:
Name client_external
NAT46 Enable
c. Click OK.
Name policy46-1
Source all
Destination vip46_server
Schedule always
Service ALL
Action ACCEPT
NAT NAT46
1. Enable IPv6:
Sample troubleshooting
Local-in policies
While security profiles control traffic flowing through the FortiGate, local-in policies control inbound traffic that is going to
a FortiGate interface.
Administrative access traffic (HTTPS, PING, SSH, and others) can be controlled by allowing or denying the service in the
interface settings. Trusted hosts can be configured under an administrator to restrict the hosts that can access the
administrative service.
Local-in policies allow administrators to granularly define the source and destination addresses, interface, and services.
Traffic destined for the FortiGate interface specified in the policy that meets the other criteria is subject to the policies
action.
Local-in policies can be used to restrict administrative access or other services, such as VPN, that can be specified as
services. You can define source addresses or address groups to restrict access from. For example, by using a
geographic type address you can restrict a certain geographic set of IP addresses from accessing the FortiGate.
By default, no local-in policies are defined, so there are no restrictions on local-in traffic.
Local-in policies can only be created or edited in the CLI. You can view the existing local-in
policies in the GUI by enabling it in System > Feature Visibility under the Additional Features
section. This page does not list the custom local-in policies.
For example, to prevent the source subnet 10.10.10.0/24 from pinging port1, but allow administrative access for PING
on port1:
config firewall address
edit "10.10.10.0"
set subnet 10.10.10.0 255.255.255.0
next
end
config firewall local-in-policy
edit 1
set intf "port1"
set srcaddr "10.10.10.0"
set dstaddr "all"
set service "PING"
set schedule "always"
next
end
3. The output of the debug flow shows that traffic is dropped by local-in policy 1:
# id=20085 trace_id=1 func=print_pkt_detail line=5746 msg="vd-root:0 received a packet
(proto=1, 10.10.10.12:1->192.168.2.5:2048) from port1. type=8, code=0, id=1, seq=128."
id=20085 trace_id=1 func=init_ip_session_common line=5918 msg="allocate a new session-
0017c5ad"
id=20085 trace_id=1 func=vf_ip_route_input_common line=2615 msg="find a route:
flag=80000000 gw-192.168.2.5 via root"
id=20085 trace_id=1 func=fw_local_in_handler line=474 msg="iprope_in_check() check
failed on policy 1, drop"
Additional options
To disable or re-enable the local-in policy, use the set status {enable | disable} command.
To dedicate the interface as an HA management interface, use the set ha-mgmt-intf-only enable command.
TTL policies
You can configure a time-to-live (TTL) policy to block attack traffic with high TTLs. This feature only applies to local-in
traffic and does not apply to traffic passing through the FortiGate. You can use srcintf to set the interface that the
local-in traffic hits. See config firewall ttl-policy.
DoS protection
A Denial of Service (DoS) policy examines network traffic arriving at a FortiGate interface for anomalous patterns, which
usually indicates an attack.
A denial of service occurs when an attacking system starts an abnormally large number of sessions with a target system.
The large number of sessions slows down or disables the target system, preventing legitimate users from using it.
DoS policies are checked before security policies, preventing attacks from triggering more resource intensive security
protection and slowing down the FortiGate.
DoS anomalies
Predefined sensors are setup for specific anomalous traffic patterns. New DoS anomalies cannot be added by the user.
The predefined anomalies that can be used in DoS policies are:
tcp_syn_flood If the SYN packet rate of new TCP connections, including 2000 packets per second.
retransmission, to one destination IP address exceeds the
configured threshold value, the action is executed.
tcp_port_scan If the SYN packet rate of new TCP connections, including 1000 packets per second.
retransmission, from one source IP address exceeds the
configured threshold value, the action is executed.
tcp_src_session If the number of concurrent TCP connections from one source 5000 concurrent sessions.
IP address exceeds the configured threshold value, the action
is executed.
tcp_dst_session If the number of concurrent TCP connections to one destination 5000 concurrent sessions.
IP address exceeds the configured threshold value, the action
is executed.
udp_flood If the UDP traffic to one destination IP address exceeds the 2000 packets per second.
configured threshold value, the action is executed.
udp_scan If the UDP sessions setup rate originating from one source IP 2000 sessions per second.
address exceeds the configured threshold value, the action is
executed.
udp_src_session If the number of concurrent UDP connections from one source 5000 concurrent sessions.
IP address exceeds the configured threshold value, the action
is executed.
udp_dst_session If the number of concurrent UDP connections to one destination 5000 concurrent sessions.
IP address exceeds the configured threshold value, the action
is executed.
icmp_flood If the number of ICMP packets sent to one destination IP 250 packets per second.
address exceeds the configured threshold value, the action is
executed.
icmp_sweep If the ICMP sessions setup rate originating from one source IP 100 sessions per second.
address exceeds the configured threshold value, the action is
executed.
icmp_src_session If the number of concurrent ICMP connections from one source 300 concurrent sessions
IP address exceeds the configured threshold value, the action
is executed.
icmp_dst_session If the number of concurrent ICMP connections to one 1000 concurrent sessions
destination IP address exceeds the configured threshold value,
the action is executed.
ip_src_session If the number of concurrent IP connections from one source IP 5000 concurrent sessions.
address exceeds the configured threshold value, the action is
executed.
ip_dst_session If the number of concurrent IP connections to one destination IP 5000 concurrent sessions.
address exceeds the configured threshold value, the action is
executed.
sctp_flood If the number of SCTP packets sent to one destination IP 2000 packets per second
address exceeds the configured threshold value, the action is
executed.
sctp_scan If the number of SCTP sessions originating from one source IP 1000 packets per second
address exceeds the configured threshold value, the action is
executed.
sctp_src_session If the number of concurrent SCTP connections from one source 5000 concurrent sessions
IP address exceeds the configured threshold value, the action
is executed.
sctp_dst_session If the number of concurrent SCTP connections to one 5000 concurrent sessions
destination IP address exceeds the configured threshold value,
the action is executed.
For thresholds based on the number of concurrent sessions, blocking the anomaly will not allow more than the number of
concurrent sessions to be set as the threshold.
For example, if the period for a particular anomaly is 60 seconds, such as those where the threshold is measured in
concurrent sessions, after the 60 second timer has expired the number of allowed sessions that match the anomaly
criteria is reset to zero. This means that, if you allow 10 sessions through before blocking, after the 60 seconds has
elapsed, another 10 sessions will be allowed. The attrition of sessions from expiration should keep the allowed sessions
from reaching the maximum.
For rate based thresholds, where the threshold is measured in packets per second, the Block action prevents anomalous
traffic from overwhelming the firewall in two ways:
l continuous: Block packets once an anomaly is detected, and continue to block packets while the rate is above the
threshold. This is the default setting.
l periodical: After an anomaly is detected, allow the configured number of packets per second.
For example, if a DoS policy is configured to block icmp_flood with a threshold of 10pps, and a continuous ping is started
at a rate of 20pps for 1000 packets:
l In continuous mode, the first 10 packets are passed before the DoS sensor if triggered, and then the remaining 990
packets are blocked.
l In periodical mode, 10 packets are allowed to pass per second, so 500 packets are blocked in the 50 seconds
during which the ping is occuring.
The actual numbers of passed and blocked packets may not be exact, as fluctuations in the
rates can occur, but the numbers should be close to the defined threshold.
DoS policies
1. Go to Policy & Objects > IPv4 DoS Policy or Policy & Objects > IPv6 DoS Policy and click Create New.
If the option is not visible, enable DoS Policy in Feature Visibility. See Feature visibility on page 2043 for details.
Incoming Interface Enter the interface that the policy applies to.
The quarantine option is only available in the CLI. See Quarantine on page 788 for
information.
l attacker: Block all traffic from the attacker's IP address, and add the
attacker's IP address to the banned user list.
quarantine-expiry Set the duration of the quarantine, in days, hours, and minutes (###d##h##m)
<###d##h##m> (1m - 364d23h59m, default = 5m). This option is available if quarantine is set
attacker.
quarantine-log {enable | Enable/disable quarantine logging (default = disable). This option is available if
disable} quarantine is set attacker.
threshold <integer> The number of detected instances - packets per second or concurrent session
number - that triggers the anomaly action.
Quarantine
Quarantine is used to block any further traffic from a source IP address that is considered a malicious actor or a source of
traffic that is dangerous to the network. Traffic from the source IP address is blocked for the duration of the quarantine,
and the source IP address is added to the banned user list.
The banned user list is kept in the kernel, and used by Antivirus, Data Leak Prevention (DLP), DoS, and Intrusion
Prevention System (IPS). Any policies that use any of these features will block traffic from the attacker's IP address.
The best way to troubleshoot DoS attacks is with Anomaly logs and IPS anomaly debug messages.
1. From the Attacker, launch an icmp_flood with 50pps lasting for 3000 packets.
2. On the FortiGate, configure continuous mode and create a DoS policy with an icmp_flood threshold of 30pps:
config firewall DoS-policy
edit 1
set name icmpFlood
set interface "port1"
set srcaddr "all"
set dstaddr "all"
set service "ALL"
config anomaly
edit "icmp_flood"
set status enable
set log enable
set action block
set threshold 30
next
end
next
end
4. Launch the icmp_flood from a Linux machine. This example uses Nmap:
$ sudo nping --icmp --rate 50 -c 3000 192.168.2.50
SENT (0.0522s) ICMP [192.168.2.205 > 192.168.2.50 Echo request (type=8/code=0) id=8597
seq=1] IP [ttl=64 id=47459 iplen=28 ]
...
Max rtt: 11.096ms | Min rtt: 0.028ms | Avg rtt: 1.665ms
Raw packets sent: 3000 (84.000KB) | Rcvd: 30 (840B) | Lost: 2970 (99.00%)
Nping done: 1 IP address pinged in 60.35 seconds
ip=192.168.2.50 The IP address of the host that triggered the anomaly. It can be either the
client or the server.
For icmp_flood, the IP address is the destination IP address. For icmp_sweep,
it would be the source IP address.
pps=46 The number of packets that had been received when the diagnose command
was executed.
Analysis
msg="anomaly: icmp_flood, At the beginning of the attack, a log is recorded when the threshold of 30pps is
31 > threshold 30 broken.
repeats 28 times The number of packets that has exceeded the threshold since the last time a
log was recorded.
msg="anomaly: icmp_flood, In the second before the log was recorded, 50 packets were detected,
50 > threshold 30 exceeding the configured threshold.
repeats 1497 times The number of packets that has exceeded the threshold since the last time a
log was recorded
An access control list (ACL) is a granular, targeted blocklist that is used to block IPv4 and IPv6 packets on a specified
interface based on the criteria configured in the ACL policy.
On FortiGate models with ports that are connected through an internal switch fabric with TCAM capabilities, ACL
processing is offloaded to the switch fabric and does not use CPU resources. VLAN interfaces that are based on
physical switch fabric interfaces are also supported. Interfaces that are connected through an internal switch fabric
usually have names prefixed with port or lan, such as port1 or lan2; other interfaces are not supported.
The packets will be processed by the CPU when offloading is disabled or not possible, such as when a port on a
supported model does not connect to the internal fabric switch.
ACL is supported on the following FortiGate models:
l 100D, 100E, 100EF, 101E
l 140D, 140D-POE, 140E, 140E-POE
l 1200D, 1500D, 1500DT
Example
To block all IPv4 and IPv6 telnet traffic from port2 to Company_Servers:
Diagnose commands
SSL mirroring allows the FortiGate to decrypt and mirror traffic to a designated port. A new decrypted traffic mirror profile
can be applied to IPv4, IPv6, and explicit proxy firewall policies in both flow and proxy mode. Full SSL inspection must be
used in the policy for the traffic mirroring to occur.
SSL inspection is automatically enabled when you enable a security profile on the policy configuration page.
THIS IS A LEGALLY BINDING AGREEMENT BETWEEN YOU, THE USER AND ITS ORGANIZATION
("CUSTOMER"), AND FORTINET. BEFORE YOU CONTINUE WITH THE TERMS AND CONDITIONS OF THIS
CONTRACT (THE "FEATURE ENABLEMENT") CAREFULLY READ THE TERMS AND CONDITIONS OF THIS
AGREEMENT. BY ENTERING YES, YOU, AS AN AUTHORIZED REPRESENTATIVE ON BEHALF OF CUSTOMER,
CONSENT TO BE BOUND BY AND BECOME A PARTY TO THIS AGREEMENT ("AGREEMENT") AND YOU
REPRESENT THAT YOU HAVE READ AND UNDERSTAND THIS AGREEMENT AND HAVE HAD SUFFICIENT
OPPORTUNITY TO CONSULT WITH COUNSEL, PRIOR TO AGREEING TO THE TERMS HEREIN AND ENABLING
THIS FEATURE. IF YOU HAVE ANY QUESTIONS OR CONCERNS, OR DESIRE TO SUGGEST ANY
MODIFICATIONS TO THIS AGREEMENT, PLEASE CONTACT YOUR FORTINET SUPPORT REPRESENTATIVE TO
BE REFERRED TO FORTINET LEGAL. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, DO NOT CONTINUE WITH THE ACCEPTANCE PROCESS. BY ACCEPTING THE TERMS AND
CONDITIONS HEREIN, CUSTOMER HEREBY AGREES THAT:
1. Customer represents and warrants that Customer, not Fortinet, is engaging this
feature.
2. Customer represents and warrants that Customer has provided the requisite notice(s)
and obtained the required consent(s) to utilize this feature.
3. Customer represents and warrants that Customer will only access data as necessary in
a good faith manner to detect malicious traffic and will put in place processes and
controls to ensure this occurs.
4. Customer represents and warrants that Customer has the right to enable and utilize
this feature, and Customer is fully in compliance with all applicable laws in so doing.
5. Customer shall indemnify Fortinet in full for any of the above certifications being
untrue.
6. Customer shall promptly notify Fortinet Legal in writing of any breach of these Terms
and Conditions and shall indemnify Fortinet in full for any failure by Customer or any
of its employees or representatives to abide in full by the Terms and Conditions above.
7. Customer agrees that these Terms and Conditions shall be governed by the laws of the
State of California, without regards to the choice of laws provisions thereof and
Customer hereby agrees that any dispute related to these Terms and Conditions shall be
resolved in Santa Clara County, California, USA, and Customer hereby consents to
personal jurisdiction in Santa Clara County, California, USA.
Inspection mode is configured on a per-policy basis in NGFW mode. This gives you more flexibility when setting up
different policies.
When configuring a firewall policy, you can select a Flow-based or Proxy-basedInspection Mode. The default setting is
Flow-based.
b. In the Security Profiles section, if no security profiles are enabled, the default SSL Inspection is no-inspection.
c. In the Security Profiles section, if you enable any security profile, the SSL Inspection changes to certificate-
inspection.
To see the HTTP and SSH policy redirect settings when inspection mode is set to proxy using the CLI:
To see the default SSL-SSH policy set to no inspection using the CLI:
config ipsec-keys
edit <spi>
set auth-key <string>
set enc-key <string>
next
end
next
end
end
Command Description
l SHA1: 20 bytes
l SHA256: 32 bytes
l SHA384:48 bytes
l SHA512:84 bytes
If the key is shorter than the required length, it will be padded with zeroes.
l 3DES: 24 bytes
l AES128: 16 bytes
l AES192: 24 bytes
l AES256: 32 bytes
If the key is shorter than the required length, it will be padded with zeroes.
When the global anti-replay option is disabled, the FortiGate does not check TCP flags in packets. The per policy anti-
replay option overrides the global setting. This allows you to control whether or not TCP flags are checked per policy.
To enable the anti-replay option so TCP flags are checked using the CLI:
Advanced policy options can be enabled so that you can configure the options in the GUI.
Advanced policy options are now available when creating or editing a policy in the GUI:
TCP sessions without SYN can now be configured when creating or editing a policy in the GUI:
An anycast IP can be advertised from multiple locations and the router selects a path based on latency, distance, cost,
number of hops, and so on. This technique is widely used by providers to route users to the closest server. Since the IP
is hosted in multiple geographic locations, there is no way to specify one single location to that IP.
Anycast IP address ranges can be bypassed in geo-IP blocking. The ISDB contains a list of confirmed anycast IP ranges
that can be used for this purpose.
When the source or destination is set to geoip, you can enable the geoip-anycast option. Once enabled, IPs where
the anycast option is set to 1 in geoip_db are bypassed in country matching and blocking.
IP addresses have both a physical and registered location in the geography IP database. Sometimes these two locations
are different. The geoip-match command allows users to match an IPv4 address in an firewall policy to its physical or
registered location when a GeoIP is used as a source or destination address. IPv6 policies currently support geography
address objects but do not support geoip-match.
In the following example, the physical location of 220.243.219.10 is CA (Canada), the registered location is CN (China),
and it is not an anycast IP.
Since CA is applied as a destination address and registered location IP matching is enabled, if the destination IP of
the traffic is 220.243.219.10, then the traffic will be blocked because the registered location is CN.
2. Verify that the policy is blocking traffic from the IP address:
# diagnose sniffer packet any icmp 4
interfaces=[any]
filters=[icmp]
5.383798 wan2 in 10.1.100.41 -> 220.243.219.10: icmp: echo request
6.381982 wan2 in 10.1.100.41 -> 220.243.219.10: icmp: echo request
7.382608 wan2 in 10.1.100.41 -> 220.243.219.10: icmp: echo request
^C
3 packets received by filter
0 packets dropped by kernel
Since CA is applied as a destination address and physical location IP matching is enabled, if the destination IP of
the traffic is 220.243.219.10, then the traffic will pass through.
2. Verify that the policy is allowing traffic from the IP address:
# diagnose sniffer packet any icmp 4
interfaces=[any]
filters=[icmp]
5.273985 wan2 in 10.1.100.41 -> 220.243.219.10: icmp: echo request
5.274176 wan1 out 172.16.200.10 -> 220.243.219.10: icmp: echo request
6.274426 wan2 in 10.1.100.41 -> 220.243.219.10: icmp: echo request
6.274438 wan1 out 172.16.200.10 -> 220.243.219.10: icmp: echo request
7.273978 wan2 in 10.1.100.41 -> 220.243.219.10: icmp: echo request
7.273987 wan1 out 172.16.200.10 -> 220.243.219.10: icmp: echo request
^C
6 packets received by filter
0 packets dropped by kernel
By default, unauthenticated traffic is permitted to fall to the next policy. This means that unauthenticated users are only
forced to authenticate against a policy when there are no other matching policies. To avoid this, you can force
authentication to always take place.
Where:
implicitly (default) Implicitly trigger firewall authentication on demand. This is the default setting (and
the behavior in FortiOS 6.0 and earlier).
In the following example, authentication is required; traffic that would otherwise be allowed by the second policy is
instead blocked by the first policy.
You can configure a virtual server with HTTP to HTTPS redirect enabled. When enabled, a virtual server can convert a
client's HTTP requests to HTTPS requests. Through this mandatory conversion, HTTP traffic is converted to
HTTPS traffic. This conversion improves the security of the user network.
You can only enable this feature by using the CLI. After you enable this feature, traffic flows as follows:
l When FortiGate receives an HTTP request for an external IP, such as 10.1.100.201 in the following example,
FortiGate sends an HTTP 303 response back to the original client and redirects HTTP to HTTPS, instead of
forwarding the HTTP request to the real backend servers.
l The client browser restarts the TCP session to HTTPS.
l The HTTPS session comes to the FortiGate where a matching firewall policy allows the HTTPS traffic and
establishes a secure SSL connection, and then forwards the request to the real backend servers.
Active Directory (AD) groups can be used directly in identity-based firewall policies. You do not need to add remote AD
groups to local FSSO groups before using them in policies.
FortiGate administrators can define how often group information is updated from AD LDAP servers.
To use this feature, you must set FSSO Collector Agent to Advanced AD access mode. If the FSSO Collector Agent is
running in the default mode, FortiGate cannot correctly match user group memberships.
Create the FSSO collector that updates the AD user groups list
10. Set the Interval (minutes) to configure how often the FortiGate contacts the remote AD LDAP server to update the
group information.
You can view the retrieved AD user groups with the show user adgrp command.
The AD user groups retrieved by the FortiGate can be used directly in firewall policies.
Explicit proxy communication to FortiGate Cloud and FortiGuard servers from FortiGate is enabled. A proxy server can
be configured in the FortiGuard settings so that all FortiGuard connections under the forticldd process can be
established through the proxy server.
Not all FortiGuard services are supported by these proxy settings. For example, web filter
service traffic to FortiGuard will not be directed to the configured proxy.
To configure a proxy server and communicate with FortiGate Cloud though it:
5. On FortiGate A, view the forticldd debug message to see the connection to the log controller through the proxy
server:
# diagnose test application forticldd 1
No session timeout
To allow clients to permanently connect with legacy medical applications and systems that do not have keepalive or
auto-reconnect features, the session timeout can be set to never for firewall services, policies, and VDOMs.
The options to disable session timeout are hidden in the CLI.
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ vlan_cos=0/255
state=log may_dirty f00
statistic(bytes/packets/allow_err): org=2290/42/1 reply=2895/34/1 tuples=2
tx speed(Bps/kbps): 238/1 rx speed(Bps/kbps): 301/2
orgin->sink: org pre->post, reply pre->post dev=18->17/17->18 gwy=172.16.200.55/10.1.100.41
hook=post dir=org act=snat 10.1.100.41:34256->172.16.200.55:23(172.16.200.10:34256)
hook=pre dir=reply act=dnat 172.16.200.55:23->172.16.200.10:34256(10.1.100.41:34256)
pos/(before,after) 0/(0,0), 0/(0,0)
misc=0 policy_id=9 auth_info=0 chk_client_info=0 vd=1
serial=00000b27 tos=ff/ff app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id = 00000000 ngfwid=n/a
dd_type=0 dd_mode=0
npu_state=0x000001 no_offload
no_ofld_reason: disabled-by-policy
total session 1
MAP-E support
On a customer edge (CE) FortiGate, an IPv4-over-IPv6 (MAP-E) tunnel can be created between the FortiGate and the
border relay (BR) operating in an IPv6 network. A tunnel interface is created between the FortiGate and BR, which can
be applied to firewall policies and IPsec VPN.
end
next
end
The interface-identifier is an IPv6 address. Its last 64-bit will be kept and the rest will be cleared
automatically. It will combine with the IPv6 prefix it gets from the IPv6 router to generate the IPv6 address of the
interface.
By default, unique-autoconf-addr is disabled. It must be enabled so it can handle IPv6 prefix changing.
b. Configure the VNE tunnel:
config system vne-tunnel
set status enable
set interface "wan1"
set mode fixed-ip
set ipv4-address 10.10.81.81 255.255.255.0
set br 2001:160::82
set update-url "http://qa.forosqa.com/update?user=xxxx&pass=yyyy"
end
Once the IPv6 address of the FortiGate changes, the tunnel will be down because the BR does not know the
FortiGate's new IPv6 address. The FortiGate uses update-url to update the new IPv6 address to the provisioning
server. The provisioning server updates the FortiGate’s IPv6 address to the BR so the VNE tunnel can be re-
established.
Communication sequence overview of re-establishing VNE tunnel:
The FortiGate sends a MAP rule request to the MAP distribution server once the IPv6 address is configured on the
FortiGate by RS/RA. Next, the FortiGate will send an AAAA query to get the IPv6 address of the MAP distribution
server. After sending the BMR request to the MAP distribution server, the FortiGate will get the IPv4 address, port
set, BR IPv6 address, and hostname of the address resolution server from the BMR reply. The VNE tunnel between
the FortiGate and BR is now established.
The address resolution server is actually a dynamic DNS. The hostname is used for the FortiGate to maintain an
IPv6 address when it changes.
The FortiGate updates the DDNS server with its IPv6 address whenever it updates, which in turn provides the
update to the MAP distribution server and BR so they know how to resolve the FortiGate by hostname.
Once the VNE tunnel is established, a tunnel interface is created (vne.root), and an IPv4-over-IPv6 tunnel is set
up between the FortiGate and BR. The route, firewall policy, and DNS server can now be configured to let the traffic
go through the VNE tunnel and the and protect the end-user. The VNE tunnel can also be used in IPsec phase 1.
3. Configure the route:
config router static
edit 1
set device "vne.root"
next
end
Instead of storing a single number for the hit count and byte count collected since the inception of each policy, seven
numbers for the last seven days and an active counter for the current day are stored. The past seven-day hit count is
displayed in the policy list and policy pages. A seven-day bar chart shows statistics on each policy page. This feature is
currently supported in firewall and multicast policies, but not security policies.
3. Click Edit. The policy traffic statistics appear in the right-hand side of the page.
4. Use the dropdowns to filter the bar graph data by counter (Bytes, Packets, or Hit Count) and policy type (IPv4, IPv6,
or IPv4 + IPv6).
5. Optionally, click Clear Counters to delete the traffic statistics for the policy.
6. Click OK.
The FortiGate can read the Cisco Security Group Tag (SGT) in Ethernet frames, and use them as matching criteria in
firewall policies. A policy can match based on the presence of an SGT, or the detection of a specific ID or IDs.
When a packet with a SGT passes through and a session is established, the ext_header_type=0xc5:0xc5 flag is
included in the session table.
This feature is available in flow mode policies for virtual wire pair policies or policies in transparent mode VDOMs.
Examples
In these examples, port2 and port5 are in a virtual wire pair. Firewall policies are created that pass traffic with SGTs with
a specific ID number, any ID number, or either of two specific ID numbers.
To configure a firewall policy to match frames that have an SGT with ID 20 and allow them through:
To configure a firewall policy to match frames that have an SGT with any ID:
To configure a firewall policy to match frames that have the SGT with IDs 20 or 21:
Multiple NAT46 and NAT64 related objects are consolidated into regular objects. A per-VDOM virtual interface,
naf.<vdom>, is automatically added to process NAT46/NAT64 traffic. The features include:
l vip46 and vip64 settings are consolidated in vip and vip6 configurations.
l policy46 and policy64 settings are consolidated in firewall policy settings.
l nat46/nat64 are included in firewall policy settings.
l ippool and ippool6 support NAT46 and NAT64 (when enabled, the IP pool should match a subnet).
l Central SNAT supports NAT46 and NAT64.
l add-nat46-route in ippool6 and add-nat64-route in ippool are enabled by default. The FortiGate
generates a static route that matches the IP range in ippool6 or ippool for the naf tunnel interface.
Automatic processing of the naf tunnel interface is not supported in security policies.
To configure NAT46/NAT64 translation, use the standard vip/vip6 setting, apply it in a firewall policy, enable
NAT46/NAT64, and enter the IP pool to complete the configuration.
The external IP address cannot be the same as the external interface IP address.
Examples
IPv6 must be enabled to configure these examples. In the GUI, so go to System > Feature Visibility and enable IPv6. In
the CLI, enter the following:
config system global
set gui-ipv6 enable
end
NAT46 policy
In this example, a client PC is using IPv4 and an IPv4 VIP to access a server that is using IPv6. The FortiGate uses
NAT46 to translate the request from IPv4 to IPv6 using the virtual interface naf.root. An ippool6 is applied so that the
request is SNATed to the ippool6 address (2000:172:16:101::1 - 2000:172:16:101::1).
Name test-vip46-1
Interface To_vlan20
c. Click OK.
2. Configure the IPv6 pool:
a. Go to Policy & Objects > IP Pools and click Create New.
b. Enter the following:
Name test-ippool6-1
NAT46 Enable
c. Click OK.
3. Configure the firewall policy:
a. Go to Policy & Objects > Firewall Policy and click Create New or edit an existing policy.
b. Enter the following:
Name policy46-1
Source all
Destination test-vip46-1
Schedule always
Service ALL
Action ACCEPT
NAT NAT46
d. Click OK.
The IPv4 session is between the incoming physical interface port24 and naf.root. The IPv6 session is between the
naf.root and the outgoing physical interface port17.
NAT64 policy
In this example, a client PC is using IPv6 and an IPv6 VIP to access a server that is using IPv4. The FortiGate uses
NAT64 to translate the request from IPv6 to IPv4 using the virtual interface naf.root. An ippool is applied so that the
request is SNATed to the ippool address (172.16.101.2 - 172.16.101.3).
An embedded VIP64 object is used in this configuration so a specific IPv4 mapped IP does not need to be set. The lower
32 bits of the external IPv6 address are used to map to the IPv4 address. Only an IPv6 prefix is defined. In this example,
the IPv6 prefix is 2001:10:1:100::, so the IPv6 address 2001:10:1:100::ac10:c89c will be translated to 172.16.200.156.
Name test-vip64-1
c. Click OK.
Name test-vip64-2
c. Click OK.
3. Configure the IP pool:
a. Go to Policy & Objects > IP Pools and click Create New.
b. Enter the following:
Name test-ippool4-1
Type Overload
NAT64 Enable
c. Click OK.
Name policy64-1
Source all
Destination test-vip64-1
test-vip64-2
Schedule always
Service ALL
Action ACCEPT
NAT NAT64
d. Click OK.
20.578495 naf.root out 2000:10:1:100::41 -> 2000:10:1:100::150: icmp6: echo request seq
1
20.578497 naf.root in 172.16.101.2 -> 172.16.200.156: icmp: echo request
20.578854 port17 out 172.16.101.2 -> 172.16.200.156: icmp: echo request
20.579083 port17 in 172.16.200.156 -> 172.16.101.2: icmp: echo reply
20.579093 naf.root out 172.16.200.156 -> 172.16.101.2: icmp: echo reply
20.579095 naf.root in 2000:10:1:100::150 -> 2000:10:1:100::41: icmp6: echo reply seq 1
20.579377 port24 out 2000:10:1:100::150 -> 2000:10:1:100::41: icmp6: echo reply seq 1
11 packets received by filter
0 packets dropped by kernel
npu_state=0x000001 no_offload
no_ofld_reason: disabled-by-policy
total session 1
The IPv6 session is between the incoming physical interface port24 and naf.root. The IPv4 session is between the
naf.root and the outgoing physical interface port17.
3. Verify the embedded VIP64 traffic by the sniffer packets:
(root) # diagnose sniffer packet any 'icmp or icmp6' 4
interfaces=[any]
filters=[icmp or icmp6]
7.696010 port24 in 2000:10:1:100::41 -> 2001:10:1:100::ac10:c89c: icmp6: echo request
seq 1
7.696057 naf.root out 2000:10:1:100::41 -> 2001:10:1:100::ac10:c89c: icmp6: echo request
seq 1
7.696060 naf.root in 172.16.101.2 -> 172.16.200.156: icmp: echo request
7.696544 port17 out 172.16.101.2 -> 172.16.200.156: icmp: echo request
7.696821 port17 in 172.16.200.156 -> 172.16.101.2: icmp: echo reply
7.696839 naf.root out 172.16.200.156 -> 172.16.101.2: icmp: echo reply
7.696841 naf.root in 2001:10:1:100::ac10:c89c -> 2000:10:1:100::41: icmp6: echo reply
seq 1
7.697167 port24 out 2001:10:1:100::ac10:c89c -> 2000:10:1:100::41: icmp6: echo reply seq
1
11 packets received by filter
0 packets dropped by kernel
Objects
Specific IP addresses or ranges can be subtracted from the address group with the Exclude Members setting in IPv4
address groups.
This feature is only supported for IPv4 address groups, and only for addresses with a Type of
IP Range or Subnet.
l Firewall
l Virtual wire pair
l ACL
l Central SNAT
l DoS
A MAC address is a link layer-based address type and it cannot be forwarded across different IP segments. In FortiOS,
you can configure a firewall address object with a singular MAC, wildcard MAC, multiple MACs, or a MAC range.
FortiOS only supports the MAC address type as source address for policies in NAT mode VDOM. When you use the
MAC address type in a policy as source address in NAT mode VDOM, IP address translation (NAT) is still performed
according to the rules defined in the policy. The MAC address type only works for source address matching. It does not
have any association with NAT actions.
For policies in transparent mode or the virtual wire pair interface, you can use the MAC address type as source or
destination address.
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. Enter a name.
3. For Category, select Address.
4. For Type, select Device (MAC Address).
5. Enter the MAC address.
6. Click OK.
7. Go to Policy & Objects > Firewall Policy to apply the address type to a policy in NAT mode VDOM:
a. For Source, select the MAC address you just configured.
b. For Destination, select an address.
In NAT mode VDOM, this address type cannot be used as destination address.
2. Apply the address type to a policy. In transparent mode or the virtual wire pair interface, this address type can be
mixed with other address types in the policy:
config firewall policy
edit 1
set srcintf "port2"
set dstintf "port1"
set srcaddr "test-mac-addr1" "10-1-100-42"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set logtraffic all
set nat enable
next
end
The Internet Service Database (ISDB) includes well-known vendor MAC address range lists. The lists can only be used
for source MAC addresses in IPv4 policies, and include the vendor name and the MAC address ranges that the vendor
belongs to.
# diagnose vendor-mac id
Please input Vendor MAC ID.
ID: 1 name: "Asus"
ID: 2 name: "Acer"
ID: 3 name: "Amazon"
ID: 4 name: "Apple"
ID: 5 name: "Xiaomi"
ID: 6 name: "BlackBerry"
ID: 7 name: "Canon"
ID: 8 name: "Cisco"
ID: 9 name: "Linksys"
ID: 10 name: "D-Link"
ID: 11 name: "Dell"
ID: 12 name: "Ericsson"
ID: 13 name: "LG"
ID: 14 name: "Fujitsu"
ID: 15 name: "Fitbit"
ID: 16 name: "Fortinet"
ID: 17 name: "OPPO"
# diagnose vendor-mac id 16
Vendor MAC: 16(Fortinet)
Version: 0000700021
Timestamp: 201908081432
Number of MAC ranges: 6
00:09:0f:00:00:00 - 00:09:0f:ff:ff:ff
04:d5:90:00:00:00 - 04:d5:90:ff:ff:ff
08:5b:0e:00:00:00 - 08:5b:0e:ff:ff:ff
70:4c:a5:00:00:00 - 70:4c:a5:ff:ff:ff
90:6c:ac:00:00:00 - 90:6c:ac:ff:ff:ff
e8:1c:ba:00:00:00 - e8:1c:ba:ff:ff:ff
Only packets whose source MAC address belong to Fortinet or VMware are passed by the policy.
The dynamic address group represents the configured IP addresses of all Fortinet devices connected to the Security
Fabric. It currently includes FortiManager, FortiAnalyzer, FortiClient EMS, FortiMail, FortiAP(s), and FortiSwitch(es).
Like other dynamic address groups for fabric connectors, it can be used as an IPv4 address in firewall policies and
objects.
The list of firewall addresses includes a default address object called FABRIC_DEVICE. You can apply the FABRIC_
DEVICE object to the following types of policies:
l Firewall policy, including virtual wire pairs, NAT 46, and NAT 64 (IPv4 only)
l IPv4 shaping policy
l IPv4 ACL policy
You cannot apply the FABRIC_DEVICE object to the following types of policies:
l IPv4 explicit proxy policy
You also cannot use the FABRIC_DEVICE object with the following settings:
l Custom extension on internet-service
l Exclusion of addrgrp
Initially the FABRIC_DEVICE object does not have an address value. The address value is populated dynamically as
things change. As a result, you cannot edit the FABRIC_DEVICE object, add any addresses to the object, or remove any
addresses from the object. The Edit Address pane in the GUI only has a Return button because the object is read-only:
Diagnose command
You can use the diagnose command to list IP addresses of Fortinet devices that are configured in the Security Fabric.
FabricDevices: 172.18.64.48
FortiAnalyzer: 172.18.60.25
FortiSandbox: 172.18.52.154
FortiManager: 172.18.28.31
FortiClientEMS: 172.18.62.6
FortiAP:
FortiSwitch:
FortiAP/SW-DHCP:
The Fortinet Single Sign-ON (FSSO) dynamic firewall address subtype can be used in policies that support dynamic
address types. The FortiGate will update the dynamic address used in firewall policies based on the source IP
information for the authenticated FSSO users.
It can also be used with FSSO group information that is forwarded by ClearPass Policy Manager (CPPM) via
FortiManager, and other FSSO groups provided by the FSSO collector agent or FortiNAC.
To configure FSSO dynamic addresses with CPPM and FortiManager in the GUI:
In the address table, there will be an error message for the address you just created (Unresolved dynamic
address: fsso). This is expected because there are currently no authenticated FSSO users (based on source
IP) in the local FSSO user list.
2. Add the dynamic address object to a firewall policy:
a. Go to Policy & Objects > Firewall Policy.
b. Create a new policy or edit an existing policy.
c. For Source, add the dynamic FSSO address object you just created.
d. Configure the rest of the policy as needed.
3. Test the authentication to add a source IP address to the FSSO user list:
a. Log in as user and use CPPM for user authentication to connect to an external web server. After successful
authentication, CPPM forwards the user name, source IP address, and group membership to the FortiGate via
FortiManager.
b. Go to Monitor > Firewall User Monitor to view the user name (fsso1) and IP address.
c. Go to Policy & Objects > Addresses to view the updated address table. The error message no longer appears.
d. Hover over the dynamic FSSO address to view the IP address (fsso resolves to: 10.1.100.185).
l If another user is authenticated by CPPM, then the dynamic address fsso entry in the address table will be
updated. The IP address for user fsso2 (10.1.100.188) is now visible:
2. Go to FortiView > Sources to verify that the users were able to successfully pass the firewall policy.
If a user logs off and CPPM receives log off confirmation, then CPPS updates the FortiGate
FSSO user list via FortiManager. The user IP address is deleted from the dynamic FSSO
address, and the user is no longer be able to pass the firewall policy.
To configure FSSO dynamic addresses with CPPM and FortiManager in the CLI:
ClearPass Policy Manager (CPPM) can gather information about the statuses of network hosts, for example, the latest
patches or virus infections. Based on this information, CPPM send the IP addresses and current states, such as Healthy
or Infected, to the FortiGate.
On the FortiGate, the IP addresses received from CPPM are added to a dynamic firewall address with the clearpass-spt
subtype. This address can be used in any policy that supports dynamic addresses, such as Firewall or SSL-VPN
policies.
In this example, you create two dynamic IP addresses that are used in two firewall policies (deny and allow). One policy
allows traffic (host state = Healthy), and the other denies traffic (host state = Infected). When CPPM sends the
information, the IP addresses are assigned according to their host state: Healthy or Infected.
You can then verify that traffic from the Infected host is denied access by the deny policy, and traffic from the Healthy
host is allowed access by the allow policy.
A REST API administrator is required to generate an authorization token for REST API messages, and to limit hosts that
can send REST API messages to the FortiGate.
For this example, an administrator profile called clearpass was created with full read/write access. See
Administrator profiles on page 1850 for details.
6. Click OK.
The New API key pane opens.
The API key is the REST API authorization token that is used in REST API messages sent by CPPM to the
FortiGate.
7. Copy the API key to a secure location. A new key can be generated if this one is lost or compromised.
8. Click Close.
Two dynamic IP addresses are required, one for the allow policy, and the other for the deny policy.
Two firewall policies are required, one to accept traffic (cppm-allow), and the other to deny traffic (cppm-deny).
Verification
Go to Log & Report > Forward Traffic to review traffic logs and ensure that traffic is allowed or denied as expected.
To verify that FortiGate addresses are assigned correctly, enter the following:
# diagnose firewall dynamic list
List all dynamic addresses:
cppm-deny: ID(141)
ADDR(10.1.100.188)
cppm: ID(176)
ADDR(10.1.100.185)
ADDR(10.1.100.186)
Address objects from external connectors that are learned by FortiManager are synchronized to FortiGate. These
objects can be grouped together with the FortiGate CLI to simplify selecting connector objects in the FortiGate GUI.
Multiple groups can be created.
This option is only available for objects that are synchronized from FortiManager.
Example
In this example, objects learned by the FortiManager from an Aruba ClearPass device are synchronized to the FortiGate.
Some of the objects are then added to a group called ClearPass to make them easier to find in the object list when
creating a firewall policy.
Prior to being grouped, the synchronized objects are listed under the FortiManager heading in the object lists.
You can use wildcard FQDN addresses in firewall policies. IPv4, IPv6, ACL, local, shaping, NAT64, NAT46, and NGFW
policy types support wildcard FQDN addresses.
For wildcard FQDN addresses to work, the FortiGate should allow DNS traffic to pass through.
Initially, the wildcard FQDN object is empty and contains no addresses. When the client tries to resolve a FQDN
address, the FortiGate will analyze the DNS response. The IP address(es) contained in the answer section of the DNS
response will be added to the corresponding wildcard FQDN object. It is therefore necessary to have the DNS session-
helpers defined in the config system session-helper setting.
Since FortiGate must analyze the DNS response, it does not work with DNS over HTTPS.
In FortiOS 7.0 and later, FortiGate supports DNS over TLS. It is possible to analyze DNS responses sent over DoT, as
long as there is a firewall policy that allows the DNS traffic from the client and is configured with a DNS filter that supports
DoT. For information on configuring this, see DNS inspection with DoT and DoH on page 1120.
When the wildcard FQDN gets the resolved IP addresses, FortiOS loads the addresses into the firewall policy for traffic
matching.
The FortiGate will keep the IP addresses in the FQDN object table as long as the DNS entry itself has not expired. Once
it expires, the IP address is removed from the wildcard FQDN object until another query is made. At any given time, a
single wildcard FQDN object may have up to 1000 IP addresses.
The DNS expiry TTL value is set by the authoritative name server for that DNS record. If the
TTL for a specific DNS record is very short and you would like to cache the IP address longer,
then you can extend it with the CLI. See To extend the TTL for a DNS record in the CLI: on
page 847
Wildcard FQDN IPs are synchronized to other autoscale members whenever a peer learns of
a wildcard FQDN address.
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. Specify a Name.
3. For Type, select FQDN.
5. Click OK.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. For Destination, select the wildcard FQDN.
3. Configure the rest of the policy as needed.
4. Click OK.
To use the diagnose command to list resolved IP addresses of wildcard FQDN objects:
Alternatively:
# diagnose test application dnsproxy 6
worker idx: 0
vfid=0 name=*.fortinet.com ver=IPv4 min_ttl=3266:0, cache_ttl=0 , slot=-1, num=3,
wildcard=1
96.45.36.159 (ttl=68862:68311:68311) 192.168.100.161 (ttl=3600:3146:3146)
65.39.139.161
(ttl=3600:3481:3481)
To use the diagnose command for firewall policies which use wildcard FQDN:
In this the example the set cache-ttl value has been extended to 3600 seconds.
config firewall address
edit "fortinet.com"
set type fqdn
set fqdn "www.fortinet.com”
set cache-ttl 3600
next
end
1. Go to Policy & Objects > Virtual IPs and click Create New > Virtual IP.
2. Enter a name for the VIP.
3. Select an interface.
4. For Type, select FQDN.
5. For External, select IP and enter the external IP address.
7. Click OK.
In the virtual IP list, hover over the address to view more information.
VIP groups
Virtual IP addresses (VIPs) can be organized into groups. This is useful in scenarios where there are multiple VIPs that
are used together in firewall policies. If the VIP group members change, or a group member's settings change (such as
the IP address, port, or port mapping type), then those changes are automatically updated in the corresponding firewall
policies.
The following table summarizes which VIP types are allowed and not allowed to be members of a VIP group:
Group type VIP types allowed as members VIP types not allowed as members
1. Go to Policy & Objects > Virtual IPs and click Create New > Virtual IP Group.
2. Set the Type to IPv4 or IPv6.
3. Enter a name.
4. Optionally, enter additional information in the Comments field.
5. For IPv4 groups, select the Interface. Select a specific interface if all of the VIPs are on the same interface;
otherwise, select any.
6. Click the + in the Members field and select the members to add to the group.
7. Click OK.
Geography-based IPv6 addresses can be created and applied to IPv6 firewall policies.
8. Click OK.
Some address objects logically belong to the same device, such as two IPs from the same computer. These address
objects can be grouped into an address folder, which is an exclusive list of address objects that do not appear in other
address groups or folders.
In the CLI, the folder type can be set after the member list is already populated. If the member list contains an
incompatible entry, then the setting will be discarded when the next/end command is issued. If the folder type is set
before the member list is populated, then the possible member entry list will be filtered according to the selected type.
5. Click OK.
6. In the address table, expand the Address Group section to view the folder (dev1-addr-comb). The expandable
folder view shows the address folder's child objects:
Users can define IPv6 MAC addresses that can be applied to the following policies:
l Firewall
l Virtual wire pair
l ACL/DoS
l Central NAT
l NAT64
l Local-in
In FortiOS, you can configure a firewall address object with a singular MAC, wildcard MAC, multiple MACs, or a MAC
range. In this example, a firewall policy is configured in a NAT mode VDOM with the IPv6 MAC address as a source
address.
IPv6 MAC addresses cannot be used as destination addresses in VDOMs when in NAT
operation mode.
f. Click OK.
2. Configure the policy:
a. Go to Policy & Objects > Firewall Policy and click Create New.
b. For Source, select the IPv6 MAC address object.
c. Configure the other settings as needed.
d. Click OK.
The FortiNAC tag dynamic firewall address type is used to store the device IP, FortiNAC firewall tags, and FortiNAC
group information sent from FortiNAC by the REST API when user logon and logoff events are registered.
In the following example, the user connecting to the network will be required to first log on to the FortiNAC. When the
login succeeds, the logon information is synchronized to the FortiGate using the REST API. The FortiGate updates the
dynamic firewall address object with the user and IP information of the user device. This firewall address is used in
firewall policies to dynamically allow network access for authenticated users, thereby allowing SSO for the end user.
3. Go to Policy & Objects > Firewall Policy and click Create New or edit an existing policy. FortiNAC tag dynamic
firewall address an be used as source or destination addresses.
4. Configure the settings as needed, then click OK. In this policy, traffic can only pass if it originates from any of the
mapped IP addresses (10.1.100.184 and 10.1.100.185); other traffic cannot pass.
5. Hover over the address in the policy, then in the tooltip, click View Matched Addresses.
The firewall policy was automatically updated so that traffic from 10.1.100.184 can no longer pass, and only traffic
from 10.1.100.185 can pass.
Protocol options
Firewall policies contain a Protocol Options field that defines the parameters for handling protocol-specific traffic.
Multiple protocol options profiles can be configured in FortiOS since the requirements may differ between policies. A
single protocol options profile is applied per policy, but the profile can be used in multiple policies.
To create a protocol options profile, go to Policy & Objects > Protocol Options. The following settings can be configured.
Enable this option to log the occurrence of oversized files being processed. This does not change how they are
processed. It only allows the FortiGate to log that they were either blocked or allowed through.
It is common practice to allow larger files through without antivirus processing. Monitor the logs for the frequency of
oversized file processing to determine whether or not to alter the settings for treating oversized files. The threshold
setting for oversized files and emails is located in the Common Options section.
This protocol is used by Microsoft Exchange Servers to perform virus scanning on emails that use RPC over HTTP.
To optimize the FortiGate’s resources, the mapping and inspection of the following protocols can be enabled or disabled:
Each protocol has a default TCP port. The ports can be modified to inspect any port with flowing traffic. The packet
headers indicate which protocol generated the packet.
Common options
The Comfort Clients and Block Oversized File/Email options apply to multiple protocols.
Comfort clients
When proxy-based antivirus scanning is enabled, the FortiGate buffers files as they are downloaded. Once the entire file
is captured, the FortiGate begins scanning the file. The user must wait during the buffering and scanning procedure.
After the scan is completed and if no infection is found, the file is sent to the next step in the process flow. If the file is
large, this part of the process can take some time. In some cases, enough time that some users may get impatient and
cancel the download.
The Comfort Clients option mitigates this potential issue by feeding a trickle of data while waiting for the scan to
complete. The user is aware that processing is taking place, and that there has not been a failure in the transmission.
The slow transfer rate continues until the antivirus scan is complete. The transfer will proceed at full speed once the file is
scanned successfully and does not contain any viruses.
If there is evidence of an infection, the FortiGate caches the URL and drops the connection. The client does not receive
any notification of what happened because the download to the client has already started. Instead, the download stops
and the user is left with a partially downloaded file. If the user tries to download the same file again within a short period
of time, the cached URL is matched and the download is blocked. A notification is displayed that the download was
blocked. The number of URLs in the cache is limited by the size of the cache.
Client comforting is available for HTTP and FTP traffic. If the FortiGate supports SSL content scanning and inspection,
client comforting can be configured for HTTPS and FTPS traffic.
Buffering the entire file allows the FortiGate to eliminate the danger of missing an infection due
to fragmentation because the file is reassembled before examination. This buffering is
performed whenever the Comfort Clients option is disabled.
Client comforting can send unscanned and potentially infected content to the client, so only
enable this option if you are prepared to accept this risk. Keeping the client comforting interval
high and the amount low will reduce the amount of potentially infected data that is
downloaded.
This option is related to antivirus scanning. The FortiGate has a finite amount of resources to buffer and scan a file. If a
large file (such as an ISO image or video file) is downloaded, this could overwhelm or exceed the FortiGate’s memory,
especially if other large files are being downloaded at the same time.
A threshold is assigned to identify an oversize file or email. The default is 10 MB. The range varies per model, and the
minimum is 1 MB. Any file or email over this threshold will not be processed by policies applying the antivirus security
profile.
If the FortiGate enters conserve mode on a regular basis, lowering the threshold can lessen
the impact of processing the files on memory. This can increase risk, even though malware is
more likely to be in smaller files.
Web options
Chunked bypass
Chunked bypass is a mechanism in HTTP 1.1 that allows a web server to start sending chunks of dynamically generated
output in response to a request before actually knowing the actual size of the content. For dynamically generated
content, enabling chunked bypass speeds up the initial response to HTTP requests, but the content is not held in the
proxy as an entire file before proceeding.
Email options
The Allow Fragmented Messages and Append Signature (SMTP) options apply to email protocols.
The specifications of RFC 2046 allow for the breaking up of emails and sending the fragments in parallel to be rebuilt and
read at the other end by the mail server. It was originally designed to increase the performance over slower connections
where larger email messages were involved. Feasibility of using this function depends on the mail configuration. Outside
of Microsoft Outlook, not many email clients are set up to break up messages like this. The drawback of this feature is
that if malware is broken up between multiple fragments of the message, there is a risk that it will not be detected by
some antivirus configurations because all the code may not be present at the same time to identify the malware.
Append signature
This option adds a plain text email signature to SMTP email messages as they pass through the FortiGate. The message
maximum is 1023 characters.
This feature works best in an environment where there is some standardization of what goes into the senders' personal
signatures so that there is no duplication or contradiction of information. For example:
l This email should not be forwarded without prior approval.
l Please consider the environment before printing this email.
l For questions regarding purchasing our products, please call ...
Traffic shaping
A FortiGate provides quality of service (QoS) by applying bandwidth limits and prioritization to network traffic. Traffic
shaping is one technique used by the FortiGate to provide QoS. A basic approach to traffic shaping is to prioritize higher
priority traffic over lower priority traffic during periods of traffic congestion. This provides a stabilizing effect for important
traffic while throttling less important traffic.
The FortiGate can be configured to deliver traffic shaping with policing or traffic shaping with queuing. The general
difference between the two is as follows:
Technique Description
Traffic shaping with policing When traffic exceeds the configured bandwidth limits, traffic is dropped.
Traffic shaping with queuing When traffic exceeds the configured bandwidth limits, traffic is delayed for
transport until bandwidth frees up. Traffic may be dropped if the queues are full.
Policing and queuing can both prioritize traffic and deliver guaranteed bandwidth and maximum bandwidth by setting
bandwidth limits. The implementation differs though, since queuing uses queues, and policing does not. In queuing,
before a packet egresses an interface, it is first enqueued to a queue using an algorithm such as RED or FIFO. The
kernel dequeues the packet based on the HTB algorithm before sending it out. In policing, traffic simply drops if it is over
the allocated bandwidth.
The following topics provide information about configuring traffic shaping:
Configuration methods
There are different methods to configure traffic shaping on the FortiGate. The following table lists the methods and their
capabilities in order of preference. If all three methods are configured, the first will be preferred over the second, which is
preferred over the third.
*
Traffic shaping profiles are configured as either policing or queuing types. Queuing allows for additional options when
configuring a shaping class entry.
The features of each method’s implementation are slightly different. The following is a brief summary of the traffic
policing features and the approach each method takes.
Traffic prioritization
The FortiGate can place packets into different priority levels in order to prioritize certain traffic over others.
Method Description
Traffic shaping profile Traffic is placed into classes. A total of 30 classes are available. For each class,
traffic can be configured into five priority levels.
Traffic shaper Traffic can be prioritized into the high (2), medium (3), or low (4) levels. When
traffic is below the guaranteed bandwidth of the shaper, the traffic is automatically
applied the critical level (1).
Global traffic prioritization Traffic is prioritized into high (2), medium (3), or low (4) based on ToS (type of
service) or DSCP.
The general purpose for configuring guaranteed bandwidth is to allocate a certain proportion of the total outbandwidth to
guarantee transport for a certain type of traffic. This is configured and handled differently in each method.
A traffic shaping profile, when applied to an interface’s egress shaping profile, can be configured to use up to 100% of
the interface’s configured bandwidth between all the classes. It does not matter what priority is configured in each class.
The guaranteed bandwidth is always honored.
Traffic shapers, however, do not have a hard limit on the guaranteed bandwidth. Administrators need to be aware how
much guaranteed bandwidth has been allocated to all their traffic shapers, so that they do not exceed the total
outbandwidth of an interface. Traffic under the guaranteed bandwidth of a traffic shaper is given a priority of one. If the
total traffic with priority one exceeds the total outbandwidth, traffic can be dropped.
The maximum bandwidth limit caps the maximum bandwidth that can be used. This is configured as a percentage of the
outbandwidth in a traffic shaping profile. It is configured as a rate for traffic shapers.
Configuring outbandwidth
Traffic shaping is generally configured for egress traffic leaving the FortiGate. Therefore, it is necessary for the interface
outbandwidth to be defined for traffic prioritization to take place in all of the traffic shaping configuration methods.
Interface outbandwidth is also needed when defining the guaranteed and maximum bandwidth in a traffic shaping
profile.
For traffic shapers, configuring outbandwidth is not necessary to apply maximum bandwidth limits; however,
outbandwidth is necessary for guaranteed bandwidth. Traffic under the guaranteed bandwidth limit on a traffic shaper is
given priority 1. If outbandwidth is not configured, traffic prioritization does not take place and the priority is meaningless.
Traffic shaping profiles and traffic shapers are methods of policing traffic. Traffic shaping policies are used to map traffic
to a traffic shaper or assign them to a class.
A traffic shaping policy is a rule that matches traffic based on certain IP header fields and/or upper layer criteria. For
example, it can match traffic based on source and destination IP, service, application, and URL category. One common
use case is to match traffic based on the ToS or DS (differentiated services) field in the IP header. This allows Type of
Service or Differentiated Services (DiffServ) tags to be read from traffic from a downstream device and prioritized
accordingly on the FortiGate.
DSCP matching and DSCP marking can be performed on a firewall shaping policy and a regular firewall policy. DSCP
matching is used to match DSCP tags from ingress traffic, and DSCP marking is used to change the DSCP tag on
egress traffic.
In a firewall shaping policy and regular firewall policy, use the tos and tos-mask fields to perform DSCP matching. Use
the diffserv-forward and diffserv-reverse fields to perform DSCP marking.
As mentioned in Traffic shaping on page 860, traffic shaping starts with the traffic shaping policy. Traffic shaping policies
are used to map traffic to a traffic shaper or assign them to a class. Traffic is then shaped by the shaper or the shaping
profile that is applied on an interface.
Traffic can also be shaped by applying traffic shapers directly on a firewall policy. However, this legacy approach can
only be configured from the CLI, and is not a preferred method for applying traffic shaping. As the number of firewall
policies increases, managing shaping on each individual policy becomes increasingly difficult. For the same reason, it is
also not recommended to mix the legacy approach with traffic shaping policies to avoid the added complexity.
Overview
A traffic shaping policy is a rule that matches traffic based on certain IP header fields and/or upper layer criteria. When
traffic hits the firewall, the FortiGate will first look up a firewall policy, and then match a shaping policy. The matching
traffic will apply a traffic shaper, class ID, or assign a DSCP DiffServ tag to the outgoing traffic.
The traffic shaping policies must be placed in the correct order in the traffic shaping policy list page to obtain the desired
results. Policies are matched from top-down, so the traffic shaping policies should be arranged in a sequence that places
the more granular policies above general policies.
The policy can be configured by going to Policy & Objects > Traffic Shaping and selecting the Traffic Shaping Policies
tab. If the menu does not display the traffic shaping settings, go to System > Feature Visibility and enable Traffic
Shaping.
Source
Address set srcaddr <address_ Select the address object to match the source
object> IP.
User set users <user_object> Select the user object to match the user
authenticated for the session.
Internet Service set internet-service-src Select the internet service to match the
enable source of the incoming traffic. Internet service
set internet-service-src-
name <name>
currently cannot be used with source
set internet-service-src- address.
group <group>
set internet-service-src-
custom <custom>
set internet-service-src-
custom-group
<custom_group>
Destination
Address set dstaddr <address_ Select the address object to match the
object> destination IP.
Internet Service set internet-service Select the internet service to match the
enable destination of the incoming traffic. Internet
set internet-service-name
<name>
service currently cannot be used with
set internet-service- destination address and service.
group <group>
set internet-service-
custom <custom>
set internet-service-
custom-group
<custom_group>
Service set service <service> Select the service or service group for the
traffic.
Group set app-group <groups> Select the application group to match the
application of the traffic.
URL Category set url-category Select the URL category to match the URL of
<category> the traffic.
A web filter profile must be enabled in the
related firewall policy to know the URL of the
traffic (see Web filter on page 1058).
n/a set tos-mask Specify the type of service (ToS) and mask to
<hexadecimal_mask> match.
set tos <value>
set tos-negate {enable | These options can only be configured in the
disable} CLI.
The following options can be configured for actions to apply to the matched traffic:
Outgoing interface set dstintf <interface> Select the destination interface that the traffic
shaping applies to (required).
Apply shaper
Per-IP shaper set per-ip-shaper Select the per-IP shaper. Per-IP shapers
<shaper> affect downloads and uploads. The allotted
bandwidth applies to each individual IP. In a
shared shaper, the allotted bandwidth applies
to all IPs.
Traffic shaping class set class-id <class> Set the class ID to apply the matching traffic.
ID Class IDs are further prioritized within a traffic
shaping profile and applied to an interface.
Traffic shapers and class IDs can be applied at the same time when configuring traffic shaping policies. However, to
reduce the complexity, it is recommended to use one method over the other.
The following topics include examples with traffic shaping policies:
l Interface-based traffic shaping profile on page 893
l Shared traffic shaper on page 876
l Per-IP traffic shaper on page 881
As mentioned in Traffic shaping on page 860, the three main methods of configuring traffic shaping are:
l Traffic shaping profiles
l Traffic shapers
l Global traffic prioritization
A traffic shaping profile allows traffic shaping to be configured with policing or queuing. Up to 30 classes can be defined,
with prioritization and bandwidth limits configured for each class. When queuing is enabled, metrics can be configured
for traffic queuing in each class.
At the most basic level, policing involves traffic prioritization and bandwidth limits. Traffic prioritization helps categorize
traffic into different priority levels: low, medium, high, critical, and top. When bandwidth is limited, traffic with higher
priority levels will take precedence over lower priority traffic. Traffic with lower priority levels that exceeds available
bandwidth will be dropped. These levels are only applicable in the context of traffic shaping profiles and should not be
confused with global traffic prioritization levels.
Bandwidth limits define the guaranteed and maximum bandwidth allotted to each traffic class. These limits are
configured as a percentage of the outbandwidth, which is the outbound bandwidth configured on an interface.
Guaranteed bandwidth limits guarantee the minimum bandwidth that is allotted to a given class of traffic. The sum of all
guaranteed bandwidth of all classes within a traffic shaping profile cannot exceed 100%. However, the sum of all
guaranteed bandwidth does not need to add up to 100%. The guaranteed bandwidth is always respected, even if one
class has lower priority than another.
Maximum bandwidth limits define the maximum percentage of the outbandwidth that a traffic class can use up. This
value often will be 100%, given that when there is no other traffic going through other classes, you would want to fully
utilize the bandwidth of the outbound link. Traffic throughput exceeding the maximum bandwidth will be dropped.
The following diagram illustrates ingress traffic and how the FortiGate assigns classes and bandwidth to each class.
When comparing traffic shaping profiles and traffic shapers, it is important to remember that guaranteed and maximum
bandwidth in a traffic shaping profile is a percentage of the outbandwidth, while guaranteed and maximum bandwidth in
a traffic shaper is a rate (Kbps, Mbps, and so on). As long as the outbandwidth is true to its measurement, the bandwidth
usage should not exceed the available bandwidth of a link when using a traffic shaping profile.
Congestion occurs when actual traffic surpasses the outbandwidth limit. At this point, traffic prioritization helps determine
which traffic will be prioritized over others. First, the guaranteed bandwidth limit is allocated for each class. The left over
bandwidth is allocated to traffic classes based on priority. The traffic classes with the highest priority can use as much of
the remaining bandwidth as needed. Then, the remaining bandwidth can be allocated to classes at the next priority level,
and so forth.
To see examples of applied traffic prioritization and bandwidth limits, see the debugs in Verifying that the traffic is being
shaped on page 871.
When traffic congestion occurs and if there is no queuing, then the excess packets are dropped. With queuing, when
traffic exceeds the configured bandwidth limits, the traffic is delayed for transport until bandwidth frees up. Traffic may
still be dropped if the queues are full.
In queuing, before a packet egresses an interface, it is first enqueued using an algorithm, such as random early
detection (RED) or first in, first out (FIFO). The kernel then dequeues the packet based on the HTB algorithm before
sending it out. Queuing can be configured per shaping profile, and it can be customized per class.
The following diagram shows how traffic policing differs from traffic queuing by comparing the bandwidth limit, projected
bandwidth utilization, and actual bandwidth utilization.
For more information about traffic shaping with queuing, see Traffic shaping with queuing using a traffic shaping profile
on page 872.
A traffic shaping profile consists of the class ID and the settings per class ID. It also defines the type of traffic shaping to
apply (policing or queuing) and the default class ID for traffic that does not match any traffic shaping policies.
A class can be configured in the GUI as part of a traffic shaping profile or policy. In the CLI, a traffic class must be defined
before it can be assigned within a traffic shaping profile. Class IDs range from 2 - 31, and they can be reused between
different traffic shaping profiles.
When configuring a traffic shaping profile, the settings can be defined per class.
The following options can be configured for traffic shaping classes:
Traffic shaping class ID set class-id <integer> Set the class ID (2 - 31).
Guaranteed bandwidth set guaranteed-bandwidth- Set the percentage of the outbandwidth that
percentage <integer> will be guaranteed for the class ID.
Maximum bandwidth set maximum-bandwidth- Set the percentage of the outbandwidth that
percentage <integer> will be the maximum bandwidth for the class
ID.
Priority set priority {top | Select the priority level for the class ID.
critical | high |
medium | low}
1. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Profiles tab, and click Create New.
2. Enter the profile name, and optionally enter a comment.
3. In the Traffic Shaping Classes section, click Create New.
4. Configure the traffic shaping class ID settings (Traffic shaping class ID, Guaranteed bandwidth, Maximum
bandwidth, and Priority).
5. Click OK.
6. Create more shaping classes as needed (the total guaranteed bandwidth of all classes cannot exceed 100%).
7. Click OK.
next
end
There are two settings that must be configured on an interface that has traffic shaping applied to egressing traffic: a
traffic shaping profile must be assigned, and the outbound bandwidth must be configured.
Since traffic shaping is often configured on the WAN interface for egressing traffic, the outbound bandwidth is effectively
the upstream bandwidth allowed by your ISP. On the FortiGate, it is possible to perform a speed test on interfaces are
assigned a WAN role assigned (see Manual interface speedtest on page 543). The speed test performs measurements
against public cloud servers, and provides an accurate measurement of the upstream bandwidth. After the test is
complete, the results can be used to populate the Outbound bandwidth field.
4. In the Traffic Shaping section, enable Outbound shaping profile and select a profile.
5. Enable Outbound bandwidth and copy the kbps Upstream value from the speed test, or enter a custom value.
6. Click OK.
In this example, three traffic classes are defined in the traffic shaping profile assigned to port1. The outbandwidth
configured on port1 is 1000 Kbps. Each class has an allocated-bandwidth, guaranteed-bandwidth, max-
bandwidth, and current-bandwidth value.
l The guaranteed-bandwidth and max-bandwidth are rates that are converted from the percentage of
outbandwidth configured for each class. For example, class-id 2 has 10% guaranteed-bandwidth,
equivalent to 100 Kbps, and 100% max-bandwidth equivalent to 1000 Kbps.
l The allocated-bandwidth displays the real-time bandwidth allocation for the traffic class based on all available
factors. This value changes as traffic demand changes.
l The current-bandwidth displays the real-time bandwidth usage detected for the traffic class.
1. Enable debug flow to view the live traffic as it matches a traffic shaping policy:
# diagnose debug flow show function-name enable
# diagnose debug flow show iprope enable
# diagnose debug flow filter <filters>
# diagnose debug flow trace start <repeat_number>
# diagnose debug enable
The iprope_shaping_check function outputs the shaping policy matched for any given traffic:
...
id=20085 trace_id=21 func=iprope_shaping_check line=934 msg="in-[port3], out-[port1],
skb_flags-02000000, vid-0"
id=20085 trace_id=21 func=__iprope_check line=2277 msg="gnum-100015, check-
ffffffffa002a8fe"
id=20085 trace_id=21 func=__iprope_check_one_policy line=2029 msg="checked gnum-100015
policy-3, ret-matched, act-accept"
id=20085 trace_id=21 func=__iprope_check_one_policy line=2247 msg="policy-3 is matched,
act-accept"
id=20085 trace_id=21 func=__iprope_check line=2294 msg="gnum-100015 check result: ret-
matched, act-accept, flag-00000000, flag2-00000000"
Sessions that match a shaping policy will display class_id and shaping_policy_id fields:
...
session info: proto=6 proto_state=05 duration=32 expire=0 timeout=3600 flags=00000000
socktype=0 sockport=0 av_idx=0 use=4
origin-shaper=
reply-shaper=
per_ip_shaper=
class_id=4 shaping_policy_id=3 ha_id=0 policy_dir=0 tunnel=/ vlan_cos=0/255
If the debug output does not display egress traffic control by class and displays them by
priority, it is likely that global traffic prioritization is configured. The global traffic prioritization
settings must be disabled to view the preceding debug output (see Global traffic prioritization
on page 886).
You can use the weighted random early detection (WRED) queuing function within traffic shaping.
This topic includes two parts:
l Traffic shaping with queuing on page 872
l Burst control in queuing mode on page 873
You cannot configure or view WRED in the GUI; you must use the CLI.
Traffic shaping has a queuing option. Use this option to fine-tune the queue by setting the profile queue size or
performing random early drop (RED) according to queue usage.
This example shows setting the profile queue size limit to 5 so that the queue can contain a maximum of five packets and
more packets are dropped.
This example shows performing RED according to queue usage by setting red-probability, min, and max. Setting
red-probability to 10 means start to drop packets when queue usage reaches the min setting. When queue usage
reaches the max setting, drop 10% of the packets.
l Level 1: when queue is less than min packets, drop 0% of packets.
l Level 2: when queue reaches min packets, start to drop packets.
l Level 3: when queue usage is between min and max packets, drop 0–10% of packets by proportion.
l Level 4: when queue (average queue size) is more than max packets, drop 100% of packets.
In a hierarchical token bucket (HTB) algorithm, each traffic class has buckets to allow a burst of traffic. The maximum
burst is determined by the bucket size burst (for guaranteed bandwidth) and cburst (for maximum bandwidth). The
shaping profile has burst-in-msec and cburst-in-msec parameters for each shaping entry (class id) to control
the bucket size.
This example uses the outbandwidth of the interface as 1 Mbps and the maximum bandwidth of class is 50%.
burst = burst-in-msec * guaranteed bandwidth = 100 ms × 1 Mbps x 50% = 50000 b = 6250 B
Example
This example shows how to enable RED for FTP traffic from QA. This example sets a maximum of 10% of the packets to
be dropped when queue usage reaches the maximum value.
To set the shaping policy to classify traffic into different class IDs:
To set the shaping policy to define the speed of each class ID:
Traffic shapers
Shared traffic shaper is used in a firewall shaping policy to indicate the priority and guaranteed and maximum bandwidth
for a specified type of traffic use.
The maximum bandwidth indicates the largest amount of traffic allowed when using the policy. You can set the maximum
bandwidth to a value between 1 and 16776000 Kbps. The GUI displays an error if any value outside this range is used. If
you want to allow unlimited bandwidth, use the CLI to enter a value of 0.
The guaranteed bandwidth ensures that there is a consistent reserved bandwidth available. When setting the
guaranteed bandwidth, ensure that the value is significantly less than the interface's bandwidth capacity. Otherwise, the
interface will allow very little or no other traffic to pass through, potentially causing unwanted latency.
In a shared traffic shaper, the administrator can prioritize certain traffic as high, medium, or low. FortiOS provides
bandwidth to low priority connections only when high priority connections do not need the bandwidth. For example, you
should assign a high traffic priority to a policy for connecting a secure web server that needs to support e-commerce
traffic. You should assign less important services a low priority.
When you configure a shared traffic shaper, you can apply bandwidth shaping per policy or for all policies. By default, a
shared traffic shaper applies traffic shaping evenly to all policies that use the shared traffic shaper.
When configuring a per-policy traffic shaper, FortiOS applies the traffic shaping rules defined for each security policy
individually. For example, if a per-policy traffic shaper is configured with a maximum bandwidth of 1000 Kbps, any
security policies that have that traffic shaper enabled get 1000 Kbps of bandwidth each.
If a traffic shaper for all policies is configured with a maximum bandwidth of 1000 Kbps, all policies share the 1000 Kbps
on a first-come, first-served basis.
The configuration is as follows:
config firewall shaper traffic-shaper
edit "traffic_shaper_name"
set per-policy enable
next
end
The shared traffic shaper selected in the traffic shaping policy affects traffic in the direction defined in the policy. For
example, if the source port is LAN and the destination is WAN1, the traffic shaping affects the flow in this direction only,
affecting the outbound traffic's upload speed. You can define the traffic shaper for the policy in the opposite direction
(reverse shaper) to affect the inbound traffic's download speed. In this example, that would be from WAN1 to LAN.
Only traffic through forward traffic shapers will be included in FortiView; reverse and per-IP shapers are not included.
The following example shows how to apply different speeds to different types of service. The example configures two
shared traffic shapers to use in two firewall shaping policies. One policy guarantees a speed of 10 Mbps for VoIP traffic.
The other policy guarantees a speed of 1 Mbps for other traffic. In the example, FortiOS communicates with a PC using
port10 and the Internet using port9.
f. Click OK.
g. Repeat the above steps to create another traffic shaper named 1Mbps with the Traffic Priority set to Low, the
Max Bandwidth set to 10000, and the Guaranteed Bandwidth set to 1000.
3. Create a firewall shaping policy:
a. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Policies tab, and click Create New.
b. Set the Name to VoIP_10Mbps_High. This policy is for VoIP traffic.
c. Set the Source and Destination to all.
d. Set the Service to all VoIP services.
e. Set the Outgoing Interface to port9.
f. Enable Shared shaper and select 10Mbps.
g. Enable Reverse shaper and select 10Mbps.
h. Click OK.
i. Repeat the above steps to create another firewall shaping policy named Other_1Mbps_Low for other traffic,
with the Source and Destination set to all, Service set to ALL, Outgoing Interface set to port9, and Shared
shaper and Reverse shaper set to 1Mbps.
edit "10Mbps"
set guaranteed-bandwidth 10000
set maximum-bandwidth 20000
next
edit "1Mbps"
set guaranteed-bandwidth 1000
set maximum-bandwidth 10000
set priority low
next
end
3. Create a firewall shaping policy:
config firewall shaping-policy
edit 1
set name "VOIP_10Mbps_High"
set service "H323" "IRC" "MS-SQL" "MYSQL" "RTSP" "SCCP" "SIP" "SIP-MSNmessenger"
set dstintf "port9"
set traffic-shaper "10Mbps"
set traffic-shaper-reverse "10Mbps"
set srcaddr "all"
set dstaddr "all"
next
edit 2
set name "Other_1Mbps_Low"
set service "ALL"
set dstintf "port9"
set traffic-shaper "1Mbps"
set traffic-shaper-reverse "1Mbps"
set srcaddr "all"
set dstaddr "all"
next
end
1. Check if specific traffic is attached to the correct traffic shaper. The example output shows the traffic attached to the
10Mbps and 1Mbps shapers:
# diagnose firewall iprope list 100015
policy index=1 uuid_idx=0 action=accept
flag (0):
shapers: orig=10Mbps(2/1280000/2560000)
cos_fwd=0 cos_rev=0
group=00100015 av=00000000 au=00000000 split=00000000
host=4 chk_client_info=0x0 app_list=0 ips_view=0
misc=0 dd_type=0 dd_mode=0
zone(1): 0 -> zone(1): 38
source(1): 0.0.0.0-255.255.255.255, uuid_idx=0,
dest(1): 0.0.0.0-255.255.255.255, uuid_idx=0,
service(15):
[6:0x0:0/(1,65535)->(1720,1720)] helper:auto
[6:0x0:0/(1,65535)->(1503,1503)] helper:auto
[17:0x0:0/(1,65535)->(1719,1719)] helper:auto
[6:0x0:0/(1,65535)->(6660,6669)] helper:auto
[6:0x0:0/(1,65535)->(1433,1433)] helper:auto
[6:0x0:0/(1,65535)->(1434,1434)] helper:auto
[6:0x0:0/(1,65535)->(3306,3306)] helper:auto
[6:0x0:0/(1,65535)->(554,554)] helper:auto
[6:0x0:0/(1,65535)->(7070,7070)] helper:auto
[6:0x0:0/(1,65535)->(8554,8554)] helper:auto
[17:0x0:0/(1,65535)->(554,554)] helper:auto
[6:0x0:0/(1,65535)->(2000,2000)] helper:auto
[6:0x0:0/(1,65535)->(5060,5060)] helper:auto
[17:0x0:0/(1,65535)->(5060,5060)] helper:auto
[6:0x0:0/(1,65535)->(1863,1863)] helper:auto
bytes dropped 0
name 1Mbps
maximum-bandwidth 1250 KB/sec
guaranteed-bandwidth 125 KB/sec
current-bandwidth 0 B/sec
priority 4
tos ff
packets dropped 0
bytes dropped 0
With per-IP traffic shaping, you can limit each IP address's behavior to avoid a situation where one user uses all of the
available bandwidth. In addition to controlling the maximum bandwidth used per IP address, you can also define the
maximum number of concurrent sessions for an IP address. For example, if you apply a per-IP shaper of 1 Mbps to your
entire network, FortiOS allocates each user/IP address 1 Mbps of bandwidth. Even if the network consists of a single
user, FortiOS allocates them 1 Mbps. If there are ten users, each user gets 1 Mbps of bandwidth, totaling 10 Mbps of
outgoing traffic.
For shared shapers, all users share the set guaranteed and maximum bandwidths. For example, if you set a shared
shaper for all PCs using an FTP service to 10 Mbps, all users uploading to the FTP server share the 10 Mbps.
Shared shapers affect upload speed. If you want to limit the download speed from the FTP server in the example, you
must configure the shared shaper as a reverse shaper. Per-IP shapers apply the speed limit on both upload and
download operations. Only traffic through forward traffic shapers will be included in FortiView; reverse and per-IP
shapers are not included.
The following example shows how to apply a per-IP shaper to a traffic shaping policy. This shaper assigns each user a
maximum bandwidth of 1 Mbps and allows each user to have a maximum of ten concurrent connections to the FTP
server. In the example, FortiOS communicates with users using port10 and the FTP server using port9.
f. Click OK.
3. Create a firewall shaping policy:
a. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Policies tab, and click Create New.
b. Enter the Name (FTP speed 1M).
c. Set the Source to the addresses and users that require access to the FTP server.
d. Set the Destination to FTP_Server.
e. Set the Service to ALL.
f. Set the Outgoing Interface to port9.
g. Enable Per-IP shaper and select FTP_Max_1M.
h. Click OK.
1. Check if specific traffic is attached to the correct traffic shaper. The example output shows the traffic attached to the
FTP_Max_1M shaper:
# diagnose firewall iprope list 100015
policy index=3 uuid_idx=0 action=accept
flag (0):
shapers: per-ip=FTP_Max_1M
cos_fwd=0 cos_rev=0
group=00100015 av=00000000 au=00000000 split=00000000
host=2 chk_client_info=0x0 app_list=0 ips_view=0
misc=0 dd_type=0 dd_mode=0
zone(1): 0 -> zone(1): 38
source(3): 10.1.100.11-10.1.100.11, uuid_idx=30, 10.1.100.143-10.1.100.143, uuid_idx=32,
10.1.100.22-10.1.100.22, uuid_idx=31,
dest(1): 172.16.200.55-172.16.200.55, uuid_idx=89,
service(1):
[0:0x0:0/(0,65535)->(0,65535)] helper:auto
2. Check if the correct traffic shaper is applied to the session. The example output shows that the FTP_Max_1M
shaper is applied to the session:
# diagnose sys session list
session info: proto=6 proto_state=01 duration=36 expire=3567 timeout=3600 flags=00000000
sockflag=00000000 sockport=0 av_idx=0 use=4
origin-shaper=
reply-shaper=
per_ip_shaper=FTP_Max_1M
class_id=0 shaping_policy_id=3 ha_id=0 policy_dir=0 tunnel=/ helper=ftp vlan_cos=0/255
state=may_dirty per_ip npu npd mif route_preserve
statistic(bytes/packets/allow_err): org=506/9/1 reply=416/6/1 tuples=2
tx speed(Bps/kbps): 0/0 rx speed(Bps/kbps): 0/0
orgin->sink: org pre->post, reply pre->post dev=39->38/38->39 gwy=172.16.200.55/0.0.0.0
hook=post dir=org act=snat 10.1.100.11:58275->172.16.200.55:21(172.16.200.1:58275)
hook=pre dir=reply act=dnat 172.16.200.55:21->172.16.200.1:58275(10.1.100.11:58275)
pos/(before,after) 0/(0,0), 0/(0,0)
misc=0 policy_id=1 auth_info=0 chk_client_info=0 vd=2
serial=0000211a tos=ff/ff app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id = 00000000
dd_type=0 dd_mode=0
npu_state=0x100000
npu info: flag=0x00/0x00, offload=0/0, ips_offload=0/0, epid=0/0, ipid=0/0,
vlan=0x0000/0x0000
vlifid=0/0, vtag_in=0x0000/0x0000 in_npu=0/0, out_npu=0/0, fwd_en=0/0, qid=0/0
no_ofld_reason: offload-denied helper
3. Check the statuses of per-IP traffic shapers. The output should resemble the following:
# diagnose firewall shaper per-ip-shaper list
name FTP_Max_1M
Bandwidth speeds are measured in kilobits per second (Kbps), and bytes that are sent and received are measured in
megabytes (MB). In some cases, this can cause confusion depending on whether your ISP uses kilobits per second
(Kbps), kilobytes per second (KBps), megabits per second (Mbps), or gigabits per second (Gbps).
You can change the unit of measurement for traffic shapers in the CLI.
Traffic shapers have a multi-stage method so that packets are marked with a different differentiated services code point
(DSCP) and class id at different traffic speeds. Marking packets with a different DSCP code is for the next hop to
classify the packets. The FortiGate benefits by marking packets with a different class id. Combined with the egress
interface shaping profile, the FortiGate can handle the traffic differently according to its class id.
l When the current bandwidth is more than 100 Kbps, mark packets with maximum-dscp 111111 and set exceed-
class-id to 20.
Traffic shapers also have an overhead option that defines the per-packet size overhead used in rate computation.
Example
This example shows how to mark QA traffic with a different DSCP according to real-time traffic speed.
Global traffic prioritization allows your traffic to be prioritized as high (2), medium (3), or low (4) based on ToS (type of
service) or DSCP. When using ToS-based priority, integers 0 to 15 can be used, which correspond to the definitions of
the ToS field values in RFC 1349. When using DSCP, values 0 to 63 can be used, which correspond to the six bits in the
DSCP value.
The outbandwidth must be defined in order for global prioritization to take effect. When the outbandwidth is defined on an
interface without an applied egress-shaping-profile, the interface has a total of five priority levels:
0 Top
1 Critical
2 High
3 Medium
4 Low
Priority level 0 is reserved for administrative and local out traffic. Priority level 1 is used for traffic that is below
guaranteed bandwidth when using a traffic shaper.
Traffic shaper and traffic shaping profile configurations take precedence over global traffic
prioritization.
CLI commands
The following commands are used to configure the prioritization either by ToS or DSCP.
Example
In the following configuration, packets with DSCP markings of 1 are prioritized as high, and packets with DSCP markings
of 2 are prioritized as medium. All the other traffic is prioritized as low. The outbandwidth on interface port3 is set to 1000
kbps.
When traffic exceeds the outbandwidth of 1000 kbps, traffic prioritization will take effect. Since the form of traffic shaping
applied here is policing, excess packets above the outbandwidth are dropped.
In scenario 1, approximately 300 kbps of high priority traffic and 300 kbps of medium priority traffic passes through the
FortiGate on port3.
High priority (2) traffic is allocated 354 kbps of bandwidth. Medium priority (3) traffic is also allocated 354 kbps of
bandwidth. The remaining bandwidth is allocated to low priority (4) traffic.
In scenario 2, approximately 400 kbps of high priority traffic and 800 kbps of medium priority traffic passes through the
FortiGate on port3.
High priority (2) traffic is allocated 425 kbps of bandwidth. Medium priority (3) traffic is allocated 567 kbps of bandwidth.
Since the total bandwidth required exceeds 1000 kbps, the remaining medium priority (3) traffic is dropped. In comparing
the successive debug outputs, the drop_bytes counter for medium priority (3) traffic gets bigger.
Traffic is allowed or blocked according to the Differentiated Services Code Point (DSCP) values in the incoming packets.
The following CLI variables are available in the config firewall policy command:
tos-mask <mask_value> Non-zero bit positions are used for comparison. Zero bit positions are ignored
(default = 0x00).
This variable replaces the dscp-match variable.
tos <tos_value> Type of Service (ToC) value that is used for comparison (default = 0x00). This
variable is only available when tos-mask is not zero.
This variable replaces the dscp-value variable.
tos-negate {enable | Enable/disable negated ToS match (default = disable). This variable is only
disable} available when tos-mask is not zero.
This variable replaces the dscp-negate variable.
Shaping is applied to the session or not according to the DSCP values in the incoming packets. The same logic and
commands as in firewall policies are used.
Traffic is allowed or blocked according to the DSCP values in the incoming packets. DSCP marking in firewall shaping
policies uses the same logic and commands as in firewall policy and traffic-shaper.
When DSCP marking on firewall shaper traffic-shaper, firewall shaping-policy, and firewall
policy all apply to the same session, shaping-policy overrides policy, and shaper traffic-shaper
overrides both shaping-policy and policy.
The following CLI variables in config firewall policy are used to mark the packets:
diffserv-forward {enable Enable/disable changing a packet's DiffServ values to the value specified in
| disable} diffservcode-forward (default = disable).
diffservcode-forward The value that packet's DiffServ is set to (default = 000000). This variable is only
<dscp_value> available when diffserv-forward is enabled.
diffserv-reverse {enable Enable/disable changing a packet's reverse (reply) DiffServ values to the value
| disable} specified in diffservcode-rev (default = disable).
diffservcode-rev <dscp_ The value that packet's reverse (reply) DiffServ is set to (default = 000000). This
value> variable is only available when diffserv-rev is enabled.
Examples
Example 1
FortiGate A marks traffic from the sales and QA teams with different DSCP values. FortiGate B does DSCP matching,
allowing only the sales team to access the database.
1. Configure FortiGate A:
config firewall policy
edit 1
set srcintf "port2"
set dstintf "port3"
set srcaddr "QA"
set dstaddr "all"
set action accept
set schedule "always"
2. Configure FortiGate B:
config firewall policy
edit 2
set srcintf "port3"
set dstintf "port1"
set srcaddr "all"
set dstaddr "Database"
set action accept
set schedule "always"
set service "ALL"
set tos-mask 0xf0
set tos 0xe0
set fsso disable
set nat enable
next
end
Example 2
FortiGate A marks traffic from the sales and QA teams with different DSCP values. FortiGate B uses a firewall shaping
policy to do the DSCP matching, limiting the connection speed of the sales team to the database to 10MB/s.
1. Configure FortiGate A:
config firewall policy
edit 1
set srcintf "port2"
set dstintf "port3"
set srcaddr "QA"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set diffserv-forward enable
set diffservcode-forward 110000
set nat enable
next
edit 5
set srcintf "port2"
set dstintf "port3"
set srcaddr "Sales"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set diffserv-forward enable
set diffservcode-forward 111011
set nat enable
next
end
2. Configure FortiGate B:
config firewall policy
edit 2
set srcintf "port3"
set dstintf "port1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
config firewall shaper traffic-shaper
edit "10MB/s"
set guaranteed-bandwidth 60000
set maximum-bandwidth 80000
next
end
config firewall shaping-policy
edit 1
set service "ALL"
set dstintf "port1"
set tos-mask 0xf0
set tos 0xe0
set traffic-shaper "10MB/s"
set srcaddr "all"
set dstaddr "all"
next
end
Example 3
FortiGate A has a traffic shaping policy to mark traffic from the QA team with a DSCP value of 100000, while reverse
traffic is marked with 000011.
1. Configure FortiGate A:
config firewall shaping-policy
edit 1
set name "QA Team 50MB"
set service "ALL"
Examples
A traffic shaping policy can be used for interface-based traffic shaping by organizing traffic into 30 class IDs. The shaping
profile defines the percentage of the interface bandwidth that is allocated to each class. Each traffic class ID is shaped to
the assigned speed according to the outgoing bandwidth limit configured to the interface.
Traffic classification
A shaping policy classifies traffic and organizes it into different class IDs, based on matching criteria. For traffic matching
a criteria, you can choose to put it into 30 different shaping classes, identified by class ID 2 to 31.
You must select an outgoing interface for the traffic. The shaping policy is only applied when the traffic goes to one of the
selected outgoing interfaces.
Criterion Description
Source l Address: match the source address of the traffic to the selected address or
address group.
l User: use the user credentials of the traffic to match the selected user or user
group. At least one address, address group, or internet service must also be
selected.
l Internet service: match the traffic to the selected internet service. Internet
services cannot be used if addresses or address or groups are used.
Destination l Address: match the destination address of the traffic to the selected address
or address group.
l Internet service: match the traffic to the selected internet service. Internet
services cannot be used if addresses or address or groups are used.
Criterion Description
Schedule Match the current date and time to the selected schedule. You can select a one-
time schedule, recurring schedule, or schedule group. This setting is optional.
Service Match the service of the traffic to the selected service or service group.
Application Match the application of the traffic to the selected application, application
category, or application group.
Application control must be enabled in the related firewall policy to know the
application of the traffic. See Application control on page 1126 for more
information.
URL category Match the URL of the traffic to the selected URL category.
Web filter must be enabled in the related firewall policy to know the URL of the
traffic. See Web filter on page 1058 for more information.
When multiple items are selected in one criterion, it is considered a match when traffic
matches any one of them.
Traffic prioritization
Shaping profiles define how different shaping classes of traffic are prioritized. For each class, you can define three
prioritization strategies: guaranteed bandwidth, maximum bandwidth, and priority.
For each shaping profile, a default shaping class must be defined. Traffic is prioritized based on the default shaping
group in the following two circumstances:
l All traffic to the outgoing interface that does not match to any shaping policy
l Traffic with a shaping group that is not defined in a shaping profile
Guaranteed bandwidth The percentage of the link speed that is reserved for the shaping group.
The total guaranteed bandwidth for all shaping groups cannot exceed 100%.
Maximum bandwidth The maximum percentage of the link speed that the shaping group can use.
Priority The shaping class priority: top, critical, high, medium, or low. When groups are
competing for bandwidth on the interface, the group with the higher priority wins.
Traffic shaping is accomplished by configuring the outgoing bandwidth and outgoing shaping profile on an interface. The
shaping profile uses the outgoing bandwidth of the interface as the maximum link speed, and it only works when the
outgoing bandwidth is configured.
This example shows how to apply interface-based traffic shaping to web and file accessing traffic according to a
schedule:
l The link speed of the wan1 interface is 10 Mb/s.
l File access can use up to 2 Mb/s from 8:00 AM to 6:00 PM.
To create a traffic shaping policy and class ID for the web accessing traffic in the GUI:
1. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Policies tab, and click Create New.
2. Enter a name for the policy, such as web_access_day_hours.
3. Enable Schedule and select the schedule you just created.
4. Set Service to web accessing services, such as HTTP and HTTPS.
5. Set Action to Assign Shaping Class ID, and Outgoing interface to wan1.
6. Click the Traffic shaping class ID drop down then click Create.
7. Enter an integer value for the ID (3) and a description for the Name, such as Web Access.
8. Click OK.
9. Select the class ID you just created for Traffic shaping class ID.
To create a traffic shaping policy and class ID for the file accessing traffic in the GUI:
1. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Policies tab, and click Create New.
2. Enter a name for the policy, such as file_access_day_hours.
3. Enable Schedule and select the schedule you just created.
4. Set Service to file accessing services, such as ASF3, FTP and SMB.
5. Set Action to Assign Shaping Class ID, and Outgoing interface to wan1.
6. Click the Traffic shaping class ID drop down then click Create.
7. Enter an integer value for the ID (4) and a description for the Name, such as File Access.
8. Click OK.
9. Select the class ID you just created for Traffic shaping class ID.
A traffic shaping profile defines the guaranteed and maximum bandwidths each class receives. In this example, file
access can use up to 2 Mb/s and web access can use 8 Mb/s from 8:00 AM to 6:00 PM.
1. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Profiles tab, and click Create New.
2. Enter a name for the profile, such as Day_Hours_Profile.
3. Configure a default traffic shaping class:
This class has a high priority, meaning that when the other classes have reached their guaranteed bandwidths, this
default class will use the rest of the available bandwidth.
a. In the Traffic Shaping Classes table click Create New.
b. Click the Traffic shaping class ID drop down then click Create.
c. Enter a name for the class, such as Default Access.
d. Click OK.
e. Select the class ID you just created for Traffic shaping class ID.
Guaranteed bandwidth 30
Priority High
Guaranteed bandwidth 60
Maximum bandwidth 80
Priority Medium
Guaranteed bandwidth 10
Maximum bandwidth 20
Priority Medium
6. Click OK.
5. Click OK.
Diagnose commands
To check that the specific traffic is put into the correct shaping group or class ID:
1. Enable NPU offloading when doing interface-based traffic shaping according to the egress-shaping-profile:
config system npu
set intf-shaping-offload enable
end
When devices are quarantined, they are isolated from the rest of the network. However, they can still impact the network
if not controlled beyond isolation. A quarantined host, which offers heavy traffic, could congest the network and create a
DOS-style reduction in service to authorized hosts.
Within the quarantined VLAN, two restrictions are available within the network:
2. Configure an interface:
config system interface
edit "qtn.aggr1"
set vdom "root"
set ip 10.254.254.254 255.255.255.0
set description "Quarantine VLAN"
set security-mode captive-portal
set replacemsg-override-group "auth-intf-qtn.aggr1"
set device-identification enable
set snmp-index 30
set switch-controller-access-vlan enable
set switch-controller-traffic-policy "quarantine"
set color 6
set interface "aggr1"
set vlanid 4093
next
end
By default, switch-controller-traffic-policy is empty. You need to apply the necessary traffic policy (not
only limited to "quarantine").
A traffic shaping profile can be applied to an interface for traffic in the ingress direction. Similar to an egress traffic
shaping profile, the guaranteed bandwidth and priority of the profile will be respected when an interface receives inbound
traffic. When congestion occurs, any remaining bandwidth will be allotted to classes based on priority.
Example
In this example, the port2 interface has a total inbound bandwidth of 100 Mbps. Traffic from certain clients to certain
servers are assigned different classes.
IPv6 traffic from any client PCs to server PCs is assigned class 5.
For each class, the priority, guaranteed bandwidth, and maximum bandwidth are as follows:
Bandwidth will first be allotted to each class according to its guaranteed bandwidth. Then remaining available bandwidth
will be allotted to class 3 and 4 first based on their priority. The allocation will be proportional to their guaranteed
bandwidth ratio.
4. Configure a shaping profile to set the priority, and the guaranteed and maximum bandwidth percentages for each
class:
config firewall shaping-profile
edit "ingShapeProfile"
set default-class-id 2
config shaping-entries
edit 2
set class-id 2
set priority low
set guaranteed-bandwidth-percentage 10
set maximum-bandwidth-percentage 60
next
edit 3
set class-id 3
set guaranteed-bandwidth-percentage 20
set maximum-bandwidth-percentage 100
next
edit 4
set class-id 4
set guaranteed-bandwidth-percentage 30
set maximum-bandwidth-percentage 100
next
edit 5
set class-id 5
set priority medium
set guaranteed-bandwidth-percentage 10
set maximum-bandwidth-percentage 50
next
end
next
end
5. Configure the inbandwidth and apply the ingress shaping profile on port2:
config system interface
edit "port2"
set ip 10.1.100.1 255.255.255.0
set inbandwidth 100000
set ingress-shaping-profile "ingShapeProfile"
config ipv6
set ip6-address 2000:10:1:100::1/64
end
next
end
In each of the following cases, the server PCs (PC4 and PC5) are configured as iPerf servers. The client PCs (PC1 and
PC2) are configured as iPerf clients. The client sends traffic to the server from the client to server direction, triggering
inbound traffic shaping on the port2 interface. The inbound bandwidth on port2 is 100 Mbps.
Traffic is sent from PC1 to PC4. There is no other traffic. Traffic is marked with class ID 2 and allocated the maximum
bandwidth 60 Mbps (60%).
# diagnose netlink interface list port2
if=port2 family=00 type=1 index=20 mtu=1500 link=0 master=0
ref=25 state=start present fw_flags=3800 flags=up broadcast run multicast
Qdisc=mq hw_addr=70:4c:a5:7d:d4:95 broadcast_addr=ff:ff:ff:ff:ff:ff
ingress traffic control:
bandwidth=100000(kbps) lock_hit=50 default_class=2 n_active_class=4
class-id=2 allocated-bandwidth=60000(kbps) guaranteed-bandwidth=10000
(kbps)
max-bandwidth=60000(kbps) current-bandwidth=60002(kbps)
priority=low forwarded_bytes=58157K
dropped_packets=94K dropped_bytes=125385K
class-id=5 allocated-bandwidth=1000(kbps) guaranteed-bandwidth=10000(kbps)
max-bandwidth=50000(kbps) current-bandwidth=0(kbps)
priority=medium forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
class-id=3 allocated-bandwidth=15000(kbps) guaranteed-bandwidth=20000
(kbps)
max-bandwidth=100000(kbps) current-bandwidth=0(kbps)
priority=high forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
class-id=4 allocated-bandwidth=24000(kbps) guaranteed-bandwidth=30000
(kbps)
max-bandwidth=100000(kbps) current-bandwidth=0(kbps)
priority=high forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
stat: rxp=173465879 txp=2430534 rxb=194665548609 txb=2767375732 rxe=0 txe=0 rxd=0 txd=0 mc=0
collision=0 @ time=1628814469
re: rxl=0 rxo=0 rxc=0 rxf=0 rxfi=0 rxm=0
te: txa=0 txc=0 txfi=0 txh=0 txw=0
misc rxc=0 txc=0
input_type=0 state=3 arp_entry=0 refcnt=25
Traffic is sent from both PC1 and PC2 to PC4. PC1 to PC4 traffic is marked with class ID 2 and low priority, and PC2 to
PC4 traffic is marked with class ID 3 and high priority. Both class 2 and 3 will be allocated their guaranteed bandwidth
first, using up 10% and 20% respectively. The remaining available bandwidth is used by class 3 since it has a higher
priority. Class 2 uses around 10 Mbps, and class 3 uses around 90 Mbps.
# diagnose netlink interface list port2
if=port2 family=00 type=1 index=20 mtu=1500 link=0 master=0
ref=36 state=start present fw_flags=3800 flags=up broadcast run multicast
Qdisc=mq hw_addr=70:4c:a5:7d:d4:95 broadcast_addr=ff:ff:ff:ff:ff:ff
ingress traffic control:
bandwidth=100000(kbps) lock_hit=181 default_class=2 n_active_class=4
class-id=2 allocated-bandwidth=10000(kbps) guaranteed-bandwidth=10000
(kbps)
max-bandwidth=60000(kbps) current-bandwidth=10001(kbps)
priority=low forwarded_bytes=1799482K
dropped_packets=5998K dropped_bytes=7965553K
class-id=5 allocated-bandwidth=1000(kbps) guaranteed-bandwidth=10000(kbps)
max-bandwidth=50000(kbps) current-bandwidth=0(kbps)
priority=medium forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
class-id=3 allocated-bandwidth=88000(kbps) guaranteed-bandwidth=20000
(kbps)
max-bandwidth=100000(kbps) current-bandwidth=88000(kbps)
priority=high forwarded_bytes=345039K
dropped_packets=324K dropped_bytes=430862K
class-id=4 allocated-bandwidth=1000(kbps) guaranteed-bandwidth=30000(kbps)
max-bandwidth=100000(kbps) current-bandwidth=0(kbps)
priority=high forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
stat: rxp=181269891 txp=2433428 rxb=205136511596 txb=2771214402 rxe=0 txe=0 rxd=0 txd=0 mc=0
collision=0 @ time=1628815849
re: rxl=0 rxo=0 rxc=0 rxf=0 rxfi=0 rxm=0
te: txa=0 txc=0 txfi=0 txh=0 txw=0
misc rxc=0 txc=0
input_type=0 state=3 arp_entry=0 refcnt=36
l PC1 to PC4 traffic is assigned class 2 with low priority, and a guaranteed bandwidth of 10 Mbps.
l PC2 to PC4 traffic is assigned class 3 with high priority, and a guaranteed bandwidth of 20 Mbps.
l PC2 to PC5 traffic is assigned class 4 with high priority, and a guaranteed bandwidth of 30 Mbps.
All classes will be allocated their guaranteed bandwidth first, using up 10 Mbps, 20 Mbps, and 30 Mbps respectively. The
remaining available bandwidth (40 Mbps) is shared by class 3 and class 4 based on their guaranteed bandwidth ratio of
20:30.
l Class 3’s share of the remaining 40 Mbps traffic = 40 × 20/(20 + 30) =16 Mpbs
l Class 4’s share of the remaining 40 Mbps traffic = 40 × 30/(20 + 30) =24 Mpbs
Each class is allocated roughly the following bandwidth:
l Class 2: 10 Mbps
l Class 3: 20 Mbps + 16 Mbps = 36 Mbps
l Class 4: 30 Mbps + 24 Mbps = 54 Mbps
# diagnose netlink interface list port2
if=port2 family=00 type=1 index=20 mtu=1500 link=0 master=0
ref=27 state=start present fw_flags=3800 flags=up broadcast run multicast
Qdisc=mq hw_addr=70:4c:a5:7d:d4:95 broadcast_addr=ff:ff:ff:ff:ff:ff
ingress traffic control:
bandwidth=100000(kbps) lock_hit=148731 default_class=2 n_active_class=4
class-id=2 allocated-bandwidth=10000(kbps) guaranteed-bandwidth=10000
(kbps)
max-bandwidth=60000(kbps) current-bandwidth=10004(kbps)
priority=low forwarded_bytes=2267956K
dropped_packets=10389K dropped_bytes=13796469K
class-id=5 allocated-bandwidth=1000(kbps) guaranteed-bandwidth=10000(kbps)
max-bandwidth=50000(kbps) current-bandwidth=0(kbps)
priority=medium forwarded_bytes=0
dropped_packets=0 dropped_bytes=0
class-id=3 allocated-bandwidth=35000(kbps) guaranteed-bandwidth=20000
(kbps)
max-bandwidth=100000(kbps) current-bandwidth=35729(kbps)
priority=high forwarded_bytes=2119502K
dropped_packets=6020K dropped_bytes=7994926K
class-id=4 allocated-bandwidth=54000(kbps) guaranteed-bandwidth=30000
(kbps)
max-bandwidth=100000(kbps) current-bandwidth=53907(kbps)
priority=high forwarded_bytes=902415K
dropped_packets=4141K dropped_bytes=5499248K
stat: rxp=197827723 txp=2433885 rxb=227356779526 txb=2771602657 rxe=0 txe=0 rxd=0 txd=0 mc=0
collision=0 @ time=1628816440
re: rxl=0 rxo=0 rxc=0 rxf=0 rxfi=0 rxm=0
te: txa=0 txc=0 txfi=0 txh=0 txw=0
misc rxc=0 txc=0
input_type=0 state=3 arp_entry=0 refcnt=27
Zero Trust Network Access (ZTNA) is an access control method that uses client device identification, authentication, and
Zero Trust tags to provide role-based application access. It gives administrators the flexibility to manage network access
for On-net local users and Off-net remote users. Access to applications is granted only after device verification,
authenticating the user’s identity, authorizing the user, and then performing context based posture checks using Zero
Trust tags.
Traditionally, a user and a device have different sets of rules for on-net access and off-net VPN access to company
resources. With a distributed workforce and access that spans company networks, data centers, and cloud, managing
the rules can become complex. User experience is also affected when multiple VPNs are needed to get to various
resources. ZTNA can improve this experience.
l ZTNA access proxy allows users to securely access resources through an SSL encrypted access proxy. This
simplifies remote access by eliminating the use of VPNs.
l IP/MAC based access control combines IP/MAC with uses ZTNA tags for identification and security posture check
to implement role-based zero trust access.
When On-net and Off-net FortiClient endpoints register to FortiClient EMS, device information, log on user information,
and security posture are all shared over ZTNA telemetry with the EMS server. Clients also make a certificate signing
request to obtain a client certificate from the EMS that is acting as the ZTNA Certificate Authority (CA).
Based on the client information, EMS applies matching Zero Trust tagging rules to tag the clients. These tags, and the
client certificate information, are synchronized with the FortiGate in real-time. This allows the FortiGate to verify the
client's identity using the client certificate, and grant access based on the ZTNA tags applied in the ZTNA rule.
For more information, see Establish device identity and trust context with FortiClient EMS on page 921.
Access proxy
The FortiGate access proxy can proxy HTTP, SSH, RDP, SMB, FTP, and other TCP traffic over secure connections with
the client. This enables seamless access from the client to the protected servers, without needing to form IPsec or SSL
VPN tunnels.
The FortiGate HTTPS access proxy works as a reverse proxy for the HTTP server. When a client connects to a webpage
hosted by the protected server, the address resolves to the FortiGate’s access proxy VIP. The FortiGate proxies the
connection and takes steps to authenticate the user. It prompts the user for their certificate on the browser, and verifies
this against the ZTNA endpoint record that is synchronized from the EMS. If an authentication scheme, such as SAML
authentication, is configured, the client is redirected to a captive portal for sign-on. If this passes, traffic is allowed based
on the ZTNA rules, and the FortiGate returns the webpage to the client.
For example configurations, see ZTNA HTTPS access proxy example on page 929, ZTNA HTTPS access proxy with
basic authentication example on page 936, and ZTNA proxy access with SAML authentication example on page 954.
The TCP forwarding access proxy works as a special type of HTTPS reverse proxy. Instead of proxying traffic to a web
server, TCP traffic is tunneled between the client and the access proxy over HTTPS, and forwarded to the protected
resource. The FortiClient endpoint configures the ZTNA connection by pointing to the proxy gateway, and then
specifying the destination host that it wants to reach. An HTTPS connection is made to the FortiGate’s access proxy VIP,
where the client certificate is verified and access is granted based on the ZTNA rules. TCP traffic is forwarded from the
FortiGate to the protected resource, and an end to end connection is established. To reduce overhead, you can disable
access proxy encryption on the client, as some TCP protocols, like RDP, are already secure. The TCP forwarding
access proxy supports UTM scanning and deep inspection for HTTP, HTTPS, SMTP, SMTPS, IMAP, IMAPS, POP3,
POP3S, SMB, and CIFS.
For an example configuration, see ZTNA TCP forwarding access proxy example on page 943.
The SSH access proxy provides some benefits to proxying SSH connections over TFAP, including allowing SSH deep
inspection, performing optional SSH host-key validation, and allowing one time user authentication to authenticate the
ZTNA SSH access proxy connection and SSH server connection.
For an example configuration, see ZTNA SSH access proxy example on page 970.
The basic components that are required to configure ZTNA access proxy on the FortiGate are:
1. FortiClient EMS fabric connector and ZTNA tags.
2. FortiClient EMS running version 7.0.0 or later or FortiClient EMS Cloud.
3. FortiClient running 7.0.0 or later.
4. ZTNA server
5. ZTNA rule
To deploy a ZTNA access proxy, configure the following components on the FortiGate:
To configure ZTNA in the GUI, go to System > Feature Visibility and enable Zero Trust
Network Access.
ZTNA tags
After the FortiGate connects to the FortiClient EMS, it automatically synchronizes ZTNA tags. ZTNA tags are generated
from tagging rules configured on the FortiClient EMS. These tagging rules are based on various posture checks that can
be applied on the endpoints. See Endpoint Posture Check Reference.
1. Go to Policy & Objects > ZTNA and select the ZTNA Tags tab.
2. Hover the cursor over a tag name to view more information about the tag, such as its resolved addresses.
1. Go to Policy & Objects > ZTNA and select the ZTNA Tags tab.
2. Click Create New Group.
3. Enter a name for the group and select the group members.
4. Click OK.
To configure a ZTNA server, define the access proxy VIP and the real servers that clients will connect to. The access
proxy VIP is the FortiGate ZTNA gateway that clients make HTTPS connections to. The service/server mappings define
the virtual host matching rules and the real server mappings of the HTTPS requests.
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Enter a name for the server.
4. Select an external interface, enter the external IP address, and select the external port that the clients will connect
to.
5. Select the Default certificate. Clients will be presented with this certificate when they connect to the access proxy
VIP.
e. If multiple servers will be configured, enable Load balancing and select an algorithm.
f. Add a server:
i. In the Servers table, click Create New.
ii. Enter the server IP address and port number.
iii. Set the server status.
A ZTNA rule is a proxy policy used to enforce access control. ZTNA tags or tag groups can be defined to enforce zero
trust role based access. Security profiles can be configured to protect this traffic.
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Click Create New.
3. Enter a name for the rule.
4. Select an Incoming Interface and Source.
5. Add the ZTNA tags or tag groups that are allowed access. If multiple tags are included, select the Match ZTNA Tags
method, Any or All.
6. Select the ZTNA Server.
7. Select the Destination.
The transparent and poolname settings cannot be enabled at the same time. Use one
setting at a time when configuring ZTNA rules.
Optional authentication
To configure authentication to the access proxy, you must configure an authentication scheme and authentication rule in
the GUI or CLI. They are used to authenticate proxy-based policies, similar to configuring authentication for explicit and
transparent proxy.
The authentication scheme defines the method of authentication that is applied. For ZTNA, basic HTTP and SAML
methods are supported. Each method has additional settings to define the data source to check against. For example,
with basic HTTP authentication, a user database can reference an LDAP server, RADIUS server, local database, or
other supported authentication servers that the user is authenticated against.
The authentication rule defines the proxy sources and destinations that require authentication, and which authentication
scheme to apply. For ZTNA, active authentication method is supported. The active authentication method references a
scheme where users are actively prompted for authentication, like with basic authentication.
After the authentication rule triggers the method to authenticate the user, a successful authentication returns the groups
that the user belongs to. In the ZTNA rule and proxy policy you can define a user or user group as the allowed source.
Only users that match that user or group are allowed through the proxy policy.
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Edit an existing rule, or click Create New to create a new rule.
3. Click in the Source field, select the User tab, and select the users and user groups that will be allowed access.
4. Configure the remaining settings as required.
5. Click OK.
The authentication rule and scheme defines the method used to authenticate users. With basic HTTP authentication, a
sign in prompt is shown after the client certificate prompt. After the authentication passes, the returned groups that the
user is a member of are checked against the user groups that are defined in the ZTNA rule. If a group matches, then the
user is allowed access after passing a posture check.
For basic setup information, see ZTNA HTTPS access proxy with basic authentication example on page 936.
For advanced setup information, see ZTNA proxy access with SAML authentication example on page 954 and ZTNA
access proxy with SAML and MFA using FortiAuthenticator example on page 977.
How device identity is established through client certificates, and how device trust context is established between
FortiClient, FortiClient EMS, and the FortiGate, are integral to ZTNA.
Device roles
FortiClient
FortiClient endpoints provide the following information to FortiClient EMS when they register to the EMS:
l Device information (network details, operating system, model, and others)
l Logged on user information
l Security posture (On-net/Off-net, antivirus software, vulnerability status, and others)
It also requests and obtains a client device certificate from the EMS ZTNA Certificate Authority (CA) when it registers to
FortiClient EMS. The client uses this certificate to identify itself to the FortiGate.
FortiClient EMS
FortiClient EMS issues and signs the client certificate with the FortiClient UID, certificate serial number, and EMS serial
number. The certificate is then synchronized to the FortiGate. EMS also shares its EMS ZTNA CA certificate with the
FortiGate, so that the FortiGate can use it to authenticate the clients.
FortiClient EMS uses zero trust tagging rules to tag endpoints based on the information that it has on each endpoint. The
tags are also shared with the FortiGate. See Endpoint Posture Check Reference for a list of the endpoint posture checks
that EMS can perform.
Each ZTNA tag creates two firewall addresses in all VDOMs on a FortiGate. One firewall
address is the IP address, and the other firewall address is the MAC address. Because each
FortiGate model has a global limit and a per-VDOM limit for the maximum number of
supported firewall addresses, the FortiGate model determines the maximum number of ZTNA
tags allowable by that unit, which is the maximum number of firewall address divided by two.
For each FortiGate model's limit, see the Maximum Values table.
FortiGate
The FortiGate maintains a continuous connection to the EMS server to synchronize endpoint device information,
including primarily:
l FortiClient UID
l Client certificate SN
l EMS SN
l Device credentials (user/domain)
l Network details (IP and MAC address and routing to the FortiGate)
When a device's information changes, such as when a client moves from on-net to off-net, or their security posture
changes, EMS is updated with the new device information and then updates the FortiGate. The FortiGate's WAD
daemon can use this information when processing ZTNA traffic. If an endpoint's security posture change causes it to no
longer match the ZTNA rule criteria on an existing session, then the session is terminated.
FortiClient EMS has a default_ZTNARootCA certificate generated by default that the ZTNA CA uses to sign CSRs from
the FortiClient endpoints. Clicking the refresh button revokes and updates the root CA, forcing updates to the FortiGate
and FortiClient endpoints by generating new certificates for each client.
Do not confuse the EMS CA certificate (ZTNA) with the SSL certificate. The latter is the server
certificate that is used by EMS for HTTPS access and fabric connectivity to the EMS server.
EMS can also manage individual client certificates. To revoke the current client certificate that is used by the endpoint:
go to Endpoint > All Endpoints, select the client, and click Action > Revoke Client Certificate.
In Windows, FortiClient automatically installs certificates into the certificate store. The certificate information in the store,
such as certificate UID and SN, should match the information on EMS and the FortiGate.
To locate certificates on other operating systems, consult the vendor documentation.
To locate the client certificate and EMS ZTNA CA certificate on a Windows PC:
1. In the Windows search box, enter user certificate and click Manage user certificates from the results.
2. In the certificate manager, go to Certificates - Current User > Personal > Certificates and find the certificate that is
issued by the FortiClient EMS.
The following diagnose commands help to verify the presence of matching endpoint record, and information such as the
client UID, client certificate SN, and EMS certificate SN on the FortiGate. If any of the information is missing or
incomplete, client certificate authentication might fail because the corresponding endpoint entry is not found. More in-
depth diagnosis would be needed to determine the reason for the missing records.
Command Description
# diagnose endpoint Show the endpoint record list. Optionally, filter by the endpoint IP address.
record list <ip>
# diagnose endpoint lls- Query endpoints by client UID.
comm send ztna find-
uid <uid>
# diagnose endpoint lls- Query endpoints by the client IP-VDOM pair.
comm send ztna find-
ip-vdom <ip> <vdom>
# diagnose wad dev query- Query from WAD diagnose command by UID.
by uid <uid>
# diagnose wad dev query- Query from WAD diagnose command by IP address.
by ipv4 <ip>
# diagnose test Check the FortiClient NAC daemon ZTNA and route cache.
application fcnacd 7
# diagnose test
application fcnacd 8
A client certificate is obtained when an endpoint registers to EMS. FortiClient automatically submits a CSR request and
the FortiClient EMS signs and returns the client certificate. This certificate is stored in the operating system's certificate
store for subsequent connections. The endpoint information is synchronized between the FortiGate and FortiClient EMS.
When an endpoint disconnects or is unregistered from EMS, its certificate is removed from the certificate store and
revoked on EMS. The endpoint obtains a certificate again when it reconnected the EMS.
By default, client certificate authentication is enabled on the access proxy, so when the HTTPS request is received the
FortiGate's WAD process challenges the client to identify itself with its certificate. The FortiGate makes a decision based
on the following possibilities:
1. If the client responds with the correct certificate that the client UID and certificate SN can be extracted from:
l If the client UID and certificate SN match the record on the FortiGate, the client is allowed to continue with the
ZTNA proxy rule processing.
l If the client UID and certificate SN do not match the record on the FortiGate, the client is blocked from further
ZTNA proxy rule processing.
2. If the client cancels and responds with an empty client certificate:
l If empty-cert-action is set to accept, the client is allowed to continue with ZTNA proxy rule processing.
l If empty-cert-action is set to block, the client is blocked from further ZTNA proxy rule processing.
Example
In this example, a client connects to qa.fortinet.com and is prompted for a client certificate.
l client-cert is set to enable, and empty-cert-action is set to block.
l The ZTNA server is configured, and a ZTNA rule is set to allow this client.
l The domain resolves to the FortiGate access proxy VIP.
Scenario 1:
When prompted for the client certificate, the client clicks OK and provides a valid certificate that is verified by the
FortiGate.
Result:
The client passes SSL certificate authentication and is allowed to access the website.
Scenario 2:
When prompted for the client certificate, the client clicks Cancel, resulting in an empty certificate response to the access
proxy.
Result:
Because the certificate response is empty and empty-cert-action is set to block, the WAD daemon blocks the
connection.
Currently, the Microsoft Edge, Google Chrome, and Safari browsers are supported by ZTNA.
In this example, an HTTPS access proxy is configured to demonstrate its function as a reverse proxy on behalf of the
web server it is protecting. It verifies user identity, device identity, and trust context, before granting access to the
protected source.
This example shows access control that allows or denies traffic based on ZTNA tags. Traffic is allowed when the
FortiClient endpoint is tagged as Low risk, and denied when the endpoint is tagged with Malicious-File-Detected.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
To configure ZTNA in the GUI, go to System > Feature Visibility and enable Zero Trust
Network Access.
6. Click Save.
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Set Name to WIN2K16-P1.
4. Configure the network settings:
a. Set External interface to port1.
b. Set External IP to 192.168.2.86.
c. Set External port to 8443.
5. Select the Default certificate. Clients will be presented with this certificate when they connect to the access proxy
VIP.
6. Add server mapping:
a. In the Service/server mapping table, click Create New.
b. Set Service to HTTPS.
c. Set Virtual Host to Any Host.
d. Configure the path as needed. For example, to map to winserver.fgdocs.com/fortigate, enter /fortigate.
e. Add a server:
i. In the Servers table, click Create New.
ii. Set IP to 192.168.20.6.
iii. Set Port to 443.
iv. Click OK.
f. Click OK.
7. Click OK.
To configure ZTNA rules to allow and deny traffic based on ZTNA tags in the GUI:
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Create a rule to deny traffic:
a. Click Create New.
b. Set Name to ZTNA-Deny-malicious.
c. Set Incoming Interface to port1.
d. Set Source to all.
e. Add the ZTNA tag Malicious-File-Detected.
This tag is dynamically retrieved from EMS when you first created the Zero Trust Tagging Rule.
f. Select the ZTNA server WIN2K16-P1.
g. Set Action to DENY.
h. Enable Log Violation Traffic.
i. Click OK.
3. Create a rule to allow traffic:
a. Click Create New.
b. Set Name to proxy-WIN2K16-P1.
After FortiClient EMS and FortiGate are configured, the HTTPS access proxy remote connection can be tested.
Access allowed:
The certificate is in the User Configuration store, under Personal > Certificates. The details show the SN of the
certificate, which matches the record on the FortiClient EMS and the FortiGate.
Access denied:
1. On the remote Windows PC, trigger the Zero Trust Tagging Rule by creating the file in C:\virus.txt.
2. Open a browser and enter the address http://winserver.fgdocs.com:8443.
3. The client is verified by the FortiGate to authenticate your identity.
4. FortiGate checks your security posture. Because EMS has tagged the PC with the Malicious-File-Detected tag, it
matches the ZTNA-Deny-malicious rule.
5. You are denied access to the web server.
Access allowed:
Access denied:
This example expands on the previous example (ZTNA HTTPS access proxy example on page 929), adding LDAP
authentication to the ZTNA rule. Users are allowed based on passing the client certificate authentication check, user
authentication, and security posture check.
Users that are in the AD security group ALLOWED-VPN are allowed access to the access proxy. Users that are not part
of this security group are not allowed access.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
LDAP/Active Directory Users and Groups:
l Domain: KLHOME.local
l Users (Groups):
l radCurtis (Domain Users, ALLOWED-VPN)
l radKeith (Domain Users)
1. Go to User & Authentication > LDAP Servers and click Create New.
2. Configure the following settings:
Name WIN2K16-KLHOME-LDAPS
Server identity check Optionally, enable to verify the domain name or IP address against the server
certificate.
To configure a remote user group from the LDAP server in the GUI:
1. Go to User & Authentication > User Groups and click Create New.
2. Set the name to KLHOME-ALLOWED-VPN.
3. Set Type to Firewall.
4. In the Remote Groups table click Add:
a. Set Remote Server to WIN2K16-KLHOME-LDAPS.
b. Locate the ALLOWED-VPN group, right-click on it, and click Add Selected.
c. Click OK.
5. Click OK.
To configure a remote user group from the LDAP server in the CLI:
After the LDAP server and user group have been configured, an authentication scheme and rule must be configured.
To configure authentication schemes and rules in the GUI, go to System > Feature Visibility
and enable Explicit Proxy.
Authentication scheme
The authentication scheme defines the method of authentication that is applied. In this example, basic HTTP
authentication is used so that users are prompted for a username and password the first time that they connect to a
website through the HTTPS access proxy.
1. Go to Policy & Objects > Authentication Rules and click Create New > Authentication Scheme.
2. Set the name to ZTNA-Auth-scheme.
3. Set Method to Basic.
4. Set User database to Other and select WIN2K16-KLHOME-LDAPS as the LDAP server.
5. Click OK.
Authentication rule
The authentication rule defines the proxy sources and destination that require authentication, and what authentication
scheme is applied. In this example, active authentication through the basic HTTP prompt is used and applied to all
sources.
1. Go to Policy & Objects > Authentication Rules and click Create New > Authentication Rule.
2. Set the name to ZTNA-Auth-rule.
3. Set Source Address to all.
4. Set Protocol to HTTP.
5. Enable Authentication Scheme and select ZTNA-Auth-scheme.
6. Click OK.
A user or user group must be applied to the ZTNA rule that you need to control user access to. The authenticated user
from the authentication scheme and rule must match the user or user group in the ZTNA rule.
In this example, the user group is applied to the two ZTNA rules that were configured in ZTNA HTTPS access proxy
example on page 929.
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Edit the ZTNA-Deny-malicious rule.
3. Click in the Source field, select the User tab, select the KLHOME-ALLOWED-VPN group, then click Close.
4. Click OK.
5. Edit the proxy-WIN2K16-P1 rule.
6. Click in the Source field, select the User tab, select the KLHOME-ALLOWED-VPN group, then click Close.
7. Click OK.
Testing remote access to the HTTPS access proxy with user authentication
1. On a remote Windows PC, open the FortiClient app, select the Zero Trust Telemetry tab, and confirm that you are
connected to the EMS server.
2. In a browser, enter the address of the server and the access port.
If entering an FQDN, make sure that DNS can resolve the address to the IP address of the FortiGate. In this
example, winserver.fgdocs.com resolves to 192.168.2.86.
3. When the browser asks for the client certificate to use, select the EMS signed certificate, then click OK.
The client certificate is verified by the FortiGate to authenticate your identity.
4. When prompted, enter the username radCurtis and the password, and click Sign in.
As radCurtis is a member of the ALLOWED-VPN group in Active Directory, it will match the KLHOME-ALLOWED-
VPN user group. After the user authentication passes, the FortiGate performs a posture check on the ZTNA group.
When that passes, you are allowed access to the website.
10.10.10.20, radCurtis
type: fw, id: 0, duration: 13, idled: 13
The user_name is the windows log in username learned by FortiClient. It might not match the
username used in firewall user authentication.
1. If scenario 1 has just been tested, log in to the FortiGate and deauthenticate the user:
a. Go to Dashboard > Users & Devices and expand the Firewall Users widget.
b. Right-click on the user radCurtis and select deauthenticate.
2. On a remote Windows PC, open the FortiClient app, select the Zero Trust Telemetry tab, and confirm that you are
connected to the EMS server.
3. In a browser, enter the address winserver.fgdocs.com.
4. When the browser asks for the client certificate to use, select the EMS signed certificate, then click OK. This option
might not appear if you have already selected the certificate when testing scenario 1.
The client certificate is verified by the FortiGate to authenticate your identity.
5. When prompted, enter the username radKeith and the password, and click Sign in.
As radKeith is not a member of the ALLOWED-VPN group in Active Directory, it will not match the KLHOME-
ALLOWED-VPN user group. Because no other policies are matched, this user is implicitly denied
Go to Dashboard > Users & Devices, expand the Firewall Users widget, and confirm that user radKeith is listed, but no
applicable user group is returned.
# execute log display
In this example, a TCP forwarding access proxy (TFAP) is configured to demonstrate an HTTPS reverse proxy that
forwards TCP traffic to the designated resource. The access proxy tunnels TCP traffic between the client and the
FortiGate over HTTPS, and forwards the TCP traffic to the protected resource. It verifies user identity, device identity,
and trust context, before granting access to the protected source.
By default, encryption is disabled on FortiClient ZTNA rules, as this reduces overhead for end to end protocols that are
already secure. For insecure end to end protocols, enable encryption.
RDP (Remote Desktop Protocol) and SMB (Server Message Block) protocol access are configured to one server, and
SSH access to the other server.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
To configure the ZTNA server for TCP access proxy in the GUI:
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Set Name to ZTNA-tcp-server.
4. Configure the network settings:
a. Set External interface to port3.
b. Set External IP to 10.0.3.11.
c. Set External port to 8443.
5. Select the Default certificate. Clients will be presented with this certificate when they connect to the access proxy
VIP.
6. Add server mapping:
a. In the Service/server mapping table, click Create New.
b. Set Service to TCP Forwarding.
c. Add a server:
i. In the Servers table, click Create New.
ii. Create a new address for the FortiAnalyzer server at 10.88.0.2 and use it as the address.
iii. Set Port to 22.
iv. Click OK.
d. Add another server:
i. In the Servers table, click Create New.
ii. Create a new address for the winserver at 10.88.0.1 and use it as the address.
iii. Set Port to 445, 3389 to correspond to SMB and RDP.
iv. Click OK.
e. Click OK.
7. Click OK.
To configure the ZTNA rule to allow traffic to the TCP access proxy in the GUI:
1. Go to Policy & Objects > ZTNA, select the ZTNA Rules tab, and click Create New.
2. Set Name to ZTNA_remote.
3. Set Incoming Interface to port3.
4. Set Source to all.
5. Select the ZTNA server ZTNA-tcp-server.
6. Configure the remaining options as needed.
7. Click OK.
The mapped port (mappedport) restricts the mapping to the specified port or port range. If mappedport is not
specified, then any port will be matched.
ZTNA TCP forwarding rules can be provisioned from the EMS server. See Provisioning ZTNA
TCP forwarding rules via EMS for details.
6. Click Create.
7. Create a second rule with the following settings:
l Rule Name: RDP_winserver
l Destination Host: 10.88.0.1:3389
l Proxy Gateway: 10.0.3.11:8443
l Encryption: Enabled
After creating the ZTNA connection rules, you can SSH, RDP, and SMB directly to the server IP address and port.
Logs
# exec log filter category 0
# exec log filter field subtype ztna
# exec log display
SMB:
SSH:
RDP:
TCP forwarding access proxy supports communication between the client and the access proxy without SSL/TLS
encryption. The connection still begins with a TLS handshake. The client uses the HTTP 101 response to switch
protocols and remove the HTTPS stack. Further end to end communication between the client and server are
encapsulated in the specified TCP port, but not encrypted by the access proxy. This improves performance by reducing
the overhead of encrypting an already secured underlying protocol, such as RDP, SSH, or FTPS. Users should still
enable the encryption option for end to end protocols that are insecure.
In this example, the encryption option to access the web server on HTTP/8080 is disabled to show that traffic for an
insecure connection protocol can be viewed in plain text in a protocol analyzer (such as Wireshark). In a real life
application, the encryption option should be used for an insecure protocol.
To configure the ZTNA server for TCP access proxy in the GUI:
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Set Name to ZTNA-tcp-server.
4. Configure the network settings:
a. Set External interface to port3.
b. Set External IP to 10.0.3.11.
c. Set External port to 8443.
5. Select the Default certificate. Clients will be presented with this certificate when they connect to the access proxy
VIP.
6. Add server mapping:
a. In the Service/server mapping table, click Create New.
b. Set Service to TCP Forwarding.
c. Add a server:
i. In the Servers table, click Create New.
ii. Create a new address for the winserver at 10.88.0.1 and use it as the address.
iii. Click OK.
d. Click OK.
7. Click OK.
To configure the ZTNA rule to allow traffic to the TCP access proxy in the GUI:
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Click Create New.
3. Set Name to ZTNA-TCP.
4. Set Incoming Interface to port3.
5. Set Source to all.
6. Select the ZTNA server ZTNA-tcp-server.
7. Configure the remaining options as needed.
8. Click OK.
next
end
next
end
next
end
The mapped port (mappedport) is not specified so that it will map any ports that are defined in FortiClient’s ZTNA
connection rule.
ZTNA TCP forwarding rules can be provisioned from the EMS server. See Provisioning ZTNA
TCP forwarding rules via EMS for details.
6. Click Create.
After creating the ZTNA connection rule, open a browser and access the web page at http://10.88.0.1:8080.
2. Use the following WAD debugs to can capture the details about the connection as seen by the FortiGate WAD
daemon. Notice that the HTTP request has tls=0, indicating that the proxy connection between the client and access
proxy is not encrypted.
3. On the client PC, perform a packet capture to review the traffic flow between the client (10.0.3.2) and the access
proxy (10.0.3.11) in detail. While the traffic is encapsulated in port 443, the underlying HTTP/8080 requests and
traffic are decoded as clear text.
Packet capture of traffic between 10.0.3.2:60824<->10.0.3.11:443:
Traffic stream:
In this example, an HTTPS access proxy is configured, and SAML authentication is applied to authenticate the client.
The FortiGate acts as the SAML SP and a SAML authenticator serves as the IdP. In addition to verifying the user and
device identity with the client certificate, the user is also authorized based on user credentials to establish a trust context
before granting access to the protected resource.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
To configure an LDAP server and an LDAP server group to verify user groups:
To configure the authentication rule and scheme to match the new SAML server:
1. On a client PC, try to access the webpage through the HTTPS access proxy. For example, go to
http://172.18.62.32:7831 in a browser.
2. The client PC is prompted for a client certificate. After the certificate is validated, you are redirected to a SAML log in
portal.
3. Enter your user credentials. The SAML server authenticates and sends a SAML assertion response message to the
FortiGate.
4. The FortiGate queries the LDAP server for the user group, and then verifies the user group against the groups or
groups defined in the proxy policy.
5. The user is proxied to the webpage on the real web server.
Use the following command to check the user information after the user has been authenticated:
# diagnose wad user list
ID: 7, VDOM: vdom1, IPv4: 10.1.100.143
user name : [email protected]
worker : 0
duration : 124
auth_type : Session
auth_method : SAML
pol_id : 6
g_id : 13
user_based : 0
expire : no
LAN:
bytes_in=25953 bytes_out=14158
WAN:
bytes_in=8828 bytes_out=6830
Event log:
1: date=2021-03-24 time=19:02:21 eventtime=1616637742066893182 tz="-0700" logid="0102043025"
type="event" subtype="user" level="notice" vd="vdom1" logdesc="Explicit proxy authentication
successful" srcip=10.1.100.143 dstip=172.18.62.32 authid="saml" user="[email protected]"
group="N/A" authproto="HTTP(10.1.100.143)" action="authentication" status="success"
reason="Authentication succeeded" msg="User [email protected] succeeded in authentication"
Traffic log:
1: date=2021-03-24 time=19:09:06 eventtime=1616638146541253587 tz="-0700" logid="0000000010"
type="traffic" subtype="forward" level="notice" vd="vdom1" srcip=10.1.100.143 srcport=58084
srcintf="port10" srcintfrole="undefined" dstcountry="Reserved" srccountry="Reserved"
dstip=172.18.62.25 dstport=443 dstintf="vdom1" dstintfrole="undefined" sessionid=8028
service="HTTPS" wanoptapptype="web-proxy" proto=6 action="accept" policyid=6
policytype="proxy-policy" poluuid="8dcfe762-8d0b-51eb-82bf-bfbee59b89f2" duration=8
user="[email protected]" group="ldap-group-saml" authserver="ldap-10.1.100.198"
wanin=10268 rcvdbyte=10268 wanout=6723 lanin=7873 sentbyte=7873 lanout=10555
appcat="unscanned"
In this example, firewall policies are configured that use ZTNA tags to control access between on-net devices and an
internal web server. This mode does not require the use of the access proxy, and only uses ZTNA tags for access
control. Traffic is passed when the FortiClient endpoint is tagged as Low risk only. Traffic is denied when the FortiClient
endpoint is tagged with Malicious-File-Detected.
This example assumes that the FortiGate EMS fabric connector is already successfully connected.
To configure ZTNA in the GUI, go to System > Feature Visibility and enable Zero Trust
Network Access.
6. Click Save.
To configure a firewall policy with IP/MAC based access control to deny traffic in the GUI:
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Set Name to block-internal-malicious-access.
3. Set Incoming Interface to default.35.
4. Set Outgoing Interface to port3.
5. Set Source to all.
6. Set IP/MAC Based Access Control to the Malicious-File-Detected tag.
7. Set Destination to all.
8. Set Service to ALL.
9. Set Action to DENY.
10. Enable Log Violation Traffic.
11. Configuring the remaining settings as needed.
12. Click OK.
To configure a firewall policy with IP/MAC based access control to allow access in the GUI:
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Set Name to allow-internal-access.
3. Set Incoming Interface to default.35.
4. Set Outgoing Interface to port3.
5. Set Source to all.
6. Set IP/MAC Based Access Control to the Low tag.
7. Set Destination to all.
8. Set Service to ALL.
9. Set Action to ACCEPT.
10. Enable Log Allowed Traffic and set it to All Sessions.
11. Configuring the remaining settings as needed.
12. Click OK.
To configure firewall policies with IP/MAC based access control to block and allow access in the CLI:
Testing the access to the web server from the on-net client endpoint
Access allowed:
Access denied:
1. On the remote Windows PC, trigger the Zero Trust Tagging Rule by creating the file in C:\virus.txt.
2. Open a browser and enter the address of the server.
3. FortiGate checks your security posture. Because EMS has tagged the PC with the Malicious-File-Detected tag, it
matches the block-internal-malicious-access firewall policy.
4. You are denied access to the web server.
Access allowed:
Domain:
User: keithli
Cert SN:563DA313367608678A3633E93C574F6F8BCB4A95
EMS SN: FCTEMS0000109188
Routes(1):
- route[0]: IP=192.168.40.8, VDom=root
Tags(2):
- tag[0]: name=all_registered_clients
- tag[1]: name=Low
# diagnose firewall dynamic list
List all dynamic addresses:
FCTEMS0000109188_all_registered_clients: ID(51)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
FCTEMS0000109188_Low: ID(78)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
FCTEMS0000109188_Malicious-File-Detected: ID(190)
…
# diagnose test application fcnacd 7
ZTNA Cache:
-uid F4F3263AEBE54777A6509A8FCCDF9284: { "tags": [ "all_registered_clients", "Low" ], "user_
name": "keithli", "client_cert_sn": "563DA313367608678A3633E93C574F6F8BCB4A95", "gateway_
route_list": [ { "gateway_info": { "fgt_sn": "FGVM04TM21000144", "interface": "default.35",
"vdom": "root" }, "route_info": [ { "ip": "192.168.40.8", "mac": "24-b6-fd-fa-54-c1",
"route_type": "direct" } ] } ], "ems_sn": "FCTEMS0000109188" }
# execute log display
49 logs found.
10 logs returned.
3.5% of logs has been searched.
38: date=2021-03-28 time=23:07:38 eventtime=1616998058790134389 tz="-0700"
logid="0000000013" type="traffic" subtype="forward" level="notice" vd="root"
srcip=192.168.40.8 srcname="Fortinet-KeithL" srcport=51056 srcintf="default.35"
srcintfrole="undefined" dstip=192.168.20.6 dstport=443 dstintf="port3"
dstintfrole="undefined" srcuuid="5445be2e-5d7b-51ea-e2c3-ae6b7855c52f" dstuuid="5445be2e-
5d7b-51ea-e2c3-ae6b7855c52f" srccountry="Reserved" dstcountry="Reserved" sessionid=161585
proto=6 action="close" policyid=30 policytype="policy" poluuid="8f6ea492-9034-51eb-f197-
c00d803b7489" policyname="allow-internal-access" service="HTTPS" trandisp="snat"
transip=192.168.20.5 transport=51056 duration=2 sentbyte=3374 rcvdbyte=107732 sentpkt=50
rcvdpkt=80 fctuid="F4F3263AEBE54777A6509A8FCCDF9284" unauthuser="keithli"
unauthusersource="forticlient" appcat="unscanned" mastersrcmac="24:b6:fd:fa:54:c1"
srcmac="24:b6:fd:fa:54:c1" srcserver=0 dstosname="Windows" dstswversion="10"
masterdstmac="52:54:00:e3:4c:1a" dstmac="52:54:00:e3:4c:1a" dstserver=0
Access denied:
User: keithli
Cert SN:563DA313367608678A3633E93C574F6F8BCB4A95
EMS SN: FCTEMS0000109188
Routes(1):
- route[0]: IP=192.168.40.8, VDom=root
Tags(3):
- tag[0]: name=Malicious-File-Detected
- tag[1]: name=all_registered_clients
- tag[2]: name=Low
# diagnose firewall dynamic list
List all dynamic addresses:
FCTEMS0000109188_all_registered_clients: ID(51)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
FCTEMS0000109188_Low: ID(78)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
FCTEMS0000109188_Malicious-File-Detected: ID(190)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
# diagnose test application fcnacd 7
ZTNA Cache:
-uid F4F3263AEBE54777A6509A8FCCDF9284: { "user_name": "keithli", "client_cert_sn":
"563DA313367608678A3633E93C574F6F8BCB4A95", "gateway_route_list": [ { "gateway_info": {
"fgt_sn": "FGVM04TM21000144", "interface": "default.35", "vdom": "root" }, "route_info": [ {
"ip": "192.168.40.8", "mac": "24-b6-fd-fa-54-c1", "route_type": "direct" } ] } ], "ems_sn":
"FCTEMS0000109188", "tags": [ "Malicious-File-Detected", "all_registered_clients", "Low" ] }
# execute log display
49 logs found.
10 logs returned.
3.5% of logs has been searched.
config api-gateway6
edit 1
set virtual-host "vhost_ipv6"
config realservers
edit 1
set ip 2000:172:16:200::209
next
end
next
end
next
end
1. On an IPv6 client, ensure that the address qa6.test.com resolves to the IPv6 VIP address of 2000:172:18:62::66.
2. In a browser, connect to https://qa6.test.com:6443.
3. After device certificate verification, the browser will open up the webpage on the IPv6 real server.
4. In the Forward Traffic Log, the following log is available:
1. On an IPv6 client, ensure that the address qa6.test.com resolves to the IPv6 VIP address of 2000:172:18:62::66.
2. In a browser, connect to https://qa6.test.com:6443.
3. After device certificate verification, the browser will open up the webpage on the IPv4 real server.
4. In the Forward Traffic Log, the following log is available:
2: date=2021-06-25 time=13:46:54 eventtime=1624654014129553521 tz="-0700"
logid="0000000024" type="traffic" subtype="forward" level="notice" vd="root"
srcip=2000:10:1:100::214 srcport=60530 srcintf="port2" srcintfrole="undefined"
dstcountry="Reserved" srccountry="Reserved" dstip=172.16.200.209 dstport=443
dstintf="root" dstintfrole="undefined" sessionid=219 service="HTTPS" proto=6
action="accept" policyid=1 policytype="proxy-policy" poluuid="7afdac8c-d5db-51eb-dfc6-
67bb86e4bdcf" policyname="ztna_rule" duration=5 wanin=2028 rcvdbyte=2028 wanout=1321
lanin=1236 sentbyte=1236 lanout=947 appcat="unscanned" utmaction="allow" countweb=1
utmref=65443-14
1. On an IPv4 client, ensure that the address qa6.test.com resolves to the IPv4 VIP address of 172.18.62.66.
2. In a browser, connect to https://qa6.test.com:6443.
3. After device certificate verification, the browser will open up the webpage on the IPv6 real server.
4. In the Forward Traffic Log, the following log is available:
1: date=2021-06-25 time=13:52:30 eventtime=1624654350689576485 tz="-0700"
logid="0000000024" type="traffic" subtype="forward" level="notice" vd="root"
srcip=10.1.100.206 srcport=53492 srcintf="port2" srcintfrole="undefined"
dstcountry="Reserved" srccountry="Reserved" dstip=2000:172:16:200::209 dstport=443
dstintf="root" dstintfrole="undefined" sessionid=726 service="HTTPS" proto=6
action="accept" policyid=1 policytype="proxy-policy" poluuid="7afdac8c-d5db-51eb-dfc6-
67bb86e4bdcf" policyname="ztna_rule" duration=0 wanin=1901 rcvdbyte=1901 wanout=736
lanin=569 sentbyte=569 lanout=3040 appcat="unscanned" utmaction="allow" countweb=1
utmref=65443-28
ZTNA can be configured with SSH access proxy to provide a seamless SSH connection to the server.
Advantages of using an SSH access proxy instead of a TCP forwarding access proxy include:
l Establishing device trust context with user identity and device identity checks.
l Applying SSH deep inspection to the traffic through the SSH related profile.
l Performing optional SSH host-key validation of the server.
l Using one-time user authentication to authenticate the ZTNA SSH access proxy connection and the SSH server
connection.
To act as a reverse proxy for the SSH server, the FortiGate must perform SSH host-key validation to verify the identity of
the SSH server. The FortiGate does this by storing the public key of the SSH server in its SSH host-key configurations.
When a connection is made to the SSH server, if the public key matches one that is used by the server, then the
connection is established. If there is no match, then the connection fails.
SSH access proxy allows user authentication to occur between the client and the access proxy, while using the same
user credentials to authenticate with the SSH server. The following illustrates how this works:
1. The remote endpoint registers to FortiClient EMS and receives the client certificate.
2. The remote endpoint tries to connect to the SSH access proxy. It must use the same username that is later used for
access proxy authentication.
3. The FortiGate challenges the endpoint with device identity validation.
4. The remote endpoint provides the EMS issued certificate for device identification.
5. The FortiGate challenges the endpoint with user authentication. For example, this could be done with basic or
SAML authentication.
6. The users enters their credentials on the remote endpoint.
7. The FortiGate authenticates the user and collects the username.
8. Using the FortiGate's CA or the customer's CA certificate, the FortiGate signs an SSH certificate and embeds the
username in its principal.
9. The FortiGate attempts to connect to the SSH server using the certificate authentication.
10. The SSH server verifies the authenticity of the certificate, and matches the username principal against its
authorized_keys file.
11. If the username matches a record in the file, then the SSH connection is established. If no match is found, then the
SSH connection fails.
Example
In this example, an SSH connection is established using SSH access proxy with host-key validation and one-time
authentication.
l The SSH server is a Linux based server that uses sshd to provide remote access
l For SSH host-key validation, the public key of the SSH server has been imported into the FortiGate.
l For one-time authentication using certificate authentication:
l The SSH server must allow certificate authentication.
l The SSH server must have the proper entry in its authorized_keys file that contains the user principal and the
FortiGate CA's public key.
l The entry is present in the user directory corresponding to the user that is trying to log in.
b. Choose the publish key file based on the hash type (in this case, ECDSA), and show it's content:
$ cat /etc/ssh/ssh_host_ecdsa_key.pub
ecdsa-sha2-nistp256 AAAAE2*********IpEik=
3. On the Linux server, enable the SSH service to use the authorized_keys file:
a. Locate and edit the /etc/ssh/sshd_config file.
b. Ensure that the AuthorizedKeysFile line is uncommented, for example:
AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
4. Allow remote SSH log in with certificate authentication and principal name:
a. Log in to the SSH server using the account that will be granted remote SSH access (in this example: radCurtis):
b. Locate the account's authorized_keys file in the ~/.ssh directory:
$ ls -la ~/.ssh
total 12
d. Create an entry containing the following keywords and add them to the authorized_keys file:
echo 'cert-authority,principals="radCurtis" ssh-rsa AAAAB3**********JLXlxj3' >>
authorized_keys
Where:
l cert-authority - indicates that this entry is used in certificate authentication by validating the
certificate using the public key provided in this entry.
l principals="radCurtis" - indicates the user that must match with the username embedded in the
SSH certificate.
l ssh-rsa AAAAB3**********JLXlxj3 - indicates the FortiGate CA’s public key that is used to validate
the SSH certificate.
5. Restart the sshd service:
$ sudo systemctl stop sshd
$ sudo systemctl start sshd
The SSH server can now accept SSH connection from radCurtis@<server IP>, where the SSH certificate used by
the FortiGate to log in contains radCurtis embedded as a principal.
When a user connects from a SSH client using <username>@<server IP>, sshd will locate the
authorized_keys file in the directory /home/<username>/.ssh/authorized_keys. If the
authorized_keys is not in that directory, authentication will fail on the SSH server side.
If you suspect that authentication is failing on the SSH server, use the following commands to
manually start sshd in debug mode to troubleshoot:
$ sudo systemctl stop sshd
$ /usr/sbin/sshd -ddd -p 22
1. Configure a new VIP to allow access to the SSH access proxy over 192.168.2.87:443:
config firewall vip
edit "ZTNA_SSH"
set type access-proxy
set extip 192.168.2.87
set extintf "any"
set server-type https
set extport 443
set ssl-certificate "Fortinet_CA_SSL"
next
end
3. Configure the host-key that will be used to authenticate the SSH server. The public-key was retrieved when pre-
configure the Linux SSH server (step 1b).
config firewall ssh host-key
edit "ed25519"
set type ECDSA
set usage access-proxy
set public-key "AAAAE2**********IpEik="
next
end
6. Configure the RADIUS setting, user setting, and user group to apply user authentication to the access proxy
connection using RADIUS:
config user radius
edit "Win2k16-Radius"
set server "192.168.20.6"
8. Configure the ZTNA rule to allow traffic to the SSH server, and apply user authentication, posture check, and a
security profile where necessary:
config firewall proxy-policy
edit 5
set name "SSH-proxy"
set proxy access-proxy
set access-proxy "ZTNA_SSH"
set srcintf "port1"
set srcaddr "all"
set dstaddr "all"
set ztna-ems-tag "FCTEMS8821001056_ems138_av_tag"
set action accept
set schedule "always"
set groups "radius_group"
set utm-status enable
set ssl-ssh-profile "custom-deep-inspection"
next
end
1. On the remote client, open FortiClient, go to the Zero Trust Telemetry tab, and make sure that it is connected to the
EMS server.
2. Go to the ZTNA Connection Rules tab and click Add Rule.
Mode Transparent
When Encryption is disabled, the connection between the client and FortiGate access proxy is not encapsulated in
HTTPS after the client and FortiGate connection is established. This allows for less overhead, because SSH is
already a secure connection. This option is available in FortiClient 7.0.1 and later releases.
4. Open an SSH client, such as PuTTy, and make an SSH connection to [email protected] on port 22.
5. After device authentication is performed and passes in the background, FortiClient prompts the user to sign in.
Enter the username, radCurtis, and password, then click Sign in.
After successful user authentication, the SSH connection is established without an additional log in.
g_id : 12
user_based : 0
expire : 53
LAN:
bytes_in=3403 bytes_out=5699
WAN:
bytes_in=3681 bytes_out=3132
7. The successful connection is logged in the forward traffic logs after the SSH connection has disconnected:
# execute log display
25 logs found.
10 logs returned.
ZTNA access proxy with SAML and MFA using FortiAuthenticator example
ZTNA access proxy supports device verification using device certificates that are issued by EMS. To authenticate users,
administrators can use either basic or SAML authentication. An advantage of SAML authentication is that multi-factor
authentication (MFA) can be provided by the SAML Identity Provider (IdP).
In these examples, a FortiAuthenticator is used as the IdP, and MFA is applied to user authentication for remote users
accessing the web, RDP, and SSH resources over the ZTNA access proxy. It is assumed that the FortiGate EMS fabric
connector has already been successfully connected.
l Configuring the FortiAuthenticator on page 978
l Configuring the FortiGate SAML settings on page 980
l Example 1 - Applying SAML and MFA to ZTNA HTTPS access proxy on page 983
l Example 2 - Applying SAML and MFA to a ZTNA TCP forwarding access proxy for RDP connections on page 985
l Example 3 - Applying SAML and MFA to a ZTNA SSH access proxy on page 987
DNS resolutions:
First configure the FortiAuthenticator to synchronize users from AD using LDAP, apply MFA to individual remote users,
and be the IdP.
1. Go to Authentication > Remote Auth. Servers > LDAP and click Create New.
2. Configure the following:
Name AD
3. Click OK.
4. In the Remote LDAP Users section click Go.
5. Select the users to import then click OK.
6. Click OK.
For more details, see LDAP in the FortiAuthenticator Administration Guide.
1. Go to Authentication > User Management > Remote Users, and edit a user.
2. Enable Token-based authentication then select the method of token code delivery.
For this example, select FortiToken > Mobile, select the Token from the drop-down list, and set the Activation
delivery method to email.
3. In the User Information section, add the email address that will be used for the FortiToken activation.
4. Click OK.
An activation email is sent to the user that they can use to install the token to their FortiToken Mobile app.
For more details, see Remote users in the FortiAuthenticator Administration Guide.
1. Go to Authentication > SAML IdP > General and enable Enable SAML Identity Provider portal.
2. The Server address is the device FQDN or IP address (configured in the System Information widget at System >
Dashboard > Status). In this example, it is fac.fortidemo.fortinet.com.
3. Set Username input format to username@realm.
4. Click Add a realm in the Realms table:
a. Set Realm to the just created LDAP realm (AD).
b. Optionally, enable Filter and select the required users groups. In this example, Customer Support and
Marketing are configured.
5. Set Default IdP certificate to the certificate that will be used in the HTTPS connection to the IdP portal.
6. Click OK.
7. Go to Authentication > SAML IdP > Service Providers, and click Create New to create a service provider (SP) for the
FortiGate SP.
8. Configure the following, which must match what will be configured on the FortiGate:
Server certificate Same certificate as the default IdP certificate used in SAML IdP > General
SP entity ID https://entcore.fortidemo.fortinet.com:20443/ztna/saml/metadata/
Where the SP entity ID, SP ACS (login) URL, and SP SLS (logout) URL break down as follows:
l entcore.fortidemo.fortinet.com - The FQDN that resolves to the FortiGate SP.
l 20443 - The port that is used to map to the FortiGate's SAML SP service.
l /ztna/saml - The custom, user defined fields.
l /metadata, /login, and /logout - The standard convention used to identify the SP entity, log in portal, and log out
portal.
9. Click OK.
10. Edit the just created SP object and, under SAML Attribute, click Create New.
11. Set SAML attribute to the username and set User attribute to Username, then click OK.
12. Click OK.
For more details, see Configuring SAML settings in the SAML Interoperability Guide.
On the FortiGate, a SAML user is used to define the SAML SP and IdP settings. This user is then applied to the ZTNA
proxy using an authentication scheme, rule, and settings. A ZTNA server is then created to allow access to the SAML SP
server so that end users can reach the FortiGate SP's captive portal. The SAML user must then be added to a ZTNA rule
to trigger authentication when accessing the ZTNA access proxy.
Where:
l The FortiDemo certificate is a local certificate that is used to sign SAML messages that are exchanged
between the client and the FortiGate SP. In this example, it is used to sign entcore.fortidemo.fortinet.com.
l The REMOTE_Cert_1 certificate is a remote certificate that is used to identify the IdP. In this example,
fac.fortidemo.fortinet.com.
l The URLs used in the SAML user settings are the same as the ones defined on the FortiAuthenticator.
2. Add the SAML user object to a new user group:
config user group
edit "ztna-users"
set member "su-ztna"
next
end
3. Configure the active authentication scheme, and a captive portal to serve the log in page for the SAML requests:
config firewall address
edit "entcore.fortidemo.fortinet.com"
set type fqdn
set fqdn "entcore.fortidemo.fortinet.com"
next
end
config authentication setting
set active-auth-scheme "saml-scheme"
set captive-portal "entcore.fortidemo.fortinet.com"
end
To configure a ZTNA access proxy to allow SAML authentication requests to the SP:
Name ZTNA-access
External IP 10.100.64.201
SAML Enabled
c. Click OK.
2. Define the ZTNA rule to allow access to the ZTNA server:
a. Go to Policy & Objects > ZTNA, select the ZTNA Rules tab, and click Create New.
b. Configure the following:
Name ZTNA-Rule
Action Accept
c. Click OK.
To configure a VIP and a firewall policy to forward IdP authentication traffic to the FortiAuthenticator:
Remote clients connect to the FortiAuthenticator IdP behind the FortiGate using a VIP. In this example, users connect to
the FQDN fac.fortidemo.fortinet.com that resolves to the VIP's external IP address.
1. Configure the VIP to forward traffic to the FortiAuthenticator:
a. Go to Policy & Objects > Virtual IPs and click Create New > Virtual IP.
b. Configure the following:
Name FortiAuthenticator
Interface Any
Protocol TCP
c. Click OK.
2. Configure a firewall policy to allow VIP:
a. Go to Policy & Objects > Firewall Policy and click Create New.
ZTNA Disabled
Source All
Schedule always
Service ALL
Action Accept
NAT disabled
c. Click OK.
In this HTTPS access proxy example, two real servers are implemented with round robin load balancing performed
between them. The HTTPS access proxy is configured on the same ZTNA server as was configured in the
authentication step. The same ZTNA rule and firewall policy also apply.
To configure the ZTNA server for HTTPS access proxy with load balancing:
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Edit the ZTNA-access server.
3. In the Service/server mapping table, click Create New:
a. Set Service to HTTPS.
b. Set Virtual Host to Any Host.
c. In the Servers table click Create New:
i. Set IP to 10.100.77.200
ii. Set Port to 443.
iii. Set Status to Active.
iv. Click OK.
d. Create a second server with IP 10.100.77.202.
e. Click OK.
4. Enable Load balancing, and select the Round Robin algorithm.
5. Click OK.
From the remote endpoint, user John Locus attempts to connect to the Finance server over ZTNA:
1. On the remote Windows computer, open FortiClient and register to the EMS server.
2. Open a browser and attempt to connect to the web server at https://ztna.fortidemo.fortinet.com:20443.
3. Device authentication prompts the user for their device certificate. Select the certificate issued by EMS and click
OK.
4. FortiGate receives the SAML request and redirects the user to the IdP login screen. Enter the username and
password for John Locus and click Login.
5. A second prompt opens asking for the Token Code. Enter the code then click Verify.
6. The FortiAuthenticator IdP verifies the login, then sends the SAML assertion back to the user.
7. The browser redirects the assertion to the FortiGate SP, which decides if the user is allowed access.
8. On a successful log in, FortiGate redirects the user to the web page that they are trying to access.
On the FortiGate, a successful connection can be seen in Log & Report > Forward Traffic log, or by using the CLI:
# execute log filter category 0
# execute log filter field srcip 10.100.66.103
# execute log display
...
1: date=2021-08-25 time=23:34:15 eventtime=1629959656098675227 tz="-0700" logid="0000000024"
type="traffic" subtype="forward" level="notice" vd="root" srcip=10.100.66.103 srcport=51341
srcintf="port1" srcintfrole="wan" dstcountry="Reserved" srccountry="Reserved"
dstip=10.100.77.202 dstport=443 dstintf="root" dstintfrole="undefined" sessionid=3396047
srcuuid="d8dd134a-0517-51ec-2ff0-3032b84564e7" service="HTTPS" proto=6 action="accept"
policyid=1 policytype="proxy-policy" poluuid="256bb090-0518-51ec-f431-5dcc0baa725b"
policyname="ZTNA-Rule" duration=16 user="johnlocus" group="ztna-users" wanin=2837
rcvdbyte=2837 wanout=1495 lanin=2581 sentbyte=2581 lanout=5505 appcat="unscanned"
Log number four shows that the session was first allowed through the ZTNA firewall policy. Log numbers one and two
show the traffic allowed through the ZTNA proxy-policy over two successive sessions. Note that they have different
destination IP addresses (dstip), indicating that ZTNA was performing server load balancing.
Use the following command to show if the FortiGate's WAD process has an active record of the SAML user login:
# diagnose wad user list
Example 2 - Applying SAML and MFA to a ZTNA TCP forwarding access proxy for RDP
connections
In this TCP forwarding access proxy example, RDP connections are allowed to be forwarded to the Windows/EMS
server. Traffic to TCP/3389 is allowed through the ZTNA proxy.
Name EMS-Server
Type Subnet
IP/Netmask 10.100.88.5/32
Interface any
c. Click OK.
2. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
3. Edit the ZTNA-access server.
4. In the Service/server mapping table, click Create New:
a. Set Service to TCP Forwarding.
b. In the Servers table click Create New:
On the remote endpoint, manually configure ZTNA connection rules to forward RDP traffic to the ZTNA access proxy.
The rules can also be pushed from the EMS server; for details see Provisioning ZTNA TCP forwarding rules via EMS.
Configure the ZTNA connection rule:
1. On the remote Windows computer, open FortiClient.
2. Register to the EMS server.
3. On the ZTNA Connection Rules tab, click Add Rule to add a TCP forwarding rule.
4. Configure the following:
Mode Transparent
Encryption Disabled
Encryption can be enabled or disabled. When it is disabled, the client to
access proxy connection is not encrypted in HTTPS. Because RDP is
encrypted by default, disabling Encryption does not reduce security.
5. Click Create.
On the FortiGate, a successful connection can be seen in Log & Report > Forward Traffic log, or by using the CLI:
Use the following command to show if the FortiGate's WAD process has an active record of the SAML user login:
# diagnose wad user list
In this SSH access proxy example, SSH connections can be forwarded to the web server.
Name Web-Server1
Type Subnet
IP/Netmask 10.100.77.101/32
Interface any
c. Click OK.
2. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
3. Edit the ZTNA-access server.
4. In the Service/server mapping table, edit the TCP Forwarding entry:
a. In the Servers table click Create New:
i. Set Address to Web-Server1.
ii. Set Ports to 22.
iii. Optionally, enable Additional SSH Options to configure other SSH options as needed.
iv. Click OK.
b. Click OK.
5. Click OK.
On the remote endpoint, manually configure ZTNA connection rules to forward SSH traffic to the ZTNA access proxy.
The rules can also be pushed from the EMS server; for details see Provisioning ZTNA TCP forwarding rules via EMS.
Configure the ZTNA connection rule:
1. On the remote Windows computer, open FortiClient.
2. Register to the EMS server.
3. On the ZTNA Connection Rules tab, click Add Rule to add a TCP forwarding rule.
4. Configure the following:
Mode Transparent
Encryption Disabled
5. Click Create.
On the FortiGate, a successful connection can be seen in Log & Report > Forward Traffic log, or by using the CLI:
# execute log filter category 0
# execute log filter field srcip 10.100.66.103
# execute log display
...
2: date=2021-08-25 time=23:20:03 eventtime=1629958804111962686 tz="-0700" logid="0000000024"
type="traffic" subtype="forward" level="notice" vd="root" srcip=10.100.66.103 srcport=60043
srcintf="port1" srcintfrole="wan" dstcountry="Reserved" srccountry="Reserved"
dstip=10.100.77.101 dstport=22 dstintf="root" dstintfrole="undefined" sessionid=3372964
srcuuid="d8dd134a-0517-51ec-2ff0-3032b84564e7" service="SSH" proto=6 action="accept"
policyid=1 policytype="proxy-policy" poluuid="256bb090-0518-51ec-f431-5dcc0baa725b"
policyname="ZTNA-Rule" duration=1 user="johnlocus" group="ztna-users" wanin=39 rcvdbyte=39
wanout=0 lanin=1444 sentbyte=1444 lanout=726 appcat="unscanned"
Use the following command to show if the FortiGate's WAD process has an active record of the SAML user login:
# diagnose wad user list
SSL VPN web portals can be defined in ZTNA access proxy settings. The ZTNA access proxy handles the access
control processes (client certificate authentication, posture check, user authentication and authorization), and
establishes the HTTPS connection between the end user and the access proxy. Then, it forwards the user to the web
portal where they can use predefined bookmarks to access TCP based services like HTTPS, RDP, VNC, FTP, SFTP,
SSH, Telnet, and SMB. Existing SSL VPN portal configurations can be used.
Example
In this example, a remote client connects to the ZTNA access proxy and completes the client certificate check. If
successful, the remaining access control procedures are automatically completed, and the user is forwarded to the web
portal. The web portal is configured with predefined bookmarks that connect to internal servers and external websites.
The user can access any resource that is defined in the bookmarks to create an end-to-end connection.
1. Configure a VIP for the ZTNA access proxy. The ssl-certificate can be replaced with a server certificate:
config firewall vip
edit "ztna_webportal"
set type access-proxy
set extip 172.18.62.68
set extintf "any"
2. Configure the virtual host to be used to connect to the ZTNA access proxy. The host should resolve to the VIP’s
address:
config firewall access-proxy-virtual-host
edit "webportal"
set ssl-certificate "*.test.com"
set host "web.test.com"
next
end
4. Apply the access proxy to a proxy policy (specify the ZTNA tags as needed):
config firewall proxy-policy
edit 1
set name "ztna_rule"
set proxy access-proxy
set access-proxy "ztna_webportal"
set srcintf "any"
set srcaddr "all"
set dstaddr "all"
set ztna-ems-tag "FCTEMS8821000000_High"
set action accept
set schedule "always"
set logtraffic all
set srcaddr6 "all"
set dstaddr6 "all"
set utm-status enable
set profile-type group
set profile-group "profile group1"
set logtraffic-start enable
next
end
The SSL VPN bookmarks are learned by the WAD daemon and are ready to use.
1. From the client browser, go to https://web.test.com:4443/webportal to access the ZTNA access proxy web portal.
2. Once the client passes the certificate check, posture check, and access is granted, the user is redirected to the web
portal. The list of predefined bookmarks appears.
4. From the web portal, click another bookmark, such as SSH. The page opens with the credential login screen to
access the server.
Endpoint posture changes trigger active ZTNA proxy sessions to be re-verified and terminated if the endpoint is no
longer compliant with the ZTNA policy.
The FortiGate monitors changes to the endpoint tags that are updated by EMS with the fcnacd process. When a change
is detected, the endpoint's active ZTNA sessions must match the ZTNA policy again before data can pass.
Changes to the ZTNA policy, such as changing the ZTNA tag matching logic, will also trigger re-verification of the client
device against the policy.
The remote endpoint accesses the RDP server through the TCP forwarding access proxy. The proxy is managed by the
FortiClient EMS server, which has a ZTNA tagging rule that assigns the AV-enabled tag to endpoints that have Windows
antivirus enabled, and the Low risk host tag to endpoints that are low risk.
These examples assume that the FortiGate EMS fabric connector has already connected successfully, and a ZTNA
server named WIN2K16-P1-RDP that forwards traffic to the RDP server has been configured.
In this example, a ZTNA rule is configured to allow access for endpoints that have the AV-enabled tag. After an RDP
sessions is established, Windows antivirus is disabled on the remote endpoint. The FortiGate re-verifies the session and
the active RDP session is removed from the FortiGate session table, causing the RDP session to be disconnected.
1. Go to Policy & Objects > ZTNA, select the ZTNA Rules tab, and click Create New.
2. Set Name to TCP-forward-WIN2K16.
3. Set Incoming Interface to port1.
4. Set Source to all.
5. In ZTNA Tag add AV-enabled
6. In ZTNA Server add WIN2K16-P1-RDP.
7. Set Destination to all.
8. Set Action to ACCEPT.
9. Configure the remaining options as needed.
10. Click OK.
Encryption Disabled
c. Click Create.
4. Ensure that the endpoint has Windows antivirus enabled.
5. Open an RDP session to connect to the RDP server at 192.168.20.6.
6. After a successful connection, on the FortiGate:
-
UID: F4F3263AEBE54777A6509A8FCCDF9284
-
Domain:
-
User: keithli
-
Owner:
-
Certificate SN: 1626C2C10E6AD97D71FA9E2D9C314C1F5C03D68B
-
EMS SN: FCTEMS0000109188
-
online: true
-
Tags (3):
-- Tag (#0): AV-enabled
-- Tag (#1): all_registered_clients
-- Tag (#2): Low
lls_idx_mask = 0x00000001,
b. A session is created:
# diagnose sys session filter dst 192.168.2.86
# diagnose sys session filter src 10.10.10.25
# diagnose sys session list
-
UID: F4F3263AEBE54777A6509A8FCCDF9284
-
Domain:
-
User: keithli
-
Owner:
-
Certificate SN: 1626C2C10E6AD97D71FA9E2D9C314C1F5C03D68B
-
EMS SN: FCTEMS0000109188
-
online: true
-
Tags (2):
-- Tag (#0): all_registered_clients
-- Tag (#1): Low
lls_idx_mask = 0x00000001,
In this example, a ZTNA rule is configured to allow access to endpoints that have at least one of the AV-enabled or Low
ZTNA tags. A remote user who has Windows antivirus disabled, but is low risk, successfully establishes an RDP session
over the ZTNA access proxy. An administrator changes the ZTNA rule's tag matching logic from Any to All, causing the
RDP session to be disconnected.
1. Go to Policy & Objects > ZTNA, select the ZTNA Rules tab.
2. Edit the TCP-forward-WIN2K16 rule.
3. In ZTNA Tag, add Low.
4. Ensure that Match ZTNA Tags is set to Any.
5. Click OK.
- UID: F4F3263AEBE54777A6509A8FCCDF9284
-
Domain:
-
User: keithli
-
Owner:
-
Certificate SN: 1626C2C10E6AD97D71FA9E2D9C314C1F5C03D68B
-
EMS SN: FCTEMS0000109188
-
online: true
-
Tags (2):
-- Tag (#0): all_registered_clients
-- Tag (#1): Low
lls_idx_mask = 0x00000001,
b. A session is created:
# diagnose sys session filter dst 192.168.2.86
# diagnose sys session filter src 10.10.10.25
# diagnose sys session list
When defining ZTNA connection rules on FortiClient for TCP forwarding, it is sometimes desirable to configure the
destination host address as an FQDN address instead of an IP address. Since the real servers are often servers in the
corporate network, this layer of obfuscation prevents internal IPs from easily leaking to the public, and also makes the
destination more easily recognizable by the end users.
One obstacle to overcome is getting remote hosts to resolve an internal FQDN that is typically only resolvable by an
internal DNS in the corporate network. This can be solved with the following:
1. When an FQDN address is added as a destination host in a ZTNA connection rule, FortiClient creates a virtual IP for
this FQDN address and adds this to the computer’s host file (Windows). The same is true when a ZTNA connection
rule entry is pushed from EMS.
2. The virtual IP mapped to the FQDN address is not the real address of the server. It allows applications to resolve the
FQDN address to this virtual IP. FortiClient listens to any traffic destined for it and forwards the traffic using the TCP
forwarding URL with FQDN to the ZTNA access proxy.
3. The FortiGate access proxy will resolve the FQDN using the internal DNS on the corporate network, matching the
traffic to the ZTNA real server configuration with the same domain and address.
4. If a valid ZTNA real server entry is found, traffic is forwarded to the real server.
Example
In this example, two servers in the internal network are added to the FortiGate access proxy for TCP forwarding. The
remote client configures two ZTNA connection rules, with the destination host field pointing to the FQDN addresses of
the internal servers. These FQDN addresses are configured in the FortiGate’s DNS database so they can be resolved by
the FortiGate. It is recommended to use an internal DNS server for production environments.
This example assumes that the FortiGate EMS Fabric connector is already successfully connected.
This features requires a minimum FortiClient and FortiClient EMS version of 7.0.3.
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Set Name to ZTNA_S1.
4. Configure the network settings:
a. Set External interface to any.
b. Set External IP to 172.18.62.32.
c. Set External port to 443.
5. Select the Default certificate. Clients will be presented with this certificate when they connect to the access proxy
VIP.
6. Add server mapping:
a. In the Service/server mapping table, click Create New.
b. For Service, select TCP Forwarding.
c. Add a server:
i. In the Servers table, click Create New.
ii. Create a new FQDN address for the HTTPS server at s27.qa.fortinet.com, then click OK.
iii. Apply the new address object as the address for the new server.
iv. Click OK.
d. Add another server using the same steps for s29.qa.fortinet.com.
7. Click OK. Now that the ZTNA server is complete, the domain settings must be configured in the CLI to map domains
to the real servers.
edit 2
set url-map "/tcp"
set service tcp-forwarding
config realservers
edit 4
set address "s27.qa.fortinet.com"
set domain "qa.fortinet.com"
next
edit 5
set address "s29.qa.fortinet.com"
set domain "qa.fortinet.com"
next
end
next
end
next
end
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Click Create New.
3. Set Name to ZTNA_TCP.
4. Set Incoming Interface to port2.
5. Set Source to all.
6. Select the ZTNA server ZTNA_S1.
7. Configure the remaining options as needed.
8. Click OK.
ZTNA TCP forwarding rules can be provisioned from the EMS server. See Provisioning ZTNA
TCP forwarding rules via EMS for more details.
5. The Windows PC now resolves the FQDNs to the virtual IPs, and FortiClient will listen to the traffic to these IPs and
forward them to the TCP access proxy.
6. Have the remote user connect to the HTTPS and HTTP servers on a browser. After device verification, the user is
able to successfully connect to the remote servers.
Session-based form authentication for ZTNA allows users to log in through an authentication portal with support for
multi-factor authentication (MFA). This added advantage over the basic type authentication method allows FortiToken
MFA to be applied directly to FortiGate users. FortiToken MFA can be applied to local users or remote users. Session-
based form authentication can also be applied to explicit and transparent web proxies.
Example
In this example, the FortiGate is configured with a ZTNA HTTPS access proxy to protect access to the web server. It
uses session-based form authentication with cookies and auth-portal enabled. It connects to the internal Windows
Active Directory using LDAPS for user authentication, and assigns FortiToken MFA to individual users.
This example assumes that the FortiGate EMS Fabric connector is already successfully connected.
1. Go to User & Authentication > LDAP Servers and click Create New.
2. Configure the following settings:
Name LDAP-fortiad
Certificate Enable and select the CA certificate to validate the server certificate.
Server identity check Optionally, enable to verify the domain name or IP address against the server
certificate.
1. Go to User & Authentication > User Definition and click Create New.
2. Set User Type to Remote LDAP User and click Next.
3. Set LDAP Server to LDAP-fortiad and click Next.
4. For Remote Users, right-click on a user from the list under the corresponding OU and click Add Selected. In this
example, the user tsmith under the Marketing OU is selected.
5. Click Submit.
1. Go to User & Authentication > User Groups and click Create New.
2. Enter the name of the group, FortiAD-MFA-group.
3. Set Type to Firewall.
4. Click the +in the Members field and add the user, tsmith.
5. Click OK.
1. Go to Policy & Objects > Authentication Rules and click Create New > Authentication Scheme.
2. Enter the name, ZTNA-Auth-scheme.
3. Set Method to Form-based.
4. Set User database to Other and select the LDAP-fortiad LDAP server.
5. Enable Two-factor authentication.
6. Click OK.
Configuring the ZTNA server requires some settings that can only be configured in the CLI. The basic settings are
configured in the GUI first, then the advanced CLI-only configurations are added after.
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Enter the server name, ZTNA_S1.
4. Configure the network settings:
The following steps are required to create a virtual host and to enable the authentication portal.
1. Create an access proxy virtual host that points to the ZTNA access proxy. The FQDN of the host must be able to
resolve to the external address 10.0.3.10. The client will be redirected to this page for form authentication:
config firewall access-proxy-virtual-host
edit "auth-portal-vhost"
set ssl-certificate "ztna-wildcard"
set host "authportal.ztnademo.com"
next
end
2. Enable auth-portal on the access proxy and point it to the virtual host:
config firewall access-proxy
edit "ZTNA_S1"
set auth-portal enable
set auth-virtual-host "auth-portal-vhost"
next
end
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Click Create New.
3. Enter the name, ZTNA_R1.
4. Set Incoming Interface to port3.
5. Set Source to all. This can also be set to specific IP addresses to only allow those addresses to connect to this
HTTPS access proxy.
6. Click the + in the Source and from the User tab, select the FortiAD-MFA-group user group.
7. Click the + in the ZTNA Tag field and select the Low tag.
8. Set ZTNA Server to ZTNA_S1.
9. Set Destination to Webserver1, which is an address object for 10.88.0.3/32.
10. Configure the remaining options as needed.
11. Click OK.
To test the remote access to the HTTPS access proxy with user authentication:
7. After the user authentication passes, the FortiGate performs a posture check on the endpoint. When the posture
check passes, you are allowed access to the website.
l In the CLI:
clientdevicetags="MAC_FCTEMS8822000000_Low/FCTEMS8822000000_all_registered_
clients/MAC_FCTEMS8822000000_all_registered_clients" wanin=303042 rcvdbyte=303042
wanout=3925 lanin=4430 sentbyte=4430 lanout=301660
fctuid="9A016B5A6E914B42AD4168C066EB04CA" appcat="unscanned"
ZTNA can be used to replace VPN-based teleworking solutions to enhance the user experience and to increase security.
A typical teleworking configuration may utilize SSL VPN tunnel or web portal mode with LDAP user authentication.
Common objects defined for this setup can be reused when migrating to ZTNA, such as the remote LDAP server, user
group, and address objects.
SSL VPN teleworking scenarios
Remote users that are in the ALLOWED-VPN active directory group have access to a specific web server when they
connect through the SSL VPN tunnel. The FortiGate enables split tunneling to the web server so that only traffic to that
destination is routed through the tunnel. The web server hosts internal websites that are only accessible by employees.
Remote users that are in the ALLOWED-VPN active directory group have access to a specific web server when they
connect through the SSL VPN web portal. The web server hosts internal websites that are only accessible by
employees. The pre-defined bookmark to the internal website is the only site that allows remote access.
Common configurations
This section includes configurations for common objects used in the SSL VPN configuration that can be reused in the
ZTNA deployment:
l LDAP server
l User group
l Firewall address for protected server
LDAP server
User group
Firewall addresses can be reused in the server settings for TCP forwarding configurations.
Migrating to ZTNA
The preceding simple SSL VPN tunnel and web mode teleworking solutions can be migrated to ZTNA configurations,
providing device authentication using client certificates and additional security posture checks.
Instead of connecting to the SSL VPN tunnel or web portal, the remote user connects to the HTTPS access proxy that
forwards traffic to the web server after authentication and security posture checks are completed. This provides granular
control over who can access the web resource using role-based access control. It also gives the user transparent access
to the website using only their browser.
Migrating to ZTNA includes the following steps:
1. Connecting to FortiClient EMS
2. Configuring ZTNA tags on FortiClient EMS
3. Configuring a VIP to allow remote users access to FortiClient EMS
4. Configuring the ZTNA server
5. Configuring the authentication scheme and rule
6. Configuring the ZTNA rules
The first step to configure ZTNA is to connect to and authorize a FortiClient EMS using the EMS connector. There are
different ways to connect to an on-premise FortiClient EMS server and a FortiClient EMS Cloud. Refer to the first step of
Configure a FortiClient EMS connector on page 914 for instructions.
ZTNA tags and tagging rules define security posture checks that connecting devices must pass before they are allowed
to access protected resources and applications. In the following example, a Zero Trust tagging rule is configured to
detect if a virus file exists on an endpoint.
6. Click Save.
A ZTNA solution requires users to be registered and connected to the FortiClient EMS server. When an EMS server is
behind the FortiGate, a VIP needs to be defined to allow remote users access to register to the FortiClient EMS. The only
port required to be forwarded is TCP/8013. This VIP also needs to be applied in a firewall policy to allow this traffic.
1. Go to Policy & Objects > Virtual IPs and click Create New > Virtual IP.
2. Set Name to VIP-EMS.
3. Configure the VIP settings:
a. Set Interface to port1.
b. Set External IP address/range to 192.168.2.5.
c. Set Map to to 192.168.20.10.
d. Enable Port Forwarding.
e. Set External service port to 8013.
f. Set Map to IPv4 port to 8013.
4. Click OK.
The ZTNA server defines the external IP and port used for the FortiGate access proxy. It also defines the protected
resources that can be accessed through the HTTPS access proxy or TCP forwarding access proxy. The following
configuration defines a HTTPS access proxy for accessing the web server on 192.168.20.6.
1. Go to Policy & Objects > ZTNA and select the ZTNA Servers tab.
2. Click Create New.
3. Set Name to WIN2K16-P1.
4. Configure the network settings:
a. Set External interface to port1.
b. Set External IP to 192.168.2.86.
c. Set External port to 8443.
5. Select the Default certificate. Clients will be presented with this certificate when they connect to the access proxy
VIP.
6. Add server mapping:
a. In the Service/server mapping table, click Create New.
b. Set Service to HTTPS.
c. Set Virtual Host to Any Host.
d. Configure the path as needed. For example, to map to winserver.fgdocs.com/fortigate, enter /fortigate.
e. Add a server:
i. In the Servers table, click Create New.
ii. Set IP to 192.168.20.6.
iii. Set Port to 443.
iv. Click OK.
f. Click OK.
7. Click OK.
The authentication scheme defines the authentication method that is applied. In this example, basic HTTP
authentication is used so that users are prompted for a username and password the first time that they connect to a
website through the HTTPS access proxy. The LDAP server defined for the SSL VPN configurations can be reused
here.
1. Go to Policy & Objects > Authentication Rules and click Create New > Authentication Scheme.
2. Set the name to ZTNA-Auth-scheme.
3. Set Method to Basic.
4. Set User database to Other and select WIN2K16-KLHOME-LDAPS as the LDAP server.
5. Click OK.
The authentication rule defines the proxy sources and destination that require authentication, and what authentication
scheme is applied. In this example, active authentication through the basic HTTP prompt is used and applied to all
sources.
1. Go to Policy & Objects > Authentication Rules and click Create New > Authentication Rule.
2. Set the name to ZTNA-Auth-rule.
3. Set Source Address to all.
4. Set Protocol to HTTP.
5. Enable Authentication Scheme and select ZTNA-Auth-scheme.
6. Click OK.
A user or user group must be applied to the ZTNA rule used to control user access. The authenticated user from the
authentication scheme and rule must match the user or user group in the ZTNA rule. The user group, KLHOME-
ALLOWED-VPN, defined in the SSL VPN configurations is reused in this example. The ZTNA tag, Malicious-File-
Detected, is used to define a rule to deny access when the connecting device has the malicious file detected.
To configure ZTNA rules to allow and deny traffic based on ZTNA tags:
1. Go to Policy & Objects > ZTNA and select the ZTNA Rules tab.
2. Create a rule to deny traffic:
a. Click Create New.
b. Set Name to ZTNA-Deny-malicious.
c. Set Incoming Interface to port1.
d. Set Source to all, then click the + and from the User tab, select the KLHOME-ALLOWED-VPN group.
e. Add the ZTNA tag Malicious-File-Detected.
This tag is dynamically retrieved from EMS when the Zero Trust tagging rule is first created.
f. Select the ZTNA server WIN2K16-P1.
g. Set Action to DENY.
h. Enable Log Violation Traffic.
i. Click OK.
3. Create a rule to allow traffic:
a. Click Create New.
b. Set Name to proxy-WIN2K16-P1.
c. Set Incoming Interface to port1.
d. Set Source to all, then click the + and from the User tab, select the KLHOME-ALLOWED-VPN group. The
Source can also be set to specific IP addresses to only allow those addresses to connect to this HTTPS access
proxy.
e. Add the ZTNA tag Low.
f. Select the ZTNA server WIN2K16-P1.
g. Set Action to ACCEPT.
h. Configure the remaining options as needed.
i. Click OK.
4. In the ZTNA Rules list, make sure that the deny rule (ZTNA-Deny-malicious) is above the allow rule (proxy-
WIN2K16-P1).
Once ZTNA is configured, connect to the FortiGate access proxy using an endpoint that is registered to EMS. The user
should be prompted for their device certificate, username, and password the first time they connect. Once they have
authenticated and they pass the security posture checks, they will be allowed to access the website.
See ZTNA HTTPS access proxy example on page 929 and ZTNA HTTPS access proxy with basic authentication
example on page 936 for sample verifications and results.
Once testing is complete and the ZTNA servers and policies are configured, the users can be migrated to using ZTNA.
Use the following checklist to verify if the remote users are ready to migrate:
1. The users have installed a supported FortiClient version and have installed the ZTNA module.
2. The endpoints can register to FortiClient EMS.
3. If using a TCP forwarding access proxy, ensure that ZTNA rules are either pushed from FortiClient EMS, or the
users know how to configure them manually.
Next, SSL VPN access can be disabled in a phased approach by disabling SSL VPN firewall policies that allow access to
resources that are accessible using ZTNA.
Once all applications and resources have been migrated, the SSL VPN can be disabled entirely by going to VPN > SSL-
VPN Settings, and deselecting the Enable SSL-VPN toggle.
ZTNA scalability supports up to 50 thousand concurrent endpoints. Communication between FortiOS and FortiClient
EMS has efficient queries that request incremental updates. Retrieved device information can be written to the
FortiClient NAC daemon cache.
FortiOS can receive tag information from the EMS common tags API. This feature requires FortiClient EMS 7.0.3 or
later.
The APIs api/v1/report/fct/uid_tags and api/v1/report/fct/tags replace the API
api/v1/report/fct/host_tags.
2. The FortiGate uses the new APIs to obtain device information from the EMS:
[ec_ems_context_submit_work:414] Call submitted successfully.
obj-id: 11, desc: REST API to get updates of tag endpoints., entry:
api/v1/report/fct/tags.
[ec_ems_context_submit_work:414] Call submitted successfully.
obj-id: 12, desc: REST API to get updates of tags associated with FCT UID., entry:
api/v1/report/fct/uid_tags.
[ec_ez_worker_process:334] Processing call for obj-id: 11, entry:
"api/v1/report/fct/tags"
[dynamic_addr_ha_act:215] called (EMS SN N/A).
[dynamic_addr_ha_act:215] called (EMS SN N/A).
[ec_ez_worker_process:441] Call completed successfully.
obj-id: 11, desc: "REST API to get updates of tag endpoints.", entry:
"api/v1/report/fct/tags".
[ec_ez_worker_process:334] Processing call for obj-id: 12, entry:
"api/v1/report/fct/uid_tags"
[ec_record_sync_tags_info_store:1419] Received 1 tags for
3D86DF70B85E16CBAD67908A897B4494 with sn FCTEMS8888888888
[ec_record_sync_tags_info_store:1419] Received 1 tags for
DA12930442F13F84D2441F03FCB6A10E with sn FCTEMS8888888888
[ec_record_sync_tags_info_store:1419] Received 1 tags for
25C59C275F257F4C5FBC7F6F5F56788E with sn FCTEMS8888888888
[ec_ez_worker_process:441] Call completed successfully.
obj-id: 12, desc: "REST API to get updates of tags associated with FCT UID.", entry:
"api/v1/report/fct/uid_tags".
[ec_ems_context_submit_work:414] Call submitted successfully.
obj-id: 7, desc: REST API to get updates about system info., entry:
api/v1/report/fct/sysinfo.
[ec_ems_context_submit_work:414] Call submitted successfully.
obj-id: 11, desc: REST API to get updates of tag endpoints., entry:
api/v1/report/fct/tags.
[ec_ez_worker_process:334] Processing call for obj-id: 11, entry:
"api/v1/report/fct/tags"
[ec_ez_worker_process:441] Call completed successfully.
obj-id: 11, desc: "REST API to get updates of tag endpoints.", entry:
"api/v1/report/fct/tags".
(......)
3. Confirm that the device information from the EMS is written to the FortiClient NAC daemon cache:
# diagnose endpoint record list
...
Avatar source: OS
Phone number:
Number of Routes: (1)
Gateway Route #0:
- IP:10.1.91.6, MAC: 4f:8d:c2:73:dd:fe, Indirect: no
- Interface:port2, VFID:1, SN: FG5H1E5999999999
online records: 37174; offline records: 0; quarantined records: 0; out-of-sync records:
0
4. Use the tags that are pulled from the EMS in a firewall address:
config firewall address
edit "FCTEMS8888888888_ZT_AD_MGMT"
set type dynamic
set sub-type ems-tag
set obj-tag "ZT_AD_MGMT"
set tag-type "zero_trust"
next
end
Command Description
# diagnose endpoint fctems test- Verify FortiGate to FortiClient EMS connectivity.
connectivity <EMS>
# execute fctems verify <EMS> Verify the FortiClient EMS’s certificate.
# diagnose test application fcnacd 2 Dump the EMS connectivity information.
# diagnose debug app fcnacd -1 Run real-time FortiClient NAC daemon debugs.
# diagnose debug enable
# diagnose endpoint record list <ip> Show the endpoint record list. Optionally, filter by the endpoint
IP address.
# diagnose endpoint lls-comm send ztna Query endpoints by client UID.
find-uid <uid>
# diagnose endpoint lls-comm send ztna Query endpoints by the client IP-VDOM pair.
find-ip-vdom <ip> <vdom>
# diagnose wad dev query-by uid <uid> Query from WAD diagnose command by UID.
Command Description
# diagnose wad dev query-by ipv4 <ip> Query from WAD diagnose command by IP address.
# diagnose firewall dynamic list List EMS ZTNA tags and all dynamic IP and MAC addresses.
# diagnose test application fcnacd 7 Check the FortiClient NAC daemon ZTNA and route cache.
# diagnose test application fcnacd 8
# diagnose wad worker policy list Display statistics associated with access proxy rules.
# diagnose wad debug enable category Run real-time WAD debugs.
all
# diagnose wad debug enable level
verbose
# diagnose debug enable
# diagnose debug reset Reset debugs when completed
The WAD daemon handles proxy related processing. The FortiClient NAC daemon (fcnacd)
handles FortiGate to EMS connectivity.
2. If fcnacd does not report the proper status, run real-time fcnacd debugs:
# diagnose debug app fcnacd -1
# diagnose debug enable
6. List all the dynamic ZTNA IP and MAC addresses learned from EMS:
# diagnose firewall dynamic list
List all dynamic addresses:
FCTEMS0000109188_all_registered_clients: ID(51)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
FCTEMS0000109188_Low: ID(78)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
FCTEMS0000109188_Malicious-File-Detected: ID(190)
ADDR(172.17.194.209)
ADDR(192.168.40.8)
…
8. Troubleshoot WAD with real-time debugs to understand how the proxy handled a client request:
# diagnose wad debug enable category all
# diagnose wad debug enable level verbose
This section contains information about configuring FortiGate security features, including:
l Inspection modes on page 1025
l Antivirus on page 1030
l Web filter on page 1058
l Filtering based on YouTube channel on page 1094
l DNS filter on page 1100
l Application control on page 1126
l Intrusion prevention on page 1139
l File filter on page 1160
l Email filter on page 1167
l Data leak prevention on page 1180
l VoIP solutions on page 1188
l ICAP on page 1205
l Web application firewall on page 1211
l SSL & SSH Inspection on page 1214
l Custom signatures on page 1228
l Overrides on page 1237
If you are unable to view a security profile feature, go to System > Feature Visibility to enable
it.
Inspection modes
FortiOS supports flow-based and proxy-based inspection in firewall policies. You can select the inspection mode when
configuring a policy.
Flow-based inspection takes a snapshot of content packets and uses pattern matching to identify security threats in the
content.
Proxy-based inspection reconstructs content that passes through the FortiGate and inspects the content for security
threats.
Certain security profiles allows users to display flow-based or proxy-based feature sets.
This following topics provide information about inspection modes for various security profile features:
l Flow mode inspection (default mode) on page 1026
l Proxy mode inspection on page 1026
l Inspection mode feature comparison on page 1028
When a firewall policy's inspection mode is set to flow, traffic flowing through the policy will not be buffered by the
FortiGate. Unlike proxy mode, the content payload passing through the policy will be inspected on a packet by packet
basis with the very last packet held by the FortiGate until the scan returns a verdict. If a violation is detected in the traffic,
a reset packet is issued to the receiver, which terminates the connection, and prevents the payload from being sent
successfully.
Flow-based inspection identifies and blocks security threats in real time as they are identified. All applicable flow-based
security modules are applied simultaneously in one single pass, using Direct Filter Approach (DFA) pattern matching to
identify possible attacks or threats. Pattern matching is offloaded and accelerated by CP8 or CP9 processors.
Flow-based inspection typically requires lower processing resources than proxy-based inspection and does not change
packets, unless a threat is found and packets are blocked.
Use case
It is recommended to apply flow inspection to policies that prioritize traffic throughput, such as allowing connections to a
streaming or file server.
For example, you have an application server that accepts connections from users for a daily quiz show app, HQ. Each
HQ session sees 500,000+ participants, and speed is very important because participants have less than 10 seconds to
answer the quiz show questions.
In this scenario, a flow inspection policy is recommended to prioritize throughput. The success of the application
depends on providing reliable service for large numbers of concurrent users. The policy would include an IPS sensor to
protect the server from external DOS attacks.
When a firewall policy’s inspection mode is set to proxy, traffic flowing through the policy will be buffered by the FortiGate
for inspection. This means that the packets for a file, email message, or web page will be held by the FortiGate until the
entire payload is inspected for violations (virus, spam, or malicious web links). After FortiOS finishes the inspection, the
payload is either released to the destination (if the traffic is clean) or dropped and replaced with a replacement message
(if the traffic contains violations).
To optimize inspection, the policy can be configured to block or ignore files or messages that exceed a certain size. To
prevent the receiving end user from timing out, you can apply client comforting. This allows small portions of the payload
to be sent while it is undergoing inspection.
Proxy mode provides the most thorough inspection of the traffic; however, its thoroughness sacrifices performance,
making its throughput slower than that of a flow mode policy. Under normal traffic circumstances, the throughput
difference between a proxy-based and flow-based policy is not significant.
Use case 1
Your organization deals with sensitive data on a regular basis and a data leak would significantly harm your business. At
the same time, you wish to protect your employees from malicious content, such as viruses and phishing emails, which
could be used to gain access to your network and the sensitive data on your systems.
In this scenario, a proxy inspection policy is recommended to prioritize network security. You want traffic inspection to be
as thorough as possible to avoid any data leaks from exiting the LAN and any malicious content from entering it. The
policy would include antivirus, DLP, web, and email filters all operating in proxy mode.
Use case 2
You have a corporate mail server in your domain that is used by your employees for everyday business activities. You
want to protect your employees from phishing emails and viruses. At the same time, you want to also protect your web
servers from external attacks.
In this scenario, a proxy inspection policy is recommended to prioritize the safety of employee emails. Applying the
antivirus and email filter in this mode allows you to filter out any malware and spam emails received by the mail servers
via SMTP or MAPI. An IPS sensor would be used to prevent DOS attacks on the mail servers.
The following table shows which UTM profile can be configured on a flow mode or proxy mode inspection policy.
Some UTM profiles are hidden in the GUI and can only be configured using the CLI. To configure profiles in a firewall
policy in CLI, enable the utm-status setting.
Some profiles might have feature differences between flow-based and proxy-based Inspection. From the GUI and CLI,
you can set the Feature set option to be Flow-based or Proxy-based to display only the settings for that mode.
The following sections outline differences between flow-based and proxy-based inspection for a security profile.
The following table indicates which Antivirus features are supported by their designated scan modes.
*IPS Engine caches the URL and a replacement message is presented after the second attempt.
1. Only available on FortiGate models with HDD or when FortiAnalyzer or FortiGate Cloud is connected and enabled.
2. Only applies to inspection on IMAP, POP3, SMTP, and MAPI protocols.
Part 3 External Blocklist EMS Threat Feed AI/ML Based FortiAI Inline
Detection Detection
The following table indicates which Web Filter features are supported by their designated inspection modes.
1. Local Category and Remote Category filters do not support the warning and authenticate actions.
2. Local Category and Remote Category filters cannot be overridden.
3. Only HTTP POST Action is supported.
The following tables indicate which Email Filters are supported by the specified inspection modes for local filtering and
FortiGuard-assisted filtering.
Flow No No No No No
The following table indicates which DLP filters are supported by their designated inspection modes.
Proxy Yes Yes Yes Yes Yes Yes Yes Yes Yes
*File-size filtering only works if file size is present in the protocol exchange.
Antivirus
FortiOS offers the unique ability to implement both flow-based and proxy-based antivirus concurrently, depending on the
traffic type, users, and locations. Flow-based antivirus offers higher throughput performance.
FortiOS includes two preloaded antivirus profiles:
l default
l wifi-default
You can customize these profiles, or you can create your own to inspect certain protocols, remove viruses, analyze
suspicious files with FortiSandbox, and apply botnet protection to network traffic. Once configured, you can add the
antivirus profile to a firewall policy.
The following table indicates which protocols can be inspected by the designated antivirus scan modes.
Proxy Yes Yes Yes Yes Yes Yes Yes Yes* Yes
* Proxy mode antivirus inspection on CIFS protocol has the following limitations:
l Cannot detect infections within some archive files.
l Cannot detect oversized files.
Starting from 6.4.0, the scan mode option is no longer available for flow-based AV.
This means that AV no longer exclusively uses the default or legacy scan modes when handling traffic on flow-based
firewall policies. Instead, AV in flow-based policies uses a hybrid of the two scan modes. Flow AV may use a pre-filtering
database for malware detection in some circumstances as opposed to the full AV signature database in others. The scan
method is determined by the IPS engine algorithm that is based on the type of file being scanned. When handling
oversized files in flow-based AV, the action can either be pass (default) or block. When theaction is pass, IPS appends
to-be-scan data into the AV scan buffer. If the appended file size exceeds the oversize-limit that is defined in the protocol
option profile, then the AV session is cleared and the file is bypassed from AV scanning.
In contrast, proxy mode maintains the scan mode option, which can be toggled between default or legacy mode. In
default mode, the WAD daemon receives the file and then decides if it can do an in-process scan of the file in simple AV
configuration scenarios. If the file is in an oversized archive that is supported by the stream-based decompressor, then it
is sent to stream-based scan for best effort inspection. Stream-based scan decompresses and scans the entire archive
without archiving the file. If the file is not supported by stream-based scan, then it is buffered and then sent to the
scanunit daemon for inspection on content that is under the oversize limit.
In legacy mode, stream-based scanning is disabled, so oversized archive files and files that cannot be handled by WAD
in-process scan are buffered and sent to the scanunit daemon for processing.
The AV Engine AI malware detection model integrates into regular AV scanning to help detect potentially malicious
Windows Portable Executables (PEs) in order to mitigate zero-day attacks. Previously, this type of detection was
handled by heuristics that analyzed file behavior. With AV Engine AI, the module is trained by FortiGuard AV against
many malware samples to identify file features that make up the malware. The AV Engine AI package can be
downloaded by FortiOS via FortiGuard on devices with an active AV subscription. The machine-learning-
detection setting is enabled by default at a per-VDOM level. Files detected by the AV Engine AI are identified with the
W32/AI.Pallas.Suspicious virus signature.
Scan mode?
l When enabled, supported files (such as EXE, PDF, and MS Office) are forwarded to the scanunit scan.
l AV engine AI scan is enabled by default. To disable it:
config antivirus settings
set machine-learning-detection disable
end
l Stream-based scan supports the following archive file types: ZIP, GZIP, BZIP2, TAR, and ISO (ISO 9660).
l In FortiOS 7.0, stream-based scan is supported in HTTP(S), FTP(S), and SCP/SFTP.
l In FortiOS 6.4 and 6.2, stream-based scan is only supported in HTTP(S).
l Stream-based scan does not support HTTP POST.
l Stream-based scan is not supported when the following features are enabled:
l DLP
l Quarantine
l FortiGuard outbreak prevention, external block list, and EMS threat feed
l Content Disarm
l If a file is not supported, it is buffered and sent to scanunit for scanning.
l An oversized archive file is a compressed file that is oversized according to the following setting:
config firewall profile-protocol-options
edit <profile>
config <protocol>
set oversize-limit <size>
end
next
end
l If the file is not oversized, it is buffered and sent to scanunit for scanning.
Notes
Stream-based scans:
l Are performed with no oversize limits on a best effort basis.
l Can inspect the contents of large archive files without buffering the entire file.
l Decompress and scan the entire archive.
Legacy scan mode:
l Used to disable stream-based scanning for troubleshooting purposes.
l Limited by the oversize and uncompressed-oversize limits:
config firewall profile-protocol-options
edit <profile>
config <protocol>
set oversize-limit <size>
set uncompressed-oversize-limit <size>
end
next
end
TCP windows
Some file transfer applications can negotiate large TCP windows. For example, WinSCP can negotiate an initial TCP
window size of about 2 GB.
The TCP window options can be used to prevent overly large initial TCP window sizes, helping avoid channel flow
control issues. It allows stream-based scan's flow control to limit peers from sending data that exceeds a policy's
configured oversize limit.
end
next
end
Databases
The antivirus scanning engine uses a virus signatures database to record the unique attributes of each infection. The
antivirus scan searches for these signatures and when one is discovered, the FortiGate determines if the file is infected
and takes action.
All FortiGates have the normal antivirus signature database. Some models have additional databases that you can use.
The database you use depends on your network and security needs, and on your FortiGate model.
The extended virus definitions database is the default setting and provides comprehensive antivirus protection. Low-end
FortiGate models cannot support the extreme database. The FortiGate 300D is the lowest model that supports the
extreme database. All VMs support the extreme database. The use-extreme-db setting is only available on models
that support the extreme database.
Extended This is the default setting. This database includes currently spreading viruses, as
determined by the FortiGuard Global Security Research Team, plus recent
viruses that are no longer active. These viruses may have been spreading within
the last year but have since nearly or completely disappeared.
Extreme This includes the extended database, plus a large collection of zoo viruses. These
are viruses that have not spread in a long time and are largely dormant. Some zoo
viruses might rely on operating systems and hardware that are no longer widely
used.
Content disarm and reconstruction (CDR) allows the FortiGate to sanitize Microsoft Office documents and PDF files
(including those that are in ZIP archives) by removing active content, such as hyperlinks, embedded media, JavaScript,
macros, and so on from the files (disarm) without affecting the integrity of its textual content (reconstruction). It allows
network administrators to protect their users from malicious document files.
Files processed by CDR can be stored locally for quarantine on FortiAnalyzer, FortiSandbox, or FortiGate models with a
hard disk. The original copies can also be obtained in the event of a false positive.
CDR is supported on HTTP, SMTP, POP3, and IMAP. Note that SMTP splice and client-comfort mode are not
supported. CDR does not support flow-based inspection modes.
Sample topology
In this example, the a Microsoft Office document with an embedded hyperlink (that redirects to an external website) is
sent to the receiver. When the user receives the file, the hyperlink in the document is deactivated.
To configure CDR:
File Quarantine Saves the original document file to disk (if possible) or a connected
FortiAnalyzer based on the FortiGate log settings (config log
fortianalyzer setting).
Discard The default setting, which discards the original document file.
5. Click OK.
By default, stripping of all active Microsoft Office and PDF content types are enabled. In this example, stripping macros
in Microsoft Office documents will be disabled.
config antivirus profile
edit av
config content-disarm
set office-macro disable
set detect-only {enable | disable}
set cover-page {enable | disable}
end
next
end
Where:
detect-only Only detect disarmable files, do not alter content. Disabled by default.
cover-page Attach a cover page to the file's content when the file has been processed by
CDR. Enabled by default.
FortiGuard Virus Outbreak Protection Service (VOS) allows the FortiGate antivirus database to be subsidized with third-
party malware hash signatures curated by FortiGuard. The hash signatures are obtained from FortiGuard's Global
Threat Intelligence database. The antivirus database queries FortiGuard with the hash of a scanned file. If FortiGuard
returns a match, the scanned file is deemed to be malicious. Enabling the AV engine scan is not required to use this
feature.
FortiGuard VOS can be used in both proxy-based and flow-based policy inspections across all supported protocols.
The FortiGate must be registered with a valid FortiGuard outbreak prevention license.
1. Go to System > FortiGuard and locate the Outbreak Prevention section in the table.
2. See the instructions in the video, How to Purchase or Renew FortiGuard Services, if required.
Service : Web-filter
Status : Enable
License : Contract
Service : Antispam
Status : Disable
The external malware block list allows users to add their own malware signatures in the form of MD5, SHA1, and
SHA256 hashes. The FortiGate's antivirus database retrieves an external malware hash list from a remote server and
polls the hash list every n minutes for updates. Enabling the AV engine scan is not required to use this feature.
The external malware block list can be used in both proxy-based and flow-based policy inspections, but it is not
supported in AV quick scan mode.
Note that using different types of hashes simultaneously may slow down the performance of malware scanning. It is
recommended to use one type of hash.
# Invalid entries
7688499dc71b932feb126347289c0b8a_md5_sample2
7614e98badca10b5e2d08f8664c519b7a906fbd5180ea5d04a82fce9796a4b87sha256_sample3
The quarantine setting is configured in each protocol (set quarantine). The malware threat feed is also specified
(set external-blocklist-enable-all disable) to the threat connector, malhash1 (set external-
blocklist "malhash1").
To verify the scanunit daemon updated itself with the external hashes:
A FortiGate can pull malware threat feeds from FortiClient EMS, which in turn receives malware hashes detected by
FortiClients. The malware hash can be used in an antivirus profile when AV scanning is enabled with block or monitor
actions. This feature is supported in proxy and flow mode.
If an external malware blocklist and the FortiGuard outbreak prevention database are also
enabled in the antivirus profile, the checking order is: AV local database, EMS threat feed,
external malware blocklist, FortiGuard outbreak prevention database. If the EMS threat feed
and external malware blocklist contain the same hash value, then the EMS infection will be
reported if both of them are blocked.
c. Configure the other settings if needed (see Configuring FortiClient EMS on page 2118 for more details).
d. Click OK.
2. Create the antivirus profile:
a. Go to Security Profiles > AntiVirus and click Create New.
b. In the Virus Outbreak Prevention section, enable Use EMS threat feed.
c. Configure the other settings as needed.
d. Click OK.
Sample log
3. On the client PC, download the EICAR Standard Anti-Virus Test File via HTTP.
4. Check the antivirus statistics on the FortiGate. Since the action is set to monitor for HTTP, HTTP virus
detected increases by 1:
# diagnose ips av stats show
AV stats:
HTTP virus detected: 1
HTTP virus blocked: 0
SMTP virus detected: 0
SMTP virus blocked: 0
POP3 virus detected: 0
POP3 virus blocked: 0
IMAP virus detected: 0
IMAP virus blocked: 0
NNTP virus detected: 0
NNTP virus blocked: 0
FTP virus detected: 0
FTP virus blocked: 0
SMB virus detected: 0
SMB virus blocked: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.9.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.10.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.11.1 = Counter32: 1 (fgAvFTPVirusDetected)
iso.3.6.1.4.1.12356.101.8.2.1.1.12.1 = Counter32: 1 (fgAvFTPVirusBlocked)
iso.3.6.1.4.1.12356.101.8.2.1.1.13.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.14.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.15.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.16.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.17.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.18.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.19.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.20.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.21.1 = Counter32: 0
iso.3.6.1.4.1.12356.101.8.2.1.1.22.1 = Counter32: 0
CIFS support
Antivirus scanning on Common Internet File System (CIFS) traffic is supported in flow-based and proxy-based
inspection. The file filter profile handles the configuration of file filtering on CIFS. The antivirus profile handles the
antivirus configuration for CIFS scanning.
File filtering for CIFS is performed by inspecting the first 4 KB of the file to identify the file's magic number. If a match
occurs, CIFS file filtering prevents the CIFS command that contains that file from running. The file filter functions
differently for un-encrypted and encrypted CIFS traffic:
l For un-encrypted CIFS traffic, the standalone file filter works in flow and proxy mode.
l For encrypted CIFS traffic, the CIFS profile must be enabled in the firewall policy because the SMB server’s
credential settings are still be configured in CIFS profile. Using the standalone file filter only works in proxy mode.
For a CIFS profile to be available for assignment in a policy, the policy must use proxy inspection mode. See Proxy mode
inspection on page 1026 for details. Note that in proxy inspection mode, special condition archive files (encrypted,
corrupted, mailbomb, and so on) marked by the antivirus engine are blocked automatically.
Messages that are compressed with LZNT1, LZ77, and LZ77+Huffman algorithms can be scanned in proxy mode.
The domain controller must be configured when CIFS traffic is encrypted. The configuration tells the FortiGate the
network location of the domain controller and the superuser credentials.
To create a CIFS profile, configure the server credential type and create a file filter profile.
none
The CIFS profile assumes the CIFS traffic is unencrypted. This is the default value.
config firewall profile-protocol-options
edit "cifs"
config cifs
set server-credential-type none
end
next
end
credential-replication
To decrypt CIFS traffic, FortiOS obtains the session key from the domain controller by logging in to the superuser
account. The domain controller must be configured.
config firewall profile-protocol-options
edit "cifs"
config cifs
set server-credential-type credential-replication
set domain-controller "SERVER_NAME"
end
next
end
Variable Description
domain-controller <string> The previously configured domain to decrypt CIFS traffic for.
credential-keytab
To decrypt CIFS traffic, FortiOS uses a series of keytab values. This method is used when the SMB connection is
authenticated by Kerberos. Keytab entries must be configured, and are stored in FortiOS in plaintext.
Variable Description
keytab <keytab> Base64 encoded keytab file containing the credentials of the server.
Multiple rules can be added to a file filter profile. See File filter on page 1160.
Variable Description
feature-set {flow | proxy} Flow or proxy mode feature set (default = flow).
Variable Description
protocol {http ftp smtp imap pop3 Filter based on the specified protocol(s).
mapi cifs ssh}
direction {incoming | outgoing | Match files transmitted in the session's originating (incoming) and/or reply
any} (outgoing) direction (default = any).
password-protected [yes | any] Match only password-protected files (yes) or any file (default = any).
file-type <file_type> The file types to be matched. See Supported file types on page 1165 for details.
The antivirus profile handles the antivirus configuration for CIFS scanning.
Variable Description
Variable Description
l monitor: Log the matched files.
quarantine {enable | disable} Enable/disable quarantine for infected files (default = disable).
Log samples
File-type detection events generated by CIFS profiles are logged in the utm-cifs log category. Antivirus detection over
the CIFS protocol generates logs in the utm-virus category. See the FortiOS Log Message Reference for more
information.
Antivirus profiles can submit potential zero-day viruses to FortiSandbox for inspection. Based on FortiSandbox's
analysis, the FortiGate can supplement its own antivirus database with FortiSandbox's threat intelligence to detect files
determined as malicious or suspicious. This augments the FortiGate antivirus with zero-day detection.
FortiSandbox can be used with antivirus in both proxy-based and flow-based inspection modes. The FortiGate first
examines the file for any known viruses. When a match is found, the file is tagged as known malware. If no match is
found, the files are forwarded to FortiSandbox using the following options:
l All Supported Files: all files matching the file types defined in the scan profile of the FortiSandbox are forwarded.
l Suspicious Files Only: files classified by the antivirus as having any possibility of active content are forwarded to
FortiSandbox. When using FortiGate Cloud Sandbox, we recommend selecting this option due to its submission
limits.
l None: files are not forwarded to FortiSandbox.
For more information, see Configuring Sandboxing on page 2113.
FortiGate diagnostics
Statistics:
vfid: 0, detected: 2, clean: 1252, risk_low: 6, risk_med: 2, risk_high: 1, limit_
reached:0
FortiSandbox diagnostics
FortiAI can be used with antivirus profiles in proxy inspection mode (flow mode is currently not supported). FortiAI
inspects high-risk files and issues a verdict to the firewall based on how close the file features match those of malware.
When enabled, FortiAI can log, block, ignore, or monitor (allow) the file based on the verdict.
A licensed FortiAI appliance with version 1.5.1 or later is required to use this feature.
1. Configure FortiAI to join a Security Fabric in FortiOS (see Configuring FortiAI on page 2138).
2. In the FortiAI CLI, enable inline inspection:
config system fortiai
set status enable
end
3. Configure an AV profile in FortiOS to use inline inspection and block detected infections:
config antivirus profile
edit "av"
set feature-set proxy
config http
set fortiai block
end
config ftp
set fortiai block
end
config imap
set fortiai block
end
config pop3
set fortiai block
end
config smtp
set fortiai block
end
config mapi
set fortiai block
end
config nntp
set fortiai block
end
config cifs
set fortiai block
end
config ssh
set fortiai block
end
next
end
4. Add the AV profile to a firewall policy. When potential infections are blocked by FortiAI inline inspection, a
replacement message appears (FortiAI Block Page, see Replacement messages on page 2020 for more
Sample log
The following inspection logic applies when FortiAI inline inspection is enabled simultaneously with other AV inspection
methods. The AV engine inspection and its verdict always takes precedence because of performance. The actual
behavior depends on which inspected protocol is used.
If any AV inspection method returns an infected verdict, the FortiAI inspection is aborted.
The following file types are sent to FortiAI for inline inspection:
7Z HTML RTF
ARJ JS TAR
BZIP LZH VBA
BZIP2 LZW VBS
CAB MS Office documents (XML and non- WinPE (EXE)
ELF XML) XZ
GZIP PDF ZIP
RAR
Web filter
Web filtering restricts or controls user access to web resources and can be applied to firewall policies using either policy-
based or profile-based NGFW mode.
In FortiOS, there are three main components of web filtering:
l Web content filter: blocks web pages containing words or patterns that you specify.
l URL filter: uses URLs and URL patterns to block or exempt web pages from specific sources, or block malicious
URLs discovered by FortiSandbox.
l FortiGuard Web Filtering service: provides many additional categories you can use to filter web traffic.
These components interact with each other to provide maximum control over what users on your network can view and
protect your network from many internet content threats.
Web filters are applied in the following order:
1. URL filter
2. FortiGuard Web Filtering
3. Web content filter
4. Web script filter
5. Antivirus scanning
URL filter
The URL filter uses specific URLs with patterns containing text and regular expressions so the FortiGate can process the
traffic based on the filter action (exempt, block, allow, monitor) and web pages that match the criteria. Once a URL filter
is configured, it can be applied to a firewall policy.
The following filter types are available:
Simple The FortiGate tries to strictly match the full context. For example, if you enter
www.facebook.com in the URL field, it only matches traffic with www.facebook.com. It won't
match facebook.com or message.facebook.com.
When the FortiGate finds a match, it performs the selected URL action.
Regular The FortiGate tries to match the pattern based on the rules of regular expressions or
expression/ wildcards. For example, if you enter *fa* in the URL field, it matches all the content that has fa
wildcard such as www.facebook.com, message.facebook.com, fast.com, and so on.
When the FortiGate finds a match, it performs the selected URL action.
For more information, see the URL Filter expressions technical note in the Knowledge Base.
The following actions are available:
Exempt The traffic is allowed to bypass the remaining FortiGuard web filters, web content filters, web
script filters, antivirus scanning, and DLP proxy operations.
Block The FortiGate denies or blocks attempts to access any URL that matches the URL pattern. A
replacement message is displayed.
Allow The traffic is passed to the remaining FortiGuard web filters, web content filters, web script
filters, antivirus proxy operations, and DLP proxy operations. If the URL does not appear in
the URL list, the traffic is permitted.
Monitor The traffic is processed the same way as the Allow action. For the Monitor action, a log
message is generated each time a matching traffic pattern is established.
In the following example, a URL filter will be created to block the facebook.com URL using a wildcard.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Static URL Filter section, enable URL Filter.
3. Click Create New. The New URL Filter pane opens.
4. For URL, enter *facebook.com, for Type, select Wildcard, and for Action, select Block.
Verify the URL filter results by going to a blocked website. For example, when you go to the Facebook website, the
replacement message appears:
FortiGuard filter
The FortiGuard filter enhances the web filter features by sorting billions of web pages into a wide range of categories that
users can allow or block.
The FortiGuard Web Filtering service includes over 45 million individual website ratings that apply to more than two
billion pages. When the FortiGuard filter is enabled in a web filter profile and applied to firewall policies, if a request for a
web page appears in traffic controlled by one of the firewall policies, the URL is sent to the nearest FortiGuard server.
The URL category or rating is returned. If the category is blocked, the FortiGate shows a replacement message in place
of the requested page. If the category is not blocked, the page request is sent to the requested URL as normal.
To use this service, you must have a valid FortiGuard license.
The following actions are available:
Monitor Permit and log access to sites in the category. User quotas can be enabled for this option (see
Usage quota on page 1076).
Block Prevent access to the sites in the category. Users trying to access a blocked site see a
replacement message indicating the site is blocked.
Warning Display a message to the user allowing them to continue if they choose.
Authenticate Require the user to authenticate with the FortiGate before allowing access to the category or
category group.
Disable Remove the category from the from the web filter profile.
This option is only available for local or remote categories from the right-click menu.
FortiGuard has many web filter categories, including two local categories and a special remote category. Refer to the
following table for more information:
The priority of categories is local category > external category > FortiGuard built-in category. If a URL is configured as a
local category, it only follows the behavior of the local category and not the external or FortiGuard built-in category.
The following example shows how to block a website based on its category. The information and computer security
category (category 52) will be blocked.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the FortiGuard category based filter section, select Information and Computer Security, then click Block.
set category 52
set action block
next
end
end
next
end
3.
There is an option to allow users with valid credentials to override blocked categories.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. Enable Allow users to override blocked categories.
3. Enter information in the following fields:
l Groups that can override
l Profile name
l Switch applies to
l Switch Duration
5. Click OK.
The following example shows how to issue a warning when a user visits a website in a specific category (information and
computer security, category 52).
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the FortiGuard category based filter section, select Information and Computer Security, then click Warning.
3. Set the Warning Interval, then click OK.
The warning interval is the amount of time until the warning appears again after the user proceeds past it.
The following example shows how to authenticate a website based on its category (information and computer security,
category 52).
1. Go to Security Profiles > Web Filter and edit or create a new web filter profile.
2. In the FortiGuard category based filter section, select Information and Computer Security, then click Authenticate.
3. Set the Warning Interval and select one or more user groups, then click OK.
4. Configure the remaining settings as needed.
5. Click OK.
3. Enter the username and password for the configured user group, then click Continue.
When the category action is Block, Warning, or Authenticate, you can customize the replacement message page that a
user sees.
1. Go to Security Profiles > Web Filter and edit or create a new web filter profile.
2. In the FortiGuard category based filter section, right-click on a category and select Customize.
3. Select a Replacement Message Group. See Replacement message groups on page 2024 for details.
4. Optionally, click Edit FortiGuard Block Page or Edit FortiGuard Warning Page to make modifications.
5. Click Save.
6. Configure the remaining settings as needed.
7. Click OK.
When credential phishing prevention is enabled, the FortiGate scans for corporate credentials submitted to external
websites and compares them to sensitive credentials stored in the corporate domain controller. Based on the configured
antiphishing rules in proxy mode web filter profiles, the FortiGate will block the URL or alert the user if the credentials
match ones that are stored on the corporate domain controller.
l The corporate domain controller must be configured in the domain controller.
l Credentials can be matched based on sAMAccountName, user principal name (UPN), or down-level logon name.
l The antiphishing profile defines the corporate domain controller, antiphishing check option, default action if no rules
match, antiphishing status, and so on.
l Inspection entries in the profile define what action occurs when the submission request matches the specified
FortiGuard categories.
l The profile scans for pre-defined and custom username and password fields in the HTTP request, such as
username, auth, and password. You can evaluate custom fields by configuring custom patterns.
l The URL filter defines individual URLs that the antiphish action (block or log) is applied to when the URL submission
request matches.
Web-based URL filter actions and FortiGuard category-based filtering have higher priority than
antiphishing URL filter actions and FortiGuard filtering:
l If a request is blocked by the web-based URL filter or FortiGuard filter, there is no further
antiphishing scanning. Antiphishing scanning only happens after the web-based URL
filtes and FortiGuard filters allow the traffic.
l If a submission matches an entry in the URL filter table that has an antiphishing action,
the defined action is taken. No further FortiGuard category-based rules are applied.
l Like firewall rules, the URL filter table and Fortiguard category-based antiphishing rules
use a top-down priority. The rule that matches first is the one that is used.
In this example, URLs that match FortiGuard category 37 (social networking) will be blocked and other categories will be
logged.
2. Configure the antiphishing profile, which includes the FortiGuard category rule:
config webfilter profile
edit <profile-name>
set feature-set proxy
...
config web
...
end
config antiphish
set status enable
set domain-controller "win2016"
4. Optionally, define custom patterns to scan fields other than the built-in username and password keywords:
config webfilter profile
edit "<profile-name>"
config custom-patterns
edit "customer-name"
set category username
next
edit "customer-passwd"
set category password
next
end
end
next
end
Configuration examples
To specify the source IP and port for the fetching domain controller:
next
end
unset options
...
end
config antiphish
set status enable
set check-username-only enable
config inspection-entries
edit "cat34"
set fortiguard-category 34
set action block
next
end
set domain-controller "win2016"
end
set log-all-url enable
next
end
In this example, the qwer and dauw9 entries use the literal type, while [0-6]Dat* and [0-5]foo[1-4] use the
default regex type.
Usage quota
In addition to using category and classification blocks and overrides to limit user access to URLs, you can set a daily
quota by category, category group, or classification. Quotas allow access for a specified length of time or a specific
bandwidth, and are calculated separately for each user. Quotas are reset daily at midnight.
Quotas can be set for the Monitor, Warning, or Authenticate actions. Once the quota is reached, the traffic is blocked and
the replacement message page displays.
Configuring a quota
The following example shows how to set a time quota for the education category (category 30).
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. For Feature set, select Proxy-based.
3. In the FortiGuard category based filter section, scroll to the General Interest - Personal and click the + to expand the
section.
edit 1
set category 30
next
end
config quota
edit 1
set category 30
set type time
set duration 5m
next
end
end
next
end
1. Go to a website that belongs to the education category, such https://www.harvard.edu/. You can view websites in
that category at the moment.
2. In FortiOS, go to Dashboard > FortiGuard Quota Monitor to check the used and remaining time.
3. When the quota reaches its limit, traffic is blocked and the replacement page displays.
You can control access to web content by blocking webpages containing specific words or patterns. This helps to
prevent access to pages with questionable material. You can specify words, phrases, patterns, wildcards, and regular
expressions to match content on webpages. You can use multiple web content filter lists and select the best one for each
web filter profile. The maximum number of web content patterns in a list is 5000.
When configuring a web content filter list, the following patterns are available:
Wildcard Use this setting to block or exempt one word or text strings of up to 80 characters. You can
also use wildcard symbols such as ? or * to represent one or more characters. For example, a
wildcard expression forti*.com matches fortinet.com and fortiguard.com. The * represents any
character appearing any number of times.
Regular expression Use this setting to block or exempt patterns of regular expressions that use some of the same
symbols as wildcard expressions, but for different purposes. In regular expressions, *
represents the character before the symbol. For example, forti*.com matches fortiii.com but
not fortinet.com or fortiice.com. In this case, the symbol * represents i appearing any number
of times.
Content evaluation
The web content filter scans the content of every webpage that is accepted by a firewall policy. The system administrator
can specify banned words and phrases and attach a numerical value (or score) to the importance of those words and
phrases. When the web content filter scan detects banned content, it adds the scores of banned words and phrases
found on that page. If the sum is higher than a threshold set in the web filter profile, the FortiGate blocks the page.
The default score for web content filter is 10 and the default threshold is 10. This means that by default, a webpage is
blocked by a single match. These settings can only be configured in the CLI.
Banned words or phrases are evaluated according to the following rules:
l The score for each word or phrase is counted only once, even if that word or phrase appears many times in the
webpage.
l The score for any word in a phrase without quotation marks is counted.
l The score for a phrase in quotation marks is counted only if it appears exactly as written.
The following table is an example of how rules are applied to the webpage contents . For example, a webpage contains
only this sentence:
The score for each word or phrase is counted only once, even if that word or phrase appears many times in the
webpage.
word phrase 20 40 20 Each word appears twice but is only counted once,
giving a total score of 40. The webpage is blocked.
word sentence 20 20 20 word appears twice and sentence does not appear, but
since any word in a phrase without quotation marks is
counted, the score for this pattern is 20. The webpage
is blocked.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Static URL Filter section, enable Content Filter.
3. Click Create New. The New Web Content Filter pane opens.
4. Configure the following settings:
Pattern fortinet
Language Western
Action Block
Status Enable
Advanced filters 1
This setting blocks malicious URLs that FortiSandbox finds. Your FortiGate must be connected to a registered
FortiSandbox.
For information on configuring FortiSandbox, see Using FortiSandbox with antivirus on page 1053.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Static URL Filter section, enable Block malicious URLs discovered by FortiSandbox.
3. Click OK.
If you do not have a FortiGuard license, but you have enabled services that need a FortiGuard license (such as
FortiGuard filter), then you will get a rating error message.
Use this setting to allow access to websites that return a rating error from the FortiGuard Web Filter service.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Rating Options section, enable Allow websites when a rating error occurs.
3. Click OK.
If you enable this setting, in addition to only sending domain information to FortiGuard for rating, the FortiGate always
sends both the URL domain name and the TCP/IP packet's IP address (except for private IP addresses) to FortiGuard
for the rating.
The FortiGuard server might return a different category of IP address and URL domain. If they are different, the
FortiGate uses the rating weight of the IP address or domain name to determine the rating result and decision. This
rating weight is hard-coded in FortiOS.
For example, if we use a spoof IP of Google as www.irs.gov, the FortiGate will send both the IP address and domain
name to FortiGuard to get the rating. We get two different ratings: one is the search engine and portals that belong to the
Google IP, the second is the government and legal organizations that belongs to www.irs.gov. Because the search
engine and portals rating has a higher weight than government and legal organizations, the traffic is rated as search
engine and portals.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Rating Options section, enable Rate URLs by domain and IP address.
3. Click OK.
Use this setting to block websites when their SSL certificate CN field does not contain a valid domain name.
This option also blocks URLs that contains spaces. If there is a space in the URL, it must be written as %20 in the URL
path.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Static URL Filter section, enable Block invalid URLs .
3. Click OK.
Advanced filters 2
Safe search
This setting applies to popular search sites and prevents explicit websites and images from appearing in search results.
The supported search sites are:
l Google
l Yahoo
l Bing
l Yandex
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Search Engines section, enable Enforce 'Safe Search' on Google, Yahoo!, Bing, Yandex.
3. Click OK.
The Restrict YouTube access setting in the video filter profile adds the HTTP header YouTube-Restrict: Strict or
YouTube-Restrict: Moderate into the HTTP request when enabled. When YouTube reads this header, it applies
the appropriate content restriction based on the selected mode. YouTube Restricted Mode is an optional setting that
filters out potentially mature videos while leaving a large number of videos still available (see Restrict YouTube content
available to users and Manage your organization's YouTube settings for more information). Google defines the restricted
YouTube access modes as follows:
l Strict Restricted YouTube access: this setting is the most restrictive. Strict Restricted Mode does not block all
videos, but works as a filter to screen out many videos based on an automated system, while leaving some videos
still available for viewing.
l Moderate Restricted YouTube access: this setting is similar to Strict Restricted Mode but makes a much larger
collection of videos available.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Search Engines section, enable Restrict YouTube Access and select either Strict or Moderate.
3. Click OK.
Vimeo access
The file filter profile includes a setting to restrict Vimeo access, which can only be configured in the CLI.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Search Engines section, enable Log all search keywords.
3. Click OK.
Use this setting to block access to certain Google accounts and services, while allowing access to accounts with
domains in the exception list.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Proxy Options section, enable Restrict Google account usage to specific domains.
3. Click the + and enter the domains that Google can access, such as www.fortinet.com.
4. Click OK.
When you try to use Google services like Gmail, only traffic from the domain of www.fortinet.com can go through. Traffic
from other domains is blocked.
Use this setting to select the action to take with HTTP POST traffic. HTTP POST is the command used by the browser
when you send information, such as a completed form or a file you are uploading to a web server. The action options are
allow or block. The default is allow.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile.
2. In the Proxy Options section, for HTTP POST Action, select Allow or Block.
3. Click OK.
Web filter profiles have settings to filter Java applets, ActiveX, and cookies from web traffic. Note that if these filters are
enabled, websites using Java applets, ActiveX, and cookies might not function properly.
1. Go to Security Profiles > Web Filter and click Create New, or edit an existing profile. and go to the Proxy Options
section.
2. In the Proxy Options section, enabled the filters you want to use: Remove Java Applets, Remove ActiveX, or
Remove Cookies.
FortiOS provides diagnostics commands to view web filter statistics reports, which are either proxy-based or flow-based.
The commands are available in both VDOM and global command lines.
Use the diagnose wad filter vd {<VDOM> | global} command to filter for per-VDOM or global statistics
reports.
In the following example, there are two VDOMs (root and vdom1) using proxy-based policies that have web filter profiles
enabled.
Use the diagnose webfilter stats list {<VDOM> | global} command to check the flow-based web filter
statistics.
In the following example, the VDOM is using flow-based policies that have web filter profiles enabled.
As increasing numbers of malware have started to use SSL to attempt to bypass IPS, maintaining a fingerprint-based
certificate blocklist is useful to block botnet communication that relies on SSL.
This feature adds a dynamic package that is distributed by FortiGuard and is part of the Web Filtering service. It is
enabled by default for SSL/SSH profiles, and can be configured using the following CLI commands:
config vdom
edit <vdom>
config firewall ssl-ssh-profile
edit "certificate-inspection"
Video filter
With the video filter profile, you can filter YouTube videos based on FortiGuard categories or by channel ID for a more
granular override of a single channel, user, or video. The video filter profile is currently supported in proxy-based policies
and requires SSL deep inspection. The FortiGuard Video filtering service is based on a valid FortiGuard web filter
license.
The following topics provide information about video filters:
l Filtering based on FortiGuard categories on page 1090
l Filtering based on YouTube channel on page 1094
Video filtering is only proxy-based and uses the WAD daemon to inspect the video in four phases:
1. When the WAD receives a video query from a client, it extracts the video ID (vid) and tries to check the category
and channel from the local cache.
2. If there is no match from the local cache, it connects to the FortiGuard video rating server to query the video
category.
3. If the FortiGuard rating fails, it uses the videofilter.youtube-key to communicate with the Google API server
to get its category and channel ID. This is the API query setting and it requires the user’s own YouTube API key
string. This configuration is optional.
4. If all steps fail to match the video, the WAD calls on the IPS engine to match the video ID and channel ID from the
application signature database.
In the following example, a new video filter profile is created to block the Knowledge category.
In the firewall policy settings, the default application control profile is recommended because it
blocks QUIC traffic. Many Google services use the QUIC protocol on UDP/443. By blocking
QUIC, YouTube will use standard HTTPS TCP/443 connections.
Source All
Destination All
Service All
NAT Enable
When a user browses to YouTube and selects a video based in the Knowledge category, a replacement message will
appear. This replacement message says the URL is blocked, and displays the URL of the YouTube video. On the
FortiGate, verify the forward traffic and web filter logs.
fortiguard-anycast : enable
fortiguard-anycast-source: debug
protocol : https
port : 443
...
webfilter-license : Contract
webfilter-expiration: Fri Dec 13 2030
...
videofilter-license : Contract
videofilter-expiration: Fri Dec 13 2030
Sample output
Video filtering can be configured to filter specific YouTube channels. When a video matches a YouTube channel, the
video will take the corresponding action of allow, monitor, or block. Video filtering is only supported in proxy-based
inspection mode, and deep inspection must be enabled in the firewall policy.
By default, when the FortiGuard category-based filter and YouTube channel override are used together, a video will be
blocked if it matches either category or YouTube channel and the action is set to block.
The override-category option allows the channel action to override the category action. A category can be blocked,
but certain channels in that category can be allowed when the override-category option is enabled (see
Configuration with YouTube channel override).
The following table lists how to identify the YouTube channel ID based on different YouTube video URLs formats:
In a YouTube channel filter profile, the default action is set to monitor when there is no match. Logging is also disabled by
default.
config videofilter youtube-channel-filter
edit <id>
set default-action {block | monitor | allow}
set log {enable | disable}
next
end
Basic configuration
In the following example, the Fortinet YouTube channel ID (UCJHo4AuVomwMRzgkA5DQEOA) is blocked, and the
video filter is applied to a policy.
b. Click OK.
3. Click OK.
4. Configure the firewall policy:
a. Go to Policy & Objects > Firewall Policy and click Create New.
b. For Inspection Mode, select Proxy-based.
c. Enable Video Filter and select the profile you created.
d. For SSL Inspection, select deep-inspection.
In this example, all categories in the video filter are configured to be blocked. The YouTube channel filter list is
configured with override-category enabled, which effectively creates an allowlist. The channel
UCR6d0EiC3G4WA8-Rqji6a8g is allowed.
set category-id 8
set log enable
next
edit 10
set action block
set category-id 9
set log enable
next
edit 11
set action block
set category-id 10
set log enable
next
end
end
next
end
4. Verify the logs. The category action is set to block and the channel action is set to allow, so video access is
allowed:
30: date=2022-05-27 time=13:40:13 eventtime=1653684013375716267 tz="-0700"
logid="0348013682" type="utm" subtype="webfilter" eventtype="videofilter-channel"
level="notice" vd="vdom1" msg="Video channel is allowed." policyid=10 sessionid=69958
srcip=10.1.100.11 dstip=142.251.33.78 srcport=42542 dstport=443 srcintf="port2"
srcintfrole="undefined" dstintf="port1" dstintfrole="undefined" proto=6 service="HTTPS"
action="passthrough" videoinfosource="API" profile="channel_filter_override"
videoid="EAyo3_zJj5c" videochannelid="UCR6d0EiC3G4WA8-Rqji6a8g"
hostname="www.youtube.com" url="https://www.youtube.com/watch?v=EAyo3_zJj5c"
If the category action is changed to allow and the channel action is changed to block,
the video access would be blocked.
DNS filter
You can apply DNS category filtering to control user access to web resources. You can customize the default profile, or
create your own to manage network user access and apply it to a firewall policy, or you can add it to a DNS server on a
FortiGate interface. For more information about configuring DNS, see DNS on page 198.
DNS filtering has the following features:
l FortiGuard Filtering: filters the DNS request based on the FortiGuard domain rating.
l Botnet C&C domain blocking: blocks the DNS request for the known botnet C&C domains.
l External dynamic category domain filtering: allows you to define your own domain category.
l DNS safe search: enforces Google, Bing, and YouTube safe addresses for parental controls.
l Local domain filter: allows you to define your own domain list to block or allow.
l External IP block list: allows you to define an IP block list to block resolved IPs that match this list.
l DNS translation: maps the resolved result to another IP that you define.
DNS filtering connects to the FortiGuard secure DNS server over anycast by default. For more information about this
configuration, see DNS over TLS and HTTPS on page 209.
The IPS engine handles the DNS filter in flow mode policies and queries the FortiGuard web filter server for FortiGuard
categories. In proxy mode, the DNS proxy daemon handles the DNS filter and queries the FortiGuard SDNS server for
FortiGuard categories. When a DNS filter profile is enabled in config system dns-server, the DNS proxy daemon
handles the traffic.
DNS filter profiles cannot be used in firewall policies when the FortiGate is in NGFW policy-
based mode; see Profile-based NGFW vs policy-based NGFW on page 715 for more
information. They can be used in the DNS server; see FortiGate DNS server on page 201 for
more information.
A DNS filter profile can be applied in a policy to scan DNS traffic traversing the FortiGate (see
Configuring a DNS filter profile on page 1101), or applied on the DNS server interface (see
Applying DNS filter to FortiGate DNS server on page 1119).
In cases where the DNS proxy daemon handles the DNS filter (described in the preceding section) and if DNS caching is
enabled (this is the default setting), then the FortiGate will respond to subsequent DNS queries using the result in the
DNS cache and will not forward these queries to a real DNS server.
There are two options to disable this behavior:
There will be a performance impact to DNS queries since each query will not be cached, and
will be forwarded to a real DNS server.
DNS over TLS connections to the FortiGuard secure DNS server is supported. The CLI options are only available when
fortiguard-anycast is enabled. DNS filtering connects to the FortiGuard secure DNS server over anycast by
default.
Once a DNS filter is configured, it can be applied to a firewall policy. This example scans DNS traffic traversing the
FortiGate.
When a FortiGate DNS server has been configured, refer to the steps in Applying DNS filter to FortiGate DNS server on
page 1119.
1. Go to Security Profiles > DNS Filter and click Create New, or edit an existing profile.
2. Configure the settings as needed.
3. Click OK.
1. Go to Policy & Objects > Firewall Policy and click Create New, or edit an existing policy.
2. In the Security Profiles section, enable DNS Filter and select the DNS filter.
In cases where the DNS proxy daemon handles the DNS filter (described in DNS filter on page 1100) and if DNS caching
is enabled (this is the default setting), then the FortiGate will respond to subsequent DNS queries using the result in the
DNS cache and will not forward these queries to a real DNS server.
There are two options to disable this behavior:
l Disable DNS caching globally.
l Remove the DNS filter profile from the proxy mode firewall policy or from the DNS server configured on a FortiGate
interface.
There will be a performance impact to DNS queries since each query will not be cached, and
will be forwarded to a real DNS server.
You can use the FortiGuard category-based DNS domain filter to inspect DNS traffic. This makes use of FortiGuard's
continuously updated domain rating database for more reliable protection.
A DNS filter profile can be applied in a policy to scan DNS traffic traversing the FortiGate (see Configuring a DNS filter
profile on page 1101), or applied on the DNS server interface (see Applying DNS filter to FortiGate DNS server on page
1119).
The FortiGate must have a FortiGuard Web Filter license to use the FortiGuard category-
based filter.
1. Go to Security Profiles > DNS Filter and click Create New, or edit an existing profile.
2. Enable FortiGuard Category Based Filter.
3. Select the category and then select Allow, Monitor, or Redirect to Block Portal for that category.
4. In the Options section, select a setting for Redirect Portal IP. Select either Use FortiGuard Default (208.91.112.55)
or click Specify and enter another portal IP. The FortiGate will use the portal IP to replace the resolved IP in the DNS
response packet.
5. Click OK.
From your internal network PC, use a command line tool, such as dig or nslookup, to do a DNS query for some domains.
For example:
#dig www.example.com
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 61252
;; Flags: qr rd ra; QUERY: 1; ANSWER: 1; AUTHORITY: 13; ADDITIONAL: 11
;; QUESTION SECTION:
;; www.example.com. IN A
;; ANSWER SECTION:
www.example.com. 17164 IN A 93.184.216.34
;; AUTHORITY SECTION:
com. 20027 IN NS h.gtld-servers.net.
com. 20027 IN NS i.gtld-servers.net.
com. 20027 IN NS f.gtld-servers.net.
com. 20027 IN NS d.gtld-servers.net.
com. 20027 IN NS j.gtld-servers.net.
com. 20027 IN NS l.gtld-servers.net.
com. 20027 IN NS e.gtld-servers.net.
com. 20027 IN NS a.gtld-servers.net.
com. 20027 IN NS k.gtld-servers.net.
com. 20027 IN NS g.gtld-servers.net.
com. 20027 IN NS m.gtld-servers.net.
com. 20027 IN NS c.gtld-servers.net.
com. 20027 IN NS b.gtld-servers.net.
;; ADDITIONAL SECTION:
a.gtld-servers.net. 21999 IN A 192.5.6.30
a.gtld-servers.net. 21999 IN AAAA 2001:503:a83e::2:30
b.gtld-servers.net. 21997 IN A 192.33.14.30
b.gtld-servers.net. 21997 IN AAAA 2001:503:231d::2:30
c.gtld-servers.net. 21987 IN A 192.26.92.30
c.gtld-servers.net. 20929 IN AAAA 2001:503:83eb::30
d.gtld-servers.net. 3340 IN A 192.31.80.30
d.gtld-servers.net. 3340 IN AAAA 2001:500:856e::30
e.gtld-servers.net. 19334 IN A 192.12.94.30
e.gtld-servers.net. 19334 IN AAAA 2001:502:1ca1::30
f.gtld-servers.net. 3340 IN A 192.35.51.30
;; Received 509 B
;; Time 2019-04-05 09:39:33 PDT
;; From 172.16.95.16@53(UDP) in 3.8 ms
1. Go to Log & Report > DNS Query. There are logs for the DNS traffic that just passed through the FortiGate with the
FortiGuard rating for the domain name.
FortiGuard Service continually updates the botnet C&C domain list. The botnet C&C domain blocking feature can block
the botnet website access at the DNS name resolving stage. This provides additional protection for your network.
A DNS filter profile can be applied in a policy to scan DNS traffic traversing the FortiGate (see Configuring a DNS filter
profile on page 1101), or applied on the DNS server interface (see Applying DNS filter to FortiGate DNS server on page
1119).
1. Go to Security Profiles > DNS Filter and click Create New, or edit an existing profile.
2. Enable Redirect botnet C&C requests to Block Portal.
3. Optionally, click the botnet package link. The Botnet C&C Domain Definitions pane opens, which displays the latest
list.
Select a botnet domain from that list. From your internal network PC, use a command line tool, such as dig or nslookup,
to send a DNS query to traverse the FortiGate. For example:
#dig canind.co
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 997
;; Flags: qr rd; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 0
;; QUESTION SECTION:
;; canind.co. IN A
;; ANSWER SECTION:
canind.co. 60 IN A 208.91.112.55
;; Received 43 B
;; Time 2019-04-05 09:55:21 PDT
;; From 172.16.95.16@53(UDP) in 0.3 ms
The botnet domain query was blocked and redirected to the portal IP (208.91.112.55) .
1. Go to Log & Report > DNS Query to view the DNS query blocked as a botnet domain.
FortiOS also maintains a botnet C&C IP address database (IPDB). If a DNS query response IP address (resolved IP
address) matches an entry inside the botnet IPDB, this DNS query is blocked by the DNS filter botnet C&C.
Select an IP address from the IPDB list and use a reverse lookup service to find its corresponding domain name. From
your internal network PC, use a command line tool, such as dig or nslookup, to query this domain and verify that it is
blocked by the DNS filter botnet C&C. For example:
# dig cpe-98-25-53-166.sc.res.rr.com
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 35135
;; Flags: qr rd; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 0
;; QUESTION SECTION:
;; cpe-98-25-53-166.sc.res.rr.com. IN A
;; ANSWER SECTION:
cpe-98-25-53-166.sc.res.rr.com. 60 IN A 208.91.112.55
;; Received 64 B
;; Time 2019-04-05 11:06:47 PDT
;; From 172.16.95.16@53(UDP) in 0.6 ms
Since the resolved IP address matches the botnet IPDB, the query was blocked and redirected to the portal IP
(208.91.112.55) .
1. Go to Log & Report > DNS Query to view the DNS query blocked by botnet C&C IPDB.
2. If you do not see the widget, click Add Widget, and add the Botnet Activity widget.
The DNS safe search option helps avoid explicit and inappropriate results in the Google, Bing, and YouTube search
engines. The FortiGate responds with content filtered by the search engine.
For individual search engine safe search specifications, refer to the documentation for Google,
Bing, and YouTube.
A DNS filter profile can be applied in a policy to scan DNS traffic traversing the FortiGate (see Configuring a DNS filter
profile on page 1101), or applied on the DNS server interface (see Applying DNS filter to FortiGate DNS server on page
1119).
1. Go to Security Profiles > DNS Filter and click Create New, or edit an existing profile.
2. Enable Enforce 'Safe search' on Google, Bing, YouTube.
3. For Restrict YouTube Access, click Strict or Moderate.
From your internal network PC, use a command line tool, such as dig or nslookup, and perform a DNS query on
www.bing.com. For example:
# dig www.bing.com
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 46568
;; Flags: qr rd ra; QUERY: 1; ANSWER: 2; AUTHORITY: 0; ADDITIONAL: 0
;; QUESTION SECTION:
;; www.bing.com. IN A
;; ANSWER SECTION:
www.bing.com. 103 IN CNAME strict.bing.com
strict.bing.com. 103 IN A 204.79.197.220
;; Received 67 B
;; Time 2019-04-05 14:34:52 PDT
;; From 172.16.95.16@53(UDP) in 196.0 ms
The DNS query for www.bing.com returns with a CNAME strict.bing.com, and an A record for the CNAME. The user's
web browser then connects to this address with the same search engine UI, but any explicit content search is filtered out.
The DNS filter log in FortiOS shows a message of DNS Safe Search enforced.
In addition to the FortiGuard category-based domain filter, you can define a local static domain filter to allow or block
specific domains.
In a DNS filter profile, the local domain filter has a higher priority than FortiGuard category-based domain filter. DNS
queries are scanned and matched first with the local domain filter. If an entry matches and the local filter action is set to
block, then that DNS query is blocked and redirected.
If the local domain filter list has no match, then the FortiGuard category-based domain filter is used. If a DNS query
domain name rating belongs to the block category, the query is blocked and redirected. If the FortiGuard category-based
filter has no match, then the original resolved IP address is returned to the client DNS resolver.
If the local domain filter action is set to allow and an entry matches, it will skip the FortiGuard category-based domain
filter and directly return to the client DNS resolver. If the local domain filter action is set to monitor and an entry matches,
it will go to the FortiGuard category-based domain filter for scanning and matching.
A DNS filter profile can be applied in a policy to scan DNS traffic traversing the FortiGate (see Configuring a DNS filter
profile on page 1101), or applied on the DNS server interface (see Applying DNS filter to FortiGate DNS server on page
1119).
1. Go to Security Profiles > DNS Filter and click Create New, or edit an existing profile.
2. In the Static Domain Filter section, enable Domain Filter.
3. Click Create New. The Create Domain Filter pane opens.
4. Enter a domain, and select a Type and Action. This example has three filters:
Wildcard entries are converted to regular expressions by FortiOS. As a result, wildcards will
match any suffix, as long as there is a word boundary following the search term.
For example:
config entries
edit 1
set domain "*.host"
set type wildcard
next
end
Since the local domain filter for google is set to monitor, it is blocked by the FortiGuard category-based domain filter
because the policy action is deny.
DNS translation
This setting allows you to translate a DNS resolved IP address to another IP address you specify on a per-policy basis.
For example, website A has a public address of 1.2.3.4. However, when your internal network users visit this website,
you want them to connect to the internal host 192.168.3.4. You can use DNS translation to translate the DNS resolved
address 1.2.3.4 to 192.168.3.4. Reverse use of DNS translation is also applicable. For example, if you want a public
DNS query of your internal server to get a public IP address, then you can translate a DNS resolved private IP to a public
IP address.
A DNS filter profile can be applied in a policy to scan DNS traffic traversing the FortiGate (see Configuring a DNS filter
profile on page 1101), or applied on the DNS server interface (see Applying DNS filter to FortiGate DNS server on page
1119).
Sample configuration
This configuration forces the DNS filter profile to translate 93.184.216.34 (www.example.com) to 192.168.3.4. When
internal network users perform a DNS query for www.example.com, they do not get the original www.example.com IP
address of 93.184.216.34. Instead, it is replaced with 192.168.3.4.
1. Go to Security Profiles > DNS Filter and click Create New, or edit an existing profile.
2. In the Static Domain Filter section, enable DNS Translation.
3. Click Create New. The New DNS Translation pane opens.
4. Enter the Original Destination (the domain's original IP address), the Translated Destination IP address, and the
Network Mask.
To check DNS translation using a command line tool before DNS translation:
# dig www.example.com
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 27030
;; Flags: qr rd ra; QUERY: 1; ANSWER: 1; AUTHORITY: 2; ADDITIONAL: 0
;; QUESTION SECTION:
;; www.example.com. IN A
;; ANSWER SECTION:
www.example.com. 33946 IN A 93.184.216.34
;; AUTHORITY SECTION:
example.com. 18578 IN NS b.iana-servers.net.
example.com. 18578 IN NS a.iana-servers.net.
;; Received 97 B
;; Time 2019-04-08 10:47:26 PDT
;; From 172.16.95.16@53(UDP) in 0.5 ms
To check DNS translation using a command line tool after DNS translation:
# dig www.example.com
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 62060
;; Flags: qr rd ra; QUERY: 1; ANSWER: 1; AUTHORITY: 2; ADDITIONAL: 0
;; QUESTION SECTION:
;; www.example.com. IN A
;; ANSWER SECTION:
www.example.com. 32491 IN A 192.168.3.4
;; AUTHORITY SECTION:
example.com. 17123 IN NS b.iana-servers.net.
example.com. 17123 IN NS a.iana-servers.net.
;; Received 97 B
;; Time 2019-04-08 11:11:41 PDT
;; From 172.16.95.16@53(UDP) in 0.5 ms
config dns-translation
edit 1
set src 93.184.216.34
set dst 1.2.3.4
set netmask 255.255.224.0
next
end
To check DNS translation using a command line tool after DNS translation:
# dig www.example.com
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 6736
;; Flags: qr rd ra; QUERY: 1; ANSWER: 1; AUTHORITY: 2; ADDITIONAL: 0
;; QUESTION SECTION:
;; www.example.com. IN A
;; ANSWER SECTION:
www.example.com. 29322 IN A 1.2.24.34
;; AUTHORITY SECTION:
example.com. 13954 IN NS a.iana-servers.net.
example.com. 13954 IN NS b.iana-servers.net.
;; Received 97 B
;; Time 2019-04-08 12:04:30 PDT
;; From 172.16.95.16@53(UDP) in 2.0 ms
The binary arithmetic to convert 93.184.216.34 to 1.2.3.4 with the subnet mask is as follows:
1. AND src(Original IP) with negative netmask (93.184.216.34 & ~255.255.224.0):
01011101.10111000.11011000.00100010 93.184.216.34
00000000.00000000.00011111.11111111 ~255.255.224.0
-------------------------------------------------------- &
00000000.00000000.00011000.00100010 0.0.24.34
You can configure a FortiGate as a DNS server in your network. When you enable DNS service on a specific interface,
the FortiGate will listen for DNS service on that interface.
Depending on the configuration, DNS service works in three modes: Recursive, Non-Recursive, or Forward to System
DNS (server). For details on how to configure the FortiGate as a DNS server and configure the DNS database, see
FortiGate DNS server on page 201.
You can apply a DNS filter profile to Recursive and Forward to System DNS mode. This is the same as the FortiGate
working as a transparent DNS proxy for DNS relay traffic.
1. Go to Network > DNS Servers (if this option is not available, go to System > Feature Visibility and enable
DNS Database).
2. In the DNS Service on Interface section, click Create New and select an Interface from the dropdown.
3. For Mode, select Forward to System DNS.
5. Click OK.
To check DNS service with a DNS filter profile using a command line tool:
In this example, port10 is enabled as a DNS service with the DNS filter profile demo. The IP address of port10 is
10.1.100.5 , and the DNS filter profile is configured to block category 52 (information technology). From your internal
network PC, use a command line tool, such as dig or nslookup, to perform a DNS query. For example:
# dig @10.1.100.5 www.fortinet.com
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 52809
;; Flags: qr rd; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 0
;; QUESTION SECTION:
;; www.fortinet.com. IN A
;; ANSWER SECTION:
www.fortinet.com. 60 IN A 208.91.112.55
;; Received 50 B
;; Time 2019-04-08 14:36:34 PDT
;; From 10.1.100.5@53(UDP) in 13.6 ms
The relay DNS traffic was filtered based on the DNS filter profile configuration. It was blocked and redirected to the portal
IP (208.91.112.55).
DNS over TLS (DoT) and DNS over HTTPS (DoH) are supported in DNS inspection. Prior to 7.0, DoT and DoH traffic
silently passes through the DNS proxy. In 7.0. the WAD is able to handle DoT and DoH, and redirect DNS queries to the
DNS proxy for further inspection.
In the following examples, the FortiGate inspects DNS queries made over DoT and DoH to a Cloudflare DNS server. The
DNS filter profile blocks the education category.
1. Send a DNS query over TLS to the Cloudflare server 1.1.1.1 (this example uses kdig on an Ubuntu client). The
www.ubc.ca domain belongs to the education category:
~$ kdig -d @1.1.1.1 +tls-ca +tls-host=cloudflare-dns.com www.ubc.ca
;; DEBUG: Querying for owner(www.ubc.ca.), class(1), type(1), server(1.1.1.1), port
(853), protocol(TCP)
;; DEBUG: TLS, imported 128 system certificates
;; DEBUG: TLS, received certificate hierarchy:
;; DEBUG: #1, C=US,ST=California,L=San Francisco,O=Cloudflare\, Inc.,CN=cloudflare-
dns.com
;; DEBUG: SHA-256 PIN: elpYCnCs9ZtkQBI4+cb2QtZcyOl5UI9jMkSvbTsTad0=
;; DEBUG: #2, C=US,ST=California,L=Sunnyvale,O=Fortinet,OU=Certificate
Authority,CN=FG3H1E5818903681,[email protected]
;; DEBUG: SHA-256 PIN: s48VtdODlNZfAG2g/92hMLhitU51qsP9pkHAUtTJ+f4=
;; DEBUG: TLS, skipping certificate PIN check
;; DEBUG: TLS, The certificate is trusted.
;; TLS session (TLS1.3)-(ECDHE-SECP256R1)-(ECDSA-SECP256R1-SHA256)-(AES-256-GCM)
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 56850
;; Flags: qr rd; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 0
;; QUESTION SECTION:
;; www.ubc.ca. IN A
;; ANSWER SECTION:
www.ubc.ca. 60 IN A 208.91.112.55
;; Received 44 B
;; Time 2021-03-12 06:53:37 UTC
;; From 1.1.1.1@853(TCP) in 6.0 ms
In this query, the FortiGate inspects the DNS query to the Cloudflare DNS server. It replaces the result with the IP of
the FortiGuard block page, which successfully blocks the query.
If you have trouble with the DNS filter profile in your policy, start with the following troubleshooting steps:
l Check the connection between the FortiGate and FortiGuard DNS rating server (SDNS server).
l Check that the FortiGate has a valid FortiGuard web filter license.
l Check the FortiGate DNS filter configuration.
Checking the connection between the FortiGate and FortiGuard SDNS server
You need to ensure the FortiGate can connect to the FortiGuard SDNS server. By default, the FortiGate uses UDP port
53 to connect to the SDNS server.
The SDNS server IP address might be different depending on location (in this example, it is 208.91.112.220:53).
2. In the management VDOM, check the communication between the FortiGate and the SDNS server:
#execute ping 208.91.112.220
3. Optionally, you can check the communication using a PC on the internal network (this example uses dig).
a. Disable the DNS filter profile so that it does not affect your connection check.
b. Ping your ISP or a public DNS service provider's DNS server, for example, Google's public DNS server of
8.8.8.8:
#dig @8.8.8.8 www.fortinet.com
c. Verify that you can get a domain www.fortinet.com A record from the DNS server. This shows that the UDP port
53 connection path is not blocked.
;; QUESTION SECTION:
;; www.fortinet.com. IN A
;; ANSWER SECTION:
www.fortinet.com. 289 IN CNAME fortinet-prod4-858839915.us-west-
1.elb.amazonaws.com.
fortinet-prod4-858839915.us-west-1.elb.amazonaws.com. 51 IN A
52.8.142.247
fortinet-prod4-858839915.us-west-1.elb.amazonaws.com. 51 IN A
13.56.55.78
;; Received 129 B
;; Time 2019-04-29 14:13:18 PDT
;; From 8.8.8.8@53(UDP) in 13.2 ms
The FortiGuard DNS rating service shares the license with the FortiGuard web filter, so you must have a valid web filter
license for the DNS rating service to work. While the license is shared, the DNS rating service uses a separate
connection mechanism from the web filter rating.
2. Look for the FGD_DNS_SERVICE_LICENSE line and check that the license has not expired:
FGD_DNS_SERVICE_LICENSE:
server=208.91.112.220:53, expiry=2022-10-03, expired=0, type=2
1. In FortiOS, create a local domain filter and set the Action to Redirect to Block Portal (see Local domain filter on page
1113).
2. Apply this DNS filter profile to the policy.
3. From the client PC, perform a DNS query on this domain. If you get the profile's redirected portal address, this
means that the DNS filter profile works as expected.
Additional troubleshooting
Use diagnose test application dnsproxy <test level> to troubleshoot further DNS proxy information,
where:
2 Show statistics
4 Reload FQDN
5 Requery FQDN
6 Dump FQDN
Application control
FortiGates can recognize network traffic generated by a large number of applications. Application control sensors
specify what action to take with the application traffic. Application control uses IPS protocol decoders that can analyze
network traffic to detect application traffic, even if the traffic uses non-standard ports or protocols. Application control
supports traffic detection using the HTTP protocol (versions 1.0, 1.1, and 2.0).
Once you have created an application sensor, you can define the applications that you want to control. You can add
applications and filters using categories, application overrides, and/or filter overrides with designated actions (monitor,
allow, block, or quarantine).
Categories allow you to choose groups of signatures based on a category type. Applications belonging to the category
trigger the action that is set for the category. For a list of application control categories, refer to the FortiGuard Labs
website.
1. Go to Security Profiles > Application Control and click Create New, or edit an existing sensor.
2. Under Categories, click the icon next to the category name to set the action or view the application signatures.
3. Click OK.
Multiple application signatures can be added for one sensor with a designated action. Filters can be added based on
behavior, application category, popularity, protocol, risk, technology, or vendor subtypes.
1. Go to Security Profiles > Application Control and click Create New, or edit an existing sensor.
2. In the Application and Filter Overrides table, click Create New.
3. Add an application:
a. For Type, select Application.
b. Select an Action from the dropdown.
c. In the Search box, enter an application name and press Enter.
d. In the search results, select desired the applications (you can select multiple applications) and click Add
Selected.
e. Click OK.
4. Add a filter:
a. In the Application and Filter Overrides table, click Create New.
b. For Type, select Filter.
c. Select an Action from the dropdown.
d. In the Filter field, click the + . The Select Entries pane opens, and you can search based on filter subtypes. This
example has excessive bandwidth (under behavior) and game (under application category).
e. Click OK.
5. Click OK.
l 0 (network-protocol)
l 1 (browser-based)
l 2 (client-server)
l 4 (peer-to-peer)
behavior <id> Application behavior filter:
l all
l 2 (botnet)
l 3 (evasive)
l 5 (excessive bandwidth)
l 6 (tunneling)
l 9 (cloud)
popularity <integer> Application popularity filter (1 - 5, from least to most popular).
action {pass | block | Pass/block traffic or reset the connection for traffic from this application (default =
reset} block).
log {enable | disable} Enable/disable logging for this application list (default = enable).
In an application control list, the exclusion option allows users to specify a list of applications they wish to exclude from
an entry filtered by category, technology, or others. By excluding the signature, the application is no longer processed on
the entry in which it is excluded, but may match subsequent entries that exist.
Sample configurations
In the following example, category 23 (social media) is blocked in the entries, and signature 34527 (Instagram) is
excluded from this entry. Traffic to Instagram will pass because the signature is removed from entry 1 and the action of
other-application-action is set to pass.
In the following example, entry 1 is configured so that category 23 (social media) is set to pass and signature 34527
(Instagram) is excluded. In entry 2, application 34527 (Instagram) is blocked, so the traffic to Instagram will be blocked,
even though it is excluded in entry 1. Traffic to other signatures in category 23, such as Facebook, will still pass.
set category 23
set exclusion 34527
set action pass
next
edit 2
set application 34527
set action block
next
end
next
end
In the following example, an explicit proxy is behind the FortiGate with an excluded signature for 107347980
(Proxy.HTTP) and category 6 (proxy) is set to block. The client will allow normal proxy traffic to pass, but it will discard all
proxy application traffic (such as KProxy, Tor, and so on).
Most networking applications run on specific ports. For example, SSH runs on port 22, and Facebook runs on ports 80
and 443.
If the default network service is enabled in the application control profile, a port enforcement check is done at the
application profile level, and any detected application signatures running on the non-standard TCP/IP port are blocked.
This means that each allowed application runs on its default port.
next
end
For example, when applying this application control sensor, FTP traffic (application 15896) with the standard port (port
21) is allowed, while the non-standard port (port 2121) is blocked.
Protocol enforcement
Protocol enforcement allows you to configure networking services (e.g. FTP, HTTP, HTTPS) on known ports (e.g. 21,
80, 443). For protocols that are not allowlisted under select ports, the IPS engine performs the violation action to block,
allow, or monitor that traffic.
This feature can be used in the following scenarios:
l When one protocol dissector confirms the service of network traffic, protocol enforcement can check whether the
confirmed service is allowlisted under the server port. If it is not allowlisted, the traffic is considered a violation and
IPS can take the action specified in the configuration (block or monitor it).
l When there is no confirmed service for the network traffic, the traffic is considered a service violation if
IPS dissectors rule out all of the services enforced under its server port.
In an applicable profile, a default network service list can be created to associate well known ports with accepted
services.
In the following example, an application sensor is configured to enforce HTTP on port 80 (block), and DNS on port 53
(monitor).
d. Click OK.
7. Click OK.
set port 80
set services http
set violation-action block
next
edit 2
set port 53
set services dns
set violation-action monitor
next
end
next
end
When a FortiGate is sandwiched between SSL encryption and decryption devices, the FortiGate can process the
decrypted traffic that passes between those devices. This feature adds support for decrypted traffic in application
control. In some pre-defined signatures, the signature is pre-marked with the require_ssl_di tag. The force-
inclusion-ssl-di-sigs option under application list allows users to control the inspection of dissected
traffic. When this option is enabled, the IPS engine forces the pre-marked SSL-based signatures to be applied to the
decrypted traffic of the respective applications. In the following topology, SSL Proxy 1 handles the client connection and
SSL Proxy 2 handles the server connection, leaving the content unencrypted as traffic passes through the FortiGate.
F-SBID( --vuln_id 15722; --attack_id 42985; --name "Facebook_Chat"; --group im; --protocol tcp; --default_action pass; -
-revision 4446; --app_cat 23; --vendor 3; --technology 1; --behavior 9; --pop 4; --risk 2; --language "Multiple"; --weight 20;
--depend-on 15832; --depend-on 38468; --require_ssl_di "Yes"; --casi 1; --casi 8; --parent 15832; --app_port
"TCP/443"; --severity info; --status hidden; --service http; --flow from_client; --pattern "/pull?"; --context uri; --no_case; --
pattern ".facebook.com"; --context host; --no_case; --tag set,Tag.Facebook.Pull; --tag quiet; --scan-range 10m,all; --date
20190301; )
All signatures that include the require_ssl_di tag are pre-defined and cannot be customized.
Application control signatures that support parameters (such as SCADA protocols) can have multiple parameters
grouped together and matched at the same time. Multiple application parameter groups can be added to an override.
Traffic will be flagged if it matches at least one parameter group.
This example uses the Modbus_Func05.Write.Single.Coil.Validation signature. This is an industrial signature, so ensure
that no signatures are excluded:
config ips global
set exclude-signatures none
end
1. Go to Security Profiles > Application Control and click Create New, or edit an existing sensor.
2. In the Application and Filter Overrides table, click Create New.
3. Search for Modbus_Func05.Write.Single.Coil.Validation and press Enter. A gear icon beside the signature name
indicates it has configurable application parameters.
4. In the search results, select Modbus_Func05.Write.Single.Coil.Validation and click Add Selected.
5. Click the Selected tab. In the Application Parameters section, click Create New.
7. Click OK.
8. Add more signatures if needed.
9. Click OK.
The DNP3 application signature dissector supports detecting DNP3 traffic that is encapsulated by the RealPort protocol
(Net.CX). DNP3 is used in industrial solutions over serial ports, USB ports, printers, and so on. RealPort encapsulation
allows transportation of the underlying protocols over TCP/IP. The FortiGate industrial signatures must be enabled to
use RealPort.DNP3 signatures:
config ips global
set exclude-signatures none
end
Sample logs
Intrusion prevention
Intrusion Prevention System (IPS) detects network attacks and prevents threats from compromising the network,
including protected devices. IPS can be in the form of a standalone appliance, or part of the feature set of a Next
Generation Firewall (NGFW), such as FortiGate. IPS utilizes signatures, protocol decoders, heuristics (or behavioral
monitoring), threat intelligence (such as FortiGuard Labs), and advanced threat detection in order to prevent exploitation
of known and unknown zero-day threats. FortiGate IPS is even capable of performing deep packet inspection to scan
encrypted payloads in order to detect and prevent threats from attackers.
Networks and devices are often exploited through vulnerabilities. Software vulnerabilities are one such example where a
bug or inherent weakness in the code provides attackers an opportunity to gain access to the software. More severe
vulnerabilities allow unauthorized access, data leakage, and execution of malicious code. Exploitation of these
vulnerabilities can cause damage to the machine and infect others. While the best solution is to patch vulnerabilities as
soon as patches are available, IPS signatures offer a solution to detect and block exploitation of many vulnerabilities
before they enter the network.
IPS signatures
Fortinet’s solution combines industry-leading threat intelligence from FortiGuard Labs with the FortiGate NGFW to
identify the latest threats and prevent them from entering your network. IPS signatures are one such method for
delivering the latest protection. FortiGuard Labs uses AI and Machine Learning (ML) to analyze billions of events every
day. The FortiGuard Labs research team also proactively performs threat research to discover new vulnerabilities and
exploitation, and produces signatures to identify such threats. These IPS signatures are delivered to each FortiGate
daily, so that the IPS engine is armed with the latest databases to match the latest threats.
IPS sensors
A FortiGate IPS sensor is a collection of IPS signatures and filters that define the scope of what the IPS engine will scan
when the IPS sensor is applied. An IPS sensor can have multiple sets of signatures and/or filters. A set of IPS signatures
consists of manually selected signatures, while a set of IPS filters consists of filters based on signature attributes like
target, severity, protocol, OS, and application. Each signature has predefined attributes and an action, such as block,
allow, monitor (pass), quarantine, and reset. It is also possible to create custom IPS signatures to apply to an IPS
sensor.
From the Security Profiles > Intrusion Prevention pane, you can create new IPS sensors and view a list of predefined
sensors.
FortiOS includes the following predefined IPS sensors with associated predefined signatures:
all_default Filters all predefined signatures, and sets action to the signature’s default action.
default Filters all predefined signatures with severity of Critical/High/Medium. Sets action
to signature’s default action.
high_security Filters all predefined signatures with severity of Critical/High/Medium, and sets
action to Block. For Low severity signatures, sets action to signature’s default
action.
wifi-default Filters all predefined signatures with severity of Critical/High/Medium. Sets action
to signature’s default action. Used in profile for offloading WiFi traffic.
DDoS attacks
Besides protecting against threats and exploitation of vulnerabilities, the IPS engine is also responsible for mitigating
Denial of Service (DoS) attacks where attackers attempt to bring a service down by flooding the target with traffic from
distributed systems. Using anomaly-based defense, FortiGate can detect a variety of L3 and L4 anomalies and take
action against these attacks. This can be configured under IPv4 and IPv6 DoS Policies, which is discussed in detail
under DoS protection on page 784.
This section contains the following topics:
l Signature-based defense on page 1140
l IPS configuration options on page 1144
This section also provides the following examples about IPS sensors:
l IPS signature filter options on page 1148
l IPS with botnet C&C IP blocking on page 1150
l IPS signatures for the industrial security service on page 1155
l IPS sensor for IEC 61850 MMS protocol on page 1156
l SCTP filtering capabilities on page 1158
Signature-based defense
Signature-based defense is used against known attacks or vulnerability exploits. These often involve an attacker
attempting to gain access to your network. The attacker must communicate with the host in an attempt to gain access,
and this communication includes commands or sequences of commands and variables. The IPS signatures include
these command sequences, allowing the FortiGate unit to detect and stop the attack.
This section describes the following components used in signature-based defense:
l IPS signatures on page 1141
l Protocol decoders on page 1141
l IPS engine on page 1141
IPS signatures
IPS signatures are the basis of signature-based intrusion prevention. Every attack can be reduced to a particular string
of commands or a sequence of commands and variables. Signatures include this information, and FortiGate uses the
information to detect and stop attacks.
Signatures also include characteristics about the attack they describe. These characteristics include the network
protocol associated with the attack, the vulnerable operating system, and the vulnerable application.
To view the complete list of signatures, go to Security Profiles > IPS Signatures. The list of signatures includes
predefined and custom signatures. You can hover over the name of the IPS signature to display a pop-up window that
includes an ID number. You can click the ID number to display the FortiGuard page.
Protocol decoders
Before examining network traffic for attacks, the IPS engine uses protocol decoders to identify each protocol appearing
in the traffic. Attacks are protocol-specific, so your FortiGate unit conserves resources by looking for attacks only in the
protocols used to transmit them. For example, the FortiGate unit will only examine HTTP traffic for the presence of a
signature describing an HTTP attack.
IPS engine
Once the protocol decoders separate the network traffic by protocol, the IPS engine examines the network traffic for the
attack signatures by using IPS sensors.
IPS sensors
The IPS engine does not examine network traffic for all signatures. The IPS engine examines network traffic for
signatures specified in IPS sensors. You must first create an IPS sensor, and then you can specify what signatures the
IPS sensor will use. You can add individual signatures to IPS sensors, or you can add filters to IPS sensors, and the
filters automatically include the applicable signatures.
To view IPS sensors, go to Security Profiles > Intrusion Prevention. To create a new sensor, click Create New.
An IPS sensor is composed of IPS signatures and filters. Under IPS Signatures and Filters, click Create New to create a
set of IPS signatures or a set of IPS filters.
You can create IPS sensors for specific types of traffic, and then select the IPS sensors in firewall policies designed to
handle the same type of traffic. For example, you can specify all of the web-server related signatures in an IPS sensor,
and select the IPS sensor in a firewall policy that controls all traffic to and from a web server that is protected by the
FortiGate unit.
The FortiGuard Service periodically adds new predefined signatures to counter new threats. New predefined signatures
are automatically included in IPS sensors that are configured to use filters when the new signatures match existing filter
specifications. For example, if you have an IPS sensor with a filter that includes all signatures for the Windows operating
system, your filter will automatically incorporate new Windows signatures that the FortiGuard Service adds to the
database.
IPS signature and filter entries are checked from top down. When a signature is found in a set of signatures or filters, the
action defined for the signature is taken.
IPS filters
IPS sensors can contain one or more IPS filters. A filter is a collection of signature attributes that you specify. The
signatures that have all of the attributes specified in a filter are included in the IPS filter.
Following are the attribute groups:
l Target
l Severity
l Protocol
l OS
l Application
Starting in FortiOS 6.4.2, you can also filter by CVE ID or CVE pattern by using the CLI. See
FortiOS 6.4 New Features > IPS signature filter options.
When selecting multiple attributes within the same group, the selections are combined by using a logical OR. When
selecting multiple attributes between attribute groups, each attribute group is combined by using a logical AND.
Once you select filters in the GUI, the filtered list of IPS signatures are displayed. Adjust your filters accordingly to
construct a suitable list for your needs.
For example, if your FortiGate unit protects a Linux server running the Apache web server software, you could create a
new filter to protect it. By setting OS filter attribute to Linux, and the filter attribute Application to Apache, the filter will
include only the signatures that apply to both Linux and Apache. If you wanted to scan for all the Linux signatures and all
the Apache signatures, you would create two filters, one for each.
To view the filters in an IPS sensor, go to Security Profiles > Intrusion Prevention, select the IPS sensor, and click Edit.
Signature entries allow you to add individual, custom or predefined IPS signatures to an IPS sensor. If you need only one
signature, or you want to manually select multiple signatures that don’t fall into the criteria for an IPS filter, adding a
signature entry to an IPS sensor is the easiest way. Signature entries are also the only way to include custom signatures
in an IPS sensor.
To select an individual signature, click a signature, and select Add Selected. The signature moves to the Selected list.
To select multiple signatures, use the Search bar to perform a keyword search, and then click Add All Results to move all
entries to the Selected list.
Each IPS signature comes with a default action such as Block and Pass. In some scenarios, you may want to override
this action. You can override a set of IPS filter or signatures. By default, a set of IPS filter or signatures has an action of
Default, which applies a signature’s default action when the signature is matched. By changing the action, you can
override the setting for all signatures within the filter or signature set.
Policies
You must select an IPS sensor in a security policy or an interface policy to apply the IPS sensor to traffic. An IPS sensor
that it not selected in a policy is not applied to network traffic.
IPS configuration options
Besides configuring an IPS filter or selecting IPS signatures for an IPS sensor, you can configure additional IPS options
for each sensor or globally for all sensors. This topic introduces the following available configuration options:
l Malicious URL database for drive-by exploits detection on page 1144
l IPS signature rate count threshold on page 1144
l Botnet C&C on page 1145
l Hardware acceleration for flow-based security profiles (NTurbo and IPSA) on page 1145
l Extended IPS database on page 1146
l IPS engine-count on page 1146
l Industrial signature database on page 1146
l Fail-open on page 1146
l IPS buffer size on page 1147
l Session count accuracy on page 1147
l Protocol decoders on page 1147
This feature uses a local malicious URL database on the FortiGate to assist in detection of drive-by exploits, such as
adware that allows automatic downloading of a malicious file when a page loads without the user's detection. The
database contains all malicious URLs active in the last one month, and all drive-by exploit URLs active in the last three
months. The number of URLs controlled are in the one million range.
This feature can be enabled from a IPS Sensor in the GUI by going to Security Profiles > Intrusion Prevention and editing
or creating an IPS Sensor. Then enable Block malicious URLs.
From the CLI:
config ips sensor
edit <profile>
set block-malicious-url [enable | disable]
next
end
Blocking malicious URLs is not supported on some FortiGate models, such as FortiGate 51E,
50E, or 30E.
You can use the IPS signature rate-based settings to specify a rate count threshold that must be met before the
signature is triggered. A rate count threshold provides a more controlled recording of attack activity. For example, if
multiple login attempts produce a failed result over a short period of time, then an alert would be sent and traffic might be
blocked, which is a more manageable response than sending an alert every time a login fails.
This can be configured from the GUI by going to Security Profiles > Intrusion Prevention. Create or edit an IPS sensor.
Within the sensor, edit the IPS signatures and filters. Only IPS signatures have the rate-based settings option. IPS filters
do not.
Some settings are only available from CLI.
The syntax for this configuration is as follows:
config ips sensor
edit default
config entries
edit <Filter ID number>
set rule <*id>
set rate-count <integer between 1 - 65535>
set rate-duration <integer between 1 - 65535>
This setting allows the tracking of one of the protocol fields within the packet.
Botnet C&C
Some FortiGate models support a feature call NTurbo that can offload flow-based firewall sessions to network
processors. See also Hardware Acceleration > NTurbo offloads flow-based processing. For IPSA enhanced pattern
matching, see Hardware Acceleration > IPSA offloads flow-based advanced pattern matching.
Some FortiGate models also support offloading enhanced pattern matching for flow-based security profiles to CP8 or
CP9 content processors. You can use the following command to configure NTurbo and IPSA:
config ips global
set np-accel-mode {none | basic}
set cp-accel-mode {none | basic | advanced}
end
If the np-accel-mode option is available, your FortiGate supports NTurbo. The none option disables NTurbo, and
basic (the default) enables NTurbo.
If the cp-accel-mode option is available, your FortiGate supports IPSA. The none option disables IPSA, and basic
enables basic IPSA, and advanced enables enhanced IPSA, which can offload more types of pattern matching than
basic IPSA. The advanced option is only available on FortiGate models with two or more CP8 processors, or one or
more CP9 processors.
Some models have access to an extended IPS Database. Because the extended database may affect FortiGate
performance, the extended database package may be disabled by default on some models, such as desktop models.
You can only enable the extended IPS database by using the CLI.
config ips global
set database extended
end
IPS engine-count
FortiGate units with multiple processors can run one or more IPS engine concurrently. The engine-count CLI command
allows you to specify how many IPS engines to use at the same time:
config ips global
set engine-count <int>
end
The recommended and default setting is 0, which allows the FortiGate unit to determine the optimum number of IPS
engines.
Industrial signatures are defined to protect Industrial Control Systems (ICS), Operational Technology (OT) and SCADA
systems, which are critical infrastructure used by manufacturing industries. These signatures are enabled by default, but
can be configured by using the following CLI:
config ips global
set exclude-signatures {none* | industrial}
end
Fail-open
A fail-open scenario is triggered when IPS raw socket buffer is full. Therefore IPS engine has no space in memory to
create more sessions and needs to decide whether to drop the sessions or bypass the sessions without inspection.
config ips global
set fail-open {enable | disable}
end
The default setting is disable, so sessions are dropped by IPS engine when the system enters fail-open mode.
When enabled, the IPS engine fails open, and it affects all protocols inspected by FortiOS IPS protocol decoders,
including but not limited to HTTP, HTTPS, FTP, SMTP, POP3, IMAP, and so on. When the IPS engine fails open, traffic
continues to flow without IPS scanning.
Sessions offloaded to Nturbo do not support fail-open. When Nturbo data path is overloaded,
traffic is dropped regardless of fail-open setting.
If system enters fail-open mode frequently, it is possible to increase the IPS socket buffer size to allow more data
buffering, which reduces the chances of overloading the IPS engine. You can set the size of the IPS buffer.
config ips global
set socket-size <int>
end
The default socket size and maximum configurable value varies by model. In short, socket-size determines how much
data the kernel passes to the IPS engine each time the engine samples packets.
Take caution when modifying the default value. If the socket-size is too large, the higher memory used by the IPS engine
may cause the system to enter conserve mode more frequently. If set too low, the system may enter IPS fail-open mode
too frequently.
The IPS engine can track the number of open session in two ways. An accurate count uses more resources than a less
accurate heuristic count.
config ips global
set session-limit-mode {accurate | heuristic}
end
Protocol decoders
The FortiGate Intrusion Prevention system uses protocol decoders to identify the abnormal traffic patterns that do not
meet the protocol requirements and standards. For example, the HTTP decoder monitors traffic to identify any HTTP
packets that do not meet the HTTP protocol standards.
To change the ports a decoder examines, you must use the CLI. In this example, the ports examined by the DNS
decoder are changed from the default 53 to 100, 200, and 300.
config ips decoder dns_decoder
config parameter "port_list"
set value "100,200,300"
end
end
You cannot assign specific ports to decoders that are set to auto by default. These decoders can detect their traffic on
any port. Specifying individual ports is not necessary.
IPS signature filter options include hold time and CVE pattern.
Hold time
The hold time option allows you to set the amount of time that signatures are held after a FortiGuard IPS signature
update per VDOM. During the holding period, the signature's mode is monitor. The new signatures are enabled after the
hold time to avoid false positives.
The hold time can be from 0 days and 0 hours (default) up to 7 days, in the format ##d##h.
When a signature that is on hold is matched, the log will include the message signature is on hold:
date=2010-07-06 time=00:00:57 logid="0419016384" type="utm" subtype="ips"
eventtype="signature" level="alert" vd="vd1" eventtime=1278399657778481842 tz="-0700"
severity="info" srcip=10.1.100.22 srccountry="Reserved" dstip=172.16.200.55 srcintf="port13"
srcintfrole="undefined" dstintf="port14" dstintfrole="undefined" sessionid=3620
action="detected" proto=6 service="HTTP" policyid=1 attack="Eicar.Virus.Test.File"
srcport=52170 dstport=80 hostname="172.16.200.55" url="/virus/eicar" direction="incoming"
attackid=29844 profile="test" ref="http://www.fortinet.com/ids/VID29844"
incidentserialno=25165825 msg="file_transfer: Eicar.Virus.Test.File, (signature is on hold)"
On hold signatures are grayed out in the GUI with an hourglass icon beside the signature name. A tooltip displays the on
hold expiry time and other details.
On the Security Profiles > IPS Signatures page, for example, the Adobe.Reader.Annots.api.setProps.Use.After.Free
signature is on hold. Hover over the grayed-out entry to view the tooltip, which includes the action and hold time expiry.
On this page, all on hold signatures are displayed as on hold regardless of whether override-signature-hold-by-
id is enabled.
The same tooltip is available on the Edit IPS Sensor (Security Profiles > Intrusion Prevention) page when creating or
editing the IPS signatures. In the Add Signatures pane when the Type is Signature, signatures on hold are only
displayed as on hold if override-signature-hold-by-id is enabled.
You can still use on hold signatures in an IPS sensor profile; however, the profile will not block
matching traffic. It will monitor it instead (logging in effect) until the on hold time expires.
CVE pattern
The CVE pattern option allows you to filter IPS signatures based on CVE IDs or with a CVE wildcard, ensuring that any
signatures tagged with that CVE are automatically included.
The Botnet C&C section consolidates multiple botnet options in the IPS profile. This allows you to enable botnet blocking
across all traffic that matches the policy by configuring one setting in the GUI, or by the scan-botnet-connections
option in the CLI.
1. Go to Security Profiles > Intrusion Prevention, and click Create New to create a new IPS sensor, or double-click an
existing IPS sensor to open it for editing.
2. Navigate to the Botnet C&C section.
Sample log
1. Go to Security Profiles > DNS Filter, and click Create New, or double-click an existing filter to open it for editing.
2. Enable Redirect botnet C&C requests to Block Portal.
1. Go to Security Profiles > Intrusion Prevention, and click Create New, or double-click an existing filter to open it for
editing.
1. Go to Security Profiles > Intrusion Prevention, and click Create New, or double-click an existing sensor to open it for
editing.
2. In the IPS Signatures and Filters section, click Create New. A list of available signatures appears.
3. For Type, select Signature. Select the signatures you want to include from the list.
4. Configure the other settings as needed.
The FortiGuard Industrial Security Service (ISS) includes both application control and intrusion prevention signatures for
industrial applications and protocols. The industrial database attack definitions are only updated if the FortiGate has a
valid ISS license and an IPS security profile is used in a policy.
By default, industrial signatures are excluded from the signature lists in the GUI.
To make ISS IPS and application control signatures available in the GUI:
1. Go to Security Profiles > Application Signatures and search for industrial to find signatures that identify industrial
protocols.
2. Go to Security Profiles > IPS Signatures to find signatures that detect networks attacks that target industrial assets.
IEC 61850 is a SCADA protocol whose services are mapped to a number of protocols, including MMS services.
MMS/ICCP detection is supported in IPS. The purpose of the MMS dissectors is to identify every IEC 61850 service to
distinguish different MMS/ICCP messages. IPS engine 6.0.12 and later support MMS dissectors.
The following scenarios are also supported:
l Multiple MMS PDUs are transferred in one TCP payload, and the IPS engine identifies individuals.
l An MMS message is split over multiple TCP segments, where MMS runs over COTP segments.
l ICCP/TASE.2 that also uses MMS transport (ISO transport over TCP for ICCP) is detected.
Industrial signatures must be enabled in the global IPS settings to receive MMS/ICCP signatures. By default, industrial
signatures are excluded.
config ips global
set exclude-signatures none
end
Below are some industrial signatures for MMS/ICCP messages that can be detected by the IPS engine. This is not an
exhaustive list.
l MMS_GetNameList.Request
l MMS_GetNamedVariableListAttributes.Request
l MMS_GetVariableAccessAttributes.Request
l MMS_Identify.Request
l MMS_Initiate.Request
l MMS_Read.Request
l MMS_Reset.Request
l ICCP_Transfer.Reporting
l ICCP_Create.Dataset
l ICCP_Abort
l ICCP_Start.Transfer.DSTransferSet
l ICCP_Get.Dataset.Element.Values
l ICCP_Get.Next.DSTransfer.Set.Value
l ICCP_Delete.Dataset
l ICCP_Start.Transfer.IMTransferSet
Diagnose command
The COTP dissector adds support for identifying every MMS PDU, and let the IPS engine separate them, like the
Modbus and IEC-104 services for example.
# diagnose ips debug enable all
# diagnose debug enable
Log samples
MMS dissectors can be triggered, and MMS/ICCP signatures can be monitored and logged.
Log samples:
A Stream Control Transmission Protocol (SCTP) dissector and Payload Protocol Identifier (PPID) filter can be used to
either terminate the SCTP session, or replace the offending data chunk with zeros to keep the client and server
sequence numbers synchronized. The SCTP filter action can also pass the data chunk.
next
end
3. On the SCTP client, confirm that the connection works and send a data chunk with PPID 112233.
4. The IPS engine detects the data chunk. The PPID matches the PPID filter, and the filter action is reset, so the data
chunk is not received on the server, and the session is terminated.
File filter
The file filter can be applied directly to firewall policies and supports various traffic protocols in proxy or flow mode.
MAPI Yes No
SSH Yes No
Prior to FortiOS 6.4.1, file filter was embedded in the web filter, email filter, SSH inspection, and CIFS profiles.
Logs
Go to Log & Report > File Filter to view the file filter logs.
Log samples
File filter allows the FortiGate to block files passing through based on file type based on the file's meta data only, and not
on file size or file content. A DLP sensor must be configured to block files based on size or content, such as SSN
numbers, credit card numbers, or regexp.
The following file types are supported in file filter and DLP profiles:
Type Description
Type Description
msoffice Match MS-Office files. For example, DOC, XLS, PPT, and so on.
msofficex Match MS-Office XML files. For example, DOCX, XLSX, PPTX, and so on.
rm Match RM files
xz Match XZ files
*
This file type is only available in DLP profiles.
Email filter
Email filters can be configured to perform spam detection and filtering. You can customize the default profile, or create
your own and apply it to a firewall policy.
Two kinds of filtering can be defined in a single profile, and they will act independent of one
another.
The following table indicates which email filters are supported by their designated inspection modes.
Local-based filters
By default, HELO DNS and return email DNS checks are done before the block/allow list
check. In some situations, such as when configuring a block/allow list to clear an email from
performing further filtering, configure the following to give precedence to the block/allow list:
config emailfilter profile
edit <name>
config smtp
set local-override enable
next
end
end
Whenever a client opens an SMTP session with a server, the client sends a HELO command with the client domain
name. The FortiGate takes the domain name specified by the client in the HELO and performs a DNS lookup to
determine if the domain exists. If the lookup fails, the FortiGate determines that any emails delivered during the SMTP
session are spam. The HELO DNS lookup is only available for SMTP traffic.
The FortiGate performs a DNS lookup on the return field. If no such record exists, the email is treated as spam. When
return email DNS checking is enabled, the FortiGate takes the domain in the reply-to email address and reply-to domain,
and checks the DNS servers to see if there is an A or MX record for the domain. If the domain does not exist, the
FortiGate treats the email as spam.
Block/allow list
Block/allow lists can be made from emails or IP subnets to forbid or allow them to send or receive emails. The following
table summarizes the configurable options in a block/allow list.
IP/Netmask and The FortiGate compares the IP address The filter is an IP address l Mark as
IPv6/Netmask of the client delivering the email to the with a subnet mask. Reject: the
addresses in the IP address block/allow email is
list specified in the email filter profile. dropped
If a match is found, the FortiGate takes before
the action configured for the matching reaching its
block/allow list entry against all delivered destination.
email. l Mark as
By default the hdrip setting under Spam: the
config smtp is disabled. If enabled, email is
the FortiGate checks all the IP addresses allowed
in the header of SMTP email against the through, but it
specified IP address block/allow list. will be tagged
with an
Email Regular The FortiGate compares the sender The filter is a regular indicator
Expression email address, as shown in the email expression. marking the
envelope MAIL FROM, to the pattern in For example, ^[_a-z0-9-]+ email as
the patterned field. If a match is found, (\.[_a-z0-9-]+)*@ spam.
the FortiGate takes the action configured (example|xmple|examp). l Mark as Clear:
for the matching block/allow list entry. (com|org|net) can be used the email is
to filter based on a number allowed to go
of email domain name through to its
combinations. destination on
the
Email Wildcard The FortiGate compares the sender The filter is an email
assumption
email address, as shown in the email address with a wildcard
that it is not
header and envelope MAIL FROM, to the symbol in place of the
spam.
pattern in the patterned field. If a match is variable characters (such
found, the FortiGate takes the action as *.example.com or
configured for the matching block/allow fred@*.com).
list entry.
Banned words
When banned word checking is enabled, the FortiGate examines emails for words that appear in the banned word list
specified in the email filter profile.
The banned word pattern can be either wildcard or Perl regular expression, which could include part of a word, a whole
word, a phrase, multiple words, or multiple phrases.
Each time the banned word filter detects a pattern in an email, it adds the pattern score to the sum of scores for the
message. The score is set when creating a new pattern to block content (set score). Higher scores indicate more
offensive content. If the total score of the discovered banned words in the email exceeds the threshold value set in the
email filter profile, then the FortiGate treats the email as spam. The score for each pattern is counted only once, even if
that pattern appears many times in the email. The default score for banned word patterns is 10, and the default threshold
in the email filter is 10. This means that by default, an email message is blocked by a single match.
For example, if the FortiGate scans an email containing only this sentence: “The score for each word or phrase is
counted only once, even if that word or phrase appears many times in the email message.” and the banned word list
contains the following patterns:
word phrase Wildcard 20 0 Both words appear in the email, but they
do not appear together as specified in the
pattern. There are no matches.
The email would be treated as spam if the banned word threshold is set to 60 or less.
Once a banned word list is configured in the CLI and applied to an email filter profile, some
settings can be edited in the GUI for that particular email filter profile. A banned word profile
can be selected, and its Threshold (spam-bword-threshold) can be edited.
Trusted IP addresses
When the FortiGate creates a list of trusted IP addresses, any incoming email traffic from these IP address is exempt
from having IP-based checks, such as DNSBL, RBL, FortiGuard Antispam service, or locally-defined IP block lists.
If the FortiGate sits behind a company’s mail transfer units, it may be unnecessary to check email IP addresses because
they are internal and trusted. In this case, only external IP addresses would be checked. In some cases, external IP
addresses may be added to the list if they are known to not be spam sources.
MIME header
d. Set SSL Inspection to a profile that has deep SSL inspection enabled.
Deep inspection is required to filter SMTP, POP3, IMAP, or any SSL/TLS encapsulated protocol.
e. Configure the other settings as needed.
f. Click OK.
FortiGuard-based filters
The FortiGate consults FortiGuard servers to help identify spammer IP address or emails, known phishing URLs, known
spam URLs, known spam email checksums, and others. For more information, refer to the FortiGuard website.
There are five FortiGuard spam filtering options:
l IP address check
l URL check
l Detect phishing URLs in email (requires URL check to be enabled)
l Email checksum check
l Spam submission
IP address check
The FortiGate queries the FortiGuard Antispam service to determine if the IP address of the client delivering the email is
in the block list. If there is a match, the FortiGate treats delivered emails as spam.
URL check
The FortiGate submits all URLs that appear in the email body to the FortiGuard service for checking. If a URL exists in
the FortiGuard URL block list, the FortiGate treats the email as spam.
The FortiGate submits all URL hyperlinks that appear in the email body to the FortiGuard service for checking. If a URL
exists in the FortiGuard URL phishing list, the FortiGate removes the hyperlink from the message. The URL remains in
place, but it is no longer a clickable hyperlink.
The FortiGate submits a checksum of each email to the FortiGuard service for checking. If a checksum exists in the
FortiGuard checksum block list, the FortiGate treats the email as spam.
Spam submission
Spam submission is a way to inform the FortiGuard Antispam service of non-spam messages incorrectly marked as
spam. When enabled, the FortiGate adds a link to the end of every email marked as spam. Click the link to notify the
FortiGuard Antispam service if an email is marked incorrectly.
l URL Check
l Spam Submission
4. Click OK.
Option Description
spamfsip Check email IP addresses
spamfsurl Check email content URLs
spamfsphish Check email content phishing URLs
spamfschksum Check email checksums
spamfssubmit Add FortiGuard Antispam spam submission text
Third-party-based filters
In addition to local and FortiGuard filters, FortiOS can leverage third-party sources, which are known as DNS-based
blackhole lists (DNSBL) or Open Relay Behavior-modification Systems (ORBS). These are maintained lists of IP
addresses that have been identified as associated with spamming.
The following example demonstrates how to configure a DNSBL. The config emailfilter dnsbl command is
used to configure either DNSBL or ORBS.
To configure a DNSBL:
Filtering order
The FortiGate checks for spam using various filtering techniques. The filtering order used by the FortiGate depends on
which mail protocol is used.
Filters requiring a query to a server and a reply (FortiGuard Antispam service and DNSBL/ORDBL) are run
simultaneously. To avoid delays, queries are sent while other filters are running. The first reply to trigger a spam action
takes effect as soon as the reply is received.
Each spam filter passes the email to the next if no matches or problems are found. If the action in the filter is Mark as
Spam, the FortiGate tags the email as spam according to the settings in the email filter profile. If the action in the filter is
Mark as Reject, the email session is dropped. If the action in the filter is Mark as Clear, the email is exempt from any
remaining filters. For SMTP and SMTPS, if the action is Discard, the email is discarded or dropped.
The FortiGate scans SMTP and SMTPS email for spam in a specific order, which depends on whether or not the local
override feature is enabled. This feature is disabled by default, but enabling it gives priority to local spam filters.
You can enable local override (set local-override) in an email filter profile to override SMTP or SMTPS remote
checks, which includes checks for IP RBL, IP FortiGuard AntiSpam, and HELO DNS with the locally defined antispam
block and/or allow lists.
SMTPS spam filtering is available on FortiGates that support SSL content scanning and
inspection.
1. HELO DNS lookup, last hop IP check against 1. Last hop IP checks local block/allow list
ORDBL 2. Envelope address checks local block/allow list
2. Return email DNS check, FortiGuard email 3. Headers IPs local block/allow list, MIME header
checksum check, FortiGuard URL check, FortiGuard checks based on local list of patterns (mheader)
IP address check, phishing URLs detection 4. Headers email address local block/allow list
3. Last hop IP checks local block/allow list 5. Banned words (subject first, then body) based on
4. Envelope address checks local block/allow list local list of patterns (bword)
5. Headers IPs local block/allow list 6. HELO DNS lookup, last hop IP check against
6. Headers email address local block/allow list, MIME ORDBL
header checks based on local list of patterns 7. Return email DNS check, FortiGuard email
(mheader) checksum check, FortiGuard URL check, FortiGuard
7. Banned words (subject first, then body) based on IP address check, phishing URLs detection
local block/allow list (bword)
The FortiGate scans IMAP, IMAPS, POP3, and POP3S email for spam in the following order:
1. MIME headers check, email address block/allow list check
2. Banned word check on email subject
3. IP block/allow list check
4. Banned word check on email body
5. Return email DNS check, FortiGuard email checksum check, FortiGuard URL check, DNSBL and ORDBL checks
IMAPS and POP3S spam filtering are available on FortiGates that support SSL content
scanning and inspection.
In an email filter profile, there are options to configure settings for SMTP, POP3, IMAP, and MAPI protocols. For each
protocol, you can set an action to either discard (block), tag, or pass the log for that protocol. The action options vary per
protocol. For the tag action, the spam email can be tagged with configured text in the subject or header.
MAPI is only configurable in the CLI and with the proxy feature set.
You can configure an email filter to detect and log emails sent by Gmail and Hotmail. These interfaces do not use
standard email protocols (SMTP, POP3, or IMAP) and use HTTPS instead. However, you can still configure the email
filter to detect emails that pass through the FortiGate.
The FortiGate only detects and logs the emails, it does not discard or tag them.
The FortiGate data leak prevention (DLP) system prevents sensitive data from leaving or entering your network. You can
customize the default sensor or create your own by adding individual filters based on file type, file size, a regular
expression, an advanced rule, or a compound rule. Once configured, you can apply the DLP sensor to a firewall policy.
Data matching defined sensitive data patterns is blocked, logged, or allowed when it passes through the FortiGate.
DLP can only be configured in the CLI.
The filters in a DLP sensor can examine traffic for the following:
l Known files using DLP fingerprinting
l Known files using DLP watermarking
l Particular file types
l Particular file names
l Files larger than a specified size
l Data matching a specified regular expression
l Credit card and Social Security numbers
Filters are ordered, but there is no precedence between the possible actions.
DLP is primarily used to stop sensitive data from leaving your network. DLP can also be used to prevent unwanted data
from entering your network and to archive some or all of the content that passes through the FortiGate. DLP archiving is
configured per filter, which allows a single sensor to archive only the required data. You can configure the DLP archiving
protocol in the CLI (see Configure DLP sensors).
There are two forms of DLP archiving:
l Summary only: a summary of all the activity detected by the sensor is recorded. For example, when an email
message is detected, the sender, recipient, message subject, and total size are recorded. When a user accesses
the web, every URL that they visit is recorded.
l Full: detailed records of all the activity detected by the sensor is recorded. For example, when an email message is
detected, the message itself, including any attachments, is recorded. When a user accesses the web, every page
that they visit is archived.
The following topics provide information about DLP:
l Basic DLP filter types on page 1182
l DLP fingerprinting on page 1184
The following table indicates which protocols can be inspected by DLP based on the specified inspection modes.
Proxy Yes Yes Yes Yes Yes Yes Yes Yes Yes
Sometimes, file names are not accurately recorded in DLP logs, even though the files are blocked correctly based on the
DLP sensor. This is particularly apparent on cloud-based services, such as Google Drive or SharePoint.
For HTTP file uploads, some cloud services use proprietary encodings and APIs to transfer files and exchange
metadata, instead of standard HTTP mechanisms, requiring custom handling of the proprietary API. If a cloud service
changes the API without notice, the custom handling becomes outdated and file names might not be logged properly.
Due to this, special consideration must be taken when using DLP to block files by file pattern. To block a specific file type,
it is better to block by file type, and not by file name pattern.
A file type filter allows you to block, allow, log, or quarantine based on the file type specified in the file filter list (see
Supported file types on page 1165).
config dlp filepattern
edit <id>
set name <string>
config entries
edit <pattern>
set filter-type {type | pattern}
set file-type <file_type>
next
end
next
end
1. Create a file pattern to filter files based on the file name patter or file type.
For example, to filter for GIFs and PDFs:
config dlp filepattern
edit 11
set name "sample_config"
config entries
edit "*.gif"
set filter-type pattern
next
edit "pdf"
set filter-type type
set file-type pdf
next
end
next
end
File size
A file size filter checks for files that exceed the specific size, and performs the DLP sensor's configured action on them.
Regular expression
A regular expression filter is used to filter files or messages based on the configured regular expression pattern.
The credit card sensor can match the credit card number formats used by American Express, Mastercard, and Visa. It
can be used to filter files or messages.
The SSN sensor can be used to filter files or messages for Social Security numbers.
DLP fingerprinting
DLP fingerprinting can be used to detect sensitive data. The file that the DLP sensor filters is uploaded and the FortiGate
generates and stores a checksum fingerprint. The FortiGate generates a fingerprint for all the files that are detected in
network traffic, and compares all the checksums stored in its database. If a match is found, the configured action is
taken. Any type of file can be detected by DLP fingerprinting, and fingerprints can be saved for each revision of a file as it
is updated.
To use fingerprinting:
1. Select the files to be fingerprinted by targeting a document source.
2. Add fingerprinting filters to DLP sensors.
3. Add the sensors to firewall policies that accept traffic that the fingerprinting will be applied on.
The document fingerprint feature requires a FortiGate device that has internal storage.
Command Description
server-type smb Set the protocol used to communicate with document server. Only
Samba (SMB) servers are supported.
period {none | daily | weekly | monthly} Set the frequency that the FortiGate checks the server for new or
changed files.
vdom {mgmt | current} Enter the VDOM that can communicate with the file server.
remove-deleted {enable | disable} Enable/disable keeping the fingerprint database up to date when a file
is deleted from the server.
keep-modified {enable | disable} Enable/disable keeping the old fingerprint and adding a new one
when a file is changed on the server.
username <string> Enter the user name required to log into the file server.
password <password> Enter the password required to log into the file server.
file-path <string> Enter the path on the server to the fingerprint files.
file-pattern <string> Enter the pattern for matching files on the server to be fingerprinted.
sensitivity <Critical | Private | Warning> Set the sensitivity or threat level for matches with this fingerprint
database.
tod-hour <integer> Set the hour of the day. This option is only available when period is
not none.
Command Description
tod-min <integer> Set the minute of the hour. This option is only available when period
is not none.
weekday {sunday | monday | tuesday | Set the day of the week. This option is only available when period is
wednesday | thursday | friday | saturday} weekly.
date <integer> Set the day of the month. This option is only available when period
is monthly.
Command Description
proto {smtp | pop3 | imap http-get | http-post | Set the protocol to inspect.
ftp | nntp | mapi}
sensitivity {Critical | Private | Warning} Set the DLP file pattern sensitivity to match.
match-percentage <integer> Set the percentage of the checksum required to match before the
sensor is triggered.
action {allow | log-only | block | ban | Set the action to take with content that matches the DLP sensor.
quarantine-ip}
Use diagnose test application dlpfingerprint <integer> to display the fingerprint information that is on
the FortiGate.
Integer Function
Integer Function
9 Display statistics
10 Clear statistics
VoIP solutions
You can configure VoIP profiles to allow SIP and SCCP traffic and to protect your network from SIP- and SCCP-based
attacks.
FortiOS includes two preloaded VoIP profiles:
l default
l strict
You can customize these profiles, or you can create your own and add them to firewall policies that allow VoIP.
VoIP profiles cannot be used NGFW policy-based mode. See Profile-based NGFW vs policy-
based NGFW on page 715 for more information.
There are three scenarios in which the FortiOS session initiation protocol (SIP) solution is usually deployed:
1. The SIP server is in a private network that is protected from the internet by a FortiGate.
2. The SIP clients are in a private network that is protected from the internet by a FortiGate.
3. The SIP server is in a private network, such as a corporation's internal network or an ISP’s network, that is protected
from the internet by a FortiGate. The SIP clients are in a remote private network, such as a SOHO network, and
behind a NAT device that is not aware of SIP applications.
The following VIP, NAT, and HNT examples show configurations for these common scenarios.
VIP
A FortiGate with SIP Application Layer Gateway (ALG) or SIP session helper protects the SIP server from the internet,
while SIP phones from the internet need to register to the SIP server and establish calls through it.
A VIP needs to be configured for the SIP server, and the VIP must be applied in a firewall policy for the phones to send
REGISTER messages through the FortiGate from port1 to port2.
Only one firewall policy needs to be configured for all SIP phones on both the internet and private network to register to
the SIP server through port1 and set up SIP calls. This example assumes either SIP ALG or SIP session helper is
enabled.
Setting service to SIP and not all in the firewall policy can improve protection by restricting
the data traffic passing through the FortiGate to the SIP call traffic only.
NAT
A FortiGate with SIP ALG or SIP session helper protects the SIP phones and the internal network from the internet, while
SIP phones in the internal network need to register to the SIP server installed on the internet and establish calls through
it.
One firewall policy needs to be configured with NAT enabled for SIP phones to send REGISTER messages through the
FortiGate from port2 to port1. This example assumes either SIP ALG or SIP session helper is enabled.
HNT
A FortiGate with SIP ALG protects the SIP server from the internet, while SIP phones are in remote private networks
behind NAT devices that are not aware of the SIP application. This is only supported in proxy mode.
In this example, the SIP server is located in an ISP's service cloud that is protected by the FortiGate SIP ALG, and the
SIP phones are installed in the home networks of the ISP's customers.
The SIP messages traversing the remote NAT devices might have their IP addresses translated by the NAT device at
the network layer, but untranslated at the SIP application layer because those NAT devices are not aware of the
SIP applications. This causes problems in a SIP session initiated process. Special configurations for the hosted NAT
traversal (HNT) are required to resolve this issue.
To configure the FortiGate with HNT support for SIP phones A and B to set up calls with each other:
4. Apply the VoIP profile and VIP in a firewall policy for phone A and B to register and set up SIP calls through the
FortiGate and SIP server:
config firewall policy
edit 1
set srcintf "port1"
set dstintf "port2"
set srcaddr "all"
set dstaddr "VIP_for_SIP_Server"
set action accept
set schedule "always"
set service "SIP"
set utm-status enable
set voip-profile "hnt"
set nat enable
next
end
SIP ALG provides users with security features to inspect and control SIP messages that are transported through the
FortiGate, including:
l Verifying the SIP message syntax.
l Blocking particular types of SIP requests.
l Restricting the rate of particular SIP requests.
These can be performed in both proxy-based or flow-based firewall policies. In 7.0, flow-based SIP inspection is done by
the IPS engine. This optimizes memory and CPU usage when VoIP profiles with SIP inspection are configured with other
UTM profiles in a flow-based firewall policy because inspection is done entirely by the IPS engine.
These features are configured in the VoIP profile:
config voip profile
edit <name>
set feature-set {proxy | flow}
config sip
set ...
...
end
next
end
For more information, see config voip profile in the FortiOS CLI Reference.
The VoIP profile can then be applied to a firewall policy to process the SIP call traffic. The firewall policy’s inspection
mode decides whether inspection happens on the SIP ALG proxy or on the IPS engine.
config firewall policy
edit <id>
set inspection-mode {proxy | flow}
set voip-profile <name>
next
end
For syntax verification, the following attributes are available for configuration in the VoIP profile to determine what action
is taken when a specific syntax error or attack based on invalid syntax is detected. For example, the action can be set to
pass or discard it.
malformed-request-line
malformed-header-via
malformed-header-from
malformed-header-to
malformed-header-call-id
malformed-header-cseq
malformed-header-rack
malformed-header-rseq
malformed-header-contact
malformed-header-record-route
malformed-header-route
malformed-header-expires
malformed-header-content-type
malformed-header-content-length
malformed-header-max-forwards
malformed-header-allow
malformed-header-p-asserted-identity
malformed-header-sdp-v
malformed-header-sdp-o
malformed-header-sdp-s
malformed-header-sdp-i
malformed-header-sdp-c
malformed-header-sdp-b
malformed-header-sdp-z
malformed-header-sdp-k
malformed-header-sdp-a
malformed-header-sdp-t
malformed-header-sdp-r
malformed-header-sdp-m
malformed-header-no-require*
malformed-header-no-proxy-require*
The following options are available in the VoIP profile to block SIP messages:
block-long-lines
block-unknown
block-ack
block-bye
block-cancel
block-info
block-invite
block-message
block-notify
block-options
block-prack
block-publish
block-refer
block-register
block-subscribe
block-update
block-geo-red-options**
The rate of certain types of SIP requests that are passing through the SIP ALG can be restricted:
register-rate
invite-rate
subscribe-rate
message-rate
notify-rate
refer-rate
update-rate
options-rate
ack-rate
prack-rate
info-rate
publish-rate
bye-rate
cancel-rate
SIP pinholes
When SIP ALG processes a SIP call, it usually opens pinholes for SIP signaling and RTP/RTCP packets. NAT usually
takes place during the process at both the network and SIP application layers. SIP ALG ensures that, with NAT
happening, corresponding SIP and RTP/RTCP pinholes are created during the process when it is necessary for call
sessions to be established through FortiOS devices.
By default, SIP ALG manages pinholes automatically, but some special configurations can be used to restrict the
pinholes if required.
The strict-register attribute is enabled by default. When enabled, after a SIP endpoint registers to the SIP server
through a firewall policy on the FortiGate, only the SIP messages sent from the same IP address as the SIP server are
allowed to pass through the SIP pinhole that is created in the FortiGate to reach the SIP endpoints. If the attribute is
disabled, SIP messages from any IP addresses can pass through the pinhole created after the registration.
The nat-port-range setting is used to specify a port range in the VoIP profile to restrict the NAT port range for Real-
time Transport Protocol/Real-time Transport Control Protocol (RTP/RTCP) packets in a Session Initiation Protocol (SIP)
call session that is handled by the SIP application layer gateway (ALG) in a FortiGate.
When NAT is enabled, or VIP is used in a firewall policy for SIP ALG to handle a SIP call session established through a
FortiGate, the SIP ALG can perform NAT to translate the ports used for the RTP/RTCP packets when they are flowing
through the device between the external and internal networks.
nat-port-range <start_ Enter the NAT port range (minimum port number = 5117, default = 5117-65535).
port_number>-<end_
port_number>
Example
In this example, Phone 1 is in Subnet 1, and the SIP server and Phone 2 are in Subnet 2. All SIP signaling messages and
RTP/RTCP packets go through the SIP server. The RTP/RTCP ports on Phone 1 are configured as 17078/17079.
The FortiGate administrator wants to use NAT for the port 17078/17079 to 30000/30001. If Phone 1 and Phone 2 are
registered to the SIP server, and they establish a call session between them through the FortiGate and the SIP server,
then the RTP/RTCP ports 17078/17079 of Phone 1 will be translated to ports 30000/30001. All RTP/RTCP packets
going out of port2 have source ports of 30000/30001, and all RTP/RTCP packets going into port2 also have destination
ports of 30000/30001.
It is best practice to configure the starting port as an even number and the ending port as
an odd number.
Some SIP phones and servers can communicate using TLS to encrypt the SIP signaling traffic. To allow SIP over TLS
calls to pass through the FortiGate, the encrypted signaling traffic must be unencrypted and inspected. The FortiGate
SIP ALG intercepts, unencrypts, and inspects the SIP packets, which are then re-encrypted and forwarded to their
destination.
The SIP ALG only supports full mode TLS. This means that the SIP traffic between SIP phones and the FortiGate, and
between the FortiGate and the SIP server, is always encrypted. The highest TLS version supported by SIP ALG is TLS
1.2.
To enable SIP over TLS support, the SSL mode in the VoIP profile must be set to full. The SSL server and client
certificates can be provisioned so that the FortiGate can use them to establish connections to SIP phones and servers,
respectively.
The ssl_server_cert, ssl_client_cert, and key files can be generated using a certification tool, such as
OpenSSL, and imported to the local certificate store of the FortiGate from System > Certificates in the GUI. Existing
local certificates in the certificate store can also be used. As always for TLS connections, the certificates used must
be verified and trusted at the other end of the connection when required.
For example, the CA certificate of the SIP server's certificate should be imported to the FortiGate as an external CA
certification, so that the FortiGate can use it to verify the SIP server's certificate when setting up the TLS connection.
The CA certificate configured as the ssl_server_cert should be installed as the trusted certificate on the SIP
phones. The deployment of the certificates across the network depends on the SIP client and server devices that
are used in the system.
2. Apply the profile to the firewall policy:
config firewall policy
edit 1
set srcintf "port1"
set dstintf "port2"
set srcaddr "all"
set dstaddr "vip_sip_server"
set action accept
set schedule "always"
set service "SIP"
set utm-status enable
set voip-profile "tls"
next
end
Voice VLAN auto-assignment
You can leverage LLDP-MED to assign voice traffic to the desired voice VLAN. After detection and setup, the IP phone
on the network is segmented to its own VLAN for policy, prioritization, and reporting. The LLDP reception capabilities in
FortiOS include LLDP-MED assignment for voice, voice signaling, guest, guest voice signaling, softphone, video
conferencing, streaming video, and video signaling.
You can configureVLAN auto-assignment using the following steps:
1. Set up the VLAN for the voice device
2. Set up the DHCP server for the voice VLAN
3. Sett up the LLDP network policy
4. Enable LLDP on the physical interface that the VLAN belongs to
5. Apply the LLDP network policy on the physical interface
6. Confirm that the VLAN was assigned
To enable LLDP on the physical interface that the VLAN belongs to:
next
end
An MSRP (Message Session Relay Protocol) decoder in the IPS engine scans for IPS signatures against the application
data. Malicious payload in the text message can be blocked. A VoIP profile using flow inspection mode must be
configured in the firewall policy. An IPS profile must be configured in the firewall policy to inspect the payload.
config voip profile
edit <name>
set feature-set flow
config msrp
set status {enable | disable}
set log-violations {enable | disable}
set max-msg-size <integer>
set max-msg-size-action {pass | block | reset | monitor}
end
next
end
Examples
In this first example, MSRP messages larger than 10 bytes will be blocked. The client sends an oversized MSRP
message to the server. Message Automation & Protocol Simulation (MAPSTM) is used, and a client-server model was
configured to use the software to send MSRP traffic from vlan843 (client) to vlan844 (server) with plain text placed in the
message field. The software uses the content of the MsrpInputMessage.txt file located in the default folder, where
anything in that file will be sent by MSRP. The following text is used:
GL's Message Automation & Protocol Simulation (MAPSTM) is a protocol simulation and conformance test tool that
supports a variety of protocols such as SIP, MEGACO, MGCP, SS7, ISDN, GSM, MAP, CAS, LTE, UMTS, SS7
SIGTRAN, ISDN SIGTRAN, SIP I, GSM AoIP, Diameter and others. This message automation tool covers solutions
for both protocol simulation and protocol analysis. The application includes various test plans and test cases to
support the testing of real-time entities. Along with automation capability, the application gives users the unlimited
ability to edit messages and control scenarios (message sequences).
In this second example, malicious files will be blocked. The client sends an EICAR test sample to the server in an MSRP
message. Message Automation & Protocol Simulation (MAPSTM) is used, and a client-server model was configured to
use the software to send MSRP traffic from vlan843 (client) to vlan844 (server) with a plain text EICAR file containing a
virus in the message field. The following text is used:
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
ICAP
Internet Content Adaptation Protocol (ICAP) is an application layer protocol that is used to offload tasks from the firewall
to separate, specialized servers. For more information see RFC 3507.
ICAP profiles can only be applied to policies that use proxy-based inspection. If you enable ICAP in a policy, HTTP and
HTTPS (if HTTPS inspection is supported) traffic that is intercepted by the policy is transferred to the ICAP server
specified by the selected ICAP profile. Responses from the ICAP server are returned to the FortiGate, and then
forwarded to their destination.
By default, ICAP is not visible in the GUI. See Feature visibility on page 2043 for instructions
on making it visible.
ICAP filter profiles cannot be used in NGFW policy-based mode. See Profile-based NGFW vs
policy-based NGFW on page 715 for more information.
To configure ICAP:
A TCP connection pool can maintain local-out TCP connections to the external ICAP server due to a backend update in
FortiOS. TCP connections will not be terminated once data has been exchanged with the ICAP server, but instead are
reused in the next ICAP session to maximize efficiency.
For example, consider a scenario where an ICAP profile is used as a UTM profile in an explicit web proxy policy, and a
client visits web servers through this proxy policy.
Once the WAD is initialized, when a HTTP request is sent from the client to the server through the FortiGate with an
ICAP profile applied to the matched proxy policy, a TCP connection is established between the FortiGate and the ICAP
server to exchange data.
When an ICAP session is finished, the TCP connection is kept in the WAD connection pool. When another ICAP session
needs to be established, the WAD will check if there are any idle connections available in the connection pool. If an idle
connection is available, then it will be reused; otherwise, a new TCP connection is established for the ICAP session. This
process can be checked in the WAD debug log.
In this example, the ICAP server performs proprietary content filtering on HTTP and HTTPS requests. If the content filter
is unable to process a request, then the request is blocked. Streaming media is not considered by the filter, so it is
allowed through and is not processed.
f. Click OK.
The maximum number of concurrent connections to ICAP server can be configured in the
CLI (set max-connections). The default setting is 100 connections.
l Path: enter the path to the processing component on the server, such as /proprietary_code/content-filter/.
l On Failure: select Error to block the request. If the message cannot be processed, it will not be blocked.
l Path: enter the path to the processing component on the server, such as /proprietary_code/content-filter/.
l On Failure: select Error to block the request. If the message cannot be processed, it will not be blocked.
e. Enable Streaming Media Bypass to not offload streaming media to the ICAP server.
f. Click OK.
ICAP HTTP responses can be forwarded or bypassed based on the HTTP header value and status code.
When configuring the ICAP profile, if response is enabled, the respmod-default-action option can be configured:
l If respmod-default-action is set to forward, FortiGate will treat every HTTP response and send ICAP
requests to the ICAP server.
l If respmod-default-action is set to bypass, FortiGate will only send ICAP requests if the HTTP response
matches the defined rules, and the rule's action is set to forward.
When configuring a response rule:
l The http-resp-status-code option is configured to specific HTTP response codes. If the HTTP response has
any one of the configured values, then the rule takes effect.
l Multiple header value matching groups can be configured. If the header value matches one of the groups, then the
rule takes effect.
l If both status codes and header values are specified in a rule, the response must match at least one of each.
The UTM ICAP log category is used for logging actions when FortiGate encounters errors with the ICAP server, such as
no service, unreachable, error response code, or timeout. If an error occurs, a traffic log and an associated UTM ICAP
log will be created.
Example
The FortiGate acts as a gateway for the client PC and connects to a reachable ICAP server. The ICAP server can be in
NAT, transparent, or proxy mode.
In this example, client request HTTP responses will be forwarded to the ICAP server from all hosts if they have an HTTP
status code of 200, 301, or 302, and have content-type: image/jpeg in the their header.
1 logs returned.
The logs show that the ICAP services stopped before the access. When the client tried to access HTTP and ICAP took
effect, the FortiGate sent the ICAP request to the ICAP server and received an error. The client sees a 502 Bad Gateway
message, and FortiGate writes the two logs. In the GUI, the logged traffic is displayed as Result: Deny: UTM Blocked.
A secure SSL connection from the FortiGate to the ICAP server can be configured as follows:
config icap server
edit <name>
set secure {enable | disable}
set ssl-cert <certificate>
next
end
Port 11344 is the standard port for secure ICAP. This must be configured manually if the
secure connection is enabled.
Web application firewall (WAF) profiles can detect and block known web application attacks. You can configure WAF
profiles to use signatures and constraints to examine web traffic. You can also enforce an HTTP method policy, which
controls the HTTP method that matches the specified pattern.
You can customize the default profile, or you can create your own profile to apply access rules and HTTP protocol
constraints to traffic. You can apply WAF profiles to firewall policies when the inspection mode is set to proxy-based.
Web application firewall profiles cannot be used NGFW policy-based mode. See Profile-based
NGFW vs policy-based NGFW on page 715 for more information.
You can use a web application firewall profile to protect a server that is running a web application, such as webmail.
Web application firewall profiles are created with a variety of options called signatures and constraints. Once these
options are enabled, the action can be set to allow, monitor, or block. The severity can be set to high, medium, or low.
In the following example, the default profile will be targeted to block SQL injection attempts and generic attacks.
The web application firewall feature is only available when the policy inspection mode is proxy-
based.
d. Enable Generic Attacks (Extended) and edit it so that it is enabled, the Action is set to Block, and the Severity is
set to High.
e. Click OK.
f. Click OK.
3. Apply the profile to a security policy:
a. Go to Policy & Objects > Firewall Policy and edit the policy that allows access to the web server.
b. For Firewall / Network Options, select the appropriate Protocol Option.
c. For Security Profiles, enable Web Application Firewall and set it to use the default profile.
d. Set the SSL Inspection to use the deep-inspection profile.
e. Configure the other settings as needed.
f. Click OK.
4. Verify that the web application firewall blocks traffic:
a. Use the following URL to simulate an attack on your web server and substitute the IP address of your server:
http://<server
IP>/index.php?username=1'%20or%20'1'%20=%20'1&password=1'%20or%20'1'%20=%20'1
An error message appears, stating that the web application firewall has blocked the traffic:
Offloading to a FortiWeb
If you have a FortiWeb, you may be able to offload the functions of the web application control to your FortiWeb. To find
out if this option is available, refer to the FortiOS or FortiWeb Release Notes for information about device compatibility.
To offload to a FortiWeb:
Secure Sockets Layer (SSL) content scanning and inspection allows you to apply antivirus scanning, web filtering, and
email filtering to encrypted traffic. You can apply SSL inspection profiles to firewall policies.
FortiOS includes four preloaded SSL/SSH inspection profiles, three of which are read-only and can be cloned:
l certificate-inspection
l deep-inspection
l no-inspection
The custom-deep-inspection profile can be edited, or you can create your own SSL/SSH inspection profiles.
Deep inspection (also known as SSL/SSH inspection) is typically applied to outbound policies where destinations are
unknown. Depending on your policy requirements, you can configure the following:
l Which CA certificate will be used to decrypt the SSL encrypted traffic
l Which SSL protocols will be inspected
l Which ports will be associated with which SSL protocols for inspection
l Whether or not to allow invalid SSL certificates
l Whether or not SSH traffic will be inspected
l Which addresses or web category allowlists can bypass SSL inspection
The following topics provide information about SSL & SSH Inspection:
l Certificate inspection on page 1214
l Deep inspection on page 1216
l Protecting an SSL server on page 1219
l Handling SSL offloaded traffic from an external decryption device on page 1220
l SSH traffic file scanning on page 1222
l Redirect to WAD after handshake completion on page 1223
l HTTP/2 support in proxy mode SSL inspection on page 1224
l Define multiple certificates in an SSL profile in replace mode on page 1225
l Disabling the FortiGuard IP address rating on page 1227
Certificate inspection
FortiGate supports certificate inspection. The default configuration has a built-in certificate-inspection profile which you
can use directly. When you use certificate inspection, the FortiGate only inspects the headers up to the SSL/TLS layer.
If you do not want to deep scan for privacy reasons but you want to control web site access, you can use certificate-
inspection.
The following options are available when configuring an SSL inspection profile (Security Profiles > SSL/SSH Inspection):
Blocked certificates The FortiGate receives botnet C&C SSL connections from FortiGuard that contain
SHA1 fingerprints of malicious certificates. By default, these certificates are
blocked.
Click View Blocked Certificates to see a detailed list.
Untrusted SSL certificates Configure the action to take when a server certificate is not issued by a trusted
CA.
l Allow: Allow the untrusted server certificate. This is the default value.
Server certificate SNI check Check the SNI in the hellp message with the CN or SAN field in the returned
server certificate.
l Enable: If mismatched, use the CN in the server certificate to do URL
filtering.
l Strict: If mismatched, close the connection.
l Disable: Server certificate SNI check is disabled.
The built-in certificate-inspection profile is read-only and only listens on port 443. If you want to make changes, you must
create a new certificate inspection profile.
If you know the non-standard port that the web server uses, such as port 8443, you can add this port to the HTTPS field.
Common options
Invalid SSL certificates can be blocked, allowed, or a different actions can be configured for the different invalid
certificates types:
Expired certificates Action to take when the server certificate is expired. The default action is block.
Revoked certificates Action to take when the server certificate is revoked. The default action is block.
Validation timed-out Action to take when the server certificate validation times out. The default action is
certificates allow.
Validation failed certificates Action to take when the server certificate validation fails. The default action is
block.
By default, SSL anomalies logging is enabled. Logs are generated in the UTM log type under the SSL subtype when
invalid certificates are detected.
Deep inspection
You can configure address and web category allowlists to bypass SSL deep inspection.
While Hypertext Transfer Protocol Secure (HTTPS) offers protection on the Internet by applying Secure Sockets Layer
(SSL) encryption to web traffic, encrypted traffic can be used to get around your network's normal defenses.
For example, you might download a file containing a virus during an e-commerce session, or you might receive a
phishing email containing a seemingly harmless download that, when launched, creates an encrypted session to a
command and control (C&C) server and downloads malware onto your computer. Because the sessions in these attacks
are encrypted, they might get past your network's security measures.
When you use deep inspection, the FortiGate impersonates the recipient of the originating SSL session, then decrypts
and inspects the content to find threats and block them. It then re-encrypts the content and sends it to the real recipient.
Deep inspection not only protects you from attacks that use HTTPS, it also protects you from other commonly-used SSL-
encrypted protocols such as SMTPS, POP3S, IMAPS, and FTPS.
When the FortiGate re-encrypts the content, it uses a stored certificate, such as Fortinet_CA_SSL, Fortinet_CA_
Untrusted, or your own CA certificate that you uploaded.
Because there is no Fortinet_CA_SSL in the browser trusted CA list, the browser displays an untrusted certificate
warning when it receives a FortiGate re-signed server certificate. To stop the warning messages, trust the FortiGate-
trusted CA Fortinet_CA_SSL and import it into your browser.
If you still get messages about untrusted certificates after importing Fortinet_CA_SSL into your browser, it is due to
Fortinet_CA_Untrusted. Never import the Fortinet_CA_Untrusted certificate into your browser.
1. On the FortiGate, go to Security Profiles > SSL/SSH Inspection and edit the deep-inspection profile.
The default CA Certificate is Fortinet_CA_SSL.
2. Click Download and save the certificate to the management computer.
3. On the client PC, use the Certificate Import Wizard to install the certificate into the Trusted Root Certificate
Authorities store.
If a security warning appears, select Yes to install the certificate.
If you do not want to apply deep inspection for privacy or other reasons, you can exempt the session by address,
category, or allowlist.
If you know the address of the server you want to exempt, you can exempt that address. You can exempt specific
address type including IP address, IP address range, IP subnet, FQDN, wildcard-FQDN, and geography.
If you want to exempt all bank web sites, an easy way is to exempt the Finance and Banking category, which includes all
finance and bank web sites identified in FortiGuard. For information about creating and using custom local and remote
categories, see Web rating override on page 1238 and Threat feeds on page 2386.
If you want to exempt commonly trusted web sites, you can bypass the SSL allowlist in the SSL/SSH profile by enabling
Reputable websites. The allowlist includes common web sites trusted by FortiGuard.
SSL version support
There are two ways to limit which SSL versions deep inspection is applied to.
l In the global attributes:
config system global
set strong-crypto enable
end
Enabling strong-crypto in the global attributes sets the min-allowed-ssl-version to tls-1.1 by default.
When a session is attempted using an SSL version below the minimum allowed version, the session can be blocked
(default) or allowed.
To configure the action based on the SSL version used being unsupported:
You typically use the FortiGate Protecting SSL Server profile as an inbound policy for clients on the internet that access
the server through the internal side of the FortiGate.
Protecting SSL Server uses a server certificate to protect a single server.
You can use Protecting SSL Server if you do not want a client on the internet to directly access your internal server, and
you want the FortiGate to simulate your real server.
To upload a server certificate into FortiGate and use that certificate in the SSL/SSH inspection profile:
6. Click OK.
When you apply the Protecting SSL Server profile in a policy, the FortiGate will send the server certificate to the client as
your server does.
In scenarios where the FortiGate is sandwiched between load-balancers and SSL processing is offloaded on the
external load-balancers, the FortiGate can perform scanning on the unencrypted traffic by specifying the ssl-
offloaded option in firewall profile-protocol-options. This option is supported in proxy and flow mode
(previous versions only supported proxy mode).
If the FortiGate receives an AUTH TLS, PBSZ, or PROT command before receiving plain text traffic from a decrypted
device, by default, it will expect encrypted traffic, determine that the traffic belongs to an abnormal protocol, and bypass
the traffic.
When the ssl-offloaded command is enabled, the AUTH TLS command is ignored, and the traffic is treated as plain
text rather than encrypted data. SSL decryption and encryption are performed by the external device.
Sample topology
In this example, the FortiGate is between two FortiADCs and in SSL offload sandwich mode. The FortiGate receives
plain text from ADC1 and forwards plain text to ADC2. There is no encrypted traffic passing through the FortiGate.
The client sends HTTPS traffic to ADC1, which then decrypts the traffic and sends HTTP to the FortiGate. The FortiGate
forwards HTTP to ADC2, and the ADC2 re-encrypts the traffic to HTTPS.
The ADC1 incoming port capture shows that ADC1 receives HTTPS traffic:
The ADC1 outgoing port capture shows that ADC1 decrypts traffic and forwards HTTP traffic to the FortiGate:
The FortiGate's incoming and outgoing port captures show that HTTP traffic passes through the FortiGate:
The ADC2 incoming port capture shows that the ADC2 receives HTTP traffic:
The ADC2 outgoing port capture shows that ADC2 forwards HTTPS traffic to the server:
FortiGates can buffer, scan, log, or block files sent over SSH traffic (SCP and SFTP) depending on the file size, type, or
contents (such as viruses or sensitive content).
This feature is supported in proxy-based inspection mode. It is currently not supported in flow-
based inspection mode.
You can configure the following SSH traffic settings in the CLI:
l Protocol options
l DLP sensor
l Antivirus (profile and quarantine options)
In a proxy-based policy, the TCP connection is proxied by the FortiGate. A TCP three-way handshake can be
established with the client even though the server did not complete the handshake.
This option uses IPS to handle the initial TCP three-way handshake. It rebuilds the sockets and redirects the session
back to proxy only when the handshake with the server is established.
Security profiles in proxy mode can perform SSL inspection on HTTP/2 traffic that is secured by TLS 1.2 or 1.3 using the
Application-Layer Protocol Negotiation (ALPN) extension.
all The FortiGate forwards ALPN extensions that use either HTTP/2 or HTTP/1.1. This is the
default value.
http1-1 The FortiGate only forwards ALPN extensions that use HTTP/1.1.
If the ALPN extension uses HTTP/2, then the FortiGate strips the ALPN header from the
Client Hello.
http2 The FortiGate only forwards ALPN extensions that use HTTP/2.
If the ALPN extension uses HTTP/1.1, then the FortiGate strips the ALPN header from the
Client Hello.
none The FortiGate always strips the ALPN header from the Client Hello when forwarding.
For example, if supported-alpn is set to http2, but the extension uses HTTP/1.1, the ALPN header is stripped from
the Client Hello:
l Incoming packet capture:
Multiple certificates can be defined in an SSL inspection profile in replace mode (Protecting SSL Server). This allows
multiple sites to be deployed on the same protected server IP address, and inspection based on matching the SNI in the
certificate.
When the FortiGate receives the client and server hello messages, it will compare the server name identification (SNI)
and the common name (CN) with the certificate list in the SSL profile, and use the matched certificate as a replacement.
If there is no matched server certificate in the list, then the first server certificate in the list is used as a replacement.
Example
Results
If the SNI matches the CN in the certificate list in the SSL profile, then the FortiGate uses the matched server certificate.
In this example, when the client accesses www.aaa.com, the FortiGate will use the aaa certificate as a replacement.
If the SNI does not match the CN in the certificate list in the SSL profile, then the FortiGate uses the first server certificate
in the list. In this example, when the client accesses www.ccc.com, because there is no certificate for www.ccc.com, the
FortiGate will use the bbb certificate as a replacement.
The FortiGuard IP address rating for SSL exemptions and proxy addresses can be disabled using the ssl-
exemption-ip-rating and address-ip-rating options.
The ssl-exemption-ip-rating and address-ip-rating options are enabled by default, so when both a website
domain and its IP address return different categories after being rated by FortiGuard, the IP address category takes
precedence when evaluating SSL exemptions associated with the SSL inspection profile and proxy addresses
associated with the proxy protocol options profile. SSL exemptions and the ssl-exemption-ip-rating option work
in both inspection modes (proxy and flow).
When the categories associated with the website domain and IP address are different, disabling the FortiGuard IP rating
ensures that the FortiGuard domain category takes precedence when evaluating the preceding objects. For most
websites, the domain category is valid when its IP address is unrated by FortiGuard. Since being unrated is considered
as not having a category, the FortiGate uses the domain category as the website category.
A website might have an IP category that differs from its domain category. If they are different, the FortiGate uses the
rating weight of the IP address or domain name to determine the rating result and decision. The rating weight is hard-
coded in the FortiGate and depending on the relative category weights, the FortiGate may use the IP category instead of
the website category. If the ssl-exemption-ip-rating option is disabled in the SSL inspection profile, then the
FortiGate uses the domain category as the website category, which ensures SSL exemption operation as intended.
The address-ip-rating option in a proxy protocol options profile functions the same way as the ssl-exemption-
ip-rating option. If the address-ip-rating option is disabled in a profile that is used in an explicit proxy policy that
also uses a web filter profile, for HTTP or HTTPS traffic to a website that has different IP and domain categories and that
matches the policy, the FortiGate will use the domain category when it evaluates categories for the web filter.
Custom signatures
You can create the following custom signatures and apply them to firewall policies:
l IPS signature
l Application signature
l Application group
The following topic provides information about custom signatures:
l Application groups in traffic shaping policies on page 1228
l Blocking applications with custom signatures on page 1232
l Filters for application control groups on page 1234
Application groups can be configured in traffic shaping policies. In this example, there are two traffic shaping policies:
l Policy 1 is for traffic related to cloud applications and has high priority.
l Policy 2 is for other traffic and has low priority.
At least one firewall policy must have application control enabled for the applications to match
any policy traffic.
e. Click OK.
2. Create the shaping policy for the high priority cloud application traffic:
a. Go to Policy & Objects > Traffic Shaping, select the Traffic Shaping Policies tab, and click Create New.
b. Enter the following:
Source All
Destination All
Service All
Application Add the Cloud.IT category and the cloud app group application group.
c. Click OK.
3. Create the shaping policy for the low priority other traffic:
Source All
Destination All
Service All
b. Click OK.
2. Create the shaping policies for the high priority cloud application traffic and low priority other traffic:
config firewall shaping-policy
edit 1
set name "For Cloud Traffic"
set service "ALL"
set app-category 30
Custom signatures can be used in application control profiles to block web traffic from specific applications, such as out
of support operating systems.
In this example, a custom signature is created to detect PCs running Windows NT 6.1 operating systems, including
Windows 7 and Windows Server 2008 R2. The signature is added to an application control profile and the action is set to
block. The profile is then used in a firewall policy so that web traffic matching the signature is blocked. The logs
generated by this example can be used to help identify other computers that need to be blocked.
1. Go to Security Profiles > Application Signatures and click Create New > Custom Application Signature.
2. Enter a name for the custom signature, such as block_nt_6.1.
3. Enter the Signature. In this example:
F-SBID( --attack_id 6483; --name "Windows.NT.6.1.Web.Surfing"; --default_action drop_
session; --service HTTP; --protocol tcp; --app_cat 25; --flow from_client; --pattern
!"FCT"; --pattern "Windows NT 6.1"; --no_case; --context header; --weight 40; )
This signature scans HTTP and HTTPS traffic that matches the pattern Windows NT 6.1 in its header. For blocking
older versions of Windows, such as Windows XP, you would use the pattern Windows NT 5.1. An attack ID is
automatically generated when the signature is created.
4. Click OK.
The signature is included in the Custom Application Signature section of the signature list.
6. Click OK.
The signature is added to the table.
7. Click OK.
to a profile that includes deep inspection. See SSL & SSH Inspection on page 1214 for more information.
4. Click OK.
Results
When a PC running one of the affected operating systems tries to connect to the internet using a web browser, a
replacement message is shown. For information on customizing replacement messages, see Replacement messages
on page 2020.
Go to Log & Report > Application Control to view the web traffic that is logged for the PC that is blocked by the application
signature.
When defining application groups in NGFW policy or profile mode, the following group filters are available: protocols,
risk, vendor, technology, behavior, popularity, and category.
l 0 (network-protocol)
l 1 (browser-based)
l 2 (client-server)
l 4 (peer-to-peer)
behavior <id> Application behavior filter:
l all
l 2 (botnet)
l 3 (evasive)
l 5 (excessive bandwidth)
l 6 (tunneling)
l 9 (cloud)
popularity <integer> Application popularity filter (1 - 5, from least to most popular).
category <id> Application category filter:
l 2 (P2P)
l 3 (VoIP)
l 5 (video/audio)
l 6 (proxy)
l 7 (remote access)
l 8 (game)
l 12 (general interest)
l 15 (network service)
l 17 (update)
l 21 (email)
l 22 (storage backup)
l 23 (social media)
l 25 (web client)
l 26 (industrial)
l 28 (collaboration)
l 29 (business)
l 30 (cloud IT)
l 31 (mobile)
l 32 (unknown applications)
Sample configurations
In this example, a single filter (risk level 1) is configured in the application group in NGFW policy mode, so only
signatures matching this filter will match the security policy.
In this example, the application group is configured so that only signatures matching both filters, category 5 (video/audio)
and technology 1 (browser-based), will match the security policy. The application group can also be configured in a
traffic shaping policy.
Overrides
Web filter configuration can be separated into profile configuration and profile overrides.
You can also override web filter behavior based on the FortiGuard website categorization:
l Use alternate categories (web rating overrides): this method manually assigns a specific website to a different
Fortinet category or a locally-created category.
l Use alternate profiles: configured users or IP addresses can use an alternative web filter profile when attempting to
access blocked websites.
Web rating overrides allow you to apply a category override to a URL. This overrides the original FortiGuard category for
the URL with either a different FortiGuard category, a custom local category, or a threat feed remote category.
If a URL is in multiple active categories, the order of precedence is local categories, then remote categories, and then
FortiGuard categories.
1. Go to Security Profiles > Web Rating Overrides and click Create New.
2. Enter the URL to override.
3. Optionally, click Lookup rating to see what its current rating is, if it has one.
4. Set the Category and Sub-Category to an existing category that is different from the original category.
5. Click OK.
Sub-category actions
After configuring category override rules, an override category must be active in a web filter profile for it to take effect.
Whether a category is active or not depends on the override method and action:
*The Disable action is only available for local and remote categories by right clicking on the sub-category.
The Allow action in the GUI is different for FortiGuard categories compared to local and remote categories.
For local and remote categories, the Allow action in the GUI corresponds to the monitor action with logging disabled in
the CLI:
For FortiGuard categories, the Allow action in the GUI corresponds to no entry in the CLI:
This means that a FortiGuard category with the Allow action applied is effectively inactive, as there is no actual action
specified in the CLI.
In this example, play.google.com is overridden from its original category, Freeware and Software Download (19), to the
Advertising category (17). In the web filter profile, the Advertising category is set to Block and the Freeware and Software
Download category is set to Allow.
1. Go to Security Profiles > Web Rating Overrides and click Create New.
2. Enter the URL: play.google.com.
3. Optionally, click Lookup rating to see what its current rating is.
4. Set the Category and Sub-Category to an existing category that is different from the original category.
5. Click OK.
1. Go to Security Profiles > Web Filter and create or edit a web filter profile. See FortiGuard filter on page 1064 for
more information.
2. Enable FortiGuard category based filter
3. Set the action for the Advertising category in the General Interest - Personal group to Block.
4. Set the action for the Freeware and Software Download category in the Bandwidth Consuming group to Allow.
1. Go to Policy & Objects > Firewall Policy and create or edit a policy.
2. Configure the policy fields as required.
3. Under Security Profiles, enable Web Filter and select the profile that you just created.
4. Set SSL Inspection to certificate-inspection or deep-inspection.
1. From a Workstation behind the firewall, open a browser and browse to play.google.com. The page will be blocked
by the category override.
2. Go to Log & Report > Security Events and select Web Filter.
3. View the log details in the GUI, or download the log file:
date=2022-09-21 time=16:43:31 eventtime=1663803811966781540 tz="-0700"
logid="0316013056" type="utm" subtype="webfilter" eventtype="ftgd_blk" level="warning"
vd="root" policyid=2 sessionid=891040 srcip=192.168.2.8 srcport=50318 srcintf="port2"
srcintfrole="undefined" dstip=142.251.211.238 dstport=443 dstintf="port1"
dstintfrole="undefined" proto=6 service="HTTPS" hostname="play.google.com" profile="FGD-
Override-FGD-Flow" action="blocked" reqtype="direct" url="https://play.google.com/"
sentbyte=517 rcvdbyte=0 direction="outgoing" msg="URL belongs to a denied category in
policy" method="domain" cat=17 catdesc="Advertising"
In this example, play.google.com is added to an external URL category list and applied to a threat feed. In the web filter
profile, the remote category is set to Allow, and the original FortiGuard category (Freeware and Software Download) is
set to Block. Remote categories take precedence over FortiGuard categories, so the override action for the remote
category will apply.
Delete the web rating override entry from example 1 for play.google.com before configuring this example.
1. Go to Security Profiles > Web Filter and create or edit a web filter profile. See FortiGuard filter on page 1064 for
more information.
2. Enable FortiGuard category based filter
3. Set the action for the Custom-Remote-FGD category in the Remote Categories group to Allow.
4. Set the action for the Freeware and Software Download category in the Bandwidth Consuming group to Block.
5. Configure the remaining settings are required, then click OK.
1. Go to Policy & Objects > Firewall Policy and create or edit a policy.
2. Configure the policy fields as required.
3. Under Security Profiles, enable Web Filter and select the profile that you just created.
4. Set SSL Inspection to certificate-inspection or deep-inspection.
5. Enable Log Allowed Traffic.
6. Click OK.
1. From a Workstation behind the firewall, open a browser and browse to play.google.com. The page will be allowed
by the remote category override.
2. No logs are recorded because the Allow action is selected.
In this example, play.google.com is added to a custom local category. that is set to Monitor in the web filter profile. Local
custom categories take precedence over both remote and FortiGuard categories, so the override action for the local
category will apply.
1. Go to Security Profiles > Web Rating Overrides and click Create New.
2. Enter the URL to override.
3. For Category, select Custom Categories and for Sub-Category select myCustomCategory.
4. Click OK.
1. Go to Security Profiles > Web Filter and create or edit a web filter profile. See FortiGuard filter on page 1064 for
more information.
2. Enable FortiGuard category based filter
3. Set the action for the myCustomCategory category in the LocalCategories group to Monitor.
4. The other actions can be left as they were at the end of example 2, Custom-Remote-FGD set to Allow and Freeware
and Software Download set to Block.
5. Configure the remaining settings are required, then click OK.
1. Go to Policy & Objects > Firewall Policy and create or edit a policy.
2. Configure the policy fields as required.
3. Under Security Profiles, enable Web Filter and select the profile that you just created.
4. Set SSL Inspection to certificate-inspection or deep-inspection.
5. Enable Log Allowed Traffic.
6. Click OK.
1. From a Workstation behind the firewall, open a browser and browse to play.google.com. The page will be allowed
by the local category override.
2. Go to Log & Report > Security Events and select Web Filter.
3. View the log details in the GUI, or download the log file:
For some functions, local and remote FortiGuard categories must be explicitly selected to apply. In SSL/SSH inspection
profiles, custom categories must be explicitly selected to be exempt from SSL inspection. In Proxy addresses, custom
categories must be explicitly selected as URL categories for them to apply. In both settings, if a URL is in multiple
selected categories, the order of precedence is local categories, then remote categories, and then FortiGuard
categories.
To use local and remote categories in an SSL/SSH inspection profile to exempt them from SSL
inspection in the GUI:
To use local and remote categories in an SSL/SSH inspection profile to exempt them from SSL
inspection in the CLI:
config vdom
edit root
config firewall ssl-ssh-profile
edit "SSL_Inspection"
config https
set ports 443
set status deep-inspection
end
...
config ssl-exempt
edit 1
set fortiguard-category 140
next
edit 2
set fortiguard-category 192
next
end
next
end
next
end
Proxy addresses
1. Go to Policy & Objects > Addresses and click Create New > Address, or edit an existing proxy address.
2. Set Category to Proxy Address.
3. Set Type to URL Category.
4. In the URL Category, add the local and remote categories.
config vdom
edit root
config firewall proxy-address
edit "proxy_override"
set type category
set host "all"
set category 140 192
set color 23
next
end
next
end
Administrative override
Administrators can grant temporary access to sites that are otherwise blocked by a web filter profile. You can grant
temporary access to a user, user group, or source IP address. You can set the time limit by selecting a date and time.
The default is 15 minutes.
When the administrative web profile override is enabled, a blocked access page or replacement message does not
appear, and authentication is not required.
Scope range
When you enter an IP address in the administrative override method, only individual IP
addresses are allowed.
This example describes how to override the webfilter profile with the webfilter_new profile.
1. Go to Security Profiles > Web Profile Overrides and click Create New.
2. Configure the administrative override:
a. For Scope Range, click Source IP.
b. In the Source IP field, enter the IP address for the client computer (10.1.100.11 in this example).
c. In the Original profile dropdown, select webfilter.
d. In the New profile dropdown, select webfilter_new.
In the Expires field, the default 15 minutes appears, which is the desired duration for this example.
3. Click OK.
For both override methods, the scope ranges (for specified users, user groups, or IP addresses) allow sites blocked by
web filtering profiles to be overridden for a specified length of time.
But there is a difference between the override methods when the users or user group scope ranges are selected. In both
cases, you would need to apply the user or user group as source in the firewall policy. With administrative override, if you
do not apply the source in the firewall policy, the traffic will not match the override and will be blocked by the original
profile. With the Allow users to override blocked categories setting, the traffic will also be blocked, but instead of
displaying a blocking page, the following message appears:
When you choose the user group scope, once one user overrides, it will affect the other users in the group when they
attempt to override. For example, user1 and user2 both belong to the local_user group. Once user1 successfully
overrides, this will generate an override entry for the local_user group instead of one specific user. This means that if
user2 logs in from another PC, they can override transparently.
Other features
Besides the scope, there are some other features in Allow users to override blocked categories.
Individual users can not be selected. You can select one or more of the user groups recognized by the FortiGate. They
can be local to the system or from a third party authentication device, such as an AD server through FSSO.
Switch duration
Administrative override sets a specified time frame that is always used for that override. The available options are:
l Predefined: the value entered is the set duration (length of time in days, hours, or minutes) that the override will be
in effect. If the duration variable is set to 15 minutes, the length of the override will always be 15 minutes. The option
will be visible in the override message page, but the setting will be grayed out.
l Ask: the user has the option to set the override duration once it is engaged. The user can set the duration in terms of
days, hours, or minutes.
This example describes how to allow users in the local_group to override the webfilter_new profile.
5. Click OK.
This option is only available in Allow users to override blocked categories is enabled. It configures the message page to
have the user choose which scope they want to use. Normally on the message page, the scope options are grayed out
and not editable. In the following example, the Scope is predefined with IP.
When the ask option is enabled (through the Switch applies to field in the GUI), the Scope dropdown is editable. Users
can choose one of the following:
l User
l User group
l IP
User and User Group are only available when there is a user group in the firewall policy. You
must specify a user group as a source in the firewall policy so the scope includes User and
User Group; otherwise, only the IP option will be available.
Virtual Private Network (VPN) technology lets remote users connect to private computer networks to gain access to their
resources in a secure way. For example, an employee traveling or working at home can use a VPN to securely access
the office network through the Internet.
Instead of remotely logging into a private network using an unencrypted and unsecured Internet connection, using a
VPN ensures that unauthorized parties cannot access the office network and cannot intercept information going
between the employee and the office. Another common use of a VPN is to connect the private networks of multiple
offices.
Fortinet offers VPN capabilities in the FortiGate Unified Threat Management (UTM) appliance and in the FortiClient
Endpoint Security suite of applications. You can install a FortiGate unit on a private network and install FortiClient
software on the user’s computer. You can also use a FortiGate unit to connect to the private network instead of using
FortiClient software.
The following sections provide information about VPN:
l IPsec VPNs on page 1252
l SSL VPN on page 1541
IPsec VPNs
The following sections provide instructions on configuring IPsec VPN connections in FortiOS 7.0.7.
l General IPsec VPN configuration on page 1252
l Site-to-site VPN on page 1282
l Remote access on page 1335
l Aggregate and redundant VPN on page 1379
l Overlay Controller VPN (OCVPN) on page 1423
l ADVPN on page 1454
l Other VPN topics on page 1488
l VPN IPsec troubleshooting on page 1533
Network topologies
The topology of your network will determine how remote peers and clients connect to the VPN and how VPN traffic is
routed.
Topology Description
Site-to-Site Standard one-to-one VPN between two FortiGates. See Site-to-site VPN on page
1282.
Hub and spoke/ADVPN One central FortiGate (hub) has multiple VPNs to other remote FortiGates
(spokes). In ADVPN, shortcuts can be created between spokes for direct
communication. See ADVPN on page 1454.
OCVPN Fortinet's cloud based solution for automating VPN setup between devices
registered to the same account. See Overlay Controller VPN (OCVPN) on page
1423.
FortiClient dialup Typically remote FortiClient dialup clients use dynamic IP addresses through NAT
devices. The FortiGate acts as a dialup server allowing dialup VPN connections
from multiple sources. See FortiClient as dialup client on page 1342.
FortiGate dialup Similar to site-to-site except one end is a dialup server and the other end is a
dialup client. This facilitates scenarios in which the remote dialup end has a
dynamic address, or does not have a public IP, possibly because it is behind NAT.
See FortiGate as dialup client on page 1336.
Aggregate VPN Natively support aggregating multiple VPN tunnels to increase performance and
provide redundancy over multiple links. See Packet distribution and redundancy
for aggregate IPsec tunnels on page 1396.
Redundant VPN Options for supporting redundant and partially redundant IPsec VPNs, using
route-based approaches. See Redundant hub and spoke VPN on page 1417.
L2TP over IPsec Configure VPN for Microsoft Windows dialup clients using the built in L2TP
software. Users do not have to install any Fortinet software. See L2TP over IPsec
on page 1360.
GRE over IPsec Legacy support for routers requiring point-to-point GRE over IPsec for tunneling.
See GRE over IPsec on page 1298.
Phase 1 configuration
Phase 1 configuration primarily defines the parameters used in IKE (Internet Key Exchange) negotiation between the
ends of the IPsec tunnel. The local end is the FortiGate interface that initiates the IKE negotiations. The remote end is
the remote gateway that responds and exchanges messages with the initiator. Hence, they are sometimes referred to as
the initiator and responder. The purpose of phase 1 is to secure a tunnel with one bi-directional IKE SA (security
association) for negotiating IKE phase 2 parameters.
The auto-negotiate and negotiation-timeout commands control how the IKE negotiation is processed when
there is no traffic, and the length of time that the FortiGate waits for negotiations to occur.
IPsec tunnels can be configured in the GUI using the VPN Creation Wizard. Go to VPN > IPsec Wizard. The wizard
includes several templates (site-to-site, hub and spoke, remote access), but a custom tunnel can be configured with the
following settings:
Network
IP Address The IP address of the remote peer. This option is only available when the
Remote Gateway is Static IP Address.
Dynamic DNS The domain name of the remote peer. This option is only available when the
Remote Gateway is Dynamic DNS.
Interface The interface through which remote peers or dialup clients connect to the
FortiGate. This option is only available in NAT mode.
By default, the local VPN gateway IP address is the IP address of the
interface that was selected (Primary IP in the Local Gateway field).
Local Gateway IP address for the local end of the VPN tunnel (Primary IP is used by default):
l Secondary IP: secondary address of the interface selected in the
Interface field.
l Specify: manually enter an address.
Mode Config This option is only available when the Remote Gateway is Dialup User.
Configure the client IP address range, subnet mask/prefix length,
DNS server, and split tunnel capability to automate remote client addressing.
NAT Traversal This option is only available when the Remote Gateway is Static IP Address
or Dynamic DNS.
ESP (encapsulating security payload), the protocol for encrypting data in the
VPN session, uses IP protocol 50 by default. However, it does not use any
port numbers so when traversing a NAT device, the packets cannot be
demultiplexed. Enabling NAT traversal encapsulates the ESP packet inside a
UDP packet, thereby adding a unique source port to the packet. This allows
the NAT device to map the packets to the correct session.
l Enable: a NAT device exists between the local FortiGate and the VPN
Dead Peer Reestablishes VPN tunnels on idle connections and cleans up dead IKE
Detection peers if required. This feature minimizes the traffic required to check if a VPN
peer is available or unavailable (dead). The available options are:
l Disable: disable dead peer detection (DPD).
triggers DPD when IPsec outbound packets are sent, but no reply is
received from the peer. When there is no traffic and the last DPD-ACK
has been received, IKE will not send DPDs periodically.
Notifications are received whenever a tunnel goes up or down, or to keep the
tunnel connection open when no traffic is being generated inside the tunnel.
For example, in scenarios where a dialup client or dynamic DNS peer
connects from an IP address that changes periodically, traffic may be
suspended while the IP address changes.
When Dead Peer Detection is selected, optionally specify a retry count and a
retry interval using dpd-retrycount and dpd-retryinterval. See
Dead peer detection on page 1260.
Forward Error Enable on both ends of the tunnel to correct errors in data transmission by
Correction sending redundant data across the VPN.
Device creation Advanced option. When enabled, a dynamic interface (network device) is
created for each dialup tunnel.
Aggregate member Advanced option. When enabled, the tunnel can be used as an aggregate
member candidate.
Authentication
Pre-shared Key The pre-shared key that the FortiGate will use to authenticate itself to the
remote peer or dialup client during phase 1 negotiations. The same key must
be defined at the remote peer or client. See Pre-shared key.
Certificate Name The server certificate that the FortiGate will use to authenticate itself to the
remote peer or dialup client during phase 1 negotiations. See Digital
certificates.
Mode This option is only available when IKEv1 is selected. The two available
options are:
l Aggressive: the phase 1 parameters are exchanged in a single message
Peer Options Options to authenticate VPN peers or clients depending on the Remote
Gateway and Authentication Method settings.
Any peer ID Accepts the local ID of any remote VPN peer or client. The FortiGate does
not check identifiers (local IDs). Mode can be set to Aggressive or Main.
This option can be used with digital certificate authentication, but for higher
security, use Peer certificate.
Specific peer ID This option is only available when Aggressive Mode is enabled. Enter the
identifier that is used to authenticate the remote peer. The identifier must
match the local ID configured by the remote peer’s administrator.
If the remote peer is a FortiGate, the identifier is specified in the Local ID field
of the Phase 1 Proposal settings.
If the remote peer is a FortiClient user, the identifier is specified in the Local
ID field.
In circumstances where multiple remote dialup VPN tunnels exist, each
tunnel must have a peer ID set.
Peer certificate Define the CA certificate used to authenticate the remote peer when the
authentication mode is Signature.
If the FortiGate will act as a VPN client, and you are using security certificates
for authentication, set the Local ID to the distinguished name (DN) of the
local server certificate that the FortiGate unit will use for authentication
purposes.
Peer ID from dialup Authenticate multiple FortiGate or FortiClient dialup clients that use unique
group identifiers and unique pre-shared keys (or unique pre-shared keys only)
through the same VPN tunnel.
You must create a dialup user group for authentication purposes. Select the
group from the list next to the Peer ID from dialup group option.
You must set Mode to Aggressive when the dialup clients use unique
identifiers and unique pre-shared keys. If the dialup clients use unique pre-
shared keys only, you can set Mode to Main if there is only one dialup Phase
1 configuration for this interface IP address.
Phase 1 Proposal The encryption and authentication algorithms used to generate keys for the
IKE SA.
There must be a minimum of one combination. The remote peer or client
must be configured to use at least one of the proposals that you define.
56-bit key.
l 3DES: triple-DES; plain text is encrypted three times by three keys.
and a symmetric cipher. Only available for IKEv2. See also HMAC
settings.
Authentication The following message digests that check the message authenticity during
an encrypted session are available:
l MD5: message digest 5.
Key Lifetime The time (in seconds) that must pass before the IKE encryption key expires.
When the key expires, a new key is generated without interrupting service.
The keylife can be from 120 to 172 800 seconds.
Local ID Optional setting. This value must match the peer ID value given for the
remote VPN peer’s Peer Options.
l If the FortiGate will act as a VPN client and you are using peer IDs for
XAUTH This option supports the authentication of dialup clients. It is only available for
IKE version 1.
l Disable: do not use XAuth.
Additional CLI configurations
VXLAN over IPsec Packets with a VXLAN header are encapsulated within IPsec tunnel mode.
IPsec tunnel idle timer Define an idle timer for IPsec tunnels. When no traffic has passed through the
tunnel for the configured idle-timeout value, the IPsec tunnel will be flushed.
Monitor tunnel for failover Monitor a site-to-site tunnel to guarantee operational continuity if the primary
tunnel fails. Configure the secondary phase 1 interface to monitor the primary
interface.
Passive mode Passive mode turns one side of the tunnel to be a responder only. It does not
initiate VPN tunnels either by auto-negotiation, rekey, or traffic initiated behind the
FortiGate.
Network ID The network ID is a Fortinet-proprietary attribute that is used to select the correct
phase 1 between IPsec peers, so that multiple IKEv2 tunnels can be established
between the same local/remote gateway pairs.
By default, dead peer detection (DPD) sends probe messages every five seconds. If you are experiencing high network
traffic, you can experiment with increasing the ping interval. However, longer intervals will require more traffic to detect
dead peers, which will result in more traffic.
In a dynamic (dialup) connection, the On Idle option encourages dialup server configurations
to more proactively delete tunnels if the peer is unavailable.
In the GUI, the dead peer detection option can be configured when defining phase 1 options. The following CLI
commands support additional options for specifying a retry count and a retry interval.
For example, enter the following to configure DPD on the existing IPsec phase 1 configuration to use 15-second intervals
and to wait for three missed attempts before declaring the peer dead and taking action.
To configure DPD:
DPD scalability
On a dialup server, if many VPN connections are idle, the increased DPD exchange could negatively impact the
performance/load of the daemon. The on-demand option in the CLI triggers DPD when IPsec traffic is sent, but no reply
HMAC settings
The FortiGate uses the HMAC based on the authentication proposal that is chosen in phase 1 or phase 2 of the IPsec
configuration. Each proposal consists of the encryption-hash pair (such as 3des-sha256). The FortiGate matches the
most secure proposal to negotiate with the peer.
vd: root/0
name: MPLS
version: 1
interface: port1 3
addr: 192.168.2.5:500 -> 10.10.10.1:500
virtual-interface-addr: 172.31.0.2 -> 172.31.0.1
created: 1015820s ago
IKE SA: created 1/13 established 1/13 time 10/1626/21010 ms
IPsec SA: created 1/24 established 1/24 time 0/11/30 ms
If you create a route-based VPN, you have the option of selecting IKE version 2. Otherwise, IKE version 1 is used.
IKEv2, defined in RFC 4306, simplifies the negotiation process that creates the security association (SA).
If you select IKEv2:
l There is no choice in phase 1 of aggressive or main mode.
l Extended authentication (XAUTH) is not available.
l You can utilize EAP and MOBIKE.
This feature provides the option to control whether a device requires its peer to re-authenticate or whether re-key is
sufficient. It does not influence the re-authentication or re-key behavior of the device itself, which is controlled by the peer
(the default being to re-key). This solution is in response to RFC 4478. As described by the IETF, "the purpose of this is
to limit the time that security associations (SAs) can be used by a third party who has gained control of the IPsec peer".
To configure IKE SA re-authentication:
There is support for IKEv2 quick crash detection (QCD) as described in RFC 6290.
RFC 6290 describes a method in which an IKE peer can quickly detect that the gateway peer it has and established an
IKE session with has rebooted, crashed, or otherwise lost IKE state. When the gateway receives IKE messages or ESP
packets with unknown IKE or IPsec SPIs, the IKEv2 protocol allows the gateway to send the peer an unprotected IKE
message containing INVALID_IKE_SPI or INVALID_SPI notification payloads.
RFC 6290 introduces the concept of a QCD token, which is generated from the IKE SPIs and a private QCD secret, and
exchanged between peers during the protected IKE AUTH exchange.
To configure QCD:
Based on the IKEv2 QCD feature previously described, IKEv1 QCD is implemented using a new IKE vendor ID (Fortinet
Quick Crash Detection) so both endpoints must be FortiGates. The QCD token is sent in the phase 1 exchange and must
be encrypted, so this is only implemented for IKEv1 in main mode (aggressive mode is not supported as there is no
available AUTH message to include the token). Otherwise, the feature works the same as in IKEv2 (RFC 6290).
IKEv1 fragmentation
UDP fragmentation can cause issues in IPsec when either the ISP or perimeter firewall(s) cannot pass or fragment the
oversized UDP packets that occur when using a very large public security key (PSK). The result is that IPsec tunnels do
not come up. The solution is IKE fragmentation.
For most configurations, enabling IKE fragmentation allows connections to automatically establish when they otherwise
might have failed due to intermediate nodes dropping IKE messages containing large certificates, which typically push
the packet size over 1500 bytes.
FortiOS will fragment a packet on sending if only all the following are true:
l Phase 1 contains set fragmentation enable.
l The packet is larger than the minimum MTU (576 for IPv4, 1280 for IPv6).
l The packet is being re-transmitted.
By default, IKE fragmentation is enabled.
next
end
IKEv2 fragmentation
RFC 7383 requires each fragment to be individually encrypted and authenticated. With IKEv2, a copy of the unencrypted
payloads around for each outgoing packet would need to be kept in case the original single packet was never answered
and would retry with fragments. With the following implementation, if the IKE payloads are greater than a configured
threshold, the IKE packets are preemptively fragmented and encrypted.
When trying to establish thousands of tunnels simultaneously, a situation can arise where new negotiations starve other
SAs from progressing to an established state in IKEv2. The IKE daemon can prioritize established SAs, offload groups
20 and 21 to CP9, and optimize the default embryonic limits for mid- and high-end platforms. The IKE embryonic limit
can be configured in the CLI.
config system ike
set embryonic-limit <integer>
end
embryonic-limit <integer> Set the maximum number of IPsec tunnels to negotiate simultaneously (50 -
20000, default = 1000).
A FortiGate can authenticate itself to remote peers or dialup clients using either a pre-shared key or a digital certificate.
Pre-shared key
Using a pre-shared key is less secure than using certificates, especially if it is used alone, without requiring peer IDs or
extended authentication (XAuth). There also needs to be a secure way to distribute the pre-shared key to the peers.
If you use pre-shared key authentication alone, all remote peers and dialup clients must be configured with the same
pre-shared key. Optionally, you can configure remote peers and dialup clients with unique pre-shared keys. On the
FortiGate, these are configured in user accounts, not in the phase 1 settings.
The pre-shared key must contain at least six printable characters and should be known by network administrators. For
optimum protection against currently known attacks, the key must consist of a minimum of 16 randomly chosen
alphanumeric characters. The limit is 128 characters.
If you authenticate the FortiGate using a pre-shared key, you can require remote peers or dialup clients to authenticate
using peer IDs, but not client certificates.
1. Go to VPN > IPsec Tunnels and create a new tunnel, or edit an existing one.
2. Configure or edit the Network section as needed.
3. Configure or edit the Authentication settings as follows:
IKE Version 1 or 2
Peer Options Select an Accept Type and the corresponding peer. Options vary based on the
Remote Gateway and Authentication Method settings in the Network section.
Peer Options are only available in Aggressive mode.
4. For the Phase 1 Proposal section, keep the default settings unless changes are needed to meet your requirements.
5. Optionally, for authentication parameters for a dialup user group, define XAUTH parameters.
6. Click OK.
Digital certificates
To authenticate the FortiGate using digital certificates, you must have the required certificates installed on the remote
peer and on the FortiGate. The signed server certificate on one peer is validated by the presence of the root certificate
installed on the other peer. If you use certificates to authenticate the FortiGate, you can also require the remote peers or
dialup clients to authenticate using certificates. See Site-to-site VPN with digital certificate on page 1287 for a detailed
example.
1. Go to VPN > IPsec Tunnels and create a new tunnel, or edit an existing one.
2. Configure or edit the Network section as needed.
3. Configure or edit the Authentication settings as follows:
Method Signature
Certificate Name Select the certificate used to identify this FortiGate. If there are no imported
certificates, use Fortinet_Factory.
IKE Version 1 or 2
Peer Options For Accept Type, select Peer certificate and select the peer and the CA
certificate used to authenticate the peer. If the other end is using the Fortinet_
Factory certificate, then use the Fortinet_CA certificate here.
4. For the Phase 1 Proposal section, keep the default settings unless changes are needed to meet your requirements.
5. Optionally, for authentication parameters for a dialup user group, define XAUTH parameters.
6. Click OK.
Extended authentication (XAuth) increases security by requiring remote dialup client users to authenticate in a separate
exchange at the end of phase 1. XAuth draws on existing FortiGate user group definitions and uses established
authentication mechanisms such as PAP, CHAP, RADIUS, and LDAP to authenticate dialup clients. You can configure a
FortiGate to function either as an XAuth server or client. If the server or client is attempting a connection using XAuth and
the other end is not using XAuth, the failed connection attempts that are logged will not specify XAuth as the reason.
XAuth server
A FortiGate can act as an XAuth server for dialup clients. When the phase 1 negotiation completes, the FortiGate
challenges the user for a user name and password. It then forwards the user’s credentials to an external RADIUS or
LDAP server for verification.
If the user records on the RADIUS server have suitably configured Framed-IP-Address fields, you can assign client
virtual IP addresses by XAuth instead of from a DHCP address range.
The authentication protocol you use for XAuth depends on the capabilities of the authentication server and the XAuth
client:
l Select PAP Server whenever possible.
l You must select PAP Server for all implementations of LDAP and some implementations of Microsoft RADIUS.
l Select Auto Server when the authentication server supports CHAP Server but the XAuth client does not. The
FortiGate will use PAP to communicate with the XAuth client and CHAP to communicate with the authentication
server. You can also use Auto Server to allow multiple source interfaces to be defined in an IPsec/IKE policy.
Before you begin, create user accounts and user groups to identify the dialup clients that need to access the network
behind the FortiGate dialup server. If password protection will be provided through an external RADIUS or LDAP server,
you must configure the FortiGate dialup server to forward authentication requests to the authentication server.
1. On the FortiGate dialup server, go to VPN > IPsec Tunnels and create a new tunnel, or edit an existing one.
2. Configure or edit the Network, Authentication, and Phase 1 Proposal sections as needed.
3. In the XAUTH section, select the encryption method Type to use between the XAuth client, the FortiGate, and the
authentication server.
4. For User Group:
a. Click Inherit from policy for multiple user groups defined in the IPsec/IKE policy, or
b. Click Choose and in the dropdown, select the user group that needs to access the private network behind the
FortiGate.
5. Click OK.
6. Create as many policies as needed, specifying the source user(s) and destination address.
XAuth client
If the FortiGate acts as a dialup client, the remote peer, acting as an XAuth server, might require a username and
password. You can configure the FortiGate as an XAuth client with its own username and password, which it provides
when challenged.
1. On the FortiGate dialup client, go to VPN > IPsec Tunnels and create a new tunnel, or edit an existing one.
2. Configure or edit the Network, Authentication, and Phase 1 Proposal sections as needed.
3. In the XAUTH section, for Type, select Client.
4. For Username, enter the FortiGate PAP, CHAP, RADIUS, or LDAP user name that the FortiGate XAuth server will
compare to its records when the FortiGate XAuth client attempts to connect.
5. Enter the Password for the user name.
6. Click OK.
You can add a route to a peer destination selector by using the add-route option, which is available for all dynamic
IPsec phases 1 and 2, for both policy-based and route-based IPsec VPNs.
The add-route option adds a route to the FortiGate routing information base when the dynamic tunnel is negotiated.
You can use the distance and priority options to set the distance and priority of this route. If this results in a route with the
lowest distance, it is added to the FortiGate forwarding information base.
You can also enable add-route in any policy-based or route-based phase 2 configuration that is associated with a
dynamic (dialup) phase 1. In phase 2, add-route can be enabled, disabled, or set to use the same route as phase 1.
The add-route option is enabled by default.
next
end
For interface-based IPsec, IPsec SA negotiation blocking can only be removed if the peer offers a wildcard selector. If a
wildcard selector is offered, then the wildcard route will be added to the routing table with the distance/priority value
configured in phase 1. If that is the route with the lowest distance, it will be installed into the forwarding information base.
In this scenario, it is important to ensure that the distance value configured for phase 1 is set appropriately.
Phase 2 configuration
After phase 1 negotiations end successfully, phase 2 begins. In Phase 2, the VPN peer or client and the FortiGate
exchange keys again to establish a secure communication channel. The phase 2 proposal parameters select the
encryption and authentication algorithms needed to generate keys for protecting the implementation details of security
associations (SAs). The keys are generated automatically using a Diffie-Hellman algorithm.
The basic phase 2 settings associate IPsec phase 2 parameters with the phase 1 configuration that specifies the remote
end point of the VPN tunnel. In most cases, you need to configure only basic Phase 2 settings.
Some settings can be configured in the CLI. The following options are available in the VPN Creation Wizard after the
tunnel is created:
New Phase 2
Local Address A value of 0.0.0.0/0 means all IP addresses behind the local VPN peer.
Add a specific address or range to allow traffic from and to only this local
address.
See Quick mode selectors on page 1269.
Remote Address Enter the destination IP address that corresponds to the recipients or network
behind the remote VPN peer. A value of 0.0.0.0/0 means all IP addresses
behind the remote VPN peer.
See Quick mode selectors on page 1269.
Advanced Select the encryption and authentication algorithms that will be proposed to
the remote VPN peer. To establish a VPN connection, at least one of the
proposals specified must match the configuration on the remote peer.
56-bit key.
l 3DES: triple-DES; plain text is encrypted three times by three keys.
Authentication The following message digests that check the message authenticity during an
encrypted session are available:
l NULL: do not use a message digest.
Enable Replay Replay attacks occur when an unauthorized party intercepts a series of IPsec
Detection packets and replays them back into the tunnel.
Replay detection allows the FortiGate to check all IPsec packets to see if they
have been received before. If any encrypted packets arrive out of order, the
FortiGate discards them.
Note that 64-bit extended sequence numbers (as described in RFC 4303,
RFC 4304 as an addition to IKEv1, and RFC 5996 for IKEv2) are supported
for IPsec when replay detection is enabled.
Enable Perfect Perfect forward secrecy (PFS) improves security by forcing a new
Forward Secrecy Diffie-Hellman exchange whenever keylife expires.
(PFS)
Local Port Enter the port number that the local VPN peer uses to transport traffic related
to the specified service (protocol number). The range is from 0 to 65535. To
specify all ports, select All, or enter 0.
Remote Port Enter the port number that the remote VPN peer uses to transport traffic
related to the specified service (protocol number). To specify all ports, select
All, or enter 0.
Protocol Enter the IP protocol number of the service. To specify all services, select All,
or enter 0.
Auto-negotiate Select this option for the tunnel to be automatically renegotiated when the it
expires. See Auto-negotiate on page 1270.
Autokey Keep Select this option for the tunnel to remain active when no data is being
Alive processed.
Key Lifetime Select the method for determining when the phase 2 key expires:
l Seconds
l Kilobytes
l Both
Enter a corresponding value for Seconds and/or Kilobytes in the text boxes.
If Both is selected, the key expires when either the time has passed or the
number of kilobytes have been processed.
Quick mode selectors determine which IP addresses can perform IKE negotiations to establish a tunnel. By only allowing
authorized IP addresses access to the VPN tunnel, the network is more secure.
The default settings are as broad as possible: any IP address or configured address object using any protocol on any
port.
While the dropdown menus for specifying an address also show address groups, the use of
address groups may not be supported on a remote endpoint device that is not a FortiGate.
When configuring a quick mode selector for Local Address and Remote Address, valid options include IPv4 and IPv6
single addresses, subnets, or ranges.
There are some configurations that require specific selectors:
l The VPN peer is a third-party device that uses specific phase2 selectors.
l The FortiGate connects as a dialup client to another FortiGate, in which case (usually) you must specify a local IP
address, IP address range, or subnet. However, this is not required if you are using dynamic routing and mode-cfg.
With FortiOS VPNs, your network has multiple layers of security, with quick mode selectors being an important line of
defense:
l Routes guide traffic from one IP address to another.
l Phase 1 and phase 2 connection settings ensure there is a valid remote end point for the VPN tunnel that agrees on
the encryption and parameters.
l Quick mode selectors allow IKE negotiations only for allowed peers.
l Security policies control which IP addresses can connect to the VPN.
l Security policies also control what protocols are allowed over the VPN along with any bandwidth limiting.
If you are editing an existing phase 2 configuration, the local address and remote address fields are unavailable if the
tunnel has been configured to use firewall addresses as selectors. This option exists only in the CLI.
Consider using the add-route option to add a route to a peer destination selector in phase 2 to automatically match the
settings in phase 1.
To configure add-route:
Auto-negotiate
By default, the phase 2 security association (SA) is not negotiated until a peer attempts to send data. The triggering
packet and some subsequent packets are dropped until the SA is established. Applications normally resend this data, so
there is no loss, but there might be a noticeable delay in response to the user.
If the tunnel goes down, the auto-negotiate feature (when enabled) attempts to re-establish the tunnel. Auto-negotiate
initiates the phase 2 SA negotiation automatically, repeating every five seconds until the SA is established.
Automatically establishing the SA can be important for a dialup peer. It ensures that the VPN tunnel is available for peers
at the server end to initiate traffic to the dialup peer. Otherwise, the VPN tunnel does not exist until the dialup peer
initiates traffic.
To configure auto-negotiate:
The IPsec SA connect message generated is used to install dynamic selectors. These selectors can be installed via the
auto-negotiate mechanism. When phase 2 has auto-negotiate enabled, and phase 1 has mesh-selector-type
set to subnet, a new dynamic selector will be installed for each combination of source and destination subnets. Each
dynamic selector will inherit the auto-negotiate option from the template selector and begin SA negotiation. Phase 2
selector sources from dialup clients will all establish SAs without traffic being initiated from the client subnets to the hub.
DHCP
The dhcp-ipsec option lets the FortiGate assign VIP addresses to FortiClient dialup clients through a DHCP server or
relay. This option is only available if the remote gateway in the phase 1 configuration is set to dialup user, and it only
works in policy-based VPNs.
With dhcp-ipsec, the FortiGate dialup server acts as a proxy for FortiClient dialup clients that have VIP addresses on
the subnet of the private network behind the FortiGate. In this case, the FortiGate dialup server acts as a proxy on the
local private network for the FortiClient dialup client. A host on the network behind the dialup server issues an ARP
request, corresponding to the device MAC address of the FortiClient host (when a remote server sends an ARP to the
local FortiClient dialup client). The FortiGate then answers the ARP request on behalf of the FortiClient host, and then
forwards the associated traffic to the FortiClient host through the tunnel.
Acting as a proxy prevents the VIP address assigned to the FortiClient dialup client from causing possible ARP
broadcast problems—the normal and VIP addresses can confuse some network switches when two addresses have the
same MAC address.
In IKEv2 to support RFC 7634, the ChaCha20 and Poly1305 crypto algorithms can be used together as a combined
mode AEAD cipher (like AES-GCM) in the crypto_ftnt cipher in cipher_chacha20poly1305.c:
config vpn ipsec phase2-interface
edit <name>
set phase1name <name>
set proposal chacha20poly1305
next
end
In IKEv2 to support RFC 5282, the AEAD algorithm AES-GCM supports 128- and 256-bit variants:
config vpn ipsec phase2-interface
edit <name>
set phase1name <name>
set proposal [aes128gcm | aes256gcm]
next
end
This section explains how to specify the source and destination IP addresses of traffic transmitted through an IPsec
VPN, and how to define appropriate security policies.
Topology
In a gateway-to-gateway, hub-and-spoke, dynamic DNS, redundant tunnel, or transparent configuration, you need to
define a policy address for the private IP address of the network behind the remote VPN peer (for example,
192.168.10.0/255.255.255.0 or 192.168.10.0/24).
In a peer-to-peer configuration, you need to define a policy address for the private IP address of a server or host behind
the remote VPN peer (for example, 172.16.5.1/255.255.255.255, 172.16.5.1/32, or 172.16.5.1).
For a FortiGate dialup server in a dialup-client or internet-browsing configuration, the source IP should reflect the IP
addresses of the dialup clients:
l A policy-based VPN requires an IPsec policy. You specify the interface to the private network, the interface to the
remote peer and the VPN tunnel. A single policy can enable traffic inbound, outbound, or in both directions.
l A route-based VPN requires an accept policy for each direction. For the source and destination interfaces, you
specify the interface to the private network and the virtual IPsec interface (phase 1 configuration) of the VPN. The
IPsec interface is the destination interface for the outbound policy and the source interface for the inbound policy.
One security policy must be configured for each direction of each VPN interface.
If the policy that grants the VPN connection is limited to certain services, DHCP must be
included, otherwise the client will not be able to retrieve a lease from the FortiGate’s (IPsec)
DHCP server because the DHCP request (coming out of the tunnel) will be blocked.
Policy-based VPN
An IPsec policy enables the transmission and reception of encrypted packets, specifies the permitted direction of VPN
traffic, and selects the VPN tunnel. In most cases, a single policy is needed to control both inbound and outbound IP
traffic through a VPN tunnel. For a detailed example, see Policy-based IPsec tunnel on page 1303. Be aware of the
following before creating an IPsec policy.
Policies specify which IP addresses can initiate a tunnel. By default, traffic from the local private network initiates the
tunnel. When the Allow traffic to be initiated form the remote site option is selected, traffic from a dialup client, or a
computer on a remote network, initiates the tunnel. Both can be enabled at the same time for bi-directional initiation of
the tunnel.
When a FortiGate operates in NAT mode, you can enable inbound or outbound NAT. Outbound NAT may be performed
on outbound encrypted packets or IP packets in order to change their source address before they are sent through the
tunnel. Inbound NAT is performed to intercept and decrypt emerging IP packets from the tunnel.
By default, these options are not selected in security policies and can only be set through the CLI.
You must define at least one IPsec policy for each VPN tunnel. If the same remote server or client requires access to
more than one network behind a local FortiGate, the FortiGate must be configured with an IPsec policy for each network.
Multiple policies may be required to configure redundant connections to a remote destination or control access to
different services at different times.
To ensure a secure connection, the FortiGate must evaluate policies with Action set to IPsec before ACCEPT and
DENY. Because the FortiGate unit reads policies starting at the top of the list, you must move all IPsec policies to the top
of the list, and be sure to reorder your multiple IPsec policies that apply to the tunnel so that specific constraints can be
evaluated before general constraints. If you create two equivalent IPsec policies for two different tunnels, the system will
select the correct policy based on the specified source and destination addresses.
Adding multiple IPsec policies for the same VPN tunnel can cause conflicts if the policies
specify similar source and destination addresses, but have different settings for the same
service. When policies overlap in this manner, the system may apply the wrong IPsec policy or
the tunnel may fail.
Route-based VPN
When you define a route-based VPN, you create a virtual IPsec interface on the physical interface that connects to the
remote peer. You create ordinary accept policies to enable traffic between the IPsec interface and the interface that
connects to the private network. This makes configuration simpler than for policy-based VPNs.
Incoming Interface Select the interface that connects to the private network behind this FortiGate.
Source Select the address name you defined for the private network behind this
FortiGate.
Destination Select the address name you defined for the private network behind the
remote peer.
3. Click OK.
To permit the remote client to initiate communication, you need to define a security policy for communication in that
direction.
4. Click Create New and enter these settings in particular:
Outgoing Interface Select the interface that connects to the private network behind this FortiGate.
Source Select the address name you defined for the private network behind the
remote peer.
Destination Select the address name you defined for the private network behind this
FortiGate.
5. Click OK.
Blocking unwanted IKE negotiations and ESP packets with a local-in policy
It is not unusual to receive IPsec connection attempts or malicious IKE packets from all over the internet. Malicious
parties use these probes to try to establish an IPsec tunnel in order to gain access to your private network. A good way to
prevent this is to use local-in policies to deny such traffic.
Sometimes there are malicious attempts using crafted invalid ESP packets. These invalid attempts are automatically
blocked by the FOS IPsec local-in handler when it checks the SPI value against the SAs of existing tunnels. The IPsec
local-in handler processes the packet instead of the firewall's local-in handler. So when these attempts are blocked, you
will notice an unknown SPI message in your VPN logs instead of being silently blocked by your local-in policy. These
log messages are rate limited.
Note that invalid SPIs may not always indicate malicious activity. For example, the SPI may not match during rekey, or
when one unit flushes its tunnel SAs. Administrators should collect as much information as possible before making a
conclusion.
To block undesirable IPsec connection attempts and IKE packets using a local-in policy:
2. Create a local-in policy that blocks IKE traffic from the address group:
config firewall local-in-policy
edit 1
set intf "wan1"
set srcaddr "All_exceptions"
set dstaddr "all"
set service "IKE"
set schedule "always"
next
end
Some ISPs block UDP port 500 or UDP port 4500, preventing an IPsec VPN from being negotiated and established. To
accommodate this, the IKE port can be changed.
ike-port UDP port for IKE/IPsec traffic (1024 - 65535, default = 500).
In this example, the IKE port is set to 6000 on the two site-to-site VPN gateways. There is no NAT between the VPN
gateways, but the ISP has blocked UDP port 500. A site-to-site VPN is established using the defined IKE port.
2. Check the IKE gateway list and confirm that the specified port is used:
# diagnose vpn ike gateway list
vd: root/0
name: s2s
version: 2
interface: port27 17
addr: 173.1.1.1:6000 -> 11.101.1.1:6000
tun_id: 11.101.1.1
remote_location: 0.0.0.0
created: 194s ago
PPK: no
IKE SA: created 1/2 established 1/2 time 0/4500/9000 ms
IPsec SA: created 1/2 established 1/2 time 0/4500/9000 ms
...
In this example, the IKE port is set to 5000 on the VPN gateway and the dialup peer. The dialup peer is behind NAT, so
NAT traversal (NAT-T) is used. The ISP blocks both UDP port 500 and UDP port 4500. The VPN connection is initiated
on UDP port 5000 from the dialup VPN client and remains on port 5000 since NAT-T floating to 4500 is only required
when the IKE port is 500.
2. Check the IKE gateway list and confirm that the specified port is used:
# diagnose vpn ike gateway list
vd: root/0
name: server_0
version: 2
interface: port27 17
addr: 173.1.1.1:5000 -> 173.1.1.2:65416
tun_id: 173.1.1.2
remote_location: 0.0.0.0
created: 90s ago
nat: peer
PPK: no
IKE SA: created 1/1 established 1/1 time 0/0/0 ms
IPsec SA: created 1/1 established 1/1 time 0/0/0 ms
...
When a user disconnects from a VPN tunnel, it is not always desirable for the released IP address to be used
immediately. In IPsec VPN, IP addresses can held for the specified delay interval before being released back into the
pool for assignment. The first-available address assignment method is still used.
Example
In this example, two PCs connect to the VPN. The IP address reuse delay interval is used to prevent a released address
from being reused for at least four minutes. After the interval elapses, the IP address becomes available to clients again.
Dual stack address assignment (both IPv4 and IPv6) is used.
1. Configure the IPsec phase1 interface, setting the IP address reuse delay interval to 240 seconds:
config vpn ipsec phase1-interface
edit "FCT"
set type dynamic
set interface "port27"
set mode aggressive
set peertype any
set net-device disable
set mode-cfg enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set wizard-type dialup-forticlient
set xauthtype auto
set authusrgrp "local-group"
set ipv4-start-ip 10.20.1.1
set ipv4-end-ip 10.20.1.100
set dns-mode auto
set ipv4-split-include "FCT_split"
set ipv6-start-ip 2001::1
set ipv6-end-ip 2001::2
set ip-delay-interval 240
set save-password enable
set psksecret **********
next
end
1. Connect to the VPN with FortiClient 1 on PC1 then check the assigned IP address:
# diagnose vpn ike gateway list
vd: root/0
name: FCT_0
version: 1
interface: port27 17
addr: 173.1.1.1:4500 -> 173.1.1.2:60417
tun_id: 173.1.1.2
remote_location: 0.0.0.0
virtual-interface-addr: 169.254.1.1 -> 169.254.1.1
created: 14s ago
xauth-user: userc
2FA: no
FortiClient UID: 7C0897D80C8E4B6DAC775DD6B0F93BAA
assigned IPv4 address: 10.20.1.1/255.255.255.255
assigned IPv6 address: 2001::1/128
nat: peer
IKE SA: created 1/1 established 1/1 time 100/100/100 ms
IPsec SA: created 2/2 established 2/2 time 0/5/10 ms
id/spi: 2 66140ba3e38b9b07/b64668f110ca4a48
direction: responder
status: established 14-14s ago = 100ms
proposal: aes256-sha256
key: 356637ee6e9a9cb5-fade432c09efb8aa-54be307fc1eeeab5-6e4b9ef19f98d5fa
lifetime/rekey: 86400/86115
DPD sent/recv: 00000000/00000394
2. Disconnect FortiClient 1 and connect with FortiClient 2. The IP address assigned to FortiClient 1 is not released to
the pool, and a different IP address is assigned to FortiClient 2:
# diagnose vpn ike gateway list
vd: root/0
name: FCT_0
version: 1
interface: port27 17
addr: 173.1.1.1:4500 -> 173.1.1.2:64916
tun_id: 173.1.1.2
remote_location: 0.0.0.0
virtual-interface-addr: 169.254.1.1 -> 169.254.1.1
created: 6s ago
xauth-user: usera
2FA: no
FortiClient UID: EAF90E297393456AB546A041066C0720
assigned IPv4 address: 10.20.1.2/255.255.255.255
assigned IPv6 address: 2001::2/128
nat: peer
IKE SA: created 1/1 established 1/1 time 110/110/110 ms
IPsec SA: created 2/2 established 2/2 time 0/5/10 ms
id/spi: 3 b25141d5a915e67e/b32decdb8cf98318
direction: responder
status: established 6-6s ago = 110ms
proposal: aes256-sha256
key: 374ab753f3207ea0-83496b5cb24b5a8d-c51da1fd505cf3a4-727884839897808a
lifetime/rekey: 86400/86123
DPD sent/recv: 00000000/00000453
3. Wait for 240 seconds, then disconnect and reconnect FortiClient 2. The IP address previously assigned to
FortiClient 1 has been released back to the pool, and is assigned to FortiClient 2:
# diagnose vpn ike gateway list
vd: root/0
name: FCT_0
version: 1
interface: port27 17
addr: 173.1.1.1:4500 -> 173.1.1.2:64916
tun_id: 173.1.1.2
remote_location: 0.0.0.0
virtual-interface-addr: 169.254.1.1 -> 169.254.1.1
created: 20s ago
xauth-user: usera
2FA: no
FortiClient UID: EAF90E297393456AB546A041066C0720
assigned IPv4 address: 10.20.1.1/255.255.255.255
assigned IPv6 address: 2001::1/128
nat: peer
IKE SA: created 1/1 established 1/1 time 100/100/100 ms
IPsec SA: created 2/2 established 2/2 time 0/0/0 ms
id/spi: 4 fb1fbad0c12f5476/aa06a2de76964f63
direction: responder
status: established 20-20s ago = 100ms
proposal: aes256-sha256
key: af43f1bb876dc79c-16448592fe608dc3-f251746d71b2c35d-c848e8c03bf738e9
lifetime/rekey: 86400/86109
DPD sent/recv: 00000000/000000a9
Instead of waiting for 240 seconds, you can instead use the diagnose vpn ike
gateway flush command to release the previously used IP addresses back into the
pool.
Site-to-site VPN
A site-to-site VPN connection lets branch offices use the Internet to access the main office's intranet. A site-to-site VPN
allows offices in multiple, fixed locations to establish secure connections with each other over a public network such as
the Internet.
The following sections provide instructions for configuring site-to-site VPNs:
l FortiGate-to-FortiGate on page 1282
l FortiGate-to-third-party on page 1310
FortiGate-to-FortiGate
This section contains the following topics about FortiGate-to-FortiGate VPN configurations:
l Basic site-to-site VPN with pre-shared key on page 1282
l Site-to-site VPN with digital certificate on page 1287
l Site-to-site VPN with overlapping subnets on page 1294
l GRE over IPsec on page 1298
l Policy-based IPsec tunnel on page 1303
This is a sample configuration of IPsec VPN authenticating a remote FortiGate peer with a pre-shared key.
To configure IPsec VPN authenticating a remote FortiGate peer with a pre-shared key in the GUI:
To configure IPsec VPN authenticating a remote FortiGate peer with a pre-shared key using the CLI:
1. Configure the WAN interface and default route. The WAN interface is the interface connected to the ISP. The IPsec
tunnel is established over the WAN interface.
a. Configure HQ1.
config system interface
edit "port1"
set vdom "root"
set ip 172.16.200.1 255.255.255.0
next
end
config router static
edit 1
set gateway 172.16.200.3
set device "port1"
next
end
b. Configure HQ2.
config system interface
edit "port25"
set vdom "root"
set ip 172.16.202.1 255.255.255.0
next
end
config router static
edit 1
set gateway 172.16.202.2
set device "port25"
next
end
2. Configure the internal (protected subnet) interface. The internal interface connects to the corporate internal
network. Traffic from this interface routes out the IPsec VPN tunnel.
a. Configure HQ1.
config system interface
edit "dmz"
set vdom "root"
set ip 10.1.100.1 255.255.255.0
next
end
b. Configure HQ2.
config system interface
edit "port9"
set vdom "root"
set ip 172.16.101.1 255.255.255.0
next
end
b. Configure HQ2.
config vpn ipsec phase1-interface
edit "to_HQ1"
set interface "port25"
set peertype any
set net-device enable
b. Configure HQ2.
config vpn ipsec phase2-interface
edit "to_HQ2"
set phase1name "to_HQ1"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
next
end
5. Configure the static routes. Two static routes are added to reach the remote protected subnet. The blackhole route
is important to ensure that IPsec traffic does not match the default route when the IPsec tunnel is down.
a. Configure HQ1.
config router static
edit 2
set dst 172.16.101.0 255.255.255.0
set device "to_HQ2"
next
edit 3
set dst 172.16.101.0 255.255.255.0
set blackhole enable
set distance 254
next
end
b. Configure HQ2.
config router static
edit 2
set dst 10.1.100.0 255.255.255.0
set device "to_HQ1"
next
edit 3
set dst 10.1.100.0 255.255.255.0
set blackhole enable
set distance 254
next
end
6. Configure two firewall policies to allow bidirectional IPsec traffic flow over the IPsec VPN tunnel.
a. Configure HQ1.
config firewall policy
edit 1
set name "inbound"
set srcintf "to_HQ2"
set dstintf "dmz"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "outbound"
set srcintf "dmz"
set dstintf "to_HQ2"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
end
b. Configure HQ2.
config firewall policy
edit 1
set name "inbound"
set srcintf "to_HQ1"
set dstintf "port9"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "outbound"
set srcintf "port9"
set dstintf "to_HQ1"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
set schedule "always"
set service "ALL"
next
end
7. Run diagnose commands. The diagnose debug application ike -1 command is the key to troubleshoot
why the IPsec tunnel failed to establish. If the PSK failed to match, the following error shows up in the debug output:
ike 0:to_HQ2:15037: parse error
ike 0:to_HQ2:15037: probable pre-shared secret mismatch'
The following commands are useful to check IPsec phase1/phase2 interface status.
a. Run the diagnose vpn ike gateway list command on HQ1. The system should return the following:
vd: root/0
name: to_HQ2
version: 1
interface: port1 11
addr: 172.16.200.1:500 -> 172.16.202.1:500
created: 5s ago
IKE SA: created 1/1 established 1/1 time 0/0/0 ms
IPsec SA: created 2/2 established 2/2 time 0/0/0 ms
id/spi: 12 6e8d0532e7fe8d84/3694ac323138a024
direction: responder
status: established 5-5s ago = 0ms
proposal: aes128-sha256
key: b3efb46d0d385aff-7bb9ee241362ee8d
lifetime/rekey: 86400/86124
DPD sent/recv: 00000000/00000000
b. Run the diagnose vpn tunnel list command on HQ1. The system should return the following:
list all ipsec tunnel in vd 0
name=to_HQ2 ver=1 serial=1 172.16.200.1:0->172.16.202.1:0 tun_id=172.16.202.1
bound_if=11 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/528 options[0210]=create_
dev frag-rfcaccept_traffic=1
proxyid_num=1 child_num=0 refcnt=11 ilast=7 olast=87 ad=/0
stat: rxp=0 txp=0 rxb=0 txb=0
dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=0
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=to_HQ2 proto=0 sa=1 ref=2 serial=1 auto-negotiate
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
SA: ref=3 options=18227 type=00 soft=0 mtu=1438 expire=42927/0B replaywin=2048
seqno=1 esn=0 replaywin_lastseq=00000000 itn=0
life: type=01 bytes=0/0 timeout=42930/43200
dec: spi=ef9ca700 esp=aes key=16 a2c6584bf654d4f956497b3436f1cfc7
ah=sha1 key=20 82c5e734bce81e6f18418328e2a11aeb7baa021b
enc: spi=791e898e esp=aes key=16 0dbb4588ba2665c6962491e85a4a8d5a
ah=sha1 key=20 2054b318d2568a8b12119120f20ecac97ab730b3
dec:pkts/bytes=0/0, enc:pkts/bytes=0/0
This is a sample configuration of IPsec VPN authenticating a remote FortiGate peer with a certificate. The certificate on
one peer is validated by the presence of the CA certificate installed on the other peer.
To configure IPsec VPN authenticating a remote FortiGate peer with a digital certificate in the GUI:
To configure IPsec VPN authenticating a remote FortiGate peer with a digital certificate using the CLI:
1. Configure the WAN interface and default route. The WAN interface is the interface connected to the ISP. The IPsec
tunnel is established over the WAN interface.
a. Configure HQ1.
config system interface
edit "port1"
set vdom "root"
set ip 172.16.200.1 255.255.255.0
next
end
config router static
edit 1
set gateway 172.16.200.3
set device "port1"
next
end
b. Configure HQ2.
config system interface
edit "port25"
set vdom "root"
set ip 172.16.202.1 255.255.255.0
next
end
config router static
edit 1
set gateway 172.16.202.2
set device "port25"
next
end
2. Configure the internal (protected subnet) interface. The internal interface connects to the corporate internal
network. Traffic from this interface routes out the IPsec VPN tunnel.
a. Configure HQ1.
config system interface
edit "dmz"
set vdom "root"
set ip 10.1.100.1 255.255.255.0
next
end
b. Configure HQ2.
config system interface
edit "port9"
set vdom "root"
set ip 172.16.101.1 255.255.255.0
next
end
3. Configure the import certificate and its CA certificate information. The certificate and its CA certificate must be
imported on the remote peer FortiGate and on the primary FortiGate before configuring IPsec VPN tunnels. If the
built-in Fortinet_Factory certificate and the Fortinet_CA CA certificate are used for authentication, you can skip this
step.
a. Configure HQ1.
config vpn certificate local
edit "test1"
...
set range global
next
end
config vpn certificate ca
edit "CA_Cert_1"
...
set range global
next
end
b. Configure HQ2.
config vpn certificate local
edit "test2"
...
set range global
next
end
config vpn certificate ca
edit "CA_Cert_1"
...
set range global
next
end
4. Configure the peer user. The peer user is used in the IPsec VPN tunnel peer setting to authenticate the remote peer
FortiGate.
a. If not using the built-in Fortinet_Factory certificate and Fortinet_CA CA certificate, do the following:
i. Configure HQ1.
config user peer
edit "peer1"
set ca "CA_Cert_1"
next
end
b. If the built-in Fortinet_Factory certificate and Fortinet_CA CA certificate are used for authentication, the peer
user must be configured based on Fortinet_CA.
i. Configure HQ1.
config user peer
edit "peer1"
set ca "Fortinet_CA"
next
end
b. Configure HQ2.
config vpn ipsec phase1-interface
edit "to_HQ1"
set interface "port25"
set authmethod signature
set net-device enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 172.16.200.1
set certificate "test2"
set peer "peer2"
next
end
b. Configure HQ2.
config vpn ipsec phase2-interface
edit "to_HQ2"
set phase1name "to_HQ1"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
next
end
7. Configure the static routes. Two static routes are added to reach the remote protected subnet. The blackhole route
is important to ensure that IPsec traffic does not match the default route when the IPsec tunnel is down.
a. Configure HQ1.
config router static
edit 2
set dst 172.16.101.0 255.255.255.0
set device "to_HQ2"
next
edit 3
set dst 172.16.101.0 255.255.255.0
set blackhole enable
set distance 254
next
end
b. Configure HQ2.
config router static
edit 2
set dst 10.1.100.0 255.255.255.0
set device "to_HQ1"
next
edit 3
set dst 10.1.100.0 255.255.255.0
set blackhole enable
set distance 254
next
end
8. Configure two firewall policies to allow bidirectional IPsec traffic flow over the IPsec VPN tunnel.
a. Configure HQ1.
config firewall policy
edit 1
set name "inbound"
set srcintf "to_HQ2"
set dstintf "dmz"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "outbound"
set srcintf "dmz"
set dstintf "to_HQ2"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
end
b. Configure HQ2.
config firewall policy
edit 1
set name "inbound"
set srcintf "to_HQ1"
set dstintf "port9"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "outbound"
set srcintf "port9"
set dstintf "to_HQ1"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
set schedule "always"
set service "ALL"
next
end
9. Run diagnose commands. The diagnose debug application ike -1 command is the key to troubleshoot
why the IPsec tunnel failed to establish. If the remote FortiGate certificate cannot be validated, the following error
shows up in the debug output:
ike 0: to_HQ2:15314: certificate validation failed
The following commands are useful to check IPsec phase1/phase2 interface status.
a. Run the diagnose vpn ike gateway list command on HQ1. The system should return the following:
vd: root/0
name: to_HQ2
version: 1
interface: port1 11
addr: 172.16.200.1:500 -> 172.16.202.1:500
created: 7s ago
peer-id: C = CA, ST = BC, L = Burnaby, O = Fortinet, OU = QA, CN = test2
peer-id-auth: yes
IKE SA: created 1/1 established 1/1 time 70/70/70 ms
IPsec SA: created 1/1 established 1/1 time 80/80/80 ms
id/spi: 15326 295be407fbddfc13/7a5a52afa56adf14 direction: initiator status:
established 7-7s ago = 70ms proposal: aes128-sha256 key: 4aa06dbee359a4c7-
43570710864bcf7b lifetime/rekey: 86400/86092 DPD sent/recv: 00000000/00000000 peer-
id: C = CA, ST = BC, L = Burnaby, O = Fortinet, OU = QA, CN = test2
b. Run the diagnose vpn tunnel list command on HQ1. The system should return the following:
list all ipsec tunnel in vd 0
name=to_HQ2 ver=1 serial=1 172.16.200.1:0->172.16.202.1:0 tun_id=172.16.200.1
bound_if=11 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/528 options[0210]=create_
dev frag-rfcaccept_traffic=1
proxyid_num=1 child_num=0 refcnt=14 ilast=19 olast=179 ad=/0
stat: rxp=0 txp=0 rxb=0 txb=0
dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=0
This is a sample configuration of IPsec VPN to allow transparent communication between two overlapping networks that
are located behind different FortiGates using a route-based tunnel with source and destination NAT.
In the following topology, both FortiGates (HQ and Branch) use 192.168.1.0/24 as their internal network, but both
networks need to be able to communicate to each other through the IPsec tunnel.
New virtual subnets of equal size must be configured and used for all communication between the two overlapping
subnets. The devices on both local networks do not need to change their IP addresses. However, the devices and users
must use the new subnet range of the remote network to communicate across the tunnel.
5. In the Phase 2 Selectors section, enter the subnets for the Local Address (10.1.1.0/24) and Remote Address
(10.2.2.0/24).
6. Optionally, expand Advanced and enable Auto-negotiate.
7. Click OK.
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. For Name, enter HQ-original.
3. For IP/Netmask, enter the original LAN subnet of HQ (192.168.1.0/24).
4. For Interface, select the LAN-side interface (internal).
5. Click OK
6. Create another address object named Branch-new, but for IP/Netmask, enter the new LAN subnet of Branch
(10.2.2.0/24), and select the VPN interface (VPN-to-Branch).
1. Go to Policy & Objects > Virtual IPs and click Create New > Virtual IP.
2. For Name, enter HQ-new-to-original.
3. For Interface, select the VPN interface (VPN-to-Branch).
4. Enter the External IP address/range (10.1.1.1 – 10.1.1.254, the new HQ subnet) and Map to IPv4 address/range
(192.168.1.1 – 192.168.1.254, the original HQ subnet).
5. Click OK.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. For Name, enter From-HQ-to-Branch.
3. For Incoming Interface, select the LAN-side interface (internal).
4. For Outgoing Interface, select the VPN tunnel interface (VPN-to-Branch).
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. For Name, enter Branch-original.
3. For IP/Netmask, enter the original LAN subnet of Branch (192.168.1.0/24).
4. For Interface, select the LAN-side interface (lan).
5. Click OK
6. Create another address object named HQ-new, but for IP/Netmask, enter the new LAN subnet of HQ (10.1.1.0/24),
and select the VPN interface (VPN-to-HQ).
1. Go to Policy & Objects > Virtual IPs and click Create New > Virtual IP.
2. For Name, enter Branch-new-to-original.
3. For Interface, select the VPN interface (VPN-to-HQ).
4. Enter the External IP address/range (10.2.2.1 – 10.2.2.254, the new Branch subnet) and Map to IPv4
address/range (192.168.1.1 – 192.168.1.254, the original Branch subnet).
5. Click OK.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. For Name, enter From-Branch-to-HQ.
3. For Incoming Interface, select the LAN-side interface (lan).
4. For Outgoing Interface, select the VPN tunnel interface (VPN-to-HQ).
5. For Source, select Branch-original.
6. For Destination, select HQ-new.
7. For Service, select ALL.
8. Enable NAT.
9. Select Use Dynamic IP Pool and select the Branch-new IP pool.
10. Click OK.
1. Go to Dashboard > Network and click the IPsec widget to expand to full screen view. The tunnels should be up on
both FortiGates. If you did not enable Auto-negotiate in the IPsec VPN settings, you may have to select the tunnel
and click Bring Up.
2. From a PC on the HQ network, ping a PC on the Branch network using the new IP for the Branch PC. The ping
should be successful.
3. From a PC on the Branch network, ping a PC on the HQ network using the new IP for the HQ PC. The ping should
be successful.
This is an example of GRE over an IPsec tunnel using a static route over GRE tunnel and tunnel-mode in the
phase2-interface settings.
b. HQ2.
config system interface
edit "port25"
set ip 172.16.202.1 255.255.255.0
next
edit "port9"
set ip 172.16.101.1 255.255.255.0
next
end
config router static
edit 1
set gateway 172.16.202.2
set device "port25"
next
end
b. HQ2.
config vpn ipsec phase1-interface
edit "greipsec"
set interface "port25"
set peertype any
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 172.16.200.1
set psksecret sample
next
end
config vpn ipsec phase2-interface
edit "greipsec"
set phase1name "greipsec"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set protocol 47
next
end
b. HQ2.
config system interface
edit "greipsec"
set ip 10.10.10.2 255.255.255.255
set remote-ip 10.10.10.1 255.255.255.255
next
end
b. HQ2.
config system gre-tunnel
edit "gre_to_HQ1"
set interface "greipsec"
set remote-gw 10.10.10.1
set local-gw 10.10.10.2
next
end
b. HQ2.
config firewall policy
edit 1
set srcintf "port9"
set dstintf "gre_to_HQ1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set srcintf "gre_to_HQ1"
set dstintf "port9"
b. HQ2.
config router static
edit 2
set dst 10.1.100.0 255.255.255.0
set device "gre_to_HQ1"
next
end
This is an example of policy-based IPsec tunnel using site-to-site VPN between branch and HQ. HQ is the IPsec
concentrator.
Sample topology
Sample configuration
edit 1
set gateway 22.1.1.2
set device "port9"
next
end
b. For branch 2.
config system interface
edit "wan1"
set alias "primary_WAN"
set ip 13.1.1.2 255.255.255.0
next
edit "internal"
set ip 192.168.4.1 255.255.255.0
next
end
config router static
edit 1
set gateway 13.1.1.1
set device "wan1"
next
end
b. For branch 2.
config vpn ipsec phase1
edit "to_HQ"
set interface "wan1"
set peertype any
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 22.1.1.1
set psksecret sample
next
end
config vpn ipsec phase2
edit "to_HQ"
set phase1name "to_HQ"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
next
end
b. For branch 2.
config firewall policy
edit 1
set srcintf "internal"
set dstintf "wan1"
set srcaddr "192.168.4.0"
set dstaddr "all"
FortiGate-to-third-party
This section contains the following topics about FortiGate-to-third-party VPN configurations:
l IKEv2 IPsec site-to-site VPN to an AWS VPN gateway on page 1310
l IPsec VPN to Azure with virtual network gateway on page 1316
l IPsec VPN to an Azure with virtual WAN on page 1325
l IPSec VPN between a FortiGate and a Cisco ASA with multiple subnets on page 1329
l Cisco GRE-over-IPsec VPN on page 1329
This is a sample configuration of an IPsec site-to-site VPN connection between an on-premise FortiGate and an AWS
virtual private cloud (VPC).
AWS uses unique identifiers to manipulate a VPN connection's configuration. Each VPN connection is assigned an
identifier and is associated with two other identifiers: the customer gateway ID for the FortiGate and virtual private
gateway ID.
This example includes the following IDs:
l VPN connection ID: vpn-07e988ccc1d46f749
l Customer gateway ID: cgw-0440c1aebed2f418a
l Virtual private gateway ID
This example assumes that you have configured VPC-related settings in the AWS management portal as described in
Create a Secure Connection using AWS VPC.
This example includes creating and configuring two tunnels. You must configure both tunnels on your FortiGate.
A policy is established for the supported ISAKMP encryption, authentication, Diffie-Hellman (DH), lifetime, and key
parameters. These sample configurations fulfill the minimum requirements for AES128, SHA1, and DH Group 2.
Category VPN connections in the GovCloud AWS region have a minimum requirement of AES128, SHA2, and
DH Group 14. To take advantage of AES256, SHA256, or other DH groups such as 14-18, 22, 23, and 24, you must
modify these sample configuration files. Higher parameters are only available for VPNs of category "VPN", not for "VPN-
Classic".
Your FortiGate's external interface's address must be static. Your FortiGate may reside behind a device performing NAT.
To ensure NAT traversal can function, you must adjust your firewall rules to unblock UDP port 4500. If not behind NAT, it
is recommended to disable NAT traversal.
Begin configuration in the root VDOM. The interface name must be shorter than 15 characters. It is best if the name is
shorter than 12 characters. IPsec dead peer detection (DPD) causes periodic messages to be sent to ensure a security
association remains operational.
config vpn ipsec phase1-interface
edit vpn-07e988ccc1d46f749-0
set interface "wan1"
set dpd enable
set local-gw 35.170.66.108
set dhgrp 2
set proposal aes128-sha1
set keylife 28800
set remote-gw 3.214.239.164
set psksecret iCelks0UOob8z4SYMRM6zlx.rU2C3jth
set dpd-retryinterval 10
next
end
The IPsec transform set defines the encryption, authentication, and IPsec mode parameters.
config vpn ipsec phase2-interface
edit "vpn-07e988ccc1d46f749-0"
set phase1name "vpn-07e988ccc1d46f749-0"
set proposal aes128-sha1
set dhgrp 2
set pfs enable
set keylifeseconds 3600
next
end
You must configure a tunnel interface as the logical interface associated with the tunnel. All traffic routed to the tunnel
interface must be encrypted and transmitted to the VPC. Similarly, traffic from the VPC will be logically received on this
interface.
You must configure the interface's address with your FortiGate's address. If the address changes, you must recreate the
FortiGate and VPN connection with Amazon VPC.
The tcp-mss option causes the router to reduce the TCP packets' maximum segment size to prevent packet
fragmentation.
BGP is used within the tunnel to exchange prefixes between the virtual private gateway and your FortiGate. The virtual
private gateway announces the prefix according to your VPC.
The local BGP autonomous system number (ASN) (65000) is configured as part of your FortiGate. If you must change
the ASN, you must recreate the FortiGate and VPN connection with AWS.
Your FortiGate may announce a default route (0.0.0.0/0) to AWS. This is done using a prefix list and route map in
FortiOS.
config router bgp
set as 65000
config neighbor
edit 169.254.45.89
set remote-as 64512
end
end
end
config router bgp
config neighbor
edit 169.254.45.89
set capability-default-originate enable
end
end
end
config router prefix-list
edit "default_route"
config rule
edit 1
set prefix 0.0.0.0 0.0.0.0
next
end
end
end
config router route-map
edit "routemap1"
config rule
edit 1
set match-ip-address "default_route"
next
end
next
end
To advertise additional prefixes to the Amazon VPC, add these prefixes to the network statement and identify the prefix
you want to advertise. Ensure that the prefix is present in the routing table of the device with a valid next-hop. If you want
to advertise 192.168.0.0/16 to Amazon, you would do the following:
config router bgp
config network
edit 1
set prefix 192.168.0.0 255.255.0.0
next
end
Create a firewall policy permitting traffic from your local subnet to the VPC subnet, and vice-versa.
This example policy permits all traffic from the local subnet to the VPC. First, view all existing policies using the show
firewall policy command. Then, create a new firewall policy starting with the next available policy ID. In this
example, running show firewall policy displayed policies 1, 2, 3, and 4, so you would proceed to create policy 5.
config firewall policy
edit 5
set srcintf "vpn-07e988ccc1d46f749-0"
set dstintf internal
set srcaddr all
set dstaddr all
set action accept
set schedule always
set service ANY
next
end
config firewall policy
edit 5
set srcintf internal
set dstintf "vpn-07e988ccc1d46f749-0"
set srcaddr all
set dstaddr all
set action accept
set schedule always
set service ANY
next
end
A policy is established for the supported ISAKMP encryption, authentication, DH, lifetime, and key parameters. These
sample configurations fulfill the minimum requirements for AES128, SHA1, and DH Group 2. Category VPN connections
in the GovCloud AWS region have a minimum requirement of AES128, SHA2, and DH Group 14. To take advantage of
AES256, SHA256, or other DH groups such as 14-18, 22, 23, and 24, you must modify these sample configuration files.
Higher parameters are only available for VPNs of category "VPN", not for "VPN-Classic".
Your FortiGate's external interface's address must be static. Your FortiGate may reside behind a device performing NAT.
To ensure NAT traversal can function, you must adjust your firewall rules to unblock UDP port 4500. If not behind NAT, it
is recommended to disable NAT traversal.
Begin configuration in the root VDOM. The interface name must be shorter than 15 characters. It is best if the name is
shorter than 12 characters. IPsec DPD causes periodic messages to be sent to ensure a security association remains
operational.
config vpn ipsec phase1-interface
edit vpn-07e988ccc1d46f749-1
set interface "wan1"
set dpd enable
set local-gw 35.170.66.108
set dhgrp 2
set proposal aes128-sha1
set keylife 28800
set remote-gw 100.25.187.58
set psksecret IjFzyDneUtDdAT4RNmQ85apUG3y4Akre
set dpd-retryinterval 10
next
end
The IPsec transform set defines the encryption, authentication, and IPsec mode parameters.
config vpn ipsec phase2-interface
edit "vpn-07e988ccc1d46f749-1"
set phase1name "vpn-07e988ccc1d46f749-1"
set proposal aes128-sha1
set dhgrp 2
set pfs enable
set keylifeseconds 3600
next
end
You must configure a tunnel interface as the logical interface associated with the tunnel. All traffic routed to the tunnel
interface must be encrypted and transmitted to the VPC. Similarly, traffic from the VPC will be logically received on this
interface.
You must configure the interface's address with your FortiGate's address. If the address changes, you must recreate the
FortiGate and VPN connection with Amazon VPC.
The tcp-mss option causes the router to reduce the TCP packets' maximum segment size to prevent packet
fragmentation.
config system interface
edit "vpn-07e988ccc1d46f749-1"
set vdom "root"
set ip 169.254.44.162 255.255.255.255
set allowaccess ping
set type tunnel
set tcp-mss 1379
set remote-ip 169.254.44.161
set mtu 1427
set interface "wan1"
next
end
BGP is used within the tunnel to exchange prefixes between the virtual private gateway and your FortiGate. The virtual
private gateway announces the prefix according to your VPC.
The local BGP ASN (65000) is configured as part of your FortiGate. If you must change the ASN, you must recreate the
FortiGate and VPN connection with AWS.
Your FortiGate may announce a default route (0.0.0.0/0) to AWS. This is done using a prefix list and route map in
FortiOS.
config router bgp
set as 65000
config neighbor
edit 169.254.44.161
set remote-as 64512
end
config router bgp
config neighbor
edit 169.254.44.161
set capability-default-originate enable
end
end
config router prefix-list
edit "default_route"
config rule
edit 1
set prefix 0.0.0.0 0.0.0.0
next
end
end
end
config router route-map
edit "routemap1"
config rule
edit 1
set match-ip-address "default_route"
next
end
next
end
To advertise additional prefixes to the Amazon VPC, add these prefixes to the network statement and identify the prefix
you want to advertise. Ensure that the prefix is present in the routing table of the device with a valid next-hop. If you want
to advertise 192.168.0.0/16 to Amazon, you would do the following:
config router bgp
config network
edit 1
set prefix 192.168.0.0 255.255.0.0
next
end
Create a firewall policy permitting traffic from your local subnet to the VPC subnet, and vice-versa.
This example policy permits all traffic from the local subnet to the VPC. First, view all existing policies using the show
firewall policy command. Then, create a new firewall policy starting with the next available policy ID. In this
example, running show firewall policy displayed policies 1, 2, 3, 4, and 5, so you would proceed to create policy
6.
config firewall policy
edit 6
set srcintf "vpn-07e988ccc1d46f749-1"
set dstintf internal
set srcaddr all
set dstaddr all
set action accept
set schedule always
set service ANY
next
end
config firewall policy
edit 6
set srcintf internal
set dstintf "vpn-07e988ccc1d46f749-1"
set srcaddr all
set dstaddr all
set action accept
set schedule always
set service ANY
next
end
This example shows how to configure a site-to-site IPsec VPN tunnel to Microsoft Azure. It shows how to configure a
tunnel between each site, avoiding overlapping subnets, so that a secure tunnel can be established.
Prerequisites
Sample topology
Sample configuration
4. At the bottom of the Virtual network pane, click the Select a deployment model dropdown list and select Resource
Manager.
5. Click Create.
6. On the Create virtual network pane, enter you virtual network settings, and click Create.
3. Click Create Virtual network gateways and enter the settings for your virtual network gateway.
5. Click Create.
Creating the virtual network gateway might take some time. When the provisioning is done, you'll receive a
notification.
3. In the Everything pane, search for Local network gateway and then click Create local network gateway.
4. For the IP address, enter the local network gateway IP address, that is, the FortiGate's external IP address.
5. Set the remaining values for your local network gateway and click Create.
1. In the Azure portal, locate and select your virtual network gateway.
2. In the Settings pane, click Connections and then click Add.
3. Enter the settings for your connection. Ensure the Shared Key (PSK) matches the Pre-shared Key for the FortiGate
tunnel.
1. In the FortiGate, go to Monitor > IPsec Monitor and check that the tunnel is up. If the tunnel is down, right-click the
tunnel and select Bring Up.
2. In the FortiGate, go to Log & Report > Events.
a. Select an event to view more information and verify the connection.
3. In the Azure portal dashboard, click All resources and locate your virtual network gateway.
a. In your virtual network gateway pane, click Connections to see the status of each connection.
b. Click a connection to open the Essentials pane to view more information about that connection.
l If the connection is successful, the Status shows Connected.
l See the ingress and egress bytes to confirm traffic flowing through the tunnel.
This is a sample configuration of an IPsec site-to-site VPN connection between an on-premise FortiGate and an Azure
virtual network (VNet). This example uses Azure virtual WAN (vWAN) to establish the VPN connection.
1. In the Azure management portal, configure vWAN-related settings as described in Tutorial: Create a Site-to-Site
connection using Azure Virtual WAN.
If a custom BGP IP address is configured on Azure's vWAN, such as 169.254.21.6 and 169.254.21.7, you must
configure the FortiGate remote-IP to the corresponding Custom BGP IP Address value. If a custom BGP IP
address is not configured, FortiGate remote-IPs should point to the Default BGP IP Address value.
2. Download the VPN configuration. The following shows an example VPN configuration:
[
{
"configurationVersion":{"LastUpdatedTime":"2019-07-
16T22:16:28.0409002Z","Version":"be5c5787-b903-43b1-a237-
49eae1b373e4"},"vpnSiteConfiguration":
{"Name":"toaws","IPAddress":"3.220.252.93","BgpSetting":
{"Asn":7225,"BgpPeeringAddress":"169.254.24.25","PeerWeight":32768},"LinkName":"toa
ws"},"vpnSiteConnections":[{"hubConfiguration":
{"AddressSpace":"10.1.0.0/16","Region":"West US","ConnectedSubnets":
["10.2.0.0/16"]},"gatewayConfiguration":{"IpAddresses":
{"Instance0":"52.180.90.47","Instance1":"52.180.89.94"},"BgpSetting":
{"Asn":65515,"BgpPeeringAddresses":
{"Instance0":"10.1.0.7","Instance1":"10.1.0.6"},"PeerWeight":0}},"connectionConfigu
ration":{"IsBgpEnabled":true,"PSK":"Fortinet123#","IPsecParameters":
{"SADataSizeInKilobytes":102400000,"SALifeTimeInSeconds":3600}}}]} ]
3. Configure the following on the FortiGate. Note for set proposal, you can select from several proposals.
config vpn ipsec phase1-interface
edit "toazure1"
set interface "port1"
set ike-version 2
set keylife 28800
set peertype any
set proposal aes256-sha1
set dhgrp 2
set remote-gw 52.180.90.47
set psksecret **********
next
edit "toazure2"
set interface "port1"
set ike-version 2
set keylife 28800
set peertype any
set proposal aes256-sha1
set dhgrp 2
set remote-gw 52.180.89.94
set psksecret **********
next
end
config vpn ipsec phase2-interface
edit "toazure1"
set phase1name "toazure1"
set proposal aes256-sha1
set dhgrp 2
set keylifeseconds 3600
next
edit "toazure2"
set phase1name "toazure2"
set proposal aes256-sha1
set dhgrp 2
set keylifeseconds 3600
next
end
config system settings
set allow-subnet-overlap enable
end
config system interface
edit "toazure1"
set vdom "root"
set ip 169.254.24.25 255.255.255.255
set type tunnel
set remote-ip 10.1.0.7 255.255.255.255
set snmp-index 4
set interface "port1"
next
edit "toazure2"
set vdom "root"
set ip 169.254.24.25 255.255.255.255
set type tunnel
set remote-ip 10.1.0.6 255.255.255.255
set snmp-index 5
set interface "port1"
next
end
config router bgp
set as 7225
set router-id 169.254.24.25
config neighbor
edit "10.1.0.7"
set remote-as 65515
next
edit "10.1.0.6"
set remote-as 65515
next
end
config network
edit 1
set prefix 172.30.101.0 255.255.255.0
next
end
config redistribute "connected"
set status enable
end
config redistribute "rip"
end
config redistribute "ospf"
end
config redistribute "static"
end
config redistribute "isis"
end
config redistribute6 "connected"
end
config redistribute6 "rip"
end
config redistribute6 "ospf"
end
config redistribute6 "static"
end
config redistribute6 "isis"
end
end
4. Run diagnose vpn tunnel list. If the configuration was successful, the output should resemble the following:
IPSec VPN between a FortiGate and a Cisco ASA with multiple subnets
When a Cisco ASA unit has multiple subnets configured, multiple phase 2 tunnels must be created on the FortiGate to
allocate to each subnet (rather than having multiple subnets on one phase 2 tunnel).
The FortiGate uses the same SPI value to bring up the phase 2 negotiation for all of the subnets, while the Cisco ASA
expects different SPI values for each of its configured subnets. Using multiple phase 2 tunnels on the FortiGate creates
different SPI values for each subnet.
This is a sample configuration of a FortiGate VPN that is compatible with Cisco-style VPNs that use GRE in an IPsec
tunnel. Cisco products with VPN support often use the GRE protocol tunnel over IPsec encryption. Cisco VPNs can use
either transport mode or tunnel mode IPsec.
Topology
There are five steps to configure GRE-over-IPsec with a FortiGate and Cisco router:
1. Enable overlapping subnets.
2. Configure a route-based IPsec VPN on the external interface.
3. Configure a GRE tunnel on the virtual IPsec interface.
4. Configure security policies.
5. Configure the static route.
Overlapping subnets are required because the IPsec and GRE tunnels will use the same addresses. By default, each
FortiGate network interface must be on a separate network. This configuration assigns an IPsec tunnel endpoint and the
external interface to the same network.
A route-based VPN that use encryption and authentication algorithms compatible with the Cisco router is required. Pre-
shared key authentication is used in this configuration.
Pre-shared Key Entry must match the pre-shared key on the Cisco router
Phase 1 Proposal 3DES-SHA1, AES128-SHA1 (at least one proposal must match the settings
on the Cisco router)
Phase 2 Proposal 3DES-MD5 (at least one proposal must match the settings on the Cisco router)
Local Port 0
Remote Port 0
Protocol 47
4. Click OK.
5. If the Cisco router is configured to use transport mode IPsec, configure transport mode on the FortiGate:
config vpn phase2-interface
edit tocisco_p2
set encapsulation transport-mode
next
end
The local gateway and remote gateway addresses must match the local and remote gateways of the IPsec tunnel. The
GRE tunnel runs between the virtual IPsec public interface on the FortiGate unit and the Cisco router.
The Cisco router configuration requires an address for its end of the GRE tunnel, so you need to add the tunnel end
addresses.
l Policies to allow traffic to pass in both directions between the GRE virtual interface and the IPsec virtual interface.
l Policies to allow traffic to pass in both directions between the protected network interface and the GRE virtual
interface.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Enter the following to allow traffic between the protected network and the GRE tunnel:
Name LANtoGRE
Incoming Interface Interface that connects to the private network behind the FortiGate (port2)
Source All
Destination All
Action ACCEPT
NAT Disable
3. Click OK.
4. Create a new policy and enter the following to allow traffic between the GRE tunnel and the protected network:
Name GREtoLAN
Outgoing Interface Interface that connects to the private network behind the FortiGate (port2)
Source All
Destination All
Action ACCEPT
NAT Disable
5. Click OK.
6. Create a new policy and enter the following to allow traffic between the GRE virtual interface and the IPsec virtual
interface:
Name GREtoIPsec
Source All
Destination All
Action ACCEPT
NAT Disable
7. Click OK.
8. Create a new policy and enter the following to allow traffic between the IPsec virtual interface and the GRE virtual
interface:
Name IPsectoGRE
Source All
Destination All
Action ACCEPT
NAT Disable
9. Click OK.
Configuring routing
to direct traffic destined for the network behind the Cisco router into the GRE-over-IPsec tunnelTraffic destined for the
network behind the Cisco router must be routed to the GRE tunnel. To do this, create a static route
Destination IP and netmask for the network behind the Cisco router (10.21.101.0
255.255.255.0)
3. Click OK.
For more information, refer to Configuring and verifying a GRE over IPsec tunnel in the Fortinet Knowledge Base.
Remote access
Remote access lets users connect to the Internet using a dialup connection over traditional POTS or ISDN telephone
lines. Virtual private network (VPN) protocols are used to secure these private connections.
The following topics provide instructions on configuring remote access:
l FortiGate as dialup client on page 1336
l FortiClient as dialup client on page 1342
l Add FortiToken multi-factor authentication on page 1346
l Add LDAP user authentication on page 1347
l iOS device as dialup client on page 1348
l IKE Mode Config clients on page 1352
l IPsec VPN with external DHCP service on page 1357
This is a sample configuration of dialup IPsec VPN and the dialup client. In this example, a branch office FortiGate
connects via dialup IPsec VPN to the HQ FortiGate.
You can configure dialup IPsec VPN with FortiGate as the dialup client using the GUI or CLI.
To configure IPsec VPN with FortiGate as the dialup client in the GUI:
To configure IPsec VPN with FortiGate as the dialup client in the CLI:
1. In the CLI, configure the user, user group, and firewall address. Only the HQ dialup server FortiGate needs this
configuration. The address is an IP pool to assign an IP address for the dialup client FortiGate.
config user local
edit "vpnuser1"
set type password
set passwd your-password
next
end
config user group
edit "vpngroup"
set member "vpnuser1"
next
end
config firewall address
edit "client_range"
set type iprange
set start-ip 10.10.10.1
set end-ip 10.10.10.200
next
end
2. Configure the WAN interface and default route. The WAN interface is the interface connected to the ISP. It can work
in static mode (as shown in this example), DHCP, or PPPoE mode. The IPsec tunnel is established over the
WAN interface.
a. Configure the HQ FortiGate.
config system interface
edit "wan1"
set vdom "root"
set ip 11.101.1 255.255.255.0
next
end
config router static
edit 1
set gateway 11.101.1.2
set device "wan1"
next
end
3. Configure the internal interface and protected subnet. The internal interface connects to the internal network. Traffic
from this interface will route out the IPsec VPN tunnel.
a. Configure the HQ FortiGate.
config system interface
edit "dmz"
set vdom "root"
set ip 10.1.100.1 255.255.255.0
next
end
config firewall address
edit "10.1.100.0"
set subnet 10.1.100.0 255.255.255.0
next
end
4. Configure the IPsec phase1-interface. In this example, PSK is used as the authentication method. Signature
authentication is also an option.
a. Configure the HQ FortiGate.
config vpn ipsec phase1-interface
edit "for_Branch"
set type dynamic
set interface "wan1"
set mode aggressive
set peertype any
set mode-cfg enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set add-route disable
6. Configure the static routes on the branch office FortiGate. The blackhole route is important to ensure that IPsec
traffic does not match the default route when the IPsec tunnel is down.
config router static
edit 2
7. Configure the firewall policy to allow the branch office to HQ network flow over the IPsec tunnel. This configuration
only supports traffic from the branch office FortiGate to the HQ FortiGate. Traffic is dropped from the HQ FortiGate
to the branch office FortiGate.
a. Configure the HQ FortiGate.
config firewall policy
edit 1
set name "inbound"
set srcintf "for_Branch"
set dstintf "dmz"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
set schedule "always"
set service "ALL"
next
end
8. Run diagnose commands to check the IPsec phase1/phase2 interface status. The diagnose debug
application ike -1 command is the key to troubleshoot why the IPsec tunnel failed to establish.
a. Run the diagnose vpn ike gateway list command on the HQ FortiGate. The system should return the
following:
vd: root/0
name: for_Branch_0
version: 1
interface: wan1 5
addr: 11.101.1.1:500 -> 173.1.1.1:500
created: 1972s ago
xauth-user: vpnuser1
assigned IPv4 address: 10.10.10.1/255.255.255.252
IKE SA: created 1/1 established 1/1 time 10/10/10 ms
b. Run the diagnose vpn tunnel list command on the HQ FortiGate. The system should return the
following:
list all ipsec tunnel in vd 0
name=for_Branch_0 ver=1 serial=9 11.101.1.1:0->173.1.1.1:0 tun_id=173.1.1.1
bound_if=5 lgwy=static/1 tun=intf/0 mode=dial_inst/3 encap=none/208 options
[00d0]=create_dev no-sysctlrgwy-chg
parent=for_Branch index=0
proxyid_num=1 child_num=0 refcnt=12 ilast=8 olast=8 ad=/0
stat: rxp=8 txp=8 rxb=1216 txb=672
dpd: mode=on-idle on=1 idle=60000ms retry=3 count=0 seqno=31
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=for_Branch_p2 proto=0 sa=1 ref=2 serial=1
src: 0:0.0.0.0-255.255.255.255:0
dst: 0:0.0.0.0-255.255.255.255:0
SA: ref=3 options=226 type=00 soft=0 mtu=1438 expire=41297/0B replaywin=2048 seqno=9
esn=0 replaywin_lastseq=00000009 itn=0
life: type=01 bytes=0/0 timeout=43190/43200
dec: spi=747c10c6 esp=aes key=16 278c2430e09e74f1e229108f906603b0
ah=sha1 key=20 21dad76b008d1e8b8e53148a2fcbd013a277974a
enc: spi=ca646448 esp=aes key=16 b7801d125804e3610a556da7caefd765
ah=sha1 key=20 a70164c3094327058bd84c1a0c954ca439709206
dec:pkts/bytes=8/672, enc:pkts/bytes=8/1216
c. Run the diagnose vpn ike gateway list command on the branch office FortiGate. The system should
return the following:
vd: root/0
name: to_HQ
version: 1
interface: port13 42
addr: 173.1.1.1:500 -> 11.101.1.1:500
created: 2016s ago
assigned IPv4 address: 10.10.10.1/255.255.255.252
IKE SA: created 1/1 established 1/1 time 0/0/0 ms
IPsec SA: created 1/1 established 1/1 time 0/0/0 ms
id/spi: 93 5b1c59fab2029e43/bf517e686d3943d2
direction: initiator
status: established 2016-2016s ago = 0ms
proposal: aes128-sha256
key: 8046488e92499247-fbbb4f6dfa4952d0
lifetime/rekey: 86400/84083
DPD sent/recv: 00000000/00000020
d. Run the diagnose vpn tunnel list command on the branch office FortiGate. The system should return
the following:
list all ipsec tunnel in vd 0
name=to_HQver=1 serial=7 173.1.1.1:0->11.101.1.1:0 tun_id=11.101.1.1
bound_if=42 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/8 options[0008]=npu
proxyid_num=1 child_num=0 refcnt=13 ilast=18 olast=58 ad=/0
stat: rxp=1 txp=2 rxb=152 txb=168
dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=0
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=to_HQ proto=0 sa=1 ref=2 serial=1
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
SA: ref=6 options=10226 type=00 soft=0 mtu=1438 expire=41015/0B replaywin=2048
seqno=3 esn=0 replaywin_lastseq=00000002 itn=0
life: type=01 bytes=0/0 timeout=42898/43200
dec: spi=ca646448 esp=aes key=16 b7801d125804e3610a556da7caefd765
ah=sha1 key=20 a70164c3094327058bd84c1a0c954ca439709206
enc: spi=747c10c6 esp=aes key=16 278c2430e09e74f1e229108f906603b0
ah=sha1 key=20 21dad76b008d1e8b8e53148a2fcbd013a277974a
dec:pkts/bytes=1/84, enc:pkts/bytes=2/304
npu_flag=03 npu_rgwy=11.101.1.1 npu_lgwy=173.1.1.1 npu_selid=5 dec_npuid=2 enc_
npuid=2
This is a sample configuration of dialup IPsec VPN with FortiClient as the dialup client.
You can configure dialup IPsec VPN with FortiClient as the dialup client using the GUI or CLI.
If multiple dialup IPsec VPNs are defined for the same dialup server interface, each phase1 configuration must define a
unique peer ID to distinguish the tunnel that the remote client is connecting to. When a client connects, the first IKE
message that is in aggressive mode contains the client's local ID. FortiGate matches the local ID to the dialup tunnel
referencing the same Peer ID, and the connection continues with that tunnel.
To configure IPsec VPN with FortiClient as the dialup client on the GUI:
To configure IPsec VPN with FortiClient as the dialup client using the CLI:
2. Configure the internal interface. The LAN interface connects to the corporate internal network. Traffic from this
interface routes out the IPsec VPN tunnel. Creating an address group for the protected network behind this
FortiGate causes traffic to this network group to go through the IPsec tunnel.
config system interface
edit "lan"
set vdom "root"
set ip 10.10.111.1 255.255.255.0
next
end
config firewall address
edit "local_subnet_1"
set subnet 10.10.111.0 255.255.255.0
next
edit "local_subnet_2"
set subnet 10.10.112.0 255.255.255.0
next
end
config firewall addrgrp
edit "local_network"
set member "local_subnet_1" "local_subnet_2"
next
end
3. Configure the WAN interface. The WAN interface is the interface connected to the ISP. It can work in static mode
(as shown in this example), DHCP, or PPPoE mode. The IPsec tunnel is established over the WAN interface.
config system interface
edit "wan1"
set vdom "root"
set ip 172.20.120.123 255.255.255.0
next
end
4. Configure the client address pool. You must create a firewall address to assign an IP address to a client from the
address pool.
config firewall address
edit "client_range"
set type iprange
set comment "VPN client range"
set start-ip 10.10.2.1
set end-ip 10.10.2.200
next
end
5. Configure the IPsec phase1-interface. In this example, PSK is used as the authentication method. Signature
authentication is also an option.
config vpn ipsec phase1-interface
edit "for_client"
set type dynamic
set interface "wan1"
set mode aggressive
set peertype one
set peerid "dialup1"
set net-device enable
set mode-cfg enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set dpd on-idle
set xauthtype auto
7. Configure the firewall policy to allow client traffic flow over the IPsec VPN tunnel.
config firewall policy
edit 1
set name "inbound"
set srcintf "for_client"
set dstintf "lan"
set srcaddr "client_range"
set dstaddr "local_network"
set action accept
set schedule "always"
set service "ALL"
next
end
To configure FortiClient:
Run diagnose commands to check the IPsec phase1/phase2 interface status. The diagnose debug application
ike -1 command is the key to troubleshoot why the IPsec tunnel failed to establish.
1. Run the diagnose vpn ike gateway list command. The system should return the following:
vd: root/0
name: for_client_0
version: 1
interface: port1 15
2. Run the diagnose vpn tunnel list command. The system should return the following:
list all ipsec tunnel in vd 0
=
=
name=for_client_0 ver=1 serial=3 172.20.120.123:4500->172.20.120.254:64916 tun_
id=172.20.120.254
bound_if=15 lgwy=static/1 tun=intf/0 mode=dial_inst/3 encap=none/984 options
[03d8]=npucreate_dev no-sysctlrgwy-chgrport-chg frag-rfcaccept_traffic=1
parent=for_client index=0
proxyid_num=1 child_num=0 refcnt=12 ilast=3 olast=3 ad=/0
stat: rxp=1 txp=0 rxb=16402 txb=0
dpd: mode=on-idle on=1 idle=20000ms retry=3 count=0 seqno=0
natt: mode=keepalive draft=32 interval=10 remote_port=64916
proxyid=for_client proto=0 sa=1 ref=2 serial=1 add-route
src: 0:0.0.0.0-255.255.255.255:0
dst: 0:10.10.1.1-10.10.1.1:0
SA: ref=4 options=2a6 type=00 soft=0 mtu=1422 expire=42867/0B replaywin=2048
seqno=1 esn=0 replaywin_lastseq=00000001 itn=0
life: type=01 bytes=0/0 timeout=43189/43200
dec: spi=36274d14 esp=aes key=16 e518b84b3c3b667b79f2e61c64a225a6
ah=sha1 key=20 9cceaa544ed042fda800c4fe5d3fd9d8b811984a
enc: spi=8b154deb esp=aes key=16 9d50f004b45c122e4e9fb7af085c457c
ah=sha1 key=20 f1d90b2a311049e23be34967008239637b50a328
dec:pkts/bytes=1/16330, enc:pkts/bytes=0/0
npu_flag=02 npu_rgwy=172.20.120.254 npu_lgwy=172.20.120.123npu_selid=0 dec_npuid=2 enc_
npuid=0
name=for_clientver=1 serial=2 172.20.120.123:0->0.0.0.0:0
bound_if=15 lgwy=static/1 tun=intf/0 mode=dialup/2 encap=none/536 options
[0218]=npucreate_dev frag-rfcaccept_traffic=1
proxyid_num=0 child_num=1 refcnt=11 ilast=350 olast=350 ad=/0
stat: rxp=0 txp=0 rxb=0 txb=0
dpd: mode=on-idle on=0 idle=20000ms retry=3 count=0 seqno=0
natt: mode=none draft=0 interval=0 remote_port=0
This configuration adds multi-factor authentication (MFA) to the FortiClient dialup VPN configuration (FortiClient as
dialup client on page 1342). It uses one of the two free mobile FortiTokens that is already installed on the FortiGate.
This configuration adds LDAP user authentication to the FortiClient dialup VPN configuration (FortiClient as dialup client
on page 1342). You must have already generated and exported a CA certificate from your AD server.
This is a sample configuration of dialup IPsec VPN with an iPhone or iPad as the dialup client.
You can configure dialup IPsec VPN with an iOS device as the dialup client using the GUI or CLI.
To configure IPsec VPN with an iOS device as the dialup client on the GUI:
1. Go to VPN > IPsec Wizard and configure the following settings for VPN Setup:
a. Enter a VPN name.
b. For Template Type, select Remote Access.
c. For Remote Device Type, select Native > iOS Native.
d. For NAT Configuration, set No NAT Between Sites.
e. Click Next.
2. Configure the following settings for Authentication:
a. For Incoming Interface, select wan1.
b. For Authentication Method, select Pre-shared Key.
c. In the Pre-shared Key field, enter your-psk as the key.
d. From the User Group dropdown list, select vpngroup.
e. Deselect Require 'Group Name' on VPN client.
f. Click Next.
3. Configure the following settings for Policy & Routing:
a. From the Local Interface dropdown menu, select lan.
b. Configure the Local Address as local_network.
c. Configure the Client Address Range as 10.10.2.1-10.10.2.200.
d. Keep the default values for the Subnet Mask, DNS Server, and Enable IPv4 Split tunnel.
e. Click Create.
To configure IPsec VPN with an iOS device as the dialup client using the CLI:
2. Configure the internal interface. The LAN interface connects to the corporate internal network. Traffic from this
interface routes out the IPsec VPN tunnel. Creating an address group for the protected network behind this
FortiGate causes traffic to this network group to go through the IPsec tunnel.
config system interface
edit "lan"
set vdom "root"
set ip 10.10.111.1 255.255.255.0
next
end
3. Configure the WAN interface. The WAN interface is the interface connected to the ISP. It can work in static mode
(as shown in this example), DHCP, or PPPoE mode. The IPsec tunnel is established over the WAN interface.
config system interface
edit "wan1"
set vdom "root"
set ip 172.20.120.123 255.255.255.0
next
end
4. Configure the client address pool. You must create a firewall address to assign an IP address to a client from the
address pool.
config firewall address
edit "client_range"
set type iprange
set comment "VPN client range"
set start-ip 10.10.2.1
set end-ip 10.10.2.200
next
end
5. Configure the IPsec phase1-interface. In this example, PSK is used as the authentication method. Signature
authentication is also an option.
7. Configure the firewall policy to allow client traffic flow over the IPsec VPN tunnel.
config firewall policy
edit 1
set name "ios_vpn"
set srcintf "for_ios_p1"
set dstintf "lan"
set srcaddr "ios_range"
set dstaddr "local_network"
set action accept
set schedule "always"
set service "ALL"
next
end
a. Run the diagnose vpn ike gateway list command. The system should return the following:
vd: root/0
name: for_ios_p1_0
version: 1
interface: port1 15
addr: 172.20.120.123:4500 -> 172.20.120.254:64916
created: 17s ago
xauth-user: u1
assigned IPv4 address: 10.10.2.1/255.255.255.255
nat: me peer
IKE SA: created 1/1 established 1/1 time 150/150/150 ms
IPsec SA: created 1/1 established 1/1 time 10/10/10 ms
id/spi: 2 3c844e13c75591bf/80c2db92c8d3f602 direction: responder status: established
17-17s ago = 150ms proposal: aes256-sha256 key: 0032ea5ee160d775-51f3bf1f9909101b-
b89c7b5a77a07784-2c92cf9c921801ac lifetime/rekey: 3600/3312 DPD sent/recv:
00000000/00000000
b. Run the diagnose vpn tunnel list command. The system should return the following:
list all ipsec tunnel in vd 0
=
=
name=for_ios_p1_0 ver=1 serial=172.20.120.123:4500->172.20.120.254:64916 tun_
id=172.20.120.254
bound_if=15 lgwy=static/1 tun=intf/0 mode=dial_inst/3 encap=none/984 options
[03d8]=npu create_dev no-sysctl rgwy-chg rport-chg frag-rfc accept_traffic=1
parent=for_ios_p1 index=0
proxyid_num=1 child_num=0 refcnt=12 ilast=23 olast=23 ad=/0
stat: rxp=0 txp=0 rxb=0 txb=0
dpd: mode=on-idle on=1 idle=60000ms retry=3 count=0 seqno=0
natt: mode=keepalive draft=32 interval=10 remote_port=64916
proxyid=for_ios_p1 proto=0 sa=1 ref=2 serial=1 add-route
src: 0:10.10.111.0-10.10.111.255:0 dst: 0:10.10.2.1-10.10.2.1:0 SA: ref=3 options=a7
type=00 soft=0 mtu=1422 expire=3564/0B replaywin=2048
seqno=1 esn=0 replaywin_lastseq=00000000 itn=0
life: type=01 bytes=0/0 timeout=3587/3600 dec: spi=36274d15 esp=aes key=32
5a599d796f8114c83d6589284f036fc33bdf4456541e2154b4ac2217b6aec869
ah=sha1 key=20 f1efdeb77d6f856a8dd3a30cbc23cb0f8a3e0340
enc: spi=00b0d9ab esp=aes key=32
e9232d7a1c4f390fd09f8409c2d85f80362d940c08c73f245908ab1ac3af322f
ah=sha1 key=20 a3890d6c5320756291cad85026d3a78fd42a1b42
dec:pkts/bytes=0/0, enc:pkts/bytes=0/0 npu_flag=00 npu_rgwy=172.20.120.254 npu_
lgwy=172.20.120.123 npu_selid=1 dec_npuid=0 enc_npuid=0
IKE Mode Config is an alternative to DHCP over IPsec. It allows dialup VPN clients to obtain virtual IP address, network,
and DNS configurations amongst others from the VPN server. A FortiGate can be configured as either an IKE Mode
Config server or client.
IKE Mode Config can configure the host IP address, domain, DNS addresses ,and WINS addresses. IPsec parameters
such as gateway address, encryption, and authentication algorithms must be configured. Several network equipment
vendors support IKE Mode Config.
An IKE Mode Config server or client is configured using config vpn ipsec phase1-interface and involves the
following parameters:
Parameter Description
ike-version {1 | 2} IKE v1 is the default for FortiGate IPsec VPNs. IKE Mode Config is also
compatible with IKE v2.
type {static | dynamic | ddns} If you set type to dynamic, an IKE Mode Config server is created. The other
settings create an IKE Mode Config client.
assign-ip {enable | disable} Enable to request an IP address from the server. This configuration is for IKE
Mode Config clients only.
interface <interface_name> Specify the physical, aggregate, or VLAN interface to which the IPsec tunnel will
be bound.
proposal <encryption_ The encryption and authentication settings that the client will accept.
combination>
ipv4-split-include <string> Mode Config server configuration. Applicable to IKEv1 and IKEv2.
ipv6-split-include <string> Specify the firewall address or address group that represents the subnets that the
clients will have access to. This information is sent to the clients so that default
traffic should not flow over the IPsec tunnel except for the specified subnets.
split-include-service <string> Mode Config server configuration. Applicable to IKEv1 and IKEv2.
Specify the service or service group that represents the services that the clients
will have access to. This information is sent to the clients so that default traffic
should not flow over the IPsec tunnel except for the specified services.
ipv4-split-exclude <string> Specify the subnets that should not be accessed over the IPsec tunnel. This
ipv6-split-exclude <string> information is sent to the clients so that all default traffic should flow over the
IPsec tunnel except for the specified subnets.
See Split-exclude in IKEv1.
In this example, the FortiGate connects to a VPN gateway with a static IP address that can be reached through port 1.
Only the port, gateway, and proposal information needs to be configured. All other configuration information will come
from the IKE Mode Config server.
Split-exclude in IKEv1
The split-exclude option specifies that default traffic flows over the IPsec tunnel except for specified subnets. This is
the opposite of split-include, which specifies that default traffic should not flow over the IPsec tunnel except for
specified subnets. The split-include and split-exclude options can be specified at the same time.
To configure split-exclude:
To configure IKE Mode config settings, the following must be configured first :
In this example, the FortiGate assigns IKE Mode Config clients addresses in the range of 10.11.101.160 -
10.11.101.180. DNS and WINS server addresses are also provided. The public interface of the FortiGate unit is port1.
When IKE Mode-Configuration is enabled, multiple server IPs can be defined in IPsec phase 1.
The ipv4-split-include parameter specifies a firewall address (OfficeLAN), which represents the networks that
the clients will have access to. This destination IP address information is sent to the clients.
Assigning IP addresses
Once the basic configuration is enabled, you can configure IP address assignment for clients, as well as DNS and WINS
server assignments. Usually you will want to assign IP addresses to clients. The easiest way is to assign addresses from
a specific range, similar to a DHCP server.
RADIUS server
If the client is authenticated by a RADIUS server, you can obtain the user’s IP address assignment from the Framed-IP-
Address attribute. The user must be authenticated using XAuth.
The users must be authenticated by a RADIUS server and assigned to the FortiGate user group <grp_name>. Since the
IP address is not static, type is set to dynamic and mode-cfg is enabled. With IKE Mode Config, compatible clients can
configure themselves with settings provided by the FortiGate.
DHCP server
IKE Mode Config can use a remote DHCP server to assign the client IP addresses. Up to eight server addresses can be
selected for either IPv4 or IPv6. The DHCP proxy must be enabled first.
Certificate groups
IKE certificate groups consisting of up to four RSA certificates can be used in IKE phase 1. Since CA and local
certificates are global, the IKE daemon loads them once for all VDOMs and indexes them into trees based on subject
and public key hash (for CA certificates), or certificate name (for local certificates). Certificates are linked together based
on the issuer, and certificate chains are built by traversing these links. This reduces the need to keep multiple copies of
certificates that could exist in multiple chains.
Split-exclude in IKEv1
The split-exclude setting specifies that default traffic flows over the IPsec tunnel except for specified subnets. This
is the opposite of split-include, which specifies that default traffic should not flow over the IPsec tunnel except for
specified subnets. The split-include and split-exclude settings can be specified at the same time.
To configure split-exclude:
You can use an external DHCP server to assign IP addresses to your IPsec VPN clients. This is a common scenario
found in enterprises where all DHCP leases need to be managed centrally.
In this example, the DHCP server assigns IP addresses in the range of 172.16.6.100 to 172.16.6.120. The server is
attached to internal2 on the FortiGate and has an IP address of 192.168.3.70.
c. Click OK.
6. Configure FortiClient:
a. In FortiClient, go to REMOTE ACCESS > Add a new connection.
c. Select the new connection, and enter the user name and password.
d. Click Connect.
Once the connection is established, the external DHCP server assigns the user an IP address and FortiClient
displays the connection status, including the IP address, connection duration, and bytes sent and received.
Verification
1. In FortiOS, go to Monitor > IPsec Monitor and verify that the tunnel Status is Up.
2. Go to Log & Report > Forward Traffic and verify the Sent / Received column displays the traffic flow through the
tunnel.
5. Configure a firewall address that is applied in L2TP settings to assign IP addresses to clients once the L2TP tunnel
is established.
config firewall address
edit "L2TPclients"
set type iprange
set start-ip 10.10.10.1
set end-ip 10.10.10.100
next
end
HQ # Num of tunnels: 2
----
Tunnel ID = 1 (local id), 42 (remote id) to 10.1.100.15:1701
control_seq_num = 2, control_rec_seq_num = 4,
last recv pkt = 2
Call ID = 1 (local id), 1 (remote id), serno = 0, dev=ppp1,
assigned ip = 10.10.10.2
data_seq_num = 0,
tx = 152 bytes (2), rx= 21179 bytes (205)
Tunnel ID = 3 (local id), 34183 (remote id) to 22.1.1.2:58825
control_seq_num = 2, control_rec_seq_num = 4,
last recv pkt = 2
Call ID = 3 (local id), 18820 (remote id), serno = 2032472593, dev=ppp2,
assigned ip = 10.10.10.3
data_seq_num = 0,
tx = 152 bytes (2), rx= 0 bytes (0)
----
--VD 0: Startip = 10.10.10.1, Endip = 10.10.10.100
enforece-ipsec = false
----
This is a sample configuration of tunneled internet browsing using a dialup VPN. To centralize network management and
control, all branch office traffic is tunneled to HQ, including Internet browsing.
1. Configure the WAN interface and static route on the FortiGate at HQ.
config system interface
edit "port9"
set alias "WAN"
set ip 22.1.1.1 255.255.255.0
next
edit "port10"
set alias "Internal"
set ip 172.16.101.1 255.255.255.0
next
end
config router static
edit 1
set gateway 22.1.1.2
set device "port9"
next
end
4. Configure the WAN interface and static route on the FortiGate at the branches.
a. Branch1.
config system interface
edit "wan1"
set ip 15.1.1.2 255.255.255.0
next
edit "internal"
set ip 10.1.100.1 255.255.255.0
next
end
config router static
edit 1
set gateway 15.1.1.1
set device "wan1"
next
end
b. Branch2.
config system interface
edit "wan1"
set ip 13.1.1.2 255.255.255.0
next
edit "internal"
set ip 192.168.4.1 255.255.255.0
next
end
config router static
edit 1
set gateway 13.1.1.1
set device "wan1"
next
end
next
end
b. Branch2.
config vpn ipsec phase1-interface
edit "branch2"
set interface "wan1"
set peertype any
set net-device enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set dpd on-idle
set remote-gw 22.1.1.1
set psksecret sample
set dpd-retryinterval 5
next
end
config vpn ipsec phase2-interface
edit "branch2"
set phase1name "branch2"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
set src-subnet 192.168.4.0 255.255.255.0
next
end
b. Branch2.
config firewall policy
edit 1
set name "outbound"
b. Branch2.
config router static
edit 2
set dst 22.1.1.1/32
set gateway 13.1.1.1
set device "wan1"
set distance 1
next
edit 3
set device "branch2"
set distance 5
next
end
8. Optionally, view the VPN tunnel list on a branch with the diagnose vpn tunnel list command:
list all ipsec tunnel in vd 0
----
name=branch1 ver=1 serial=2 15.1.1.2:0->22.1.1.1:0 tun_id=22.1.1.1.1
bound_if=7 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/536 options[0218]=npu create_
dev frag-rfc accept_traffic=1
9. Optionally, view static routing table on a branch with the get router info routing-table static
command:
Routing table for VRF=0
S* 0.0.0.0/0 [5/0] is directly connected, branch1
S* 22.1.1.1/32 [1/0] via 15.1.1.1, wan1
In a dialup IPsec VPN setup, a company may choose to use X.509 certificates as their authentication solution for remote
users. This method includes the option to verify the remote user using a user certificate, instead of a username and
password. This method can be simpler for end users.
Administrators need to issue unique user certificates to each user for remote access management. The user certificate
can be verified by the subject field, common name, or the principal name in the Subject Alternative Name (SAN) field.
This is the basic method that verifies the subject string defined in the PKI user setting matches a substring in the subject
field of the user certificate. For example:
config user peer
edit "tgerber"
set ca "CA_Cert_2"
set subject "CN=tgerber"
next
end
In this method, administrators can define the CN string to match the common name (CN) in the subject field of the
certificate. For example:
config user peer
edit "tgerber"
set ca "CA_Cert_2"
set cn "tgerber"
next
end
A PKI user must be created on the FortiGate for each remote user that connects to the VPN with a unique user
certificate.
In this method, the PKI user setting references an LDAP server. When ldap-mode is set to principal-name, the
UPN in the user certificate’s SAN field is used to look up the user in the LDAP directory. If a match is found, then
authentication succeeds. For example:
config user peer
edit "ldap-peer"
set ca "CA_Cert_2"
set ldap-server "WIN2K16-KLHOME-LDAPS"
set ldap-mode principal-name
next
end
This method is more scalable because only one PKI user needs to be created on the FortiGate. Remote users connect
with their unique user certificate that are matched against users in the LDAP server.
Certificate management
Dialup IPsec VPN with certificate authentication requires careful certificate management planning. Assuming that a
company’s private certificate authority (CA) is used to generate and sign all the certificates, the following certificates are
needed:
Server certificate The server certificate is used to identify the FortiGate IPsec dialup gateway. A
CSR can be generated on the FortiGate and signed by the CA, or the CA can
generate the private and public keys and export the certificate package to the
FortiGate.
User certificate The user certificate is generated and signed by the CA with unique CNs in the
subject field and/or unique Principal Names in the SAN field. They are used to
identify the user that is connecting to the VPN. User certificates must be installed
on client machines.
CA certificate The root CA certificate, and any subordinate CA that signed the actual user and
server certificates, must be imported into the FortiGate and client machines. The
CA certificate is used to verify the certificate chain of the server and user
certificates.
Example
In this example, a dialup IPsec VPN tunnel is configured with certificate authentication using the subject field verification
method and the LDAP integration method.
The company CA, named root CA, signs all the server and user certificates. The user, [email protected], has a user
certificate signed by root CA installed on their endpoint. The corresponding user account is also present under the
company’s Active Directory.
There are five major steps to configure this example:
1. Importing the certificates
2. Configuring user authentication
3. Configuring the VPN
4. Configuring FortiClient and the endpoints
5. Testing and verifying the certificate authentication
The server certificate and CA certificate need to be imported into the FortiGate.
If any subordinate CA is involved in signing the certificates, you need to import its certificate.
FortiGate PKI users do not appear in the GUI until at least one PKI user has been created in the CLI. The following
instructions create the PKI users in the CLI.
1. Create the PKI user and choose the CA certificate that was imported (if the certificate was signed by a subordinate
CA, choose the subordinate CA’s certificate):
config user peer
edit "tgerber"
set ca "CA_Cert_2"
set subject "CN=tgerber"
next
end
2. Configure the PKI user to reference the LDAP server using the CA certificate that was imported:
config user peer
edit "ldap-peer"
set ca "CA_Cert_2"
set ldap-server "WIN2K16-KLHOME-LDAPS"
set ldap-mode principal-name
next
end
To configure the VPN, the address objects must be defined first so they can be used in the VPN and policy
configurations. In this example, the VPN is configured in custom mode to define the authentication settings.
1. Go to VPN > IPsec Tunnels and click Create New > IPsec Tunnel.
2. Enter a name for the tunnel, Dialup-cert_0.
3. For Template type, select Custom then click Next.
Interface port1
Method Signature
Mode Aggressive
Peer Options > Peer Select the group based on the preferred method:
certificate group l For subject verification, select pki-users.
When IKEv1 is used, aggressive mode should be selected so that the connecting endpoint will provide its peer ID in
the first message of the IKE exchange. The peer identifier allows the FortiGate to match the correct tunnel when
multiple dialup tunnels are defined.
6. For Phase 2 Selectors, leave the local and remote selectors as 0.0.0.0/0.0.0.0.
7. Click OK.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the following:
Source remote-user-range
Destination 192.168.20.0
Schedule always
Service ALL
Action ACCEPT
The following example is configured on a Windows PC with FortiClient 7.0.0. Other configurations may differ slightly.
The user certificate and CA certificate must be installed on the endpoint device. They may be pushed by the
administrator through group policies or another method. This example assumes that the user certificate and CA
certificate are already installed on the endpoint.
3. Go to Trusted Root Certification Authorities > Certificates. The company CA certificate should be listed.
1. In FortiClient, click the Remote Access tab and add a new connection:
a. If there are no existing connections, click Configure VPN.
b. If there are existing connections, click the menu icon and select Add a new connection.
2. Configure the following:
3. Click Save.
1. On the client PC, open FortiClient and click the Remote Access tab.
2. Select the VPN tunnel, Dialup-cert_0, and click Connect.
If the connection is successful, a FortiClient pop-up will appear briefly indicating that the IKE negotiation succeeded.
The Remote Access window now displays VPN Connected and the associated VPN tunnel details.
3. On the FortiGate, go to Dashboard > Network and locate the IPsec widget to view the VPN tunnel monitor. Click the
widget to expand to full view.
The widget displays tunnel information, including the Peer ID containing the subject field of the user certificate.
4. Go to Log & Report > Events > VPN Events. Several tunnel related logs are recorded.
5. The same logs can be viewed in the CLI:
# execute log filter category 1
# execute log filter field subtype vpn
# execute log display
7: date=2021-08-23 time=15:53:08 eventtime=1629759188862005740 tz="-0700"
logid="0101037138" type="event" subtype="vpn" level="notice" vd="root" logdesc="IPsec
connection status changed" msg="IPsec connection status change" action="tunnel-up"
remip=192.168.2.1 locip=192.168.2.5 remport=64916 locport=4500 outintf="port1"
cookies="19f05ebc8c2f7a0d/7716190005538db5" user="C = CA, ST = British Columbia, L =
Burnaby, O = FortiKeith, OU = TAC, CN = tgerber" group="pki-ldap" useralt="C = CA, ST =
British Columbia, L = Burnaby, O = FortiKeith, OU = TAC, CN = tgerber" xauthuser="N/A"
xauthgroup="N/A" assignip=172.18.200.10 vpntunnel="Dialup-cert_0" tunnelip=172.18.200.10
tunnelid=3418215253 tunneltype="ipsec" duration=0 sentbyte=0 rcvdbyte=0 nextstat=0
6. If any issues arise during the connection, run the following debug commands to troubleshoot the issue:
# diagnose debug application ike -1
# diagnose debug application fnbamd -1
# diagnose debug enable
The following topics provide instructions on configuring aggregate and redundant VPNs:
l Manual redundant VPN configuration on page 1379
l OSPF with IPsec VPN for network redundancy on page 1383
l IPsec VPN in an HA environment on page 1390
l Packet distribution and redundancy for aggregate IPsec tunnels on page 1396
l Packet distribution for aggregate dial-up IPsec tunnels using location ID on page 1407
l Packet distribution for aggregate static IPsec tunnels in SD-WAN on page 1411
l Packet distribution for aggregate IPsec tunnels using weighted round robin on page 1416
l Redundant hub and spoke VPN on page 1417
A FortiGate with two interfaces connected to the internet can be configured to support redundant VPNs to the same
remote peer. Four distinct paths are possible for VPN traffic from end to end. If the primary connection fails, the FortiGate
can establish a VPN using the other connection.
Topology
The redundant configuration in this example uses route-based VPNs. The FortiGates must operate in NAT mode and
use auto-keying.
This example assumes the redundant VPNs are essentially equal in cost and capability. When the original VPN returns
to service, traffic continues to use the replacement VPN until the replacement VPN fails. If the redundant VPN uses more
expensive facilities, only use it as a backup while the main VPN is down.
A redundant configuration for each VPN peer includes:
l One phase 1 configuration for each path between the two peers with dead peer detection enabled
l One phase 2 definition for each phase 1 configuration
l One static route for each IPsec interface with different distance values to prioritize the routes
l Two firewall policies per IPsec interface, one for each direction of traffic
IP Address Enter the IP address of the primary interface of the remote peer.
IP Address Enter the IP address of the secondary interface of the remote peer.
b. Path 3:
IP Address Enter the IP address of the primary interface of the remote peer.
c. Path 4:
IP Address Enter the IP address of the secondary interface of the remote peer.
Incoming Interface Select the local interface to the internal (private) network.
Source All
Destination All
Schedule Always
Service All
Action ACCEPT
c. Click OK.
d. Click Create New and configure the policy for the other direction of traffic:
Outgoing Interface Select the local interface to the internal (private) network.
Source All
Destination All
Schedule Always
Service All
Action ACCEPT
e. In the policy list, drag the VPN policies above any other policies with similar source and destination addresses.
2. Repeat these steps to create the policies for the three remaining paths.
A route-based VPN can be configured to act as a backup IPsec interface when the main VPN is out of service. This can
only be configured in the CLI.
The backup feature works on interfaces with static addresses that have dead peer detection enabled. The monitor
option creates a backup VPN for the specified phase 1 configuration.
This is a sample configuration of using OSPF with IPsec VPN to set up network redundancy. Route selection is based on
OSPF cost calculation. You can configure ECMP or primary/secondary routes by adjusting OSPF path cost.
Because the GUI can only complete part of the configuration, we recommend using the CLI.
To configure OSPF with IPsec VPN to achieve network redundancy using the CLI:
next
edit "sec_HQ2"
set interface "port2"
set peertype any
set net-device enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 172.17.202.1
set psksecret sample2
next
end
config vpn ipsec phase2-interface
edit "pri_HQ2"
set phase1name "pri_HQ2"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
next
edit "sec_HQ2"
set phase1name "sec_HQ2"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
next
end
b. Configure HQ2.
config vpn ipsec phase1-interface
edit "pri_HQ1"
set interface "port25"
set peertype any
set net-device enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 172.16.200.1
set psksecret sample1
next
edit "sec_HQ1"
set interface "port26"
set peertype any
set net-device enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 172.17.200.1
set psksecret sample2
next
end
config vpn ipsec phase2-interface
edit "pri_HQ1"
set phase1name "pri_HQ1"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
next
edit "sec_HQ1"
set phase1name "sec_HQ1"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
next
end
4. Configure an inbound and outbound firewall policy for each IPsec tunnel.
a. Configure HQ1.
config firewall policy
edit 1
set name "pri_inbound"
set srcintf "pri_HQ2"
set dstintf "dmz"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "pri_outbound"
set srcintf "dmz"
set dstintf "pri_HQ2"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 3
set name "sec_inbound"
set srcintf "sec_HQ2"
set dstintf "dmz"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 4
set name "sec_outbound"
set srcintf "dmz"
set dstintf "sec_HQ2"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
end
b. Configure HQ2.
config firewall policy
edit 1
set name "pri_inbound"
set srcintf "pri_HQ1"
set dstintf "port9"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "pri_outbound"
set srcintf "port9"
set dstintf "pri_HQ1"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 3
set name "sec_inbound"
set srcintf "sec_HQ1"
set dstintf "port9"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 4
set name "sec_outbound"
set srcintf "port9"
set dstintf "sec_HQ1"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
set schedule "always"
set service "ALL"
next
end
5. Assign an IP address to the IPsec tunnel interface.
a. Configure HQ1.
config system interface
edit "pri_HQ2"
set ip 10.10.10.1 255.255.255.255
set remote-ip 10.10.10.2 255.255.255.255
next
edit "sec_HQ2"
set ip 10.10.11.1 255.255.255.255
set remote-ip 10.10.11.2 255.255.255.255
next
end
b. Configure HQ2.
config system interface
edit "pri_HQ1"
set ip 10.10.10.2 255.255.255.255
set remote-ip 10.10.10.1 255.255.255.255
next
edit "sec_HQ1"
set ip 10.10.11.2 255.255.255.255
set remote-ip 10.10.11.1 255.255.255.255
next
end
6. Configure OSPF.
a. Configure HQ1.
config router ospf
set router-id 1.1.1.1
config area
edit 0.0.0.0
next
end
config ospf-interface
edit "pri_HQ2"
set interface "pri_HQ2"
set cost 10
set network-type point-to-point
next
edit "sec_HQ2"
set interface "sec_HQ2"
set cost 20
set network-type point-to-point
next
end
config network
edit 1
set prefix 10.10.10.0 255.255.255.0
next
edit 2
set prefix 10.10.11.0 255.255.255.0
next
edit 3
set prefix 10.1.100.0 255.255.255.0
next
end
end
b. Configure HQ2.
config router ospf
set router-id 2.2.2.2
config area
edit 0.0.0.0
next
end
config ospf-interface
edit "pri_HQ1"
set interface "pri_HQ1"
set cost 10
set network-type point-to-point
next
edit "sec_HQ1"
set interface "sec_HQ1"
set cost 20
set network-type point-to-point
next
end
config network
edit 1
set prefix 10.10.10.0 255.255.255.0
next
edit 2
To check VPN and OSPF states using diagnose and get commands:
1. Run the HQ1 # diagnose vpn ike gateway list command. The system should return the following:
vd: root/0
name: pri_HQ2
version: 1
interface: port1 11
addr: 172.16.200.1:500 -> 172.16.202.1:500
virtual-interface-addr: 10.10.10.1 -> 10.10.10.2
created: 1024s ago
IKE SA: created 1/1 established 1/1 time 0/0/0 ms
IPsec SA: created 1/3 established 1/2 time 0/5/10 ms
id/spi: 45 d184777257b4e692/e2432f834aaf5658 direction: responder status: established
1024-1024s ago = 0ms proposal: aes128-sha256 key: 9ed41fb06c983344-
189538046f5ad204 lifetime/rekey: 86400/85105 DPD sent/recv: 00000003/00000000
vd: root/0
name: sec_HQ2
version: 1
interface: port2 12
addr: 172.17.200.1:500 -> 172.17.202.1:500
virtual-interface-addr: 10.10.11.1 -> 10.10.11.2
created: 346s ago
IKE SA: created 1/1 established 1/1 time 0/0/0 ms
IPsec SA: created 1/1 established 1/1 time 0/10/15 ms
id/spi: 48 d909ed68636b1ea5/163015e73ea050b8 direction: initiator status: established
0-0s ago = 0ms proposal: aes128-sha256 key: b9e93c156bdf4562-29db9fbafa256152
lifetime/rekey: 86400/86099 DPD sent/recv: 00000000/00000000
2. Run the HQ1 # diagnose vpn tunnel list command. The system should return the following:
list all ipsec tunnel in vd 0
name=pri_HQ2 ver=1 serial=1 172.16.200.1:0->172.16.202.1:0 tun_id=172.16.202.1
bound_if=11 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/528 options[0210]=create_dev
frag-rfc accept_traffic=1
proxyid_num=1 child_num=0 refcnt=14 ilast=2 olast=2 ad=/0
stat: rxp=102 txp=105 rxb=14064 txb=7816
dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=3
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=pri_HQ2 proto=0 sa=1 ref=2 serial=1 auto-negotiate
src: 0:0.0.0.0/0.0.0.0:0 dst: 0:0.0.0.0/0.0.0.0:0 SA: ref=3 options=18227 type=00
soft=0 mtu=1438 expire=42254/0B replaywin=2048
seqno=6a esn=0 replaywin_lastseq=00000067 itn=0
life: type=01 bytes=0/0 timeout=42932/43200 dec: spi=1071b4ee esp=aes key=16
032036b24a4ec88da63896b86f3a01db
ah=sha1 key=20 3962933e24c8da21c65c13bc2c6345d643199cdf
enc: spi=ec89b7e3 esp=aes key=16 92b1d85ef91faf695fca05843dd91626
ah=sha1 key=20 2de99d1376506313d9f32df6873902cf6c08e454
dec:pkts/bytes=102/7164, enc:pkts/bytes=105/14936
name=sec_HQ2 ver=1 serial=2 172.17.200.1:0->172.17.202.1:0 tun_id=172.17.202.1
bound_if=12 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/528 options[0210]=create_dev
frag-rfc accept_traffic=1
You can configure IPsec VPN in an HA environment using the GUI or CLI.
In this example, the VPN name for HQ1 is "to_HQ2", and the VPN name for HQ2 is "to_HQ1".
1. Configure HA. In this example, two FortiGates work in active-passive mode. The HA heartbeat interfaces are WAN1
and WAN2:
config system ha
a. Configure HQ1:
config vpn ipsec phase1-interface
edit "to_HQ2"
set interface "port1"
set peertype any
set net-device enable
set ha-sync-esp-seqno enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 172.16.202.1
set psksecret sample
next
end
b. Configure HQ2:
config vpn ipsec phase1-interface
edit "to_HQ1"
set interface "port25"
set peertype any
set net-device enable
set ha-sync-esp-seqno enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 172.16.200.1
set psksecret sample
next
5. Configure the IPsec phase2-interface:
a. Configure HQ1:
config vpn ipsec phase2-interface
edit "to_HQ2"
set phase1name "to_HQ2"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
next
end
b. Configure HQ2:
config vpn ipsec phase2-interface
edit "to_HQ1"
set phase1name "to_HQ1"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
next
end
6. Configure static routes. Two static routes are added to reach the remote protected subnet. The blackhole route is
important to ensure IPsec traffic does not match the default route when the IPsec tunnel is down.
a. Configure HQ1:
config router static
edit 2
set dst 172.16.101.0 255.255.255.0
set device "to_HQ2"
next
edit 3
set dst 172.16.101.0 255.255.255.0
set blackhole enable
set distance 254
next
end
b. Configure HQ2:
config router static
edit 2
set dst 10.1.100.0 255.255.255.0
set device "to_HQ1"
next
edit 3
set dst 10.1.100.0 255.255.255.0
set blackhole enable
set distance 254
next
end
7. Configure two firewall policies to allow bi-directional IPsec traffic flow over the IPsec tunnel:
a. Configure HQ1:
config firewall policy
edit 1
set name "inbound"
set srcintf "to_HQ2"
set dstintf "dmz"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "outbound"
set srcintf "dmz"
set dstintf "to_HQ2"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
end
b. Configure HQ2:
config firewall policy
edit 1
set name "inbound"
set srcintf "to_HQ1"
set dstintf "port9"
set srcaddr "10.1.100.0"
set dstaddr "172.16.101.0"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "outbound"
set srcintf "port9"
set dstintf "to_HQ1"
set srcaddr "172.16.101.0"
set dstaddr "10.1.100.0"
set action accept
This is a sample configuration of a multiple site-to-site IPsec VPN that uses an IPsec aggregate interface to set up
redundancy and traffic load-balancing. The VPN tunnel interfaces must have net-device disabled in order to be
members of the IPsec aggregate.
Each FortiGate has two WAN interfaces connected to different ISPs. OSPF runs over the IPsec aggregate in this
configuration.
The supported load balancing algorithms are: L3, L4, round-robin (default), weighted round-robin, and redundant. The
first four options allow traffic to be load-balanced, while the last option (redundant) uses the first tunnel that is up for all
traffic.
Dynamic routing can run on the aggregate interface, and it can be a member interface in SD-WAN (not shown in this
configuration).
Phase 1
IP Address 172.16.202.1
Interface port1
IKE Mode Aggressive
Phase 2
Auto-negotiate Enable
Phase 1
IP Address 172.17.202.1
Interface port2
IKE Mode Aggressive
Phase 2
Auto-negotiate Enable
1. Go to VPN > IPsec Tunnels and click Create New > IPsec Aggregate.
2. For Name, enter agg_HQ2.
3. Select a load balancing algorithm.
4. From the Tunnel dropdown, select the tunnels that you created previously (pri_HQ2 and sec_HQ2). If required,
enter weights for each tunnel.
5. Click OK.
Name inbound
Source 172.16.101.0
Destination 10.1.100.0
Schedule always
Action ACCEPT
Service ALL
3. Click OK.
4. Create an outbound traffic policy with the following settings:
Name outbound
Source 10.1.100.0
Destination 172.16.101.0
Schedule always
Action ACCEPT
Service ALL
To configure OSPF:
1. Go to Network > OSPF.
2. For Router ID, enter 1.1.1.1.
3. In the Areas table, click Create New.
a. For Area ID, enter 0.0.0.0.
b. Click OK.
Phase 1
IP Address 172.16.200.1
Interface port25
IKE Mode Aggressive
Phase 2
Auto-negotiate Enable
Phase 1
IP Address 172.17.200.1
Interface port26
IKE Mode Aggressive
Phase 2
Auto-negotiate Enable
1. Go to VPN > IPsec Tunnels and click Create New > IPsec Aggregate.
2. For Name, enter agg_HQ1.
3. Select a load balancing algorithm.
4. From the Tunnel dropdown, select the tunnels that you created previously (pri_HQ1 and sec_HQ1). If required,
enter weights for each tunnel.
5. Click OK.
Name inbound
Source 10.1.100.0
Destination 172.16.101.0
Schedule always
Action ACCEPT
Service ALL
3. Click OK.
4. Create an outbound traffic policy with the following settings:
Name outbound
Source 172.16.101.0
Destination 10.1.100.0
Schedule always
Action ACCEPT
Service ALL
To configure OSPF:
1. Go to Network > OSPF.
2. For Router ID, enter 2.2.2.2.
3. In the Areas table, click Create New.
a. For Area ID, enter 0.0.0.0.
b. Click OK.
4. In the Networks table, click Create New.
a. Set the Area to 0.0.0.0.
b. For IP/Netmask, enter 172.16.101.0/24.
c. Click OK.
d. Click Create New.
e. For IP/Netmask, enter 10.10.10.0/24.
f. Click OK.
5. Click Apply.
1. Go to Dashboard > Network , hover over the IPsec widget, then click Expand to Full Screen.
2. Expand the aggregate tunnel in the table to view statistics for each aggregate member.
To configure OSPF:
To configure OSPF:
name: pri_HQ2
version: 1
interface: port1 11
addr: 172.16.200.1:500 -> 172.16.202.1:500
tun_id: 172.16.202.1
created: 1520s ago
IKE SA: created 1/2 established 1/1 time 10/10/10 ms
IPsec SA: created 2/2 established 1/1 time 0/0/0 ms
id/spi: 173 dcdede154681579b/e32f4c48c4349fc0 direction: responder status: established
1498-1498s ago = 10ms proposal: aes128-sha256 key: d7230a68d7b83def-
588b94495cfa9d38 lifetime/rekey: 86400/84631 DPD sent/recv: 0000000d/00000006
vd: root/0
name: sec_HQ2
version: 1
interface: port2 12
addr: 172.17.200.1:500 -> 172.17.202.1:500
created: 1520s ago
IKE SA: created 1/2 established 1/1 time 10/10/10 ms
IPsec SA: created 2/2 established 1/1 time 0/0/0 ms
id/spi: 174 a567bd7bf02a04b5/4251b6254660aee2 direction: responder status: established
1498-1498s ago = 10ms proposal: aes128-sha256 key: 9f44f500c28d8de6-
febaae9d1e6a164c lifetime/rekey: 86400/84631 DPD sent/recv: 00000008/0000000c
2. Verify the phase 2 IPsec tunnel SAs:
# diagnose vpn tunnel list
list all ipsec tunnel in vd 0
name=sec_HQ2 ver=1 serial=2 172.17.200.1:0->172.17.202.1:0 tun_id=172.17.202.1
bound_if=5 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/512 options[0200]=frag-rfc
run_state=1 accept_traffic=1
proxyid_num=1 child_num=0 refcnt=7 ilast=5 olast=5 ad=/0
stat: rxp=39 txp=40 rxb=5448 txb=2732
dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=15
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=sec_HQ2 proto=0 sa=1 ref=2 serial=2 auto-negotiate
src: 0:0.0.0.0/0.0.0.0:0 dst: 0:0.0.0.0/0.0.0.0:0 SA: ref=3 options=18227 type=00
soft=0 mtu=1438 expire=41230/0B replaywin=2048
seqno=29 esn=0 replaywin_lastseq=00000028 itn=0
life: type=01 bytes=0/0 timeout=42899/43200 dec: spi=1071b4f9 esp=aes key=16
1f4dbb78bea8e97650b52d8170b5ece7
ah=sha1 key=20 cd9bf2de0f49296cf489dd915d7baf6d78bc8f12
enc: spi=ec89b7ee esp=aes key=16 0546efecd0d1b9ba5944f635896e4404
ah=sha1 key=20 34599bc7dc25e1ce63ac9615bd50928ce0667dc8
dec:pkts/bytes=39/2796, enc:pkts/bytes=40/5456
name=pri_HQ2 ver=1 serial=1 172.16.200.1:0->172.16.202.1:0 tun_id=172.16.202.1
bound_if=11 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/512 options[0200]=frag-rfc
run_state=1 accept_traffic=1
proxyid_num=1 child_num=0 refcnt=5 ilast=15 olast=15 ad=/0
stat: rxp=38 txp=39 rxb=5152 txb=2768
dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=20
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=pri_HQ2 proto=0 sa=1 ref=2 serial=2 auto-negotiate
src: 0:0.0.0.0/0.0.0.0:0 dst: 0:0.0.0.0/0.0.0.0:0 SA: ref=3 options=18227 type=00
soft=0 mtu=1438 expire=41231/0B replaywin=2048
seqno=28 esn=0 replaywin_lastseq=00000027 itn=0
life: type=01 bytes=0/0 timeout=42900/43200 dec: spi=1071b4f8 esp=aes key=16
142cce377b3432ba41e64128ade6848c
ah=sha1 key=20 20e64947e2397123f561584321adc0e7aa0c342d
enc: spi=ec89b7ed esp=aes key=16 2ec13622fd60dacce3d28ebe5fe7ab14
To support per-packet load balancing on aggregate dial-up IPsec tunnels between sites, each spoke must be configured
with a location ID. On the hub, per-packet load balancing is performed on the tunnels in the IPsec aggregate that have
the same location ID.
Multiple dial-up VPN tunnels from the same location can be aggregated on the VPN hub and load balanced based on the
configured load balance algorithm.
IPsec traffic cannot be offloaded to the NPU.
Example
In this example, an IPsec aggregate tunnel is formed between two dial-up IPsec tunnels in order to support per-packet
load balancing.
parent=server1 index=0
proxyid_num=1 child_num=0 refcnt=5 ilast=45 olast=45 ad=/0
stat: rxp=17176 txp=17176 rxb=2610752 txb=1442784
dpd: mode=on-idle on=1 idle=60000ms retry=3 count=0 seqno=12
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=server1 proto=0 sa=1 ref=2 serial=1 add-route
src: 0:0.0.0.0-255.255.255.255:0
dst: 0:10.1.100.0-10.1.100.255:0
SA: ref=3 options=2a6 type=00 soft=0 mtu=1438 expire=42342/0B replaywin=2048
seqno=4319 esn=0 replaywin_lastseq=00004319 itn=0 qat=0 hash_search_len=1
life: type=01 bytes=0/0 timeout=43186/43200
dec: spi=0aef2a07 esp=aes key=16 12738c8a1db02c23bfed73eb3615a5a1
ah=sha1 key=20 0f3edd28e3165d184292b4cd397a6edeef9d20dc
enc: spi=2cb75665 esp=aes key=16 982b418e40f0bb18b89916d8c92270c0
ah=sha1 key=20 08cbf9bf78a968af5cd7647dfa2a0db066389929
dec:pkts/bytes=17176/1442784, enc:pkts/bytes=17176/2610752
npu_flag=00 npu_rgwy=172.16.200.1 npu_lgwy=172.16.200.4 npu_selid=6 dec_npuid=0 enc_
npuid=0
------------------------------------------------------
name=server1_1 ver=1 serial=a 172.16.200.4:500->172.16.200.3:500 tun_id=172.16.200.3
dst_mtu=0 dpd-link=on remote_location=2.2.2.2 weight=1
bound_if=4 lgwy=static/1 tun=tunnel/15 mode=dial_inst/3 encap=none/4744 options
[1288]=npu rgwy-chg frag-rfc run_state=0 accept_traffic=1 overlay_id=0
parent=server1 index=1
proxyid_num=1 child_num=0 refcnt=5 ilast=27 olast=27 ad=/0
stat: rxp=0 txp=0 rxb=0 txb=0
dpd: mode=on-idle on=1 idle=60000ms retry=3 count=0 seqno=0
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=server1 proto=0 sa=1 ref=2 serial=1 add-route
src: 0:0.0.0.0-255.255.255.255:0
dst: 0:0.0.0.0-255.255.255.255:0
SA: ref=3 options=2a6 type=00 soft=0 mtu=1280 expire=43167/0B replaywin=2048
seqno=1 esn=0 replaywin_lastseq=00000000 itn=0 qat=0 hash_search_len=1
life: type=01 bytes=0/0 timeout=43187/43200
dec: spi=0aef2a0a esp=aes key=16 4b7a17ba9d239e4ae5fe95ec100fca8b
parent=server2 index=0
proxyid_num=1 child_num=0 refcnt=5 ilast=45 olast=45 ad=/0
stat: rxp=16001 txp=17179 rxb=2113664 txb=1594824
dpd: mode=on-idle on=1 idle=60000ms retry=3 count=0 seqno=12
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=server2 proto=0 sa=1 ref=2 serial=1 add-route
src: 0:0.0.0.0-255.255.255.255:0
dst: 0:10.1.100.0-10.1.100.255:0
SA: ref=6 options=2a6 type=00 soft=0 mtu=1438 expire=42342/0B replaywin=2048
seqno=431a esn=0 replaywin_lastseq=00003e80 itn=0 qat=0 hash_search_len=1
life: type=01 bytes=0/0 timeout=43185/43200
dec: spi=0aef2a08 esp=aes key=16 394d4e444e90ccb5184e744d49aabe3c
ah=sha1 key=20 faabea35c2b9b847461cbd263c4856cfb679f342
enc: spi=2cb75666 esp=aes key=16 0b3a2fbac4d5610670843fa1925d1207
ah=sha1 key=20 97e99beff3d8f61a8638f6ef887006a9c323acd4
dec:pkts/bytes=16001/2113596, enc:pkts/bytes=17179/2762792
npu_flag=03 npu_rgwy=11.101.1.1 npu_lgwy=173.1.1.1 npu_selid=7 dec_npuid=1 enc_npuid=1
3. In the GUI, go to Dashboard > Network and expand the IPsec widget to review the traffic distributed over the
aggregate members:
Configuring FortiGate 1
set algorithm L3
next
end
config system interface
edit "agg1"
set vdom "root"
set ip 172.16.11.1 255.255.255.255
set allowaccess ping
set remote-ip 172.16.11.2 255.255.255.255
end
To configure SD-WAN:
Configuring FortiGate 2
To configure SD-WAN:
Packet distribution for aggregate IPsec tunnels using weighted round robin
A weighted round robin algorithm can be used for IPsec aggregate tunnels to distribute traffic by the weight of each
member tunnel.
In this example, the FortiGate has two IPsec tunnels put into IPsec aggregate. Traffic is distributed among the members,
with one third over tunnel1, and two thirds over tunnel2. To achieve this, the weighted round robin algorithm is selected,
tunnel1 is assigned a weight of 10, and tunnel2 is assigned a weight of 20.
1. Go to VPN > IPsec Tunnels and click Create New > IPsec Tunnel.
2. Complete the wizard to create the tunnel1 and tunnel2 custom IPsec tunnels. Ensure that Aggregate member is
Enabled for each tunnel under the Network > Advanced section.
3. Go to VPN > IPsec Tunnels and click Create New > IPsec Aggregate.
4. Enter a name for the aggregate, such as agg1, and ensure that Algorithm is Weighted Round Robin.
5. Add tunnel1 as an aggregate members, and set Weight to 10.
6. Add tunnel2 as a second aggregate members, and set its Weight to 20.
7. Click OK.
8. To view and monitor the aggregate tunnel statistics, go to the IPsec widget on the Network dashboard.
1. Create the tunnel1 and tunnel2 custom IPsec tunnels with aggregate-member enabled and aggregate-weight set
for both tunnels:
config vpn ipsec phase1-interface
edit "tunnel1"
...
set aggregate-member enable
set aggregate-weight 10
...
next
edit "tunnel2"
...
set aggregate-member enable
set aggregate-weight 20
...
next
end
A redundant hub and spoke configuration allows VPN connections to radiate from a central FortiGate unit (the hub) to
multiple remote peers (the spokes). Traffic can pass between private networks behind the hub and private networks
behind the remote peers. Traffic can also pass between remote peer private networks through the hub.
This is a sample configuration of hub and spoke IPsec VPN. The following applies for this scenario:
l The spokes have two WAN interfaces and two IPsec VPN tunnels for redundancy.
l The secondary VPN tunnel is up only when the primary tunnel is down by dead peer detection.
Because the GUI can only complete part of the configuration, we recommend using the CLI.
To configure redundant hub and spoke VPN using the FortiOS CLI:
set distance 10
set priority 100
next
edit "lan1"
set ip 192.168.4.1 255.255.255.0
next
end
config router static
edit 1
set gateway 172.16.200.2
set device "wan1"
next
end
b. Configure IPsec phase1-interface and phase2-interface.
i. Configure Spoke1.
config vpn ipsec phase1-interface
edit "primary"
set interface "port1"
set peertype any
set net-device enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 172.16.202.1
set psksecret sample
next
edit "secondary"
set interface "wan1"
set peertype any
set net-device enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set remote-gw 172.16.202.1
set monitor "primary"
set psksecret sample
next
end
config vpn ipsec phase2-interface
edit "primary"
set phase1name "primary"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
set src-subnet 10.1.100.0 255.255.255.0
next
edit "secondary"
set phase1name "secondary"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm
aes256gcm chacha20poly1305
set auto-negotiate enable
set src-subnet 10.1.100.0 255.255.255.0
next
end
ii. Configure Spoke2.
config vpn ipsec phase1-interface
edit "primary"
set interface "wan1"
set peertype any
set net-device enable
b. Run the Spoke1 # get router info routing-table static command. The system should return
the following:
Routing table for VRF=0
................
S 172.16.101.0/24 [1/0] is directly connected, primary
Overlay Controller VPN (OCVPN) is a cloud based solution to simplify IPsec VPN setup. When OCVPN is enabled,
IPsec phase1-interfaces, phase2-interfaces, static routes, and firewall policies are generated automatically on all
FortiGates that belong to the same community network. A community network is defined as all FortiGates registered to
FortiCare using the same FortiCare account.
If the network topology changes on any FortiGates in the community (such as changing a public IP address in DHCP
mode, adding or removing protected subnets, failing over in dual WAN), the IPsec-related configuration for all devices is
updated with Cloud assistance in self-learning mode. No intervention is required.
The following topics provide instructions on configuring OCVPN:
l Full mesh OCVPN on page 1423
l Hub-spoke OCVPN with ADVPN shortcut on page 1428
l Hub-spoke OCVPN with inter-overlay source NAT on page 1432
l OCVPN portal on page 1436
l SD-WAN integration with OCVPN on page 618
l Allow FortiClient to join OCVPN on page 1437
l Troubleshooting OCVPN on page 1441
This example shows how to configure a full mesh Overlay Controller VPN (OCVPN), establishing full mesh IPsec tunnels
between all of the FortiGates.
License
l Free license: Three devices full mesh, 10 overlays, 16 subnets per overlay.
l Full License: Maximum of 16 devices, 10 overlays, 16 subnets per overlay.
Prerequisites
l All FortiGates must be running FortiOS 6.2.0 or later.
l All FortiGates must have Internet access.
l All FortiGates must be registered on FortiCare using the same FortiCare account.
Restrictions
l Non-root VDOMs do not support OCVPN.
l FortiOS 6.2.x is not compatible with FortiOS 6.0.x.
Terminology
Poll-interval How often FortiGate tries to fetch OCVPN-related data from OCVPN Cloud.
Subnet Internal network subnet (IPsec protected subnet). Traffic to or from this subnet enters the
IPsec tunnel encrypted by IPsec SA.
Sample topology
The following example shows three FortiGate units registered on FortiCare using the same FortiCare account. Each
FortiGate unit has one internal subnet, and no NAT exists between the units.
Sample configuration
l Branch2:
l Overlay name: QA. Local interfaces: lan1
l Branch3:
l Overlay name: QA. Local subnets: 172.16.101.0/24
The overlay names on each device must be the same for local and remote selector pairs to be
negotiated.
4. Click OK.
1. Configure Branch1:
config vpn ocvpn
set status enable
set multipath disable
config overlays
edit 1
set name "QA"
config subnets
edit 1
set subnet 10.1.100.0 255.255.255.0
next
end
next
edit 2
set name "PM"
config subnets
edit 1
set subnet 10.2.100.0 255.255.255.0
next
end
next
end
end
2. Configure Branch2:
config vpn ocvpn
set status enable
set multipath disable
config overlays
edit 1
set name "QA"
config subnets
edit 1
set type interface
set interface "lan1"
next
end
next
edit 2
set name "PM"
config subnets
edit 1
set type interface
set interface "lan2"
next
end
next
end
end
3. Configure Branch3:
config vpn ocvpn
set status enable
set multipath disable
config overlays
edit 1
set name "QA"
config subnets
edit 1
set subnet 172.16.101.0 255.255.255.0
next
end
next
edit 1
set name "PM"
config subnets
edit 1
set subnet 172.16.102.0 255.255.255.0
next
end
next
end
end
This topic shows a sample configuration of a hub-spoke One-Click VPN (OCVPN) with an Auto Discovery VPN (ADVPN)
shortcut. OCVPN automatically detects the network topology based on members' information. To form a hub-spoke
OCVPN, at least one device must announce its role as the primary hub, another device can work as the secondary hub
(for redundancy), while others function as spokes.
License
l Free license: Hub-spoke network topology not supported.
l Full license: Maximum of 2 hubs, 10 overlays, 64 subnets per overlay; 1024 spokes, 10 overlays, 16 subnets per
overlay.
Prerequisites
l All FortiGates must be running FortiOS 6.2.0 or later.
l All FortiGates must have Internet access.
l All FortiGates must be registered on FortiCare using the same FortiCare account.
Restrictions
l Non-root VDOMs do not support OCVPN.
l FortiOS 6.2.x is not compatible with FortiOS 6.0.x.
Sample topology
Sample configuration
The steps below use the following overlays and subnets for the sample configuration:
l Primary hub:
l Overlay name: QA. Local subnets: 172.16.101.0/24
l Secondary hub:
l Overlays are synced from primary hub.
l Spoke1:
l Overlay name: QA. Local subnets: 10.1.100.0/24
l Spoke2:
l Overlay name: QA. Local interfaces: lan1
The overlay names on each device must be the same for local and remote selector pairs to be
negotiated.
d. Specify the Name, Local subnets, and/or Local interfaces. Then click OK.
e. Click Apply to commit the configuration.
edit 1
set name "QA"
config subnets
edit 1
set subnet 10.1.100.0 255.255.255.0
next
end
next
edit 2
set name "PM"
config subnets
edit 1
set subnet 10.2.100.0 255.255.255.0
next
end
next
end
end
This topic shows a sample configuration of hub-spoke OCVPN with inter-overlay source NAT. OCVPN isolates traffic
between overlays by default. With NAT enabled on spokes and assign-ip enabled on hub, you can have inter-overlay
communication.
Inter-overlay communication means devices from any source addresses and any source interfaces can communicate
with any devices in overlays' subnets when the overlay option assign-ip is enabled.
You must first disable auto-discovery before you can enable NAT.
License
l Free license: Hub-spoke network topology not supported.
l Full License: Maximum of 2 hubs, 10 overlays, 64 subnets per overlay; 1024 spokes, 10 overlays, 16 subnets per
overlay.
Prerequisites
l All FortiGates must be running FortiOS 6.2.0 or later.
l All FortiGates must have Internet access.
l All FortiGates must be registered on FortiCare using the same FortiCare account.
Restrictions
l Non-root VDOMs do not support OCVPN.
l FortiOS 6.2.x is not compatible with FortiOS 6.0.x.
Sample topology
Sample configuration
The overlay names on each device must be the same for local and remote selector pairs to be
negotiated.
1. Configure the primary hub, enable overlay QA, and configure assign-ip and IP range:
config vpn ocvpn
set status enable
set role primary-hub
config overlays
edit 1
set name "QA"
set assign-ip enable
set ipv4-start-ip 172.16.101.100
set ipv4-end-ip 172.16.101.200
config subnets
edit 1
set subnet 172.16.101.0 255.255.255.0
next
end
next
edit 2
set name "PM"
set assign-ip enable
config subnets
edit 1
set subnet 172.16.102.0 255.255.255.0
next
end
next
end
end
next
end
next
end
end
OCVPN portal
When you log into the OCVPN portal, the OCVPN license type and device information display. The device information
includes the device serial number, OCVPN role, hostname, public IP address, port number, and overlays.
You can unregister an OCVPN device from the OCVPN portal under Device on the right pane.
Administrators can configure remote access for FortiClient within an OCVPN hub. This provides simple configurations to
allow a user group access to an overlay network.
1. On the primary hub, configure the users and user groups required for the FortiClient dialup user authentication and
authorization. In this example, there are two user groups (dev_grp and qa_grp).
2. Go to VPN > Overlay Controller VPN and in the Overlays section, click Create New.
3. Enter a name and the local subnet (174.16.101.0/24 for dev and 22.202.2.0/24 for qa).
4. Enable FortiClient Access.
5. In the Access Rules section, click Create New.
6. Enter a name, and select the authentication groups and overlays.The authentication groups will be used by the
IPsec phase 1 interface for authentication, and by firewall policies for authorization. The overlay allows access to
the resource.
7. Click OK.
8. Create more rules if needed.
9. Click Apply.
edit "qa"
config subnets
edit 1
set subnet 22.202.2.0 255.255.255.0
next
end
next
end
config forticlient-access
set status enable
set psksecret xxxxxxxxxxxx
config auth-groups
edit "dev"
set auth-group "dev_grp"
set overlays "dev"
next
edit "qa"
set auth-group "qa_grp"
set overlays "qa"
next
end
end
end
vd: root/0
name: _OCVPN_FCT0_0
version: 1
interface: mgmt1 4
addr: 172.16.200.4:4500 -> 172.16.200.15:64916
tun_id: 172.16.200.15
created: 110s ago
xauth-user: usera
groups:
dev_grp 1
assigned IPv4 address: 10.254.128.1/255.255.255.255
nat: peer
IKE SA: created 1/1 established 1/1 time 20/20/20 ms
IPsec SA: created 1/1 established 1/1 time 0/0/0 ms
id/spi: 72 1ccd2abf2d981123/fd8da107f9e4d312
direction: responder
status: established 110-110s ago = 20ms
proposal: aes256-sha256
key: 105a0291b0c05219-3decdf78938a7bea-78943651e1720536-625114d66e46f668
lifetime/rekey: 86400/86019
DPD sent/recv: 00000000/00000af3
The PC can access the dev resource overlay, but not qa:
C:\Users\tester>ping 174.16.101.44
C:\Users\tester>ping 22.202.2.2
Troubleshooting OCVPN
This document includes troubleshooting steps for the following OCVPN network topologies:
l Full mesh OCVPN.
l Hub-spoke OCVPN with ADVPN shortcut.
l Hub-spoke OCVPN with inter-overlay source NAT.
For OCVPN configurations in other network topologies, see the other OCVPN topics.
frag-rfc accept_traffic=1
dst: 0:192.168.5.0-192.168.5.255:0
SA: ref=3 options=18627 type=00 soft=0 mtu=1438 expire=42923/0B replaywin=2048
seqno=1 esn=0 replaywin_lastseq=00000000 itn=0 qat=0
life: type=01 bytes=0/0 timeout=42930/43200
dec: spi=c34bb753 esp=aes key=16 58ddfad9a3699f1c49f3a9f369145c28
ah=sha1 key=20 e749c7e6a7aaff119707c792eb73cd975127873b
enc: spi=b5bd4fe2 esp=aes key=16 8f2366e653f5f9ad6587be1ce1905764
ah=sha1 key=20 5347bf24e51219d483c0f7b058eceab202026204
dec:pkts/bytes=0/0, enc:pkts/bytes=0/0
proxyid=_OCVPN2-3.2 proto=0 sa=0 ref=2 serial=1 auto-negotiate
src: 0:10.2.100.0/255.255.255.0:0
dst: 0:0.0.0.0/0.0.0.0:0
------------------------------------------------------
name=_OCVPN2-4.2 ver=2 serial=5 172.16.200.1:0->172.16.200.4:0 tun_id=172.16.200.4 dst_
mtu=1500
bound_if=11 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/528 options[0210]=create_dev
frag-rfc accept_traffic=1
mtu=1500
bound_if=11 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/528 options[0210]=create_dev
frag-rfc accept_traffic=1
l Generate traffic from spoke1 to spoke2 to trigger the ADVPN shortcut and check the VPN tunnel and routing-table
again on spoke1.
branch1 # diagnose vpn tunnel list
list all ipsec tunnel in vd 0
------------------------------------------------------
name=_OCVPN2-0.0_0 ver=2 serial=a 172.16.200.1:0->172.16.200.3:0 tun_id=172.16.200.3
dst_mtu=1500
bound_if=11 lgwy=static/1 tun=intf/0 mode=dial_inst/3 encap=none/720 options
[02d0]=create_dev no-sysctl rgwy-chg frag-rfc accept_traffic=1
parent=_OCVPN2-0.0 index=0
proxyid_num=1 child_num=0 refcnt=14 ilast=0 olast=0 ad=r/2
stat: rxp=7 txp=7 rxb=1064 txb=588
dpd: mode=on-idle on=1 idle=20000ms retry=3 count=0 seqno=0
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=_OCVPN2-0.0 proto=0 sa=1 ref=2 serial=1 auto-negotiate add-route adr
src: 0:10.1.100.0-10.1.100.255:0
dst: 0:192.168.4.0-192.168.4.255:0
SA: ref=3 options=1a227 type=00 soft=0 mtu=1438 expire=43180/0B replaywin=2048
seqno=8 esn=0 replaywin_lastseq=00000008 itn=0 qat=0
life: type=01 bytes=0/0 timeout=43187/43200
dec: spi=048477c9 esp=aes key=16 27c35d53793013ef24cf887561e9f313
ah=sha1 key=20 2c8cfd328c3b29104db0ca74a00c6063f46cafe4
enc: spi=fb9e13fd esp=aes key=16 9d0d3bf6c84b7ddaf9d9196fe74002ed
dec:pkts/bytes=0/0, enc:pkts/bytes=0/0
------------------------------------------------------
name=_OCVPN2-1.1 ver=2 serial=7 172.16.200.1:0->172.16.200.2:0 tun_id=172.16.200.2 dst_
mtu=1500
bound_if=11 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/528 options[0210]=create_dev
frag-rfc accept_traffic=0
l Simulate the primary hub being unavailable where all spokes' dialup VPN tunnels will switch to the secondary hub,
to check VPN tunnel status and routing-table.
list all ipsec tunnel in vd 0
------------------------------------------------------
name=_OCVPN2-0.0 ver=2 serial=6 172.16.200.1:0->172.16.200.4:0 tun_id=172.16.200.4 dst_
mtu=1500
bound_if=11 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/528 options[0210]=create_dev
frag-rfc accept_traffic=0
edit 9
set name "_OCVPN2-1.1_nat"
set uuid 3f7a84b8-3d36-51e9-ee97-8f418c91e666
set srcintf "any"
set dstintf "_OCVPN2-1.1"
set srcaddr "all"
set dstaddr "_OCVPN2-1.1_remote_networks"
set action accept
set schedule "always"
set service "ALL"
set comments "Generated by OCVPN Cloud Service."
set nat enable
next
edit 12
set name "_OCVPN2-1.0_nat"
set uuid 3fafec98-3d36-51e9-80c0-5d99325bad83
set srcintf "any"
set dstintf "_OCVPN2-1.0"
set srcaddr "all"
set dstaddr "_OCVPN2-1.0_remote_networks"
set action accept
set schedule "always"
set service "ALL"
ADVPN
Auto-Discovery VPN (ADVPN) allows the central hub to dynamically inform spokes about a better path for traffic
between two spokes.
The following topics provide instructions on configuring ADVPN:
l IPsec VPN wizard hub-and-spoke ADVPN support on page 1454
l ADVPN with BGP as the routing protocol on page 1458
l ADVPN with OSPF as the routing protocol on page 1467
l ADVPN with RIP as the routing protocol on page 1476
l UDP hole punching for spokes behind NAT on page 1485
When using the IPsec VPN wizard to create a hub and spoke VPN, multiple local interfaces can be selected. At the end
of the wizard, changes can be reviewed, real-time updates can be made to the local address group and tunnel interface,
and easy configuration keys can be copied for configuring the spokes.
When editing a VPN tunnel, the Hub & Spoke Topology section provides access to the easy configuration keys for the
spokes, and allows you to add more spokes.
This example shows the configuration of a hub with two spokes.
Name hub
Role Hub
b. Authentication:
c. Tunnel Interface:
Tunnel IP 10.10.1.1
Local AS 65400
e. Review Settings:
Confirm that the settings look correct, then click Create.
3. The summary shows details about the set up hub:
l The Local address group and Tunnel interface can be edited directly on this page.
l Spoke easy configuration keys can be used to quickly configure the spokes.
Name spoke1
Role Spoke
3. In the Easy configuration key field, paste the Spoke #1 key from the hub FortiGate, click Apply, then click Next.
4. Adjust the Authentication settings as required, enter the Pre-shared key, then click Next.
5. Adjust the Tunnel Interface settings as required, then click Next.
6. Configure the Policy & Routing settings, then click Next:
1. On the hub FortiGate, go to Dashboard > Network and expand the IPsec widget.
The tunnels to the spokes are established.
This is a sample configuration of ADVPN with BGP as the routing protocol. The following options must be enabled for
this configuration:
l On the hub FortiGate, IPsec phase1-interface net-device disable must be run.
l IBGP must be used between the hub and spoke FortiGates.
l bgp neighbor-group/neighbor-range must be reused.
To configure ADVPN with BGP as the routing protocol using the CLI:
1. Configure hub FortiGate WAN interface, internal interface, and a static route:
config system interface
edit "port9"
set alias "WAN"
set ip 22.1.1.1 255.255.255.0
next
edit "port10"
set alias "Internal"
set ip 172.16.101.1 255.255.255.0
next
end
config router static
edit 1
set gateway 22.1.1.2
set device "port9"
next
end
When net-device is disabled, a tunnel ID is generated for each dynamic tunnel. This
ID, in the form of an IP address, is used as the gateway in the route entry to that tunnel.
The tunnel-search option is removed in FortiOS 7.0.0 and later.
next
end
config router static
edit 1
set gateway 12.1.1.1
set device "wan2"
set distance 15
next
edit 2
set gateway 15.1.1.1
set device "wan1"
next
end
edit "spoke1_backup"
set interface "wan2"
set peertype any
set net-device enable
set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
set add-route disable
set dpd on-idle
set auto-discovery-receiver enable
set remote-gw 22.1.1.1
set monitor "spoke1"
set psksecret sample
set dpd-retryinterval 5
next
end
config vpn ipsec phase2-interface
edit "spoke1"
set phase1name "spoke1"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256
aes128gcm aes256gcm chacha20poly1305
set auto-negotiate enable
next
edit "spoke1_backup"
set phase1name "spoke1_backup"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256
aes128gcm aes256gcm chacha20poly1305
set auto-negotiate enable
next
end
end
config vpn ipsec phase2-interface
edit "spoke2"
set phase1name "spoke2"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256
aes128gcm aes256gcm chacha20poly1305
set auto-negotiate enable
next
edit "spoke2_backup"
set phase1name "spoke2_backup"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256
aes128gcm aes256gcm chacha20poly1305
set auto-negotiate enable
next
end
4. Run diagnose and get commands on Spoke1 to check VPN and BGP states:
a. Run the diagnose vpn tunnel list command on Spoke1. The system should return the following:
list all ipsec tunnel in vd 0
----
name=spoke1 ver=1 serial=2 15.1.1.2:0->22.1.1.1:0 tun_id=22.1.1.1
bound_if=7 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/536 options[0218]=npu
create_dev frag-rfc accept_traffic=1
b. Run the get router info bgp summary command on Spoke1. The system should return the following:
Neighbor V AS [[QualityAssurance62/MsgRcvd]]
[[QualityAssurance62/MsgSent]] [[QualityAssurance62/TblVer]] InQ OutQ Up/Down
State/PfxRcd
10.10.10.254 1. 65412 143 142 1. 1. 1.
00:24:45 2
c. Run the get router info routing-table bgp command on Spoke1. The system should return the
following:
Routing table for VRF=0
B 172.16.101.0/24 [200/0] via 10.10.10.254, spoke1, 00:23:57
B 192.168.4.0/24 [200/0] via 10.10.10.254, spoke1, 00:22:03
d. Generate traffic between the spokes and check the shortcut tunnel and routing table. Run the diagnose vpn
tunnel list command on Spoke1. The system should return the following:
list all ipsec tunnel in vd 0
----
name=spoke1 ver=1 serial=2 15.1.1.2:0->22.1.1.1:0 tun_id=22.1.1.1
bound_if=7 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/536 options[0218]=npu
create_dev frag-rfc accept_traffic=1
----
name=spoke1_0 ver=1 serial=9 15.1.1.2:4500->13.1.1.2:4500 tun_id=13.1.1.2
bound_if=7 lgwy=static/1 tun=intf/0 mode=dial_inst/3 encap=none/728 options[02d8]=npu
create_dev no-sysctl rgwy-chg frag-rfc accept_traffic=1
parent=spoke1 index=0
proxyid_num=1 child_num=0 refcnt=17 ilast=4 olast=4 ad=r/2
stat: rxp=1 txp=100 rxb=112 txb=4686
dpd: mode=on-idle on=1 idle=5000ms retry=3 count=0 seqno=231
natt: mode=keepalive draft=32 interval=10 remote_port=4500
proxyid=spoke1 proto=0 sa=1 ref=5 serial=1 auto-negotiate adr
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
SA: ref=6 options=1a227 type=00 soft=0 mtu=1422 expire=447/0B replaywin=1024
seqno=65 esn=0 replaywin_lastseq=00000002 itn=0
life: type=01 bytes=0/0 timeout=2368/2400
dec: spi=c53a8f5c esp=aes key=16 73fd9869547475db78851e6c057ad9b7
ah=sha1 key=20 6ad3a5b1028f6b33c82ba494a370f13c7f462635
enc: spi=79cb0f2b esp=aes key=16 52ab0acdc830d58c00e5956a6484654a
ah=sha1 key=20 baa82aba4106dc60618f6fe95570728656799239
dec:pkts/bytes=1/46, enc:pkts/bytes=100/11568
npu_flag=03 npu_rgwy=13.1.1.2 npu_lgwy=15.1.1.2 npu_selid=5 dec_npuid=1 enc_npuid=1
e. Run the get router info routing-tale bgp command. The system should return the following:
Routing table for VRF=0
B 172.16.101.0/24 [200/0] via 10.10.10.254, spoke1, 00:23:57
B 192.168.4.0/24 [200/0] via 10.10.10.3, spoke1_0 , 00:22:03
This is a sample configuration of ADVPN with OSPF as the routing protocol. The following options must be enabled for
this configuration:
l On the hub FortiGate, IPsec phase1-interface net-device enable must be run.
l OSPF must be used between the hub and spoke FortiGates.
To configure ADVPN with OSPF as the routing protocol using the CLI:
When net-device is disabled, a tunnel ID is generated for each dynamic tunnel. This
ID, in the form of an IP address, is used as the gateway in the route entry to that tunnel.
The tunnel-search option is removed in FortiOS 7.0.0 and later.
end
end
4. Run diagnose and get commands on Spoke1 to check VPN and OSPF states:
a. Run the diagnose vpn tunnel list command on Spoke1. The system should return the following:
list all ipsec tunnel in vd 0
----
name=spoke1 ver=1 serial=2 15.1.1.2:0->22.1.1.1:0 tun_id=22.1.1.1
bound_if=7 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/536 options[0218]=npu
create_dev frag-rfc accept_traffic=1
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
b. Run the get router info ospf neighbor command on Spoke1. The system should return the following:
OSPF process 0, VRF 0: Neighbor ID Pri State Dead Time Address Interface 8.8.8.8 1.
Full/ - 00:00:35 10.10.10.254 spoke1 1.1.1.1 1. Full/ - 00:00:35 10.10.10.254 spoke1
c. Run the get router info routing-table ospf command on Spoke1. The system should return the
following:
Routing table for VRF=0
O 172.16.101.0/24 [110/110] via 10.10.10.254, spoke1, 00:23:23
O 192.168.4.0/24 [110/110] via 10.10.10.254, spoke1, 00:22:35
d. Generate traffic between the spokes, then check the shortcut tunnel and routing table. Run the diagnose
vpn tunnel list command on Spoke1. The system should return the following:
list all ipsec tunnel in vd 0
----
----
name=spoke1 ver=1 serial=2 15.1.1.2:0->22.1.1.1:0 tun_id=22.1.1.1
bound_if=7 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/536 options[0218]=npu
create_dev frag-rfc accept_traffic=1
parent=spoke1 index=0
proxyid_num=1 child_num=0 refcnt=19 ilast=4 olast=2 ad=r/2
stat: rxp=641 txp=1254 rxb=278648 txb=161536
dpd: mode=on-idle on=1 idle=5000ms retry=3 count=0 seqno=184
natt: mode=keepalive draft=32 interval=10 remote_port=4500
proxyid=spoke1_backup proto=0 sa=1 ref=10 serial=1 auto-negotiate adr
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
SA: ref=6 options=1a227 type=00 soft=0 mtu=1422 expire=922/0B replaywin=1024
seqno=452 esn=0 replaywin_lastseq=00000280 itn=0
life: type=01 bytes=0/0 timeout=2370/2400
dec: spi=c53a8f79 esp=aes key=16 324f8cf840ba6722cc7abbba46b34e0e
ah=sha1 key=20 a40e9aac596b95c4cd83a7f6372916a5ef5aa505
enc: spi=ef3327b5 esp=aes key=16 5909d6066b303de4520d2b5ae2db1b61
ah=sha1 key=20 1a42f5625b5a335d8d5282fe83b5d6c6ff26b2a4
dec:pkts/bytes=641/278568, enc:pkts/bytes=1254/178586
npu_flag=03 npu_rgwy=13.1.1.2 npu_lgwy=15.1.1.2 npu_selid=a dec_npuid=1 enc_npuid=1
e. Run the get router info routing-tale ospf command. The system should return the following:
Routing table for VRF=0
O 172.16.101.0/24 [110/110] via 10.10.10.254, spoke1, 00:27:14
O 192.168.4.0/24 [110/110] via 10.10.10.3, spoke1_0, 00:26:26
This is a sample configuration of ADVPN with RIP as routing protocol. The following options must be enabled for this
configuration:
l On the hub FortiGate, IPsec phase1-interface net-device disable must be run.
l RIP must be used between the hub and spoke FortiGates.
l split-horizon-status enable must be run on the hub FortiGate.
To configure ADVPN with RIP as the routing protocol using the CLI:
1. In the CLI, configure hub FortiGate's WAN, internal interface, and static route:
config system interface
edit "port9"
set alias "WAN"
set ip 22.1.1.1 255.255.255.0
next
edit "port10"
set alias "Internal"
set ip 172.16.101.1 255.255.255.0
next
end
config router static
edit 1
set gateway 22.1.1.2
set device "port9"
next
end
When net-device is disabled, a tunnel ID is generated for each dynamic tunnel. This
ID, in the form of an IP address, is used as the gateway in the route entry to that tunnel.
The tunnel-search option is removed in FortiOS 7.0.0 and later.
edit "wan2"
set alias "secondary_WAN"
set ip 12.1.1.2 255.255.255.0
next
edit "internal"
set ip 10.1.100.1 255.255.255.0
next
end
config router static
edit 1
set gateway 12.1.1.1
set device "wan2"
set distance 15
next
edit 2
set gateway 15.1.1.1
set device "wan1"
next
end
b. Run the get router info rip database command on Spoke1. The system should return the following:
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, K - Kernel,
C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP
c. Run the get router info routing-table rip command on Spoke1. The system should return the
following:
Routing table for VRF=0
R 172.16.101.0/24 [120/2] via 10.10.10.254, spoke1, 00:08:38
R 192.168.4.0/24 [120/3] via 10.10.10.254, spoke1, 00:08:38
d. Generate traffic between the spokes, then check the shortcut tunnel and routing table. Run the diagnose
vpn tunnel list command on Spoke1. The system should return the following:
list all ipsec tunnel in vd 0
----
name=spoke1 ver=1 serial=2 15.1.1.2:0->22.1.1.1:0 tun_id=22.1.1.1
bound_if=7 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/536 options[0218]=npu
create_dev frag-rfc accept_traffic=1
parent=spoke1 index=0
proxyid_num=1 child_num=0 refcnt=20 ilast=2 olast=0 ad=r/2
stat: rxp=1 txp=7 rxb=112 txb=480
dpd: mode=on-idle on=1 idle=5000ms retry=3 count=0 seqno=0
natt: mode=keepalive draft=32 interval=10 remote_port=4500
e. Run the get router info routing-tale rip command. The system should return the following:
Routing table for VRF=0
R 172.16.101.0/24 [120/2] via 10.10.10.254, spoke1, 00:09:04
R 192.168.4.0/24 [120/2] via 10.10.10.3, spoke1_0, 00:00:02
UDP hole punching allows ADVPN shortcuts to be established through a UDP hole on a NAT device. The NAT device
must support RFC 4787 Endpoint-Independent Mapping.
In the following example, device 10.1.100.11 behind Spoke1 needs to reach device 192.168.4.33 behind Spoke2.
Spoke1 and Spoke2 are behind NAT devices and have established IPsec tunnels to the Hub. The hole punching creates
a shortcut between Spoke1 and Spoke2 that bypasses the Hub.
To verify the ADVPN shortcut is established between both spokes behind NAT:
id/spi: 35 3c10fb6a76f1e264/6c7b397100dffc63
direction: initiator
status: established 503-503s ago = 0ms
proposal: aes128-sha256
key: 7fca86063ea2e72f-4efea6f1bec23948
lifetime/rekey: 86400/85596
vd: root/0
name: toHub1_0
version: 1
interface: wan2 6
addr: 12.1.1.2:4500 -> 55.1.1.2:64916
created: 208s ago
nat: me peer
auto-discovery: 2 receiver
IKE SA: created 1/1 established 1/1 time 20/20/20 ms
IPsec SA: created 1/1 established 1/1 time 10/10/10 ms
id/spi: 48 d3fdd1bfbc94caee/16a1eb5b0f37ee23
direction: initiator
status: established 208-208s ago = 20ms
proposal: aes128-sha256
key: 9bcac400d8e14e11-fffde33eaa3a8263
lifetime/rekey: 86400/85891
DPD sent/recv: 0000000a/00000000
1. Check the device ASIC information. For example, a FortiGate 900D has an NP6 and a CP8.
# get hardware status
Model name: [[QualityAssurance62/FortiGate]]-900D
ASIC version: CP8
ASIC SRAM: 64M
CPU: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz
Number of CPUs: 4
RAM: 16065 MB
Compact Flash: 1925 MB /dev/sda
3. Configure the option in IPsec phase1 settings to control NPU encrypt/decrypt IPsec packets (enabled by default).
config vpn ipsec phase1/phase1-interface
edit "vpn_name"
set npu-offload enable/disable
next
end
4. Check NPU offloading. The NPU encrypted/decrypted counter should tick. The npu_flag 03 flag means that the
traffic processed by the NPU is bi-directional.
# diagnose vpn tunnel list
list all ipsec tunnel in vd 0
----
name=test ver=2 serial=1 173.1.1.1:0->11.101.1.1:0 tun_id=11.101.1.1
bound_if=42 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/8 options[0008]=npu
proxyid_num=1 child_num=0 refcnt=14 ilast=2 olast=2 ad=/0
stat: rxp=12231 txp=12617 rxb=1316052 txb=674314
dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=0
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=test proto=0 sa=1 ref=4 serial=7
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
SA: ref=6 options=10626 type=00 soft=0 mtu=1438 expire=42921/0B replaywin=2048
seqno=802 esn=0 replaywin_lastseq=00000680 itn=0
life: type=01 bytes=0/0 timeout=42930/43200
dec: spi=e313ac46 esp=aes key=16 0dcb52642eed18b852b5c65a7dc62958
ah=md5 key=16 c61d9fe60242b9a30e60b1d01da77660
enc: spi=706ffe03 esp=aes key=16 6ad98c204fa70545dbf3d2e33fb7b529
ah=md5 key=16 dcc3b866da155ef73c0aba15ec530e2e
dec:pkts/bytes=1665/16352, enc:pkts/bytes=2051/16826
npu_flag=03 npu_rgwy=11.101.1.1 npu_lgwy=173.1.1.1 npu_selid=6 dec_npuid=2 enc_npuid=2
NP6_1:
Encryption (encrypted/decrypted)
null : 14976 15357
des : 0 1.
3des : 0 1.
aes : 1664 2047
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 1664 2047
sha1 : 14976 15357
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
CP8:
Encryption (encrypted/decrypted)
null : 1 1.
des : 0 1.
3des : 0 1.
aes : 1 1.
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 1 1.
sha1 : 1 1.
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
SOFTWARE:
Encryption (encrypted/decrypted)
null : 0 1.
des : 0 1.
3des : 0 1.
aes : 0 1.
aes-gcm : 29882 29882
aria : 21688 21688
seed : 153774 153774
chacha20poly1305 : 29521 29521
Integrity (generated/validated)
5. If traffic cannot be offloaded by the NPU, the CP will try to encrypt/decrypt the IPsec packets.
NP6_1:
Encryption (encrypted/decrypted)
CP8:
Encryption (encrypted/decrypted)
null : 1 1.
des : 0 1.
3des : 0 1.
aes : 8499 8499
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 8499 8499
sha1 : 1 1.
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
SOFTWARE:
Encryption (encrypted/decrypted)
null : 0 1.
des : 0 1.
3des : 0 1.
aes : 0 1.
aes-gcm : 29882 29882
aria : 21688 21688
seed : 153774 153774
chacha20poly1305 : 29521 29521
Integrity (generated/validated)
null : 59403 59403
md5 : 0 1.
sha1 : 175462 175462
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
2. Two options are used to control if the CP processes packets. If disabled, packets are processed by the CPU.
config system global
set ipsec-asic-offload disable
set ipsec-hmac-offload disable
end
IPsec traffic might be processed by the CPU for the following reasons:
l Some low end models do not have NPUs.
l NPU offloading and CP IPsec traffic processing manually disabled.
l Some types of proposals - SEED, ARIA, chacha20poly1305 - are not supported by the NPU or CP.
l NPU flag set to 00 and software encrypt/decrypt counter ticked.
# diagnose vpn tunnel list
list all ipsec tunnel in vd 0
----
name=test ver=2 serial=1 173.1.1.1:0->11.101.1.1:0 tun_id=11.101.1.1
bound_if=42 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/0
proxyid_num=1 child_num=0 refcnt=14 ilast=0 olast=0 ad=/0
stat: rxp=12162 txp=12162 rxb=1691412 txb=1008216
dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=0
natt: mode=none draft=0 interval=0 remote_port=0
proxyid=test proto=0 sa=1 ref=4 serial=8
src: 0:0.0.0.0/0.0.0.0:0
dst: 0:0.0.0.0/0.0.0.0:0
SA: ref=3 options=10602 type=00 soft=0 mtu=1453 expire=42903/0B replaywin=2048
seqno=2d70 esn=0 replaywin_lastseq=00002d70 itn=0
life: type=01 bytes=0/0 timeout=42931/43200
dec: spi=e313ac4d esp=chacha20poly1305 key=36
812d1178784c1130d1586606e44e1b9ab157e31a09edbed583be1e9cc82e8c9f2655a2cf
ah=null key=0
enc: spi=706ffe0a esp=chacha20poly1305 key=36
f2727e001e2243549b140f1614ae3df82243adb070e60c33911f461b389b05a7a642e11a
ah=null key=0
dec:pkts/bytes=11631/976356, enc:pkts/bytes=11631/1627692
npu_flag=00 npu_rgwy=11.101.1.1 npu_lgwy=173.1.1.1 npu_selid=7 dec_npuid=0 enc_npuid=0
Encryption (encrypted/decrypted)
null : 0 1.
des : 0 1.
3des : 0 1.
aes : 0 1.
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 0 1.
sha1 : 0 1.
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
NP6_1:
Encryption (encrypted/decrypted)
null : 14976 15357
des : 0 1.
3des : 0 1.
aes : 1664 2047
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 1664 2047
sha1 : 14976 15357
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
CP8:
Encryption (encrypted/decrypted)
null : 1 1.
des : 0 1.
3des : 0 1.
aes : 8865 8865
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 8865 8865
sha1 : 1 1.
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
SOFTWARE:
Encryption (encrypted/decrypted)
null : 0 1.
des : 0 1.
3des : 0 1.
aes : 531 531
aes-gcm : 29882 29882
aria : 21688 21688
seed : 153774 153774
chacha20poly1305 : 41156 41156
Integrity (generated/validated)
null : 71038 71038
md5 : 531 531
sha1 : 175462 175462
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
When auto-asic-offload is set to disable in the firewall policy, traffic is not offloaded and the NPU hosting counter
is ticked.
# diagnose vpn ipsec status
All ipsec crypto devices in use:
NP6_0:
Encryption (encrypted/decrypted)
null : 0 1.
des : 0 1.
3des : 0 1.
aes : 0 1.
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 0 1.
sha1 : 0 1.
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
NP6_1:
Encryption (encrypted/decrypted)
null : 14976 15357
des : 0 1.
3des : 0 1.
aes : 110080 2175
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 110080 2175
sha1 : 14976 15357
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
CP8:
Encryption (encrypted/decrypted)
null : 1 1.
des : 0 1.
3des : 0 1.
aes : 8865 8865
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 8865 8865
sha1 : 1 1.
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
SOFTWARE:
Encryption (encrypted/decrypted)
null : 0 1.
des : 0 1.
3des : 0 1.
aes : 539 539
aes-gcm : 29882 29882
aria : 21688 21688
seed : 153774 153774
chacha20poly1305 : 41259 41259
Integrity (generated/validated)
null : 71141 71141
md5 : 539 539
sha1 : 175462 175462
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
Encryption algorithms
This topic provides a brief introduction to IPsec phase 1 and phase 2 encryption algorithms and includes the following
sections:
l IKEv1 phase 1 encryption algorithm
l IKEv1 phase 2 encryption algorithm
l IKEv2 phase 1 encryption algorithm
l IKEv2 phase 2 encryption algorithm
l HMAC settings
DES is a symmetric-key algorithm, which means the same key is used for encrypting and decrypting data. FortiOS
supports:
l des-md5
l des-sha1
l des-sha256
l des-sha384
l des-sha512
3DES applies the DES algorithm three times to each data. FortiOS supports:
l 3des-md5
l 3des-sha1
l 3des-sha256
l 3des-sha384
l 3des-sha512
AES is a symmetric-key algorithm with different key lengths (128, 192, and 256 bits). FortiOS supports:
l aes128-md5
l aes128-sha1
l aes128-sha256
l aes128-sha384
l aes128-sha512
l aes192-md5
l aes192-sha1
l aes192-sha256
l aes192-sha384
l aes192-sha512
l aes256-md5
l aes256-sha1
l aes256-sha256
l aes256-sha384
l aes256-sha512
The ARIA algorithm is based on AES with different key lengths (128, 192, and 256 bits). FortiOS supports:
l aria128-md5
l aria128-sha1
l aria128-sha256
l aria128-sha384
l aria128-sha512
l aria192-md5
l aria192-sha1
l aria192-sha256
l aria192-sha384
l aria192-sha512
l aria256-md5
l aria256-sha1
l aria256-sha256
l aria256-sha384
l aria256-sha512
SEED is a symmetric-key algorithm. FortiOS supports:
l seed128-md5
l seed128-sha1
l seed128-sha256
l seed128-sha384
l seed128-sha512
Suite-B is a set of AES encryption with ICV in GCM mode. FortiOS supports Suite-B on new kernel platforms only. IPsec
traffic cannot offload to NPU. CP9 supports Suite-B offloading, otherwise packets are encrypted and decrypted by
software. FortiOS supports:
l suite-b-gcm-128
l suite-b-gcm-256
With null encryption, IPsec traffic can offload NPU/CP. FortiOS supports:
l null-md5
l null-sha1
l null-sha256
l null-sha384
l null-sha512
With the DES encryption algorithm, IPsec traffic can offload NPU/CP. FortiOS supports:
l des-null
l des-md5
l des-sha1
l des-sha256
l des-sha384
l des-sha512
With the 3DES encryption algorithm, IPsec traffic can offload NPU/CP. FortiOS supports:
l 3des-null
l 3des-md5
l 3des-sha1
l 3des-sha256
l 3des-sha384
l 3des-sha512
With the AES encryption algorithm, IPsec traffic can offload NPU/CP. FortiOS supports:
l aes128-null
l aes128-md5
l aes128-sha1
l aes128-sha256
l aes128-sha384
l aes128-sha512
l aes192-null
l aes192-md5
l aes192-sha1
l aes192-sha256
l aes192-sha384
l aes192-sha512
l aes256-null
l aes256-md5
l aes256-sha1
l aes256-sha256
l aes256-sha384
l aes256-sha512
With the AESGCM encryption algorithm, IPsec traffic cannot offload NPU/CP. FortiOS supports:
l aes128gcm
l aes256gcm
With the chacha20poly1305 encryption algorithm, IPsec traffic cannot offload NPU/CP. FortiOS supports:
l chacha20poly1305
With the ARIA encryption algorithm, IPsec traffic cannot offload NPU/CP. FortiOS supports:
l aria128-null
l aria128-md5
l aria128-sha1
l aria128-sha256
l aria128-sha384
l aria128-sha512
l aria192-null
l aria192-md5
l aria192-sha1
l aria192-sha256
l aria192-sha384
l aria192-sha512
l aria256-null
l aria256-md5
l aria256-sha1
l aria256-sha256
l aria256-sha384
l aria256-sha512
With the SEED encryption algorithm, IPsec traffic cannot offload NPU/CP. FortiOS supports:
l seed-null
l seed-md5
l seed-sha1
l seed-sha256
l seed-sha384
l seed-sha512
DES is a symmetric-key algorithm, which means the same key is used for encrypting and decrypting data. FortiOS
supports:
l des-md5
l des-sha1
l des-sha256
l des-sha384
l des-sha512
3DES applies the DES algorithm three times to each data. FortiOS supports:
l 3des-md5
l 3des-sha1
l 3des-sha256
l 3des-sha384
l 3des-sha512
AES is a symmetric-key algorithm with different key lengths (128, 192, and 256 bits). FortiOS supports:
l aes128-md5
l aes128-sha1
l aes128-sha256
l aes128-sha384
l aes128-sha512
l aes128gcm-prfsha1
l aes128gcm-prfsha256
l aes128gcm-prfsha384
l aes128gcm-prfsha512
l aes192-md5
l aes192-sha1
l aes192-sha256
l aes192-sha384
l aes192-sha512
l aes256-md5
l aes256-sha1
l aes256-sha256
l aes256-sha384
l aes256-sha512
l aes256gcm-prfsha1
l aes256gcm-prfsha256
l aes256gcm-prfsha384
l aes256gcm-prfsha512
The ARIA algorithm is based on AES with different key lengths (128, 192, and 256 bits). FortiOS supports:
l aria128-md5
l aria128-sha1
l aria128-sha256
l aria128-sha384
l aria128-sha512
l aria192-md5
l aria192-sha1
l aria192-sha256
l aria192-sha384
l aria192-sha512
l aria256-md5
l aria256-sha1
l aria256-sha256
l aria256-sha384
l aria256-sha512
With the chacha20poly1305 encryption algorithm, FortiOS supports:
l chacha20poly1305-prfsha1
l chacha20poly1305-prfsha256
l chacha20poly1305-prfsha384
l chacha20poly1305-prfsha512
SEED is a symmetric-key algorithm. FortiOS supports:
l seed128-md5
l seed128-sha1
l seed128-sha256
l seed128-sha384
l seed128-sha512
Suite-B is a set of AES encryption with ICV in GCM mode. FortiOS supports Suite-B on new kernel platforms only. IPsec
traffic cannot offload to NPU. CP9 supports Suite-B offloading, otherwise packets are encrypted and decrypted by
software. FortiOS supports:
l suite-b-gcm-128
l suite-b-gcm-256
With null encryption, IPsec traffic can offload NPU/CP. FortiOS supports:
l null-md5
l null-sha1
l null-sha256
l null-sha384
l null-sha512
With the DES encryption algorithm, IPsec traffic can offload NPU/CP. FortiOS supports:
l des-null
l des-md5
l des-sha1
l des-sha256
l des-sha384
l des-sha512
With the 3DES encryption algorithm, IPsec traffic can offload NPU/CP. FortiOS supports:
l 3des-null
l 3des-md5
l 3des-sha1
l 3des-sha256
l 3des-sha384
l 3des-sha512
With the AES encryption algorithm, IPsec traffic can offload NPU/CP. FortiOS supports:
l aes128-null
l aes128-md5
l aes128-sha1
l aes128-sha256
l aes128-sha384
l aes128-sha512
l aes192-null
l aes192-md5
l aes192-sha1
l aes192-sha256
l aes192-sha384
l aes192-sha512
l aes256-null
l aes256-md5
l aes256-sha1
l aes256-sha256
l aes256-sha384
l aes256-sha512
With the AESGCM encryption algorithm, IPsec traffic cannot offload NPU. CP9 supports AESGCM offloading. FortiOS
supports:
l aes128gcm
l aes256gcm
With the chacha20poly1305 encryption algorithm, IPsec traffic cannot offload NPU/CP. FortiOS supports:
l chacha20poly1305
With the ARIA encryption algorithm, IPsec traffic cannot offload NPU/CP. FortiOS supports:
l aria128-null
l aria128-md5
l aria128-sha1
l aria128-sha256
l aria128-sha384
l aria128-sha512
l aria192-null
l aria192-md5
l aria192-sha1
l aria192-sha256
l aria192-sha384
l aria192-sha512
l aria256-null
l aria256-md5
l aria256-sha1
l aria256-sha256
l aria256-sha384
l aria256-sha512
With the SEED encryption algorithm, IPsec traffic cannot offload NPU/CP. FortiOS supports:
l seed-null
l seed-md5
l seed-sha1
l seed-sha256
l seed-sha384
l seed-sha512
HMAC settings
The FortiGate uses the HMAC based on the authentication proposal that is chosen in phase 1 or phase 2 of the IPsec
configuration. Each proposal consists of the encryption-hash pair (such as 3des-sha256). The FortiGate matches the
most secure proposal to negotiate with the peer.
vd: root/0
name: MPLS
version: 1
interface: port1 3
addr: 192.168.2.5:500 -> 10.10.10.1:500
tun_id: 10.10.10.1
virtual-interface-addr: 172.31.0.2 -> 172.31.0.1
created: 1015820s ago
IKE SA: created 1/13 established 1/13 time 10/1626/21010 ms
IPsec SA: created 1/24 established 1/24 time 0/11/30 ms
The ip-fragmentation command controls packet fragmentation before IPsec encapsulation, which can benefit
packet loss in some environments.
The following options are available for the ip-fragmentation variable.
Option Description
Configuring the differentiated services (DiffServ) code in phase2 of an IPsec tunnel allows the tag to be applied to the
Encapsulating Security Payload (ESP) packet.
l If diffserv is disabled in the IPsec phase2 configuration, then the ESP packets' DSCP value is copied from the
inner IP packet DSCP.
l If diffserv is enabled in the IPsec phase2 configuration, then ESP packets' DSCP value is set to the configured
value.
In this example, NPU offloading is disabled, diffserv is enabled, and the diffserv code is set to 000111 on FGT-A. Only
one side of the tunnel needs to have diffserv enabled.
dec:pkts/bytes=4/336, enc:pkts/bytes=4/608
npu_flag=00 npu_rgwy=173.1.1.1 npu_lgwy=11.101.1.1 npu_selid=1 dec_npuid=0 enc_npuid=0
run_tally=1
VXLAN can be used to encapsulate VLAN traffic over a Layer 3 network. Using IPsec VPN tunnels to secure a
connection between two sites, VXLAN can encapsulate VLAN traffic over the VPN tunnel to extend the VLANs between
the two sites.
In this example, a site-to-site VPN tunnel is formed between two FortiGates. A VXLAN is configured over the IPsec
interface. Multiple VLANs are connected to a switch behind each FortiGate. Host1 and Host2 are connected to VLAN10
on the switches on each site, and Host21 and Host22 are connected to VLAN20. Using virtual wire pairs, the internal
interface (port1) will be paired with the VXLAN interface (vxlan) to allow VLAN traffic to pass through in either direction.
To configure FGT-A:
2. Configure a static route to send all traffic out the WAN interface:
config router static
edit 1
set gateway 11.11.11.1
set device "wan1"
next
end
next
end
The interfaces added to the virtual wire pair cannot be part of a switch, such as the default internal interface.
By enabling wildcard VLANs on the virtual wire pair, all VLAN tagged traffic that is allowed by the virtual wire pair
firewall policies passes through the pair.
7. Configure a virtual wire pair firewall policy to allow traffic between the port1 and vxlan interfaces:
config firewall policy
edit 4
set name "vwp-pol"
set srcintf "port1" "vxlan"
set dstintf "port1" "vxlan"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
end
To configure FGT-B
2. Configure a static route to send all traffic out the WAN interface:
config router static
edit 1
set gateway 22.22.22.2
set device "wan1"
next
end
7. Configure a firewall policy to allow traffic between the port1 and vxlan interfaces:
config firewall policy
edit 4
set name "vwp-pol"
set srcintf "port1" "vxlan"
set dstintf "port1" "vxlan"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
end
To test the configuration, ping Host2 (VLAN10: 192.168.10.2/24) from Host1 (VLAN10: 192.168.10.1/24):
C:\>ping 192.168.10.2
This example describes how to implement VXLAN over IPsec VPN using a VXLAN tunnel endpoint (VTEP).
This example uses a hub and spoke topology. Dialup VPN is used because it allows a single phase 1 dialup definition on
the hub FortiGate. Additional spoke tunnels are added with minimal changes to the hub by adding a user account and
VXLAN interface for each spoke. Spoke-to-spoke communication is established through the hub. This example assumes
that the authentication users and user groups have already been created. While this topology demonstrates hub and
spoke with dialup tunnels with XAuth authentication, the same logic can be applied to a static VPN with or without XAuth.
IPsec tunnel interfaces are used to support VXLAN tunnel termination. An IP address is set for each tunnel interface.
Ping access is allowed for troubleshooting purposes.
VTEPs are created on the hub and each spoke to forward VXLAN traffic through the IPsec tunnels. VXLAN encapsulates
OSI layer 2 Ethernet frames within layer 3 IP packets. You will need to either combine the internal port1 and VXLAN
interface into a soft switch, or create a virtual wire pair so that devices behind port1 have direct layer 2 access to remote
peers over the VXLAN tunnel. This example uses a switch interface on the hub and a virtual wire pair on the spokes to
demonstrate the two different methods.
In order to apply an IPsec VPN interface on the VXLAN interface setting, net-device must be disabled in the IPsec
VPN phase 1 settings.
3. Configure the IPsec VPN policy that allows VXLAN traffic between the spokes:
config firewall policy
edit 1
set name "VXLAN_SPOKE_to_SPOKE"
set srcintf "SPOKES"
set dstintf "SPOKES"
set srcaddr "NET_192.168.255.0"
set dstaddr "NET_192.168.255.0"
set action accept
set schedule "always"
set service "UDP_4789"
set logtraffic all
set fsso disable
next
end
4. Configure the IPsec tunnel interfaces (the remote IP address is not used, but it is necessary for this configuration):
5. Configure the VXLAN interfaces. Each spoke requires a VXLAN interface with a different VNI. The remote IP is the
tunnel interfaces IP of the spokes.
a. Spoke 1:
config system VXLAN
edit "SPOKES_VXLAN1"
set interface "SPOKES"
set vni 1
set remote-ip "192.168.255.2"
next
end
b. Spoke 2:
config system VXLAN
edit "SPOKES_VXLAN2"
set interface "SPOKES"
set vni 2
set remote-ip "192.168.255.3"
next
end
The hub FortiGate inserts a reverse route pointing to newly established tunnel interfaces
for any of the subnets that the spoke FortiGate's source quick mode selectors provides.
This is why you should set the tunnel IP address here.
5. Configure the VXLAN interfaces (the remote IP is the tunnel interface IP of the hub):
a. Spoke 1:
config system VXLAN
edit "HUB_VXLAN"
set interface "HUB"
set vni 1
set remote-ip "192.168.255.1"
next
end
b. Spoke 2:
The virtual wire pair requires an explicit policy to allow traffic between interfaces.
For an IPsec tunnel, the gateway IP address (giaddr) can be defined on a DHCP relay agent. Both IPv4 and IPv6
addresses are supported. An IPsec tunnel with mode-config and DHCP relay cannot specify a DHCP subnet range to
the DHCP server.
The DHCP server assigns an IP address based on the giaddr set on the IPSec phase1 interface and sends an offer to
this subnet. The DHCP server must have a route to the specified subnet giaddr.
Example
FortiGate supports FQDN when defining an IPsec remote gateway with a dynamically assigned IPv6 address. When
FortiGate attempts to connect to the IPv6 device, FQDN will resolve the IPv6 address even when the address changes.
Using FQDN to configure the remote gateway is useful when the remote end has a dynamic IPv6 address assigned by
their ISP or DHCPv6 server.
next
end
config vpn ipsec phase2-interface
edit "ddns6"
set phase1name "ddns6"
set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm aes256gcm
chacha20poly1305
set src-addr-type subnet6
set dst-addr-type subnet6
set src-subnet6 2003:1:1:1::/64
next
end
The tunnel can still connect to the FQDN address when the IPv6 address changes
............................................................................................
.........................
ike 0:ddns6:46933:ddn6:47779: add IPsec SA: SPIs=ac7a5719/7ab888ed
ike 0:ddns6:46933:ddn6:47779: IPsec SA dec spi ac7a5719 key
16:0F27F1D1D02496F90D15A30E2C032678 auth 20:46564E0E86A054374B31E58F95E4458340121BCE
ike 0:ddns6:46933:ddn6:47779: IPsec SA enc spi 7ab888ed key
16:926B12908EE670E1A5DDA6AD8E96607B auth 20:42BF438DC90867B837B0490EAB08E329AB62CBE3
ike 0:ddns6:46933:ddn6:47779: added IPsec SA: SPIs=ac7a5719/7ab888ed
ike 0:ddns6:46933:ddn6:47779: sending SNMP tunnel UP trap
ike 0:ddns6: carrier up
In this example, IKEv2 with Extensible Authentication Protocol – Transport Layer Security (EAP-TLS) using mutual
certificate authentication is configured. Mutual certificate authentication means that both the client and server use
certificates to identify themselves. EAP uses RADIUS, which is handled by the Network Policy Server (NPS) on the
Windows server. Certificates are generated and distributed through Active Directory Certificate Services (AD CS). An
additional certificate is used to identify the IPsec gateway.
This example assumes that the following Windows server roles are installed and available:
l NPS (RADIUS)
l AD CS with a generated CA
l Group Policy Management
l DNS server
It is also assumed that a connection is established between the NPS and FortiGate, and a DNS entry exists for the NPS
that the FortiGate can resolve.
Certificates
The Windows server includes AD-CS, a RADIUS server, and a DNS server.
After the AD CS role has been installed and configured, the CA is ready to sign certificates.
Users and groups are defined first. The groups are configured to automatically receive certificates and relay membership
to the FortiGate for granular access control through group matching in policies.
RADIUS is used to authorize connecting users. The RADIUS server returns users' groups with the access-accept
response, to indicate to the FortiGate what groups the users belong to.
To create a certificate template to enable automatic enrollment for the user groups:
d. Configure the remaining settings as required, then go to the Request Handling tab.
e. Disable Allow private key to be exported and select Enroll subject without requiring any user input.
f. On the Security tab, in Group or user name, click Add.
g. Add Group1 and Group2.
h. Select each group and, under Permissions, enable Read, Enroll, and Autoenroll.
i. On the Extensions tab, click Application Policies then click Edit.
j. Remove all of the policies expect for Client Authentication.
k. Click OK then close the Certificate Templates console.
4. In the navigation pane, right-click Certificate Template and click New > Certificate Template to Issue.
5. Select the new certificate template, User Auto Enroll, then click OK.
To generate and sign a CSR and import the signed certificate to the FortiGate:
1. On the FortiGate and go to System > Certificates and click Create/Import > Generate CSR.
2. Configure the CSR:
1. Open the Network Policy Server and, in the console tree, expand Policies.
2. Right-click on Network Policies and click New.
3. Enter a Policy name, such as VPN-Group1, then click Next.
4. Under Condition description click Add:
a. Select User Groups, then click Add.
b. Click Add Groups.
c. Enter the group name, Group1, click Check Names to confirm the group.
d. Click OK in both windows.
5. Click Next.
6. Make sure that Access granted is selected, then click Next.
7. On the Configure Authentication Methods page, click Add and add the EAP type Microsoft: Smart Care or other
certificate.
8. Edit the EAP type, select the previously generated certificate, then click OK.
9. Deselect all of the Less secure authentication methods then click Next.
10. Configure constraints as needed, then click Next.
11. On the Configure Settings page, under RADIUS Attributes, select Vendor Specific, then click Add:
Vendor-assigned attribute 1
number
e. Click OK on all three windows and on the Add Vendor Specific Attribute window click Close.
12. Click Next.
13. On the Completing New Network Policy page, review the configuration, then click Finish.
14. Duplicate the policy for Group2, and call the new policy VPN-Group2.
15. Reorder the policies so that VPN-Group1 and VPN-Group2 are one and two in the processing order.
1. Open the Network Policy Server and, in the console tree, expand RADIUS Clients and Servers.
2. Right-click on RADIUS Clients and click New.
3. Add the FortiGate as a RADIUS client:
Address 10.0.1.1
4. Click OK.
5. Enter an IP address.
6. Click Add Host.
An IPsec VPN tunnel is configured to connect to the NPS (RADIUS) server for EAP authentication. For information about
IPsec VPN, see IPsec VPNs on page 1252.
A RADIUS server is added to relay VPN authentication requests to the NPS server. For information about RADIUS
servers, see RADIUS servers on page 1734.
Three groups are created that point to the RADIUS server for authentication: one group each for user group Group1,
user group Group2, and the remote server. For information about groups, see User groups on page 1714.
Three firewall policies are created to test the functionality of the three user groups (see Policies on page 713):
l Policy 1 allows VPN clients to communicate with each other.
l Policy 2 allows VPN clients in the Group1 user group to communicate with Server1 and Server3.
l Policy 3 allows VPN clients in the Group2 user group to communicate with Server1 and Server2.
Interface port1
Accessible Networks Select the networks that VPN users will have access to.
Method Signature
Version 2
Local ID vpn.lab.local
1. Go to User & Authentication > RADIUS Servers and click Create New.
2. Enter a name for the server, such as NPS.
3. Enter the Primary Server IP/Name and Secret.
The Test User Credentials option will not work, as it does not use certificates for the test.
4. Click OK.
1. Go to User & Authentication > User Groups and click Create New.
2. Enter a name for the group, such as Group1.
3. In the Remote Groups table, click Add:
a. Set Remote Server to the just created RADIUS server, NPS.
b. Set Groups to Specify and enter Group1.
c. Click OK.
4. Click OK.
5. Create a second group called Group2 with the same Remote Server and Group Name set to Group2.
6. Create a third group called RADIUS with the same Remote Server but no Group Name.
edit "Group2"
set member "NPS"
config match
edit 1
set server-name "NPS"
set group-name "Group2"
next
end
next
edit "RADIUS"
set member "NPS"
next
end
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure policy 1:
Name VPN-VPN
Destination all
Schedule always
Service ALL
NAT Disable
3. Click OK.
4. Click Create New again and configure policy 2:
Schedule always
Service ALL
NAT Disable
5. Click OK.
Schedule always
Service ALL
NAT Disable
7. Click OK.
1. Open the Settings page and go to Network & Internet > VPN.
2. Click Add a VPN connection.
3. Configure the following:
4. Click Save.
5. Go to Network & Internet > Status and, under Advanced network settings, click Change adapter options.
6. Select the VPN connection then click Change settings of this connection, or right-click on the connection and select
Properties:
a. Go to the Settings tab and, in the Authentication section, click Properties.
b. Select Use a certificate on this computer and enable Use simple certification selection.
c. Enable Verify the server's identity by validating the certificate.
d. Optionally, enable Connect to these servers and enter your NPS server's FQDN, in this case DC.lab.local.
e. In the Trusted Root Certificate Authorities list, select the CA lab-local-CA.
remip=11.101.1.1
locip=173.1.1.1 remport=500 locport=500 outintf="port13"
cookies="e41eeecb2c92b337/0000000000000000" user="N/A" group="N/A" xauthuser="N/A"
xauthgroup="N/A" assignip=N/A vpntunnel="to_HQ" status="success" init="local"
mode="aggressive" dir="outbound" stage=1 role="initiator" result="OK"
id/spi: 92 5639f7f8a5dc54c0/809a6c9bbd266a4b
direction: initiator
status: established 4313-4313s ago = 10ms
proposal: aes128-sha256
key: 74aa3d63d88e10ea-8a1c73b296b06578
lifetime/rekey: 86400/81786
DPD sent/recv: 00000000/00000000
vd: root/0
name: to_HQ
version: 1
interface: port13 42
addr: 173.1.1.1:500 -> 11.101.1.1:500
created: 1013s ago
assigned IPv4 address: 11.11.11.1/255.255.255.252
IKE SA: created 1/1 established 1/1 time 0/0/0 ms
IPsec SA: created 1/1 established 1/1 time 0/0/0 ms
id/spi: 95 255791bd30c749f4/c2505db65210258b
direction: initiator
status: established 1013-1013s ago = 0ms
proposal: aes128-sha256
key: bb101b9127ed5844-1582fd614d5a8a33
lifetime/rekey: 86400/85086
DPD sent/recv: 00000000/00000010
NP6_1:
Encryption (encrypted/decrypted)
null : 0 1.
des : 0 1.
3des : 0 1.
aes : 337152 46069
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 0 1.
sha1 : 337152 46069
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
CP8:
Encryption (encrypted/decrypted)
null : 0 1.
des : 0 1.
3des : 1337 1582
aes : 71 11426
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 48 28
sha1 : 1360 12980
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
SOFTWARE:
Encryption (encrypted/decrypted)
null : 0 1.
des : 0 1.
3des : 0 1.
aes : 0 1.
aes-gcm : 0 1.
aria : 0 1.
seed : 0 1.
chacha20poly1305 : 0 1.
Integrity (generated/validated)
null : 0 1.
md5 : 0 1.
sha1 : 0 1.
sha256 : 0 1.
sha384 : 0 1.
sha512 : 0 1.
SSL VPN
The following topics provide information about SSL VPN in FortiOS 7.0.7.
l SSL VPN best practices on page 1541
l SSL VPN quick start on page 1544
l SSL VPN tunnel mode on page 1551
l SSL VPN web mode on page 1560
l SSL VPN authentication on page 1575
l SSL VPN to IPsec VPN on page 1658
l SSL VPN protocols on page 1665
l Configuring OS and host check on page 1667
l FortiGate as SSL VPN Client on page 1673
l Dual stack IPv4 and IPv6 support for SSL VPN on page 1682
l Disable the clipboard in SSL VPN web mode RDP connections on page 1693
l SSL VPN IP address assignments on page 1698
l SSL VPN troubleshooting on page 1700
l Restricting VPN access to rogue/non-compliant devices with Security Fabric
Securing remote access to network resources is a critical part of security operations. SSL VPN allows administrators to
configure, administer, and deploy a remote access strategy for their remote workers. When not in use, SSL VPN can be
disabled.
Choosing the correct mode of operation and applying the proper levels of security are integral to providing optimal
performance and user experience, and keeping your user data safe.
The below guidelines outline selecting the correct SSL VPN mode for your deployment and employing best practices to
ensure that your data are protected.
Information about SSL VPN throughput and maximum concurrent users is available on your device's datasheet; see
Next-Generation Firewalls Models and Specifications.
Tunnel mode
In tunnel mode, the SSL VPN client encrypts all traffic from the remote client computer and sends it to the FortiGate
through an SSL VPN tunnel over the HTTPS link between the user and the FortiGate.
The FortiGate establishes a tunnel with the client, and assigns a virtual IP (VIP) address to the client from a range
reserved addresses. While the underlying protocols are different, the outcome is very similar to a IPsec VPN tunnel. All
client traffic is encrypted, allowing the users and networks to exchange a wide range of traffic, regardless of the
application or protocols.
Use this mode if you require:
l A wide range of applications and protocols to be accessed by the remote client.
l No proxying is done by the FortiGate.
l Straightforward configuration and administration, as traffic is controlled by firewall policies.
l A transparent experience for the end user. For example, a user that needs to RDP to their server only requires a
tunnel connection; they can then use the usual client application, like Windows Remote Desktop, to connect.
Full tunneling forces all traffic to pass through the FortiGate (see SSL VPN full tunnel for remote user on page 1551).
Split tunneling only routes traffic to the designated network through the FortiGate (see SSL VPN split tunnel for remote
user on page 1544).
Limitations
Tunnel mode requires that the FortiClient VPN client be installed on the remote end. The standalone FortiClient VPN
client is free to use, and can accommodate SSL VPN and IPsec VPN tunnels. For supported operating systems, see the
FortiClient Technical Specifications.
Web mode
Web-only mode provides clientless network access using a web browser with built-in SSL encryption. Users
authenticate to FortiGate's SSL VPN Web Portal, which provides access to network services and resources, including
HTTP/HTTPS, Telnet, FTP, SMB/CIFS, VNC, RDP, and SSH. When a user starts a connection to a server from the web
portal, FortiOS proxies this communication with the server. All communication between the FortiGate and the user
continues to be over HTTPS, regardless of the service that is being accessed.
The clipboard can be disabled for SSL VPN web mode RDP/VNC connections, see Disable the clipboard in SSL VPN
web mode RDP connections on page 1693.
Use this mode if you require:
l A clientless solution in which all remote services are access through a web portal.
l Tight control over the contents of the web portal.
l Limited services provided to the remote users.
Limitations
l Multiple applications and protocols are not supported.
l VNC and RDP access might have limitations, such as certain shortcut keys not being supported.
l In some configurations RDP can consume a significant amount of memory and CPU time.
l Firewall performance might decrease as remote usage increases.
l Highly customized web pages might not render correctly.
For networks with many users, integrate your user configuration with existing authentication servers through LDAP,
RADIUS, or FortiAuthenticator.
By integrating with existing authentication servers, such as Windows AD, there is a lower change of making mistakes
when configuring local users and user groups. Your administration effort is also reduces.
See SSL VPN with LDAP user authentication on page 1575 for more information.
Your certificate should identify your domain so that a remote user can recognize the identity of the server or portal that
they are accessing through a trusted CA.
The default Fortinet factory self-signed certificates are provided to simplify initial installation and testing. If you use these
certificates you are vulnerable to man-in-the-middle attacks, where an attacker spoofs your certificate, compromises
your connection, and steals your personal information. It is highly recommended that you purchase a server certificate
from a trusted CA to allow remote users to connect to SSL VPN with confidence. See Procuring and importing a signed
SSL certificate on page 2053 for more information.
Enabling the Do not Warn Invalid Server Certificate option on the client disables the certificate warning message,
potentially allowing users to accidentally connect to untrusted servers. Disabling invalid server certificate warnings is not
recommended.
Multi-factor authentication (MFA) ensures that the end-user is who they claim to be by requiring at least two factors - a
piece of information that the user knows (password), and an asset that the user has (OTP). A third factor, something a
user is (fingerprint or face), may be enabled as well. FortiToken Mobile is typically used for MFA.
FortiGate comes with two free FortiTokens, and more can be purchased from the FortiToken Mobile iOS app or through
Fortinet partners.
See SSL VPN with FortiToken mobile push authentication on page 1604 for more information.
2FA, a subset of MFA, can also be set up with email tokens. See Email Two-Factor Authentication on FortiGate for
information.
This method of 2FA uses a user certificate as the second authentication factor. This is more secure, as it identifies the
end user using a certificate. The configuration and administration of this solution is significantly more complicated, and
requires administrators with advanced knowledge of the FortiGate and certificate deployment.
See SSL VPN with certificate authentication on page 1586 for more information.
Minimum and maximum supported TLS version can be configured in the FortiGate CLI. The cipher algorithm can also be
customized.
See How to control the SSL version and cipher suite for SSL VPN for more information.
Properly administer firewall policies and profiles against only the access level required for the
remote user
Users do not all require the same access. Access should only be granted after careful considerations. Typically, users
are placed in groups, and each group is allowed access to limited resources.
Using SSL VPN realms simplifies defining the control structure for mapping users and groups to the appropriate
resources.
See SSL VPN multi-realm on page 1651 for more information.
After the SSL VPN settings have been configured, SSL VPN can be disabled when not in use.
This is a sample configuration of remote users accessing the corporate network and internet through an SSL VPN by
tunnel mode using FortiClient but accessing the Internet without going through the SSL VPN tunnel.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
The split tunneling routing address cannot explicitly use an FQDN or an address group that
includes an FQDN. To use an FQDN, leave the routing address blank and apply the FQDN as
the destination address of the firewall policy.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internal subnet 192.168.1.0.
2. Configure user and user group.
a. Go to User & Authentication > User Definition to create a local user sslvpnuser1.
b. Go to User & Authentication > User Groups to create a group sslvpngroup with the member sslvpnuser1.
3. Configure SSL VPN web portal.
a. Go to VPN > SSL-VPN Portals to create a tunnel mode only portal my-split-tunnel-portal.
b. Enable Split Tunneling.
c. Select Routing Address to define the destination network that will be routed through the tunnel. Leave
undefined to use the destination in the respective firewall policies.
4. Configure SSL VPN settings.
a. Go to VPN > SSL-VPN Settings.
b. For Listen on Interface(s), select wan1.
c. Set Listen on Port to 10443.
d. Choose a certificate for Server Certificate. The default is Fortinet_Factory.
e. In Authentication/Portal Mapping All Other Users/Groups, set the Portal to tunnel-access.
f. Create new Authentication/Portal Mapping for group sslvpngroup mapping portal my-split-tunnel-portal.
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
6. Configure one SSL VPN firewall policy to allow remote user to access the internal network. Traffic is dropped from
internal to remote client.
config firewall policy
edit 1
set name "sslvpn split tunnel access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “sslvpngroup”
set action accept
set schedule "always"
set service "ALL"
next
end
For FortiGate administrators, a free version of FortiClient VPN is available which supports basic IPsec and SSL VPN and
does not require registration with EMS. This version does not include central management, technical support, or some
advanced features.
You can download the free VPN client from FNDN or FortiClient.com.
When the free VPN client is run for the first time, it displays a disclaimer. You cannot configure or create a VPN
connection until you accept the disclaimer and click I accept:
1. On the Remote Access tab, click on the settings icon and then Add a New Connection.
Description (Optional)
Client Certificate Select Prompt on connect or the certificate from the dropdown list.
1. On the Remote Access tab, select the VPN connection from the dropdown list.
Optionally, you can right-click the FortiTray icon in the system tray and select a VPN configuration to connect.
2. Enter your username and password.
3. Click the Connect button.
4. After connecting, you can now browse your remote network. Traffic to 192.168.1.0 goes through the tunnel, while
other traffic goes through the local gateway. FortiClient displays the connection status, duration, and other relevant
information.
5. Click the Disconnect button when you are ready to terminate the VPN session.
1. On the FortiGate, go to VPN > Monitor > SSL-VPN Monitor to verify the list of SSL users.
2. On the FortiGate, go to Log & Report > Forward Traffic to view the details of the SSL entry.
This configuration adds multi-factor authentication (MFA) to the split tunnel configuration (SSL VPN split tunnel for
remote user on page 1544). It uses one of the two free mobile FortiTokens that is already installed on the FortiGate.
1. On your device, open FortiToken Mobile. If this is your first time opening the application, it may prompt you to create
a PIN for secure access to the application and tokens.
2. You should have received your notification via email, select + and use the device camera to scan the token QR code
in your email.
3. FortiToken Mobile provisions and activates your token and generates token codes immediately. To view the OTP's
digits, select the eye icon. After you open the application, FortiToken Mobile generates a new six-digit OTP every 30
seconds.
1. On the Remote Access tab, select the VPN connection from the dropdown list.
Optionally, you can right-click the FortiTray icon in the system tray and select a VPN configuration to connect.
2. Enter your username and password.
3. Click the Connect button.
4. A Token field will appear, prompting you for the FortiToken code. Enter the FortiToken code from your Mobile
device.
5. After connecting, you can now browse your remote network. Traffic to 192.168.1.0 goes through the tunnel, while
other traffic goes through the local gateway. FortiClient displays the connection status, duration, and other relevant
information.
6. Click the Disconnect button when you are ready to terminate the VPN session.
The following topics provide instructions on configuring SSL VPN tunnel mode:
l SSL VPN full tunnel for remote user
l SSL VPN tunnel mode host check
l SSL VPN split DNS on page 1557
This is a sample configuration of remote users accessing the corporate network and internet through an SSL VPN by
tunnel mode using FortiClient.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
2. Configure the internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
4. Configure SSL VPN web portal and predefine RDP bookmark for windows server.
config vpn ssl web portal
edit "my-full-tunnel-portal"
set tunnel-mode enable
set split-tunneling disable
set ip-pools "SSLVPN_TUNNEL_ADDR1"
next
end
6. Configure SSL VPN firewall policies to allow remote user to access the internal network. Traffic is dropped from
internal to remote client.
config firewall policy
edit 1
set name "sslvpn tunnel mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "all"
set groups "sslvpngroup"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "sslvpn tunnel mode outgoing"
set srcintf "ssl.root"
set dstintf "wan1"
set srcaddr "all"
l Set Remote Gateway to the IP of the listening FortiGate interface, in this example, 172.20.120.123.
This is a sample configuration of remote users accessing the corporate network through an SSL VPN by tunnel mode
using FortiClient with AV host check.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
The split tunneling routing address cannot explicitly use an FQDN or an address group that
includes an FQDN. To use an FQDN, leave the routing address blank and apply the FQDN as
the destination address of the firewall policy.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
2. Configure user and user group.
a. Go to User & Authentication > User Definition to create a local user sslvpnuser1.
b. Go to User & Authentication > User Groups to create a group sslvpngroup with the member sslvpnuser1.
3. Configure SSL VPN web portal.
a. Go to VPN > SSL-VPN Portals to create a tunnel mode only portal my-split-tunnel-portal.
b. Enable Tunnel Mode and Enable Split Tunneling.
c. Select Routing Address.
4. Configure SSL VPN settings.
a. Go to VPN > SSL-VPN Settings.
b. For Listen on Interface(s), select wan1.
c. Set Listen on Port to 10443.
d. Choose a certificate for Server Certificate.
It is HIGHLY recommended that you acquire a signed certificate for your installation.
Please review the SSL VPN best practices on page 1541 and learn how to Procuring
and importing a signed SSL certificate on page 2053.
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
6. Configure one SSL VPN firewall policy to allow remote user to access the internal network. Traffic is dropped from
internal to remote client.
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “sslvpngroup”
set action accept
set schedule "always"
set service "ALL"
next
end
7. Configure SSL VPN web portal to enable the host to check for compliant antivirus software on the user’s computer:
config vpn ssl web portal
edit my-split-tunnel-access
set host-check av
next
end
l Set Remote Gateway to the IP of the listening FortiGate interface, in this example, 172.20.120.123.
SSL VPN clients in tunnel mode can enable the following settings to split DNS traffic:
l Resolve DNS requests for a specific domain, or suffix, using specific DNS servers.
l Resolve all other DNS requests using a DNS server configured in the SSL VPN settings. This DNS server can be
the same as the client system DNS server, or another DNS server.
Administrators typically configure SSL VPN clients to use DNS servers that are behind the FortiGate on the internal
network. This will require DNS traffic to traverse the SSL VPN tunnel.
The dns-suffix setting under config vpn ssl settings is used to specify domains for SSL VPN DNS servers in
the tunnel mode configuration. This setting can only be configured in the CLI.
The DNS servers and suffixes configured under config vpn ssl settings have a global scope, and apply only to
SSL VPN portals that do not have their own DNS server configuration.
SSL VPN portals configured with their own DNS servers and suffixes under config vpn ssl web portal override
the settings configured under config vpn ssl settings.
To configure DNS servers for a specific SSL VPN portal in split tunnel mode:
Only DNS requests that match DNS suffixes use the DNS servers configured in the VPN. Due
to iOS limitations, the DNS suffixes are not used for searching as in Windows. Using short
(non-FQDN) names may not be possible.
Configuring SSL VPN DNS servers for tunnel mode using DNS split tunneling
The DNS split tunneling setting can be used to configure domains that apply to a specific SSL VPN portal by specifying
primary and secondary DNS servers to be used to resolve specific suffixes. This setting can be configured in the GUI
and CLI. In the following example, DNS split tunneling is configured on the default tunnel-access portal with two DNS
entries.
1. Go to VPN > SSL-VPN Portals and double-click tunnel-access to edit the portal.
2. In the Tunnel Mode Client Options section, enable DNS Split Tunneling.
3. In the Split DNS table, click Create New. The New DNS Entry pane opens.
4. Configure the first DNS entry:
a. For Domains, enter domain1.com.
b. Set the Primary DNS Server to 10.10.10.10.
c. Set the Secondary DNS Server to 10.10.10.11.
d. Click OK.
5. Configure the second DNS entry:
a. Click Create New.
b. For Domains, enter domain2.com.
c. Set the Primary DNS Server to 10.10.10.12.
d. Set the Secondary DNS Server to 10.10.10.13.
e. Click OK.
A user must have valid username and password credentials to log in to an SSL VPN web portal in addition to other multi-
factor authentication components that may be configured, such as FortiTokens.
Web-only mode provides clientless network access using a web browser with built-in SSL encryption. Use this mode if
you require:
l A clientless solution where all remote services are accessed through a web portal
l Tight control over the contents of the web portal
l Limited services provided to the remote users
After logging in, the web portal page appears:
l The session information is displayed in the left corner of the top banner. This includes the elapsed time since
logging in, and the volume of inbound and outbound HTTP and HTTPS traffic.
l The Launch FortiClient button appears if FortiClient is installed. Clicking the button opens the FortiClient Remote
Access tab, but FortiClient does not automatically create a VPN connection based on the web mode connection
information.
l The Download FortiClient button provides access to download the FortiClient application for various operating
systems.
l The Bookmarks widget includes links to network resources (administrator-defined bookmarks), and users can
create their own bookmarks.
l The Quick Connection button enables a connection to network resources without using or creating a bookmark.
The following topics provide information about SSL VPN web mode:
l Web portal configurations on page 1561
l Quick Connection tool on page 1564
l SSL VPN bookmarks on page 1565
l SSL VPN web mode for remote user on page 1568
l Customizing the RDP display size on page 1571
An SSL VPN web portal enables users to access network resources through a secure channel using a web browser.
System administrators can configure log in privileges for users and which network resources are available to these
users. The portal configuration determines what the user sees when they log in to the portal. Both system administrators
and the users have the ability to customize the SSL VPN portal.
There are three predefined default web portal configurations available:
l full-access: connecting clients can either access protected resources through the SSL VPN web portal, or use
FortiClient to connect through tunnel mode.
l tunnel-access: connecting clients can only access protected resources with FortiClient connecting through tunnel
mode.
l web-access: connecting clients can only access protected resources through the SSL VPN web portal.
Custom web portals can also be configured.
Limit Users to One SSL-VPN Connection at a Time This option is disabled by default. When enabled, once
a user logs in to the portal, they cannot go to another
system and log in with the same credentials again.
Tunnel Mode
Routing Address Override When Split tunneling is set to Enabled Based on Policy
Destination, the IPv4 firewall address selected
overrides the firewall policy destination addresses to
control split tunnel access.
When Split tunneling is set to Enabled for Trusted
Destinations, the IPv4 firewall address selected
becomes a trusted destination that will not be tunneled
through SSL VPN. All other destinations will be
tunneled through SSL VPN.
IPv6 Tunnel Mode When enabled, these settings determine how tunnel
mode clients are assigned IPv6 addresses.
IPv6 split tunneling The same three options are available as in Tunnel
Mode.
IPv6 Routing Address When Split tunneling is set to Enabled Based on Policy
Override Destination, the IPv6 firewall address selected
overrides the firewall policy destination addresses to
control split tunnel access.
When Split tunneling is set to Enabled for Trusted
Destinations, the IPv6 firewall address selected
becomes a trusted destination that will not be tunneled
through SSL VPN. All other destinations will be
tunneled through SSL VPN.
Tunnel Mode Client Options The following options affect how FortiClient behaves
when connected to the VPN tunnel.
Allow client to save When enabled and if the user selects this option, their
password password is stored on the their computer and will
automatically populate each time they connect to the
VPN.
Allow client to connect When enabled and if the user selects this option, when
automatically FortiClient launches (such as after a reboot or system
start up), FortiClient will automatically attempt to
connect to the VPN.
Allow client to keep When enabled and if the user selects this option,
connections alive FortiClient will try to reconnect once it detects that the
VPN connection is unexpectedly down (not manually
disconnected by the user).
DNS Split Tunneling When enabled, the Split DNS table is visible, where
new DNS entries can be created. See SSL VPN split
DNS on page 1557 for more details.
Web Mode Enable this option to configure the web portal settings.
Portal Message Enter a message that appears at the top of the web
portal screen (default = SSL-VPN Portal).
Show Session Information Enable to display session information in the top banner
of the web portal (username, amount of time logged in,
and traffic statistics).
Show Login History Enable to display the user's login history (History).
Rewrite Content IP/UI/ Enable contents rewrite for URIs containing IP-
address/ui/.
Predefined Bookmarks Use the table to create and edit predefined bookmarks.
See To create a predefined administrator bookmark in
FortiOS: on page 1567 for more details.
3. Click OK.
The Quick Connection tool allows a user to connect to a resource when it is not a predefined bookmark. The tool allows
the user to specify the type of server and the URL or IP address of the host.
To connect to a resource:
RDP sessions
Some Windows servers require that a specific security be set for RDP sessions, as opposed to
the standard RDP encryption security. For example, Windows 10 requires that TLS be used.
You can specify a location option if the remote computer does not use the same keyboard layout as your computer by
appending it to the Host field using the following format: <IP address> -m <locale>
The available options are:
fr French mk Macedonian
SSL VPN bookmarks
The Bookmarks widget displays bookmarks configured by administrators and users. Administrator bookmarks cannot be
edited, and they are configured in FortiOS. Users can add, edit, and delete their own bookmarks within the web portal.
The FortiGate forwards client requests to servers on the internet or internal network. To use the web portal applications,
add the URL, IP address, or name of the server application to the Bookmarks list. Once a bookmark is created, click the
bookmark icon to initiate a session.
To access a destination without adding a bookmark to the Your Bookmarks list, use the Quick
Connection tool. See Quick Connection tool on page 1564 for more details.
Configuring bookmarks
The following table summarizes which options can be configured based on the bookmark type in the SSL VPN web
portal:
URL ✔
Folder ✔ ✔ ✔
Host ✔ ✔ ✔ ✔
Domain ✔
Port ✔ ✔
Description ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
Password ✔
SSO Credentials ✔ ✔ ✔ ✔
SSL-VPN Login ✔ ✔ ✔ ✔
Form Key ✔
Form Value ✔
Alternative ✔ ✔ ✔ ✔
Username ✔ ✔ ✔ ✔
Password ✔ ✔ ✔ ✔
Username ✔
Password ✔
Screen Width* ✔
Screen Height* ✔
Keyboard Layout ✔
Security ✔
Preconnection ID ✔
Preconnection Blob ✔
Administrators can add bookmarks for users in the same user group. SSL VPN will only output the matched group name
entry to the client. This setting can only be configured in the CLI.
This is a sample configuration of remote users accessing the corporate network through an SSL VPN by web mode
using a web browser.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
2. Configure user and user group.
a. Go to User & Authentication > User Definition to create a local user sslvpnuser1.
b. Go to User & Authentication > User Groups to create a group sslvpngroup with the member sslvpnuser1.
3. Configure SSL VPN web portal.
a. Go to VPN > SSL-VPN Portals to create a web mode only portal my-web-portal.
b. Set Predefined Bookmarks for Windows server to type RDP.
4. Configure SSL VPN settings.
a. Go to VPN > SSL-VPN Settings.
b. For Listen on Interface(s), select wan1.
c. Set Listen on Port to 10443.
d. Choose a certificate for Server Certificate.
It is HIGHLY recommended that you acquire a signed certificate for your installation.
Please review the SSL VPN best practices on page 1541 and learn how to Procuring
and importing a signed SSL certificate on page 2053.
2. Configure the internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
4. Configure SSL VPN web portal and predefine RDP bookmark for windows server.
config vpn ssl web portal
edit "my-web-portal"
set web-mode enable
config bookmark-group
edit "gui-bookmarks"
config bookmarks
edit "Windows Server"
set apptype rdp
set host "192.168.1.114"
set port 3389
set logon-user "your-windows-server-user-name"
set logon-password your-windows-server-password
next
end
next
end
next
end
6. Configure one SSL VPN firewall policy to allow remote user to access the internal network. Traffic is dropped from
internal to remote client
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “sslvpngroup”
set action accept
set schedule "always"
set service "ALL"
next
end
1. In a web browser, log into the portal https://172.20.120.123:10443 using the credentials you've set up.
2. In the portal with the predefined bookmark, select the bookmark to begin an RDP session. If there are no predefined
bookmarks, the Quick Connection tool can be used; see Quick Connection tool on page 1564 for more information.
3. Go to VPN > Monitor > SSL-VPN Monitor to verify the list of SSL users.
4. Go to Log & Report > Forward Traffic to view the details for the SSL entry.
The RDP display size (width and height settings) can be customized for SSL VPN web mode when creating a new
connection or bookmark. Administrators can also specify the display size when preconfiguring bookmarks.
default-window-width Set the default RDP screen width, in pixels (0 - 65535, default = 1024).
<integer>
default-window-height Set the default RDP screen height, in pixels (0 - 65535, default = 768).
<integer>
Example
In this example, a user has a monitor with a resolution of 1920 × 1080. The user creates two bookmarks for RDP servers
with different resolutions:
l Windows 7: 1360 × 768
l Ubuntu 20.04: 800 × 600
4. Click Save.
Verification:
When the user connects to the RDP servers using the bookmarks, the customized screen resolutions are applied
regardless of the client PC's screen resolution (1920 × 1080).
Windows 7:
Ubuntu 20.04:
This is a sample configuration of SSL VPN for LDAP users. In this example, the LDAP server is a Windows 2012 AD
server. A user ldu1 is configured on Windows 2012 AD server.
You must have generated and exported a CA certificate from the AD server and then have imported it as an external CA
certificate into the FortiGate.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
1. Configure the interface and firewall address. The port1 interface connects to the internal network:
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
2. Import CA certificate into FortiGate:
a. Go to System > Features Visibility and ensure Certificates is enabled.
b. Go to System > Certificates and select Import > CA Certificate.
c. Select Local PC and then select the certificate file.
The CA certificate now appears in the list of External CA Certificates. In this example, it is called CA_Cert_1.
d. If you want, you can use CLI commands to rename the system-generated CA_Cert_1 to be more descriptive:
config vpn certificate ca
rename CA_Cert_1 to LDAPS-CA
end
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network:
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
next
end
8. Configure one SSL VPN firewall policy to allow remote user to access the internal network:
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “ldaps-group”
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
1. From a remote device, use a web browser to log into the SSL VPN web portal http://172.20.120.123:10443.
2. Enter the ldu1 user credentials, then click Login.
3. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
1. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
2. Go to Log & Report > Events and select VPN Events from the event type dropdown list to view the details of the SSL
VPN connection event log.
3. Go to Log & Report > Forward Traffic to view the details of the SSL VPN traffic.
This is a sample configuration of SSL VPN for LDAP users with Force Password Change on next logon. In this example,
the LDAP server is a Windows 2012 AD server. A user ldu1 is configured on Windows 2012 AD server with Force
password change on next logon.
You must have generated and exported a CA certificate from the AD server and then have imported it as an external CA
certificate into the FortiGate.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
2. Import CA certificate into FortiGate:
a. Go to System > Features Visibility and ensure Certificates is enabled.
b. Go to System > Certificates and select Import > CA Certificate.
c. Select Local PC and then select the certificate file.
The CA certificate now appears in the list of External CA Certificates. In this example, it is called CA_Cert_1.
d. If you want, you can use CLI commands to rename the system-generated CA_Cert_1 to be more descriptive:
The LDAP user must either be an administrator, or have the proper permissions delegated
to it, to be able to change passwords of other registered users on the LDAP server.
a. Go to User & Authentication > LDAP Servers and click Create New.
b. Specify Name and Server IP/Name.
c. Specify Common Name Identifier and Distinguished Name.
d. Set Bind Type to Regular.
e. Specify Username and Password.
f. Enable Secure Connection and set Protocol to LDAPS.
g. For Certificate, select LDAP server CA LDAPS-CA from the list.
h. To enable the password-renew option, use these CLI commands.
config user ldap
edit "ldaps-server"
set password-expiry-warning enable
set password-renewal enable
next
end
e. Set the Outgoing Interface to the local network interface so that the remote user can access the internal
network, in this example, port1.
f. Set Destination Address to the internal protected subnet 192.168.1.0.
g. Set Schedule to always, Service to ALL, and Action to Accept.
h. Enable NAT.
i. Configure any remaining firewall and security options as desired.
j. Click OK.
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network:
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
The LDAP user must either be an administrator, or have the proper permissions delegated
to it, to be able to change passwords of other registered users on the LDAP server.
8. Configure one SSL VPN firewall policy to allow remote user to access the internal network:
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “ldaps-group”
1. From a remote device, use a web browser to log into the SSL VPN web portal http://172.20.120.123:10443.
2. Log in using the ldu1 credentials.
Use a user that is configured on FortiAuthenticator with Force password change on next logon.
3. Click Login. You are prompted to enter a new password. The prompt will timeout after 90 seconds.
4. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
1. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
2. Go to Log & Report > Events and select VPN Events from the event type dropdown list to view the details of the SSL
VPN connection event log.
3. Go to Log & Report > Forward Traffic to view the details of the SSL VPN traffic.
This is an example configuration of SSL VPN that requires users to authenticate using a client certificate. The client
certificate is issued by the company Certificate Authority (CA). Each user is issued a certificate with their username in the
subject.
There are two ways to configure certificate authentication:
1. Using PKI users
2. Configuring the SSL VPN settings to require a client certificate
In this example, the server and client certificates are signed by the same Certificate Authority (CA).
Self-signed certificates are provided by default to simplify initial installation and testing. It is
HIGHLY recommended that you acquire a signed certificate for your installation.
Continuing to use these certificates can result in your connection being compromised, allowing
attackers to steal your information, such as credit card details.
For more information, please review the Use a non-factory SSL certificate for the SSL VPN
portal on page 1543 and learn how to Procuring and importing a signed SSL certificate on
page 2053.
When using PKI users, the FortiGate authenticates the user based on there identity in the subject or the common name
on the certificate. The certificate must be signed by a CA that is known by the FortiGate, either through the default CA
certificates or through importing a CA certificate.
The user can either match a static subject or common name defined in the PKI user settings, or match an LDAP user in
the LDAP server defined in the PKI user settings. Multi-factor authentication can also be enabled with the password as
the second factor.
Using this method, the user is authenticated based on their regular username and password, but SSL VPN will still
require an additional certificate check. The client certificate only needs to be signed by a known CA in order to pass
authentication.
This method can be configured by enabling Require Client Certificate (reqclientcert) in the SSL-VPN settings.
Configuration
In the following example, SSL VPN users are authenticated using the first method. A PKI user is configured with multi-
factor authentication
Pre-requisites:
l The CA has already issued a client certificate to the user.
l The CA has issued a server certificate for the FortiGate’s SSL VPN portal.
l The CA certificate is available to be imported on the FortiGate.
1. Install the server certificate. The server certificate allows the clients to authenticate the server and to encrypt the
SSL VPN traffic.
a. Go to System > Feature Visibility and ensure Certificates is enabled.
b. Go to System > Certificates and select Import > Local Certificate.
l Set Type to Certificate.
l Choose the Certificate file and the Key file for your certificate, and enter the Password.
l If required, you can change the Certificate Name.
The server certificate now appears in the list of Certificates.
2. Install the CA certificate.
The CA certificate is the certificate that signed both the server certificate and the user certificate. In this example, it
is used to authenticate SSL VPN users.
a. Go to System > Certificates and select Import > CA Certificate.
b. Select Local PC and then select the certificate file.
The CA certificate now appears in the list of External CA Certificates. In this example, it is called CA_Cert_1.
3. Configure PKI users and a user group.
To use certificate authentication, use the CLI to create PKI users.
config user peer
edit pki01
set ca CA_Cert_1
set subject "CN=User01"
next
end
Ensure that the subject matches the name of the user certificate. In this example, User01.
4. After you have create a PKI user, a new menu is added to the GUI:
a. Go to User & Authentication > PKI to see the new user.
b. Edit the user account.
c. Enable Two-factor authentication and set a password for the account.
d. Go to User & Authentication > User Groups and create a group called sslvpngroup.
e. Add the PKI user pki01 to the group.
5. Configure SSL VPN web portal.
a. Go to VPN > SSL-VPN Portals to edit the full-access portal.
This portal supports both web and tunnel mode.
b. Disable Enable Split Tunneling so that all SSL VPN traffic goes through the FortiGate.
7. Configure one SSL VPN firewall policy to allow remote user to access the internal network:
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “sslvpngroup”
set action accept
set schedule "always"
Installation
To use the user certificate, you must first install it on the user’s PC. When the user tries to authenticate, the user
certificate is checked against the CA certificate to verify that they match.
Every user should have a unique user certificate. This allows you to distinguish each user and revoke a specific user’s
certificate, such as if a user no longer has VPN access.
l Set Remote Gateway to the IP of the listening FortiGate interface, in this example, 172.20.120.123.
1. Go to VPN > Monitor > SSL-VPN Monitor to verify the list of SSL users.
2. Go to Log & Report > Events and select VPN Events from the event type dropdown list to view the details for the
SSL connection log.
This is a sample configuration of SSL VPN that requires users to authenticate using a certificate with LDAP
UserPrincipalName checking.
This sample uses Windows 2012R2 Active Directory acting as both the user certificate issuer, the certificate authority,
and the LDAP server.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
In this sample, the User Principal Name is included in the subject name of the issued certificate. This is the user field we
use to search LDAP in the connection attempt.
To use the user certificate, you must first install it on the user’s PC. When the user tries to authenticate, the user
certificate is checked against the CA certificate to verify that they match.
Every user should have a unique user certificate. This allows you to distinguish each user and revoke a specific user’s
certificate, such as if a user no longer has VPN access.
The server certificate is used for authentication and for encrypting SSL VPN traffic.
1. Go to System > Feature Visibility and ensure Certificates is enabled.
2. Go to System > Certificates and select Import > Local Certificate.
3. Set Type to Certificate.
4. Choose the Certificate file and the Key file for your certificate, and enter the Password.
5. If required, change the Certificate Name.
The server certificate now appears in the list of Certificates.
The CA certificate is the certificate that signed both the server certificate and the user certificate. In this example, it is
used to authenticate SSL VPN users.
1. Go to System > Certificates and select Import > CA Certificate.
2. Select Local PC and then select the certificate file.
The CA certificate now appears in the list of External CA Certificates. In this example, it is called CA_Cert_1.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
2. Configure the LDAP server:
a. Go to User & Authentication > LDAP Servers and click Create New.
b. Specify Name and Server IP/Name.
c. Set Distinguished Name to dc=fortinet-fsso,dc=com.
d. Set Bind Type to Regular.
e. Set Username to cn=admin,ou=testing,dc=fortinet-fsso,dc=com.
f. Set Password.
g. Click OK.
3. Configure PKI users and a user group:
To use certificate authentication, use the CLI to create PKI users.
config user peer
edit user1
set ca CA_Cert_1
set ldap-server "ldap-AD"
set ldap-mode principal-name
next
end
When you have create a PKI user, a new menu is added to the GUI:
a. Go to User & Authentication > PKI to see the new user.
b. Go to User & Authentication > User > User Groups and create a group sslvpn-group.
c. Add the PKI peer object you created as a local member of the group.
d. Add a remote group on the LDAP server and select the group of interest.
You need these users to be members using the LDAP browser window.
4. Configure SSL VPN web portal:
a. Go to VPN > SSL-VPN Portals to edit the full-access portal.
This portal supports both web and tunnel mode.
b. Disable Enable Split Tunneling so that all SSL VPN traffic goes through the FortiGate.
5. Configure SSL VPN settings:
a. Go to VPN > SSL-VPN Settings.
b. Select the Listen on Interface(s), in this example, wan1.
c. Set Listen on Port to 10443.
d. Set Server Certificate to the authentication certificate.
e. Under Authentication/Portal Mapping, set default Portal web-access for All Other Users/Groups.
f. Create new Authentication/Portal Mapping for group sslvpn-group mapping portal full-access.
6. Configure SSL VPN firewall policy:
a. Go to Policy & Objects > Firewall Policy.
b. Fill in the firewall policy name. In this example, sslvpn certificate auth.
c. Incoming interface must be SSL-VPN tunnel interface(ssl.root).
d. Set the Source Address to all and Source User to sslvpn-group.
e. Set the Outgoing Interface to the local network interface so that the remote user can access the internal
network. In this example, port1.
f. Set Destination Address to the internal protected subnet 192.168.1.0.
g. Set Schedule to always, Service to ALL, and Action to Accept.
h. Enable NAT.
i. Configure any remaining firewall and security options as desired.
j. Click OK.
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network:
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
7. Configure one SSL VPN firewall policy to allow remote user to access the internal network:
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “sslvpn-group”
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
1. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
2. Go to Log & Report > VPN Events to view the details of the SSL VPN connection event log.
3. Go to Log & Report > Forward Traffic to view the details of the SSL VPN traffic.
Below is a sample output of diagnose debug application fnbamd -1 while the user connects. This is a
shortened output sample of a few locations to show the important parts. This sample shows lookups to find the group
memberships (three groups total) of the user and that the correct group being found results in a match.
[1148] fnbamd_ldap_recv-Response len: 16, svr: 172.18.60.206
[829] fnbamd_ldap_parse_response-Got one MESSAGE. ID:4, type:search-result
[864] fnbamd_ldap_parse_response-ret=0
[1386] __fnbamd_ldap_primary_grp_next-Auth accepted
[910] __ldap_rxtx-Change state to 'Done'
[843] __ldap_rxtx-state 23(Done)
[925] fnbamd_ldap_send-sending 7 bytes to 172.18.60.206
[937] fnbamd_ldap_send-Request is sent. ID 5
[753] __ldap_stop-svr 'ldap-AD'
[53] ldap_dn_list_del_all-Del CN=test3,OU=Testing,DC=Fortinet-FSSO,DC=COM
[399] ldap_copy_grp_list-copied CN=group3,OU=Testing,DC=Fortinet-FSSO,DC=COM
[399] ldap_copy_grp_list-copied CN=Domain Users,CN=Users,DC=Fortinet-FSSO,DC=COM
[2088] fnbamd_auth_cert_check-Matching group 'sslvpn-group'
[2007] __match_ldap_group-Matching server 'ldap-AD' - 'ldap-AD'
[2015] __match_ldap_group-Matching group 'CN=group3,OU=Testing,DC=Fortinet-FSSO,DC=COM' -
'CN=group3,OU=Testing,DC=Fortinet-FSSO,DC=COM'
[2091] fnbamd_auth_cert_check-Group 'sslvpn-group' matched
[2120] fnbamd_auth_cert_result-Result for ldap svr[0] 'ldap-AD' is SUCCESS
[2126] fnbamd_auth_cert_result-matched user 'test3', matched group 'sslvpn-group'
You can also use diagnose firewall auth list to validate that a firewall user entry exists for the SSL VPN user
and is part of the right groups.
SSL VPN for remote users with MFA and user sensitivity
By default, remote LDAP and RADIUS user names are case sensitive. When a remote user object is applied to SSL VPN
authentication, the user must type the exact case that is used in the user definition on the FortiGate.
Case sensitivity and accents can be ignored by disabling the username-sensitivity CLI command, allowing the
remote user object to match any case or accents that the end user types in.
In this example, a remote user is configured with multi-factor authentication (MFA). The user group includes the LDAP
user and server, and is applied to SSL VPN authentication and the policy.
Topology
Example configuration
Name WIN2K16-KLHOME
Username KLHOME\\Administrator
Password *********
Protocol LDAPS
Certificate CA_Cert_1
This is the CA certificate that you imported in step 2.
c. Click OK.
1. Go to User & Authentication > User Definition and click Create New.
2. Select Remote LDAP User, then click Next.
3. Select the just created LDAP server, then click Next.
To configure a user group with the remote user and the LDAP server:
1. Go to User & Authentication > User Groups and click Create New.
2. Set the Name to LDAP-USERGRP.
3. Set Members to the just created remote user.
4. In the Remote Groups table, click Add:
a. Set Remote Server to the LDAP server.
b. Set the group or groups that apply, and right click to add them.
c. Click OK.
5. Click OK.
3. Click Apply.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the following:
Name SSLVPNtoInteral
Schedule always
Service ALL
Action ACCEPT
NAT Enabled
2. Configure an LDAP user with MFA and disable case and accent sensitivity on the remote user:
config user local
edit "fgdocs"
set type ldap
set two-factor fortitoken
set fortitoken "FTKMOBxxxxxxxxxx"
set email-to "[email protected]"
set username-sensitivity disable
set ldap-server "WIN2K16-KLHOME"
next
end
3. Configure a user group with the remote user and the LDAP server:
config user group
edit "LDAP-USERGRP"
set member "fgdocs" "WIN2K16-KLHOME"
next
end
Verification
In both cases, the remote user is matched against the remote LDAP user object and prompted for multi-factor
authentication.
In this case, the user is allowed to log in without a FortiToken code because the entered user name did not match the
name defined on the remote LDAP user object. Authentication continues to be evaluated against the LDAP server
though, which is not case sensitive.
This is a sample configuration of SSL VPN that uses FortiToken mobile push two-factor authentication. If you enable
push notifications, users can accept or deny the authentication request.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
2. Register FortiGate for FortiCare Support:
To add or download a mobile token on FortiGate, FortiGate must be registered for FortiCare Support. If your
FortiGate is registered, skip this step.
a. Go to Dashboard > Licenses.
b. Hover the pointer on FortiCare Support to check if FortiCare registered. If not, click it and select Register.
3. Add FortiToken mobile to FortiGate:
If your FortiGate has FortiToken installed, skip this step.
a. Go to User & Authentication > FortiTokens and click Create New.
b. Select Mobile Token and type in Activation Code.
c. Every FortiGate has two free mobile tokens. Go to User & Authentication > FortiTokens and click Import Free
Trial Tokens.
4. Enable FortiToken mobile push:
To use FTM-push authentication, use CLI to enable FTM-Push on the FortiGate.
a. Ensure server-ip is reachable from the Internet and enter the following CLI commands:
config system ftm-push
set server-ip 172.20.120.123
set status enable
end
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
10. Configure one SSL VPN firewall policy to allow remote user to access the internal network:
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “sslvpngroup”
set action accept
1. From a remote device, use a web browser to log into the SSL VPN web portal http://172.20.120.123:10443.
2. Log in using the sslvpnuser1 credentials.
The FortiGate pushes a login request notification through the FortiToken mobile application.
3. Check your mobile device and select Approve.
When the authentication is approved, sslvpnuser1 is logged into the SSL VPN portal.
4. On the FortiGate, go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
1. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
2. Go to Log & Report > Forward Traffic to view the details of the SSL VPN traffic.
This is a sample configuration of SSL VPN that uses FortiAuthenticator as a RADIUS authentication server.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Addresses and create an address for internal subnet 192.168.1.0.
2. Create a RADIUS user and user group .
a. On the FortiGate, go to User & Authentication > RADIUS Servers to create a user to connect to the RADIUS
server (FortiAuthenticator).
b. For Name, use FAC-RADIUS.
c. Enter the IP address of the FortiAuthenticator, and enter the Secret created above.
d. Click Test Connectivity to ensure you can connect to the RADIUS server.
e. Select Test User Credentials and enter the credentials for sslvpnuser1.
The FortiGate can now connect to the FortiAuthenticator as the RADIUS client.
f. Go to User & Authentication > User Groups and click Create New to map authenticated remote users to a user
group on the FortiGate.
g. For Name, use SSLVPNGroup.
h. In Remote Groups, click Add.
i. In the Remote Server dropdown list, select FAC-RADIUS.
j. Leave the Groups field blank.
3. Configure SSL VPN web portal.
a. Go to VPN > SSL-VPN Portals to edit the full-access portal.
This portal supports both web and tunnel mode.
b. Disable Enable Split Tunneling so that all SSL VPN traffic goes through the FortiGate.
4. Configure SSL VPN settings.
a. Go to VPN > SSL-VPN Settings.
b. Select the Listen on Interface(s), in this example, wan1.
c. Set Listen on Port to 10443.
d. Set Server Certificate to the authentication certificate.
e. Under Authentication/Portal Mapping, set default Portal web-access for All Other Users/Groups.
f. Create new Authentication/Portal Mapping for group sslvpngroup mapping portal full-access.
5. Configure SSL VPN firewall policy.
a. Go to Policy & Objects > Firewall Policy.
b. Fill in the firewall policy name. In this example, sslvpn certificate auth.
c. Incoming Interface must be SSL-VPN tunnel interface(ssl.root).
d. Set the Outgoing Interface to the local network interface so that the remote user can access the internal
network. In this example: port1.
e. Set the Source > Address to all and Source > User to sslvpngroup.
f. Set Destination > Address to the internal protected subnet 192.168.1.0.
g. Set Schedule to always, Service to ALL, and Action to Accept.
h. Enable NAT.
i. Configure the remaining options as required.
j. Click OK.
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
config authentication-rule
edit 1
set groups "sslvpngroup"
set portal "full-access"
next
end
end
6. Configure one SSL VPN firewall policy to allow remote user to access the internal network.
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “sslvpngroup”
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
1. From a remote device, use a web browser to log into the SSL VPN web portal http://172.20.120.123:10443.
2. Log in using the sslvpnuser1 credentials.
3. On the FortiGate, go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
1. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
2. Go to Log & Report > Forward Traffic to view the details of the SSL VPN traffic.
This is a sample configuration of SSL VPN that uses FortiAuthenticator as a RADIUS authentication server and
FortiToken mobile push two-factor authentication. If you enable push notifications, users can accept or deny the
authentication request.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
1. On the FortiAuthenticator, go to System > Administration > System Access and configure a Public IP/FQDN for
FortiToken Mobile. If the FortiAuthenticator is behind a firewall, the public IP/FQDN will be an IP/port forwarding rule
directed to one of the FortiAuthenticator interfaces. The interface that receives the approve/deny FTM push
responses must have the FortiToken Mobile API service enabled.
2. Add a FortiToken mobile license on the FortiAuthenticator:
a. Go to Authentication > User Management > FortiTokens.
b. Click Create New.
c. Set Token type to FortiToken Mobile and enter the FortiToken Activation codes.
3. Create the RADIUS client (FortiGate) on the FortiAuthenticator:
a. Go to Authentication > RADIUS Service > Clients to add the FortiGate as a RADIUS client OfficeServer).
b. Enter the FortiGate IP address and set a Secret.
The secret is a pre-shared secure password that the FortiGate uses to authenticate to the FortiAuthenticator.
c. Set Authentication method to Enforce two-factor authentication.
d. Select Enable FortiToken Mobile push notifications authentication.
e. Set Realms to local | Local users.
4. Create a user and assign FortiToken mobile to the user on the FortiAuthenticator:
a. Go to Authentication > User Management > Local Users to create a user sslvpnuser1.
b. Enable Allow RADIUS authentication and click OK to access additional settings.
c. Enable Token-based authentication and select to deliver the token code by FortiToken.
d. Select the FortiToken added from the FortiToken Mobile dropdown menu.
e. Set Delivery method to Email and fill in the User Information section.
f. Go to Authentication > User Management > User Groups to create a group sslvpngroup.
g. Add sslvpnuser1 to the group by moving the user from Available users to Selected users.
5. Install the FortiToken mobile application on your Android or iOS smartphone.
The FortiAuthenticator sends the FortiToken mobile activation to the user’s email address.
6. Activate the FortiToken mobile through the FortiToken mobile application by entering the activation code or
scanning the QR code.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
2. Create a RADIUS user and user group:
a. On the FortiGate, go to User & Authentication > RADIUS Servers to create a user to connect to the RADIUS
server (FortiAuthenticator).
b. For Name, use FAC-RADIUS.
c. Enter the IP address of the FortiAuthenticator, and enter the Secret created above.
d. Click Test Connectivity to ensure you can connect to the RADIUS server.
e. Select Test User Credentials and enter the credentials for sslvpnuser1.
The FortiGate can now connect to the FortiAuthenticator as the RADIUS client.
f. Go to User & Authentication > User Groups and click Create New to map authenticated remote users to a user
group on the FortiGate.
g. For Name, use SSLVPNGroup.
h. In Remote Groups, click Add.
i. In the Remote Server dropdown list, select FAC-RADIUS.
j. Leave the Groups field blank.
3. Configure SSL VPN web portal:
a. Go to VPN > SSL-VPN Portals to edit the full-access portal.
This portal supports both web and tunnel mode.
b. Disable Enable Split Tunneling so that all SSL VPN traffic goes through the FortiGate.
4. Configure SSL VPN settings:
a. Go to VPN > SSL-VPN Settings.
b. Select the Listen on Interface(s), in this example, wan1.
c. Set Listen on Port to 10443.
d. Set Server Certificate to the authentication certificate.
e. Under Authentication/Portal Mapping, set default Portal web-access for All Other Users/Groups.
f. Create new Authentication/Portal Mapping for group sslvpngroup mapping portal full-access.
5. Configure SSL VPN firewall policy:
a. Go to Policy & Objects > Firewall Policy.
b. Fill in the firewall policy name. In this example, sslvpn certificate auth.
c. Incoming interface must be SSL-VPN tunnel interface(ssl.root).
d. Set the Source Address to all and Source User to sslvpngroup.
e. Set the Outgoing Interface to the local network interface so that the remote user can access the internal
network. In this example: port1.
f. Set Destination Address to the internal protected subnet 192.168.1.0.
g. Set Schedule to always, Service to ALL, and Action to Accept.
h. Enable NAT.
i. Configure any remaining firewall and security options as desired.
j. Click OK.
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network:
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
6. Configure one SSL VPN firewall policy to allow remote user to access the internal network:
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “sslvpngroup”
set action accept
1. From a remote device, use a web browser to log into the SSL VPN web portal http://172.20.120.123:10443.
2. Log in using the sslvpnuser1 credentials.
The FortiAuthenticator pushes a login request notification through the FortiToken Mobile application.
3. Check your mobile device and select Approve.
When the authentication is approved, sslvpnuser1 is logged into the SSL VPN portal.
4. On the FortiGate, go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
1. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
2. Go to Log & Report > Forward Traffic to view the details of the SSL VPN traffic.
This is a sample configuration of SSL VPN for RADIUS users with Force Password Change on next logon. In this
example, the RADIUS server is a FortiAuthenticator. A user test1 is configured on FortiAuthenticator with Force
password change on next logon.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
7. Configure one SSL VPN firewall policy to allow remote user to access the internal network.
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “fac-group”
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
1. From a remote device, use a web browser to log into the SSL VPN web portal http://172.20.120.123:10443.
2. Log in using the test1 credentials.
Use a user which is configured on FortiAuthenticator with Force password change on next logon.
3. Click Login. You are prompted to enter a new password.
4. On the FortiGate, go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
l Set Remote Gateway to the IP of the listening FortiGate interface, in this example, 172.20.120.123.
1. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
2. Go to Log & Report > Events and select VPN Events from the event type dropdown list to view the details of the SSL
This is an example configuration of SSL VPN that uses Windows Network Policy Server (NPS) as a RADIUS
authentication server.
The NPS must already be configured to accept the FortiGate as a RADIUS client and the choice of authentication
method, such as MS-CHAPv2. A shared key must also have been created.
Example
The user is connecting from their PC to the FortiGate's port1 interface. RADIUS authentication occurs between the
FortiGate and the Windows NPS, and the SSL-VPN connection is established once the authentication is successful.
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. Set Name to 192.168.20.0.
3. Leave Type as Subnet
4. Set IP/Netmask to 192.168.20.0/24.
5. Click OK.
1. Go to User & Authentication > RADIUS Servers and click Create New.
2. Set Name to rad-server.
3. Leave Authentication method set to Default. The PAP, MS-CHAPv2, and CHAP methods will be tried in order.
4. Under Primary Server, set IP/Name to 192.168.20.6 and Secret to the shared secret configured on the RADIUS
server.
5. Click Test Connectivity to test the connection to the server, and ensure that Connection status is Successful.
6. Optionally, click Test User Credentials to test user credentials. Testing from the GUI is limited to PAP.
7. Click OK.
1. Go to User & Authentication > User Groups and click Create New.
2. Set Name to rad-group.
4. Click OK.
c. Click OK.
6. Click Apply.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Set the policy name, in this example, sslvpn-radius.
3. Set Incoming Interface to SSL-VPN tunnel interface(ssl.root).
4. Set Outgoing Interface to the local network interface so that the remote user can access the internal network. In this
example, port2.
5. Set the Source > Address to all and Source > User to rad-group.
6. Set Destination > Address to the internal protected subnet 192.168.20.0.
7. Set Schedule to always, Service to ALL, and Action to Accept.
8. Enable NAT.
6. Configure an SSL VPN firewall policy to allow remote user to access the internal network.
config firewall policy
edit 1
set name "sslvpn-radius"
set srcintf "ssl.root"
set dstintf "port2"
set srcaddr "all"
set dstaddr "192.168.20.0"
set groups “rad-group”
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
Results
1. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
2. Go to Log & Report > Events and select VPN Events from the event type drop-down list to view the details of the
SSL VPN connection event log.
3. Go to Log & Report > Forward Traffic to view the details of the SSL VPN traffic.
When configuring two or more RADIUS servers, you can configure a Primary and Secondary server within the same
RADIUS server configurations for backup purposes. You can also configure multiple RADIUS servers within the same
User Group to service the access request at the same time.
Sample topology
Sample configurations
l Configure a Primary and Secondary server for backup on page 1628
l Authenticating to two RADIUS servers concurrently on page 1632
When you define a Primary and Secondary RADIUS server, the access request will always be sent to the Primary server
first. If the request is denied with an Access-Reject, then the user authentication fails. However, if there is no response
from the Primary server after another attempt, the access request will be sent to the Secondary server.
In this example, you will use a Windows NPS server as the Primary server and a FortiAuthenticator as the Secondary
server. It is assumed that users are synchronized between the two servers.
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. Set Name to 192.168.20.0.
3. Leave Type as Subnet
4. Set IP/Netmask to 192.168.20.0/24.
5. Click OK.
1. Go to User & Authentication > RADIUS Servers and click Create New.
2. Set Name to PrimarySecondary.
3. Leave Authentication method set to Default. The PAP, MS-CHAPv2, and CHAP methods will be tried in order.
4. Under Primary Server, set IP/Name to 192.168.20.6 and Secret to the shared secret configured on the RADIUS
server.
5. Click Test Connectivity to test the connection to the server, and ensure that Connection status is Successful.
6. Under Secondary Server, set IP/Name to 192.168.2.71 and Secret to the shared secret configured on the RADIUS
server.
7. Click Test Connectivity to test the connection to the server, and ensure that Connection status is Successful.
8. Click OK.
1. Go to User & Authentication > User Groups and click Create New.
2. In the Name field, enter PrimarySecondaryGroup.
3. In the Remote Groups area, click Add, and from the Remote Server dropdown, select PrimarySecondary.
4. Click OK, and then click OK again.
c. Click OK.
6. Create a web portal for PrimarySecondaryGroup.
a. Under Authentication/Portal Mapping, click Create New.
b. Click Users/Groups and select PrimarySecondaryGroup.
c. From the Portal dropdown, select full-access.
d. Click OK.
Outgoing interface Set to the local network interface so that the remote user can access the internal
network.
For this example, select port3.
Schedule always
Service All
Action Accept
NAT Enable
edit "PrimarySecondary"
set server "192.168.20.6"
set secret <secret>
set secondary-server "192.168.2.71"
set secondary-secret <secret>
next
end
3. Add the RADIUS user to the user group:
config user group
edit "PrimarySecondaryGroup"
set member "PrimarySecondary "
next
end
4. Configure SSL VPN settings:
config vpn ssl settings
set servercert "server_certificate"
set tunnel-ip-pools "SSLVPN_TUNNEL_ADDR1"
set source-interface "port1"
set source-address "all"
set default-portal "web-access"
config authentication-rule
edit 1
set groups "PrimarySecondaryGroup "
set portal "full-access"
next
end
end
5. Configure one SSL VPN firewall policy to allow remote users to access the internal network:
config firewall policy
edit 1
set name "sslvpn-radius"
set srcintf "ssl.root"
set dstintf "port3"
set srcaddr "all"
set dstaddr "192.168.20.0"
set groups “PrimarySecondaryGroup”
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
User radkeith is a member of both the NPS server and the FAC server.
When the Primary server is up, it will connect to the SSL VPN tunnel using FortiClient.
# diagnose sniffer packet any 'port 1812' 4 0 l
interfaces=[any]
filters=[port 1812]
2020-05-15 16:26:50.838453 port3 out 192.168.20.5.2374 -> 192.168.20.6.1812: udp 118
2020-05-15 16:26:50.883166 port3 in 192.168.20.6.1812 -> 192.168.20.5.2374: udp 20
2020-05-15 16:26:50.883374 port3 out 192.168.20.5.2374 -> 192.168.20.6.1812: udp 182
2020-05-15 16:26:50.884683 port3 in 192.168.20.6.1812 -> 192.168.20.5.2374: udp 228
The access request is sent to the Primary NPS server 192.168.20.6, and the connection is successful.
# get vpn ssl monitor
SSL VPN Login Users:
Index User Group Auth Type Timeout From HTTP
in/out HTTPS in/out
0 radkeith PrimarySecondaryGroup 2(1) 285 192.168.2.202
0/0 0/0
SSL VPN sessions:
Index User Group Source IP Duration I/O Bytes
Tunnel/Dest IP
0 radkeith PrimarySecondaryGroup 192.168.2.202 62 132477/4966
10.212.134.200
When the Primary server is down, and the Secondary server is up, the connection is made to the SSLVPN tunnel again:
# diagnose sniffer packet any 'port 1812' 4 0 l
interfaces=[any]
filters=[port 1812]
2020-05-15 16:31:23.016875 port3 out 192.168.20.5.7989 -> 192.168.20.6.1812: udp 118
2020-05-15 16:31:28.019470 port3 out 192.168.20.5.7989 -> 192.168.20.6.1812: udp 118
2020-05-15 16:31:30.011874 port1 out 192.168.2.5.23848 -> 192.168.2.71.1812: udp 118
2020-05-15 16:31:30.087564 port1 in 192.168.2.71.1812 -> 192.168.2.5.23848: udp 20
Access request is sent to the Primary NPS server 192.168.20.6, but there was no response. RADIUS authentication falls
through to the Secondary FortiAuthenticator 192.168.2.71, and the authentication was accepted. The VPN connection is
established.
# get vpn ssl monitor
SSL VPN Login Users:
Index User Group Auth Type Timeout From HTTP
in/out HTTPS in/out
0 radkeith PrimarySecondaryGroup 2(1) 287 192.168.2.202
0/0 0/0
SSL VPN sessions:
Index User Group Source IP Duration I/O Bytes
Tunnel/Dest IP
0 radkeith PrimarySecondaryGroup 192.168.2.202 48 53544/4966
10.212.134.200
There are times where users are located on separate RADIUS servers. This may be the case when migrating from an old
server to a new one for example. In this scenario, a Windows NPS server and a FortiAuthenticator are configured in the
same User Group. The access-request is sent to both servers concurrently. If FortiGate receives an access-accept from
either server, authentication is successful.
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. Set Name to 192.168.20.0.
3. Leave Type as Subnet
4. Set IP/Netmask to 192.168.20.0/24.
5. Click OK.
1. Go to User & Authentication > RADIUS Servers and click Create New.
2. Set Name to win2k16.
3. Leave Authentication method set to Default. The PAP, MS-CHAPv2, and CHAP methods will be tried in order.
4. Under Primary Server, set IP/Name to 192.168.20.6 and Secret to the shared secret configured on the RADIUS
server.
5. Click Test Connectivity to test the connection to the server, and ensure that Connection status is Successful.
6. Click OK.
1. Go to User & Authentication > RADIUS Servers and click Create New.
2. Set Name to fac.
3. Leave Authentication method set to Default. The PAP, MS-CHAPv2, and CHAP methods will be tried in order.
4. Under Primary Server, set IP/Name to 192.168.2.71 and Secret to the shared secret configured on the RADIUS
server.
5. Click Test Connectivity to test the connection to the server, and ensure that Connection status is Successful.
6. Click OK.
1. Go to User & Authentication > User Groups and click Create New.
2. In the Name field, enter dualPrimaryGroup..
3. In the Remote Groups area, click Add, and from the Remote Server dropdown, select fac.
4. Click Add again. From the Remote Server dropdown select win2k16 and click OK.
5. Click OK, and then click OK again.
Outgoing interface Set to the local network interface so that the remote user can access the internal
network.
For this example, select port3.
Schedule always
Service All
Action Accept
NAT Enable
Case 1: Connect to the SSLVPN tunnel using FortiClient with user FacAdmin:
# diagnose sniffer packet any 'port 1812' 4 0 l
interfaces=[any]
filters=[port 1812]
2020-05-15 17:21:31.217985 port3 out 192.168.20.5.11490 -> 192.168.20.6.1812: udp 118
2020-05-15 17:21:31.218091 port1 out 192.168.2.5.11490 -> 192.168.2.71.1812: udp 118
2020-05-15 17:21:31.219314 port3 in 192.168.20.6.1812 -> 192.168.20.5.11490: udp 20 <--
access-reject
2020-05-15 17:21:31.219519 port3 out 192.168.20.5.11490 -> 192.168.20.6.1812: udp 182
2020-05-15 17:21:31.220219 port3 in 192.168.20.6.1812 -> 192.168.20.5.11490: udp 42
2020-05-15 17:21:31.220325 port3 out 192.168.20.5.11490 -> 192.168.20.6.1812: udp 119
2020-05-15 17:21:31.220801 port3 in 192.168.20.6.1812 -> 192.168.20.5.11490: udp 20
2020-05-15 17:21:31.236009 port1 in 192.168.2.71.1812 -> 192.168.2.5.11490: udp 20 <--
access-accept
Access is denied by the NPS server because the user does not exist. However, access is accepted by
FortiAuthenticator. The end result is the authentication is successful.
# get vpn ssl monitor
SSL VPN Login Users:
Index User Group Auth Type Timeout From HTTP
in/out HTTPS in/out
0 fackeith dualPrimaryGroup 2(1) 292 192.168.2.202 0/0
0/0
SSL VPN sessions:
Index User Group Source IP Duration I/O Bytes
Tunnel/Dest IP
0 fackeith dualPrimaryGroup 192.168.2.202 149 70236/4966
10.212.134.200
Case 2: Connect to the SSLVPN tunnel using FortiClient with user radkeith:
# diagnose sniffer packet any 'port 1812' 4 0 l
interfaces=[any]
filters=[port 1812]
2020-05-15 17:26:07.335791 port1 out 192.168.2.5.17988 -> 192.168.2.71.1812: udp 118
2020-05-15 17:26:07.335911 port3 out 192.168.20.5.17988 -> 192.168.20.6.1812: udp 118
2020-05-15 17:26:07.337659 port3 in 192.168.20.6.1812 -> 192.168.20.5.17988: udp 20 <--
access-accept
2020-05-15 17:26:07.337914 port3 out 192.168.20.5.17988 -> 192.168.20.6.1812: udp 182
2020-05-15 17:26:07.339451 port3 in 192.168.20.6.1812 -> 192.168.20.5.17988: udp 228
2020-05-15 17:26:08.352597 port1 in 192.168.2.71.1812 -> 192.168.2.5.17988: udp 20 <--
access-reject
There is a password mismatch for this user on the Secondary RADIUS server. However, even though the
authentication was rejected by FortiAuthenticator, it was accepted by Windows NPS. Therefore, the end result is
authentication successful.
# get vpn ssl monitor
SSL VPN Login Users:
Index User Group Auth Type Timeout From HTTP
in/out HTTPS in/out
0 radkeith dualPrimaryGroup 2(1) 290 192.168.2.202 0/0
0/0
This is a sample configuration of SSL VPN for users with passwords that expire after two days. Users are warned after
one day about the password expiring. The password policy can be applied to any local user password. The password
policy cannot be applied to a user group or a local remote user such as LDAP/RADIUS/TACACS+.
In FortiOS 6.2, users are warned after one day about the password expiring and have one day to renew it. If the
password expires, the user cannot renew the password and must contact the administrator for assistance.
In FortiOS 6.0/5.6, users are warned after one day about the password expiring and have to renew it. If the password
expires, the user can still renew the password.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet subnet 192.168.1.0.
2. Configure user and user group.
a. Go to User & Authentication > User Definition to create a local user.
b. Go to User & Authentication > User Groups to create a user group and add that local user to it.
3. Configure and assign the password policy using the CLI.
a. Configure a password policy that includes an expiry date and warning time. The default start time for the
password is the time the user was created.
config user password-policy
edit "pwpolicy1"
set expire-days 2
set warn-days 1
next
end
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "192.168.1.0"
set subnet 192.168.1.0 255.255.255.0
next
end
next
end
7. Configure one SSL VPN firewall policy to allow remote user to access the internal network.
config firewall policy
edit 1
set name "sslvpn web mode access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "192.168.1.0"
set groups “sslvpngroup”
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
1. From a remote device, use a web browser to log into the SSL VPN web portal http://172.20.120.123:10443.
2. Log in using the sslvpnuser1 credentials.
When the warning time is reached, the user is prompted to enter a new password.
In FortiOS 6.2, when the password expires, the user cannot renew the password and must contact the
administrator.
In FortiOS 6.0/5.6, when the password expires, the user can still renew the password.
3. On the FortiGate, go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
l Set Remote Gateway to the IP of the listening FortiGate interface, in this example, 172.20.120.123.
1. Go to Dashboard > Network and expand the SSL-VPN widget to verify the user’s connection.
2. Go to Log & Report > Forward Traffic to view the details of the SSL VPN traffic.
1. Go to Log & Report > Events and select VPN Events from the event type dropdown list to see the SSL VPN alert
labeled ssl-login-fail.
2. Click Details to see the log details about the Reason sslvpn_login_password_expired.
Dynamic SSO user groups can be used in place of address objects when configuring SSL VPN policies. This allows
dynamic IP addresses to be used in SSL VPN policies. A remote user group can be used for authentication while an
FSSO group is separately used for authorization. Using a dummy policy for remote user authentication and a policy for
FSSO group authorization, FSSO can be used with SSL VPN tunnels.
This image shows the authentication and authorization flow:
In this example, FortiAuthenticator is used as a RADIUS server. It uses a remote AD/LDAP server for authentication,
then returns the authentication results to the FortiGate. This allows the client to have a dynamic IP address after
successful authentication.
First, on the LDAP server, create two users each in their own group, user142 in group pc_group1, and user143 in group
pc_group2.
l Username: cn=administrator,cn=User
4. Click OK.
5. Edit the new LDAP server.
6. Import the remote LDAP users.
7. Edit each user to confirm that they have the RADIUS attribute Acct-Interim-Interval. This attribute is used by
4. In the Realms table, set the realm to the LDAP server that was just added: ad_ldap_60.
5. Click OK.
FortiAuthenticator can now be used as a RADIUS server, and the authentication credentials all come from the
DC/LDAP server.
4. Select Enable RADIUS accounting server and set the Shared secret.
5. Create an SSL VPN portal and assign the RADIUS user group to it:
config vpn ssl web portal
edit "testportal"
set tunnel-mode enable
set ipv6-tunnel-mode enable
set web-mode enable
...
next
end
config vpn ssl settings
...
set default-portal "full-access"
config authentication-rule
edit 1
set groups "rad_group"
set portal "testportal"
next
end
end
7. Create one dummy policy for authentication only, and two normal policies for authorization:
config firewall policy
edit 1
set name "sslvpn_authentication"
set srcintf "ssl.vdom1"
set dstintf "port1"
set srcaddr "all"
set dstaddr "none"
set action accept
set schedule "always"
6. Click OK.
5. Click OK.
To create user groups for each of the FSSO groups in the GUI:
To create an SSL VPN portal and assign the RADIUS user group to it in the GUI:
Confirmation
On Client 1, log in to FortiClient using user142. Traffic can go to pc4 (172.16.200.44), but cannot go to pc5
(172.16.200.55).
On Client 2, log in to FortiClient using user143. Traffic can go to pc5 (172.16.200.55), but cannot go to pc4
(172.16.200.44).
On the FortiGate, check the authenticated users list and the SSL VPN status:
# diagnose firewall auth list
10.212.134.200, USER142
type: fsso, id: 0, duration: 173, idled: 173
server: AD_CollectAgent
packets: in 0 out 0, bytes: in 0 out 0
user_id: 16777229
group_id: 3 33554434
group_name: fsso_group1 CN=PC_GROUP1,OU=TESTING,DC=FSSO-QA,DC=COM
10.212.134.200, user142
type: fw, id: 0, duration: 174, idled: 174
expire: 259026, allow-idle: 259200
flag(80): sslvpn
server: rad150
packets: in 0 out 0, bytes: in 0 out 0
group_id: 4
group_name: rad_group
10.212.134.201, USER143
type: fsso, id: 0, duration: 78, idled: 78
server: AD_CollectAgent
10.212.134.201, user143
type: fw, id: 0, duration: 79, idled: 79
expire: 259121, allow-idle: 259200
flag(80): sslvpn
server: rad150
packets: in 0 out 0, bytes: in 0 out 0
group_id: 4
group_name: rad_group
This sample shows how to create a multi-realm SSL VPN that provides different portals for different user groups.
Sample topology
Sample configuration
WAN interface is the interface connected to ISP. This example shows static mode. You can also use DHCP or PPPoE
mode. The SSL VPN connection is established over the WAN interface.
The split tunneling routing address cannot explicitly use an FQDN or an address group that
includes an FQDN. To use an FQDN, leave the routing address blank and apply the FQDN as
the destination address of the firewall policy.
1. Configure the interface and firewall address. The port1 interface connects to the internal network.
a. Go to Network > Interfaces and edit the wan1 interface.
b. Set IP/Network Mask to 172.20.120.123/255.255.255.0.
c. Edit port1 interface and set IP/Network Mask to 192.168.1.99/255.255.255.0.
d. Click OK.
e. Go to Policy & Objects > Address and create an address for internet QA_subnet with subnet 192.168.1.0/24
and HR_subnet with subnet 10.1.100.0/24.
2. Configure user and user group.
a. Go to User & Authentication > User Definition to create local users qa-user1 and hr-user1.
b. Go to User & Authentication > User Groups to create separate user groups for web-only and full-access
portals:
l QA_group with member qa-user1.
2. Configure internal interface and protected subnet, then connect the port1 interface to the internal network.
config system interface
edit "port1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
next
end
config firewall address
edit "QA_subnet"
set subnet 192.168.1.0 255.255.255.0
next
edit "HR_subnet"
set subnet 10.1.100.0 255.255.255.0
next
end
edit qa
next
end
6. Configure SSL VPN settings.
config vpn ssl settings
set servercert "Fortinet_Factory"
set tunnel-ip-pools "SSLVPN_TUNNEL_ADDR1"
set tunnel-ipv6-pools "SSLVPN_TUNNEL_IPv6_ADDR1"
set source-interface "wan1"
set source-address "all"
set source-address6 "all"
set default-portal "full-access"
config authentication-rule
edit 1
set groups "QA_group"
set portal "qa-tunnel"
set realm qa
next
edit 2
set groups "HR_group"
set portal "hr-web"
set realm hr
next
end
end
7. Configure two SSL VPN firewall policies to allow remote QA user to access internal QA network and HR user to
access HR network.
config firewall policy
edit 1
set name "QA sslvnpn tunnel access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "QA_subnet"
set groups “QA_group”
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "HR sslvpn web access"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "HR_subnet"
set groups “HR_group”
set action accept
set schedule "always"
set service "ALL"
next
end
l If a virtual-host is specified, use the FQDN defined for the realm (qa.mydomain.com).
4. Select Customize Port and set it to 10443.
5. Save your settings.
6. Use the credentials you've set up to connect to the SSL VPN tunnel.
If the user's computer has antivirus software, a connection is established; otherwise FortiClient shows a compliance
warning.
7. After connection, traffic to subnet 192.168.1.0 goes through the tunnel.
8. On the FortiGate, go to Dashboard > Network and expand the SSL-VPN widget to verify the list of SSL users.
9. On the FortiGate, go to VPN > Monitor > SSL-VPN Monitor to verify the list of SSL users.
10. On the FortiGate, go to Log & Report > Forward Traffic and view the details of the traffic.
1. In a web browser, log into the portal https://172.20.120.123:10443/hr using the credentials you've set up.
2. Alternatively, if a virtual-host is specified, use the FQDN defined for the realm (hr.mydomain.com).
3. On the FortiGate, go to Dashboard > Network and expand the SSL-VPN widget to verify the list of SSL users.
4. Go to Log & Report > Forward Traffic and view the details of the traffic.
For RADIUS authentication and authorization, the RADIUS client (the FortiGate) passes the username, password, and
NAS-IP to the RADIUS server in its access request. The RADIUS server authenticates and authorizes based on this
information. Each RADIUS server can be configured with multiple NAS-IPs for authenticating different groups and NAS
clients.
On the FortiGate, configuring the NAS-IP in the realm settings overrides the RADIUS server setting, allowing multiple
NAS-IPs to be mapped to the same RADIUS server.
In this example, the user wants to present one FortiGate VDOM with different NAS-IPs to a single RADIUS server based
on specific rules.
3. Configure SSL-VPN with an authentication rule that includes the user group and the realm:
config vpn ssl settings
...
config authentication-rule
edit 1
set groupd "radgrp"
set portal "testportal1"
set realm "realm1"
next
end
end
Because the RADIUS server and NAS-IP are specified in realm1, its NAS-IP is used for authentication.
You can use SAML single sign on to authenticate against Azure Active Directory with SSL VPN SAML user via tunnel
and web modes. See:
l Configuring SAML SSO login for SSL VPN with Azure AD acting as SAML IdP
l Tutorial: Azure AD SSO integration with FortiGate SSL VPN
This is a sample configuration of site-to-site IPsec VPN that allows access to the remote endpoint via SSL VPN.
This example uses a pre-existing user group, a tunnel mode SSL VPN with split tunneling, and a route-based IPsec VPN
between two FortiGates. All sessions must start from the SSL VPN interface.
If you want sessions to start from the FGT_2 subnet, you need more policies. Also, if the remote subnet is beyond FGT_
2 (if there are multiple hops), you need to include the SSL VPN subnet in those routers as well.
Sample topology
Sample configuration
c. Click Next.
3. In the Authentication pane:
a. Enter the IP Address to the Internet-facing interface.
b. For Authentication Method, click Pre-shared Key and enter the Pre-shared Key.
c. Click Next.
4. In the Policy & Routing pane:
a. Set the Local Interface to the internal interface.
b. Set the Local Subnets to include the internal and SSL VPN subnets for FGT_1.
c. Set Remote Subnets to include the internal subnet for FGT_2.
d. Click Next.
A confirmation screen shows a summary of the configuration including the firewall address groups for both the local and
remote subnets, static routes, and security policies.
It is HIGHLY recommended that you acquire a signed certificate for your installation.
Please review the SSL VPN best practices on page 1541 and learn how to Procuring and
importing a signed SSL certificate on page 2053.
7. Click Apply.
6. Click OK.
c. Click Next.
3. In the Authentication pane:
a. Enter the IP Address to the Internet-facing interface.
b. For Authentication Method, click Pre-shared Key and enter the Pre-shared Key of the FGT_1.
c. Click Next.
4. In the Policy & Routing pane:
a. Set the Local Interface to the internal interface.
b. Set the Local Subnets to include the internal and SSL VPN subnets for FGT_2.
c. Set Remote Subnets to include the internal subnet for FGT_1.
d. Click Create.
A confirmation screen shows a summary of the configuration including the firewall address groups for both the local and
remote subnets, static routes, and security policies.
1. Go to Dashboard > Network and click the IPsec widget to expand to full screen view.
2. Select the tunnel and click Bring Up.
5. On the user's computer, send a ping though the tunnel to the remote endpoint to confirm access:
C:\>ping 172.16.200.55
Troubleshooting
1. Send a ping through the SSL VPN tunnel to 172.16.200.55 and analyze the output of the debug.
2. Disable the debug output with: diagnose debug disable.
If traffic is entering the correct VPN tunnel on FGT_1, then run the same commands on FGT_2 to check whether the
traffic is reaching the correct tunnel. If it is reaching the correct tunnel, confirm that the SSL VPN tunnel range is
configured in the remote side quick mode selectors.
To troubleshoot IPsec VPN issues, use the following commands on either FortiGate:
TLS 1.3 support requires IPS engine 4.205 or later and endpoints running FortiClient 6.2.0 or
later.
To establish a client SSL VPN connection with TLS 1.3 to the FortiGate:
FortiOS supports TLS 1.3 for policies that have the following security profiles applied:
l Web filter profile with flow-based inspection mode enabled.
l Deep inspection SSL/SSH inspection profile.
For example, when a client attempts to access a website that supports TLS 1.3, FortiOS sends the traffic to the IPS
engine. The IPS engine then decodes TLS 1.3 and the client is able to access the website.
SMBv2 support
On all FortiGate models, SMBv2 is enabled by default for SSL VPN. Client PCs can access the SMBv2 server using SSL
VPN web-only mode.
To configure SMBv2:
Beyond the basics of setting up the SSL VPN, you can configure a number of other options that can help to ensure your
internal network is secure and can limit the possibility of attacks and viruses entering the network from an outside
source. These include verifying OS and performing host checks on software running on the remote device.
To verify that remote users are using devices with up-to-date Operating Systems to connect to your network, you can
configure a host check for Windows and Mac OS. You can configure an OS host check for specific OS versions, such as
Windows 7, 8, 8.1, 10, and 2000.
Host check
Host check verifies whether the client device has AntiVirus, firewall, both, or other custom security software enabled on
their Windows device. Admins may also define their own custom host check software, which supports Windows and Mac
You can configure the full-access portal to perform a custom host check for FortiClient Host Security AV and firewall
software.
Many other security software can also be configured. Use set host-check-policy ? to
see a list of software.
You can add your own host security check error message using either the GUI or the CLI. The default message reads:
Your PC does not meet the host checking requirements set by the firewall. Please try again
in a few minutes. If the issue persists check that your OS version meets the minimum
requirements, that your antivirus and firewall applications are installed and running
properly, and that you have the correct network interface.
If you are unhappy with the new message, you can restore the message to its default by
selecting Restore Defaults instead of Save.
Aside from OS and Host check, FortiGate can also perform a MAC address check on the remote host.
You can add your own software requirements to the host check list using the CLI. Host integrity checking is only possible
with client computers running Microsoft Windows platforms.
next
end
If known, enter the Globally Unique Identifier (GUID) for the host check application. Windows uses GUIDs to identify
applications in the Windows Registry. The GUID can be found in the Windows registry in the HKEY_CLASSES_ROOT
section.
To obtain the exact versioning, in Windows, right-click on the .EXE file of the application and select Properties, then
select the Version tab.
The following example configuration checks if a required registry key is present on a Windows device.
config vpn ssl web host-check-software
edit <computer_name>
config check-item-list
edit 1
set target "HKEY_LOCAL_
MACHINE\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName:ComputerName=W
INXP32SP3B62"
set type registry
next
end
next
end
The following example configuration checks if a required application is installed and/or running:
config vpn ssl web host-check-software
edit "calc"
config check-item-list
edit 1
set target "calc.exe"
set type process
next
end
next
end
The os-type option is available under vpn ssl web host-check-software; if os-type is macos, then type,
version and guid are hidden. Furthermore, type in check-item-list can only be set to file or process.
config vpn ssl web portal
edit <portal_name>
set os-check enable
config os-check-list macos-bigsur-11
set action {allow | deny | check-up-to-date}
set tolerance <value>
set latest-patch-level <value>
end
next
end
config vpn ssl web host-check-software
edit <name>
set os-type macos
config check-item-list
edit <name>
set type process
set target <target process>
next
end
next
end
The Windows patch check enables you to define the minimum Windows version and patch level allowed when
connecting to the SSL VPN portal. When the user attempts to connect to the web portal, FortiOS performs a query on the
version of Windows the user has installed. If it does not match the minimum requirement, the connection is denied. The
Windows patch check is configured in the CLI.
To specify the acceptable patch level, you set the latest-patch-level and the tolerance. The lowest acceptable
patch level is latest-patch-level minus tolerance. In this case, latest-patch-level is three and tolerance is one, so
two is the lowest acceptable patch level.
To configure OS check:
The Windows built-in firewall does not have a GUID in root\securitycenter or root\securitycenter2, but you can use a
registry value to detect the firewall status.
If Windows firewall is on, the following registry value will be set to one:
l KeyName: HKEY_LOCAL_
MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile
l ValueName: EnableFirewall
In FortiOS, use the registry-value-check feature to define the Windows firewall software.
config check-item-list
edit 1
set target
"HKLM\\SYSTEM\\CurrentControlSet\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\Standa
rdProfile:EnableFirewall==1"
set type registry
next
edit 2
set target
"HKLM\\SYSTEM\\CurrentControlSet\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\Public
Profile:EnableFirewall==1"
set type registry
next
edit 3
set target
"HKLM\\SYSTEM\\CurrentControlSet\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\Domain
Profile:EnableFirewall==1"
set type registry
next
end
next
end
config vpn ssl web portal
edit <portal_name>
set host-check custom
set host-check-policy Microsoft-Windows-Firewall
next
end
Troubleshooting
To troubleshoot OS and host check, enable the following real-time debugs from the CLI:
# diagnose debug app sslvpn -1
# diagnose debug enable
From the remote client, connect to SSL VPN. Look for debug output similar to the following:
[263:root:3cca1]host check result:4 0100,10.0.19042,74:78:27:4d:81:93|84:1b:77:3a:95:84
Field Description
host check result: 4 This is the hex number of portal's host check value:
l 0: None
l 1: Check antivirus
l 2: Check firewall
l 3: Check antivirus and firewall
l 4: Custom check
0100 The 4 bytes shows the result of host check checking in the
FortiGate Settings. Position counts from left to right, zero to
three:
Field Description
l Position zero means result of third party firewall.
l Position one means result of third party antivirus.
l Position two means result of FortiClient firewall.
l Position three means result of FortiClient antivirus.
0 means not in use. 1 means in use.
10.0.19042 This is the OS version.
74:78:27:4d:81:93|84:1b:77:3a:95:84 The MAC address of the client machine's network interface, that
is used for the mac address check. Multiple MAC address are
separately by '|'.
The FortiGate can be configured as an SSL VPN client, using an SSL-VPN Tunnel interface type. When an SSL VPN
client connection is established, the client dynamically adds a route to the subnets that are returned by the SSL VPN
server. Policies can be defined to allow users that are behind the client to be tunneled through SSL VPN to destinations
on the SSL VPN server.
FortiOS can be configured as an SSL VPN server that allows IP-level connectivity in tunnel mode, and can act as an SSL
VPN client that uses the protocol used by the FortiOS SSL VPN server. This allows hub-and-spoke topologies to be
configured with FortiGates as both the SSL VPN hub and spokes.
For an IP-level VPN between a device and a VPN server, this can be useful to avoid issues caused by intermediate
devices, such as:
l ESP packets being blocked.
l UDP ports 500 or 4500 being blocked.
l Fragments being dropped, causing IKE negotiation that uses large certificates to fail if the peer does not support
IKE fragmentation.
If the client specified destination is all, a default route is effectively dynamically created on the SSL VPN client, and the
new default route is added to the existing default route in the form of ECMP. Some examples how to configure routing
are:
l To make all traffic default to the SSL VPN server and still have a route to the server's listening interface, on the SSL
VPN client set a lower distance for the default route that is learned from the server.
l To include both default routes in the routing table, with the route learned from the SSL VPN server taking priority, on
the SSL VPN client set a lower distance for the route learned from the server. If the distance is already zero, then
increase the priority on the default route.
l To avoid a default being learned on the SSL VPN client, on the SSL VPN server define a specific destination.
Example
In this example, the home FortiGate (FGT-A) is configured as an SSL VPN client, and the company FortiGate (FGT-B) is
configured as an SSL VPN server. After FGT-A connects to FGT-B, the devices that are connected to FGT-A can access
the resources behind FGT-B.
The SSL VPN server has a custom server certificate defined, and the SSL VPN client user uses PSK and a PKI client
certificate to authenticate. The FortiGates must have the proper CA certificate installed to verify the certificate chain to
the root CA that signed the certificate.
Split tunneling is used so that only the destination addresses defined in the server's firewall policies are routed to the
server, and all other traffic is connected directly to the internet.
1. Go to User & Authentication > User Definition and click Create New.
2. Use the wizard to create a local user named client2.
The PKI menu is only available in the GUI after a PKI user has been created using the CLI, and
a CN can only be configured in the CLI.
4. Click OK.
5. In the CLI, specify the CN that must be matched. If no CN is specified, then any certificate that is signed by the CA
will be valid and matched.
config user peer
edit "pki"
set cn "*.fos.automation.com"
next
end
1. Go to Policy & Objects > Addresses and click Create New > Address.
2. Set the Name to bing.com.
3. Set Type to FQDN.
4. Set FQDN to www.bing.com.
5. Click OK.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the policy:
Name sslvpn2
Schedule always
Service ALL
Action Accept
3. Click OK.
next
end
4. Configure SSL VPN settings, including the authentication rule for user mapping:
config vpn ssl settings
set ssl-min-proto-ver tls1-1
set servercert "fgt_gui_automation"
set auth-timeout 0
set login-attempt-limit 10
set login-timeout 180
set tunnel-ip-pools "SSLVPN_TUNNEL_ADDR1"
set tunnel-ipv6-pools "SSLVPN_TUNNEL_IPv6_ADDR1"
set dns-suffix "sslvpn.com"
set port 1443
set source-interface "port2"
set source-address "all"
set source-address6 "all"
set default-portal "testportal1"
config authentication-rule
edit 1
set users "client2"
set portal "testportal2"
set client-cert enable
set user-peer "pki"
next
end
end
5. Create a firewall address and policy. The destination addresses used in the policy are routed to the SSL VPN
server.
config firewall address
edit "bing.com"
set type fqdn
set fqdn "www.bing.com"
next
end
config firewall policy
edit 2
set name "sslvpn2"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "mantis" "bing.com"
set action accept
set schedule "always"
set service "ALL"
set nat enable
set users "client2"
next
end
The PKI menu is only available in the GUI after a PKI user has been created using the CLI, and
a CN can only be configured in the CLI.
d. Click OK.
Name sslclientTo9
Interface sslclient_port1
Server 172.16.200.9
Port 1443
Username client2
Peer fgt_gui_automation
Status Enabled
4. Click OK.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Configure the policy:
Name policy_to_sslvpn_tunnel
Source all
Destination all
Schedule always
Service ALL
Action Accept
3. Click OK.
1. Create the PKI user. Use the CA that signed the certificate fgt_gui_automation, and the CN of that certificate on the
SSL VPN server.
config user peer
edit "fgt_gui_automation"
set ca "GUI_CA"
set cn "*.fos.automation.com"
next
end
2. Create the SSL interface that is used for the SSL VPN connection:
config system interface
edit "sslclient_port1"
set vdom "vdom1"
set allowaccess ping https
set type ssl
set role lan
set snmp-index 46
set interface "port1"
next
end
3. Create the SSL VPN client to use the PKI user and the client certificate fgtb_gui_automation:
config vpn ssl client
edit "sslclientTo9"
set interface "sslclient_port1"
set user "client2"
set psk 123456
set peer "fgt_gui_automation"
set server "172.16.200.9"
set port 1443
set certificate "fgtb_gui_automation"
next
end
Verification
After the tunnel is established, the route to 13.107.21.200 and 204.79.197.200 on FGT-A connects through the SSL VPN
virtual interface sslclient_port1.
1. On the SSL VPN server FortiGate (FGT-B), go to Dashboard > Network and expand the SSL-VPN widget.
2. On the SSL VPN client FortiGate (FGT-A), go to VPN > SSL-VPN Clients to see the tunnel list.
Dual stack IPv4 and IPv6 support for SSL VPN servers and clients enables a client to establish a dual stack tunnel to
allow both IPv4 and IPv6 traffic to pass through. FortiGate SSL VPN clients also support dual stack, which allows it to
establish dual stack tunnels with other FortiGates.
Users connecting in web mode can connect to the web portal over IPv4 or IPv6. They can access bookmarks in either
IPv4 or IPv6, depending on the preferred DNS setting of the web portal.
Example
In this example, FortiGate B works as an SSL VPN server with dual stack enabled. A test portal is configured to support
tunnel mode and web mode SSL VPN.
FortiGate A is an SSL VPN client that connects to FortiGate B to establish an SSL VPN tunnel connection. It attempts to
access www.bing.com and www.apple.com via separate IPv4 and IPv6 connections. Two addresses are configured on
FortiGate B:
l bing.com uses IPv4 FQDN and resolves to 13.107.21.200 and 204.79.197.200.
l apple_v6 uses IPv6 FQDN and resolves to 2600:140a:c000:385::1aca and 2600:140a:c000:398::1aca.
The server certificate used is fgt_gui_automation, and the CN is *.fos.automation.com.
A PC serves as a client to connect to FortiGate B in SSL VPN web mode. The PC can connect to the SSL VPN server
over IPv4 or IPv6. Based on the preferred DNS setting, it will access the destination website over IPv4 or IPv6.
Dual stack tunnel mode support requires a supported client. In 7.0.0, a FortiGate in SSL VPN
client mode can support dual stack tunnels. FortiClient 7.0.1 and later releases support dual
stack.
To configure an SSL VPN server in tunnel and web mode with dual stack support in the GUI:
Category Address
Name bing.com
Type FQDN
FQDN www.bing.com
c. Click OK.
d. Click Create New > Address and enter the following for the IPv6 address:
Name apple_v6
Type FQDN
FQDN www.apple.com
e. Click OK.
3. Configure the SSL VPN portal:
a. Go to VPN > SSL-VPN Portals and click Create New.
b. Enter a name (testportal1).
c. Enable Tunnel Mode and for Enable Split Tunneling, select Enable Based on Policy Destination.
d. For Source IP Pools, add SSLVPN_TUNNEL_ADDR1.
e. Enable IPv6 Tunnel Mode and for Enable Split Tunneling, select Enable Based on Policy Destination.
f. For Source IP Pools, add SSLVPN_TUNNEL_IPv6_ADDR1.
g. Enable Enable Web Mode.
h. Click OK.
4. Configure the SSL VPN settings:
b. Click Apply.
c. Enable dual stack in the CLI:
config vpn ssl settings
set dual-stack-mode enable
end
Name sslvpn
Schedule Always
Service All
NAT Enabled
c. Click OK.
The PKI menu is only available in the GUI (User & Authentication > PKI) after a PKI user
has been created using the CLI, and a CN can only be configured in the CLI.
If the CA is not known or is public, import the CA that signed the server certificate.
Name sslclientTo9
Interface sslclient_port2
Port 1443
Username client2
Peer fgt_gui_automation
Status Enabled
d. Click OK.
1. On the Remote Access tab and click Configure VPN, or if other connections have already been configured, click the
sandwich icon and select Add a new connection.
2. Set Connection Name to FGT2500E, and Remote Gateway to 10.1.100.9.
3. Enable Customize port and enter the port number 1443.
4. Set Username to client2.
5. Enable Enable Dual-stack IPv6/IPv6 address.
6. Click Save.
7. Enter the password, then click Connect.
To configure an SSL VPN server in tunnel and web mode with dual stack support in the CLI:
next
end
3. Configure the SSL VPN client. Either IPv4 address 10.1.100.9 or IPv6 address 2000:10:1:100::9 can be used and
will have the same results:
config vpn ssl client
edit "sslclientTo9"
set interface "sslclient_port2"
set user "client2"
set psk ******
set peer "fgt_gui_automation"
set server {10.1.100.9 | 2000:10:1:100::9}
set port 1443
next
end
1. On FortiGate B, verify that the client is assigned with both IPv4 and IPv6 addresses:
(root) # get vpn ssl monitor
SSL VPN Login Users:
Index User Group Auth Type Timeout Auth-Timeout From HTTP
in/out HTTPS in/out Two-factor Auth
0 client2 1(1) 292 2147483647 10.1.100.2
0/0 0/0 0
2. On FortiGate B, sniff for IPv4 ICMP packets and observe the results:
# diagnose sniffer packet any icmp 4
interfaces=[any]
filters=[icmp]
9.675101 ssl.root in 10.212.134.200 -> 13.107.21.200: icmp: echo request
9.675219 port2 out 172.16.200.9 -> 13.107.21.200: icmp: echo request
9.676698 port2 in 13.107.21.200 -> 172.16.200.9: icmp: echo reply
9.676708 ssl.root out 13.107.21.200 -> 10.212.134.200: icmp: echo reply
...
4. On FortiGate B, sniff for IPv6 ICMP packets and observe the results:
# diagnose sniffer packet any icmp6 4
interfaces=[any]
filters=[icmp6]
3.564296 ssl.root in fdff:fff::1 -> 2600:140a:c000:385::1aca: icmp6: echo request seq 1
3.564435 port2 out 2000:172:16:200::9 -> 2600:140a:c000:385::1aca: icmp6: echo request
seq 1
In SSL VPN web mode, users can access both IPv4 and IPv6 bookmarks in the portal. The attribute, prefer-ipv6-
dns can be enabled to prefer querying IPv6 DNS first, or disabled to prefer querying IPv4.
To test an IPv4 connection to the web portal and access www.bing.com over IPv6:
2. Log in to the web portal in the browser over the IPv4 address 10.1.100.9.
3. Create a new HTTP/HTTPS bookmark named bing for the URL www.bing.com.
4. Click the bing bookmark. The bing page will open over IPv6.
To test an IPv6 connection to the web portal and access www.apple.com over IPv4:
2. Log in to the web portal in the browser over the IPv6 address [2000:10:1:100::9].
3. Create a new HTTP/HTTPS bookmark named apple for the URL www.apple.com.
4. Click the apple bookmark. The apple page will open over IPv4.
In web portal profiles, the clipboard can be disabled for SSL VPN web mode RDP/VNC connections. User will not be
able to copy and paste content to or from the internal server.
Example
In this example, two groups of users are using SSL VPN web mode to access internal servers with RDP/VNC. One group
is allowed to copy and paste content to and from the internal server using the clipboard, while the other is not.
5. Click OK.
5. Click Apply.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. Set a name for the policy, such as policy_to_sslvpn_tunnel.
3. Set Incoming Interface to the SSL VPN tunnel interface and Outgoing Interface to port1.
4. Set Source to the users, u1 and u2, and all addresses.
5. Set Destination to all addresses.
6. Set Schedule to always, Service to All, and Action to Accept.
7. Configure the remaining settings as needed.
8. Click OK.
1. On the PC, open a web browser and log in to the web portal as user u1.
2. Access the internal server using RDP/VNC.
3. The clipboard is available and you can copy and paste content to and from the remote server.
4. Log out of the web portal, then log back in as user u2 and access the internal server using RDP/VNC.
The clipboard is disabled.
4. On the PC, open a web browser, log in to the web portal as user u1, access the internal server using RDP/VNC, and
use the clipboard.
5. Check the SSL VPN session monitor:
# get vpn ssl monitor
SSL-VPN Login Users:
Index User Group Auth Type Timeout Auth-Timeout From HTTP
in/out HTTPS in/out Two-factor Auth
0 u1 1(1) N/A 10.1.100.146 0/0 0/364 0
SSL-VPN sessions:
Index User Group Source IP Duration I/O Bytes Tunnel/Dest IP
0 u1 10.1.100.146 64 0/700 RDP 172.18.58.109
6. On the PC, open a web browser, log in to the web portal as user u2, access the internal server using RDP/VNC, and
note that the clipboard is not available.
7. Check the SSL VPN session monitor:
# get vpn ssl monitor
SSL-VPN Login Users:
Index User Group Auth Type Timeout Auth-Timeout From HTTP
in/out HTTPS in/out Two-factor Auth
0 u2 1(1) N/A 10.1.100.146 0/0 0/2681 0
SSL-VPN sessions:
Index User Group Source IP Duration I/O Bytes Tunnel/Dest IP
0 u2 10.1.100.146 7 0/553 RDP 172.18.58.109
When a user disconnects from a VPN tunnel, it is not always desirable for the released IP address to be used
immediately. In SSL VPN, IP addresses can be assigned from the pool in a round robin fashion, instead of the default
first-available address method.
Example
In this example, two PCs connect to the VPN. SSL VPN is configured to use round robin IP address assignment. Dual
stack address assignment (both IPv4 and IPv6) is used.
After a tunnel is disconnected, freeing a low IP address, the next client that connects gets the next address in the round
robin instead of the lowest address.
When round-robin is used, any address pools defined in the web portal are ignored and the tunnel IPv4 and IPv6
pool addresses in the SSL VPN settings are used. Only one set of IP pool addresses can be applied.
3. Enable round-robin and dual stack in the SSL VPN settings:
config vpn ssl settings
set dual-stack-mode enable
set tunnel-addr-assigned-method round-robin
end
1. Log in to the SSL VPN on PC1 using user u1 and then check its assigned IP address:
# get vpn ssl monitor
SSL-VPN Login Users:
Index User Group Auth Type Timeout Auth-Timeout From HTTP
in/out HTTPS in/out Two-factor Auth
0 u1 1(1) N/A 10.1.100.145 0/0 0/0 0
SSL-VPN sessions:
Index User Group Source IP Duration I/O Bytes Tunnel/Dest IP
0 u1 10.1.100.145 13 49935/35251
173.10.1.1,2000::ad0a:101
2. Log in to the SSL VPN on PC1 using user u2 and then check its assigned IP address:
SSL-VPN sessions:
Index User Group Source IP Duration I/O Bytes Tunnel/Dest IP
0 u1 10.1.100.145 44 90126/70405
173.10.1.1,2000::ad0a:101
1 u2 10.1.100.254 10 10563/8158
173.10.1.2,2000::ad0a:102
3. Log user u1 off of PC1, then log them back in and check that the assigned IP address is not the same as was
previously assigned:
# get vpn ssl monitor
SSL-VPN Login Users:
Index User Group Auth Type Timeout Auth-Timeout From HTTP
in/out HTTPS in/out Two-factor Auth
0 u1 1(1) N/A 10.1.100.145 0/0 0/0 0
1 u2 1(1) N/A 10.1.100.254 0/0 0/0 0
SSL-VPN sessions:
Index User Group Source IP Duration I/O Bytes Tunnel/Dest IP
0 u1 10.1.100.145 10 50992/41159
173.10.1.3,2000::ad0a:103
1 u2 10.1.100.254 43 30374/21860
173.10.1.2,2000::ad0a:102
Debug commands
Use the following diagnose commands to identify SSL VPN issues. These commands enable debugging of SSL VPN
with a debug level of -1 for detailed results.
diagnose debug application sslvpn -1
diagnose debug enable
Use the following diagnose commands to identify remote user authentication issues.
diagnose debug application fnbamd -1
diagnose debug reset
c. Check that you are using the correct port number in the URL. Ensure FortiGate is reachable from the computer.
ping <FortiGate IP>
d. Check the browser has TLS 1.1, TLS 1.2, and TLS 1.3 enabled.
1. Check the Release Notes to ensure that the FortiClient version is compatible with your version of FortiOS.
2. FortiClient uses IE security setting, In IE Internet options > Advanced > Security, check that Use TLS 1.1 and Use
TLS 1.2 are enabled.
3. Check that SSL VPN ip-pools has free IPs to sign out. The default ip-poolsSSLVPN_TUNNEL_ADDR1 has 10 IP
addresses.
4. Export and check FortiClient debug logs.
a. Go to File > Settings.
b. In the Logging section, enable Export logs.
c. Set the Log Level to Debug and select Clear logs.
d. Try to connect to the VPN.
e. When you get a connection error, select Export logs.
1. A new SSL VPN driver was added to FortiClient 5.6.0 and later to resolve SSL VPN connection issues. If your
FortiOS version is compatible, upgrade to use one of these versions.
2. Latency or poor network connectivity can cause the login timeout on the FortiGate. In FortiOS 5.6.0 and later, use
the following commands to allow a user to increase the SSL VPN login timeout setting.
config vpn ssl settings
set login-timeout 180 (default is 30)
set dtls-hello-timeout 60 (default is 10)
end
This might occur if there are multiple interfaces connected to the Internet, for example, SD-WAN. This can cause the
session to become “dirty”. To allow multiple interfaces to connect, use the following CLI commands.
If you are using a FortiOS 6.0.1 or later:
config system interface
edit <name>
set preserve-session-route enable
next
end
1. Go to VPN > SSL-VPN Portals and VPN > SSL-VPN Settings and ensure the same IP Pool is used in both places.
Using the same IP Pool prevents conflicts. If there is a conflict, the portal settings are used.
In User & Authentication, you can control network access for different users and devices in your network. FortiGate
authentication controls system access by user group. By assigning individual users to the appropriate user groups you
can control each user’s access to network resources. You can define local users and peer users on the FortiGate unit.
You can also define user accounts on remote authentication servers and connect them to FortiOS.
You can control network access for different device types in your network by doing the following:
l Identifying and monitoring the types of devices connecting to your network
l Using MAC address based access control to allow or deny individual devices
l Using Telemetry data received from FortiClient endpoints to construct a policy to deny access to endpoints with
known vulnerabilities or to quarantine compromised endpoints
The following sections provide information about users and devices:
l Endpoint control and compliance on page 1703
l User definition and groups on page 1712
l LDAP servers on page 1725
l RADIUS servers on page 1734
l TACACS+ servers on page 1762
l SAML on page 1764
l Authentication settings on page 1792
l FortiTokens on page 1794
l PKI on page 1816
l Configuring the maximum log in attempts and lockout period on page 1815
l Configuring firewall authentication on page 1820
l FSSO on page 1826
l Include usernames in logs on page 1836
FortiOS supports a customizable captive portal to direct users to install or enable required software.
Per-policy custom disclaimers in each VDOM are supported. For example, you may want to configure three firewall
policies, each of which matches traffic from endpoints with different FortiClient statuses:
Endpoint does not have FortiClient installed. Traffic matches a firewall policy that displays an in-browser warning
to install FortiClient from the provided link.
Endpoint has FortiClient installed, registered Traffic matches a dynamic firewall policy which allows the endpoint to
to EMS, and connected to the FortiGate. reach its destination via this policy.
Endpoint is deregistered from EMS and Traffic matches another dynamic firewall policy that displays warning
disconnected from the FortiGate. to register FortiClient to EMS.
The replacement message groups and policy disclaimer settings must be enabled.
Disclaimer Message.
6. Edit the message to warn users to install FortiClient, and provide the FortiClient download link.
7. Click Save.
8. Repeat the above steps for each policy that requires a custom disclaimer message.
Compliance
To safeguard against certificate compromise, FortiGate VM and FortiAnalyzer VM use the same deployment model as
FortiManager VM where the license file contains a unique certificate tied to the serial number of the virtual device.
A hardware appliance usually comes with a BIOS certificate with a unique serial number that identifies the hardware
appliance. This built-in BIOS certificate is different from a firmware certificate. A firmware certificate is distributed in all
appliances with the same firmware version.
Using a BIOS certificate with a built-in serial number provides a high trust level for the other side in X.509 authentication.
Since a VM appliance has no BIOS certificate, a signed VM license can provide an equivalent of a BIOS certificate. The
VM license assigns a serial number in the BIOS equivalent certificate. This gives the certificate an abstract access
ability, which is similar to a BIOS certificate with the same high trust level.
Sample configurations
Depending on the firmware version and VM license, the common name (CN) on the certificate will be configured
differently.
License Firmware
l Fortinet_Factory_Backup
The Certificate Detail Information window displays.
There is an option in FortiOS to enable automatic file system checks if the FortiGate shuts down ungracefully.
By default, the automatic file system check is disabled. When an administrator logs in after an ungraceful shutdown, a
warning message appears advising them to manually run a file system check. A warning also appears in the CLI:
WARNING: File System Check Recommended! Unsafe reboot may have caused inconsistency in disk
drive.
It is strongly recommended that you check file system consistency before proceeding.
Please run 'execute disk scan 17'
Note: The device will reboot and scan during startup. This may take up to an hour
You can enable automatic file system checks in both the GUI and CLI.
3. Click Apply.
Push notifications for iPhone (for the purpose of two-factor authentication) require a TLS server certificate to
authenticate to Apple. As this certificate is only valid for one year, a service extension allows FortiGuard to distribute
updated TLS server certificates to FortiGate when needed.
FortiGuard update service updates local Apple push notification TLS server certificates when the local certificate is
expired. FortiGuard update service also reinstalls certificates when the certificates are lost.
You can verify that the feature is working on the FortiGate by using the CLI shell.
1. Using FortiOS CLI shell, verify that all certificates are installed:
/data/etc/apns # ls -al
drwxr-xr-x 2 0 0 Tue Jan 15 08:42:39 2019 1024 .
drwxr-xr-x 12 0 0 Tue Jan 15 08:45:00 2019 2048 ..
-rw-r--r-- 1 0 0 Sat Jan 12 00:06:30 2019 2377 apn-dev-cert.pem
-rw-r--r-- 1 0 0 Sat Jan 12 00:06:30 2019 1859 apn-dev-key.pem
-rw-r--r-- 1 0 0 Sat Jan 12 00:06:30 2019 8964 apn-dis-cert.pem
-rw-r--r-- 1 0 0 Sat Jan 12 00:06:30 2019 4482 apn-dis-key.pem
3. Run a FortiGuard update, and verify that all certificates are installed again:
/data/etc/apns # ls -al
drwxr-xr-x 2 0 0 Tue Jan 15 08:56:20 2019 1024 .
drwxr-xr-x 12 0 0 Tue Jan 15 08:56:15 2019 2048 ..
-rw-r--r-- 1 0 0 Sat Jan 12 00:06:30 2019 2377 apn-dev-cert.pem.save
-rw-r--r-- 1 0 0 Sat Jan 12 00:06:30 2019 1859 apn-dev-key.pem.save
-rw-r--r-- 1 0 0 Tue Jan 15 08:56:20 2019 2167 apn-dis-cert.pem <-- downloaded
from FortiGuard
-rw-r--r-- 1 0 0 Sat Jan 12 00:06:30 2019 8964 apn-dis-cert.pem.save
-rw-r--r-- 1 0 0 Tue Jan 15 08:56:20 2019 1704 apn-dis-key.pem <-- downloaded
from FortiGuard
-rw-r--r-- 1 0 0 Sat Jan 12 00:06:30 2019 4482 apn-dis-key.pem.save
-rw-r--r-- 1 0 0 Tue Jan 15 08:56:20 2019 41 apn-version.dat <-- downloaded
from FortiGuard
/data/etc/apns #
Integrate user information from EMS and Exchange connectors in the user store
When a FortiClient endpoint is managed by EMS, logged in user and domain information is shared with FortiOS through
the EMS connector. This information can be joined with the Exchange connector to produce more complete user
information in the user store.
The diagnose user-device-store device memory list command displays detailed device information.
Sample topology
In this example, the FortiClient PC user (test1) logs on to the AD domain (FORTINET-FSSO.COM), which is also the
same domain as the Exchange server. The user information is pushed to the EMS server that the user is registered to.
The FortiGate synchronizes the information from EMS, and at the same time looks up the user on the Exchange server
under the Exchange connector. If the user exists on the Exchange server, additional information is fetched. These
details are combined in the user store, which is visible in the FortiClient widget in the Status dashboard.
next
end
1. Go to Dashboard > Status.
2. In the FortiClient widget, hover over a device or user name to view the information.
FortiGate authentication controls system access by user groups. By assigning individual users to the appropriate user
groups, this controls each user’s access to network resources. The user groups members are user accounts, of which
there are several types. Local and peer users are defined in FortiOS. User accounts can also be defined on remote
authentication servers.
This section contains information about configuring the following:
l Users on page 1712
l User groups on page 1714
l Retail environment guest access on page 1721
l User and user group timeouts on page 1724
For information about configuring authentication servers, see the LDAP servers on page 1725, RADIUS servers on page
1734, TACACS+ servers on page 1762, and SAML on page 1764 sections.
Users
A user is a user account consisting of a username, password, and sometimes other information, that is configured in
FortiOS or on an external authentication server. There are several types of user accounts with slightly different methods
of authentication.
Local The username and password must match a user account stored in FortiOS. Authentication is
done by a firewall policy.
Remote Remote users consist of usernames defined in FortiOS that are authenticated by a remote
server. For example, RADIUS, TACACS+, LDAP, or FortiNAC. The server must be
configured in FortiOS before creating a user.
FSSO Users on a Microsoft Windows, Citrix, or Novell network can use their network authentication
to access resources through the FortiGate. Access is controlled through FSSO user groups,
which contain Windows, Citrix, or Novell user groups as members. The FSSO agent must be
configured in FortiOS before creating a user (see FSSO on page 1826).
PKI or peer A PKI or peer user is a digital certificate holder that authenticates using a client certificate. No
password is required, unless two-factor authentication is enabled.
In the GUI, the User & Authentication > PKI menu is only available after a PKI user is
configured in the CLI (see Configuring a PKI user on page 1816).
Some user types have an option to enable multi-factor authentication using FortiToken or FortiToken Cloud. In some
cases, the user must be defined first, and then can be edited to add multi-factor authentication. See FortiTokens on page
1794 for more information.
To create a user:
1. Go to User Authentication > User Definition and click Create New. The Users/Groups Creation Wizard appears.
2. Select a User Type and click Next.
l FSSO:
i. Select an FSSO Agent, click the + to add AD Groups, then click Next.
ii. Select an FSSO group to add the AD Groups to. If an FSSO group already exists (see Configuring FSSO
user groups on page 1718), click Choose Existing and select the group. Otherwise, click Create New,
enter a name, and click OK.
iii. Click Submit.
User groups
Firewall user groups are used locally as part of authentication. For example, when a firewall policy allows access only to
specified user groups, users must authenticate before matching the policy. If the user authenticates successfully and is a
member of one of the permitted groups, the policy is applied to the user. A firewall user group may contain local users
(defined locally or authenticated remotely), PKI users, or authentication servers.
There are two options to add users in a firewall group configuration: members or remote groups. Members are the
individual users who have been defined in FortiOS. Remote groups are remote server that users may authenticate to.
One or more user groups can be specified within that server to limit which users can authenticate to the firewall user
group. Both options may be used at the same time. The FortiGate attempts to authenticate users in the members list
first, and then the remote groups if the initial authentication does not succeed.
When adding remote groups to user groups, FortiTokens cannot be applied to the users. To use remote authentication
servers and FortiToken for multi-factor authentication, a remote user type must be created and then added as a user
group member.
The following user group configuration examples have local members and a remote authentication server user group.
There are two LDAP users, but the principle applies to other remote authentication server types.
Both LDAP users (shudson and tflenderson) belong to the primary group, Domain Users. The user, shudson belongs to
the Sales group; tflenderson belongs to the HR group.
In this example, two remote groups (HR and Sales) are added to a firewall group called SSL_VPN_ACCESS.
1. Go to User & Authentication > User Groups and click Create New. Firewall is selected as the default Type.
2. Enter the group name, SSL_VPN_ACCESS.
3. In the Remote Groups Section, click Add.
4. Set Remote Server to the LDAP server (ldap).
5. In the Groups table, select Sales, then right-click and select Add Selected.
7. Click OK.
Both user group paths are specified under the Group Name.
8. Click OK.
In this configuration, shudson and tflenderson would be able to authenticate to this group.
In this example, the firewall group (SSL_VPN_ACCESS) is configured to contain the HR remote group and a local LDAP
user (shudson) with multi-factor authentication.
1. Go to User & Authentication > User Groups and click Create New. Firewall is selected as the default Type.
2. Enter the group name, SSL_VPN_ACCESS.
3. In the Remote Groups Section, click Add.
4. Set Remote Server to the LDAP server (ldap).
5. In the Groups table, select HR, then right-click and select Add Selected.
6. Click OK.
7. In the Members field, click the + and add shudson.
8. Click OK.
In this configuration, shudson, tflenderson, and any members of the HR LDAP group would be able to authenticate
to the user group. Other users in the Sales group are not allowed.
This example uses a combination of the previous examples. The HR and Sales groups are added as remote groups
similar to example 1. The local LDAP user, shudson (using a FortiToken), from example 2 is added as a group member.
This example is for demonstration only. It may cause unwanted results, so this configuration is
not advised.
3. Click OK.
One unwanted scenario from this configuration is that a user might be able to bypass multi-factor authentication on
LDAP by changing the username case (see the related PSIRT advisory). By default, the username of the remote LDAP
user is case sensitive. This means the username has to match what is configured (shudson). If a user types sHudson,
for example, this will not match the user shudson, so it falls through to remote group authentication. It will match the
Sales group in this example. To prevent this, disable username case sensitivity (see SSL VPN for remote users with
MFA and user sensitivity on page 1596 for more details).
There is another unwanted scenario from this configuration than can occur to bypass multi-factor authentication. The
LDAP server, ldap, has a user named shudson. Another LDAP server, ldap2, also has a user named shudson, but with a
different password. If the ldap and ldap2 servers are asdded to the user group in addition to the remote shudson user, if a
user tries to log in using shudson and the password on the ldap2 server, they would be able to bypass multi-factor
authentication.
FSSO user groups contain only Windows, Citrix, and Novell network users. Information about these user groups and
their member logon activities are provided by the corresponding FSSO connector. See the FSSO on page 1826 section
for more information.
RADIUS single sign-on user groups leverage a RADIUS server to authenticate connecting users. This requires users to
log in to their computer using their RADIUS account. The FortiGate does not interact with the remote RADIUS server. It
only monitors RADIUS accounting records that the server forwards (originating from the RADIUS client). These records
include the user IP address and user group. See RADIUS single sign-on agent on page 2380 for more information.
In some scenarios, an administrator might need to create temporary user accounts with a defined expiry time to access
network resources. For example, if there is a large conference and may attendees require temporary network access for
a few days. Guest Management can be used to combine many guest users into a group. Many guest accounts can be
created at once using randomly-generated user IDs and passwords.
A guest group must be configured first. The guest user account user ID can be an email address, a randomly generated
string, or an ID that the assigned by the administrator. The password can be assigned by the administrator or randomly
generated. The guest group configuration determines the fields that are provided when creating guest user accounts in
Guest Management.
1. Go to User & User & Authentication > User Groups and click Create New.
2. Enter a name, and set the Type to Guest.
l The accounts only have user ID, password, and expiration fields. The
expiration field is editable in the GUI in the Start Countdown and Time
settings.
l An administrator can print the account information.
Maximum Accounts Enable to set a maximum number of guest accounts that can be created for
this group (disabled = unlimited).
Guest Details
Enable Name If enabled, the user form has a field to enter a name.
Sponsor If enabled, the user form has a field to enter a sponsor (Optional). Select
Required if the sponsor field is mandatory.
Company If enabled, the user form has a field to enter a company (Optional). Select
Required if the company field is mandatory.
Expiration
created
l After First Login: the countdown starts from the time the first time the user
logs in
Time Set the expiry time. There are fields to enter values for Days, Hours, Minutes,
and Seconds.
4. Click OK.
3. Click Create New and enter the information in the Create User pane. The fields are based on the guest group
configuration. Optional fields can be left blank, such as Sponsor in this example.
4. Click OK.
5. Click OK.
Businesses such as coffee shops provide free Internet access for customers. In this scenario, you do not need to
configure guest management, as customers can access the WiFi access point without logon credentials.
However, consider that the business wants to contact customers with promotional offers to encourage future patronage.
You can configure an email collection portal to collect customer email addresses for this purpose. You can configure a
firewall policy to grant network access only to users who provide a valid email address. The first time a customer’s device
attempts WiFi connection, FortiOS requests an email address, which it validates. The customers' subsequent
connections go directly to the Internet without interruption.
This configuration consists of the following steps:
1. Creating an email collection portal on page 1722
2. Creating a firewall policy on page 1722
3. Checking for collected emails on page 1723
The customer’s first contact with your network is a captive portal that presents a webpage requesting an email address.
When FortiOS has validated the email address, the customer’s device MAC address is added to the collected emails
device group.
This example modifies the freewifi WiFi interface to present an email collection captive portal.
To configure the freewifi SSID to use an email collection portal in the GUI:
To configure the freewifi SSID to use an email collection portal in the CLI:
You must configure a firewall policy that allows traffic to flow from the WiFi SSID to the internet interface only for
members of the collected emails device group. This policy must be listed first. Unknown devices are not members of the
collected emails device group, so they do not match the policy.
When a WiFi user connects to the freewifi SSID, they are presented with a captive portal to enter their email address.
Once the user enters their email and clicks Continue, they will have access to the Internet. The collected emails can be
verified in FortiOS.
72:4d:e1:**:**:**, [email protected]
type: email, id: 0, duration: 937, idled: 19
expire: 863980, allow-idle: 864000
flag(1000): src_idle
packets: in 4753 out 4592, bytes: in 2662403 out 2458644
Authenticated user groups can have timeout values per group in addition to FortiGate-wide timeouts. Three types of
group timeouts can be configured: idle, hard, and session. These are in addition to any external timeouts, such as those
on RADIUS servers.
Timeouts are measured in minutes (1 - 1440, default = 5). If VDOMs are enabled, the global level auth-timeout user
setting is the default all VDOMs inherit.
Idle This is the default setting. The idle timer starts when a user initiates a session. As
long as data is transferred in this session, the timer continually resets. If the data
flow stops, the timer is allowed to advance until it reaches its limit. When the user
has been idle for too long, the user must re-authenticate before traffic is allowed to
continue in that session.
Hard The hard timer starts when a user initiates a session. When the timeout is
reached, all the sessions for that user must be re-authenticated. This timeout is
not affected by any events.
Session The session timer starts when a user initiates a session. When the timeout is
reached, existing sessions may continue. New sessions are not allowed until the
user re-authenticates. This timeout is not affected by any events.
Timeouts are measured in minutes (0 - 43200). A value of zero (the default) means the global timeout is used.
If a user belongs to multiple RADIUS groups, the group authtimeout values are ignored.
The global auth-timeout value is used instead (under config user setting).
LDAP servers
Name This connection name is for reference within the FortiGate only.
Server Port By default, LDAP uses port 389 and LDAPS uses 636. Use this field to specify
a custom port if necessary.
Common Name Identifier Attribute field of the object in LDAP that the FortiGate uses to identify the
connecting user. The identifier is case sensitive. Common attributes are:
l cn (Common Name)
l sAMAccountName (SAMAccountName)
Distinguished Name Used to look up user account entries on the LDAP server. It reflects the
hierarchy of LDAP database object classes above the CN identifier in which
you are doing the lookup.
Enter dc=COMPANY,dc=com to specify the root of the domain to include all
objects.
Enter ou=VPN-Users,dc=COMPANY,dc=com to look up users under a
specific organization unit.
Exchange server Enable to specify the exchange server connector to collect information about
authenticated users from a corporate exchange server. See Exchange Server
connector on page 2383 for more details.
The LDAP server only looks up against the distinguished name (DN), but
does not search on the subtree.
l Anonymous: bind using an anonymous user, and search starting from the
DN and recurse over the subtrees. Many LDAP servers do not allow this.
l Regular: bind using the username and password provided, and search
Username If using regular bind, enter a username with sufficient privileges to access the
LDAP server. The following formats are supported:
l username\administrator
l administrator@domain
l cn=administrator,cn=users,dc=domain,dc=com
Password If using regular bind, enter the password associated with the username.
Secure Connection Enable to apply security to the LDAP connection through STARTTLS or
LDAPS.
Certificate Enable and select the certificate so the FortiGate will only accept a certificate
from the LDAP server that is signed by this CA.
Server identity check Enable to verify the server domain or IP address against the server certificate.
This option is enabled by default and it is recommended to leave it enabled for
a secure configuration.
When specifying a secure connection, there are some considerations for the certificate
used by LDAP to secure the connection. The FortiGate checks the certificate presented by
the LDAP server for the IP address or FQDN as specified in the Server IP/Name field with
the following logic:
l If there is a Subject Alternative Name (SAN), it will ignore any Common Name (CN)
4. Optionally, click Test User Credentials to ensure that the account has sufficient access rights.
5. Click OK.
The FortiGate checks the connection and updates the Connection Status.
By default, nested groups (groups that are members or other groups) are not searched in Windows Active Directory (AD)
LDAP servers because this can slow down the group membership search. There is an option in FortiOS to enable the
This option is not available for other LDAP servers, such as OpenLDAP-based servers.
The default search results only show groups that have the user as member, and no groups that have groups as
members:
diagnose test authserver ldap ldap-ad nuser nuser
authenticate 'nuser' against 'ldap-ad' succeeded!
Group membership(s) - CN=nested3,OU=Testing,DC=Fortinet-FSSO,DC=COM
CN=Domain Users,CN=Users,DC=Fortinet-FSSO,DC=COM
The search results now include groups that have other groups as members:
diagnose test authserver ldap ldap-ad nuser nuser
authenticate 'nuser' against 'ldap-ad' succeeded!
Group membership(s) - CN=nested3,OU=Testing,DC=Fortinet-FSSO,DC=COM
CN=Domain Users,CN=Users,DC=Fortinet-FSSO,DC=COM
CN=nested2,OU=Testing,DC=Fortinet-FSSO,DC=COM
CN=nested1,OU=Testing,DC=Fortinet-FSSO,DC=COM
The group nested3 is a member of the group nested2, which is a member of the group nested1.
In this configuration, users defined in Microsoft AD can set up a VPN connection based on an attribute that is set to
TRUE, instead of their user group. You can activate the Allow Dialin property in AD user properties, which sets the
msNPAllowDialin attribute to TRUE. You can use this procedure for other member attributes as your system requires.
This configuration consists of the following steps:
1. Ensure that the AD server has the msNPAllowDialin attribute set to TRUE for the desired users.
2. Configure user LDAP member attribute settings.
3. Configure LDAP group settings.
4. Ensure that you configured the settings correctly.
Users that are members of the ldap_grp user group should be able to authenticate. The following shows sample
diagnose debug output when the Allow Dial-in attribute is set to TRUE:
get_member_of_groups-Get the memberOf groups.
get_member_of_groups- attr='msNPAllowDialin', found 1 values
get_member_of_groups-val[0]='TRUE'
fnbamd_ldap_get_result-Auth accepted
fnbamd_ldap_get_result-Going to DONE state res=0
fnbamd_auth_poll_ldap-Result for ldap svr 192.168.201.3 is SUCCESS
fnbamd_auth_poll_ldap-Passed group matching
If the attribute is not set to TRUE but is expected, you may see the following output:
The difference between the two outputs is the last line, which shows passed or failed depending on whether the member
attribute is set to the expected value.
To avoid setting up individual admin accounts in FortiOS, you can configure an admin account with the wildcard option
enabled, allowing multiple remote admin accounts to match one local admin account. This way, multiple LDAP admin
accounts can use one FortiOS admin account.
Benefits include:
l Fast configuration of the FortiOS admin account to work with your LDAP network, saving effort and avoiding
potential errors incurred when setting up multiple admin accounts
l Reduced ongoing maintenance. As long as LDAP users belong to the same group and you do not modify the
wildcard admin account in FortiOS, you do not need to configure changes on the LDAP accounts. If you add or
remove a user from the LDAP group, you do not need to perform changes in FortiOS.
Potential issues include:
l Multiple users may be logged in to the same account simultaneously. This may cause issues if both users make
changes simultaneously.
l Security is reduced since multiple users have login access to the same account, as opposed to an account for each
user.
Wildcard admin configuration also applies to RADIUS. If configuring for RADIUS, configure the RADIUS server and
RADIUS user group instead of LDAP. When using the GUI, wildcard admin is the only remote admin account that does
not require you to enter a password on account creation. That password is normally used when the remote
authentication server is unavailable during authentication.
This example uses default values where possible. If a specific value is not mentioned, the example sets it to its default
value.
You can configure an admin account in Active Directory for LDAP authentication to allow an
admin to perform lookups and reset passwords without being a member of the Account
Operators or Domain Administrators built-in groups. See Configuring least privileges for LDAP
admin account authentication in Active Directory on page 1730.
The important parts of this configuration are the username and group lines. The username is the domain administrator
account. The group binding allows only the GRP group access.
This example uses an example domain name. Configure as appropriate for your own network.
config user ldap
edit "ldap_server"
set server "192.168.201.3"
An administrator should only have sufficient privileges for their role. In the case of LDAP admin bind, you can configure
an admin account in Active Directory for LDAP authentication to allow an admin to perform lookups and reset passwords
without being a member of the Account Operators or Domain Administrators built-in groups.
For information about Active Directory, see the product documentation.
1. In the Active Directory Users and Computers administrative console, right-click the Organizational Unit (OU) or the
top-level domain you want to configure and select Delegate Control.
2. In the Delegation of Control Wizard dialog, click Next.
3.In the Users or Groups dialog, click Add... and search Active Directory for the users or groups.
4.Click OK and then click Next.
5.In the Tasks to Delegate dialog, select Create a custom task to delegate and click Next.
6.Select Only the following objects in the folder and scroll to the bottom of the list. Select User objects and click Next.
7.In the Permissions dialog, select General.
8.From the Permissions list, select the following:
l Change password
l Reset password
l Read lockoutTime
l Write pwdLastSet
l Read pwdLastSet
l Write UserAccountControl
l Read UserAccountControl
When LDAP users log on through firewall authentication, the active users per Active Directory LDAP group is counted
and displayed in the Firewall Users widget and the CLI.
Example
The Active Directory LDAP server, FORTINET-FSSO.com, is configured with two groups that contain two users each:
group1 consists of users test1 and test3; group2 consists of users test2 and test4.
Name FORTINET-FSSO
Username cn=administrator,cn=users,dc=FORTINET-FSSO,dc=com
c. Click OK.
2. Configure the LDAP user groups:
a. Go to User & Authentication > User Groups and click Create New.
b. Enter the name, ldap1.
c. In the Remote Groups table, click Add. The Add Group Match pane opens.
d. For Remote Server, select FORTINET-FSSO.
e. In the search box, enter group1, and select the result in the table.
f. Click OK.
6. Get users test3 and test4 to log in, and refresh the Firewall Users widget. Each LDAP group has two users logged
in, with a total of four active users.
7. Get user test2 to log out, and refresh the Firewall Users widget. There is a total of three active users, and the ldap2
group only has one user that is logged in.
RADIUS servers
Remote Authentication and Dial-In User Service (RADIUS) is a broadly supported client-server protocol that provides
centralized authentication, authorization, and accounting functions. RADIUS clients are built into gateways that allow
access to networks such a VPN server, network access server (NAS), and a network switch or firewall that uses
authentication.
RADIUS servers use UDP packets to communicate with the RADIUS clients on the network to authenticate users before
allowing them access to the network, authorize access to resources by appropriate users, and account or bill for those
resources that are used. RADIUS servers are currently defined by RFC 2865 (RADIUS) and RFC 2866 (RADIUS
Accounting), and listen on either UDP ports 1812 (authentication) and 1813 (accounting), or ports 1645 (authentication)
and 1646 (accounting) requests. RADIUS servers exist for all major operating systems.
The RADIUS server must be configured to accept the FortiGate as a client so is can use the authentication and
accounting functions of the RADIUS server.
RADIUS authentication with a FortiGate requires the following:
l Configuring one or more RADIUS server profiles on the FortiGate.
l Assigning the RADIUS server profile to a user or user group.
l Applying the user or user group to a firewall policy.
RADIUS authentication can be applied to many FortiGate functions, such as firewall authentication, SSL and IPsec
VPNs, administrator profiles, ZTNA, explicit proxy, wireless, 802.1X, and more.
The RADIUS server uses a shared secret key with MD5 hashing to encrypt information passed between RADIUS
servers and clients. Typically, only user credentials are encrypted. Additional security can be configured through IPsec
tunnels by placing the RADIUS server behind another VPN gateway.
The following topics provide more information about RADIUS servers:
l Configuring a RADIUS server on page 1735
l Using multiple RADIUS servers on page 1736
l RADIUS AVPs and VSAs on page 1739
l Restricting RADIUS user groups to match selective users on the RADIUS server on page 1741
l Configuring RADIUS SSO authentication on page 1743
l RSA ACE (SecurID) servers on page 1749
l Support for Okta RADIUS attributes filter-Id and class on page 1753
l Sending multiple RADIUS attribute values in a single RADIUS Access-Request on page 1755
l Traffic shaping based on dynamic RADIUS VSAs on page 1755
Configuring a RADIUS server
A RADIUS server can be configured in the GUI by going to User & Authentication > RADIUS Servers, or in the CLI under
config user radius.
Basic configuration
The following table summarizes the common RADIUS settings that can be configured in the GUI and CLI.
Name edit <name> Define the RADIUS server object within FortiOS.
Authentication set auth-type {auto | ms_ Specify the authentication method, or select
method chap_v2 | ms_chap | Default/auto to negotiate PAP, MSCHAP_v2, and CHAP
chap | pap}
in that order.
Include in every user set all-usergroup {enable Optional setting to add the RADIUS server to each user
group | disable} group.
This allows each user group to try and authenticate users
against the RADIUS server if local authentication fails.
Primary Server
IP/Name set server <string> Enter the IP address or resolvable FQDN of the RADIUS
server.
Secret set secret <password> Enter the password used to connect to the RADIUS
server.
There is an option in the GUI to configure a second server, and a third server can be configured in the CLI (see Using
multiple RADIUS servers on page 1736).
Advanced settings
Advanced settings for RADIUS servers can be configured in the CLI. The following are some commonly used settings.
To edit the default setting for password encoding and username case sensitivity:
password-encoding {auto | Set the password encoding to use the original encoding or ISO-8859-1 (default =
ISO-8859-1} auto). The auth-type must be auto or pap to change this setting.
username-case-sensitive Enable/disable case sensitive usernames (default = disable).
{enable | disable}
There are several ways to implement multiple RADIUS servers, and each has a different effect on user authentication.
The three main options available are:
l Add a second (or third) RADIUS server in the same profile.
l Add a second RADIUS server profile, and add both to the same user group.
l Use two RADIUS server profiles for two user groups (one for each).
A second RADIUS server can be configured in the same RADIUS profile so in the event the first RADIUS server does not
respond, the second server can be checked. If the first RADIUS server responds with an Access-Reject, no further
servers are queried.
1. Go to User & Authentication > RADIUS Servers and click Create New.
2. Enter the following:
Name RADIUS_with_2ndary
Primary Server
IP/Name 1.1.1.1
Secondary Server
IP/Name 2.2.2.2
3. Click OK.
When two separate RADIUS profiles are added to a user group, the FortiGate sends an Access-Request simultaneously
to both RADIUS servers, and authentication succeeds if either server sends back an Access-Accept. This example
includes the settings from the previous example where one or more of the RADIUS server profiles has a secondary
server configured. In this case, the secondary server profile, RADIUS_with_2ndary, is only checked if the primary server
of this profile times out and the fac_radius_server profile does not return an Access-Accept.
1. Go to User & Authentication > RADIUS Servers, click Create New, and configure the RADIUS servers as needed
(refer to the previous example).
2. Go to User & Authentication > User Groups and click Create New.
3. Enter the following:
Name RADIUS_GROUP
Type Firewall
7. Click OK.
In this example, the FortiGate first evaluates if the user belongs to the first listed group (radius_group) in the policy. If the
user fails to authenticate to this group, then the FortiGate checks if the user can successfully authenticate to the second
user group (radius_group_2). Refer to the first and second examples for detailed instructions.
This topic describes RADIUS Attribute Value Pairs (AVPs) and Vendor-Specific Attributes (VSAs).
AVPs
RADIUS packets include a set of AVPs to identify information about the user, their location, and other information. The
IETF defined a set of 255 standard attributes, which are well known and come in the form of Type, Length, Value (for
more details, refer to RFC 2865). Of the standard 255, the FortiGate sends the following RADIUS attributes:
8 Framed-IP-Address IP address to be configured for the user, by sending the IP address of a user to
the RADIUS server in the Access-Request packet.
25 Class Used in accounting packets and requests for firewall, WiFi, and proxy
authentication. The attribute is returned in the Access-Accept message and is
added to all accounting packets.
32 NAS-Identifier Identifier or IP address of the NAS that is requesting authentication. The NAS is
the FortiGate.
42 Acct-Input-Octets Number of octets received from the port over the course of this service being
provided. Used to charge the user for the amount of traffic they used.
43 Acct-Output-Octets Number of octets sent to the port while delivering this service. Used to charge
the user for the amount of traffic they used.
44 Acct-Session-Id Unique number assigned to each start and stop record to make it easy to match
them, and to eliminate duplicate records.
55 Event-Timestamp Records the time that the event occurred on the NAS. The timestamp is
measured in seconds since January 1, 1970 00:00 UTC. Before the Event-
Timestamp attribute can be sent in a packet, make sure that the correct time is
set on the FortiGate.
VSAs
Some vendors want or need to send attributes that do not match any of the defined IETF attributes. This can be
accomplished by using RADIUS attribute type 26, which allows a vendor to encapsulate their own specific attributes in
this standard AVP.
In order to support VSAs, the RADIUS server requires a dictionary to define the VSAs. This dictionary is typically
supplied by the client or server vendor.
The Fortinet RADIUS vendor ID is 12356 and contains the following attributes:
Fortinet-Group-Name 1 String
Fortinet-Client-IP-Address 2 IP address
Fortinet-Vdom-Name* 3 String
Fortinet-Client-IPv6-Address 4 Octets
Fortinet-Interface-Name 5 String
Fortinet-Access-Profile 6 String
Fortinet-SSID 7 String
Fortinet-AP-Name 8 String
Fortinet-FAC-Auth-Status 11 String
Fortinet-FAC-Token-ID 12 String
Fortinet-FAC-Challenge-Code 15 String
Fortinet-Webfilter-Category-Allow 16 String
Fortinet-Webfilter-Category-Block 17 Octets
Fortinet-Webfilter-Category-Monitor 18 Octets
Fortinet-AppCtrl-Category-Allow 19 Octets
Fortinet-AppCtrl-Category-Block 20 Octets
Fortinet-AppCtrl-Risk-Allow 21 Octets
Fortinet-AppCtrl-Risk-Block 22 Octets
Fortinet-WirelessController-Device-MAC 23 Ether
Fortinet-WirelessController-WTP-ID 24 String
Fortinet-WirelessController-Assoc-Time 25 Date
Fortinet-FortiWAN-AVPair 26 String
Fortinet-FDD-Access-Profile 30 String
Fortinet-FDD-Trusted-Hosts 31 String
Fortinet-FDD-SPP-Name 32 String
Fortinet-FDD-Is-System-Admin 33 String
Fortinet-FDD-Is-SPP-Admin 34 String
Fortinet-FDD-SPP-Policy-Group 35 String
Fortinet-FDD-Allow-API-Access 36 String
Fortinet-Fpc-User-Role 40 String
Fortinet-Tenant-Identification 41 String
Fortinet-Host-Port-AVPair 42 String
*
For Fortinet-Vdom-Name, users can be tied to a specific VDOM on the FortiGate. Refer to the documentation provided
by your RADIUS server for configuration details.
Restricting RADIUS user groups to match selective users on the RADIUS server
When a user group is configured in FortiOS to authenticate against a RADIUS server, it will allow any valid user account
on the RADIUS server to match that user group. Sometimes you might want to specify which users on the RADIUS
server should match a particular user group on the FortiGate. This can be accomplished using the RADIUS attribute
value pair (AVP) 26, known as a Vendor-Specific Attribute (VSA). This attribute allows the Fortinet-Group-Name VSA to
be included in the RADIUS response. In FortiOS, the user group must be configured to specifically match this group.
In the following example, a RADIUS Network Policy Server (NPS) has been configured to have the Fortinet-Group-
Name be IT, and assumes that the user group, RADIUS_IT has been created, which authenticates to the RADIUS_NPS
server.
1. Go to User & Authentication > User Groups and edit the RADIUS_IT group.
2. In the Remote Groups table, select the RADIUS_NPS server and click Edit. The Add Group Match pane opens.
3. For Groups, select Specify and enter the group name configured on the RADIUS server (IT).
4. Click OK.
5. Click OK.
To change the matching back to any group, under config match, enter delete 1.
Changing the group-name to "Any" will cause the FortiGate to match the Fortinet-Group-
Name with the literal string, Any.
A common RADIUS SSO (RSSO) topology involves a medium-sized company network of users connecting to the
Internet through the FortiGate and authenticating with a RADIUS server. The following describes how to configure
FortiOS for this scenario. The example makes the following assumptions:
l VDOMs are not enabled.
l The super_admin account is used for all FortiGate configuration.
l A RADIUS server is installed on a server or FortiAuthenticator and uses default attributes.
l BGP is used for any dynamic routing.
l You have configured authentication event logging under Log & Report.
Example.com has an office with 20 users on the internal network who need access to the Internet. The office network is
protected by a FortiGate-60C with access to the Internet through the wan1 interface, the user network on the internal
interface, and all servers are on the DMZ interface. This includes an Ubuntu sever running FreeRADIUS. This example
configures two users:
User Account
To configure RADIUS:
Configuring RADIUS includes configuring a RADIUS server such as FreeRADIUS on user's computers and configuring
users in the system. In this example, Pat and Kelly belong to the exampledotcom_employees group. After completing
the configuration, you must start the RADIUS daemon. The users have a RADIUS client installed on their PCs that allow
them to authenticate through the RADIUS server.
For any problems installing FreeRADIUS, see the FreeRADIUS documentation.
You must define a DHCP server for the internal network, as this network type typically uses DHCP. The wan1 and dmz
interfaces are assigned static IP addresses and do not need a DHCP server. The following table shows the FortiGate
interfaces used in this example:
Alias Internet
Comments Internet
Administrative Status Up
3. Click OK.
4. Edit dmz:
Alias Servers
Comments Servers
Administrative Status Up
5. Click OK.
6. Edit internal:
Netmask 255.255.255.0
Administrative Status Up
You must place the RADIUS SSO policy at the top of the policy list so that it is matched first. The only exception to this is
if you have a policy to deny access to a list of banned users. In this case, you must put that policy at the top so that the
RADIUS SSO does not mistakenly match a banned user or IP address.
You must configure lists before creating security policies.
Schedule
You must configure a business_hours schedule. You can configure a standard Monday to Friday 8 AM to 5 PM
schedule, or whatever days and hours covers standard work hours at the company.
Address groups
Service groups
You must configure the service groups. The services listed are suggestions and you may include more or less as
required:
The following security policy configurations are basic and only include logging and default AV and IPS. These policies
allow or deny access to non-RADIUS SSO traffic. These are essential as network services including DNS, NTP, and
FortiGuard require access to the Internet.
Schedule always
Service essential_network_services
Action ACCEPT
NAT ON
4. Click Create New, and configure the new policy as follows, then click OK:
Schedule always
Service essential_server_services
Action ACCEPT
NAT ON
5. Click Create New, and configure the new policy as follows, then click OK:
Schedule always
Service all
Action ACCEPT
NAT ON
6. Click Create New, and configure the RADIUS SSO policy as follows, then click OK. This policy allows access for
members of specific RADIUS groups.
Source User(s) Select the user groups that you created for RSSO.
Schedule business_hours
Service ALL
Action ACCEPT
NAT ON
Security Profiles ON: AntiVirus, Web Filter, IPS, and Email Filter. In each case, select the
default profile.
7. Place the RSSO policy higher in the security policy list than more general policies for the same interfaces. Click OK.
Once configured, a user only needs to log in to their PC using their RADIUS account. After that, when they attempt to
access the Internet, the FortiGate uses their session information to get their RADIUS information. Once the user is
verified, they can access the website.
SecurID is a two-factor system produced by the company RSA that uses one-time password (OTP) authentication. This
system consists of the following:
l Portable tokens that users carry
l RSA ACE/Server
l Agent host (the FortiGate)
When using SecurID, users carry a small device or "token" that generates and displays a pseudo-random password.
According to RSA, each SecurID authenticator token has a unique 64-bit symmetric key that is combined with a powerful
algorithm to generate a new code every 60 seconds. The token is time-synchronized with the SecurID RSA ACE/Server.
The RSA ACE/Server is the SecurID system's management component. It stores and validates the information about the
SecurID tokens allowed on your network. Alternately, the server can be an RSA SecurID 130 appliance.
The agent host is the server on your network. In this case, this is the FortiGate, which intercepts user logon attempts.
The agent host gathers the user ID and password entered from the SecurID token and sends the information to the RSA
ACE/Server for validation. If valid, the RSA ACE/Server returns a reply indicating that it is a valid logon and FortiOS
allows the user access to the network resources specified in the associated security policy.
Configuring SecurID with FortiOS consists of the following:
1. Configure the RSA and RADIUS servers to work with each other. See RSA server documentation.
2. Do one of the following:
a. Configure the RSA SecurID 130 appliance.
b. Configure the FortiGate as an agent host on the RSA ACE/Server.
3. Configure the RADIUS server in FortiOS.
4. Create a SecurID user group.
5. Create a SecurID user.
6. Configure authentication with SecurID.
The following instructions are based on RSA ACE/Server 5.1 and RSA SecurID 130 appliance. They assume that you
have successfully completed all external RSA and RADIUS server configuration.
In this example, the RSA server is on the internal network and has an IP address of 192.128.100.000. The FortiOS
internal interface address is 192.168.100.3. The RADIUS shared secret is fortinet123, and the RADIUS server is at IP
address 192.168.100.202.
Shared Secret Enter the RADIUS shared secret. In this example, it is fortinet123.
1. On the RSA ACE/Server, go to Start > Programs > RSA ACE/Server, then Database Administration - Host Mode.
2. From the Agent Host menu, select Add Agent Host.
3. Configure the following:
Name FortiGate
Network Address Enter the FortiOS internal interface. In this example, it is 192.168.100.3.
Secondary Nodes You can optionally enter other IP addresses that resolve to the FortiGate.
Name RSA
Primary Server
IP/Name 192.168.100.102. You can click Test to ensure the IP address is correct and
that FortiOS can contact the RADIUS server.
Secret fortinet123
3. Click OK.
Name RSA_group
Type Firewall
To create a SecurID user:
Type wloman
RADIUS Server RSA
3. Click Create.
You can test the configuration by entering the diagnose test authserver radius RSA auto wloman
111111111 command. The series of 1s is the OTP that your RSA SecurID token generates that you enter for access.
You can use the SecurID user group in several FortiOS features that authenticate by user group:
l Security policy on page 1752
l IPsec VPN XAuth on page 1752
l PPTP VPN on page 1752
l SSL VPN
Unless stated otherwise, the following examples use default values.
Security policy
The example creates a security policy that allows HTTP, FTP, and POP3 traffic from the internal interface to WAN1. If
these interfaces are not available in FortiOS, substitute other similar interfaces.
Schedule always
Action ACCEPT
NAT On
Shared Shaper If you want to limit traffic or guarantee minimum bandwidth for traffic that uses
the SecurID security policy, enable and use the default shaper, guarantee-
100kbps.
Log Allowed Traffic Enable if you want to generate usage reports on traffic that this policy has
authenticated.
4. Click OK.
In VPN > IPsec Wizard, select the SecurID user group on the Authentication page. The SecurID user group members
must enter their SecurID code to authenticate.
PPTP VPN
When configuring PPTP in the CLI, set usrgrp to the SecurID user group.
SSL VPN
You must map the SecurID user group to the portal that will serve SecurID users and include the SecurID user group in
the security policy's Source User(s) field.
Users/Groups RSA_group
4. Click OK.
RADIUS user group membership information can be returned in the filter-Id (11) and class (25) attributes in RADIUS
Access-Accept messages. The group membership information can be used for group matching in FortiGate user groups
in firewall policies and for FortiGate wildcard administrators with remote RADIUS authentication.
In this example, a FortiAuthenticator is used as the RADIUS server. A local RADIUS user on the FortiAuthenticator is
configure with two groups in the filter-Id attribute: okta-group1 and okta-group2.
To create the RADIUS user and set the attribute type to override group information:
FortiOS will only use the configured filter-Id attribute, even if the RADIUS server sends group names in both class and
filter-id attributes. To return group membership information from the class attribute instead, set group-override-
attr-type to class.
7. Click OK.
The remote server is added to the Remote Groups table.
8. Click OK.
9. Add the new user group to a firewall policy and generate traffic on the client PC that requires firewall authentication,
such as connecting to an external web server.
10. After authentication, on the FortiGate, verify that traffic is authorized in the traffic log:
a. Go to Log & Report > Forward Traffic.
b. Verify that the traffic was authorized.
To use the remote user group with group match in a system wildcard administrator configuration:
A managed FortiSwitch can be configured to send multiple RADIUS attribute values in a single RADIUS Access-
Request. This option is configured per RADIUS user, and is set to none by default.
The available service type options are:
callback-nas-prompt User disconnected and called back, then provided a command prompt.
callback-administrative User disconnected and called back, granted access to the admin unsigned
interface.
To configure a managed FortiSwitch to the RADIUS attributes login, framed, and authenticate-only all at
the same time:
A FortiGate can use the WISPr-Bandwidth-Max-Down and WISPr-Bandwidth-Max-Up dynamic RADIUS VSAs (vendor-
specific attributes) to control the traffic rates permitted for a certain device. The FortiGate can apply different traffic
shaping to different users who authenticate with RADIUS based on the returned RADIUS VSA values. When the same
user logs in from an additional device, the RADIUS server will send a CoA (change of authorization) message to update
the bandwidth values to 1/N of the total values, where N is the number of logged in devices from the same user.
When a user logs in to two devices through RADIUS authentication. The authentication and authorization flow is as
follows:
1. The user logs in to a device and the authentication is sent to the FortiGate.
2. The FortiGate sends the Access-Request message to the RADIUS server.
3. The RADIUS server sends the Access-Accept message to the FortiGate. The server also returns the WISPr-
Bandwidth-Max-Up and WISPr-Bandwidth-Max-Down VSAs.
4. Based on the VSA values, the FortiGate applies traffic shaping for the upload and download speeds based on its IP.
5. The user logs in to a second device and the authentication is sent to the FortiGate.
6. The FortiGate sends the Access-Request message to the RADIUS server.
7. The RADIUS server sends the Access-Accept message to the FortiGate. The server also returns the WISPr-
Bandwidth-Max-Up and WISPr-Bandwidth-Max-Down VSAs at half the value from the first device.
8. Based on the VSA values, the FortiGate applies traffic shaping for the upload and download speeds on the second
device based on its IP.
9. The RADIUS server sends a CoA message and returns WISPr-Bandwidth-Max-Up and WISPr-Bandwidth-Max-
Down VSAs for the first device at half the value.
10. Based on the VSA values, the FortiGate updates traffic shaping for the upload and download speeds on the first
device based on its IP.
Example
In this example, the FortiGate is configured to dynamically shape user traffic based on the WISPr-Bandwidth-Max-Up
and WISPr-Bandwidth-Max-Down VSAs returned by the RADIUS server when the user logs in through firewall
authentication.
1. Configure the RADIUS server users file to identify WISPr-Bandwidth-Max-Up and WISPr-Bandwidth-Max-Down:
The WISPr-Bandwidth is measured in bps, and the FortiOS dynamic shaper is measured
in Bps.
WISPr-Bandwidth-Max-Up = 1004857,
WISPr-Bandwidth-Max-Down = 504857,
4. Configure the firewall policy with dynamic shaping and the RADIUS group:
config firewall policy
edit 2
set srcintf "port2"
set dstintf "wan1"
set srcaddr "all"
set dstaddr "all"
set srcaddr6 "all6"
set dstaddr6 "all6"
set action accept
set schedule "always"
set service "ALL"
set dynamic-shaping enable
set groups "group_radius"
set nat enable
next
end
Verification
After a client PC is authenticated by the RADIUS server, dynamic shaping is applied to the client based on the IP
address.
Use the following commands to monitor the dynamic shaper:
# diagnose firewall shaper dynamic-shaper stats
# diagnose firewall shaper dynamic-shaper list {ip | ipv6 | user} <address or username>
Use case 1
User1 is paying for rate plan A that limits their maximum bandwidth to 10 Mbps download and 5 Mbps upload. User2 is
paying for rate plan B that limits their maximum bandwidth to 5 Mbps download and 5 Mbps upload. The speeds in both
plans are provided by best effort, so there is no guaranteed minimum bandwidth.
User1 logs in to pc1 with RADIUS authentication and IP-based dynamic shaping is applied. User2 logs in to pc2 with
RADIUS authentication and IP-based dynamic shaping is applied.
addr: 10.1.100.22
bandwidth(original/reply): 625000 Bps/625000 Bps
current bandwidth(original/reply): 622909 Bps/0 Bps
allow packets(original/reply): 3232/3
allow bytes(original/reply): 4841536/243
drop packets(original/reply): 2753/0
drop bytes(original/reply): 4123994/0
life: 10
idle: 0/10
idle time limit: 36000 s
Use case 2
A user logs in to a device (pc1, 10.1.100.11 ) and has a maximum bandwidth of 10 Mbps download and 5 Mbps upload.
The same user logs in to a second device (pc2, 10.1.100.22) and the RADIUS server sends a CoA request with the
WISPr-Bandwidth-Max to pc1. The maximum bandwidth on pc1 changes to 5 Mbps download and 2.5Mbps upload. On
pc2, the maximum bandwidth is also 5 Mbps download and 2.5Mbps upload.
When the user logs out from pc1, the RADIUS server sends CoA request with the new WISPr-Bandwidth-Max for pc2.
The FortiGate updates the authentication user list and dynamic shaper for pc2. The maximum bandwidth on pc2
changes to 10 Mbps download and 5 Mbps upload.
1. Check the dynamic shaper list after the user logs in to pc1:
# diagnose firewall shaper dynamic-shaper list
addr: 10.1.100.11
bandwidth(original/reply): 1250000 Bps/625000 Bps
current bandwidth(original/reply): 0 Bps/0 Bps
allow packets(original/reply): 0/3
allow bytes(original/reply): 0/243
drop packets(original/reply): 0/0
drop bytes(original/reply): 0/0
life: 491
idle: 4/4
idle time limit: 86400 s
2. Check the dynamic shaper list after the user logs in to pc2:
# diagnose firewall shaper dynamic-shaper list
addr: 10.1.100.11
bandwidth(original/reply): 625000 Bps/312500 Bps
current bandwidth(original/reply): 0 Bps/0 Bps
allow packets(original/reply): 0/0
allow bytes(original/reply): 0/0
drop packets(original/reply): 0/0
drop bytes(original/reply): 0/0
life: 652
idle: 5/5
idle time limit: 600 s
addr: 10.1.100.22
bandwidth(original/reply): 625000 Bps/312500 Bps
current bandwidth(original/reply): 0 Bps/0 Bps
allow packets(original/reply): 0/3
allow bytes(original/reply): 0/243
drop packets(original/reply): 0/0
drop bytes(original/reply): 0/0
life: 3
idle: 3/3
idle time limit: 86400 s
group_id: 15
group_name: group_radius
10.1.100.22, test
src_mac: **:**:**:**:**:**
type: fw, id: 0, duration: 9, idled: 9
expire: 86391
flag(814): hard radius no_idle
server: rad1
packets: in 0 out 0, bytes: in 0 out 0
group_id: 15
group_name: group_radius
----- 2 listed, 0 filtered ------
4. Check the dynamic shaper list after the user logs out from pc1:
# diagnose firewall shaper dynamic-shaper list
addr: 10.1.100.22
bandwidth(original/reply): 1250000 Bps/625000 Bps
current bandwidth(original/reply): 0 Bps/0 Bps
allow packets(original/reply): 0/0
allow bytes(original/reply): 0/0
drop packets(original/reply): 0/0
drop bytes(original/reply): 0/0
life: 414
idle: 9/9
idle time limit: 600 s
TACACS+ servers
TACACS+ is a remote authentication protocol that provides access control for routers, network access servers, and
other network devices through one or more centralized servers.
FortiOS sends the following proprietary TACACS+ attributes to the TACACS+ server during authorization requests:
Attribute Description
service=<name> User must be authorized to access the specified service.
memberof Group that the user belongs to.
admin_prof Administrator profile (admin access only).
You can configure up to ten remote TACACS+ servers in FortiOS. You must configure at least one server before you can
configure remote users.
A TACACS+ server must first be added in the CLI to make the option visible in the GUI.
Authentication Type Select the authentication type used for the TACACS+ server.
Selecting Auto tries PAP, MSCHAP, and CHAP, in that order.
Server IP/Name Enter the domain name or IP address for the primary server.
4. Click OK.
SAML
When you configure a FortiGate as a service provider (SP), you can create an authentication profile that uses SAML for
firewall authentication.
You must use the identity provider's (IdP) remote certificate on the SPs.
The following example uses a FortiGate as an SP and FortiAuthenticator as the IdP server:
2. Add the SAML user to the user group (optionally, you can configure group matching):
config user group
edit "saml_firewall"
set member "fac-firewall"
config match
edit 1
set server-name "fac-firewall"
set group-name "user_group1"
next
end
next
end
5. Run HTTP/HTTPS authentication for a remote user. The SAML login page appears:
When you configure a FortiGate as a service provider (SP), you can create an authentication profile that uses SAML for
SSL VPN web portal authentication.
The following example uses a FortiGate as an SP and FortiAuthenticator as the IdP server:
2. Add the SAML user to the user group (group matching may also be configured):
config user group
edit "saml_sslvpn"
set member "fac-sslvpn"
next
end
1. In a web browser, enter the portal address. The SAML login page appears:
FortiClient can use a browser as an external user-agent to perform SAML authentication for SSL VPN tunnel mode,
instead of the FortiClient embedded log in window. If a user has already done SAML authentication in the default
browser, they do not need to authenticate again in the FortiClient built-in browser. FortiClient 7.0.1 and later is required.
The following CLI is used to set the SAML local redirect port on the FortiClient endpoint after successful SAML
authentication:
config vpn ssl settings
set saml-redirect-port <port>
end
Example
In this example, a user wants to use their default browser to connect to IdP for SAML authentication, without needing to
separately authenticate in the FortiClient built-in browser. After authenticating in the browser, FortiClient obtains the
authentication cookie directly from the browser.
5. Configure a firewall policy for the SSL VPN and assign the SAML group and a local user to it:
config firewall policy
edit 1
set name "policy_to_sslvpn_tunnel"
set srcintf "ssl.root"
set dstintf "port1"
f. Click Save.
2. On the Remote Access tab select the FGT401E_SSO VPN connection from the dropdown list.
3. Click SAML Login.
The default browser opens to the IdP authentication page.
SSL-VPN sessions:
Index User Group Source IP Duration I/O Bytes Tunnel/Dest IP
0 fac3 saml_grp 10.1.100.254 5 9990/8449
10.212.134.200,fdff:ffff::1
# diagnose firewall auth list
10.212.134.200, fac3
type: fw, id: 0, duration: 6, idled: 0
expire: 259199, allow-idle: 259200
flag(80): sslvpn
server: su1
packets: in 28 out 28, bytes: in 23042 out 8561
group_id: 5
group_name: saml_grp
SAML user authentication can be used in explicit web proxies and transparent web proxies with the FortiGate acting as a
SAML SP. SAML can be used as an authentication method for an authentication scheme that requires using a captive
portal.
Topology
In this configuration, SAML authentication is used with an explicit web proxy. The IdP is a Windows 2016 server
configured with ADFS. The LDAP and IdP servers are on the same server. The LDAP server is used as the user
backend for the IdP to perform authentication; however, they are not required to be on the same server.
The authentication and authorization flow is as follows:
5. Configure SAML:
config user saml
edit "saml_user"
set cert "Fortinet_CA_SSL"
set entity-id "https://fgt9.myqalab.local:7831/XX/YY/ZZ/saml/metadata/"
set single-sign-on-url "https://fgt9.myqalab.local:7831/XX/YY/ZZ/saml/login/"
set single-logout-url "https://fgt9.myqalab.local:7831/XX/YY/ZZ/saml/logout/"
set idp-entity-id "http://MYQALAB.LOCAL/adfs/services/trust"
set idp-single-sign-on-url "https://myqalab.local/adfs/ls"
set idp-single-logout-url "https://myqalab.local/adfs/ls"
set idp-cert "REMOTE_Cert_4"
set digest-method sha256
set adfs-claim enable
set user-claim-type name
set group-claim-type group
next
end
When a user goes to www.google.com in a browser that is configured to use the FortiGate as a proxy, the IdP sign-
in page appears.
Sample log
SAML single sign-on can be configured in the GUI under User & Authentication > User Groups. The GUI wizard helps
generate the service provider (SP) URLs based on the supplied SP address. The SAML object that is created can be
selected when defining new user groups.
In this example, FortiGate AA is the inside firewall (172.16.200.101). The other FortiGate is the outside firewall that only
does port forwarding from 172.16.116.151:55443 to 172.16.200.101:443. FortiGate AA is configured to allow full
SSL VPN access to the network in port2. This SSL VPN portal allows users from the user group saml_grp and SAML
server saml_test to log in. In this topology, a FortiAuthenticator acts as the SAML identity provider (IdP), while the
FortiGate is the SAML SP. External users are directed to the FortiAuthenticator IdP login URL to authenticate. For more
information about configuring a FortiAuthenticator as an IdP, see Service providers.
The FortiAuthenticator in this example has the following configuration:
Click the icon beside the SP entity ID, SP single sign-on URL, and SP single logout
URL fields to copy the text.
c. Click Next.
d. Enter the FortiAuthenticator IdP details:
Prefix 43211234
e. Enter the additional SAML attributes that will be used to verify authentication attempts:
The IdP must be configured to include these attributes in the SAML attribute statement. In FortiAuthenticator,
this is configured in the Assertion Attributes section.
f. Click Submit.
The following is created in the backend:
config user saml
edit "saml_test"
set cert "fgt_gui_automation"
set entity-id "http://172.16.116.151:55443/remote/saml/metadata/"
set single-sign-on-url "https://172.16.116.151:55443/remote/saml/login/"
set single-logout-url "https://172.16.116.151:55443/remote/saml/logout/"
set idp-entity-id "http://172.18.58.93:443/saml-idp/43211234/metadata/"
set idp-single-sign-on-url "https://172.18.58.93:443/saml-
idp/43211234/login/"
set idp-single-logout-url "https://172.18.58.93:443/saml-
idp/43211234/logout/"
set idp-cert "REMOTE_Cert_1"
set user-name "Username"
set group-name "Group"
set digest-method sha1
next
end
e. Click OK.
The following is created in the backend:
config user group
edit "saml_grp"
set member "saml_test"
next
end
f. Click Apply.
4. Configure the firewall policy:
a. Go to Policy & Objects > Firewall Policy and click Create New.
b. Enter the following:
If you are using FortiClient for tunnel mode access, enable Enable Single Sign On (SSO)
for VPN Tunnel in the SSL-VPN connection settings to use the SAML log in. See
Configuring an SSL VPN connection for more information.
6. In FortiOS, go to Dashboard > Network and click the SSL-VPN widget to expand to full view and verify the
connection information.
In this example, users are managed through Microsoft Azure Active Directory (AD). The FortiGate is configured for SSO
firewall authentication for outbound traffic, with authentication performed by the Azure AD as a SAML identity provider
(IdP).
The SAML interaction occurs as follows:
In this example environment, a user is added in the Azure AD belonging to the security group called Firewall.
l Username: John Locus
l User login: [email protected]
l Group: Firewall (ID 62b699ce-4f80-48c0-846e-c1dfde2dc667)
The goal is to allow users in the Firewall group to access the internet after passing firewall authentication.
The following Azure AD configuration demonstrates how to add the FortiGate as an enterprise non-gallery application.
This application provides SAML SSO connectivity to the Azure AD IdP. Some steps are performed concurrently on the
FortiGate.
This example is configured with an Azure AD free-tier directory. There may be limitations to
managing users in Azure in this tier that are not limited in other tiers. Consult the Microsoft
Azure AD documentation for more information.
6. Enter a name for the application (SAML-FW-Auth) and select Integrate any other application you don't find in the
gallery (Non-gallery).
7. Click Create.
This procedure requires going back and forth between Azure and the FortiGate GUI. Leave
the FortiGate GUI open for the entire procedure.
1. On the Enterprise Application Overview page, go to Manage > Single sign-on and select SAML as the single sign-on
method.
2. Under the SAML Signing Certificate section, download the Base64 certificate.
3. Import the certificate from Azure on the FortiGate as the IdP certificate:
a. Go to System > Certificates and click Create/Import > Remote Certificate.
b. Upload the certificate from Azure and click OK. The new certificate appears under the Remote Certificate
section with the name REMOTE_Cert_(N).
c. Optionally, rename the certificate in the CLI to give it a more recognizable name:
config vpn certificate remote
rename REMOTE_Cert_3 to AZURE_AD_SAML_FW
end
4. The Basic SAML Configuration section in Azure describes the SAML SP entity and links that Azure will reference.
Configure these settings on the FortiGate by creating a new SAML server object and defining the SP address. The
SP (IP or FQDN) address should be accessible by the user who is authenticating against the firewall. The port used
should match the port used by the FortiGate firewall authentication captive portal. By default, this is port 1003 for
HTTPS. A captive portal does not need to be configured separately.
a. Go to User & Authentication > Single Sign-On and click Create New.
b. Enter a Name for the SAML object, Azure-AD-SAML.
c. Enter the SP address, 10.1.0.1:1003. The three SP URLs are automatically populated.
5. In Azure on the Set up Single Sign-On with SAML page, copy the following URLs from the FortiGate to the Basic
SAML Configuration section:
6. Click Save.
7. In the Set up <application name> section, copy the URLs from Azure to the FortiGate in the IdP Details section:
e. Click Save. The User Attributes & Claims section displays the update settings.
9. On the FortiGate, update the Additional SAML Attributes section with the username and group created in Azure:
a. For Attribute used to identify users, enter username.
b. For Attribute used to identify groups, enter group.
c. Click Submit.
1. In Azure, go to Manage > Users and groups and click Add user/group.
2. Click Users to select the users or groups (John Locus is selected in this example).
3. Click Assign to add the assignment.
The user group, user authentication settings, and firewall policies must be configured on the FortiGate.
Configuring group matching is optional, and the Object ID from Azure is needed for the config match settings. In the
Azure default directory, go to Manage > Groups and locate the Object ID for the Firewall group.
When a user initiates traffic, the FortiGate will redirect the user to the firewall authentication captive portal before
redirecting them to the SAML IdP portal. After the SAML IdP responds with the SAML assertion, the user is again
redirected to the firewall authentication captive portal. If the firewall portal’s certificate is not trusted by the user, they will
receive a certificate warning. Use a custom certificate that the user trusts to avoid the certificate warning.
To assign a CA certificate:
Firewall policies must be configured to apply user authentication and still allow users behind the FortiGate to access the
Microsoft log in portal without authentication.
Name LAN-to-AuthPortal
Source all
Schedule always
Service ALL
Action ACCEPT
Name LAN-auth-policy
Destination all
Schedule always
Service ALL
Action ACCEPT
When the client connects to the internet from a browser, they will be redirected to the Microsoft log in page to
authenticate against the Azure AD. The FortiGate’s authentication portal certificate should be installed on the client.
1. On the client, open a browser (such as Firefox) and go to a website. The user is redirected to the Microsoft log in
page.
2. Enter the user credentials.
3. If the log in attempt is successful, the user is allowed to access the internet
To verify user logins, go to the Dashboard > Users & Devices > Firewall Users widget, or enter the following in the CLI:
# diagnose firewall auth list
10.1.0.100, John Locus
src_mac: 02:09:0f:00:03:03
type: fw, id: 0, duration: 152, idled: 7
expire: 292, allow-idle: 300
server: Azure-AD-SAML
packets: in 2097 out 932, bytes: in 2208241 out 143741
group_id: 2
group_name: Azure-FW-Auth
----- 1 listed, 0 filtered ------
To verify user login logs, go to Log & Report > Events > User Events, or enter the following in the CLI:
# execute log filter category event
# execute log filter field subtype user
# execute log display
17 logs found.
10 logs returned.
7: date=2021-09-30 time=09:49:25 eventtime=1633020565577584390 tz="-0700" logid="0102043039"
type="event" subtype="user" level="notice" vd="root" logdesc="Authentication logon"
srcip=10.1.0.100 user="John Locus" authserver="Azure-AD-SAML" action="auth-logon"
status="logon" msg="User John Locus added to auth logon"
If user authentication is successful in Azure AD, but their group does not match the one defined in the FortiGate user
group, the user will receive a Firewall Authentication Failed message in the browser. A log is also recorded:
# execute log filter category event
# execute log filter field subtype user
# execute log display
1: date=2021-09-30 time=10:39:35 eventtime=1633023575381139214 tz="-0700" logid="0102043009"
type="event" subtype="user" level="notice" vd="root" logdesc="Authentication failed"
srcip=10.1.0.100 dstip=10.1.0.1 policyid=11 interface="port3" user="Adam Thompson"
group="N/A" authproto="HTTPS(10.1.0.100)" action="authentication" status="failure"
reason="No matched SAML user or group name in auth resp" msg="User Adam Thompson failed in
authentication"
If a user receives the following error message, this means the user is not assigned to the enterprise application SAML-
FW-Auth in Azure.
Authentication settings
You can configure general authentication settings, including timeout, protocol support, and certificates.
Setting Description
Authentication Timeout Enter the desired timeout in minutes. You can enter a number between 1 and
1440 (24 hours). The authentication timeout controls how long an
authenticated connection can be idle before the user must reauthenticate. The
default value is 5.
Protocol Support Select the protocols to challenge during firewall user authentication.
When you enable user authentication within a security policy, the
authentication challenge is normally issued for any of four protocols,
depending on the connection protocol:
l HTTP (you can set this to redirect to HTTPS)
l HTTPS
l FTP
l Telnet
The protocols selected here control which protocols support the authentication
challenge. Users must connect with a supported protocol first so they can
subsequently connect with other protocols. If HTTPS is selected as a protocol
support method, it allows the user to authenticate with a customized local
certificate.
When you enable user authentication within a security policy, FortiOS
challenges the security policy user to authenticate. For user ID and password
authentication, the user must provide their username and password. For
certificate authentication (HTTPS or HTTP redirected to HTTPS only), you can
install customized certificates on the unit and the user can also install
customized certificates on their browser. Otherwise, users see a warning
message and must accept a default Fortinet certificate. The network user's
web browser may deem the default certificate invalid.
Certificate If using HTTPS protocol support, select the local certificate to use for
authentication. This is available only if HTTPS and/or Redirect HTTP
Challenge to a Secure Channel (HTTPS) are selected.
FortiTokens
FortiTokens are security tokens used as part of a multi-factor authentication (MFA) system on FortiGate and
FortiAuthenticator. A security token is a 6-digit or 8-digit (configurable) one-time password (OTP) that is used to
authenticate one's identity electronically as a prerequisite for accessing network resources. FortiToken is available as
either a mobile or a physical (hard) token. Mobile tokens can be purchased as a license, or consumed with points as part
of the FortiToken Cloud service.
FortiToken Mobile and physical FortiTokens store their encryption seeds on the cloud. FortiToken Mobile seeds are
generated dynamically when the token is provisioned. They are always encrypted whether in motion or at rest.
You can only register FortiTokens to a single FortiGate or FortiAuthenticator for security purposes. This prevents
malicious third parties from making fraudulent requests to hijack your FortiTokens by registering them on another
FortiGate or FortiAuthenticator. If re-registering a FortiToken Mobile or Hard Token on another FortiGate is required, you
must contact Fortinet Customer Support.
Common usage for FortiTokens includes:
l Applying MFA to a VPN dialup user connecting to the corporate network
l Applying MFA to FortiGate administrators
l Applying MFA to firewall authentication and captive portal authentication
To enable the third factor, refer to the Activating FortiToken Mobile on a mobile phone on page
1798 section.
If the FortiToken has drifted, the following must take place for the FortiToken to resynchronize with
FortiOS:
This section includes the following topics to quickly get started with FortiTokens:
l FortiToken Mobile quick start on page 1795
l FortiToken Cloud on page 1803
l Registering hard tokens on page 1803
l Managing FortiTokens on page 1805
l FortiToken Mobile Push on page 1807
l Synchronizing LDAP Active Directory users to FortiToken Cloud using the group filter on page 1809
l Troubleshooting and diagnosis on page 1812
FortiToken Mobile is an OATH compliant, event- and time-based one-time password (OTP) generator for mobile
devices. It provides an easy and flexible way to deploy and provision FortiTokens to your end users through mobile
devices. FortiToken Mobile produces its OTP codes in an application that you can download onto your Android or iOS
mobile device without the need for a physical token.
You can download the free FortiToken Mobile application for Android from the Google Play Store, and for iOS from the
Apple App Store.
This section focuses on quickly getting started and setting up FortiToken Mobile for use on a FortiGate:
l Registering FortiToken Mobile on page 1796
l Provisioning FortiToken Mobile on page 1797
l Activating FortiToken Mobile on a mobile phone on page 1798
l Applying multi-factor authentication on page 1802
To deploy FortiToken Mobile for your end users, you must first register the tokens on your FortiGate. After registering the
tokens, you can assign them to your end users.
Each FortiGate comes with two free FortiToken Mobile tokens. These tokens should appear under User & Authentication
> FortiTokens. If no tokens appear, you may import them. Ensure that your FortiGate is registered and has internet
access to connect to the FortiToken servers to import the tokens.
If only one free token appears, you can first delete that token and then follow the procedure to
import the two free tokens from either the GUI or the CLI.
If you have the FortiToken Mobile redemption certificate, you can register FortiToken Mobile on a FortiGate.
1. Go to User & Authentication > FortiTokens and click Create New. The New FortiToken dialog appears.
2. For the Type field, select Mobile Token.
3. Locate the 20-digit code on the redemption certificate and type it in the Activation Code field.
4. Click OK. The token is successfully registered.
If you attempt to add invalid FortiToken serial numbers, there is no error message. FortiOS
does not add invalid serial numbers to the list.
FortiToken Mobile stores its encryption seeds on the cloud. You can only register it to a single
FortiGate or FortiAuthenticator.
Once registered, FortiTokens need to be provisioned for users before they can be activated. In this example, you will
provision a mobile token for a local user. Similar steps can be taken to assign FortiTokens to other types of users.
1. Go to User & Authentication > User Definition, and click Create New. The Users/Groups Creation Wizard appears.
2. In the User Type tab, select Local User, and click Next.
3. In the Login Credentials tab, enter a Username and Password for the user, and click Next.
5. In the Extra Info tab, make sure the User Account Status field is set to Enabled. You can also optionally assign the
user to a user group by enabling the User Group toggle.
6. Click Submit. An activation code should be sent to the created user by email or SMS, depending upon the delivery
method configured above.
FortiGate has the Email Service setting configured using the server notifications.fortinet.net by
default. To see configuration, go to System > Settings > Email Service.
The activation code expires if not activated within the 3-day time period by default. However, the expiry time period is
configurable.
To configure the time period (in hours) for FortiToken Mobile, using the CLI:
To resend the email or SMS with the activation code, refer to the Managing FortiTokens on
page 1805 section.
After your system administrator provisions your token, you receive a notification with an activation code and expiry date
via SMS or email. If you do not activate your token by the expiry date, you must contact your system administrator so that
they can reassign your token for activation.
Platforms that support FortiToken Mobile:
iOS iPhone, iPad, and iPod Touch with iOS 6.0 and later.
Android Phones and tablets with Android Jellybean 4.1 and later.
Windows Windows 10 (desktop and mobile), Windows Phone 8.1, and Windows Phone 8.
The following instructions describe procedures when using FortiToken Mobile for iOS on an iPhone. Procedures may
vary depending on your device and firmware.
1. On your iOS device, tap on the FortiToken application icon to open the application. If this is your first time opening
the application, it may prompt you to create a PIN for secure access to the application and tokens.
3. If you received the QR code via email, locate and scan the QR code in your email.
OR
If you received the activation key via SMS, tap on Enter Manually at the bottom of the screen, and tap on Fortinet.
Enter your email address in the Name field, the activation key in the Key field, and tap Done.
4. FortiToken Mobile activates your token, and starts generating OTP digits immediately. To view or hide the OTP
digits, tap the eye icon.
After you open the application, FortiToken Mobile generates a new 6-digit OTP every 30 seconds. All configured tokens
display on the application homescreen.
The FortiToken Mobile activation process described above caters to the MFA process that involves two factors
(password and OTP) of the authentication process. A third factor (fingerprint or face) can be enabled as well.
3. Enable and set up a 4-digit PIN for the application. The PIN is required to be enabled before you can enable
Touch/Face ID.
You cannot enable Touch/Face ID for FortiToken if Touch/Face ID is not set up and
enabled for device unlock (iPhone Unlock in this case) on iOS. You must first set up and
enable Touch/Face ID from Settings on your iOS device.
5. When prompted by iOS, allow the FortiToken application to use Touch/Face ID by tapping on OK in the prompt.
Multi-factor authentication (MFA) may also be set up for SSL VPN users, administrators, firewall policy, wireless users,
and so on. The following topics explain more about how you may use the newly created user in such scenarios:
l MFA for SSL VPN: Set up FortiToken multi-factor authentication on page 1549
l MFA for IPsec VPN: Add FortiToken multi-factor authentication on page 1346
l MFA for Administrators: Associating a FortiToken to an administrator account on page 1857
l MFA with Captive Portal
FortiToken Cloud
FortiToken Cloud is an Identity and Access Management as a Service (IDaaS) cloud service offering by Fortinet. It
enables FortiGate and FortiAuthenticator customers to add MFA for their respective users, through the use of Mobile
tokens or Hard tokens. It protects local and remote administrators as well as firewall and VPN users.
For information, see Getting started—FGT-FTC users in the FortiToken Cloud Administration Guide.
end
Seed files are only used with FortiToken-200CD. These are special hardware tokens that
come with FortiToken seeds on a CD. See the FortiToken Comprehensive Guide for
details.
6. Click Upload.
7. Browse to the file's location on your local machine, select the file, then click OK.
8. Click OK.
Activating FortiTokens
You must activate the FortiTokens before starting to use them. FortiOS requires connection to FortiGuard servers for
FortiToken activation. During activation, FortiOS queries FortiGuard servers about each token's validity. Each token can
only be used on a single FortiGate or FortiAuthenticator. If tokens are already registered, they are deemed invalid for re-
activation on another device. FortiOS encrypts the serial number and information before sending for added security.
1. Ensure that you have successfully added your FortiToken serial number to FortiOS and that its status is Available.
2. Go to User & Authentication > User Definition. Edit the desired user account.
3. Enable Two-factor Authentication.
4. From the Token dropdown list, select the desired FortiToken serial number.
5. In the Email Address field, enter the user's email address.
6. Click OK.
Before you can use a new FortiToken, you may need to synchronize it due to clock drift.
To associate a FortiToken to an administrator account, refer to the Associating a FortiToken to an administrator account
on page 1857 section.
Managing FortiTokens
1. Go to User & Authentication > User Definition and edit the user.
2. Click Send Activation Code Email from the Two-factor Authentication section.
Locking/unlocking FortiTokens
If the FortiToken has drifted, the following must take place for the FortiToken to resynchronize with
FortiOS:
This command lists the serial number and drift for each configured FortiToken. You can check if it is necessary to
synchronize the FortiGate and any particular FortiTokens.
Deactivating FortiTokens
4. Click OK. The token will be removed from the user's Two-factor Authentication column. The user will also be
removed from the token's User column under User & Authentication > FortiTokens.
FortiTokens can only be activated on a single FortiGate or FortiAuthenticator. To move FortiTokens to another device,
you would first have to reset the registered FortiTokens on a device and then reactivate them on another device.
To reset Hard tokens registered to a FortiGate appliance (non-VM model), you can reset all hardware FTK200 tokens
from the Support Portal, or during RMA transfer. See the Migrating users and FortiTokens to another FortiGate KB
article, for more information.
The above process will reset all Hard tokens and you cannot select individual tokens to reset.
To reset FortiToken Mobile, a single Hard token, a Hard token registered to a VM, and so on, an administrator must
contact Customer Support and/or open a ticket on the Support Portal.
Once reset, the FortiTokens can be activated on another FortiGate or FortiAuthenticator.
FortiToken Mobile Push allows authentication requests to be sent as push notifications to the end user's FortiToken
Mobile application.
The FortiToken Mobile push service operates as follows:
1. FortiGate sends a DNS query to the FortiToken Mobile Push proxy server (push.fortinet.com).
2. FortiGate connects to the proxy server via an encrypted connection over TCP/443.
3. The proxy server handles the notification request by making a TLS connection with either Apple (for iOS) or Google
(for Android) notification servers. Notification data may include the recipient, session, FortiGate callback IP and
port, and so on.
4. The notification service from either Apple or Google notifies the user's mobile device of the push request.
5. The FortiToken Mobile application on the user's mobile displays a prompt for the user to either Approve or Deny the
request.
Synchronizing LDAP Active Directory users to FortiToken Cloud using the group
filter
To synchronize Active Directory users and apply two-factor authentication using FortiToken Cloud, two-factor
authentication can be enabled in the user ldap object definition in FortiOS. By default, FortiOS retrieves all Active
Directory users in the LDAP server with a valid email or mobile number (mail and mobile attributes), and synchronizes
the users to FortiToken Cloud. Users are then created on FortiToken Cloud and activation is sent out using email or
SMS.
Group filters can be used to reduce the number of the Active Directory users returned, and only synchronize the users
who meet the group filter criteria.
Two-factor authentication for LDAP group filtering can only be configured in the CLI:
config user ldap
edit <name>
set dn <string>
set two-factor {disable | fortitoken-cloud}
set group-filter <string>
next
end
dn <string> Set the distinguished name used to look up entries on the LDAP server. The
search for users and groups starts here based on what is defined.
two-factor {disable | Enable/disable two-factor authentication:
fortitoken-cloud} l disable: disable two-factor authentication
In the following examples, a user ldap object is defined to connect to an Active Directory on a Windows server. The
search will begin in the root of the fortinet-fsso.com directory.
next
end
When a group filter is not used, all users in the Active Directory with a valid email or mobile number will be retrieved.
With this group-filter, users under fortinet-fsso.com that have oliver* in their username and *fortinet* in their email
will be matched.
config user ldap
edit "ad-ldap-auth"
set group-filter "(&(SAMAccountName=oliver*)(mail=*fortinet*))"
next
end
With this group-filter, all users under fortinet-fsso.com with *fortinet* in their email will be matched.
config user ldap
edit "ad-ldap-auth"
set group-filter "(&(SAMAccountName=*)(mail=*fortinet*))"
next
end
With this group-filter, all users within the group fortinet-fsso.com > Testing > ftc-users will be matched.
config user ldap
edit "ad-ldap-auth"
set group-filter "(&(objectCategory=Person)(sAMAccountName=*)( memberOf=cn=ftc-
users,ou=Testing,dc=fortinet-fsso,DC=com))"
next
end
Example configuration
In this example, Active Directory users are configured to be synchronized to FortiToken Cloud. The same group filter is
used from example 1 and searches the Active Directory for users named oliver* with email *fortinet*.
Before configuring the FortiGate:
1. Gather the information to connect to the Active Directory server through LDAP. Include all necessary fields, such as
the server IP, port, CN name identifier, DN for the start of the search, bind type, and username associated with a
regular bind.
2. Consider the users or groups that require two-factor authentication and should be synchronized. If necessary, group
the users under the same group in the Active Directory.
3. If using a group filter, formulate the group-filter string to limit the match. For this example, (&
(SAMAccountName=oliver*)(mail=*fortinet*)).
4. Test the filter by using the FortiOS CLI to perform a quick LDAP search:
2. In the background, the FortiGate FAS daemon scans the LDAP server for users to be synchronized based on the
group filter pattern, but will not send them to the FortiToken Cloud server yet. Optionally, verify the users that are
retrieved from the Active Directory based on the filter:
# diagnose fortitoken-cloud debug enable
# diagnose debug enable
# diagnose fortitoken-cloud sync
...
fas_sync_ftc[2788]: Sending packet to FTC server: "IP-of-FTC-server" Port: 8686
(length:444)
fas_sync_ftc[2792]: FTC User Sync Packet(length:444):
POST /api/v1/user_sync HTTP/1.1
Host: ftc.fortinet.com
Connection: keep-alive
User-Agent: FortiGate-401E v7.0.6,build****
Content-Type: application/json
Content-Length: 246
{"users":[{"username":"oliver2022","vdom":"vdom1","email":"o****@fortinet.com","mobile_
number":"XXXXXXXXXXX","user_
data":1,"action":"create"}],"sn":"FG4H1E5819900000","cluster_members":[
"FG4H1E5819900000" ],"group_name":"FGT400D","group_id":"0"}
Reminder: User sync packet not actually sent out because of diagnose purpose!
As expected, only the user that matches the current filter is returned.
3. Manually trigger the synchronization process with FortiToken Cloud:
# execute fortitoken-cloud sync
The user is added to FortiToken Cloud, and an activation email or SMS message is sent to the user.
4. In FortiToken Cloud, go to Users to verify that the user was added.
If the activation email was sent, but user has not downloaded and activated the mobile token yet, a pending symbol
appears in the Status column (such as for the admin, test6, and test3 users).
5. In FortiOS, add the ad-ldap-auth object in a user group. The user group can be used for VPN, firewall
authentication, and so on.
The ldap user object should not be used in remote LDAP user groups that require group
matching because it is not supported.
This section contains some common scenarios for FortiTokens troubleshooting and diagnosis:
l FortiToken Statuses on page 1812
l Recovering trial FortiTokens on page 1813
l Recovering lost Administrator FortiTokens on page 1814
l SSL VPN with multi-factor authentication expiry timers on page 1815
FortiToken Statuses
When troubleshooting FortiToken issues, it is important to understand different FortiToken statuses. FortiToken status
may be retrieved either from the CLI or the GUI, with a slightly different naming convention.
Before you begin, verify that the FortiGate has Internet connectivity and is also connected to both the FortiGuard and
registration servers:
# execute ping fds1.fortinet.com
# execute ping directregistration.fortinet.com
# execute ping globalftm.fortinet.net
If there are connectivity issues, retrieving FortiToken statuses or performing FortiToken activation could fail. Therefore,
troubleshoot connectivity issues before continuing.
l In the CLI:
# diagnose fortitoken info
l In the GUI:
Go to User & Authentication > FortiTokens.
Various FortiToken statuses in either the CLI or the GUI may be described as follows:
You can recover trial FortiTokens if deleted from a FortiGate, or if stuck in a state where it is not possible to provision to a
user.
When a token is stuck in an unusual state or with errors, delete the FortiTokens from the unit and proceed to recover trial
FortiTokens.
l Before attempting to recover the trial tokens, both the tokens should be deleted from the
unit first.
l If VDOMs are enabled, trial tokens are in the management VDOM (root by default).
If an Administrator loses their FortiToken or the FortiToken is not working, they will not be able to log into the admin
console through the GUI or the CLI. If there is another Administrator that can log into the device, they may be able to
reset the two-factor settings configured for the first Administrator, or create a new Admin user for them. Note that a
super_admin user will be able to edit other admin user settings, but a prof_admin user will not be able to edit super_
admin settings.
In the case where there are no other administrators configured, the only option is to flash format the device and reload a
backup config file. You must have console access to the device in order to format and flash the device. It is
recommended to be physically on site to perform this operation.
The process of resetting an Admin user password using the maintainer account cannot be
used to reset or disable two-factor authentication.
Before formatting the device, verify that you have a backup config file. You may or may not have the latest config file
backed up, though you should consider using a backed up config file, and reconfigure the rest of the recent changes
manually. Otherwise, you may need to configure your device starting from the default factory settings.
When SSL VPN is configured with multi-factor authentication (MFA), sometimes you may require a longer token expiry
time than the default 60 seconds.
These timers apply to the tokens themselves and remain valid for as long as configured above. However, SSL VPN does
not necessarily accept tokens for the entire duration they are valid. To ensure SSLVPN accepts the token for longer
durations, you need to configure the remote authentication timeout setting accordingly.
SSL VPN waits for a maximum of five minutes for a valid token code to be provided before closing down the connection,
even if the token code is valid for longer.
The remoteauthtimout setting shows how long SSL VPN waits not only for a valid token to
be provided before closing down the connection, but also for other remote authentication like
LDAP, RADIUS, and so on.
Failed log in attempts can indicate malicious attempts to gain access to your network. To prevent this security risk, you
can limit the number of failed log in attempts. After the configured maximum number of failed log in attempts is reached,
access to the account is blocked for the configured lockout period.
This example sets the lockout period to five minutes (300 seconds).
config user setting
set auth-lockout-duration 300
end
PKI
The following topics include information about public key infrastructure (PKI):
l Configuring a PKI user on page 1816
l SSL VPN with certificate authentication on page 1586
l SSL VPN with LDAP-integrated certificate authentication on page 1591
PKI users are users who are identified by a digital certificate they hold. Defining a PKI user in FortiOS specifies:
l Which CA certificate to use to validate the user’s certificate
l The field and value of the user’s certificate that FortiOS will check to verify a user
These peer users can then be used in a FortiGate user group, or as a peer certificate group used for IPsec VPN
configurations that accept RSA certificate authentication.
The following certificate demonstrates which FortiGate settings can be used to match on different fields.
Subject:
Certification path:
To configure a PKI user:
ca <string> Specify which certificate on the FortiGate is used to validate the client’s certificate.
This can be any CA in the client’s certificate chain. You may need to upload a CA
certificate to the FortiGate specifically to identify PKI peer users (see Uploading a
certificate using the GUI on page 2044).
mandatory-ca-verify Control the action if the CA certificate used to sign the client’s certificate is not
{enable | disable} installed on the FortiGate (default = enable). Disabling this setting makes the
FortiGate consider any certificate presented by the peer as valid.
In the example certificate, the certification path shows that VF_CA signed
jcarrey’s certificate.
subject <string> Enter the peer certificate name constraints.
cn <string> Enter the peer certificate common name.
cn-type {string | email | Set the peer certificate common name type: string, email, FQDN, IPv4 address, or
FQDN | ipv4 | ipv6} IPv6 address. See CN on page 1819 for more details.
ldap-server <string> Enter the name of an LDAP server defined under config user ldap for
performing client access rights checks. See LDAP servers on page 1725 for more
details.
ldap-mode {password | Set the mode for LDAP peer authentication, either by password or principal name
principal-name} (default = password). See LDAP on page 1820 for more details.
ldap-username <string> Enter the username for the LDAP server bind when the LDAP mode is password.
ldap-password <string> Enter the password for the LDAP server bind when the LDAP mode is password.
When the client’s certificate is valid, or mandatory-ca-verify is disabled, the FortiGate can then inspect the
certificate to check specific fields for matching values. There are three ways of specifying which certificate field to
verify: by subject, CN, or LDAP. All string comparisons are case sensitive.
Subject
This basic method verifies that the subject string defined in the PKI user setting matches a value or substring in the
subject field of the user certificate. Further matching is controlled in the following VPN certificate settings.
config vpn certificate setting
set subject-match {substring | value}
set subject-set {superset | subset}
set cn-match {substring | value}
set cn-allow-multi {enable | disable}
end
subject-match {substring Control how to do relative distinguished name (RDN) value matching with the
| value} certificate subject name:
l substring: find a match if any string in the certificate subject name matches
an exact match with the name being searched for (such as set subject
"OU=TAC" or set subject "C=CA, CN=jcarrey, OU=TAC").
set subject-set {superset Control how to do RDN value matching with the certificate subject name:
| subset} l superset: a certificate only passes verification if it contains all the RDNs
CN
Common name (CN) certificate verification compares the CN in the subject field with the configured string (such as set
cn "jcarrey". The following logic is used when configuring different CN types:
Type Action
string Based on the cn-match setting, perform a substring or exact match in the
certificate subject.
email Look for a match in the certificate subject.
FQDN Look for a match in the certificate subject, then compare the mapped IP and client
IP. The FQDN is only retrieved from the CN.
Type Action
ipv4 Look for a match in the certificate subject, then compare the IP.
ipv6 Look for a match in the certificate subject, then compare the IP.
The CN type also controls the format checking of the CN string. In this example, if the CN type is set to email, the CN
must be in email format (set cn "[email protected]").
LDAP
LDAP-integrated user authentication allows the FortiGate to check the connecting user against an LDAP server in two
ways: through a username and password, or the certificate’s principal name. The password method requires the
username and password of each authenticating user to be entered, so it is not recommended when configuring
PKI users. The principal-name method is recommended.
The UPN in the user certificate’s Subject Alternative Name field is used to look up the user in the LDAP directory. If a
match is found, then authentication succeeds. This type of configuration scales well since only one PKI user needs to be
created on the FortiGate. Connecting clients use their unique user certificate to match within the configured LDAP
server.
In this example, a Windows network is connected to the FortiGate on port 2, and another LAN, Network_1, is connected
on port 3.
All Windows network users authenticate when they log on to their network. Engineering and Sales groups members can
access the Internet without reentering their authentication credentials. The example assumes that you have already
installed and configured FSSO on the domain controller.
LAN users who belong to the Internet_users group can access the Internet after entering their username and password.
The example shows two users: User1, authenticated by a password stored in FortiOS; and User 2, authenticated on an
external authentication server. Both users are local users since you create the user accounts in FortiOS.
1. Create a locally authenticated user account.
2. Create a RADIUS-authenticated user account.
3. Create an FSSO user group.
4. Create a firewall user group.
1. Go to User & Authentication > User Definition and click Create New.
2. Configure the following settings:
Password hardtoguess1@@1
3. Click Submit.
You must first configure FortiOS to access the external authentication server, then create the user account.
1. Go to User & Authentication > RADIUS Servers and click Create New.
2. Configure the following settings:
Name OurRADIUSsrv
Primary Server
IP/Name 10.11.101.15
Secret OurSecret
3. Click OK.
4. Go to User & Authentication > User Definition and click Create New.
6. Click Submit.
This example assumes that you have already set up FSSO on the Windows network and that it used advanced mode,
meaning that it uses LDAP to access user group information. You must do the following:
l Configure LDAP access to the Windows AD global catalog
l Specify the collector agent that sends user log in information to FortiOS
l Select Windows user groups to monitor
l Select and add the Engineering and Sales groups to an FSSO user group
Name ADserver
Username cn=FSSO_Admin,cn=users,dc=office,dc=example,dc=com
Name Enter the Windows AD server name. This name appears in the Windows
AD server list when you create user groups. In this example, the name is
WinGroups.
Server IP/Name Enter the IP address or name of the server where the agent is installed.
The maximum name length is 63 characters. In this example, the IP
address is 10.11.101.160.
Password Enter the password of the server where the agent is installed. You only
need to enter a password for the collector agent if you configured the agent
to require authenticated access.
If the TCP port used for FSSO is not the default, 8000, you can run the
config user fsso command to change the setting in the CLI.
LDAP Server Select the previously configured LDAP server. In this example, it is
ADserver.
d. Click OK.
3. Create the FSSO_Internet_users user group:
a. Go to User & Authentication > User Groups and click Create New.
b. Configure the following settings:
Name FSSO_Internet_users
c. Click OK.
This example shows a firewall user group with only two users. You can add additional members.
1. Go to User & Authentication > User Groups and click Create New.
2. Configure the following settings:
Name Internet_users
Type Firewall
3. Click OK.
Name Internal_net
Type Subnet
IP/Netmask 10.11.102.0/24
Interface Port 3
4. Click OK.
5. Create another new address by repeating steps 2-4 using the following settings:
Name Windows_net
Type Subnet
IP/Netmask 10.11.101.0/24
Interface Port 2
You must create two security policies: one for the firewall group connecting through port 3, and one for the FSSO group
connecting through port 2.
Schedule always
Service ALL
NAT Enabled.
4. Click OK.
5. Create another new policy by repeating steps 2-4 using the following settings:
Schedule always
Service ALL
NAT Enabled.
6. Click OK.
FSSO
FortiOS can provide single sign-on capabilities to Windows AD, Citrix, VMware Horizon, Novell eDirectory, and Microsoft
Exchange users with the help of agent software installed on these networks. The agent software sends information
about user logons to the FortiGate unit. With user information such as IP address and user group memberships from the
network, FortiGate security policies can allow authenticated network access to users who belong to the appropriate user
groups without requesting their credentials again.
Fortinet Single Sign-On (FSSO), through agents installed on the network, monitors user logons and passes that
information to the FortiGate unit. When a user logs on at a workstation in a monitored domain, FSSO:
l Detects the logon event and records the workstation name, domain, and user,
l Resolves the workstation name to an IP address,
l Determines which user groups the user belongs to,
l Sends the user logon information, including IP address and groups list, to the FortiGate unit, and
l Creates one or more log entries on the FortiGate unit for this logon event as appropriate.
When the user tries to access network resources, the FortiGate unit selects the appropriate security policy for the
destination. If the user belongs to one of the permitted user groups associated with that policy then the connection is
allowed, otherwise the connection is denied.
Agent-based FSSO
The Domain Controller (DC) agent must be installed on every domain controller when you use DC Agent mode. The DC
agents monitor user logon events and pass the information to the Collector agent, which stores the information and
sends it to the FortiGate unit.
eDirectory agent
The eDirectory agent is installed on a Novell network to monitor user logons and send the required information to the
FortiGate unit. It functions much like the Collector agent on a Windows AD domain controller. The agent can obtain
information from the Novell eDirectory using either the Novell API or LDAP.
The Terminal Server (TS) agent can be installed on a Citrix, VMware Horizon 7.4, or Windows Terminal Server to
monitor user logons in real time. It functions much like the DC Agent on a Windows AD domain controller.
Collector agent
The Collector Agent (CA) is installed as a service on a server in the Windows AD network to monitor user logons and
send the required information to the FortiGate unit. The Collector agent can collect information from a DC agent
(Windows AD) and TS agent (Citrix or VMware Horizon Terminal Server).
In a Windows AD network, the Collector agent can optionally obtain logon information by polling the AD domain
controllers. In this case, DC agents are not needed.
The CA is responsible for DNS lookups, group verification, workstation checks, and updating FortiGates on logon
records. The FSSO CA sends Domain Local Security Group and Global Security Group information to FortiGate units.
The CA communicates with the FortiGate over TCP port 8000 and it listens on UDP port 8002 for updates from the DC
agents.
The FortiGate device can have up to five CAs configured for redundancy. If the first CA on the list is unreachable, the
next is attempted, and so on down the list until one is contacted.
All DC agents must point to the correct CA port number and IP address on domains with multiple DCs.
A FortiAuthenticator device can act much like a CA, collecting Windows AD user logon
information and sending it to the FortiGate device. It is particularly useful in large installations
with several FortiGate units. For more information, see the FortiAuthenticator Administration
Guide.
Agentless FSSO
For Windows AD networks, FortiGate devices can also provide SSO capability by directly polling Windows Security
Event log entries on Windows DC for user log in information. This configuration does not require a CA or DC agent.
FortiGate configuration
This topic gives an example of configuring a local FSSO agent on the FortiGate. The agent actively pools Windows
Security Event log entries on Windows Domain Controller (DC) for user log in information. The FSSO user groups can
then be used in a firewall policy.
This method does not require any additional software components, and all the configuration can be done on the
FortiGate.
Refer to Configuring an LDAP server on page 1725. The connection must be successful before configuring the FSSO
polling connector.
l The Local FSSO Agent is the backend process that is automatically created when the first FSSO polling
connector is created.
l The Active Directory Connector is the front end connector that can be configured by FortiGate administrators.
To verify the configuration, hover the cursor over the top right corner of the connector; a popup window will show the
currently selected groups. A successful connection is also shown by a green up arrow in the lower right corner of the
connector.
If you need to get log in information from multiple DCs, then you must configure other Active Directory connectors
for each additional DC to be monitored.
FSSO groups can be used in a policy by either adding them to the policy directly, or by adding them to a local user group
and then adding the group to a policy.
1. Go to User & Authentication > User Groups and click Create New.
2. Enter a name for the group in the Name field.
3. Set the Type to Fortinet Single Sign-On (FSSO).
4. In the Members field, click the + and add the FSSO groups.
5. Click OK.
6. Add the local FSSO group to a policy.
1. Go to Policy & Objects > Firewall Policy and click Create New.
2. In the Source field, click the +. In the Select Entries pane, select the User tab.
3. Select the FSSO groups.
4. Configure the remaining settings as required.
5. Click OK.
Troubleshooting
If an authenticated AD user cannot access the internet or pass the firewall policy, verify the local FSSO
user list:
l The user's workstation is unable to connect to the DC, and is currently logged in with cached credentials, so
If the polling frequency shows successes and failures, that indicates sporadic network problems or a very busy
DC. If it indicates no successes or failures, then incorrect credentials could be the issue.
If the LDAP status is connected, then the FortiGate can access the configured LDAP server. This is required for
AD group membership lookup of authenticated users because the Windows Security Event log does not
include group membership information. The FortiGate sends an LDAP search for group membership of
authenticated users to the configure LDAP server.
FortiGate adds authenticated users to the local FSSO user list only if the group membership is one of the
groups in Group Filter.
4. If necessary, capture the output of the local FortiGate daemon that polls Windows Security Event logs:
# diagnose debug application fssod -1
This output contains a lot of detailed information which can be captured to a text file.
Limitations
This example describes how to configure Fortinet Single Sign-On (FSSO) agent on Windows using syslog as the source
and a custom syslog matching rule.
The FSSO collector agent must be build 0291 or later, and in advanced mode (see How to switch FSSO operation mode
from Standard Mode to Advanced Mode).
Trigger 722051
c. To test the rule, enter a sample log line, then click Test.
d. Click OK.
8. Create a new syslog source:
a. On the Advanced Settings window, click Add.
b. Configure the source:
Name VPN-Connection
IP Address 192.168.100.12
User Type External: Users are not defined on the CA and user groups come from the
source.
Remote User: Users are defined on a remote LDAP server and user
groups are retrieved from the specified LDAP server. Any group from the
syslog messages are ignored. See Connect to a remote LDAP server on
page 1833.
c. Click OK.
9. Click OK.
This section describes how to connect to a remote LDAP server to match the user identity from the syslog server with an
LDAP server.
6. Click OK.
7. Select the syslog source and click Edit.
8. Set User Type to Remote User, and select the LDAP server from the drop-down list.
9. Click OK.
Configuring the FSSO timeout when the collector agent connection fails
The logon-timeout option is used to manage how long authenticated FSSO users on the FortiGate will remain on the
list of authenticated FSSO users when a network connection to the collector agent is lost.
config user fsso
edit <name>
set server <string>
logon-timeout <integer> Enter the interval to keep logons after the FSSO server is down, in minutes (1 -
2880, default = 5).
Example
4. After about three minutes, check that the FSSO user is still in the list of authenticated users and can connect to the
internet:
# diagnose firewall auth l
10.1.100.188, TEST1
type: fsso, id: 0, duration: 229, idled: 229
server: ad
packets: in 0 out 0, bytes: in 0 out 0
user_id: 16777219
group_id: 3 33554433
group_name: ad CN=GROUP1,OU=TESTING,DC=FORTINET-FSSO,DC=COM
5. After four minutes, check the debugs again. Note that the FSSO users are cleared:
...
2021-06-10 16:24:57 authd_timer_run: 3 expired
2021-06-10 16:24:57 authd_epoll_work: timeout 60000
2021-06-10 16:24:59 [fsae_db_logoff:248]: vfid 0, ip 10.1.100.188, id(0), port_range_sz
(0)
2021-06-10 16:24:59 [authd_fp_notify_logoff:444]: vfid 0, ip 10.1.100.188, id 0
2021-06-10 16:24:59 [authd_fp_on_user_logoff:412]: vfid 0, ip 10.1.100.188
2021-06-10 16:24:59 [authd_fp_on_user_logoff:412]: vfid 0, ip 10.1.100.188
2021-06-10 16:24:59 [authd_fp_on_user_logoff:412]: vfid 0, ip 10.1.100.188
2021-06-10 16:24:59 [authd_fpc_on_msg:545]: code 0, type 132, len 28 seq 0
2021-06-10 16:24:59 [authd_fp_on_user_logoff:412]: vfid 0, ip 10.1.100.188
2021-06-10 16:24:59 authd_epoll_work: timeout 21990
# diagnose firewall auth l
After the connection to the collector agent is restored, all users remain in the list of authenticated users and are
synchronized to the FortiGate. The users do not need to log in again for authentication.
Usernames can be included in logs, instead of just IP addresses. The benefits of doing this include:
l FortiOS monitors and FortiAnalyzer reports display usernames instead of IP addresses, allowing you to quickly
determine who the information pertains to. Without the usernames, it is difficult to correlate the IP addresses with
specific users.
l User activity can be correlated across multiple IP addresses.
For example, if DHCP is used a user might receive different IP addresses every day, making it difficult to track a
specific user by specifying an IP address as the match criterion.
In this example, a collector agent (CA) is installed on a Windows machine to poll a domain controller (DC) agent
(seeFSSO on page 1826 for more information). On the FortiGate, an external connector to the CA is configured to
receives user groups from the DC agent. The received group or groups are used in a policy, and some examples of the
usernames in logs, monitors, and reports are shown.
6. Click Install.
7. After the FSSO Agent installs, run Install DC Agent.
8. Update the Collector Agent IP address and listening port as needed, then click Next.
11. After the DC agent mode installation finishes, Reboot the DC to complete the setup.
3. Click Set Group Filters, and create a default group filter to limit the groups that are sent to the FortiGate.
4. Click Save&close.
Create an external connector to the FSSO agent to receive the AD user groups. Add the user group or groups as the
source in a firewall policy to include usernames in traffic logs. Enable security profiles, such as web filter or antivirus, in
the policy to include the usernames in UTM logs.
Event logs include usernames when the log is created for a user action or interaction, such as logging in or an SSL VPN
connection.
4. Click OK
The connector shows a green arrow when the connection is established, and a number in the top right indicating the
number of AD groups received from the DC agent. Edit the connector to view the user groups.
To configure a policy with an imported user group and web filter in the GUI:
d. Click Close.
4. Under Security Profiles, enable Web Filter and select a profile that monitors or blocks traffic, such as the monitor-all
profile. See Web filter on page 1058 for information.
5. Click OK.
To configure a policy with an imported user group and web filter in the CLI:
For more information about logs, see the FortiOS Log Message Reference.
Traffic logs:
UTM log:
Event log:
FortiOS monitors:
The FortiView Web Sites by Bytes monitor shows a list of visited websites. Double click a specific domain (or manually
create a filter), such as microsoft.com, to see a breakdown of the usernames and IP addresses that visited that domain.
See Monitors on page 101 for more information.
FortiAnalyzer reports:
The User Detailed Browsing Log report require a username or IP address to run. If a username is used, the report
includes logs related to that user regardless of their IP address. For example, the following report show two source
IP addresses:
The Web Usage report includes all usernames and IP addresses that match the specified conditions, like most visited
categories.
Use the Switch Controller function, also known as FortiLink, to remotely manage FortiSwitch units. In the commonly-
used layer 2 scenario, the FortiGate that is acting as a switch controller is connected to distribution FortiSwitch units. The
distribution FortiSwitch units are in the top tier of stacks of FortiSwitch units and connected downwards with Convergent
or Access layer FortiSwitch units. To leverage CAPWAP and the Fortinet proprietary FortiLink protocol, set up data and
control planes between the FortiGate and FortiSwitch units.
FortiLink allows administrators to create and manage different VLANs, and apply the full-fledged security functions of
FortiOS to them, such as 802.1X authentication and firewall policies. Most of the security control capabilities on the
FortiGate are extended to the edge of the entire network, combining FortiGate, FortiSwitch, and FortiAP devices, and
providing secure, seamless, and unified access control to users.
See FortiSwitch devices managed by FortiOS.
This topic contains information about FortiGate administration and system configuration that you can do after installing
the FortiGate in your network.
Administrators
By default, FortiGate has an administrator account with the username admin and no password. See Administrators on
page 1850 for more information.
Administrator profiles
An administrator profile defines what the administrator can see and do on the FortiGate. See Administrator profiles on
page 1850 for more information.
Password policy
Set up a password policy to enforce password criteria and change frequency. See Password policy on page 1855 for
more information.
Interfaces
Physical and virtual interface allow traffic to flow between internal networks, and between the internet and internal
networks. See Interfaces on page 130 for more information.
SNMP
The simple network management protocol (SNMP) allows you to monitor hardware on your network. See SNMP on page
2012 for more information.
DHCP server
You can configure one or more DHCP servers on any FortiGate interface. See DHCP server on page 286 for more
information.
VDOM
You can use virtual domains (VDOMs) to divide a FortiGate into multiple virtual devices that function independently. See
Virtual Domains on page 1893 for more information.
High availability
You can configure multiple FortiGate devices, including private and public cloud VMs, in HA mode. See High Availability
on page 1919 for more information.
Certificates
You can manage certificates on the FortiGate. See Certificates on page 2043 for more information.
Operating modes
A FortiGate or VDOM (in multi-vdom mode) can operate in either NAT/route mode or transparent mode.
NAT/route mode
The FortiGate or VDOM is installed as a gateway or router between multiple networks, such as a private network and the
internet. One function of NAT/route mode is to allow the FortiGate to hide the IP addresses on the private network using
NAT. NAT/route mode can also be used to connect to multiple ISPs in an SD-WAN setup, and to route traffic between
different networks. .
By default, new VDOMs are set to NAT/route operation mode.
See NAT mode on page 1902 for more information.
Transparent mode
The FortiGate or VDOM operates in layer 2 to forward traffic between network devices such as routers, firewalls, and
switches. For example. it can be installed inline between a router and a switch to perform security scanning without
changing the network topology or modifying the IP addresses. When you add a FortiGate that is in transparent mode to a
network, it only needs to be provided with a management IP address in order to access the device. It is recommended
that a dedicated interface is used to connect to the management network in transparent mode.
The following topology is an example of a transparent mode FortiGate inserted inline between a router and a switch:
Using transparent mode VDOMs is recommended when multiple VLANs pass through the
FortiGate. Otherwise, they must be separated into different forwarding domains within the
same VDOM.
See NAT and transparent mode on page 1911 for more information.
Changing modes
The following is a sample configuration for changing from NAT/route operation mode to transparent operation mode in
the CLI:
config system settings
set opmode transparent
set manageip <IP_address>
set gateway <gateway_address>
end
The gateway setting is optional. However, once the operation mode is changed from
NAT/route to transparent, the gateway configuration is found under the static router settings:
config router static
edit <seq-num>
set gateway <IP_address>
next
end
The following is a sample configuration for changing from transparent operation to NAT/route operation mode in the CLI:
config system settings
set opmode nat
set ip <IP_address>
set device <interface>
set gateway <gateway_address>
end
The IP and device settings are mandatory. Once the operation mode is changed from
transparent to NAT/route, the IP address configuration is found under the corresponding
interface settings:
config system interface
edit <interface>
set ip <IP_address>
next
end
The gateway setting is optional. However, once the operation mode is changed, the gateway
configuration is found under the static router settings:
config router static
edit <seq-num>
set gateway <IP_address>
device <interface>
next
end
Administrators
By default, FortiGate has an administrator account with the username admin and no password. To prevent unauthorized
access to the FortiGate, this account must be protected with a password. Additional administrators can be added for
various functions, each with a unique username, password, and set of access privileges.
The following topics provide information about administrators:
l Administrator profiles on page 1850
l Add a local administrator on page 1852
l Remote authentication for administrators on page 1853
l Password policy on page 1855
l Associating a FortiToken to an administrator account on page 1857
l REST API administrator on page 1857
l SSO administrators on page 1859
l FortiGate administrator log in using FortiCloud single sign-on on page 1859
Administrator profiles
Administrator profiles define what the administrator can do when logged into the FortiGate. When you set up an
administrator account, you also assign an administrator profile which dictates what the administrator sees. Depending
on the nature of the administrator’s work, access level or seniority, you can allow them to view and configure as much or
as little as is required. Access to CLI diagnose commands can also be disabled for global and VDOM level
administrators.
By default, the FortiGate has an admin administrator account that uses the super_admin profile.
super_admin profile
This profile has access to all components of FortiOS, including the ability to add and remove other system
administrators. For certain administrative functions, such as backing up and restoring the configuration, super_admin
access is required. To ensure that there is always a method to administer the FortiGate, the super_admin profile cannot
be deleted or modified.
The super_admin profile is used by the default admin account. It is recommended that you add a password and rename
this account once you have set up your FortiGate. In order to rename the default account, a second admin account is
required.
l Access permissions
3. Click OK.
Edit profiles
Delete profiles
By default, FortiGate has one super admin named admin. You can create more administrator accounts with different
privileges.
Do not use the characters < > ( ) # " ' in the administrator username.
Using these characters in an administrator username might have a cross site scripting
(XSS) vulnerability.
Administrators can use remote authentication, such as LDAP, to connect to the FortiGate.
Setting up remote authentication for administrators includes the following steps:
1. Configuring the LDAP server on page 1853
2. Adding the LDAP server to a user group on page 1853
3. Configuring the administrator account on page 1854
1. Go to User & Authentication > LDAP Servers and click Create New.
2. Enter the server Name and Server IP/Name.
3. Enter the Common Name Identifier and Distinguished Name.
4. Set the Bind Type to Regular and enter the Username and Password.
5. Click OK.
After configuring the LDAP server, create a user group that includes that LDAP server.
1. Go to User & Authentication > User Groups and click Create New.
2. Enter a Name for the group.
3. In the Remote groups section, select Create New.
4. Select the Remote Server from the dropdown list.
5. Click OK.
After configuring the LDAP server and adding it to a user group, create a new administrator. For this administrator,
instead of entering a password, use the new user group for authentication.
The Match all users in a remote server group option acts as a wildcard for matching any users
against the remote server group. The Match a user on a remote server group option only
matches the username defined to match against the remote server group, which is the
equivalent of using set wildcard disable.
Administrator accounts can use different methods for authentication, including RADIUS, TACACS+, and PKI.
Restricting logins from local administrator accounts when remote servers are available
There is an optional setting that restricts logins from local administrator accounts when remote servers are available.
This is disabled by default, but can be enabled globally. This option only works when all configured remote servers are
down.
Password policy
Brute force password software can launch more than just dictionary attacks. It can discover common passwords where a
letter is replaced by a number. For example, if p4ssw0rd is used as a password, it can be cracked.
Using secure passwords is vital for preventing unauthorized access to your FortiGate. When changing the password,
consider the following to ensure better security:
l Do not use passwords that are obvious, such as the company name, administrator names, or other obvious words
or phrases.
l Use numbers in place of letters, for example: passw0rd.
l Administrator passwords can be up to 64 characters.
l Include a mixture of numbers, symbols, and upper and lower case letters.
l Use multiple words together, or possibly even a sentence, for example: correcthorsebatterystaple.
l Use a password generator.
l Change the password regularly and always make the new password unique and not a variation of the existing
password. for example, do not change from password to password1.
l Make note of the password and store it in a safe place away from the management computer, in case you forget it;
or ensure at least two people know the password in the event one person becomes unavailable. Alternatively, have
two different admin logins.
FortiGate allows you to create a password policy for administrators and IPsec pre-shared keys. With this policy, you can
enforce regular changes and specific criteria for a password policy, including:
l The minimum length, between 8 and 64 characters.
l If the password must contain uppercase (A, B, C) and/or lowercase (a, b, c) characters.
l If the password must contain numbers (1, 2, 3).
l If the password must contain special or non-alphanumeric characters: !, @, #, $, %, ^, &, *, (, and )
l Where the password applies (admin or IPsec or both).
l The duration of the password before a new one must be specified.
l The minimum number of unique characters that a new password must include.
If you add a password policy or change the requirements on an existing policy, the next time that administrator logs into
the FortiGate, the administrator is prompted to update the password to meet the new requirements before proceeding to
log in.
For information about setting passwords, see Default administrator password on page 1873.
4. Click Apply.
1. Ensure that you have successfully added your FortiToken serial number to FortiOS and that its status is Available.
2. Go to System > Administrators. Edit the admin account. This example assumes that the account is fully configured
except for two-factor authentication.
3. Enable Two-factor Authentication and for Authentication Type, select FortiToken.
4. From the Token dropdown list, select the desired FortiToken serial number.
5. In the Email Address field, enter the administrator's email address.
6. Click OK.
For a mobile token, click Send Activation Code to send the activation code to the configured
email address. The admin uses this code to activate their mobile token. You must have
configured an email service in System > Settings to send the activation code.
The fortitoken keyword is not visible until you select fortitoken for the two-factor option.
Before you can use a new FortiToken, you may need to synchronize it due to clock drift.
REST API administrator accounts are used for automated configuration, backup creation, and monitoring of the
FortiGate.
For more information about the REST API, see the Fortinet Development Network (FNDN). Note that an account is
required to access the FNDN.
Administrator Profile Where permissions for the REST API administrator are defined.
A REST API administrator should have the minimum permissions required to
complete the request.
PKI Group Certificate matching is supported as an extra layer of security. Both the client
certificate and token must match to be granted access to the API.
CORS Allow Origin Cross Origin Resource Sharing (CORS) allows third-party web apps to make
API requests to the FortiGate using the token.
Trusted Hosts The following can be used to restrict access to FortiGate API:
l Multiple trusted hosts/subnets can be configured
4. Click OK.
An API token is generated. Make note of the token, as it is only shown once.
By default, The SSO administrator account can only be assigned the admin_no_access or
super_admin_readonly profile. You can define a new administrator profile with the required
permissions for the account. For example, you could use a specific API user to query the
FortiGate for just their own status. In that case, the profile would be configured as read-only.
SSO administrators
SSO administrators are automatically created when the FortiGate acts as a SAML service provider (SP) with SAML
Single Sign-On enabled in the Security Fabric settings.
On the system login page, an administrator can log in with their username and password against the root FortiGate
acting as the identity provider (IdP) in the Security Fabric. After the first successful log in, this user is added to the
administrators table (System > Administrators under Single Sign-On Administrator). The default profile selected is based
on the SP settings (Default admin profile). See Configuring a downstream FortiGate as an SP on page 2205 for more
information.
SSO administrators can be manually configured in FortiOS.
By default, the FortiGate is configured to allow administrators to log in using FortiCloud single sign-on. Both IAM and
non-IAM users on the FortiCloud support portal are supported. Non-IAM users must be the FortiCloud account that the
FortiGate is registered to.
3. See Adding an IAM user in the FortiCloud Identity & Access Management (IAM) guide for more information. The
Portal Permissions for SupportSite, IAMPortal, and FortiOS SSO must be configured to allow portal access for
administrators.
You are logged in to the FortiOS GUI. The SSO username is shown in the top right corner of the GUI.
Firmware
Fortinet periodically updates the FortiGate firmware to include new features and resolve important issues. After you have
registered your FortiGate unit, firmware updates can be downloaded from the Fortinet Customer Service & Support
website.
Always back up the current configuration before installing new firmware. See Configuration
backups on page 59.
Before you install any new firmware, follow the below steps:
1. Understand the maturity level of the current and target firmware releases to help you determine whether to upgrade.
See Firmware maturity levels on page 1862.
2. Review the Release Notes for a new firmware release.
3. Review the Supported Upgrade Paths.
4. Download a copy of the currently installed firmware, in case you need to revert to it. See Downloading a firmware
image on page 1864 and Downgrading to a previous firmware version on page 1869 for details.
5. Have a plan in place in case there is a critical failure, such as the FortiGate not coming back online after the update.
This could include having console access to the device (Connecting to the CLI on page 28), ensuring that you TFTP
server is working (Installing firmware from system reboot on page 1870), and preparing a USB drive (Restoring from
a USB drive on page 1872).
6. Backup the current configuration, including local certificates. The upgrade process prompts you to back up the
current configuration. See also Configuration backups on page 59 for details.
7. Test the new firmware until you are satisfied that it applies to your configuration. See Testing a firmware version on
page 1867 and Controlled upgrade on page 1872 for details.
Installing new firmware without reviewing release notes or testing the firmware may result in changes to settings and
unexpected issues.
Only FortiGate admin users and administrators whose access profiles contain system read
and write privileges can change the FortiGate firmware.
Released FortiOS 7.0.6 and later firmware images use tags to indicate the following maturity levels:
l The Feature tag indicates that the firmware release includes new features.
l The Mature tag indicates that the firmware release includes no new, major features. Mature firmware contains bug
fixes and vulnerability patches where applicable.
Administrators can use the tags to identify the maturity level of the current firmware in the GUI or CLI.
Administrators can view the maturity level of each firmware image that is available for upgrade on the Firmware page
and the Fabric Management page. When upgrading FortiGates from mature firmware to feature firmware, a warning
message is displayed. See also Upgrading the firmware on page 1868 and Fabric Management page on page 2169.
To demonstrate the functionality of this feature, this example uses FortiGates that are running
fictitious build numbers.
l Go to System > Fabric Management. The Firmware Version column displays the version with build number and
either (Mature) or (Feature) for FortiOS 7.0.6 or later.
2. Check the maturity level of firmware images that are available for upgrade:
l Go to System > Firmware, and click Latest or All Upgrades. The Firmware Management pane is displayed. A
gray box around the version number and the label Feature identifies feature firmware version. A green box
around the version with the label Mature identifies a mature firmware version.
The following is an example of firmware with the Feature tag:
l Go to System > Fabric Management, select a device, and click Upgrade. The Firmware Management pane is
displayed.
The following is an example of firmware with the Feature tag on the All Upgrades tab:
In this example, the Version field includes .F to indicate that the maturity level is feature.
# get system status
Version: FortiGate-301E v7.0.7,build0391,220929 (GA.M)
...
In this example, the Version field includes .M to indicate that the maturity level is mature.
FortiGates with a firmware upgrade license that are connected to FortiGuard display upgrade notifications in the setup
window, banner, and FortiGuard menu. The firmware notifications are enabled by default.
1. When you log in to FortiGate, the FortiGate Setup window includes an Upgrade firmware step. Click Begin.
2. Follow the steps in the Setup Progress, then click Review Firmware Upgrade.
Firmware images for all FortiGate units are available on the Fortinet Customer Service & Support website.
To download firmware:
1. Log into the support site with your user name and password.
2. Go to Support > Firmware Download.
A list of Release Notes is shown. If you have not already done so, download and review the Release Notes for the
firmware version that you are upgrading your FortiGate unit to.
3. Select the Download tab.
4. Navigate to the folder for the firmware version that you are upgrading to.
5. Find your device model on the list. FortiWiFi devices have file names that start with FWF.
6. Click HTTPS in the far right column to download the firmware image to your computer.
Firmware can also be downloaded using FTP, but as FTP is not an encrypted file transferring
protocol, HTTPS downloading is recommended.
Official FortiOS firmware images are signed by the Fortinet CA. The BIOS checks the validity of an image when it is
uploaded to the device. If the image is not signed by the Fortinet CA, warning messages appear in the GUI in several
locations and in the CLI when the uploaded firmware fails the signature validation.
Banner:
The integrity of firmware images downloaded from Fortinet's support portal can be verified using a file checksum. A file
checksum that does not match the expected value indicates a corrupt file. The corruption could be caused by errors in
transfer or by file modification. A list of expected checksum values for each build of released code is available on
Fortinet’s support portal.
Image integrity is also verified when the FortiGate is booting up. This integrity check is done through a cyclic redundancy
check (CRC). If the CRC fails, the FortiGate unit will encounter an error during the boot process.
Firmware images are signed and the signature is attached to the code as it is built. When upgrading an image, the
running OS will generate a signature and compare it with the signature attached to the image. If the signatures do not
match, the new OS will not load.
FortiOS lets you test a new firmware image by installing the firmware image from a system reboot and saving it to system
memory. After completing this procedure, the FortiGate unit operates using the new firmware image with the current
configuration. The new firmware image is not permanently installed. The next time the FortiGate unit restarts, it operates
with the originally installed firmware image using the current configuration. If the new firmware image operates
successfully, you can install it permanently using the procedure explained in Upgrading the firmware.
For this procedure, you must install a TFTP server that you can connect to from the FortiGate internal interface. The
TFTP server should be on the same subnet as the internal interface.
1. Connect to the CLI using an RJ-45 to USB (or DB-9) or null modem cable.
2. Ensure that the TFTP server is running.
3. Copy the new firmware image file to the root directory on the TFTP server.
4. Ensure that the FortiGate unit can connect to the TFTP server using the execute ping command.
5. Restart the FortiGate unit: execute reboot. The following message is shown:
This operation will reboot the system!
Do you want to continue? (y/n)
6. Type y. As the FortiGate unit starts, a series of system startup messages appears.
7. When the following messages appears:
Press any key to display configuration menu..........
Immediately press any key to interrupt the system startup.
You have only three seconds to press any key. If you do not press a key during this time, the FortiGate will reboot,
and you will have to log in and repeat the execute reboot command.
If you successfully interrupt the startup process, the following messages appears:
[G]: Get firmware image from TFTP server.
[F]: Format boot device.
[B]: Boot with backup firmware and set as default
[C]: Configuration and information
[Q]: Quit menu and continue to boot with default firmware.
[H]: Display this list of options.
Enter G, F, Q, or H:
8. Type G to get the new firmware image from the TFTP server. The following message appears: Enter TFTP
server address [192.168.1.168]:
9. Type the address of the TFTP server, then press Enter. The following message appears: Enter Local Address
[192.168.1.188]:
10. Type the IP address of the FortiGate unit to connect to the TFTP server.
Installing a new firmware image replaces the current antivirus and attack definitions, along with the definitions included
with the firmware release that is being installing. After you install new firmware, make sure that the antivirus and attack
definitions are up to date.
4. Ping the TFTP server to ensure that the FortiGate can connect to it:
execute ping <tftp_ipv4>
5. Enter the following command to copy the firmware image from the TFTP server to the FortiGate unit:
execute restore image tftp <filename> <tftp_ipv4>
The FortiGate unit responds with the message:
This operation will replace the current firmware version!
Do you want to continue? (y/n)
6. Type y.
The FortiGate unit uploads the firmware image file, verifies the signature of the firmware image, and determines the
firmware maturity level.
When you are upgrading to a feature firmware image, you are asked to confirm whether to continue with the
upgrade.
When you proceed with the upgrade, the upgrade image is installed and FortiGate restarts. This process takes a
few minutes.
Please wait...
Connect to tftp server 172.16.200.55 ...
##############################################################################
Get image from tftp server OK.
Verifying the signature of the firmware image.
This procedure downgrades the FortiGate to a previous firmware version. The backup configuration might not be able to
be restored after downgrading.
All Downgrades Click the All Downgrades tab to view and select all firmware versions that are
available from FortiGuard for downgrade.
File Upload Click the File Upload tab to upload a firmware file that you previously
downloaded from the Fortinet Customer Service & Support website.
1. See Downloading a firmware image on page 1864.
4. Select a firmware image, and click Confirm and Backup Config. A warning message is displayed.
5. Click Continue to continue with the downgrade.
The FortiGate unit backs up the current configuration to the management computer, uploads the firmware image
file, downgrades to the firmware version, and restarts. This process takes a few minutes.
In the event that the firmware upgrade does not load properly and the FortiGate unit will not boot, or continuously
reboots, it is best to perform a fresh install of the firmware from a reboot using the CLI. If configured, the firmware can
also be automatically installed from a USB drive; see Restoring from a USB drive on page 1872 for details.
This procedure installs a firmware image and resets the FortiGate unit to factory default settings. You can use this
procedure to upgrade to a new firmware version, revert to an older firmware version, or re-install the current firmware.
To use this procedure, you must connect to the CLI using the FortiGate console port and a RJ-45 to USB (or DB-9), or
null modem cable. You must also install a TFTP server that you can connect to from the FortiGate internal interface. The
TFTP server should be on the same subnet as the internal interface.
Before beginning this procedure, ensure that you backup the FortiGate unit configuration. See Configuration backups on
page 59 for details. If you are reverting to a previous FortiOS version, you might not be able to restore the previous
configuration from the backup configuration file.
Installing firmware replaces your current antivirus and attack definitions, along with the definitions included with the
firmware release you are installing. After you install new firmware, make sure that antivirus and attack definitions are up
to date.
1. Connect to the CLI using the RJ-45 to USB (or DB-9) or null modem cable.
2. Ensure that the TFTP server is running.
3. Copy the new firmware image file to the root directory of the TFTP server.
4. Ensure that the FortiGate unit can connect to the TFTP server using the execute ping command.
5. Restart the FortiGate unit: execute reboot. The following message is shown:
This operation will reboot the system!
Do you want to continue? (y/n)
6. Type y. As the FortiGate unit starts, a series of system startup messages appears.
7. When the following messages appears:
Press any key to display configuration menu..........
Immediately press any key to interrupt the system startup.
You have only three seconds to press any key. If you do not press a key during this time, the FortiGate will reboot,
and you will have to log in and repeat the execute reboot command.
If you successfully interrupt the startup process, the following messages appears:
[C]: Configure TFTP parameters.
[R]: Review TFTP parameters.
[T]: Initiate TFTP firmware transfer.
[F]: Format boot device.
[I]: System information.
[B]: Boot with backup firmware and set as default.
[Q]: Quit menu and continue to boot.
[H]: Display this list of options.
Enter C,R,T,F,I,B,Q,or H:
8. If necessary, type C to configure the TFTP parameters, then type Q to return to the previous menu:
[P]: Set firmware download port.
[D]: Set DHCP mode.
[I]: Set local IP address.
[S]: Set local subnet mask.
[G]: Set local gateway.
[V]: Set local VLAN ID.
[T]: Set remote TFTP server IP address.
[F]: Set firmware file name.
[E]: Reset TFTP parameters to factory defaults.
[R]: Review TFTP parameters.
[N]: Diagnose networking(ping).
[Q]: Quit this menu.
[H]: Display this list of options.
Enter P,D,I,S,G,V,T,F,E,R,N,Q,or H:
9. Type T get the new firmware image from the TFTP server.
The FortiGate unit loads the firmware.
10. Save the firmware as the default (D) or backup (B) firmware image, or run the image without saving it (R).
The FortiGate unit installs the new firmware image and restarts. The installation might take a few minutes to
complete.
The FortiGate firmware can be manually restored from a USB drive, or installed automatically from a USB drive after a
reboot.
1. Copy the firmware file to the root directory on the USB drive.
2. Connect the USB drive to the USB port of the FortiGate device.
3. Connect to the FortiGate CLI using the RJ-45 to USB (or DB-9) or null modem cable.
4. Enter the following command:
execute restore image usb <filename>
The FortiGate unit responds with the following message:
This operation will replace the current firmware version! Do you want to continue?
(y/n)
5. Type y. The FortiGate unit restores the firmware and restarts. This process takes a few minutes.
6. Update the antivirus and attack definitions:
execute update-now
Controlled upgrade
Using a controlled upgrade, you can upload a new version of the FortiOS firmware to a separate partition in the FortiGate
memory for later upgrade. The FortiGate unit can be configured so that when it is rebooted, it will automatically load the
new firmware. Using this option, you can stage multiple FortiGate units to upgrade simultaneously using FortiManager or
a script.
To set the FortiGate unit so that when it reboots, the new firmware is loaded:
Settings
The default administrator password should be configured immediately after the FortiGate is installed, see Default
administrator password on page 1873.
After that, there are several system settings that should also be configured in System > Settings:
l Changing the host name on page 1875
l Setting the system time on page 1875
l Configuring ports on page 1879
l Setting the idle timeout time on page 1880
l Setting the password policy on page 1880
l Changing the view settings on page 1880
l Setting the administrator password retries and lockout time on page 1881
l TLS configuration on page 1881
l Controlling return path with auxiliary session on page 1882
l Email alerts on page 1886
l Using configuration save mode on page 1890
l Trusted platform module support on page 1891
By default, your FortiGate has an administrator account set up with the username admin and no password. In order to
prevent unauthorized access to the FortiGate, it is highly recommended that you add a password to this account.
6. Click OK.
It is also recommended that you change the user name of this account; however, since you
cannot change the user name of an account that is currently in use, a second administrator
account must be created in order to do this.
The FortiGate host name is shown in the Hostname field in the System Information widget on a dashboard, as the
command prompt in the CLI, as the SNMP system name, as the device name on FortiGate Cloud, and other places. If
the FortiGate is in an HA cluster, use a unique host name to distinguish it from the other devices in the cluster.
An administrator requires System > Configuration read/write access to edit the host name. See Administrator profiles on
page 1850 for details.
You can either manually set the FortiOS system time, or configure the device to automatically keep its system time
correct by synchronizing with a Network Time Protocol (NTP) or Precision Time Protocol (PTP) server.
Daylight savings time is enabled by default, and can only be configured in the CLI.
For many features to work, including scheduling, logging, and SSL-dependent features, the
FortiOS system time must be accurate.
Time Zone Select a time zone from the list. This should be the time zone that the
FortiGate is in.
NTP To use an NTP server other than FortiGuard, the CLI must be used.
In the Sync interval field, enter how often, in minutes, that the device
synchronizes its time with the NTP server.
Setup device as local NTP Enable to configure the FortiGate as a local NTP server. This option is not
server available if Set Time is PTP.
In the Listen on Interfaces field, set the interface or interfaces that the
FortiGate will listen for NTP requests on.
3. Click Apply.
2. Either manually configure the date and time, or configure an NTP or PTP server:
l Manual:
execute date <yyyy-mm-dd>
execute time <hh:mm:ss>
l NTP server:
config system ntp
set ntpsync enable
set type {fortiguard | custom}
set syncinterval <integer>
set source-ip <ip_address>
set source-ip6 <ip6_address>
set server-mode {enable | disable}
set interface <interface>
set authentication {enable | disable}
set key-type {MD5 | SHA1}
set key <password>
set key-id <integer>
config ntpserver
edit <server_id>
set server <ip_address or hostname>
set ntpv3 {enable | disable}
set authentication {enable | disable}
set interface-select-method {auto | sdwan | specify}
set key <password>
set key-id <integer>
next
end
end
l PTP server:
config system ptp
set status enable
set mode {multicast | hybrid}
SHA-1 authentication support allows the NTP client to verify that severs are known and trusted and not intruders
masquerading (accidentally or intentionally) as legitimate servers. In cryptography, SHA-1 is a cryptographic hash
algorithmic function.
SHA-1 authentication support is only available for NTP clients, not NTP servers.
Command Description
authentication <enable | Enable/disable MD5/SHA1 authentication (default = disable).
disable>
key <passwd> Key for MD5/SHA1 authentication. Enter a password value.
key-id <integer> Key ID for authentication. Enter an integer value from 0 to 4294967295.
PTPv2
Precision time protocol (PTP) is used to synchronize network clocks. It is best suited to situations where time accuracy is
of the utmost importance, as it supports accuracy in the sub-microsecond range. Conversely, NTP accuracy is in the
range of milliseconds or tens of milliseconds.
The following CLI commands are available:
config system ptp
set status {enable | disable}
set mode {multicast | hybrid}
set delay-mechanism {E2E | P2P}
set request-interval <integer>
set interface <interface>
end
Command Description
status {enable | disable} Enable or disable the FortiGate system time by synchronizing with a PTP server
(default = disable).
delay-mechanism {E2E | P2P} Use end-to-end (E2E) or peer-to-peer (P2P) delay detection (default = E2E).
request-interval <integer> The logarithmic mean interval between the delay request messages sent by the
client to the server in seconds (default = 1).
interface <interface> The interface that the PTP client will reply through.
Sample configuration
To configure a FortiGate to act as a PTP client that synchronizes itself with a Linux PTP server:
This command will provide details to debug the PTP communication with the server.
2. Check the system date:
# execute date
current date is: 2021-04-01
4. Check the system date again after synchronization with the PTP server:
# execute date
current date is: 2021-04-27
Configuring ports
To improve security, the default ports for administrative connections to the FortiGate can be changed. Port numbers
must be unique. If a conflict exists with a particular port, a warning message is shown.
When connecting to the FortiGate after a port has been changed, the port number be included, for example:
https://192.168.1.99:100.
The default service port range can be customized using the following CLI command:
config system global
set default-service-source-port <port range>
end
Where <port range> is the new default service port range, that can have a minimum value of 0 and a maximum value
up to 65535. The default value is 1 to 65535.
The idle timeout period is the amount of time that an administrator will stay logged in to the GUI without any activity. This
is to prevent someone from accessing the FortiGate if the management PC is left unattended. By default, it is set to five
minutes.
A setting of higher than 15 minutes will have a negative effect on a security rating score. See
Security rating on page 2221 for more information.
A password policy can be created for administrators and IPsec pre-shared keys. See Password policy on page 1855 for
information.
The view settings change the look and language of the FortiOS GUI.
Language Set the GUI language: English, French, Spanish, Portuguese, Japanese,
Traditional Chinese, Simplifies Chinese, Korean.
Theme Set the theme color: Jade, Neutrino, Mariner, Graphite, Melongene, Retro,
Dark Matter, Onyx, or Eclipse.
Date/Time Display Set the date and time to display using the FortiGate's or the browser's
timezone.
NGFW Mode Set the NGFW mode to either Profile-based (default) or Policy-based.
Central SNAT Optionally, enable central SNAT. This option is only available in Profile-based
mode.
3. Click Apply.
By default, the number password retry attempts is set to three, allowing the administrator a maximum of three attempts
at logging in to their account before they are locked out for a set amount of time (by default, 60 seconds).
The number of attempts and the default wait time before the administrator can try to enter a password again can be
configured using the CLI.
A maximum of ten retry attempts can be configured, and the lockout period can be 1 to 2147483647 seconds (over 68
years). The higher the retry attempts, the higher the risk that someone might be able to guess the password.
For example, to set the number of retry attempts to 1, and the lockout time to 5 minutes:
config system global
set admin-lockout-threshold 1
set admin-lockout-duration 300
end
If the time span between the first failed log in attempt and the lockout threshold failed attempt
is less than lockout time, the lockout will be triggered.
TLS configuration
The minimum TLS version that is used for local out connections from the FortiGate can be configured in the CLI:
By default, the minimum version is TLSv1.2. The FortiGate will try to negotiate a connection using the configured version
or higher. If the server that FortiGate is connecting to does not support the version, then the connection will not be made.
Some FortiCloud and FortiGuard services do not support TLSv1.3.
Minimum SSL/TLS versions can also be configured individually for the following settings, not all of which support
TLSv1.3:
Setting CLI
A minimum (ssl-min-proto-ver) and a maximum (ssl-max-proto-ver) version can be configured for SSL VPN.
See TLS 1.3 support on page 1666
When multiple incoming or outgoing interfaces are used in ECMP or for load balancing, changes to routing, incoming, or
return traffic interfaces impacts how an existing sessions handles the traffic. Auxiliary sessions can be used to handle
these changes to traffic patterns.
l In FortiOS 6.0 and earlier, the auxiliary session feature is not supported.
l In FortiOS 6.2.0 to 6.2.2, the auxiliary session feature is permanently enabled.
l In FortiOS 6.2.3 and later, the auxiliary session feature is disabled by default, and can be
enabled if required.
When enabling auxiliary sessions, consider the impact of routing in both traffic directions. In
topologies such as SD-WAN hub and spoke or ADVPN deployments, the symmetry of the
return traffic is important for maintaining the stability of the session. It is expected that the
spoke selects the outbound interface and path, and the other nodes obey and reply
symmetrically. It is recommended to disable auxiliary in these scenarios, and others where
incoming and return traffic symmetry is expected.
Scenarios
Incoming traffic is from the client to the server. Return traffic is from the server to the client.
In this scenario, a session is established between port1 and port3. When the return traffic hits port3:
The reply to the client egresses on the original incoming interface, port1. If policy routes or SD-WAN rules are
configured, the next hop gateway is applied if the output device is the same as the original incoming interface.
The reply to the client egresses on the best route in the routing table:
l If the best route is port1, then it will egress on port1.
l If the best route is port2, then it will egress on port2.
If policy routes or SD-WAN rules are configured, they must be matched to determine the egress interface. If both are
configured, policy routes have higher priority.
Scenario 2 - Return traffic returns on an interfaces other than the original outgoing interfaces
In this scenario, a session is established between port1 and port3. When the return traffic hits port4:
l The session is dirtied and then gets refreshed, and interfaces on the session are updated.
l If there is a high traffic volume or flapping between the interfaces, the CPU usage increases.
An auxiliary session is created for the existing session, and traffic returns to the client as normal on the auxiliary session.
Scenario 3 - Incoming traffic enters on an interfaces other than the original incoming interfaces
In this scenario, a session is established between port1 and port3. When the incoming traffic hits port2:
The session is dirtied and then gets refreshed, and interfaces on the session are updated.
An auxiliary session is created for the existing session, and traffic is forwarded to the server as normal on the auxiliary
session.
In this scenario, a session has been established between port1 and port3, when a new route on port4 is updated as the
route to the server.
As long as there is a route to the destination, the session will not be dirtied or refreshed. Even though there is a better
route, traffic continues on the original path between port1 and port3.
The session is dirtied and then gets refreshed, and interfaces on the session are updated.
When the auxiliary session feature is disabled, there is always one session. If the incoming or return interface changes,
the FortiGate marks the session as dirty and updates the session's interfaces. This cannot be done by the NPU, so the
session is not offloaded to the NPU, and is processed by the CPU instead. If Equal-Cost Multi-Path (ECMP) causes the
interface to keep changing, then it will use significant CPU resources.
When the auxiliary session feature is enabled and the incoming or return interface changes, it creates an auxiliary
session, and all traffic can continue to be processed by the NPU.
Verification
When an auxiliary, or reflect, session is created, it will appear as a reflect session below the existing session:
# diagnose sys session list
session info: proto=17 proto_state=00 duration=111 expire=175 timeout=0 flags=00000000
socktype=0 sockport=0 av_idx=0 use=4
origin-shaper=
reply-shaper=
per_ip_shaper=
When an auxiliary session is created, NPU offloading will continue in the reflect session:
# diagnose sys session list
session info: proto=17 proto_state=01 duration=169 expire=129 timeout=0 flags=00000000
socktype=0 sockport=0 av_idx=0 use=4
origin-shaper=
reply-shaper=
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ vlan_cos=0/255
state=may_dirty npu
statistic(bytes/packets/allow_err): org=131/4/1 reply=66/2/1 tuples=2
tx speed(Bps/kbps): 0/0 rx speed(Bps/kbps): 0/0
orgin->sink: org pre->post, reply pre->post dev=36->38/38->36 gwy=10.1.2.3/172.17.2.1
hook=pre dir=org act=noop 10.1.100.22:51926->172.16.204.44:5001(0.0.0.0:0)
hook=post dir=reply act=noop 172.16.204.44:5001->10.1.100.22:51926(0.0.0.0:0)
src_mac=90:6c:ac:19:19:58
misc=0 policy_id=1 auth_info=0 chk_client_info=0 vd=2
serial=00002b11 tos=ff/ff app_list=0 app=0 url_cat=0
sdwan_mbr_seq=0 sdwan_service_id=0
rpdb_link_id=00000000 rpdb_svc_id=0 ngfwid=n/a
npu_state=0x000c00
npu info: flag=0x91/0x81, offload=8/8, ips_offload=0/0, epid=129/142, ipid=142/128,
vlan=0x0016/0x0016
vlifid=142/128, vtag_in=0x0016/0x0016 in_npu=1/1, out_npu=1/1, fwd_en=0/0, qid=4/4
reflect info 0:
dev=37->38/38->37
npu_state=0x000400
npu info: flag=0x91/0x00, offload=8/0, ips_offload=0/0, epid=129/0, ipid=142/0,
vlan=0x0017/0x0000
vlifid=142/0, vtag_in=0x0017/0x0000 in_npu=1/0, out_npu=1/0, fwd_en=0/0, qid=4/0
total reflect session num: 1
total session 1
Email alerts
Alert emails are used to notify administrators about events on the FortiGate device, allowing a quick response to any
issues.
There are two methods that can be used to configure email alerts:
l Automation stitches on page 1887
l Alert emails on page 1890
The FortiGate has a default SMTP server, notification.fortinet.net, that provides secure mail service with SMTPS. It is
used for all emails that are sent by the FortiGate, including alert emails, automation stitch emails, and FortiToken Mobile
activations. You can also configure a custom email service.
SMTP Server Enter the address or name of the SMTP server, such as smtp.example.com.
Port If required, select Specify and enter a specific port number. The default is port
465.
Default Reply To Optionally, enter the reply to email address, such as [email protected].
This address will override the from address that is configured for an alert
email.
4. Click Apply.
Automation stitches
Automation stitches can be configured to send emails based on a variety of triggers, giving you control over the events
that cause an alert, and who gets alerted. For more information, see Automation stitches on page 2228.
In this example, the default mail service sends an email to two recipients when an Admin login failed event occurs or
there is a configuration change.
1. On the root FortiGate, go to Security Fabric > Automation and click Create New.
2. Enter a name for the stitch, such as Admin Fail.
3. Configure the trigger:
a. Click Add Trigger.
b. Click Create and select FortiOS Event Log.
e. Click OK.
f. Select the trigger in the list and click Apply.
4. Configure the action:
a. Click Add Action.
b. Click Create and select Email.
c. Configure the following settings:
Body Edit as required. By default, the email body will include all the fields from
the log event that triggered the stitch.
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
6. Create a second stitch with Configuration Change as the trigger, and an email action with a different subject line
(such as Configuration Change Detected).
Alert emails
When configuring an alert email, you can define the threshold when an issue becomes critical and requires attention.
When the threshold is reached, an email is sent to up to three recipients on the configured schedule to notify them of the
issue.
Alert email messages can be configured in the CLI. For more information on the available CLI commands, see Configure
alert email settings.
In this example, the FortiGate is configured to send email messages to two addresses, [email protected] and
[email protected], every two minutes when multiple intrusions, administrator log in or out events, or configuration
changes occur.
Administrators can use configuration save mode set to Workplace to implement strict change control by requiring
changes to be manually committed to the flash. To configure the setting in the GUI, go to System > Settings.
When Configuration save mode is set to Automatic (default), configuration changes are automatically saved to both
memory and flash.
When Configuration save mode is set to Workspace, configuration changes are saved to memory but not to flash. The
changes take effect immediately, but must be manually saved to flash. Unsaved changes are reverted when the device
is rebooted. If Revert upon timeout is enabled,the system might be unresponsive for a short time after the configured
timeout while it reverts the changes back to the previous save point. Prior to the timeout expiring, a pop-up warning gives
you the option to postpone the reboot by one minute, revert the configuration immediately, or save the configuration
changes.
In workspace mode, a warning is shown in the banner when there are unsaved changes. Click the warning to save, view,
or revert the changes. When you click Reboot and revert changes, the system might be unresponsive for a short time
while it reverts the changes back to the previous save point.
Clicking View Unsaved Changes opens a pane highlighting the changes that have not been committed.
On supported FortiGate hardware devices, the Trusted Platform Module (TPM) can be used to protect your password
and key against malicious software and phishing attacks. The dedicated module hardens the FortiGate by generating,
storing, and authenticating cryptographic keys. To help prevent tampering, the chip is soldered on the motherboard to
reduce the risk of data transaction interceptions from attackers.
By default, the TPM is disabled. To enable it, you must set the 32 hexadecimal digit master-encryption-password which
encrypts sensitive data on the FortiGate using AES128-CBC. With the password, TPM generates a 2048-bit primary key
to secure the master-encryption-password through RSA-2048 encryption. The master-encryption-password protects the
data. The primary key protects the master-encryption-password.
The TPM module does not encrypt the disk drive of eligible FortiGates.
The primary key binds the encrypted configuration file to a specific FortiGate unit and never leaves the TPM. When
backing up the configuration, the TPM uses the primary key to encrypt the master-encryption-password in the
configuration file. When restoring a configuration that includes a TPM protected master-encryption-password:
l If TPM is disabled, then the configuration cannot be restored.
l If TPM is enabled but has a different master-encryption-password than the configuration file, then the configuration
cannot be restored.
l If TPM is enabled and the master-encryption-password is the same in the configuration file, then the configuration
can be restored.
For information on backing up and restoring the configuration, see Configuration backups on page 59.
Passwords and keys that can be encrypted by the master-encryption-key include:
l Admin password
l Alert email user's password
l BGP and other routing related configurations
l External resource
l FortiGuard proxy password
l FortiToken/FortiToken Mobile’s seed
l HA password
l IPsec pre-shared key
l Link Monitor, server side password
l Local certificate's private key
l Local, LDAP. RADIUS, FSSO, and other user category related passwords
l Modem/PPPoE
l NST password
l NTP Password
l SDN connector, server side password
l SNMP
l Wireless Security related password
In HA configurations, each cluster member must use the same master-encryption-key so that
the HA cluster can form and its members can synchronize their configurations.
Verify all the following commands exist. Otherwise, the platform does not support it.
# diagnose hardware test info
List of test cases:
bios: sysid
bios: checksum
bios: license
bios: detect
Virtual Domains
Virtual Domains (VDOMs) are used to divide a FortiGate into two or more virtual units that function independently.
VDOMs can provide separate security policies and, in NAT mode, completely separate configurations for routing and
VPN services for each connected network.
There are two VDOM modes:
l Split-task VDOM mode: One VDOM is used only for management, and the other is used to manage traffic. See
Split-task VDOM mode on page 1896.
l Multi VDOM mode: Multiple VDOMs can be created and managed as independent units. See Multi VDOM mode on
page 1899 and Backing up and restoring configurations in multi VDOM mode on page 1916.
By default, most FortiGate units support 10 VDOMs, and many FortiGate models support purchasing a license key to
increase the maximum number.
FortiGate-VM V-series, S-series, and Flex-VM instances support split-task VDOMs without any additional VDOM
licenses.
Global settings are configured outside of a VDOM. They effect the entire FortiGate, and include settings such as
interfaces, firmware, DNS, some logging and sandboxing options, and others. Global settings should only be changed
by top level administrators.
Switching between VDOM modes is allowed, except to switch from multi VDOM to split-task VDOM mode you must first
disable VDOMs.
Global and per-VDOM resources can be configured when the FortiGate is in Split-Task or Multi VDOM mode. Global
resources apply to resources that are shared by the whole FortiGate, while per-VDOM resources are specific to each
VDOM.
By default, all per-VDOM resource settings are set to have no limits. This means that any single VDOM can use all of the
FortiGate device's resources. This could deprive other VDOMs of the resources that they require, to the point that could
be unable to function. We recommend settings maximum values on the resources that are vital to you.
3. Click Apply.
To reset the all of the override values, click Reset All.
5. Click OK.
To reset the all of the override values, click Reset All.
In split-task VDOM mode, the FortiGate has two VDOMs: the management VDOM (root) and the traffic VDOM (FG-
traffic).
The management VDOM is used to manage the FortiGate, and cannot be used to process traffic.
The following GUI sections are available when in the management VDOM:
l The Status dashboard
l Security Fabric topology and settings (read-only, except for HTTP Service settings)
l Interface and static route configuration
l FortiClient configuration
l Replacement messages
l Certificates
l System events
l Log and email alert settings
l Threat weight definitions
The traffic VDOM provides separate security policies, and is used to process all network traffic.
The following GUI sections are available when in the traffic VDOM:
l The Status, Top Usage LAN/DMZ, and Security dashboards
l Security Fabric topology, settings (read-only, except for HTTP Service settings), and External Connectors
(Endpoint/Identity connectors only)
l FortiView
l Interface configuration
l Packet capture
l SD-WAN, SD-WAN Rules, and Performance SLA
l Static and policy routes
l RIP, OSPF, BGP, and Multicast
l Replacement messages
l Feature visibility
l Tags
l Certificates
l Policies and objects
l Security profiles
l VPNs
l User and device authentication
l Wifi and switch controller
l Logging
l Monitoring
Split-task VDOM mode is not available on all FortiGate models. The Fortinet Security Fabric supports split-task VDOM
mode.
Split-task VDOM mode can be enabled in the GUI or CLI. Enabling it does not require a reboot, but does log you out of
the FortiGate.
When split-task VDOM mode is enabled, all current management configuration is assigned to
the root VDOM, and all non-management settings, such as firewall policies and security
profiles, are deleted.
On VMs and FortiGate 60 series models and lower, VDOMs can only be enabled using the
CLI.
An interface can only be assigned to one of the VDOMs. When split-task VDOM mode is enabled, all interfaces are
assigned to the root VDOM. To use an interface in a policy, it must first be assigned to the traffic VDOM.
An interface cannot be moved if it is referenced in an existing configuration.
In the GUI, the interface list Ref. column shows if the interface is referenced in an existing
configuration, and allows you to quickly access and edit those references.
4. Click OK.
config global
config system interface
edit <interface>
set vdom <VDOM_name>
next
end
end
Per-VDOM administrators can be created that can access only the management or traffic VDOM. These administrators
must use either the prof_admin administrator profile, or a custom profile.
A per-VDOM administrator can only access the FortiGate through a network interface that is assigned to the VDOM that
they are assigned to. The interface must also be configured to allow management access. They can also connect to the
FortiGate using the console port.
To assign an administrator to multiple VDOMs, they must be created at the global level. When creating an administrator
at the VDOM level, the super_admin administrator profile cannot be used.
5. Click OK.
config global
config system admin
edit <name>
set vdom <VDOM_name>
set password <password>
set accprofile <admin_profile>
...
next
end
end
In multi VDOM mode, the FortiGate can have multiple VDOMs that function as independent units. One VDOM is used to
manage global settings. The root VDOM cannot be deleted, and remains in the configuration even if it is not processing
any traffic.
Multi VDOM mode is not available on all FortiGate models.
There are three main configuration types in multi VDOM mode:
Independent VDOMs:
Multiple, completely separate VDOMs are created. Any VDOM can be the management VDOM, as long as it has Internet
access. There are no inter-VDOM links, and each VDOM is independently managed.
Management VDOM:
A management VDOM is located between the other VDOMs and the Internet, and the other VDOMs connect to the
management VDOM with inter-VDOM links. The management VDOM has complete control over Internet access,
including the types of traffic that are allowed in both directions. This can improve security, as there is only one point of
ingress and egress.
There is no communication between the other VDOMs.
Meshed VDOMs:
VDOMs can communicate with inter-VDOM links. In full-mesh configurations, all the VDOMs are interconnected. In
partial-mesh configurations, only some of the VDOMs are interconnected.
In this configuration, proper security must be achieved by using firewall policies and ensuring secure account access for
administrators and users.
The following examples show how to configure per-VDOM settings, such as operation mode, routing, and security
policies, in a network that includes the following VDOMs:
l VDOM-A: allows the internal network to access the Internet.
l VDOM-B: allows external connections to an FTP server.
l root: the management VDOM.
You can use VDOMs in either NAT or transparent mode on the same FortiGate. By default, VDOMs operate in NAT
mode.
For both examples, multi VDOM mode must be enabled, and VDOM-A and VDOM-B must be created.
Multi VDOM mode can be enabled in the GUI or CLI. Enabling it does not require a reboot, but does log you out of the
device. The current configuration is assigned to the root VDOM.
On VMs and FortiGate 60 series models and lower, VDOMs can only be enabled using the
CLI.
1. In the Global VDOM, go to System > VDOM and click Create New.
2. In the Virtual Domain field, enter VDOM-A.
3. If required, set the NGFW Mode. If the NGFW Mode is Profile-based, Central SNAT can be enabled.
4. Click OK to create the VDOM.
5. Repeat the above steps for VDOM-B.
config vdom
edit VDOM-A
next
edit VDOM-B
next
end
NAT mode
In this example, both VDOM-A and VDOM-B use NAT mode. A VDOM link is created that allows users on the internal
network to access the FTP server.
This configuration requires the following steps:
1. Configure VDOM-A on page 1902
2. Configure VDOM-B on page 1904
3. Configure the VDOM link on page 1907
Configure VDOM-A
VDOM-A allows connections from devices on the internal network to the Internet. WAN 1 and port 1 are assigned to this
VDOM.
The per-VDOM configuration for VDOM-A includes the following:
l A firewall address for the internal network
l A static route to the ISP gateway
l A security policy allowing the internal network to access the Internet
All procedures in this section require you to connect to VDOM-A, either using a global or per-VDOM administrator
account.
Name internal-network
Type Subnet
Interface port1
3. Click OK.
config vdom
edit VDOM-A
config firewall address
edit internal-network
set associated-interface port1
set subnet 192.168.10.0 255.255.255.0
next
end
next
end
Destination Subnet
IP address 0.0.0.0/0.0.0.0
Gateway 172.20.201.7
Interface wan1
Distance 10
3. Click OK.
config vdom
edit VDOM-A
config router static
edit 0
set gateway 172.20.201.7
set device wan1
next
end
next
end
Name VDOM-A-Internet
Source internal-network
Destination all
Schedule always
Service ALL
Action ACCEPT
NAT enabled
3. Click OK.
config vdom
edit VDOM-A
config firewall policy
edit 1
set name "VDOM-A-Internet"
set srcintf "port1"
set dstintf "wan1"
set srcaddr "internal-network"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
next
end
Configure VDOM-B
VDOM-B allows external connections to reach an internal FTP server. WAN 2 and port 2 are assigned to this VDOM.
The per-VDOM configuration for VDOM-B includes the following:
l A firewall address for the FTP server
l A virtual IP address for the FTP server
l A static route to the ISP gateway
l A security policy allowing external traffic to reach the FTP server
All procedures in this section require you to connect to VDOM-B, either using a global or per-VDOM administrator
account.
Type Subnet
Interface port2
3. Click OK.
config vdom
edit VDOM-B
config firewall address
edit FTP-server
set associated-interface port2
set subnet 192.168.20.10 255.255.255.255
next
end
next
end
Name FTP-server-VIP
Interface wan2
3. Click OK.
config vdom
edit VDOM-B
config firewall vip
edit FTP-server-VIP
set extip 172.25.177.42
set extintf wan2
set mappedip 192.168.20.10
next
end
next
end
Destination Subnet
IP address 0.0.0.0/0.0.0.0
Gateway 172.20.10.10
Interface wan2
Distance 10
3. Click OK.
config vdom
edit VDOM-B
config router static
edit 0
set gateway 172.20.10.10
set device wan2
next
end
next
end
Name Access-server
Source all
Destination FTP-server-VIP
Schedule always
Service FTP
Action ACCEPT
NAT enabled
3. Click OK.
config vdom
edit VDOM-B
config firewall policy
edit 1
set name "Access-server"
set srcintf "wan2"
set dstintf "port2"
set srcaddr "all"
set dstaddr "FTP-server-VIP"
set action accept
set schedule "always"
set service "FTP"
set nat enable
next
end
next
end
The VDOM link allows connections from VDOM-A to VDOM-B. This allows users on the internal network to access the
FTP server through the FortiGate.
The configuration for the VDOM link includes the following:
l The VDOM link interface
l Firewall addresses for the FTP server on VDOM-A and for the internal network on VDOM-B
l Static routes for the FTP server on VDOM-A and for the internal network on VDOM-B
l Policies allowing traffic using the VDOM link
All procedures in this section require you to connect to the global VDOM using a global administrator account.
1. In the Global VDOM, go to Network > Interfaces and select Create New > VDOM link.
2. Enter the following information:
Name VDOM-link
Interface 0
IP/Netmask 0.0.0.0/0.0.0.0
Interface 1
IP/Netmask 0.0.0.0/0.0.0.0
3. Click OK.
config global
config system vdom-link
edit "VDOM-link"
next
end
end
1. In the VDOM-A VDOM, go to Policy & Objects > Addresses and create a new address.
2. Enter the following information:
Type Subnet
Interface VDOM-link0
config vdom
edit VDOM-A
config firewall address
edit "FTP-server"
set associated-interface "VDOM-link0"
set allow-routing enable
set subnet 192.168.20.10 255.255.255.255
next
end
next
end
1. Connect to VDOM-A.
2. Go to Network > Static Routes and create a new route.
3. Enter the following information:
Gateway 0.0.0.0
Interface VDOM-link0
config vdom
edit VDOM-A
config router static
edit 0
set device VDOM-link0
set dstaddr FTP-server
next
end
next
end
1. In the VDOM-A VDOM, go to Policy & Objects > Firewall Policy and create a new policy.
2. Enter the following information:
Name Access-FTP-server
Source internal-network
Destination FTP-server
Schedule always
Service FTP
Action ACCEPT
NAT disabled
3. Click OK.
config vdom
edit VDOM-A
config firewall policy
edit 0
set name Access-FTP-server
set srcintf port1
set dstintf VDOM-link0
set srcaddr internal-network
set dstaddr FTP-server
set action accept
set schedule always
set service FTP
next
end
next
end
1. In the VDOM-B VDOM, go to Policy & Objects > Addresses and create a new address.
2. Enter the following information:
Type Subnet
Interface VDOM-link1
3. Click OK.
config vdom
edit VDOM-B
config firewall address
edit internal-network
set associated-interface VDOM-link1
set allow-routing enable
set subnet 192.168.10.0 255.255.255.0
next
end
next
end
1. In the VDOM-B VDOM, go to Network > Static Routes and create a new route.
2. Enter the following information:
Gateway 0.0.0.0
Interface VDOM-link1
3. Click OK.
config vdom
edit VDOM-B
config router static
edit 0
set device VDOM-link1
set dstaddr internal-network
next
end
next
end
1. In the VDOM-B VDOM, go to Policy & Objects > Firewall Policy and create a new policy.
2. Enter the following information:
Name Internal-server-access
Source internal-network
Destination FTP-server
Schedule always
Service FTP
Action ACCEPT
NAT disabled
3. Click OK.
config vdom
edit VDOM-B
config firewall policy
edit 0
set name Internal-server-access
set srcintf VDOM-link1
set dstintf port2
set srcaddr internal-network
set dstaddr FTP-server
set action accept
set schedule always
set service FTP
next
end
next
end
In this example, VDOM-A uses NAT mode and VDOM-B uses transparent mode.
This configuration requires the following steps:
1. Configure VDOM-A on page 1912
2. Configure VDOM-B on page 1914
Configure VDOM-A
VDOM-A allows connections from devices on the internal network to the Internet. WAN 1 and port 1 are assigned to this
VDOM.
The per-VDOM configuration for VDOM-A includes the following:
l A firewall address for the internal network
l A static route to the ISP gateway
l A security policy allowing the internal network to access the Internet
All procedures in this section require you to connect to VDOM-A, either using a global or per-VDOM administrator
account.
Name internal-network
Type Subnet
Interface port1
3. Click OK.
config vdom
edit VDOM-A
config firewall address
edit internal-network
set associated-interface port1
set subnet 192.168.10.0 255.255.255.0
next
end
next
end
Destination Subnet
IP address 0.0.0.0/0.0.0.0
Gateway 172.20.201.7
Interface wan1
Distance 10
3. Click OK.
config vdom
edit VDOM-A
config firewall address
edit 0
set gateway 172.20.201.7
set device wan1
next
end
next
end
Name VDOM-A-Internet
Source internal-network
Destination all
Schedule always
Service ALL
Action ACCEPT
NAT enabled
3. Click OK.
config vdom
edit VDOM-A
config firewall policy
edit 0
set name VDOM-A-Internet
set srcintf port1
set dstintf wan1
set srcaddr internal-network
set dstaddr all
set action accept
set schedule always
set service ALL
set nat enable
next
end
next
end
Configure VDOM-B
VDOM-B allows external connections to reach an internal FTP server. WAN 2 and port 2 are assigned to this VDOM.
The per-VDOM configuration for VDOM-B includes the following:
l A firewall address for the FTP server
l A static route to the ISP gateway
l A security policy allowing external traffic to reach the FTP server
All procedures in this section require you to connect to VDOM-B, either using a global or per-VDOM administrator
account.
Type Subnet
Interface port2
3. Click OK.
config vdom
edit VDOM-B
config firewall address
edit FTP-server
set associated-interface port2
set subnet 172.25.177.42 255.255.255.255
next
end
next
end
Destination Subnet
IP address 0.0.0.0/0.0.0.0
Gateway 172.20.10.10
3. Click OK.
config vdom
edit VDOM-B
config router static
edit 0
set gateway 172.20.10.10
next
end
next
end
Name Access-server
Source all
Destination FTP-server
Schedule always
Service FTP
Action ACCEPT
3. Click OK.
config vdom
edit VDOM-B
config firewall policy
edit 0
set name Access-server
set srcintf wan2
set dstintf port2
set srcaddr all
set dstaddr FTP-server-VIP
set action accept
set schedule always
set service FTP
next
end
next
end
When a FortiGate is in multi VDOM mode, the configuration can be backed up or restored using the GUI or the CLI. Back
up and restoration permissions depend on the VDOM administrator when in multi VDOM mode:
l A global super_admin can back up and restore the global configuration or the configuration of a specific VDOM.
l A VDOM administrator of one VDOM can only back up and restore the configuration of the current VDOM.
l A VDOM administrator of multiple VDOMs can back up and restore the configuration of multiple VDOMs.
1. Click on the user name in the upper right-hand corner of the screen and select Configuration > Backup.
2. Select VDOM for the Scope. The VDOM dropdown menu is displayed.
3. Select the VDOM you want to back up.
4. Direct the backup to your Local PC or to a USB Disk.
5. Enable Encryption.
6. Enter a password, and enter it again to confirm it. This password will be required to restore the configuration.
7. Click OK.
8. When prompted, select a location on the PC or USB disk to save the configuration file. The configuration file will
have a .conf extension.
1. Click on the user name in the upper right-hand corner of the screen and select Configuration > Restore.
2. Select VDOM for the Scope. The VDOM dropdown menu is displayed.
3. Select the VDOM that you want to restore the configuration for.
4. Identify the source of the configuration file to be restored: your Local PC or a USB Disk.
The USB Disk option will not be available if no USB drive is inserted in the USB port. You can restore from the
FortiManager using the CLI.
5. Click Upload, locate the configuration file, and click Open.
Confirm that the configuration file you are uploading is for the same VDOM selected from
the dropdown menu.
Configuration backups can be performed in the CLI using the execute backup commands. If you are backing up a
VDOM configuration instead of the global configuration, first enter the commands:
config vdom
edit <vdom_name>
Command Description
# execute backup config Back up the configuration in FortiOS format.
Backup your configuration file to:
l flash
l ftp
l sftp
l tftp
l usb
# execute backup full- Backup the configuration, including backups of default configuration settings.
config Backup your configuration file to:
l ftp
l sftp
l tftp
l usb
For FTP, note that port number and username are optional depending on the FTP site:
config vdom
edit <vdom_name>
execute backup config ftp <backup_filename> <ftp_server>[<:ftp_port>] [<password>]
[<backup_password>]
or for TFTP:
config vdom
edit <vdom_name>
execute backup config tftp <backup_filename> <tftp_servers> [<backup_password>]
or for SFTP:
config vdom
edit <vdom_name>
execute backup config sftp <backup_filename> <sftp_server>[<:sftp_port>] <password>
[<backup_password>]
config vdom
edit <vdom_name>
execute backup config usb <backup_filename> [<backup_password>]
Restoring configurations can be performed in the CLI using the execute restore commands. If you are restoring a
VDOM configuration instead of the global configuration, first enter the commands:
config vdom
edit <vdom_name>
When restoring a VDOM configuration, ensure that the configuration file is for the correct VDOM specified.
Command Description
# execute restore config Restore a configuration that is in FortiOS format.
Configurations can be loaded from:
l dhcp: Load the configuration though DHCP.
For FTP, note that port number and username are optional depending on the FTP site:
config vdom
edit <vdom_name>
execute restore config ftp <file_path> <ftp_server>[<:port>] [<FTP password>]
[<password>]
or for TFTP:
config vdom
edit <vdom_name>
execute restore config tftp <file_name> <tftp_server> [<password>]
or for DHCP:
config vdom
edit <vdom_name>
execute restore config dhcp <port> [<VLAN_ID>]
or for flash:
config vdom
edit <vdom_name>
execute restore config flash <revision_ID>
High Availability
Whether your FortiGate is used as a security gateway, an internal segmentation firewall, in the cloud, or in an MSSP
environment, as long as there is critical traffic passing through it, there is risk of it being a single point of failure. Physical
outages can occur due to power failures, physical link failures, transceiver failures, or power supply failures. Non-
physical outages can be caused by routing, resource issues, or kernel panic.
Network outages cause disruptions to business operations, downtime, and frustration for users and in some situations
may have financial setbacks. In designing your network and architecture, it is important to weigh the risks and
consequences associated with unexpected outages.
There are many ways to build redundancy and resiliency. In a switching network, you can accomplish this by adding
redundant links and switches in partial or full mesh topologies. Using redundant and aggregate links, you can avoid a
single link failure causing a network to go down. Using SD-WAN, you can build redundant and intelligent WAN load
balancing and failover architectures.
FortiGate HA offers several solutions for adding redundancy in the case where a failure occurs on the FortiGate, or is
detected by the FortiGate through monitored links, routes, and other health checks. These solutions support fast failover
to avoid lengthy network outages and disruptions to your traffic.
FGCP provides a solution for two key requirements of critical enterprise networking components: enhanced reliability
and increased performance. Enhanced reliability is achieved through device failover protection, link failover protection,
and remote link failover protection. Session failover protection for most IPv4 and IPv6 sessions also contributes to
enhanced reliability. Increased performance is achieved though active-active HA load balancing.
In a network that already includes load balancing (either with load balancers or routers) for traffic redundancy, two
entities (either standalone FortiGates or FGCP clusters) can be integrated into the load balancing configuration using the
FortiGate Session Life Support Protocol (FGSP). The external load balancers or routers can distribute sessions among
the FortiGates and the FGSP performs session synchronization of IPv4 and IPv6 TCP, SCTP, UDP, ICMP, expectation,
and NAT sessions to keep the session tables of both entities synchronized. In the event of a failure, the load balancer
can detect the failed unit and failover the sessions to other active members to continue processing the traffic.
VRRP
FortiGates can function as primary or backup Virtual Router Redundancy Protocol (VRRP) routers. The FortiGates can
quickly and easily integrate into a network that has already deployed VRRP. A FortiGate can be integrated into a VRRP
group with any third-party VRRP devices, and VRRP can provide redundancy between multiple FortiGates. FortiOS
supports VRRP version 2 and 3.
The following topics provide more information about each HA solution and other HA related topics:
l FGCP on page 1920
l FGSP on page 1968
FGCP
High availability (HA) is usually required in a system where there is high demand for little downtime. There are usually
hot-swaps, backup routes, or standby backup units and as soon as the active entity fails, backup entities will start
functioning. This results in minimal interruption for the users.
The FortiGate Clustering Protocol (FGCP) is a proprietary HA solution whereby FortiGates can find other member
FortiGates to negotiate and create a cluster. A FortiGate HA cluster consists of at least two FortiGates (members)
configured for HA operation. All FortiGates in the cluster must be the same model and have the same firmware installed.
Cluster members must also have the same hardware configuration (such as the same number of hard disks). All cluster
members share the same configurations except for their host name and priority in the HA settings. The cluster works like
a device but always has a hot backup device.
General operation
Failover
FGCP uses a combination of incremental and periodic synchronization to make sure that the configuration of all cluster
units is synchronized to that of the primary unit.
The following settings are not synchronized between cluster units:
l The FortiGate host name
l GUI Dashboard widgets
l HA override
l HA device priority
l The virtual cluster priority
l The HA priority setting for a ping server (or dead gateway detection) configuration
l The system interface settings of the HA reserved management interface
l The HA default route for the reserved management interface, set using the ha-mgmt-interface-gateway
option of the config system ha command
Most subscriptions and licenses are not synchronized, as each FortiGate must be licensed individually. FortiToken
Mobile is an exception; they are registered to the primary unit and synchronized to the secondary units.
The primary unit synchronizes all other configuration settings, including the other HA configuration settings.
All synchronization activity takes place over the HA heartbeat link using TCP/703 and UDP/703 packets.
The following topics provide more information about FGCP:
l Failover protection on page 1922
l HA active-passive cluster setup on page 1924
l HA active-active cluster setup on page 1926
l HA virtual cluster setup on page 1927
l Check HA synchronization status on page 1931
l Out-of-band management with reserved management interfaces on page 1934
l In-band management on page 1940
l Upgrading FortiGates in an HA cluster on page 1940
l HA between remote sites over managed FortiSwitches on page 1941
l HA using a hardware switch to replace a physical switch on page 1946
l VDOM exceptions on page 1949
l Override FortiAnalyzer and syslog server settings on page 1950
l Routing NetFlow data over the HA management interface on page 1954
l Force HA failover for testing and demonstrations on page 1956
l Disabling stateful SCTP inspection on page 1958
l Resume IPS scanning of ICCP traffic after HA failover on page 1959
l Querying autoscale clusters for FortiGate VM on page 1962
l Cluster virtual MAC addresses on page 1963
l Troubleshoot an HA formation on page 1967
Failover protection
The FortiGate Clustering Protocol (FGCP) provides failover protection, meaning that a cluster can provide FortiGate
services even when one of the devices in the cluster encounters a problem that would result in the complete loss of
connectivity for a stand-alone FortiGate unit. Failover protection provides a backup mechanism that can be used to
reduce the risk of unexpected downtime, especially in mission-critical environments.
FGCP supports failover protection in four ways:
1. If a link fails.
2. If a device loses power.
3. If an SSD fails.
4. If memory utilization exceeds the threshold for a specified amount of time.
When session-pickup is enabled in the HA settings, existing TCP session are kept, and users on the network are not
impacted by downtime as the traffic can be passed without reestablishing the sessions.
1. Link fails
Before triggering a failover when a link fails, the administrator must ensure that monitor interfaces are configured.
Normally, the internal interface that connects to the internal network, and an outgoing interface for traffic to the internet or
outside the network, should be monitored. Any of those links going down will trigger a failover.
When an active (primary) unit loses power, a backup (secondary) unit automatically becomes the active, and the impact
on traffic is minimal. There are no settings for this kind of fail over.
3. SSD failure
config system ha
set ssd-failover enable
end
4. Memory utilization
An HA failover can be triggered when memory utilization exceeds the threshold for a specific amount of time.
Memory utilization is checked at the configured sample rate (memory-failover-sample-rate). If the utilization is
above the threshold (memory-failover-threshold) every time that it is sampled for the entire monitor period
(memory-failover-monitor-period), then a failover is triggered.
If the FortiGate meets the memory utilization conditions to cause failover, but the last memory triggered failover
happened within the timeout period (memory-failover-flip-timeout), then the failover does not occur. Other HA
cluster members can still trigger memory based failovers if they meet the criteria and have not already failed within the
timeout period.
After a memory based failover from FortiGate A to FortiGate B, if the memory usage on FortiGate A goes down below the
threshold but the memory usage on FortiGate B is still below the threshold, then a failover is not triggered, as the cluster
is working normally using FortiGate B as the primary device.
When you disable memory based failover, a new HA primary selection occurs to determine the primary device.
config system ha
set memory-based-failover {enable | disable}
set memory-failover-threshold <integer>
set memory-failover-monitor-period <integer>
set memory-failover-sample-rate <integer>
set memory-failover-flip-timeout <integer>
end
On supported models, the HA heartbeat interval unit can be changed from the 100ms default to 10ms. This allows for a
failover time of less than 50ms, depending on the configuration and the network.
config system ha
set hb-interval-in-milliseconds {100ms | 10ms}
end
In this example, the HA heartbeat interval unit is changed from 100ms to 10ms. As the default heartbeat interval is two,
this means that a heartbeat is sent every 20ms. The number of lost heartbeats that signal a failure is also changed to
two. So, after two consecutive heartbeats are lost, a failover will be detected in 40ms.
config system ha
set group-id 240
set group-name "300D"
set mode a-p
set hbdev "port3" 50 "port5" 100
set hb-interval 2
set hb-interval-in-milliseconds 10ms
set hb-lost-threshold 2
set override enable
set priority 200
end
Mode Active-Passive
Except for the device priority, these settings must be the same on all FortiGates in the cluster.
4. Leave the remaining settings as their default values. They can be changed after the cluster is in operation.
5. Click OK.
The FortiGate negotiates to establish an HA cluster. Connectivity with the FortiGate may be temporarily lost as the
HA cluster negotiates and the FGCP changes the MAC addresses of the FortiGate's interfaces.
6. Factory reset the other FortiGate that will be in the cluster, configure GUI access, then repeat steps 1 to 5, omitting
setting the device priority, to join the cluster.
Changing the host name makes it easier to identify individual cluster units in the cluster operations.
4. Enable HA:
config system ha
set mode a-p
set group-name Example_cluster
set hbdev ha1 10 ha2 20
end
5. Leave the remaining settings as their default values. They can be changed after the cluster is in operation.
6. Repeat steps 1 to 5 on the other FortiGate devices to join the cluster, giving each device a unique hostname.
FGCP in Active-Active mode cannot load balance any sessions that traverse NPU VDOM links
or regular VDOM links. If Active-Active session load balancing between VDOMs is required,
use an external router to handle the inter-VDOM routing.
Mode Active-Active
Except for the device priority, these settings must be the same on all FortiGates in the cluster.
4. Leave the remaining settings as their default values. They can be changed after the cluster is in operation.
5. Click OK.
The FortiGate negotiates to establish an HA cluster. Connectivity with the FortiGate may be temporarily lost as the
HA cluster negotiates and the FGCP changes the MAC addresses of the FortiGate's interfaces.
6. Factory reset the other FortiGate that will be in the cluster, configure GUI access, then repeat steps 1 to 5, omitting
setting the device priority, to join the cluster.
Changing the host name makes it easier to identify individual cluster units in the cluster operations.
4. Enable HA:
config system ha
set mode a-a
set group-name Example_cluster
set hbdev ha1 10 ha2 20
end
5. Leave the remaining settings as their default values. They can be changed after the cluster is in operation.
6. Repeat steps 1 to 5 on the other FortiGate devices to join the cluster.
Virtual clustering is an extension of FGCP HA that provides failover protection between two instances of one or more
VDOMs operating on two FortiGates that are in a virtual cluster. A standard virtual cluster consists of FortiGates that are
operating in active-passive HA mode with multiple VDOMs enabled.
Active-passive virtual clustering uses VDOM partitioning to send traffic for some VDOMs to the primary FortiGate and
traffic for other VDOMs to the secondary FortiGates. Traffic distribution between FortiGates can potentially improve
throughput. If a failure occurs and only one FortiGate continues to operate, all traffic fails over to that FortiGate, similar to
normal HA. If the failed FortiGates rejoin the cluster, the configured traffic distribution is restored.
In an active-passive virtual cluster of two FortiGates, the primary and secondary FortiGates share traffic processing
according to the VDOM partitioning configuration. If you add a third or fourth FortiGate, the primary and first secondary
FortiGate process all traffic and the other one or two FortiGates operate in standby mode. If the primary or first
secondary FortiGate fails, one of the other FortiGates becomes the new primary or secondary FortiGate and begins
processing traffic.
Separation of VDOM traffic
Virtual clustering creates a cluster between instances of each VDOM on the two FortiGates in the virtual cluster. All
traffic to and from a given VDOM is sent to one of the FortiGates where it stays within its VDOM and is only processed by
that VDOM. One FortiGate is the primary FortiGate for each VDOM and one FortiGate is the secondary FortiGate for
each VDOM. The primary FortiGate processes all traffic for its VDOMs; the secondary FortiGate processes all traffic for
its VDOMs.
The HA heartbeat provides the same HA services in a virtual clustering configuration as in a standard HA configuration.
One set of HA heartbeat interfaces provides HA heartbeat services for all of the VDOMs in the cluster. You do not have
to add a heartbeat interface for each VDOM.
In an FGCP cluster, the primary FortiGate uses virtual MAC addresses when forwarding traffic, and the secondary uses
the physical MAC addresses when forwarding traffic. In a virtual cluster, packets are sent with the cluster’s virtual MAC
addresses. However, in the case of NPU offloading on a non-root VDOM, traffic that leaves an NPU-based VLAN will
use the physical MAC address of its parent interface rather than the virtual MAC address. If this behavior is not desired,
disable auto-asic-offload in the firewall policy where the VLAN interface is used.
Example
This example shows a virtual cluster configuration consisting of two FortiGates. The virtual cluster has two VDOMs, Root
and End_vdm.
Mode Active-Passive
Except for the device priority, these settings must be the same on all FortiGates in the cluster.
4. Leave the remaining settings as their default values. They can be changed after the cluster is in operation.
5. Click OK.
The FortiGate negotiates to establish an HA cluster. Connectivity with the FortiGate may be temporarily lost as the
HA cluster negotiates and the FGCP changes the MAC addresses of the FortiGate's interfaces.
6. Factory reset the other FortiGate that will be in the cluster, configure GUI access, then repeat steps 1 to 5, omitting
setting the device priority, to join the cluster.
7. Go to System > Settings and enable Virtual Domains.
8. Click Apply. You will be logged out of the FortiGate.
9. Log back into the FortiGate, ensure that you are in the global VDOM, and go to System > VDOM.
d. Click OK.
config secondary-vcluster
set vdom "VD1" "VD2"
end
end
end
The HA synchronization status can be viewed in the GUI through either a widget on the Dashboard or on the System >
HA page. It can also be confirmed through the CLI. When a cluster is out of synchronization, administrators should
correct the issue as soon as possible as it affects the configuration integrity and can cause issues to occur.
When units are out of synchronization in an HA cluster, the GUI will compare the HA checksums and display the tables
that caused HA to be out of synchronization. This can be visualized on the HA monitor page and in the HA status widget.
Following HA setup, the HA Status widget can be added to the Dashboard that shows the HA synchronization statuses
of the members.
A green checkmark is shown next to each member that is in synchronization.
A member that is out of synchronization is highlighted in red. Hover the cursor over the unsynchronized device to see the
tables that are out of synchronization and the checksum values.
You can also go to System > HA to see the synchronization statuses of the members. A member that is out of
synchronization will have a red icon next to its name. Hover the cursor over the unsynchronized device to see the tables
that are out of synchronization and the checksum values.
Synchronized:
Unsynchronized:
In the CLI, run the get system ha status command to see if the cluster is in synchronization . The synchronization
status is reported under Configuration Status.
When both members are in synchronization:
# get system ha status
HA Health Status: OK
Model: FortiGate-VM64
Mode: HA A-P
Group: 0
Debug: 0
Cluster Uptime: 0 days 0:52:39
Cluster state change time: 2021-04-29 13:17:03
Primary selected using:
<2021/04/29 13:17:03> FGVMEV0000000002 is selected as the primary because its uptime is
larger than peer member FGVMEV7000000005.
<2021/04/29 12:37:17> FGVMEV0000000002 is selected as the primary because it's the only
member in the cluster.
ses_pickup: disable
override: disable
Configuration Status:
FGVMEV0000000002(updated 3 seconds ago): in-sync
FGVMEV7000000005(updated 2 seconds ago): in-sync
System Usage stats:
FGVMEV0000000002(updated 3 seconds ago):
sessions=9, average-cpu-user/nice/system/idle=1%/0%/0%/99%, memory=66%
FGVMEV7000000005(updated 2 seconds ago):
sessions=0, average-cpu-user/nice/system/idle=0%/0%/0%/100%, memory=65%
HBDEV stats:
FGVMEV0000000002(updated 3 seconds ago):
port2: physical/1000auto, up, rx-bytes/packets/dropped/errors=7698164/22719/0/0,
tx=7815947/23756/0/0
port4: physical/1000auto, up, rx-bytes/packets/dropped/errors=714501/1749/0/0,
tx=724254/1763/0/0
FGVMEV7000000005(updated 2 seconds ago):
port2: physical/1000auto, up, rx-bytes/packets/dropped/errors=7819515/23764/0/0,
tx=7697305/22724/0/0
port4: physical/1000auto, up, rx-bytes/packets/dropped/errors=726500/1766/0/0,
tx=714129/1751/0/0
MONDEV stats:
FGVMEVYKXTDJN932(updated 3 seconds ago):
port3: physical/1000auto, up, rx-bytes/packets/dropped/errors=4610/15/0/0,
tx=1224/21/0/0
FGVMEV7000000005(updated 2 seconds ago):
port3: physical/1000auto, up, rx-bytes/packets/dropped/errors=1200/20/0/0,
tx=630/10/0/0
As part of an HA configuration, you can reserve up to four management interfaces to provide direct management access
to all cluster units. For each reserved management interface, you can configure a different IP address, administrative
access, and other interface settings, for each cluster unit. By connecting these interfaces to your network, you can
separately manage each cluster unit from different IP addresses.
l Reserved management interfaces provide direct management access to each cluster unit, and give each cluster
unit a different identity on your network. This simplifies using external services, such as SNMP, to monitor separate
cluster units.
l Reserved management interfaces are not assigned HA virtual MAC addresses. They retain the permanent
hardware address of the physical interface, unless you manually change it using the config system
interface command.
l Reserved management interfaces and their IP addresses should not be used for managing a cluster using
FortiManager. To manage a FortiGate HA cluster with FortiManager, use the IP address of one of the cluster unit
interfaces.
l Configuration changes to a reserved management interface are not synchronized to other cluster units. Other
configuration changes are automatically synchronized to all cluster units.
You can configure an in-band management interface for a cluster unit. See In-band
management on page 1940 for information. In-band management does not reserve the
interface exclusively for HA management.
Management interface
Enable HTTPS or HTTP administrative access on the reserved management interfaces to connect to the GUI of each
cluster unit. On secondary units, the GUI has the same features as the primary unit, except for unit specific information,
for example:
l The System Information widget on the Status dashboard shows the secondary unit's serial number.
l In the cluster members list at System > HA, you can change the HA configuration of the unit that you are logged into.
You can only change the host name and device priority of the primary and other secondary units.
l The system events logs show logs for the device that you are logged into. Use the HA device drop down to view the
log messages for other cluster units, including the primary unit.
Enable SSH administrative access on the reserved management interfaces to connect to the CLI of each cluster unit.
The CLI prompt includes the host of the cluster unit that you are connected to. Use the execute ha manage command
to connect to other cluster unit CLIs.
Enable SNMP administrative access on a reserved management interface to use SNMP to monitor each cluster unit
using the interface's IP address. Direct management of cluster members must also be enabled, see Configuration
examples on page 1935.
Reserved management interfaces are available in both NAT and transparent mode, and when the cluster is operating
with multiple VDOMs.
By default, management services such as FortiCloud, FortiSandbox, SNMP, remote logging, and remote authentication,
use a cluster interface. This means that communication from each cluster unit will come from a cluster interface of the
primary unit, and not from the individual cluster unit's interface.
You can configure HA reserved management interfaces to be used for communication with management services by
enabling the ha-direct option. This separates management traffic for each cluster unit, and allows each unit to be
individually managed. This is especially useful when cluster units are in different physical locations.
The following management features will then use the HA reserved management interface:
l Remote logging, including syslog, FortiAnalyzer, and FortiCloud
l Remote authentication and certificate verification
l Communication with FortiSandbox
l Netflow and sflow, see Routing NetFlow data over the HA management interface on page 1954 for information.
l SNMP queries and traps
Syntax for HA reserved management interfaces is as follows:
config system ha
set ha-direct enable
set ha-mgmt-status enable
config ha-mgmt-interfaces
edit 1
set interface <interface>
set dst <destination IP>
set gateway <IPv4 gateway>
set gateway6 <IPv6 gateway>
next
end
end
Configuration examples
Two FortiGate units are already operating in a cluster. On each unit, port8 is connected to the internal network through a
switch and configured as an out-of-band reserved management interface.
Configuration changes to the reserved management interface are not synchronized to other
cluster units.
To configure the primary unit's reserved management interface, configure an IP address and management access on
port8. Then, configure the necessary HA settings to enable the HA reserved management interface and its route. To
configure the secondary unit's reserved management interface, access the unit's CLI through the primary unit, and
configure an IP address, management access on port8, and the necessary HA settings. Configuration changes to the
reserved management interface are not synchronized to other cluster units.
To configure the primary unit reserved management interface to allow HTTPS, SSH, and ICMP access:
1. From a computer on the internal network, connect to the CLI at 10.11.101.100 on port2.
2. Change the port8 IP address and management access:
config system interface
edit port8
set ip 10.11.101.101/24
set allowaccess https ping ssh
next
end
3. Configure the HA settings for the HA reserved management interface by defining a default route to route to the
gateway 10.11.101.2:
config system ha
set ha-mgmt-status enable
config ha-mgmt-interfaces
edit 1
set interface port8
set gateway 10.11.101.2
next
end
end
You can now log into the primary unit's GUI by browsing to https://10.11.101.101. You can also log into the primary
unit's CLI by using an SSH client to connect to 10.11.101.101.
To configure secondary unit reserved management interfaces to allow HTTPS, SSH, and ICMP access:
1. From a computer on the internal network, connect to the primary unit's CLI.
2. Connect to the secondary unit with the following command:
execute ha manage <unit id> <username> <password>
set ip 10.11.101.102/24
set allowaccess https ping ssh
next
end
exit
4. Configure the HA settings for the HA reserved management interface by defining a default route to route to the
gateway 10.11.101.2:
config system ha
set ha-mgmt-status enable
config ha-mgmt-interfaces
edit 1
set interface port8
set gateway 10.11.101.2
next
end
end
You can now log into the secondary unit's GUI by browsing to https://10.11.101.102. You can also log into the
secondary unit's CLI by using an SSH client to connect to 10.11.101.102.
SNMP monitoring
The SNMP server can get status information from the cluster members. To use the reserved management interfaces,
you must add at least one HA direct management host to an SNMP community. If the SNMP configuration includes
SNMP users with user names and passwords, HA direct management must be enabled for the users.
To configure the cluster for SNMP management using the reserved management interfaces in the CLI:
2. Add an SNMP community with a host for the reserved management interface of each cluster member. The host
includes the IP address of the SNMP server.
config system snmp community
edit 1
set name "Community"
config hosts
edit 1
set ip 10.11.101.20 255.255.255.255
set ha-direct enable
next
end
next
end
To get CPU, memory, and network usage information from the SNMP manager for each cluster unit
using the reserved management IP addresses:
3. Get resource usage information for the primary unit using the OIDs:
4. Get resource usage information for the secondary unit using the MIB fields:
snmpget -v2c -c Community 10.11.101.102 fgHaStatsCpuUsage
snmpget -v2c -c Community 10.11.101.102 fgHaStatsMemUsage
snmpget -v2c -c Community 10.11.101.102 fgHaStatsNetUsage
5. Get resource usage information for the primary unit using the OIDs:
snmpget -v2c -c Community 10.11.101.102 1.3.6.1.4.1.12356.101.13.2.1.1.3.1
snmpget -v2c -c Community 10.11.101.102 1.3.6.1.4.1.12356.101.13.2.1.1.4.1
snmpget -v2c -c Community 10.11.101.102 1.3.6.1.4.1.12356.101.13.2.1.1.5.1
Enabling ha-mgmt-intf-only applies the local-in policy only to the VDOM that contains the reserved management
interface. The incoming interface is set to match any interface in the VDOM.
When NTP is enabled in an HA cluster, the primary unit will always be the unit to contact the NTP server and synchronize
system time to the secondary units over the HA heartbeat interface. However, in the event that the primary should
contact the NTP server over the HA reserved management interface, then the ha-direct option should be enabled
under the config system ha settings.
config system interface
edit port5
set ip 172.16.79.46 255.255.255.0
next
end
config system ha
set group-name FGT-HA
set mode a-p
set ha-mgmt-status enable
config ha-mgmt-interfaces
edit 1
set interface port5
set gateway 172.16.79.1
next
end
set ha-direct enable
end
config system ntp
set ntpsync enable
set syncinterval 5
end
In-band management
In-band management IP addresses are an alternative to reserved HA management interfaces, and do not require
reserving an interface exclusively for management access. They can be added to multiple interfaces on each cluster
unit.
The in-band management IP address is accessible from the network that the cluster interface is connected to. It should
be in the same subnet as the interface that you are adding it to. It cannot be in the same subnet as other interface
IP addresses.
In-band management interfaces support ping, HTTP, HTTPS, and SNMP administrative access options.
Primary and secondary units send packets differently from an interface with a management IP address configured:
l On the primary unit, packets are sent to destinations based on routing information.
l On secondary units, packets can only be sent to destinations with the same management IP address segment.
To add an in-band management IP address to port23 with HTTPS, SSH, and SNMP access:
You can upgrade the firmware on an HA cluster in the same way as on a standalone FortiGate. During a firmware
upgrade, the cluster upgrades the primary unit and all of the subordinate units to the new firmware image.
Before upgrading a cluster, back up your configuration (Configuration backups on page 59),
schedule a maintenance window, and make sure that you are using a supported upgrade path
(https://docs.fortinet.com/upgrade-tool).
Uninterrupted upgrade
To upgrade the cluster firmware without interrupting communication, the following steps are followed. These steps are
transparent to the user and the network, and might result in the cluster selecting a new primary unit.
1. The administrator uploads a new firmware image using the GUI or CLI. See Firmware on page 1861 for details.
2. The firmware is upgraded on all of the subordinate units.
3. A new primary unit is selected from the upgraded subordinates.
4. The firmware is upgraded on the former primary unit.
5. Primary unit selection occurs, according to the standard primary unit selection process.
If all of the subordinate units crash or otherwise stop responding during the upgrade process, the primary unit will
continue to operate normally, and will not be upgraded until at least one subordinate rejoins the cluster.
Interrupted upgrade
An interrupted upgrade upgrades all cluster members at the same time. This takes less time than an uninterrupted
upgrade, but it interrupts communication in the cluster. Interrupted upgrade is disabled by default.
config system ha
set uninterruptible-upgrade disable
end
In a multi-site FortiGate HA topology that uses managed FortiSwitches in a multi-chassis link aggregation group
(MCLAG) to connect between sites, HA heartbeat signals can be sent through the switch layer of the FortiSwitches,
instead of through back-to-back links between the heartbeat interfaces. This means that two fiber connections can be
used, instead of four (two back-to-back heartbeat fiber connections and two connections for the FortiSwitches). The
FortiSwitches can be different models, but must all support MCLAG and be running version 6.4.2 or later.
This example shows how to configure heartbeat VLANs to assign to the access ports that the heartbeat interfaces
connect to, passing over the trunk between the FortiSwitches on the two sites.
FortiGate HA is with two FortiGates in separate locations and the switch layer connection between the FortiSwitches is
used for the heartbeat signal.
a. On the FortiGate, go to WiFi & Switch Controller > FortiLink Interface and configure FortiLink:
c. Go to WiFi & Switch Controller > FortiSwitch VLANs and create switch VLANs that are dedicated to each
FortiGate HA heartbeat interface between the two FortiGates: Heartbeat VLAN 1000 and Heartbeat VLAN
1100.
d. Assign the native VLAN of the switch ports that are connected to the heartbeat ports to the created VLAN. Each
HA heartbeat should be in its own VLAN.
i. Go to WiFi & Switch Controller > FortiSwitch Ports.
ii. In the Native VLAN column for the heartbeat port that is connected to FSW-1, click the edit icon and select
the Heartbeat VLAN.
iii. In the Native VLAN column for the heartbeat port that is connected to FSW-2, click the edit icon and select
the Heartbeat2 VLAN.
e. On each FortiSwitch, enable MCLAG-ICL on the trunk port:
config switch trunk
edit D243Z17000032-0
set mclag-icl enable
next
end
3. Configure Site 2 the same as Site 1, except set the HA priority so that the FortiGate becomes the secondary.
4. Disconnect the physical connections for FortiGate HA and FortiLink interfaces on Site 2:
l Disconnect the cable on Site 2 FSW-1 ports 47 and 48.
l Disconnect the cable on Site 2 FSW-2 ports 47 and 48.
5. Connect cables between the FortiSwitch MCLAG in Site 1 and Site 2:
l Connect a cable from Site 1 FSW-1 port 12 to Site 2 FSW-1 port 22.
l Connect a cable from Site 1 FSW-2 port 10 to Site 2 FSW-2 port 20.
6. On all of the FortiSwitches, configure the auto-isl-port-group. The group must match on both sides.
a. Site 1 FSW-1:
Set members to the port that is connected to Site 2 FSW-1:
config switch auto-isl-port-group
edit 1
set members port12
next
end
b. Site 1 FSW-2:
Set members to the port that is connected to Site 1 FSW-1:
c. Site 2 FSW-1:
Set members to the port that is connected to Site 2 FSW-2:
config switch auto-isl-port-group
edit 1
set members port10
next
end
d. Site 2 FSW-2:
Set members to the port that is connected to Site 1 FSW-2:
config switch auto-isl-port-group
edit 1
set members port20
next
end
1. On both PC-1 and PC-2, access the internet and monitor traffic. The traffic should be going through the primary
FortiGate.
2. Perform a continuous ping to an outside IP address, then reboot any one of the FortiSwitches.
Traffic from both Site 1 and Site 2 to the internet should be recovered in approximately five seconds.
3. Perform a continuous ping to an outside IP address, then force an HA failover (see Force HA failover for testing and
demonstrations on page 1956).
Traffic from both Site 1 and Site 2 to the internet should be recovered in approximately five seconds.
4. After an HA failover, on the new primary FortiGate, go to WiFi & Switch Controller > Managed FortiSwitch.
The switch layer tiering will be changed so that the directly connected FortiSwitches are at the top of the topology.
Using a hardware switch to replace a physical switch is not recommended, as it offers no redundancy or interface
monitoring.
l If one FortiGate loses power, all of the clients connected to that FortiGate device cannot go to another device until
that FortiGate recovers.
l A hardware switch cannot be used as a monitor interface in HA. Any incoming or outgoing link failures on hardware
member interfaces will not trigger failover; this can affect traffic.
Examples
When using Hardware switch in HA environment, a client device connected to the hardware switch on the primary
FortiGate can communicate with client devices connected to the hardware switch on secondary FortiGates as long as
there is a direct connection between the two switches.
No configuration is required after setting up the hardware switches. If a client connected to both of the hardware switches
needs to reach destinations outside of the cluster, the firewall must be configured for it.
After configuring the hardware switches, PC1 and PC2 can now communicate with each other.
If client device needs to send traffic through the FortiGate, additional firewall configuration on the FortiGate is required.
All traffic from the hardware switches on either the primary or secondary FortiGate reaches the primary FortiGate first.
The traffic is then directed according to the HA mode and firewall configuration.
Traffic from PC1 and PC2 can now reach destinations outside of the FortiGate cluster.
VDOM exceptions
VDOM exceptions are settings that can be selected for specific VDOMs or all VDOMs that are not synchronized to other
HA members. This can be required when cluster members are not in the same physical location, subnets, or availability
zones in a cloud environment.
Some examples of possible use cases include:
l You use different source IP addresses for FortiAnalyzer logging from each cluster member. See Override
FortiAnalyzer and syslog server settings on page 1950 for more information.
l You need to keep management interfaces that have specific VIPs or local subnets that cannot transfer from being
synchronized.
l In a unicast HA cluster in the cloud, you use NAT with different IP pools in different subnets, so IP pools must be
exempt.
When a VDOM exception is configured, the object will not be synchronized between the primary and secondary devices
when the HA forms. Different options can be configured for every object.
When VDOM mode is disabled, the configured object is excluded for the entire device. To define a scope, VDOM mode
must be enabled and the object must be configurable in a VDOM.
VDOM exceptions are synchronized to other HA cluster members.
To configure VDOM exceptions:
config global
config system vdom-exception
edit 1
set object <object name>
set scope {all* | inclusive | exclusive}
set vdom <vdom name>
next
end
end
object The name of the configuration object that can be configured independently for
some or all of the VDOMs.
See Objects on page 1949 for a list of available settings and resources.
scope Determine if the specified object is configured independently for all VDOMs or a
subset of VDOMs.
l all: Configure the object independently on all VDOMs.
Objects
The following settings and resources can be exempt from synchronization in an HA cluster:
log.fortianalyzer.setting user.radius
log.fortianalyzer.override-setting system.interface*
log.fortianalyzer2.setting vpn.ipsec.phase1-interface*
log.fortianalyzer2.override-setting vpn.ipsec.phase2-interface*
log.fortianalyzer3.setting router.bgp*
log.fortianalyzer3.override-setting router.route-map*
log.fortianalyzer-cloud.setting router.prefix-list*
log.fortianalyzer-cloud.override-setting firewall.ippool*
log.syslogd.setting firewall.ippool6*
log.syslogd.override-setting router.static*
log.syslogd2.setting router.static6*
log.syslogd2.override-setting firewall.vip*
log.syslogd3.setting firewall.vip6*
log.syslogd3.override-setting system.sdwan*
log.syslogd4.setting system.saml*
log.syslogd4.override-setting router.policy*
system.central-management router.policy6*
system.csf
*
This setting can only be configured on cloud VMs.
In an HA cluster, secondary devices can be configured to use different FortiAnalyzer devices and syslog servers than the
primary device. VDOMs can also override global syslog server settings.
2. Set up a VDOM exception to enable setting the global syslog server on the secondary HA device:
config global
config system vdom-exception
edit 1
set object log.syslogd.setting
next
end
end
2. After the primary and secondary device synchronize, generate logs on the secondary device.
To confirm that logs are been sent to the syslog server configured on the secondary device:
1. On the primary device, retrieve the following packet capture from the secondary device's syslog server:
# diagnose sniffer packet any "host 172.16.200.55" 6
interfaces=[any]
filters=[host 172.16.200.55]
0x00c0 696f 6e22 2076 643d 2276 646f 6d31 2220 ion".vd="vdom1".
0x00d0 6576 656e 7474 696d 653d 3135 3834 3231 eventtime=158421
0x00e0 3234 3035 3835 3938 3335 3639 3120 747a 2405859835691.tz
0x00f0 3d22 2d30 3730 3022 206c 6f67 6465 7363 ="-0700".logdesc
0x0100 3d22 4f75 7464 6174 6564 2072 6570 6f72 ="Outdated.repor
0x0110 7420 6669 6c65 7320 6465 6c65 7465 6422 t.files.deleted"
0x0120 206d 7367 3d22 4465 6c65 7465 2031 206f .msg="Delete.1.o
0x0130 6c64 2072 6570 6f72 7420 6669 6c65 7322 ld.report.files"
2. Set up a VDOM exception to enable syslog-override in the secondary HA device root VDOM:
config global
config system vdom-exception
edit 1
set object log.syslogd.override-setting
set scope inclusive
set vdom root
next
end
end
3. In the VDOM, enable syslog-override in the log settings, and set up the override syslog server:
config root
config log setting
set syslog-override enable
end
config log syslog override-setting
set status enable
set server 172.16.200.44
set facility local6
set format default
end
end
After syslog-override is enabled, an override syslog server must be configured, as logs will not be sent to the global
syslog server.
2. After the primary and secondary device synchronize, generate logs in the root VDOM on the secondary device.
To confirm that logs are been sent to the syslog server configured for the root VDOM on the secondary
device:
1. On the primary device, retrieve the following packet capture from the syslog server configured in the root VDOM on
the secondary device:
# diagnose sniffer packet any "host 172.16.200.55" 6
interfaces=[any]
filters=[host 172.16.200.55]
0x00e0 3930 3537 3539 3334 3132 3632 2074 7a3d 905759341262.tz=
0x00f0 222d 3037 3030 2220 6c6f 6764 6573 633d "-0700".logdesc=
0x0100 224f 7574 6461 7465 6420 7265 706f 7274 "Outdated.report
0x0110 2066 696c 6573 2064 656c 6574 6564 2220 .files.deleted".
0x0120 6d73 673d 2244 656c 6574 6520 3220 6f6c msg="Delete.2.ol
0x0130 6420 7265 706f 7274 2066 696c 6573 22 d.report.files"
In an HA environment, the ha-direct option allows data from services such as syslog, FortiAnalyzer, SNMP, and
NetFlow to be routed over the outgoing interface.
The following example shows how NetFlow data can be routed over the HA management interface mgmt1.
1. On the primary unit (FortiGate A), configure the HA and mgmt1 interface settings:
(global) # config system ha
set group-name "test-ha"
set mode a-p
set password *********
set hbdev "port6" 50
set hb-interval 4
set hb-lost-threshold 10
set session-pickup enable
set ha-mgmt-status enable
config ha-mgmt-interfaces
edit 1
set interface "mgmt1"
next
end
set override enable
set priority 200
set ha-direct enable
end
(global) # config system interface
edit "mgmt1"
set ip 10.6.30.111 255.255.255.0
set allowaccess ping https ssh http telnet fgfm
set type physical
set dedicated-to management
set role lan
set snmp-index 1
next
end
2. On the secondary unit (FortiGate B), configure the HA and mgmt1 interface settings:
(global) # config system ha
set group-name "test-ha"
set mode a-p
set password *********
set hbdev "port6" 50
set hb-interval 4
set hb-lost-threshold 10
set session-pickup enable
set ha-mgmt-status enable
config ha-mgmt-interfaces
edit 1
set interface "mgmt1"
next
end
set override enable
set priority 100
set ha-direct enable
end
(global) # config system interface
edit "mgmt1"
set ip 10.6.30.112 255.255.255.0
set allowaccess ping https ssh http telnet fgfm
set type physical
set dedicated-to management
set role lan
set snmp-index 1
next
end
5. Verify that the NetFlow packets are being sent by the mgmt1 IP:
(vdom1) # diagnose sniffer packet any 'udp and port 2055' 4
interfaces=[any]
filters=[udp and port 2055]
8.397265 mgmt1 out 10.6.30.111.1992 -> 10.6.30.59.2055: udp 60
23.392175 mgmt1 out 10.6.30.111.1992 -> 10.6.30.59.2055: udp 188
23.392189 mgmt1 out 10.6.30.111.1992 -> 10.6.30.59.2055: udp 60
...
3 packets received by filter
0 packets dropped by kernel
6. On the secondary device (FortiGate B), change the priority so that it becomes the primary:
(global) # config system ha
set priority 250
end
7. Verify the NetFlow status on FortiGate A, which is using the new primary's mgmt1 IP:
(global) # diagnose test application sflowd 3
8. Verify that the NetFlow packets use the new source IP on FortiGate B:
(vdom1) # diagnose sniffer packet any 'udp and port 2055' 4
interfaces=[any]
filters=[udp and port 2055]
This command should only be used for testing, troubleshooting, maintenance, and
demonstrations.
Do not use it in a live production environment outside of an active maintenance window.
HA failover can be forced on an HA primary device. The device will stay in a failover state regardless of the conditions.
The only way to remove the failover status is by manually turning it off.
Syntax
Variable Description
<cluster_id> The cluster ID is 1 for any cluster that is not in virtual cluster mode, and can be 1
or 2 if virtual cluster mode is enabled.
Example
ses_pickup: disable
override: enable
Configuration Status:
FGT3HD3914800069(updated 3 seconds ago): in-sync
FGT3HD3914800153(updated 2 seconds ago): in-sync
System Usage stats:
FGT3HD3914800069(updated 3 seconds ago):
sessions=0, average-cpu-user/nice/system/idle=0%/0%/0%/100%, memory=30%
FGT3HD3914800153(updated 2 seconds ago):
sessions=38, average-cpu-user/nice/system/idle=0%/0%/0%/100%, memory=30%
HBDEV stats:
FGT3HD3914800069(updated 3 seconds ago):
port3: physical/1000auto, up, rx-bytes/packets/dropped/errors=16302442/43964/0/0,
tx=16053848/40454/0/0
port5: physical/1000auto, up, rx-bytes/packets/dropped/errors=18161941/54088/0/0,
tx=20615650/55877/0/0
FGT3HD3914800153(updated 2 seconds ago):
port3: physical/1000auto, up, rx-bytes/packets/dropped/errors=17033009/46641/0/0,
tx=15907891/40462/0/0
port5: physical/1000auto, up, rx-bytes/packets/dropped/errors=20617180/55881/0/0,
tx=18163135/54091/0/0
Primary: FortiGate-300D , FGT3HD3914800069, HA cluster index = 1
Secondary: FortiGate-300D , FGT3HD3914800153, HA cluster index = 0
number of vcluster: 1
vcluster 1: work 169.254.0.2
Primary: FGT3HD3914800069, HA operating index = 0
Secondary: FGT3HD3914800153, HA operating index = 1
There is an option in FortiOS to disable stateful SCTP inspection. This option is useful when FortiGates are deployed in a
high availability (HA) cluster that uses the FortiGate Clustering Protocol (FGCP) and virtual clustering in a multihoming
topology. In this configuration, the primary stream control transmission protocol (SCTP) path traverses the primary
FortiGate node by using its active VDOM (for example, VDOM1), and the backup SCTP path traverses the other passive
FortiGate node by using its active VDOM (for example, VDOM2).
When stateful SCTP inspection is enabled, SCTP heartbeat traffic fails by means of the backup path because the
primary path goes through a different platform and VDOM. Since there is no state sharing between VDOMs, the passive
FortiGate is unaware of the original SCTP session and drops the heartbeats because of no associated sessions. When
stateful SCTP inspection is disabled, the passive node permits the SCTP heartbeats to pass.
When set to enable, SCTP session creation without SCTP INIT is enabled. When set to disable, SCTP session
creation without SCTP INIT is disabled (this is the default setting):
config system settings
set sctp-session-without-init {enable | disable}
end
In this example, FGT_A and FGT_B are in HA a-p mode with two virtual clusters. Two primaries exist on different
FortiGate units. PC1 eth1 can access PC5 eth1 through VDOM1, and PC1 eth2 can access PC5 eth2 through VDOM2.
On PC5, to listen for an SCTP connection:
sctp_darn -H 172.16.200.55 -B 172.17.200.55 -P 2500 -l
An SCTP four-way handshake is on one VDOM, and a session is created on that VDOM. With the default configuration,
there is no session on any other VDOM, and the heartbeat on another path (another VDOM) is dropped. After enabling
sctp-session-without-init, the other VDOM creates the session when it receives the heartbeat, and the
heartbeat is forwarded:
config system settings
set sctp-session-without-init enable
end
After HA failover occurs, the IPS engine will resume processing ICCP sessions and keep the traffic going on the new
primary unit. session-pickup must be enabled in an active-passive cluster to pick up the ICCP sessions.
Example
The following example uses an active-passive cluster. See HA active-passive cluster setup on page 1924 for more
information.
To configure HA:
config system ha
set group-name "HA-APP"
set mode a-p
set password ************
set hbdev "port3" 100
set session-pickup enable
set override enable
end
When HA is working, the ICCP session information is stored in the HA session cache on the secondary FortiGate.
The ICCP session information can be found in the IPS session list and the session table on the primary FortiGate.
After HA failover, the IPS engine on the new primary picks up the related ICCP sessions and continues passing the
traffic. The HA session cache disappears on the new primary. The ICCP session now appears on the IPS session list
and session table on the new primary.
The server and client IPs, ports, and protocols remain the same.
npu_state=0x003c94 ips_offload
npu info: flag=0x81/0x81, offload=8/8, ips_offload=1/1, epid=71/71, ipid=134/132,
vlan=0x0000/0x0000
vlifid=134/132, vtag_in=0x0000/0x0000 in_npu=1/1, out_npu=1/1, fwd_en=0/0, qid=10/10
The server and client IPs, ports, and NPU state remain the same.
When a FortiGate VM secondary device is added to a cluster, the new secondary member can query the cluster about its
autoscale environment. FortiManager can then run this query on the new secondary member to update its autoscale
record.
From the secondary device, you can see cluster checksums and the primary device:
# diagnose sys ha checksum autoscale-cluster
================== FGTAZ000000000CD ==================
is_autoscale_master()=0
debugzone
global: 56 49 b3 02 f2 b7 5b 82 ec 2d c2 1a ff 80 8c 79
root: bf 18 cf 83 1e 04 c3 04 4c e4 66 bc 38 fe 3a dc
all: 77 06 d0 89 6e 06 c0 86 17 98 53 72 33 85 ae ff
checksum
global: 56 49 b3 02 f2 b7 5b 82 ec 2d c2 1a ff 80 8c 79
root: bf 18 cf 83 1e 04 c3 04 4c e4 66 bc 38 fe 3a dc
all: 77 06 d0 89 6e 06 c0 86 17 98 53 72 33 85 ae ff
================== FGVM04TM00000066 ==================
is_autoscale_master()=1
debugzone
global: 56 49 b3 02 f2 b7 5b 82 ec 2d c2 1a ff 80 8c 79
root: bf 18 cf 83 1e 04 c3 04 4c e4 66 bc 38 fe 3a dc
all: 77 06 d0 89 6e 06 c0 86 17 98 53 72 33 85 ae ff
checksum
global: 56 49 b3 02 f2 b7 5b 82 ec 2d c2 1a ff 80 8c 79
root: bf 18 cf 83 1e 04 c3 04 4c e4 66 bc 38 fe 3a dc
all: 77 06 d0 89 6e 06 c0 86 17 98 53 72 33 85 ae ff
================== FGVM00000000056 ==================
is_autoscale_master()=0
debugzone
global: 56 49 b3 02 f2 b7 5b 82 ec 2d c2 1a ff 80 8c 79
root: bf 18 cf 83 1e 04 c3 04 4c e4 66 bc 38 fe 3a dc
all: 77 06 d0 89 6e 06 c0 86 17 98 53 72 33 85 ae ff
checksum
global: 56 49 b3 02 f2 b7 5b 82 ec 2d c2 1a ff 80 8c 79
root: bf 18 cf 83 1e 04 c3 04 4c e4 66 bc 38 fe 3a dc
all: 77 06 d0 89 6e 06 c0 86 17 98 53 72 33 85 ae ff
================== FGTAZ0000000003D ==================
is_autoscale_master()=0
debugzone
global: 56 49 b3 02 f2 b7 5b 82 ec 2d c2 1a ff 80 8c 79
root: bf 18 cf 83 1e 04 c3 04 4c e4 66 bc 38 fe 3a dc
all: 77 06 d0 89 6e 06 c0 86 17 98 53 72 33 85 ae ff
checksum
global: 56 49 b3 02 f2 b7 5b 82 ec 2d c2 1a ff 80 8c 79
root: bf 18 cf 83 1e 04 c3 04 4c e4 66 bc 38 fe 3a dc
all: 77 06 d0 89 6e 06 c0 86 17 98 53 72 33 85 ae ff
In a cluster, the FGCP assigns virtual MAC addresses (VMACs) to each primary device interface. HA uses VMAC
addresses so that if a failover occurs, the new primary device interfaces will have the same VMAC addresses and IP
addresses as the failed primary device. As a result, most network equipment will identify the new primary device as the
same device as the failed primary device and still be able to communicate with the cluster.
If a cluster is operating in NAT mode, the FGCP assigns a different VMAC address to each primary device interface.
VLAN subinterfaces are assigned the same VMAC address as the physical interface that the VLAN subinterface is
added to. Redundant or 802.3ad aggregate interfaces are assigned the VMAC address of the first interface in the
redundant or aggregate list.
If a cluster is operating in transparent mode, the FGCP assigns a VMAC address to the primary device's management IP
address. Since you can connect to the management IP address from any interface, all FortiGate interfaces appear to
have the same VMAC address.
The MAC address of a reserved management interface does not change to a VMAC address; it keeps its original MAC
address.
A MAC address conflict can occur when two clusters are operating on the same network using the same group ID (see
Diagnosing packet loss). It is recommended that each cluster in the same network and broadcast domain uses a unique
group ID.
Failover
When the new primary device is selected after a failover, the primary device sends gratuitous ARP packets to update the
devices connected to the cluster interfaces (usually layer 2 switches) with the VMAC addresses. This is sometimes
called using gratuitous ARP packets (or GARP packets) to train the network. The gratuitous ARP packets sent from the
primary unit are intended to make sure that the layer 2 switch forwarding databases (FDBs) are updated as quickly as
possible.
Sending gratuitous ARP packets is not a requirement because connected devices will eventually learn of the new ports
to forward the packets to. However, many network switches will update their FDBs more quickly after a failover if the new
primary device sends gratuitous ARP packets.
arps <integer> Set the number of gratuitous ARPs; lower the value to reduce traffic, and increase
the value to reduce failover time (1 - 60, default = 5).
arps-interval <integer> Set the time between gratuitous ARPs; lower the value to reduce failover time,
and increase the value to reduce traffic, in seconds (1 - 20, default = 8).
gratuitous-arps {enable | Enable/disable gratuitous ARPs (default = enable).
disable}
link-failed-signal Enable/disable shutting down all interfaces for one second after a failover. Use if
{enable | disable} gratuitous ARPs do not update the network (default = disable).
If you disable sending gratuitous ARP packets, it is recommended to enable the link-failed-signal setting. The
linked-fail-signal alerts the connected switches of a failed link, which triggers them to react immediately to the
changes.
For more information about gratuitous ARP packets see RFC 826 and RFC 3927.
Determining VMAC addresses
Group ID Hexadecimal ID
0: 0 % 256 = 0 00
... ...
The <vcluster_integer> is 00 for virtual cluster 1, and 20 for virtual cluster 2. If VDOMs are not enabled, HA sets the
virtual cluster to 1 and by default all interfaces are in the root VDOM. Including virtual cluster and VDOM factors in the
VMAC address formula means that the same formula can be used whether or not VDOMs and virtual clustering are
enabled.
The <idx> is the index number of the interface. Interfaces are numbered from 0 to x (where x is the number of
interfaces). Interfaces are numbered according to their map order. The first interface has an index of 0. The second
interface in the list has an index of 1, and so on.
The following table compares the VMAC addresses for interfaces with an unchanged HA group ID (0) with VDOMs not
enabled and interfaces when the group ID is changed to 34:
Interface VMAC address with unchanged group VMAC address with changed group ID
ID (0) (34)
Using the same interfaces, a cluster with VDOMs is enabled and the group ID changes to 35. The root VDOM contains
port5 and port6 (virtual cluster 1), and vdom_1 contains port7 and port8 (virtual cluster 2). The interfaces have the
following VMAC addresses:
port5 00-09-0f-09-23-0a
port6 00-09-0f-09-23-0b
port7 00-09-0f-09-23-2c
port8 00-09-0f-09-23-2d
Displaying VMAC addresses
Each FortiGate physical interface has two MAC addresses: the permanent and current hardware addresses. The
permanent hardware address cannot be changed, as it is the actual MAC address of the interface hardware. The current
hardware address can be changed, as it is the address seen by the network.
In an operating cluster, the current hardware address of each cluster device interface is changed to the HA virtual MAC
address by the FGCP. The macaddr option is not available for a functioning cluster.
A network can experience packet loss when two FortiGate HA clusters are deployed in the same broadcast domain due
to MAC address conflicts. You can resolve the MAC address conflict by changing the HA group ID (or cluster ID)
configuration of the two clusters.
You can diagnose packet loss by pinging from one cluster to the other, or by pinging both of the clusters from a device
within the broadcast domain.
1. On Cluster_1 and Cluster_2, check the VMAC address (Current_HWaddr) used in an interface on the primary
device:
# diagnose hardware deviceinfo nic <interface>
If the group prefix and group hexadecimal ID are identical, there will be MAC address conflicts.
2. Change one of the clusters to use a different group ID:
config system ha
set group-id <integer>
end
Troubleshoot an HA formation
The requirement to have the same generation is done as a best practice as it avoids issues
that can occur later on. If you are unsure if the FortiGates are from the same generation,
please contact customer service.
One member keeps shutting down during HA setup (hard drive failure):
If one member has a hard drive failure but the other does not, the one with the hard drive failure will be shut down during
HA setup. In this case, RMA the member to resolve the issue.
A split brain scenario occurs when two or more members of a cluster cannot communicate with each other on the
heartbeat interface, causing each member to think it is the primary. As a result, each member assumes the primary HA
role and applies the same IP and virtual MAC addresses on its interfaces. This causes IP and MAC conflicts on the
network, and causes flapping on L2 devices when they learn the same MAC address on ports connected to different
FortiGates.
A split brain scenario is usually caused by a complete lost of the heartbeat link or links. This can be a physical
connectivity issue, or less commonly, something blocking the heartbeat packets between the HA members. Another
cause is congestion and latency in the heartbeat links that exceeds the heartbeat lost intervals and thresholds.
The following are common symptoms of a split brain scenario:
l The connections to the FortiGates in the cluster work intermittently when trying to connect with administrative
access.
l Sessions cannot be established through the FortiGate, and the traffic drops.
l When logging in to the FortiGates using the console, get system ha status shows each FortiGate as the
primary.
To resolve a split brain scenario:
l Be physically on-site with the FortiGates (recommended). If this is not possible, connect to the FortiGates using
console access.
l Identify the heartbeat ports, and verify that they are physically connected and up.
l Verify that heartbeat packets are being sent and received on the heartbeat ports.
l Verify that the HA configurations match between the HA members. The HA mode, group-name, group-id, and
password settings should be the same. Different group-id values will result in different virtual MAC addresses,
which might not cause a MAC conflict. However, an IP conflict can still occur.
l If everything seems to be in working order, run get system ha status to verify that HA has formed
successfully.
To avoid a split brain scenario:
l In a two-member HA configuration, use back-to-back links for heartbeat interface instead of connecting through a
switch.
l Use redundant HA heartbeat interfaces.
l In a configuration where members are in different locations, ensure the heartbeat lost intervals and thresholds are
longer than the possible latency in the links.
FGSP
Standalone FortiGates or FGCP clusters can be integrated into the load balancing configuration using the FortiGate
Session Life Support Protocol (FGSP) in a network where traffic is load balanced by an upstream load balancer and
scanned by downstream FortiGates. FGSP can perform session synchronization of IPv4 and IPv6 TCP, SCTP, UDP,
ICMP, expectation, and NAT sessions to keep the session tables synchronized on all entities. If one of the FortiGates
fails, the upstream load balancer should detect the failed member and stop distributing sessions to it. Session failover
occurs and active sessions fail over to the peers that are still operating. Traffic continues to flow on the new peer without
data loss because the sessions are synchronized.
The FortiGates in FGSP operate as peers that process traffic and synchronize sessions. An FGSP deployment can
include two to 16 standalone FortiGates, or two to 16 FortiGate FGCP clusters of two members each. Adding more
FortiGates increases the CPU and memory required to keep all of the FortiGates synchronized, and it increases network
synchronization traffic. Exceeding the numbers of members is not recommended and may reduce overall performance.
By default, FGSP synchronizes all IPv4 and IPv6 TCP sessions, and IPsec tunnels. You can optionally add filters to
control which sessions are synchronized, such as synchronizing packets from specific source and destination
addresses, source and destination interfaces, or services.
FGSP is primarily used instead of FGCP when external load balancers are part of the topology, and they are responsible
for distributing traffic amongst the downstream FortiGates. FGSP provides the means to synchronize sessions between
the FortiGate peers without needing a primary member to distribute the sessions like in FGCP active-active mode. If the
external load balancers direct all sessions to one peer, the effect is similar to active-passive FGCP HA. If external load
balancers balance traffic to both peers, the effect is similar to active-active FGCP HA. The load balancers should be
configured so that all packets for any given session are processed by the same peer, including return packets whenever
possible.
Session pickup
Session pickup is an optional setting that can be enabled to synchronize connectionless (UDP and ICMP) sessions,
expectation sessions, and NAT sessions. If session pickup is not enabled, the FGSP does not share session tables for
the particular session type, and sessions do not resume after a failover. All sessions are interrupted by the failover and
must be re-established at the application level. Many protocols can successfully restart sessions with little, or no, loss of
data. Others may not recover as easily. Enable session pickup for sessions that may be difficult to reestablish. Since
session pickup requires FortiGate memory and CPU resources, only enable this feature for sessions that need to
synchronize.
The session synchronization link is an optional configuration that allows peers to synchronize sessions over a dedicated
interface instead of the interface in which the peer IP is routed. In this configuration, communications occur over L2
instead of L3. Configuring session synchronization links is recommended when you want to minimize traffic over the
peering interface when there are many sessions that need to be synchronized.
Expectation sessions
FortiOS session helpers keep track of the communication of layer 7 protocols, such as FTP and SIP, that have control
sessions and expectation sessions. The control sessions establish the link between the server and client, and negotiate
the ports and protocols that will be used for data communications. The session helpers then create expectation sessions
through the FortiGate for the ports and protocols negotiated by the control session.
The expectation sessions are the sessions that actually communicate data. For FTP, the expectation sessions transmit
files being uploaded or downloaded. For SIP, the expectation sessions transmit voice and video data. Expectation
sessions usually have a timeout value of 30 seconds. If the communication from the server is not initiated within 30
seconds, the expectation session times out and traffic will be denied.
By default, FGSP does not synchronize expectation sessions; if a failover occurs, the sessions will have to be restarted.
config system ha
set session-pickup enable
set session-pickup-expectation enable
end
The FortiGate Session Life Support Protocol (FGSP) is a proprietary HA solution for only sharing sessions between
entities based on peer-to-peer communications. The entities could be standalone FortiGates or an FGCP cluster. This
example uses two peer FortiGates. The load balancer is configured to send all sessions to Peer_1, and if Peer_1 fails, all
traffic is sent to Peer_2.
These instructions assume that all FortiGates have been factory reset.
1. Make all the necessary connections as shown in the topology diagram.
2. On Peer_1, configure the peer IP in which this device will peer with:
config system cluster-sync
edit 1
set peerip 10.10.10.2
next
end
If there are multiple peer IPs from the same peer, enter them as separate entries. If there are multiple peers, enter
the IP of each peer in separate entries. See Optimizing FGSP session synchronization and redundancy on page
1982 for an example.
Sessions by default will be synchronized over layer 3 on the interface in which the current unit connects to the peer's
IP.
3. On Peer_2, configure session synchronization:
config system cluster-sync
edit 1
set peerip 10.10.10.1
next
end
4. Configure identical firewall policies on each peer, such as for traffic going from the same incoming interface (port1)
to the outgoing interface (port2).
3. Enter the same commands on Peer_2 to verify if the same session information appears.
Optional filters
Filters can be added to synchronize certain types of sessions that meet the filter criteria.
Filter examples
Session pickup
You can enable this setting to synchronize connectionless (UDP and ICMP) sessions, expectation sessions, and NAT
sessions. If session pickup is not enabled, the FGSP does not share session tables for the particular session type, and
sessions do not resume after a failover.
config system ha
set session-pickup enable
set session-pickup-connectionless enable
end
Session synchronization
You can specify interfaces used to synchronize sessions in L2 instead of L3 using the session-sync-dev setting. For
more information about using session synchronization, see Session synchronization interfaces in FGSP on page 1975.
VDOM synchronization
When multi-VDOM mode is enabled, you can specify the peer VDOM and the synchronized VDOMs. The peer VDOM
contains the session synchronization link interface on the peer unit. The synchronized VDOMs' sessions are
synchronized using this session synchronization configuration.
Synchronizing sessions between FGCP clusters is useful when data centers in different locations are used for load
balancing, and traffic must be shared and flow freely based on demand.
There are some limitations when synchronizing sessions between FGCP clusters:
l All FortiGates must have the same model and generation, hardware configuration, and FortiOS version.
l A total of 16 clusters can share sessions.
1. Configure the two clusters (see HA active-passive cluster setup on page 1924 or HA active-active cluster setup on
page 1926).
2. On cluster A, configure the peer IP for the interface:
config system interface
edit "port5"
set vdom "root"
set ip 10.10.10.1 255.255.255.0
set allowaccess ping https ssh snmp http telnet
next
end
In this example, cluster A uses port5 and its IP address, 10.10.10.1, is reachable from another cluster.
The standalone-group-id must match between FGSP members. The group-member-id is unique for each
FGCP cluster. session-sync-dev is an optional command to specify the interfaces to sync sessions.
5. On cluster B, configure the peer IP for the interface:
config system interface
edit "port5"
set vdom "root"
set ip 10.10.10.2 255.255.255.0
set allowaccess ping https ssh snmp http telnet
next
end
In this example, cluster B uses port5 and its IP address, 10.10.10.2, is reachable from another cluster.
6. On cluster B, configure cluster and session synchronization:
config system cluster-sync
edit 1
set peerip 10.10.10.1
next
end
When peering over FGSP, by default, the FortiGates or FGCP clusters share information over L3 between the interfaces
that are configured with Peer IP addresses. When a session synchronization interface is configured and FGSP peers are
directly connected on this interface, then session synchronization is done over L2, only falling back to L3 if the session
synchronization interface becomes unavailable.
When using a session synchronization interface, the synchronization process is offloaded to the kernel. A fast,
dedicated, and stable L2 connection should be used for the session synchronization interface between the FGSP peers.
For redundancy, multiple synchronization interfaces can be configured.
To provide full redundancy, FGCP clusters can be used in FGSP peering. This is called FGCP over FGSP.
The layer2-connection setting is for forwarded traffic between FGSP peers. Set it to available if the peer
interface user for traffic forwarding is directly connected and supports L2 forwarding. See UTM inspection on asymmetric
traffic in FGSP on page 1977 for more information.
The following topology uses multiple session synchronization interfaces with a full mesh backbone to prevent any single
point of failure.
The state diagram summarizes the session synchronization of a TCP session. It assumes that the session is connected
over FGCP Cluster 1 and processed entirely by the primary unit, Cluster-1A.
In the previous topology, if any single session synchronization link fails on the primary member of each cluster, session
synchronization will continue on the second link from the pair of session of session synchronization interfaces.
If the second link on the primary member of the same cluster then fails, L2 session synchronization over the session
synchronization interface stops, and synchronization fails over to L3 between the peer IP links.
If the Peer IP link then fails, the FGSP peers are effectively disconnected, and no session synchronization will occur.
When traffic passes asymmetrically through FGSP peers, UTM inspection can be supported by always forwarding traffic
back to the session owner for processing. The session owner is the FortiGate that receives the first packet of the
session.
In this example, traffic from the internal network first hits FGT_1, but the return traffic is routed to FGT_2. Consequently,
traffic bounces from FGT_2 port1 to FGT_1 port1 using FGT_1’s MAC address. Traffic is then inspected by FGT_1.
To configure FTG_1:
next
end
To configure FTG_2:
Results
Capture packets on FGT_2 to see that traffic bounced from FGT_2 to FGT_1 over the traffic interface.
FGT_2 # diagnose sniffer packet any 'host 10.1.100.15 and host 172.6.200.55' 4
interfaces=[any]
filters=[host 10.1.100.15 and host 172.16.200.55]
91.803816 port1 in 172.16.200.55.80 -> 10.1.100.15.40008: syn 2572073713 ack 261949279
92.800480 port1 in 172.16.200.55.80 -> 10.1.100.15.40008: syn 2572073713 ack 261949279
92.800486 port1 out 172.16.200.55.80 -> 10.1.100.15.40008: syn 2572073713 ack 261949279
92.800816 port1 in 172.16.200.55.80 -> 10.1.100.15.40008: syn 2572073713 ack 261949279
92.800818 port1 out 172.16.200.55.80 -> 10.1.100.15.40008: syn 2572073713 ack 261949279
When traffic passes asymmetrically through FGSP peers, UTM inspection can be supported by always forwarding traffic
back to the session owner for processing. The session owner is the FortiGate that receives the first packet of the
session.
For networks where L2 connectivity is not available, such as cloud environments, traffic bound for the session owner are
forwarded through the peer interface using a UDP connection.
In this example, traffic from the internal network first hits FGT_1, but the return traffic is routed to FGT_2. Consequently,
return traffic is packed and sent from FGT_2 to FGT_1 using UDP encapsulation between two peer interfaces (port 3).
Traffic is then inspected by FGT_1.
To configure FTG_1:
To configure FTG_2:
In scenarios where asymmetric routing between FGSP members occurs, the return traffic can be encrypted and routed
back to the session owner on Layer 3 (L3).
By using session-sync-dev to offload session synchronization processing to the kernel, FGSP session
synchronization can be supported to handle heavy loads.
Topology
In this topology, there are three FGSP peer groups for each FortiGate. Sessions are synchronized between each
FortiGate and its peer groups. Redundancy is achieved by using two dedicated session sync device links for each peer
setup. There are a total of six peer IPs for each session synchronization device link in each FGSP peer. When one link is
fails, session synchronization is not affected.
For optimization, sync-packet-balance is enabled to distribute synchronization packets processing to multiple
CPUs. The session synchronization process is offloaded to the kernel, and sessions are synchronized over layer 2 over
the connected interfaces (set session-sync-dev "port5" "port6"). Jumbo frame MTU 9216 is configured on
each session synchronization device link to reduce the number of packets; however, setting MTU to 9216 is entirely
optional.
To configure FGT_A:
1. Configure HA:
config system ha
set sync-packet-balance enable
set session-pickup enable
set session-pickup-connectionless enable
set session-pickup-expectation enable
set session-pickup-nat enable
end
To configure FGT_B:
1. Configure HA:
config system ha
set sync-packet-balance enable
set session-pickup enable
set session-pickup-connectionless enable
set session-pickup-expectation enable
set session-pickup-nat enable
end
To configure FGT_C:
1. Configure HA:
config system ha
set sync-packet-balance enable
set session-pickup enable
set session-pickup-connectionless enable
set session-pickup-expectation enable
To configure FGT_D:
1. Configure HA:
config system ha
set sync-packet-balance enable
Split-brain situations occur in a scenario where session synchronization is down between two FGSP peers. This can
have an effect if IKE fails over from one unit to another, causing the tunnel to be invalid due to the IKE session and role
being out of sync, and ESP anti-replay detection. In split-brain situations, the IKE monitor provides a mechanism to
maintain the integrity of the state tables and primary/secondary roles for each VPN gateway. It continues to provide fault
tolerance by keeping track of the timestamp of the latest received traffic, and it uses the ESP sequence number jump
ahead value to preserve the sequence number per gateway. Once the link is up, the cluster resolves the role and
synchronizes the session and IKE data. During this process, if the IKE fails over from one unit to another, the tunnel will
remain valid and traffic continues to flow.
Example
In this example, FortiGate A and FortiGate B are FGSP peers with port3 as the session synchronization link. The
FortiGates act as IPsec dial-up servers and PCs on the 10.1.100.0 subnet are the IPsec dial-up clients. Router A acts as
the external load balancer for IKE sessions between the FortiGates. Dynamic routing OSPF is configured for the
FortiGates and routers.
When PC2 and other clients form IPsec dial-up tunnels to the FGSP peers, these tunnels terminate on either FortiGate A
or FortiGate B, not both. For each tunnel, one FortiGate is the primary and the other is the secondary.
When the session synchronization link goes down, the FGSP split-brain scenario occurs. Without using the IKE monitor
mechanism, the IKE and ESP information becomes out of sync between the two FortiGates. The secondary FortiGate
for a tunnel does not receive any information about updated tunnel status. If there is a failover and tunnel traffic begins to
flow to the secondary FortiGate, the tunnel will be invalidated because its state tables for that session are out of sync.
By using the IKE monitor when a split-brain scenario occurs, each unit starts periodically monitoring traffic flows and
managing the sequence number jump ahead on standby units. Using a combination of timers with ESP sequence
number jump ahead lets the units maintain integrity of the shared SA runtime state table, including ESP anti-replay
sequence numbers.
Once the session synchronization link is up, the FGSP peers synchronize the state tables and resume regular
operations.
The following steps are recommended to upgrade the firmware of FortiGates in an FGSP deployment. Follow these
steps whether or not you have enabled standalone configuration synchronization.
This example FGSP deployment has two FortiGates, FGT-1 and FGT-2.
FGSP HA deployments are generally meant for interoperating between FortiGates with the same model and firmware
version. However, situations may arise where individual members or FGCP clusters running over FGSP use different
models or firmware versions. For example, to avoid downtime while upgrading the members, some FGSP members or
clusters may be upgraded first and then re-join the FGSP peers after a successful upgrade. Or while performing
maintenance, sessions may need to be offloaded to a temporary member or FGCP cluster of a different model.
Being able to perform FGSP session synchronization between members of different models or firmware versions is
helpful to transition the traffic smoothly and causes minimal disruptions. This topic outlines requirements to be aware of
before assessing whether FGSP session synchronization may work between members with different models or firmware
versions.
The general guideline is to only use FortiGate models in a similar tier and family. Vastly different models have different
performance and capabilities, which may not be compatible. The goal is for two models to have similar capabilities so
that data structures used in session synchronization will match, and are capable of delivering similar performance.
When considering FGSP session synchronization between two FortiGates, ensure that:
l The FortiGates use the same 32-bit kernel or 64-bit kernel.
l The FortiGates use the same type of CPU (such as ARM or x86).
l The device memory should be similar in size. If the FortiGates have vastly different memory sizes, their
performance may be different if one device supports more sessions than the other.
l The configurations related to session tables should match. For example, the logical names used in firewall policies,
IPsec interface names, VDOM names, firewall policy tables, and so on.
When operating in FGSP, the firmware needs to have compatible data structures and session synchronization packet
headers. The firmware is generally able to handle different data structures between old and new FortiOS sessions.
Session synchronization packets are typically the same between versions.
Note the following exceptions and guidelines when assessing FGSP session synchronization compatibility between
different firmware versions:
l FortiOS 7.0.2 added support for widening the HA virtual MAC address range. This change updated the session
synchronization packet header structure.
l FortiGates running 7.0.2 or later, and FortiGates running 7.0.1 or earlier will not accept session synchronization
name was added to the sessions. When the sessions are synchronized to an older firmware version, the PFCP
profile name will be lost and the sessions will not be able to handle the traffic as they would in 7.0.1.
Session synchronization between FGSP members uses an L3 connection over the peer IP by default.
Session synchronization between FGSP members uses an L2 connection when a session synchronization interface
(session-sync-dev) is used. The synchronization process is also offloaded to the kernel.
Applying the session synchronization filter only between FGSP peers in an FGCP over
FGSP topology
When the session synchronization filter is applied on FGSP, the filter will only affect sessions synchronized between the
FGSP peers. When virtual clustering is used, sessions synchronized between each virtual cluster can also be
synchronized to FGSP peers. All peers' syncvd must be in the same HA virtual cluster.
Example
In this example, there is a simplified configuration where there is no router or load balancer performing balancing
between the FGSP peers, but it demonstrates the following:
l When sessions pass through FGCP A-P Cluster 1, all sessions are synchronized between the FGT_A and FGT_B
regardless of the session synchronization filter.
l Session synchronization between the FGSP peers (FGCP A-P Cluster 1 and 2) only occurs for the service specified
in the filter, which is HTTP/80.
l The preceding behavior is applicable when virtual clustering is configured. This example focuses on vdom2, which
belongs to vcluster2. FGT_A is the primary for vcluster2.
Each FGSP A-P cluster is connected on ha as the FGCP cluster heartbeat device. The FGSP peers are connected on
mgmt over 10.1.1.1-2/24.
1. Configure FGCP A-P Cluster 1 (use the same configuration for FGT_A and FGT_B):
config system ha
set group-id 146
set group-name "FGT_HA1"
set mode a-p
set hbdev "wan2" 100 "ha" 50
set session-pickup enable
set vcluster-status enable
config vcluster
edit 1
set override enable
set priority 25
set monitor "wan1" "port1"
set vdom "root"
next
edit 2
set override disable
set priority 150
set monitor "wan1"
set vdom "vdom2" "vdom1"
next
end
end
2. Configure FGCP A-P Cluster 2 (use the same configuration for FGT_C and FGT_D):
config system ha
set group-id 200
set group-name "FGT_HA2"
1. Configure FGT_A.
a. Configure the FGSP cluster attributes:
config system standalone-cluster
set standalone-group-id 1
set group-member-id 1
end
per_ip_shaper=
class_id=0 ha_id=1:0 policy_dir=0 tunnel=/ vlan_cos=0/255
state=log dirty may_dirty npu f00 syn_ses
statistic(bytes/packets/allow_err): org=0/0/0 reply=0/0/0 tuples=2
tx speed(Bps/kbps): 0/0 rx speed(Bps/kbps): 0/0
orgin->sink: org pre->post, reply pre->post dev=11->7/7->11 gwy=0.0.0.0/0.0.0.0
hook=post dir=org act=snat 10.1.100.22:50234->172.16.200.55:22(172.16.200.1:50234)
hook=pre dir=reply act=dnat 172.16.200.55:22->172.16.200.1:50234(10.1.100.22:50234)
pos/(before,after) 0/(0,0), 0/(0,0)
misc=0 policy_id=7 pol_uuid_idx=0 auth_info=0 chk_client_info=0 vd=2
serial=000a7d90 tos=ff/ff app_list=0 app=0 url_cat=0
rpdb_link_id=00000000 ngfwid=n/a
npu_state=0x4000000
npu info: flag=0x00/0x00, offload=0/0, ips_offload=0/0, epid=0/0, ipid=0/0,
vlan=0x0000/0x0000
vlifid=0/0, vtag_in=0x0000/0x0000 in_npu=0/0, out_npu=0/0, fwd_en=0/0, qid=0/0
no_ofld_reason:
total session 2
per_ip_shaper=
class_id=0 ha_id=1:0 policy_dir=0 tunnel=/ vlan_cos=0/255
state=log dirty may_dirty npu f00 syn_ses
statistic(bytes/packets/allow_err): org=0/0/0 reply=0/0/0 tuples=2
tx speed(Bps/kbps): 0/0 rx speed(Bps/kbps): 0/0
orgin->sink: org pre->post, reply pre->post dev=11->7/7->11 gwy=0.0.0.0/0.0.0.0
hook=post dir=org act=snat 10.1.100.22:44260->172.16.200.55:80(172.16.200.1:44260)
hook=pre dir=reply act=dnat 172.16.200.55:80->172.16.200.1:44260(10.1.100.22:44260)
pos/(before,after) 0/(0,0), 0/(0,0)
misc=0 policy_id=7 pol_uuid_idx=0 auth_info=0 chk_client_info=0 vd=2
serial=000a79df tos=ff/ff app_list=0 app=0 url_cat=0
rpdb_link_id=00000000 ngfwid=n/a
npu_state=0x4000000
npu info: flag=0x00/0x00, offload=0/0, ips_offload=0/0, epid=0/0, ipid=0/0,
vlan=0x0000/0x0000
vlifid=0/0, vtag_in=0x0000/0x0000 in_npu=0/0, out_npu=0/0, fwd_en=0/0, qid=0/0
no_ofld_reason:
total session 1
Session synchronization filters are designed to be configured symmetrically on all of the FGSP
peers. In cases where the filters are configured asymmetrically, note the following differences:
l In an FGCP over FGSP topology, session filtering will be applied on the FGSP peer that
peer that has the filtering configured and is sending out the session synchronization.
You can configure synchronization from one standalone FortiGate to another standalone FortiGate (standalone-
config-sync). With the exception of some configurations that do not sync (settings that identify the FortiGate to the
network), the rest of the configurations are synced, such as firewall policies, firewall addresses, and UTM profiles.
This option is useful in situations when you need to set up FGSP peers, or when you want to quickly deploy several
FortiGates with the same configurations. You can set up standalone-config-sync for multiple members.
Limitations
When standalone configuration synchronization is enabled, there are some limitations, including but not limited to the
following:
l Network interruptions occur during firmware upgrades: when upgrading the firmware, all members in the
standalone-config-sync group are upgraded simultaneously. This creates downtime if the FortiGates are the
only outgoing gateway in the network. We recommend disabling the option before upgrading firmware.
l Some unwanted configurations might be synced: the current design and implementation of standalone-config-
sync is based on requirements from specific customers. Thus, some users may find that unwanted parts of the
configurations are synced. Should this occur, we recommend disabling the option and modifying those
configurations manually.
l The wrong primary device might be selected accidentally: standalone-config-sync is derived from the HA
primary unit selection mechanism. All members in the group will join the selection process in the same way as a the
HA cluster selection process. It is important to select the correct device as the primary, otherwise the wrong device
could be selected and existing configurations could be overwritten.
Two or more standalone FortiGates should be connected to each other with one or more heartbeat interfaces, either
back-to-back or via a switch. In the following example, the device supplying the configurations is called "conf-prim," and
the devices receiving the configurations are called "conf-secos."
If all members are in-sync, this means all members share the same configurations, except those that should not
be synced. If any members are out-of-sync, this means the member failed to sync with the primary device.
The following topic provides more information about standalone configuration synchronization:
l Layer 3 unicast standalone configuration synchronization on page 1999
Unicast standalone configuration synchronization is supported on layer 3, allowing peers to be synchronized in cloud
environments that do not support layer 2 networking. Configuring a unicast gateway allows peers to be in different
subnets.
Example
In this example, two FortiGates in different subnets are connected through a unicast gateway. Both cluster members use
the same port for the heartbeat interface.
1. Configure FortiGate A:
config system ha
set group-name "testcs"
set hbdev "port3" 50
set standalone-config-sync enable
config unicast-peers
edit 1
set peer-ip 10.1.100.72
next
end
set override enable
set priority 200
set unicast-status enable
set unicast-gateway 172.16.200.74
end
2. Configure FortiGate B:
config system ha
set group-name "testcs"
set hbdev "port3" 50
set standalone-config-sync enable
config unicast-peers
edit 1
set peer-ip 172.16.200.71
next
end
set override enable
set priority 100
set unicast-status enable
set unicast-gateway 10.1.100.74
end
is_manage_primary()=1, is_root_primary()=1
debugzone
global: 4f 2c a2 04 07 57 46 c4 47 28 ca d2 5a c5 98 ee
root: 16 af 5d a4 ac cf a5 4b b7 22 93 ce f9 02 68 bc
all: 6e 28 7f 8a 74 f7 37 43 8f 32 73 68 1e d6 ca cd
checksum
global: 4f 2c a2 04 07 57 46 c4 47 28 ca d2 5a c5 98 ee
root: 16 af 5d a4 ac cf a5 4b b7 22 93 ce f9 02 68 bc
all: 6e 28 7f 8a 74 f7 37 43 8f 32 73 68 1e d6 ca cd
is_manage_primary()=0, is_root_primary()=1
debugzone
global: 4f 2c a2 04 07 57 46 c4 47 28 ca d2 5a c5 98 ee
root: 16 af 5d a4 ac cf a5 4b b7 22 93 ce f9 02 68 bc
all: 6e 28 7f 8a 74 f7 37 43 8f 32 73 68 1e d6 ca cd
checksum
global: 4f 2c a2 04 07 57 46 c4 47 28 ca d2 5a c5 98 ee
root: 16 af 5d a4 ac cf a5 4b b7 22 93 ce f9 02 68 bc
all: 6e 28 7f 8a 74 f7 37 43 8f 32 73 68 1e d6 ca cd
5. Verify that configuration changes on the primary FortiGate are synchronized to the secondary FortiGate:
a. Adjust the administrator timeout value on FortiGate A:
config system global
set admintimeout 100
end
VRRP
A Virtual Router Redundancy Protocol (VRRP) configuration can be used as a high availability solution to ensure that a
network maintains connectivity with the internet (or with other networks) even if the default router for the network fails. If
a router or a FortiGate fails, all traffic to this device transparently fails over to another router or FortiGate that takes over
the role of the failed device. If the failed device is restored, it will take over processing the network traffic.
FortiOS supports VRRP versions 2 and 3. VRRP domains can be created, which can include multiple FortiGates and
other VRRP-compatible routers. Different FortiGate models can be added to the same VRRP domain.
FortiOS supports IPv4 and IPv6 VRRP, so IPv4 and IPv6 VRRP virtual routers can be added to the same interface.
FortiGates can quickly and easily integrate into a network that has already deployed VRRP.
The most common VRRP application is to provide redundant default routers between an internal network and the
internet. The default routers can be FortiGates or any routers that support VRRP.
Two or more FortiGate interfaces or routers must be configured with the same virtual router ID and IP address so they
can automatically join the same VRRP domain. Priorities must be assigned to each FortiGate interface or router in the
VRRP domain. All of the routers in the VRRP domain should have different priorities. One FortiGate interface or router
must have the highest priority to become the primary router. The other FortiGates or routers in the domain are assigned
lower priorities and become backups. If the primary router fails, VRRP automatically fails over to the router in the domain
with the next highest priority.
To configure VRRP:
1. Add a virtual VRRP router to the internal interface of each FortiGate and/or router. This adds the FortiGates and
routers to the same VRRP domain.
2. Set the VRRP IP address of the domain to the internal network default gateway IP address.
3. Set the priorities.
See Adding IPv4 and IPv6 virtual routers to an interface on page 2003 Single-domain VRRP example on page 2010, and
Multi-domain VRRP example on page 2011 for configuration examples.
During normal operations, all traffic from the internal network to the internet passes through the primary VRRP router.
The primary router also sends VRRP advertisement messages to the backup routers. A backup router will not attempt to
become a primary router while receiving these messages. If the primary router fails, the backup router with the highest
priority becomes the new primary router after a short delay. All packets sent to the default route are now sent to the new
primary router. If the new primary router is a FortiGate, the network continues to benefit from FortiOS security features. If
the new primary router is just a router, traffic continues to flow, but FortiOS security features are unavailable until the
FortiGate is back online.
If the backup router is a FortiGate, during a VRRP failover as the FortiGate begins operating as the new primary router, it
will not have session information for all of the failed over in-progress sessions. So, it would normally not be able to
forward in-progress session traffic.
This topic describes to how to add IPv4 and IPv6 virtual routers to an interface. VRRP can only be configured on physical
or VLAN interfaces. VRRP cannot be configured on hardware switch interfaces where multiple physical interfaces are
combined into a hardware switch interface.
In this example, an IPv4 VRRP router is added to port10 on the FortiGate. The VRRP virtual router has a virtual router ID
of 200, uses IP address 10.31.101.200, and has a priority of 255. Since this is the highest priority in the configuration,
this interface is configured to be the primary router of the VRRP domain.
In this example, an IPv6 VRRP router is added to port20 on the FortiGate. The VRRP virtual router has a virtual router ID
of 220, uses IP address 2001:db8:1::12, and has a priority of 255. Since this is the highest priority in the configuration,
this interface is configured to be the primary router of the VRRP domain.
VRRP failover
VRRP routers in a VRRP domain periodically send VRRP advertisement messages to all routers in the domain to
maintain one router as the primary router and the others as backup routers. The primary router has the highest priority. If
the backup routers stop receiving these packets from the primary router, the backup router with the highest priority
becomes the new primary router.
The primary router stops sending VRRP advertisement messages if it fails or becomes disconnected. Up to two VRRP
destination addresses can be configured to be monitored by the primary router. As a best practice, the destination
addresses should be remote addresses. If the primary router is unable to connect to these destination addresses, it
stops sending VRRP advertisement messages, and the backup router with the highest priority becomes the primary
router.
The vrdst-priority option can be used to reduce IPv4 VRRP failover times. This option causes the primary router to
actively signal to the backup routers when the primary router cannot reach its configured destination addresses. The
primary router sends a lower priority for itself in the VRRP advertisement messages. The backup router with the highest
priority becomes the new primary router and takes over traffic processing.
In this example, the primary router is configured to have a priority of 255, so it should always become the primary router.
The vrdst-priority is set to 10. If the primary router cannot connect to the 10.10.10.1 destination address, then the
primary router informs the VRRP group that its priority is now 10.
To set the priority of the virtual router when the destination address is unreachable:
The proxy-arp option can be used to map VIPs and IP pool address ranges to each router's VMAC (virtual MAC). After
failover, the IP or ranges configured in the VRRP settings are routed to the new primary router's VMAC. In this example,
a single IP and an address range are added for proxy ARP.
By default, VRRP advertisement messages are sent once every second. The frequency can be changed with the adv-
interval option to change the frequency of sending these messages (1 - 255 seconds).
The adv-interval also affects the period of time that a backup VRRP router waits before assuming the primary router
has failed. The waiting period is three times the adv-interval. For example, if the adv-interval is set to 5, then the
backup router waits for up to 15 seconds to receive a VRRP advertisement from the current primary router before taking
over the role as the primary router.
The VRRP startup time is the time a backup or primary VRRP router waits before sending or receiving VRRP
advertisements before potentially changing state (start-time in seconds, 1 - 255, default = 3). This timer is mainly
visible when VRRP-monitored interfaces become up after previously been down. When this occurs, the device will wait
for the time period before considering, and potentially changing its status.
There are some instances when the advertisement messages might be delayed. For example, some switches with
spanning tree enabled may delay some of the advertisement message packets. If backup routers are attempting to
become primary routers even though the primary router has not failed, extend the start time to ensure that the backup
routers wait long enough for the advertisement messages.
next
end
next
end
VRRP groups
If VRRP routers are added to multiple interfaces of the same FortiGate, each router will be in a different VRRP domain. If
one of the VRRP routers fails, it is useful if all of the VRRP routers added to the FortiGate also fail.
VRRP can only check the routers' status in a single VRRP domain and cannot track the status of routers in other
domains. For multiple VRRP domains on a single FortiGate, only one can switch to being a backup, and the others
remain operating normally. Using VRRP groups resolves this issue.
All the VRRP virtual routers on the FortiGate can be added to a VRRP group. If one of the virtual routers in a VRRP
group switches to the backup, the VRRP group forces all members to switch to backups. All VRRP traffic being
processed by the FortiGate fails over to other devices in the network.
The status of the virtual routers in a VRRP group only changes when one or more of the virtual
routers in the group changes status. A VRRP group should not be used to manually change
the status of the virtual routers in the group.
next
end
next
end
The VRRP virtual MAC address (or virtual router MAC address) is a shared MAC address adopted by the primary router.
If the primary router fails, the same virtual MAC address is picked up by the new primary router, allowing all devices on
the network to transparently connect to the default route using the same virtual MAC address. This feature must be
enabled on all members in a VRRP domain.
Each VRRP router has its own virtual MAC address. The last part octet is based on the VRRP router ID using the
following format:
00-00-5E-00-01-<VRID_hex>
Where <VRID_hex> is the VRRP router ID in hexadecimal format in internet standard bit-order. For more information
about virtual MAC formatting, see RFC 3768.
For example:
l If the VRRP router ID is 10, then the virtual MAC is 00-00-5E-00-01-0a.
l If the VRRP router ID is 200, then the virtual MAC is 00-00-5E-00-01-c8.
If the VRRP virtual MAC address feature is disabled (the default setting), the VRRP domain uses the MAC address of the
primary router. On a FortiGate VRRP virtual router, this is the MAC address of the FortiGate interface that the VRRP
router is added to. If the primary fails, when the new primary takes over, it sends gratuitous ARPs to associate the VRRP
router IP address with the MAC address of the new primary (or the FortiGate interface that became the new primary).
When a VRRP virtual MAC address is enabled, the new primary uses the same MAC address as the old primary.
Since devices on the LAN do not have to learn a new MAC address for a new VRRP router in the event of a failover, this
feature can improve network efficiency, especially in large and complex networks.
Preempt mode
When preempt mode is enabled (the default setting), a higher priority backup router can preempt a lower priority primary
router. This can happen if the primary router fails, the backup router becomes the primary router, and the failed primary
router restarts. Since the restarted router has a higher priority, if preempt mode is enabled, the restarted router replaces
the current primary router becoming the new primary router. If preempt mode is disabled, a restarted router that has a
higher priority would not take over as the primary router.
next
end
end
next
end
Single-domain VRRP example
This example consists of a VRRP domain with two FortiGates that connect an internal network to the internet. The
FortiGate port2 interfaces connect to the internal network, and a VRRP virtual router is added to each port2 interface
with VRRP virtual MAC addresses enabled. The internal network default route is 10.31.101.120. Each FortiGate port2
interface has an IP address that is different from the virtual router IP address. Since vrrp-virtual-mac is enabled,
upon failover, the new primary VRRP router will use the same VMAC as the previous router.
next
end
Multi-domain VRRP example
This example consists of two VRRP domains, and both FortiGates participate in the domains that connect an internal
network to the internet. One FortiGate is the primary router of one domain and the other FortiGate is the primary router of
the other domain. The network distributes traffic between two different default routes (10.31.101.120 and
10.31.101.130). One VRRP domain is configured with one of the default route IP addresses and the other VRRP domain
gets the other default route IP address. During normal operation, both FortiGates process traffic, and the VRRP domains
are used to load balance the traffic between the two FortiGates.
If one of the FortiGates fails, the remaining FortiGate becomes the primary router of both VRRP domains. The network
sends all traffic for both default routes to this FortiGate. The result is a configuration that (under normal operational load)
balances traffic between two FortiGates, but if one of the FortiGates fails, all traffic fails over to the FortiGate that is still
operating.
VRRP virtual MAC address are enabled on both FortiGates' port2 interfaces so that the VRRP domains use their VRRP
virtual MAC addresses.
To configure FortiGate A:
set priority 50
next
end
next
end
To configure FortiGate B:
SNMP
SNMP enables you to monitor hardware on your network. You can configure the hardware, such as the FortiGate SNMP
agent, to report system information and send traps (alarms or event messages) to SNMP managers. SNMP traps alert
you to events that happen, such as when a log disk is full or a virus is detected.
The FortiGate SNMP implementation is read-only. SNMP v1/v2c, and v3 compliant SNMP managers have read-only
access to FortiGate system information through queries, and can receive trap messages from the FortiGate unit.
l Interface access on page 2012
l MIB files on page 2013
l SNMP agent on page 2014
l SNMP v1/v2c communities on page 2014
l SNMP v3 users on page 2016
l Important SNMP traps on page 2017
l SNMP traps and query for monitoring DHCP pool on page 2019
Interface access
Before a remote SNMP manager can connect to the FortiGate SNMP agent, you must configure one or more FortiGate
interfaces to accept SNMP connections.
MIB files
The FortiGate SNMP agent supports Fortinet proprietary MIBs, as well as the parts of RFC 2665 and RFC 1213 that
apply to FortiGate unit configuration.
Your SNMP manager may already include standard and private MIBs in a compiled database that is ready to use. You
must add the Fortinet proprietary MIBs to this database to have access to Fortinet specific information.
FORTINET-CORE-MIB.mib The Fortinet core MIB includes all system configuration and trap information that
is common to all Fortinet products.
Your SNMP manager requires this information to monitor Fortinet device settings
and receive traps from the FortiGate SNMP agent.
FORTINET-FORTIGATE- The FortiGate MIB includes all system configuration information and trap
MIB.mib information that is specific to FortiGate units.
Your SNMP manager requires this information to monitor FortiGate settings and
receive traps from the FortiGate SNMP agent.
RFC-1213 (MIB II) The FortiGate SNMP agent supports MIB II groups with the following exceptions:
l No support for the EGP group from MIB II (RFC 1213, section 3.11 and 6.10).
accurately capture all Fortinet traffic activity. More accurate information can
be obtained from the information reported by the Fortinet MIB.
RFC-2665 (Ethernet-like MIB) The FortiGate SNMP agent supports Ethernet-like MIB information.
FortiGate SNMP does not support for the dot3Tests and dot3Errors groups.
3. Click Download Fortinet Core MIB File and save the file to the management computer.
SNMP agent
The SNMP agent sends SNMP traps originating on the FortiGate to an external monitoring SNMP manager defined in a
SNMP community. The SNMP manager can monitor the FortiGate system to determine if it is operating properly, or if
any critical events occurring.
The description, location, and contact information for this FortiGate system will be part of the information that the SNMP
manager receives. This information is useful if the SNMP manager is monitoring many devices, and enables faster
responses when the FortiGate system requires attention.
An SNMP community is a grouping of equipment for network administration purposes. A single device can belong to
multiple communities.
You must add an SNMP community to the FortiGate so that the SNMP manager can receive traps and system
information. Up to three communities can be added.
SNMP v3 users
Authentication is used to ensure the identity of users. Privacy allows for encryption of SNMP v3 messages to ensure
confidentiality of data. These protocols provide a higher level of security than is available in SNMP v1 and v2c, which use
community strings for security. Both authentication and privacy are optional.
l Authentication and Private: Select both the authentication and encryption algorithms and password.
8. In the SNMP Events section, enable or disable the events that activate traps.
9. Click OK.
Important SNMP traps
This trap is sent when a FortiGate port either goes down or is brought up.
For example, the following traps are generated when the state of port34 is set to down using set status down, and
then brought up using set status up:
NET-SNMP version 5.7.3 2019-01-31 14:11:48 10.1.100.1(via UDP: [10.1.100.1]:162->
[10.1.100.11]:162) TRAP, SNMP v1, community REGR-SYS SNMPv2-MIB::snmpTraps Link Down Trap
(0) Uptime: 0:14:44.95 IF-MIB::ifIndex.42 = INTEGER: 42 IF-MIB::ifAdminStatus.42 = INTEGER:
down(2) IF-MIB::ifOperStatus.42 = INTEGER: down(2) FORTINET-CORE-MIB::fnSysSerial.0 =
STRING: FG140P3G15800330 SNMPv2-MIB::sysName.0 = STRING: FortiGate-140D-POE
2019-01-31 14:11:48 <UNKNOWN> [UDP: [10.1.100.1]:162->[10.1.100.11]:162]: DISMAN-EVENT-
MIB::sysUpTimeInstance = Timeticks: (88495) 0:14:44.95 SNMPv2-MIB::snmpTrapOID.0 = OID: IF-
MIB::linkDown IF-MIB::ifIndex.42 = INTEGER: 42 IF-MIB::ifAdminStatus.42 = INTEGER: down(2)
IF-MIB::ifOperStatus.42 = INTEGER: down(2) FORTINET-CORE-MIB::fnSysSerial.0 = STRING:
FG140P3G15800330 SNMPv2-MIB::sysName.0 = STRING: FortiGate-140D-POE 2019-01-31 14:12:01
10.1.100.1(via UDP: [10.1.100.1]:162->[10.1.100.11]:162) TRAP, SNMP v1, community REGR-SYS
SNMPv2-MIB::snmpTraps Link Up Trap (0) Uptime: 0:14:57.98 IF-MIB::ifIndex.42 = INTEGER: 42
IF-MIB::ifAdminStatus.42 = INTEGER: up(1) IF-MIB::ifOperStatus.42 = INTEGER: up(1) FORTINET-
CORE-MIB::fnSysSerial.0 = STRING: FG140P3G15800330 SNMPv2-MIB::sysName.0 = STRING:
FortiGate-140D-POE
2019-01-31 14:12:01 <UNKNOWN> [UDP: [10.1.100.1]:162->[10.1.100.11]:162]: DISMAN-EVENT-
MIB::sysUpTimeInstance = Timeticks: (89798) 0:14:57.98 SNMPv2-MIB::snmpTrapOID.0 = OID: IF-
MIB::linkUp IF-MIB::ifIndex.42 = INTEGER: 42 IF-MIB::ifAdminStatus.42 = INTEGER: up(1) IF-
fgFmTrapIfChange trap
This trap is sent when any changes are detected on the interface. The change can be very simple, such as giving an
IPV4 address.
For example, the user has given the IP address of 1.2.3.4/24 to port 1 and the EMS Manager has detected the following
trap:
DISMAN-EXPRESSION-MIB::sysUpTimeInstance = Timeticks: (7975058) 22:09:10.58 SNMPv2-
MIB::snmpTrapOID.0 = OID: FORTINET-FORTIGATE-MIB::fgFmTrapIfChange FORTINET-CORE-
MIB::fnSysSerial.0 = STRING: FG140P3G15800330 IF-MIB::ifName.45 = STRING: port1 FORTINET-
FORTIGATE-MIB::fgManIfIp.0 = IpAddress: 1.2.3.4 FORTINET-FORTIGATE-MIB::fgManIfMask.0 =
IpAddress: 255.255.255.0 FORTINET-FORTIGATE-MIB::fgManIfIp6.0 = STRING: 0:0:0:0:0:0:0:0
entConfigChange trap
The change to the interface in the previous example has also triggered the ConfChange Trap which is sent along with
the fgFmTrapIfChange trap:
2018-11-15 09:30:23 FGT_A [UDP: [172.16.200.1]:162->[172.16.200.55]:162]: DISMAN-EXPRESSION-
MIB::sysUpTimeInstance = Timeticks: (8035097) 22:19:10.97 SNMPv2-MIB::snmpTrapOID.0 = OID:
ENTITY-MIB::entConfigChange
fgTrapDeviceNew trap
This trap is triggered when a new device, like a FortiSwitch, is connected to the FortiGate.
For example, the following scenario has given the device a new trap for adding FortiAP on a PoE interface a FortiGate
140D-POE. The trap has important information about the device name, device MAC address, and when it was last seen.
2018-11-15 11:17:43 UDP/IPv6: [2000:172:16:200::1]:162 [UDP/IPv6: [2000:172:16:200::1]:162]:
DISMAN-EXPRESSION-MIB::sysUpTimeInstance = Timeticks: (520817) 1:26:48.17 SNMPv2-
MIB::snmpTrapOID.0 = OID: FORTINET-FORTIGATE-MIB::fgTrapDeviceNew FORTINET-CORE-
MIB::fnSysSerial.0 = STRING: FG140P3G15800330 SNMPv2-MIB::sysName.0 = STRING: FGT_A IF-
MIB::ifIndex.0 = INTEGER: 0 FORTINET-FORTIGATE-MIB::fgVdEntIndex.0 = INTEGER: 0 FORTINET-
FORTIGATE-MIB::fgDeviceCreated.0 = Gauge32: 5 FORTINET-FORTIGATE-MIB::fgDeviceLastSeen.0 =
Gauge32: 5 FORTINET-FORTIGATE-MIB::fgDeviceMacAddress.0 = STRING: 90:6c:ac:f9:97:a0
2018-11-15 11:17:43 FGT_A [UDP: [172.16.200.1]:162->[172.16.200.55]:162]: DISMAN-EXPRESSION-
MIB::sysUpTimeInstance = Timeticks: (520817) 1:26:48.17 SNMPv2-MIB::snmpTrapOID.0 = OID:
FORTINET-FORTIGATE-MIB::fgTrapDeviceNew FORTINET-CORE-MIB::fnSysSerial.0 = STRING:
FG140P3G15800330 SNMPv2-MIB::sysName.0 = STRING: FGT_A IF-MIB::ifIndex.0 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fgVdEntIndex.0 = INTEGER: 0 FORTINET-FORTIGATE-
MIB::fgDeviceCreated.0 = Gauge32: 5 FORTINET-FORTIGATE-MIB::fgDeviceLastSeen.0 = Gauge32: 5
FORTINET-FORTIGATE-MIB::fgDeviceMacAddress.0 = STRING: 90:6c:ac:f9:97:a0
fgTrapAvOversize trap
The fgTrapAvOversize trap is generated when the antivirus scanner detects an oversized file:
The SNMP DHCP event contains three traps and one query.
Traps are sent when:
l DHCP server IP pool usage reaches 90%
l DHCP server detect an IP address that is already in use
l DHCP client receives DHCP NAK
SNMP queries are accepted for DHCP lease usage information (OID = 1.3.6.1.4.1.12356.101.23). The query result is
based on the leased out percentage.
5. Click OK.
Replacement messages
FortiOS has replacement messages that are HTML and text files. These messages can be customized to meet user
requirements. The content can be modified, and images can be added.
The Replacement Messages page has two views. Simple View (the default view) shows the most commonly used
replacement messages. Extended View shows the entire list and all replacement message categories.
4. Click Save.
Click Restore Defaults to return to the original message and code base.
For example, to modify the Traffic Quota Limit Exceeded Page message:
config system replacemsg traffic-quota "per-ip-shaper-block"
set buffer "<html>
<head>
<title>
The supported image formats are GIF, JPEG, TIFF, and PNG. The maximum file size
supported is 24 KB.
6. Click OK.
The file is now visible in the list.
2. Edit the replacement message, and include %%IMAGE:<image name>%% in the code to add the image.
Replacement message groups allow users to customize replacement messages for individual policies and profiles.
There are two types of replacement message groups:
The messages added to a group do not need to be customized. The message body content, header type, and format will
use the default values if not customized.
In the following example, two replacement message groups are created. The UTM message group includes custom
mail-related messages and is assigned to an email filter profile. The authentication message group has a custom
authentication success message that is applied to a proxy-based firewall policy that has an assigned email filter profile.
f. Click OK.
4. Apply the newutm replacement message group to an email filter profile in the CLI:
config emailfilter profile
edit "newmsgs"
set replacemsg-group "newutm"
next
end
5. Apply the newauth replacement message group and the email filter profile to a firewall policy in the CLI:
config firewall policy
edit 1
...
set replacemsg-override-group "newauth"
set inspection-mode proxy
set emailfilter-profile "newmsgs"
...
next
end
FortiGuard
FortiGuard services can be purchased and registered to your FortiGate unit. The FortiGate must be connected to the
Internet in order to automatically connect to the FortiGuard Distribution Network (FDN) to validate the license and
download FDN updates.
The FortiGuard subscription update services include:
l Antivirus (AV)
l Intrusion Protection Service (IPS)
l Application Control
l Antispam
l Web Filtering
l Web Application Firewall (WAF)
To view FDN support contract information, go to System > FortiGuard. The License Information table shows the status of
your FortiGate’s support contract.
l Configuring FortiGuard updates on page 2027
l Configuring a proxy server for FortiGuard updates on page 2028
l Manual updates on page 2029
l Automatic updates on page 2030
l Scheduled updates on page 2030
l Sending malware statistics to FortiGuard on page 2031
l Update server location on page 2032
l Filtering on page 2033
l Online security tools on page 2034
l FortiGuard anycast and third-party SSL validation on page 2034
l Using FortiManager as a local FortiGuard server on page 2037
l Cloud service communication statistics on page 2038
l IoT detection service on page 2039
l FortiAP query to FortiGuard IoT service to determine device details on page 2041
l FDS-only ISDB package in firmware images on page 2042
1. Go to System > FortiGuard
2. Scroll down to the FortiGuard Updates section.
3. Configure the options for connecting and downloading definition files:
Immediately download The option can be enabled on 2U and larger hardware models when the
updates FortiGuard are servers are connected in anycast mode.
The FortiGate forms a secure, persistent connection with FortiGuard to get
notifications of new updates through an HTTPS connection. The FortiGate
uses the fds_notify daemon to wait for the notification, then makes another
connection to the FortiGuard server to download the updates.
Scheduled Updates Enable to schedule updates to be sent to the FortiGate at the specified time or
automatically. See Scheduled updates on page 2030 and Automatic updates
on page 2030.
Improve IPS quality Enable to send information to the FortiGuard servers when an attack occurs.
This can help keep the FortiGuard database current as attacks evolve, and
improve IPS signatures.
Use extended IPS signature Enable to use the extended IPS database, that includes protection from legacy
package attacks, along with the regular IPS database that protects against the latest
common and in-the-wild attacks.
AntiVirus PUP/PUA Enable antivirus grayware checks for potentially unwanted applications.
Update server location The FortiGuard update server location. See Update server location on page
2032 for details.
4. Click Apply.
You can configure FortiOS to use a proxy server to connect to the FortiGuard Distribution Network (FDN).
Proxy tunneling is supported only for registration, AV, and IPS updates. For FortiGate virtual
machines, proxy tunneling can also be used for license validation. For web filtering or spam
filtering, UDP protocol is used on ports 53 or 8888. UDP protocol traffic cannot be directed
over a proxy server, even if you are using versions of FortiOS that support web filtering over
port 443.
Consider the following before configuring FortiOS to use a proxy server to connect to FDN:
l FortiOS connects to the proxy server using the HTTP CONNECT method. For information about the HTTP
CONNECT method, see RFC 2616.
l The proxy server must not inspect the HTTPS traffic used for FortiOS communication.
l FortiOS sends to the proxy server an HTTP CONNECT request that specifies the IP address and port required for
the FDN connection. Authentication information is optional for the request.
l FortiOS must be configured to use DNS servers that resolve the addresses of FDN servers to support AV and IPS
updates.
l The proxy server establishes the connection to FDN and passes information between FortiOS and FDN.
Use the following syntax to configure a proxy server in the CLI:
config system autoupdate tunneling
set address <proxy_address>
set port <proxy_port>
set username <username>
set password <password>
set status {enable | disable}
end
In the following example, a proxy server with IP address 10.1.1.1 is configured to listen on port TCP/3128 without
authentication.
In a closed network without direct internet connection for web filtering or spam filtering, you can use FortiManager as a
FortiGuard server. FortiManager supports proxy for both updates and rating, and FortiOS retrieves its updates and
ratings through FortiManager. See Using FortiManager as a local FortiGuard server on page 2037.
Manual updates
When needed, FortiGuard Distribution Network (FDN) updates can be manually uploaded.
8. Click OK.
Automatic updates
The default auto-update schedule for FortiGuard packages is automatic. The update interval is calculated based on the
model and percentage of valid subscriptions, within one hour.
For example, if a FortiGate 501E has 78% valid contracts, then based on this device model, the update schedule is
calculated to be every 10 minutes. If you verify the system event logs (ID 0100041000), they are generated
approximately every 10 minutes.
1. Go to System > FortiGuard
2. In the FortiGuard Updates section, enable Scheduled Updates and select Automatic.
3. Click Apply.
Scheduled updates
Scheduling updates ensures that the virus and IPS definitions are downloaded to your FortiGate on a regular basis.
Updating definitions can cause a brief disruption in traffic that is currently being scanned while the FortiGate unit applies
the new signature database. Updates should be scheduled during off-peak hours when network usage is at a minimum
to ensure that network activity will not be affected by downloading the definitions files.
A schedule of once a week means any urgent updates will not be pushed until the scheduled
time. If an urgent update is required, click the Update Licenses & Definitions Now button to
manually update the definitions.
1. Go to System > FortiGuard
2. In the FortiGuard Updates section, enable Scheduled Updates.
3. Configure the update schedule:
4. Click Apply.
FortiGate devices periodically send encrypted antivirus, IPS, botnet IP list, and application control statistics to
FortiGuard. Included with these data is the IP address and serial number of the FortiGate, and the country that it is in.
This information is never shared with external parties, Fortinet Privacy Policy.
The malware statistics are used to improve various aspects of FortiGate malware protection. For example, antivirus data
allow FortiGuard to determine what viruses are currently active. Signatures for those viruses are kept in the Active AV
Signature Database that is used by multiple Fortinet products.Inactive virus signatures are moved to the Extended AV
Signature Database (see Configuring FortiGuard updates on page 2027). When events for inactive viruses start
appearing in the malware data, the signatures are moved back into the AV Signature Database.
The FortiGate and FortiGuard servers go through a 2-way SSL/TLS 1.2 authentication before any data is transmitted.
The certificates used in this process must be trusted by each other and signed by the Fortinet CA server.
The FortiGate only accepts data from authorized FortiGuard severs. Fortinet products use DNS to find FortiGuard
servers and periodically update their FortiGate server list. All other servers are provided by a list that is updated through
the encrypted channel.
The submission of malware data is in accordance with the Fortinet Privacy Policy.
There is no sensitive or personal information included in these submissions. Only malware
statistics are sent.
Fortinet uses the malware statistics collected in this manner to improve the performance of the
FortiGate services and to display statistics on the Fortinet Support website for customers
registered FortiGate devices.
Fortinet may also publish or share statistics or results derived from this malware data with
various audiences. The malware statistics shared in this way do not include any customer
data.
The location of the FortiGuard update server that the FortiGate connects to can be set to only servers in the USA, only
servers in the European Union (EU), or to the servers with the lowest latency.
In EU locations, it can be required that certain traffic is only handled by servers located in the EU. By setting the update
server location to EU only, the FortiGate will use EU domains to resolve to EU servers for FortiGuard traffic to update,
URL rating, and IoT servers.
EU only euupdate.fortinet.net
euguardservice.fortinet.net
On hardware FortiGate devices, the default is Lowest latency locations. On VM devices, the default is US only.
1. Go to System > FortiGuard
2. In the FortiGuard Updates section, set Update server location to Lowest latency locations or Restrict to.
4. Click Apply.
Filtering
Web filtering is used to block access to harmful, inappropriate, and dangerous web sites (see FortiGuard filter on page
1064).
Email filtering is used to detect and block spam messages (see FortiGuard-based filters on page 1174).
1. Go to System > FortiGuard
2. Scroll down to the Filtering section.
3. Configure the settings as needed:
Web Filter Cache Enable/disable web filter cache, and set the amount of time that the FortiGate
will store a blocked IP address or URL locally. After the time expires, the
FortiGate contacts the FDN to verify the address.
Email Filter Cache Enable/disable email filter cache, and set the amount of time that the FortiGate
will store an email address locally.
FortiGuard filtering services The protocol and port used to contact the FortiGuard servers. These options
can be changed in the CLI.
Filtering service availability The status of the filtering service. Click Test Connectivity if the filtering service
is not available.
Request re-evaluation of a Click to re-evaluate a URL category rating on the FortiGuard web filter service.
URL's category
4. Click Apply.
When anycast is enabled (by default) the protocol is HTTPS and the port is 443.
FortiGuard Labs provides a number of online security tools, including but not limited to:
l URL lookup
Enter a website address to see if it has been rated and what category and classification it is filed as. If you find a site
that has been wrongly categorized, use this page to request that the site be re-evaluated:
https://www.fortiguard.com/webfilter
l Threat Encyclopedia
Browse FortiGuard Labs extensive encyclopedia of threats. Search for viruses, botnet C&C, IPS, endpoint
vulnerabilities, and mobile malware: https://www.fortiguard.com/encyclopedia
l Application Control
Browse FortiGuard Labs extensive encyclopedia of applications: https://www.fortiguard.com/appcontrol
Anycast optimizes routing performance to FortiGuard servers. It is the default FortiGuard access mode.
Using Fortinet DNS servers, the FortiGate receives a single IP address for the domain name of each FortiGuard service.
BGP routing optimization is transparent to the FortiGate. The domain name of each FortiGuard service is the common
name in that service's certificate, which is signed by a third-party intermediate CA. The FortiGuard server uses third-
party certificate verification and the Online Certificate Status Protocol (OCSP) stapling check, so that the FortiGate can
always validate the FortiGuard server certificate efficiently.
FortiGate will only complete the TLS handshake with an anycast server that has a good OCSP status for its certificate.
Any other status will result in a failed SSL connection. OCSP stapling is reflected on the signature interval so that good
means that the certificate is not revoked at that timestamp. The FortiGuard servers query the CA's OCSP responder
every four hours and update its OCSP status. If the FortiGuard is unable to reach the OCSP responder, it will keep the
last known OCSP status for up to seven days. This cached OCSP status will be sent out immediately when a client
connection request is made, optimizing the response time.
FortiGuard represents all cloud based servers; see Anycast and unicast services for details.
The anycast server has one IP address to match its domain name. The FortiGate connects with a single server address,
using HTTPS and port 443, regardless of where the FortiGate is located.
Connection process
1. The FortiGate embeds the CA_bundle certificate, which includes the root CA with CRL list and third-party
intermediate CA, in the root CA level.
2. The FortiGate finds the FortiGuard IP address from its domain name from DNS.
3. The FortiGate starts a TLS handshake with the FortiGuard IP address. The client hello includes an extension of the
status request.
4. The FortiGuard servers provide a certificate with its OCSP status: good, revoked, or unknown.
5. The FortiGate verifies the CA chain against the root CA in the CA_bundle.
6. The FortiGate verifies the intermediate CA's revoke status against the root CA's CRL.
7. The FortiGate verifies the FortiGuard certificate's OCSP status:
OCSP Response Data:
OCSP Response Status: successful (0x0)
Response Type: Basic OCSP Response
Version: 1 (0x0)
Responder Id: 3DD350A5D6A0ADEEF34A600A65D321D4F8F8D60F
Produced At: Aug 20 07:50:58 2019 GMT
Responses:
Certificate ID:
Hash Algorithm: sha1
Issuer Name Hash: 49F4BD8A18BF760698C5DE402D683B716AE4E686
Issuer Key Hash: 3DD350A5D6A0ADEEF34A600A65D321D4F8F8D60F
Serial Number: 02555C9F3901B799DF1873402FA9392D
Cert Status: good
This Update: Aug 20 07:50:58 2019 GMT
Next Update: Aug 27 07:05:58 2019 GMT
8. Once the SSL handshake is established, the FortiGate can engage the server.
FortiManager can provide a local FortiGuard server with port 443 access.
Anycast FortiGuard settings force the rating process to use port 443, even with an override server. Using a unique
address in the same subnet as the FortiManager access IP address, the FortiManager can provide local FortiGuard
updates and rating access with a dedicated IP address and port 443.
1. Go to System > FortiGuard
2. In the Override FortiGuard Servers table, click Create New. The Create New Override FortiGuard Server pane
opens.
3. Select the server address type: IPv4, IPv6, or FQDN.
4. Enter the FortiManager address in the Address field.
5. Select the type of server: AntiVirus & IPS Updates, Filtering, or Both.
6. Click OK.
7. Click Create New again to add a second override FortiManager for filtering.
When fmg-update-port is set to 443, the update process will use port 443 to connect to the override update server,
which is the local FortiGuard server in the FortiManager. If this is not set, the update process will use port 8890, and the
server address setting has to be the FortiManager access IP address. Override FortiGuard services come from the
server list that is the local FortiGuard server in the FortiManager, and use the traditional, non-OCSP TLS handshake. If
override servers in the FortiManager are not available, the default FortiGuard servers are connected, and the anycast
OCSP TLS handshake is used.
Fortinet service communications statistics are displayed on the FortiGuard page. The statistics correspond with the
output from diagnose sys service-communication. The traffic volume values in the GUI are the sums of data
from the last 24 hours.
1. Go to System > FortiGuard.
The Fortinet Service Communications statistics are displayed on the right side of the screen:
Internet of Things (IoT) detection is a subscription service that allows FortiGate to detect unknown devices in FortiGuard
that are not detected by the local Device Database (CIDB). When the service is activated, FortiGate can send device
information to the FortiGuard collection server. When a new device is detected, FortiGate queries the results from the
FortiGuard query for more information about the device.
This feature requires an IoT Detection Service license.
1. Disable the local device database in order to force all queries to go to FortiGuard.
# diagnose src-vis local-sig disable
2. Enable iotd debugs.
# diagnose debug application iotd -1
# diagnose debug enable
FortiGate sends the device data to the FortiGuard collection server.
FortiWiFi-60E # [iotd] recv request from caller size:61
[iotd] service:collect hostname: ip: fd:-1 request tlv_len:41
[iotd] txt(.....y...w.....Jasons-iPhone6....579=23..)
[iotd] hex
(02010007017903060f77fc0203000e4a61736f6e732d6950686f6e6536020400083537393d32330cf
f)
[iotd] service:collect hostname:qadevcollect.fortinet.net ip: fd:-1 got server hostname
[iotd] service:collect hostname:qadevcollect.fortinet.net ip:192.168.100.133 fd:-1 got
server ip
[iotd] service:collect hostname:qadevcollect.fortinet.net ip:192.168.100.133 fd:13
socket created
A FortiAP collects packets from devices and queries FortiGuard with the help of the FortiGate. Device detection results
are reported back to the FortiGate where this information is displayed. Querying the FortiGuard service requires an IoT
Attribute Description
device-weight <integer> Set the device upper limit of confidence (0 - 255, default = 1, 0 = disable).
device-holdoff <integer> Set the device lower limit of creation time, in minutes (0 - 60, default = 5).
device-idle <integer> Set the device upper limit of idle time, in minutes (0 - 14400, default = 1440).
FortiOS firmware images include Fortinet objects in the built-in Internet Service Database (ISDB).
# diagnose firewall internet-service list
List internet service in kernel(global):
Internet Service Database Kernel Table: size 14974 bytes, Entry size 5844 bytes, number of
index entries 165 number of IP range entries 0
This lightweight ISDB package allows firewall rules and policy routes that use ISDB to access FortiGuard servers to
continue working after upgrading FortiOS. For example, the following policy will work after an upgrade:
config firewall policy
edit 440
set name "Fortinet Updates"
set srcintf "port25"
set dstintf "port1"
set srcaddr "FortiAnalyzer" "FortiAuthenticator" "Tesla Management Interface"
"BackupFortinet" "SipFW" "ConnectVPNMgmt"
set internet-service enable
set internet-service-id 1245187 1245326 1245324 1245325 1245193 1245192 1245190
1245185
set action accept
set schedule "always"
set logtraffic all
set fsso disable
next
end
After the FortiGate reboots after a firmware update, an automatic update will run in five minutes so that the FortiGate can
get the ISDB, whether or not scheduled update is enabled.
# diagnose autoupdate versions | grep Internet -A 6
Feature visibility
Feature visibility is used to control which features are visible in the GUI. This allows features that are not in use to be
hidden. Some features are also invisible by default and must be made visible before they can be configure in the GUI.
The visibility of a feature does not affect its functionality or configuration. Invisible features can still be configured using
the CLI.
Certificates
FortiOS leverages certificates in multiple areas, such as VPNs, administrative access, and deep packet inspection. This
section contains topics about uploading certificates and provides examples of how certificates may be used to encrypt
and decrypt communications, and represent the identity of the FortiGate. This sections assumes the reader has a high
level understanding of the public key infrastructure (PKI) system, particularly how entities leverage trusted certificate
authorities (CAs) to verify the authenticating party, and how public and private certificate keys work to secure
communications.
The certificates feature is hidden by default in FortiOS. In the GUI, go to System > Feature Visibility and enable
Certificates.
The following topics provide an overview of how to add certificates to the FortiGate:
On the System > Certificates page, there are two options to add a certificate: Generate (use a certificate signing request)
and Import.
Certificate signing requests (CSRs) are used to generate a certificate which is then signed by a CA to create a chain of
trust. The CSR includes details of the FortiGate (see table below) and its public key. A CSR is not strictly necessary;
some CAs allow you to provide the details of the FortiGate manually, but a CSR helps streamline the process. Selecting
Generate takes you the Generate Certificate Signing Request page to enter the following information:
Certificate Name Enter the certificate name; this is how it will appear in the Local Certificates
list.
Subject Information Specify an ID type: host IP address, domain name (FQDN), or email address.
Optional Information Although listed as optional, we recommended entering the information for
each field in this section.
If you are generating a CSR for a third-party CA, you need to insure that these
values reflect those listed for your company or organization at said certificate
authority. If you are generating a certificate for a Microsoft CA, you need to
check with the administrator regarding these values.
Organization Unit Enter the name of the organizational unit under which the certificate will be
issued.
State / Province Some issuers will reject a CSR that has an abbreviated state or province, so
enter the full name of the state or province.
Country / Region Enable the option and select the country from the dropdown.
E-Mail Enter the email address of the technical contact for the SSL certificate that is
being requested.
Subject Alternative This field allows multiple domains to be used in an SSL certificate. Select from
Name email addresses, IP addresses, URIs, DNS names, and so on.
Password for private key If supplied, this is used as an encryption password for the private key file.
Key Size When Key Type is RSA, select 1024, 1536, 2048, or 4096 for bit-
size/strength. We recommend using at least 2048 if your CA can issue
certificates of that size.
Curve Name When Key Type is Elliptic Curve, select the elliptic curve type: secp256r1,
secp384r1, or secp521r1.
Enrollment Method Select one of the following methods that determines how the CSR will be
signed.
l File Based: this will generate a certificate in the certificate menu under
Local Certificate, which differs from the existing ones because it has no
Subject, Comments, Issuer, or Expires values in the table. It will also
show a Pending status because it is only a CSR at the moment and
cannot function as a certificate just yet. You can download the CSR to
provide to a CA for signing. If you open the CSR file, it should look similar
to this:
-----BEGIN CERTIFICATE REQUEST-----
MIIC7jCCAdYCAQAwgZUxCzAJBgNVBAYT (… )HEKjDX+Hg==
-----END CERTIFICATE REQUEST-----
Next. the CSR file is supplied to a CA for signing and the returned file
from the CA should be in .CER format. This file is then uploaded to the
FortiGate by going to System > Certificates > Import > Local Certificate
and uploading the CER file.
l Online SCEP: the Simple Certificate Enrollment Protocol (SCEP) allows
devices to enroll for a certificate by using a URL and a password. The
SCEP server works as a proxy to forward the FortiGate’s request to the
CA and returns the result to the FortiGate (setting up an SCEP server is
beyond the scope of this topic). Once the request is approved by the
SCEP server, the FortiGate will have a signed certificate containing the
details provided in the CSR.
Import
Although Import is often used in conjunction with a CSR, you may upload a certificate to the FortiGate that was
generated on its own. This is typical of wildcard certificates (*.domain.tld) where the same certificate is used across
multiple devices (FGT.domain.tld, FAZ.domain.tld, and so on), but may be used for individual certificates so long as the
information provided to the signing CA matches that of the FortiGate.
When selecting Import, there are four options: Local Certificate, CA Certificate, Remote Certificate, and CRL.
Local certificate
Local certificates are used by the FortiGate to identify itself, or a service it provides, such as HTTPS administrative
access, SSL VPN user portal, or virtual server load balancing where the FortiGate masquerades as the destination
server. When selecting Local Certificate, four certificate type options appear in the Import Certificate pane:
PKCS #12 Certificate This option takes a specific certificate file type that contains the private key. The
certificate will be encrypted and a password must be supplied with the certificate
file.
Certificate This option is intended for certificates that were generated without using the
FortiGate’s CSR. Since the certificate private key is being uploaded, a password
is required. This can be done two ways:
l Certificate file and key file (typically .CER and .PEM)
Automated This option allows you to configure the Automated Certificate Management
Environment (ACME), which allows you to request and use trusted certificates
signed by Let’s Encrypt (see ACME certificate support on page 2060 for
configuration details).
CA certificate
FortiGates come with many CA certificates from well-known certificate authorities pre-installed, just as most modern
operating systems like Windows and MacOS. Use this option to add private CA certificates to the FortiGate so that
certificates signed by this private CA are trusted by the FortiGate.
For example, a private CA can be used when two FortiGates are establishing a site-to-site VPN tunnel using a certificate
not signed by a public or trustworthy CA, or for your LDAPS connection to your corporate AD server that also uses a
certificate signed with a private CA in your domain. It is very common to upload a private CA when using PKI user
authentication, since most PKI user certificates will be signed by an internal CA.
When selecting CA Certificate, two type options appear in the Import CA Certificate pane:
Online SCEP The FortiGate contacts an SCEP server to request the CA certificate.
Remote certificate
Remote certificates are public certificates and contain only the public key. They are used to identify a remote device. For
example, when configuring your FortiGate for SAML authentication with the FortiGate as an identity provider (IdP), you
can optionally specify the service provider (SP) certificate. However, when configuring your FortiGate as a SP, you must
specify the certificate used by the IdP. Both these certificates can be uploaded to the FortiGate as a remote certificate,
since the private key is not necessary for its implementation.
CRL
Since it is not possible to recall a certificate, the CRL (certificate revocation list) list details certificates signed by valid
CAs that should no longer be trusted. Certificates may be revoked for many reasons, such as if the certificate was issued
erroneously, or if the private key of a valid certificate has been compromised. When selecting CRL, two import methods
are available:
File Based CAs publish a file containing the list of certificates that should no longer be
trusted.
Online Updating This is the preferred way to keep the list of revoked certificates up to date. Three
protocols are offered: HTTP, LDAP, and SCEP.
The generated CSR must be signed by a CA then loaded to the FortiGate. See Generate certificate signing request on
page 2044 for more details.
To generate a CSR:
# execute vpn certificate local generate cmp <certificate_name> <key_size> <server> <path>
<server_certificate> <auth_certificate> <user> <password> <subject> [SANs] [options]
# execute vpn certificate local generate default-ssl-ca
# execute vpn certificate local generate default-ssl-key-certs
# execute vpn certificate local generate default-ssl-serv-key
# execute vpn certificate local generate ec <certificate_name> <curve_name> <subject>
<country> <state/province> <city> <organization> <OU> <email> [SANs] [options]
# execute vpn certificate local generate rsa <certificate_name> <key_size> <subject>
<country> <state/province> <city> <organization> <OU> <email> [SANs] [options]
default-ssl-key-certs Generate the default RSA, DSA and ECDSA key certs for ssl resign.
Import
Any certificate uploaded to a VDOM is only accessible to that VDOM. Any certificate uploaded to the Global VDOM is
globally accessible by all VDOMs.
A signed certificate that is created using a CSR that was generated by the FortiGate does not include a private key, and
can be imported to the FortiGate from a TFTP file server.
To import a certificate that requires a private key to a VDOM, or when VDOMs are disabled:
Refer to the FortiOS CLI Reference for detailed options for each certificate type (local, CA, remote, OSCP server, CRL).
To import a global certificate that requires a private key when VDOMs are enabled:
This command is only available when VDOMs are enabled. For details, see the FortiOS CLI Reference.
There are several API methods to upload a certificate based on the type and purpose of the certificate. The parameters
of each method are available options, and some methods do not require all parameters to upload the certificate.
When uploading a certificate to the FortiGate using API, the certificate must be provided to the FortiGate in Base64
encoding. You must create a REST API user to authenticate to the FortiGate and use the generated API token in the
request.
api/v2/monitor/vpn-certificate/ca/import
{
"import_method": "[file|scep]",
"scep_url": "string",
"scep_ca_id": "string",
"scope": "[vdom*|global]",
"file_content": "string"
}
api/v2/monitor/vpn-certificate/crl/import
{
"scope": "[vdom*|global]",
"file_content": "string"
}
api/v2/monitor/vpn-certificate/local/import
{
"type": "[local|pkcs12|regular]",
"certname": "string",
"password": "string",
"key_file_content": "string",
"scope": "[vdom*|global]",
"acme-domain": "string",
"acme-email": "string",
"acme-ca-url": "string",
"acme-rsa-key-size": 0,
"acme-renew-window": 0,
"file_content": "string"
}
api/v2/monitor/vpn-certificate/remote/import
{
"scope": "[vdom*|global]",
"file_content": "string"
}
api/v2/monitor/vpn-certificate/csr/generate
{
"certname": "string",
"subject": "string",
"keytype": "[rsa|ec]",
"keysize": [1024|1536|2048|4096],
"curvename": "[secp256r1|secp384r1|secp521r1]",
"orgunits": [
"string"
],
"org": "string",
"city": "string",
"state": "string",
"countrycode": "string",
"email": "string",
"sub_alt_name": "string",
"password": "string",
"scep_url": "string",
"scep_password": "string",
"scope": "[vdom*|global]"
}
Example
In this example, a PKCS 12 certificate is uploaded as a local certificate using Postman as the API client. PowerShell is
used for the Base64 encoding.
4. In the HTTP request dropdown, change the request from GET to POST, and enter the FortiGate’s IP address and
the URL of the API call.
5. Click the Body tab, and copy and paste the API parameters.
6. Remove unnecessary parameters (ACME related parameters and key_file_content) and enter the correct
settings for your certificate. Copy and paste the contents of the file generated by PowerShell earlier into file_
content.
8. In FortiOS, go to System > Certificates and verify that the uploaded certificate is shown in the table (api_crt).
A signed SSL certificate can be used when configuring SSL VPN, for administrator GUI access, and for other functions
that require a certificate.
Before creating a certificate, you must have a registered domain. With a valid FortiGuard
subscription, FortiDDNS can be used to register a domain; see DDNS on page 204 for more
information.
Follow these instructions to purchase, import, and use a signed SSL certificate:
l Obtain, setup, and download an SSL certificate package from a certificate authority
l Generate a CSR
l Import the signed certificate into your FortiGate
l Configure your FortiGate to use the signed certificate
Obtain, setup, and download an SSL certificate package from a certificate authority
SSL certificate packages can be purchased from any Certificate Authority (CA), such as DigiCert, GoDaddy, or
GlobalSign.
A third party CA might not sign a certificate with an intranet name or IP address. For details,
see Can I request a certificate for an intranet name or IP address?
The process for purchasing, setting up, and downloading a certificate will vary depending on the CA that is used, and if a
CSR must be generated on the FortiGate.
1. Create an account with your chosen vendor, or use the account that you used to purchase your domain.
2. Locate the SSL Certificates page.
3. Purchase a basic SSL certificate for domain validation only. If required, a more secure SSL certificate can be
purchased.
4. If required, load the CSR, either by uploaded the text file or copying and pasting the contents into the requisite text
box. See Generate a CSR on page 2054 for information on generating the CSR on the FortiGate.
5. If required, set the server type to Other.
6. Verify the certificate per the requirements of the CA.
7. Download the signed certificate to your computer.
8. Import the signed certificate into your FortiGate; see Import the signed certificate into your FortiGate on page 2055.
Generate a CSR
Some CAs can auto-generate the CSR during the signing process, or provide tools for creating CSRs. If necessary, a
CSR can be created in your FortiGate device’s GUI.
1. Go to System > Certificates. By default, the Certificates option is not visible, see Feature visibility on page 2043 for
information.
2. Click Generate. The Generate Certificate Signing Request page opens.
4. Click OK.
The CSR will be added to the certificate list with a status of PENDING.
5. In the certificate list, select the new CSR then click Download to save the CSR to your computer.
The CSR file can be opened in any text editor, and will resemble the following:
-----BEGIN CERTIFICATE REQUEST-----
MIICuTCCAaECAQAwSzEcMBoGA1UEAxMTZm9ydGlzc2x2cG5kZW1vLmNvbTErMCkG
CSqGSIb3DQEJARYcZm9ydGlzc2x2cG5kZW1vQGZvcnRpbmV0LmNvbTCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMtnpNoR20NH2+UEX/NsyCmZhQqc4af3
Be1u9iOoNbo9Fk42gw47r71moAN+1jTL/Tcp3hRhXtpgoI7Zh3vjZnBbD2wwU8Ow
U7d1h5MULyMehR9r4T6OAJl4KbKPt5u90r5SpIb6mM1OIKvzMncuRS66rW1St0KP
mp/f6QjpjMrthnyJkCejgyTA1YwWNuT9BcO6PTkxBqVMLaRP6TUH6He9uhOx1Cj/
5tzvSdAozZIr2moMieQy0lNd6oQcgpdzaB9QN41+cZOlUXRCMPoH7E4KUe3/Gnis
+NMdQ8rIBijvWCXrKj20wb6sUEjAGJkcXlqVHWYCKWXl6Owejmc4ipkCAwEAAaAp
MCcGCSqGSIb3DQEJDjEaMBgwCQYDVR0TBAIwADALBgNVHQ8EBAMCBaAwDQYJKoZI
hvcNAQELBQADggEBAJKhtz2BPIKeHH9HcJKnfBKL+a6vu1l+1sW+YqnyD+3oR9ec
0eCmLnPxyyxsVel/tRsUg4DTfmooLNDhOjgfMsWxAGUQgrDH2k87cw6kiDAPCqv1
b+hFPNKZQSd09+HXAvOpXrMlrw5YdSaoRnau6Q02yUIYennKTIzFIscgh1mk4FSe
mb12DhPF+QydDCGDgtqnQbfxlDC0WmDcmxwa/0ZktoQhhhEbYgJ2O7l4TMqOxs/q
AZgwJlSNGBALLA2AxkIRUMKUteDdXz0QE8xNrvZpLTbWCNIpYJdRRqSd5C1w2VF4
CFgugTjFaJ13kYmBimeMRQsFtjLV5AxN+bUUsnQ=
-----END CERTIFICATE REQUEST-----
After the signed certificates have been imported, you can use it when configuring SSL VPN, for administrator GUI
access, and for other functions that require a certificate.
To configure your FortiGate to use the signed certificate for SSL VPN:
To configure using the certificate for administrator GUI access in the CLI:
To change the certificate that is used for administrator GUI access in the GUI:
In most production environments, you want to use a certificate issued be your own PKI for deep packet inspection (DPI).
An existing Microsoft root CA can be used to issue a subordinate CA (sub CA) certificate that is installed as a DPI
certificate on the FortiGate.
Complete the following steps to create your own sub CA certificate and use it for DPI:
1. Create a Microsoft sub CA certificate
2. Export the certificate and private key
3. Import the certificate and private key into the FortiGate
4. Configure a firewall policy for DPI
5. Verify that the sub CA certificate is being used for DPI
The FortiGate firewall uses information in the original web server certificate, then issues a new certificate signed by the
Microsoft DPI certificate. The FortiGate then sends this certificate with the issuing DPI certificate to the client's web
browser when the SSL session is being established.
The browser verifies that the certificate was issued by a valid CA, then looks for the issuing CA of the Microsoft DPI
certificate in its loca trusted root CA store to complete the path to trusted root CA.
The Microsoft CA root certificate is normally deployed to all client PCs in the Windows domain, so the client can
complete the certificate path up to a trusted root CA. The FortiGate now controls and can inspect the two HTTPS
sessions: one with the external web server, and one with the client PC.
A Microsoft sub CA certificate can be created on a Microsoft CA server, or remotely using a web browser.
Creating a certificate remotely requires that the web enrollment option is configured on the Microsoft CA server. Remote
certificate requests require HTTPS; requests are not allowed with HTTP.
l https://<IP-CA-server>/CertSrv.
5. Click Create and submit a request to this CA, then click Yes in the Web Access Confirmation warning.
6. For the Certificate Template, select Subordinate Certification Authority.
7. Enable Mark keys as exportable.
8. Fill out the remaining information according to your security policy.
1. Open the Microsoft Management Console (MMC) and add the Certificate Snap-in.
2. Go to the user's certificate store to locate the sub CA certificate that you just installed.
l Only the PKCS #12 (.PFX) format is available, and it requires a password.
l When selecting the encryption type, select TripleDES-SHA1 if you are using an older version of FortiOS (5.6.9
6. Complete the wizard, and save the DPI certificate to a local folder.
The certificate can be imported from the local computer using the GUI, or from a TFTP server using the CLI.
After importing the certificate, you can view it in the GUI to verify that it was successfully imported.
To import the certificate and private key into the FortiGate in the GUI:
7. Click OK.
To import the certificate and private key into the FortiGate in the CLI:
execute vpn certificate local import <certificate file name> <tftp ip address> <password>
1. Go to System > Certificates. By default, the Certificate option is not visible, see Feature visibility on page 2043 for
information.
The certificate is used in an SSL/SSH inspection profile that is then used in a firewall policy.
3. Click Apply.
4. Go to Policy & Objects > Firewall Policy.
5. Create a new policy, or edit an existing policy.
6. In the SSL Inspection field, select the new SSL inspection profile.
You can verify that the certificate is being used for resigning web server certificates when a user connects to an external
HTTPS website.
The Automated Certificate Management Environment (ACME), as defined in RFC 8555, is used by the public Let's
Encrypt certificate authority (https://letsencrypt.org) to provide free SSL server certificates. The FortiGate can be
configured to use certificates that are managed by Let's Encrypt, and other certificate management services, that use the
ACME protocol. The server certificates can be used for secure administrator log in to the FortiGate.
l The FortiGate must have a public IP address and a hostname in DNS (FQDN) that resolves to the public IP address.
l The configured ACME interface must be public facing so that the FortiGate can listen for ACME update requests. It
must not have any VIPs, or port forwarding on port 80 (HTTP) or 443 (HTTPS).
l The Subject Alternative Name (SAN) field is automatically filled with the FortiGate DNS hostname. It cannot be
edited, wildcards cannot be used, and multiple SANs cannot be added.
This example shows how to import an ACME certificate from Let's Encrypt, and use it for secured remote administrator
access to the FortiGate.
To configure certificates in the GUI, go to System > Feature Visibility and enable Certificates.
The Remote CA Certificate list includes the issuing Let's Encrypt intermediate CA, issued by the public CA ISRG
Root X1 from Digital Signature Trust Company.
To exchange the default FortiGate administration server certificate for the new public Let's Encrypt
server certificate in the GUI:
3. Click Apply.
4. Log in to the FortiGate using an administrator account from any internet browser. There should be no warnings
related to non-trusted certificates, and the certificate path should be valid.
1. Set the interface that the FortiGate communicates with Let's Encrypt on:
config system acme
set interface "port1"
end
2. Make sure that the FortiGate can contact the Let's Encrypt enrollment server:
5. Check the ACME client full status log for the CN domain:
# diagnose sys acme status-full test.ftntlab.de
{
"name": "test.ftntlab.de",
"finished": true,
"notified": false,
"last-run": "Thu, 11 Mar 2021 18:43:02 GMT",
"valid-from": "Thu, 11 Mar 2021 17:43:04 GMT",
"errors": 0,
"last": {
"status": 0,
"detail": "The certificate for the managed domain has been renewed successfully and
can be used (valid since Thu, 11 Mar 2021 17:43:04 GMT). A graceful server restart now
is recommended.",
"valid-from": "Thu, 11 Mar 2021 17:43:04 GMT"
},
"log": {
"entries": [
{
"when": "Thu, 11 Mar 2021 18:43:05 GMT",
"type": "message-renewed"
},
...
{
"when": "Thu, 11 Mar 2021 18:43:02 GMT",
"type": "starting"
}
]
}
}
To exchange the default FortiGate administration server certificate for the new public Let's Encrypt
server certificate in the CLI:
When you log in to the FortiGate using an administrator account there should be no warnings related to non-trusted
certificates, and the certificate path should be valid.
ECDSA (Elliptic Curve Digital Signature Algorithm) is supported in SSH administrative access. Administrative users can
connect using an ECDSA key pair or an ECDSA-based certificate.
1. On the PC, use a key generator (such as PuTTY) to generate an SSH public/private key pair using ECDSA
encryption.
3. On the PC, verify that the administrator can log in to the FortiGate with the private key:
# ssh -o StrictHostKeyChecking=no [email protected] -i ./.ssh/id_ecdsa
FortiGate-101F $ get system status
Version: FortiGate-101F v7.0.2,build0234,211019 (GA)
5. On the PC, verify that the administrator can log in to the FortiGate with the SSH certificate:
root@PC05:~# ssh -i certificate-private.pem [email protected]
FortiGate-101F $ get system status
Version: FortiGate-101F v7.0.2,build0234,211019 (GA)
This topic explains how to generate various certificates to be used in conjunction with a FortiGate, including:
l CA certificate
l Signing server and client certificates
l Server certificate
l SSL/TLS web administration authentication
l VPN authentication
l Client certificate
l End user authentication for SSL or IPsec VPN
XCA is an x509 certificate generation tool that handles RSA, DSA, and EC keys, as well as certificate signing requests
(PKCS #10) and CRLs.
There are several options for generating and managing certificates. This topic covers basic
certificate generation for XCA. It is not a comprehensive guide to its application and does not
explore all options available when generating a certificate.
Before creating any certificates, you must create an XCA database to group the certificates in. You should use a different
database for each PKI you create.
Creating a CA certificate
A CA certificate marks the root of a certificate chain. If this CA certificate is trusted by an end entity, any certificates
signed by the CA certificate are also trusted.
To create a CA certificate:
populated.
Subordinate CA certificates are similar to CA certificates because they are used to sign other certificates to establish
trust of the signed certificate's content. This trust of the signed certificate is only valid if the subordinate CA is also trusted
by the client.
When performing deep inspection on a FortiGate, the FortiGate proxies the connection between the endpoint and the
server. This is done transparently so that the end user believes they are communicating with the server, and the server
with the client. To do this, when the webpage is requested by a client, the FortiGate must present a certificate that
matches the requested website and is trusted by the client.
The certificate presented by the FortiGate is generated on-demand to match the requested website and is signed by this
subordinate CA to establish trust with the requesting endpoint. The subordinate CA must be installed on the ForitGate
(with the private key) and on the client device (without the private key).
A subordinate CA is used in place of a CA so that it may be revoked as necessary. This is critical since the subordinate
CA’s private key is exported and becomes susceptible of being compromised. If the CA private key becomes
compromised, you would be forced to re-create your entire PKI with a new root CA because root CAs cannot be revoked.
See Microsoft CA deep packet inspection on page 2056 for more information about using subordinate CA certificates.
When a CA signs a host certificate, that CA is vouching for the credentials in the certificate. These credentials are what
identifies the host.
Some endpoints can generate a certificate signing request (CSR). A CSR is a certificate outline that specifies the details
of the endpoint, including its public key. This allows the CA to review the details and sign the request if they are true. This
request is then returned or uploaded to the generating endpoint to be used.
Since some endpoints cannot generate their own CSR, you can create the certificate manually in XCA. If you already
have a CSR, use the Certificate signing requests tab to import and then sign it.
This certificate may be used to identify an SSL or TLS server by uploading the certificate and key pair to the server, such
as when the FortiGate presents the administrative webpage or for SSL VPN authentication (see Configure your
FortiGate to use the signed certificate on page 2055). Another use case for a server host certificate is to enable SSL
server protection so the FortiGate simulates the real server and brokers the connection (see Protecting an SSL server on
page 1219).
A client host certificate is used to identify an end entity in a more secure way than a username and password. Once the
client host certificate is generated, see SSL VPN with certificate authentication on page 1586 for more information about
using the certificate.
4. Click OK.
5. Click the Certificates tab. The FortiGate and client certificates are listed under the signing CA certificate and are
ready to be exported.
Certificate formats
Certificate file formats indicate what is contained in the file, how it is formatted, and how it is encoded. See Uploading a
certificate using the GUI on page 2044 for more information about which formats the FortiGate expects for a given
certificate type.
Configuration scripts
Configuration scripts are text files that contain CLI command sequences. They can be created using a text editor or
copied from a CLI console, either manually or using the Record CLI Script function.
Scripts can be used to run the same task on multiple devices. For example, if your devices use the same security
policies, you can enter or record the commands to create those policies in a script, and then run the script on each
device. You could also create the policies in the GUI, and then copy and paste the CLI commands from the CLI Console
using the show command.
If the FortiGate is managed by FortiManager, scripts can be uploaded to FortiManager and then run on any other
FortiGates that are managed by that FortiManager. See Scripts in the FortiManager Administration Guide.
A comment line in a script starts with the number sign (#). Comments are not executed.
Workspace mode
Workspace mode allows administrators to make a batch of changes that are not implemented until the transaction is
committed. Prior to committing, the changes can be reverted or edited as needed without impacting current operations.
When an object is edited in workspace mode it is locked, preventing other administrators from editing that object. A
warning message will be shown to let the administrator know that the object is currently being configured in another
transaction.
All administrators can use workspace mode; their permissions in workspace mode are the same as defined in their
account profile.
A workspace mode transaction times out after five minutes if there is no activity. When a transaction times out, all
changes are discarded. A warning message will be shown to let the administrator know that a timeout is imminent, or has
already happened:
Diagnose commands
Custom languages
Custom languages can be uploaded and used for SSL VPN web portals. Custom languages must be enabled before
they can be added in the GUI.
5. Click OK.
4. Click OK.
RAID
Most FortiGate devices with multiple disk drives (SSD or HHD) can be configured to use RAID.
Enabling or disabling RAID, and changing the RAID level, erases all data on the log disk and
reboots the device.
Disk SSD1 ref: 255 223.6GiB type: SSD [ATA INTEL SSDSC2KB24] dev: /dev/sda
Disk SSD2 ref: 16 223.6GiB type: SSD [ATA INTEL SSDSC2KB24] dev: /dev/sdb
partition ref: 17 62.7GiB, 62.4GiB free mounted: Y label: WANOPTXX1FEBBFA1 dev:
/dev/sdb1 start: 2048
partition ref: 18 63.7GiB, 63.7GiB free mounted: N label: dev: /dev/sdb2 start:
133625856
partition ref: 19 85.0GiB, 85.0GiB free mounted: N label: dev: /dev/sdb3 start:
267249664
Disk SSD1 ref: 255 223.6GiB type: SSD [ATA INTEL SSDSC2KB24] dev: /dev/sda
partition ref: 1 220.1GiB, 219.0GiB free mounted: Y label: LOGUSEDXA707476A dev:
/dev/sda1 start: 2048
Disk SSD2 ref: 16 223.6GiB type: SSD [ATA INTEL SSDSC2KB24] dev: /dev/sdb
partition ref: 17 62.7GiB, 62.4GiB free mounted: Y label: WANOPTXX1FEBBFA1 dev:
/dev/sdb1 start: 2048
partition ref: 18 63.7GiB, 63.7GiB free mounted: N label: dev: /dev/sdb2 start:
133625856
partition ref: 19 85.0GiB, 85.0GiB free mounted: N label: dev: /dev/sdb3 start:
267249664
Disk SYSTEM(boot) 14.9GiB type: SSD [ATA 16GB SATA Flash] dev: /dev/sdc
partition 247.0MiB, 155.0MiB free mounted: N label: dev: /dev/sdc1(boot) start: 1
partition 247.0MiB, 154.0MiB free mounted: Y label: dev: /dev/sdc2(boot) start: 524289
partition ref: 35 14.2GiB, 14.0GiB free mounted: Y label: dev: /dev/sdc3 start:
1048577
Disk USB-6(user-usb) ref: 48 28.6GiB type: USB [SanDisk Ultra] dev: /dev/sdd
<<<<<<===this info for usb disk because i have usb disk on FGT301E
partition ref: 49 28.6GiB, 28.6GiB free mounted: Y label: dev: /dev/sdd1 start: 0
l RAID enabled:
# execute disk raid status
RAID Level: Raid-1
RAID Status: OK (Background-Synchronizing) (9%)
RAID Size: 239GB
l RAID disabled:
# execute disk raid status
RAID Level: Unavailable
RAID Status: Unavailable
RAID Size: 0GB
To enable RAID:
Configuring raid...
- unmounting /data2 : ok
- unmounting /var/log : ok
- unmounting /usb : ok
- unmounting /var/storage/SSD2-WANOPTXX0EA0EF17 : ok
Configuring raid...
- unmounting /data2 : ok
- unmounting /var/log : ok
- unmounting /usb : ok
To disable RAID:
Configuring raid...
- unmounting /data2 : ok
- unmounting /var/log : ok
- unmounting /usb : ok
FortiGates use SSL/TLS encryption for HTTPS and SSH administrative access, and SSL VPN remote access. When
establishing an SSL/TLS or SSH connection, you can control the encryption level and the ciphers that are used in order
to control the security level.
HTTPS access
When strong encryption is enabled, only TLS 1.2 and TLS 1.3 are allowed. If strong encryption is then disabled, TLS 1.1
has to be manually enabled.
Setting admin-https-ssl-ciphersuites controls which cipher suites are offered in TLS 1.3. TLS 1.2 and lower are
not affected by this command. To disable all TLS 1.3 cipher suites, remove TLS1-3 from admin-https-ssl-
versions.
Setting admin-https-ssl-banned-ciphers controls which cipher technologies will not be offered for TLS 1.2 and
lower.
Specific cipher suites are supported by each TLS version:
ECDHE-RSA-AES256-SHA1 AES256-SHA1
1
TLS 1.1
ECDHE-RSA-AES128-SHA1 AES128-SHA1
ECDHE-RSA-AES256-GCM-SHA384 AES256-GCM-SHA3841
ECDHE-RSA-AES128-GCM-SHA256 AES128-GCM-SHA2561
ECDHE-RSA-CHACHA20-POLY1305 AES256-SHA256
ECDHE-RSA-AES128-SHA256 AES256-SHA1
ECDHE-RSA-AES256-SHA1 AES128-SHA1
ECDHE-RSA-AES128-SHA1
TLS-AES-128-GCM-SHA256 TLS-AES-128-CCM-8-SHA256
TLS-AES-128-CCM-SHA256
1
Disabled if strong encryption (strong-crypto) is enabled.
SSH access
The algorithms available when configuring set ssh-enc-algo are affected by set strong-crypto as follows:
Strong encryption
Supported ciphers
setting
[email protected] aes256-ctr
Enabled
[email protected]
[email protected] aes128-ctr
aes192-ctr aes256-ctr
arcfour256 arcfour128
aes128-cbc 3des-cbc
Disabled
blowfish-cbc cast128-cbc
aes192-cbc aes256-cbc
arcfour [email protected]
[email protected] [email protected]
The following options are available for the ssh-kex-algo algorithm based on the strong encryption setting:
Strong encryption
Supported ciphers
setting
diffie-hellman-group-exchange-sha256 [email protected]
ecdh-sha2-nistp521
diffie-hellman-group14-sha1 diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256 [email protected]
Disabled
ecdh-sha2-nistp256 ecdh-sha2-nistp384
ecdh-sha2-nistp521
The following options are available for the ssh-mac-algo algorithm based on the strong encryption setting:
Strong encryption
Supported ciphers
setting
hmac-sha2-256 [email protected]
Enabled
hmac-sha2-512 [email protected]
hmac-md5 [email protected]
hmac-md5-96 [email protected]
hmac-sha1 [email protected]
hmac-sha2-256 [email protected]
hmac-ripemd160 [email protected]
[email protected] [email protected]
[email protected] [email protected]
SSL VPN
For SSL VPN connections, the TLS versions and cipher suites are controlled using the following commands:
config vpn ssl setting
set algorithm {high | medium | low}
set ssl-max-proto-ver {tls1-0 | tls1-1 | tls1-2 | tls1-3}
set ssl-min-proto-ver {tls1-0 | tls1-1 | tls1-2 | tls1-3}
set ciphersuite {TLS-AES-128-GCM-SHA256 TLS-AES-256-GCM-SHA384 TLS-CHACHA20-POLY1305-
SHA256 TLS-AES-128-CCM-SHA256 TLS-AES-128-CCM-8-SHA256}
end
Cipher suites (ciphersuite) can only be selected when the SSL maximum version is TLS 1.3.
When the SSL VPN security level (algorithm) is set to high, only high levels are allowed. When it is set to medium,
high and medium levels are allowed. When it is set to low, any level is allowed.
The strong encryption (strong-crypto) command has no effect on the SSL VPN encryption level or ciphers.
Specific cipher suites are supported by each TLS version:
ECDHE-RSA-AES256-SHA DHE-RSA-CAMELLIA128-SHA
DHE-RSA-AES256-SHA AES128-SHA
DHE-RSA-CAMELLIA256-SHA SEED-SHA1
AES256-SHA CAMELLIA128-SHA
TLS 1.0
CAMELLIA256-SHA ECDHE-RSA-DES-CBC3-SHA1
ECDHE-RSA-AES128-SHA EDH-RSA-DES-CBC3-SHA1
DHE-RSA-AES128-SHA1 DES-CBC3-SHA1
DHE-RSA-SEED-SHA
ECDHE-RSA-AES256-SHA DHE-RSA-CAMELLIA128-SHA
DHE-RSA-AES256-SHA AES128-SHA
DHE-RSA-CAMELLIA256-SHA SEED-SHA1
AES256-SHA CAMELLIA128-SHA
TLS 1.1
CAMELLIA256-SHA ECDHE-RSA-DES-CBC3-SHA1
ECDHE-RSA-AES128-SHA EDH-RSA-DES-CBC3-SHA1
DHE-RSA-AES128-SHA DES-CBC3-SHA1
DHE-RSA-SEED-SHA1
ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-SHA
ECDHE-RSA-AES256-SHA384 DHE-RSA-AES128-GCM-SHA256
ECDHE-RSA-AES256-SHA DHE-RSA-AES128-CCM8
DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES128-CCM
ECDHE-RSA-CHACHA20-POLY1305 AES128-CCM8
DHE-RSA-CHACHA20-POLY1305 AES128-CCM
DHE-RSA-AES256-CCM8 DHE-RSA-AES128-SHA256
DHE-RSA-AES256-CCM DHE-RSA-AES128-SHA
DHE-RSA-AES256-SHA256 ECDHE-RSA-CAMELLIA128-SHA256
DHE-RSA-AES256-SHA DHE-RSA-CAMELLIA128-SHA256
ECDHE-RSA-CAMELLIA256-SHA384 DHE-RSA-SEED-SHA1
DHE-RSA-CAMELLIA256-SHA256 DHE-RSA-CAMELLIA128-SHA
AES256-GCM-SHA384 AES128-SHA256
AES256-CCM8 AES128-SHA
AES256-CCM CAMELLIA128-SHA256
AES256-SHA256 SEED-SHA1
AES256-SHA CAMELLIA128-SHA
CAMELLIA256-SHA256 ARIA128-GCM-SHA256
CAMELLIA256-SHA DHE-RSA-ARIA128-GCM-SHA256
ARIA256-GCM-SHA384 ECDHE-ARIA128-GCM-SHA256
DHE-RSA-ARIA256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384
ECDHE-ARIA256-GCM-SHA384 ECDHE-RSA-DES-CBC3-SHA1
ECDHE-RSA-AES128-GCM-SHA256 EDH-RSA-DES-CBC3-SHA1
ECDHE-RSA-AES128-SHA256 DES-CBC3-SHA1
TLS_AES_256_GCM_SHA384 TLS_AES_128_CCM_SHA256
TLS_AES_128_GCM_SHA256
1
This cipher is not available when the SSL VPN security level (algorithm) is set to high.
Using APIs
Token-based authentication
There are two types of authentication used to make API calls on the FortiGate: session-based and token-based.
Token-based authentication requires the administrator to generate a token, which is then included in each API request
for authentication. A token is automatically generated when a new API administrator is created in FortiOS.
Once the API administrator is created and the token displays, there is no way for the FortiGate
to provide this token again. Ensure you record the token, and store it in a safe location;
otherwise, you will have to generate a new token.
When creating an API administrator, it is best practice to provide this account (and the associated token) with the
minimum permissions required to complete the function. For example, if you only plan to use API calls to retrieve
statistics or information from the FortiGate, the account should have read permissions.
The API administrator account used in this topic's examples has full permissions strictly to
illustrate various call types and does not adhere to the preceding recommendation.
See REST API administrator on page 1857 for detailed steps to create a REST API administrator.
The newly created API token is used to query the FortiGate for all firewall addresses. Many applications can be used for
this query, and this example uses a web browser to demonstrate the functionality.
General API call
One of the simplest API calls is api/v2/cmdb/firewall/address, which returns all information about all firewall
addresses.
Since a general API call for address objects returns a large amount of information, it may be beneficial to format the API
call to display certain information using the format parameter. In this example, the format parameter is used to display
the name and comment for each firewall address.
The filter parameter can be used to specify a field and a keyword to limit what results match and are returned by a call. In
this example, the preceding call is used with a filter to return only names and comments for address objects with the
word Sales in the name.
"name":"Sales Network",
"comment":""
},
{
"q_origin_key":"Sales-Portal",
"name":"Sales-Portal",
"comment":""
}
],
"vdom":"root",
"path":"firewall",
"name":"address",
"status":"success",
"http_status":200,
"serial":"****************",
"version":"v6.2.0",
"build":866
}
For a complete list of API calls, see the Fortinet Development Network (FNDN). A subscription is required to access the
FNDN.
The Fortinet Security Fabric provides an intelligent architecture that interconnects discrete security solutions into an
integrated whole to detect, monitor, block, and remediate attacks across the entire attack surface. It delivers broad
protection and visibility into every network segment and device, be they hardware, virtual, or cloud based.
l The physical topology view shows all connected devices, including access layer devices. The logical topology view
shows information about the interfaces that each device is connected to.
l Security rating checks analyze the Security Fabric deployment to identify potential vulnerabilities and highlight best
practices to improve the network configuration, deploy new hardware and software, and increase visibility and
control of the network.
l Fabric connectors provide integration with multiple SDN, cloud, and partner technology platforms to automate the
process of managing dynamic security updates without manual intervention.
l Automation pairs an event trigger with one or more actions to monitor the network and take the designated actions
automatically when the Security Fabric detects a threat.
This section contains information about how to configure the following devices as part of the Fortinet Security Fabric:
l Components on page 2090
l Configuring the root FortiGate and downstream FortiGates
l Configuring FortiAnalyzer
l Configuring FortiGate Cloud on page 2102
l Configuring FortiAnalyzer Cloud service on page 2106
l Configuring FortiManager on page 2110
l Configuring FortiManager Cloud service on page 2112
l Configuring Sandboxing on page 2113
l Configuring FortiClient EMS on page 2118
l Synchronizing FortiClient ZTNA tags on page 2130
l Configuring FortiNAC on page 2133
l Configuring FortiAP and FortiSwitch on page 2135
l Configuring FortiMail on page 2136
l Configuring FortiAI on page 2138
l Configuring FortiDeceptor on page 2142
l Configuring FortiWeb on page 2145
l Configuring FortiTester on page 2147
l Configuring FortiMonitor on page 2151
l Configuring FortiVoice on page 2153
l Configuring additional devices on page 2157
l Using the Security Fabric
l Deploying the Security Fabric on page 2174
l Deploying the Security Fabric in a multi-VDOM environment on page 2182
System requirements
To set up the Security Fabric, the devices that you want to include must meet the Product Integration and Support
requirements in the FortiOS Release Notes.
Some features of the Security Fabric are only available in certain firmware versions and models. Not all FortiGate
models can run the FortiGuard Security Rating Service if they are the root FortiGate in a Security Fabric. For more
information, see the Special Notices in the FortiOS Release Notes.
Prerequisites
l If devices are not already installed in your network, complete basic installation and configuration tasks by following
the instructions in the device documentation.
l FortiGate devices must be operating in NAT mode.
Components
The Fortinet Security Fabric consists of different components that work together to secure you network.
The following devices are required to create a Security Fabric:
Device Description
FortiGate FortiGate devices are the core of the Security Fabric and can have one of the following roles:
l Root:
The root FortiGate is the main component in the Security Fabric. It is typically located on
the edge of the network and connects the internal devices and networks to the Internet
through your ISP. From the root FortiGate, you can see information about the entire
Security Fabric on the Physical and Logical Topology pages in the GUI.
l Downstream:
After a root FortiGate is installed, all other FortiGate devices in the Security Fabric act as
Internal Segmentation Firewalls (ISFWs), located at strategic points in your internal
network, rather than on the network edge. This allows extra security measures to be
taken around key network components, such as servers that contain valuable intellectual
property. ISFW FortiGate devices create network visibility by sending traffic and
information about the devices that are connected to them to the root FortiGate.
See Configuring the root FortiGate and downstream FortiGates on page 2093 for more
information about adding FortiGate devices in the Security Fabric.
FortiGate documentation: https://docs.fortinet.com/product/fortigate
FortiAnalyzer* FortiAnalyzer gives you increased visibility into your network, centralized monitoring, and
awareness of threats, events, and network activity by collecting and correlating logs from all
Security Fabric devices. This gives you a deeper and more comprehensive view across the
entire Security Fabric.
Device Description
See Configuring FortiAnalyzer on page 2100 for more information about adding FortiAnalyzer
devices in the Security Fabric.
FortiAnalyzer documentation: https://docs.fortinet.com/product/fortianalyzer
Cloud Logging* There are two options for cloud logging: FortiAnalyzer Cloud and FortiGate Cloud. Either can
be used to enable the Security Fabric root device; however, if using FortiGate Cloud, all
downstream devices must belong to the same FortiCloud account.
See Configuring FortiGate Cloud on page 2102 for more information about configuring a
Security Fabric with FortiGate Cloud.
FortiGate Cloud documentation: https://docs.fortinet.com/product/fortigate-cloud
*
FortiAnalyzer or Cloud Logging is a required component for the Security Fabric. Either FortiAnalyzer, FortiAnalyzer
Cloud, or FortiGate Cloud can be used to met this requirement.
The following devices are recommended:
Device Description
FortiAI FortiAI uses artificial neural networks (ANN) that can deliver sub-second malware detection
and a verdict. Add FortiAI to your Security Fabric to automatically quarantine attacks.
See Configuring FortiAI on page 2138 for more information about adding FortiAI devices in
the Security Fabric.
FortiAI documentation: https://docs.fortinet.com/product/fortiai
FortiAP Add FortiAP devices to extend the Security Fabric to your wireless devices. Devices
connected to a FortiAP appear in the Physical and Logical Topology pages in the Security
Fabric menu.
See Configuring FortiAP and FortiSwitch on page 2135 for more information about adding
FortiAP devices in the Security Fabric.
FortiAP documentation: https://docs.fortinet.com/product/fortiap
FortiClient FortiClient adds endpoint control to devices that are located in the Security Fabric, allowing
only traffic from compliant devices to flow through the FortiGate. FortiClient compliance
profiles are applied by the first FortiGate that a device’s traffic flows through. Device
registration and on-net status information for a device that is running FortiClient appears only
on the FortiGate that applies the FortiClient profile to that device.
FortiClient documentation: https://docs.fortinet.com/product/forticlient
FortiDeceptor FortiDeceptor automatically lays out a layer of decoys and lures, which helps conceal
sensitive and critical assets behind a fabricated deception surface to confuse and redirect
attackers while revealing their presence on your network.
See Configuring FortiDeceptor on page 2142 for more information about adding
FortiDeceptor devices in the Security Fabric.
FortiDeceptor documentation: https://docs.fortinet.com/product/fortideceptor
FortiClient EMS FortiClient EMS is used in the Security Fabric to provide visibility across your network,
securely share information, and assign security profiles to endpoints.
See Configuring FortiClient EMS on page 2118 for more information about adding FortiClient
EMS devices in the Security Fabric.
Device Description
FortiMail FortiMail antispam processing helps offload from other devices in the Security Fabric that
would typically carry out this process.
See Configuring FortiMail on page 2136 for more information about adding FortiMail devices
in the Security Fabric.
FortiMail documentation: https://docs.fortinet.com/product/fortimail
FortiManager Add FortiManager to simplify the network management of devices in the Security Fabric by
centralizing management access in a single device. This allows you to easily control the
deployment of security policies, FortiGuard content security updates, firmware revisions, and
individual configurations for devices in the Security Fabric.
See Configuring FortiManager on page 2110 for more information about adding FortiManager
devices in the Security Fabric.
FortiManager documentation: https://docs.fortinet.com/product/fortimanager
FortiSandbox Add FortiSandbox to your Security Fabric to improve security with sandbox inspection.
Sandbox integration allows FortiGate devices in the Security Fabric to automatically receive
signature updates from FortiSandbox and add the originating URL of any malicious file to a
blocked URL list.
See Configuring Sandboxing on page 2113 for more information about adding FortiSandbox
devices in the Security Fabric.
FortiSandbox documentation: https://docs.fortinet.com/product/fortisandbox
FortiSwitch A FortiSwitch can be added to the Security Fabric when it is managed by a FortiGate that is in
the Security Fabric with the FortiLink protocol, and connected to an interface with Security
Fabric Connection enabled. FortiSwitch ports to become logical extensions of the FortiGate.
Devices connected to the FortiSwitch appear in the Physical and Logical Topology pages in
the Security Fabric menu, and security features, such as FortiClient compliance profiles, are
applied to them.
See Configuring FortiAP and FortiSwitch on page 2135 for more information about adding
FortiSwitch devices in the Security Fabric.
FortiSwitch documentation: https://docs.fortinet.com/product/fortiswitch
FortiWeb Add FortiWeb to defend the application attack surface from attacks that target application
exploits. You can also configure FortiWeb to apply web application firewall features, virus
scanning, and web filtering to HTTP traffic to help offload from other devices in the Security
Fabric that would typically carry out these processes.
See Configuring FortiWeb on page 2145 for more information about adding FortiWeb devices
in the Security Fabric.
FortiWeb documentation: https://docs.fortinet.com/product/fortiweb
Device Description
FortiADC FortiADC devices optimize the availability, user experience, and scalability of enterprise
application delivery. They enable fast, secure, and intelligent acceleration and distribution of
even the most demanding enterprise applications.
See Configuring additional devices on page 2157 for more information about adding FortiADC
devices in the Security Fabric.
FortiADC documentation: https://docs.fortinet.com/product/fortiadc
FortiDDoS FortiDDoS is a Network Behavior Anomaly (NBA) prevention system that detects and blocks
attacks that intend to disrupt network service by overutilizing server resources.
See Configuring additional devices on page 2157 for more information about adding
FortiDDoS devices in the Security Fabric.
FortiDDoS documentation: https://docs.fortinet.com/product/fortiddos
FortiWLC FortiWLC delivers seamless mobility and superior reliability with optimized client distribution
and channel utilization. Both single and multi channel deployment options are supported,
maximizing efficiency to make the most of available wireless spectrum.
See Configuring additional devices on page 2157 for more information about adding
FortiWLC devices in the Security Fabric.
FortiWLC documentation: https://docs.fortinet.com/product/wireless-controller
Other Fortinet Many other Fortinet products can be added to the Security Fabric, including
products FortiAuthenticator, FortiToken, FortiCache, and FortiSIEM.
Documentation: https://docs.fortinet.com/
Third-party Third-party products that belong to the Fortinet Fabric-Ready Partner Program can be added
products to the Security Fabric.
The following procedures include configuration steps for a typical Security Fabric implementation, where the edge
FortiGate is the root FortiGate with other FortiGates that are downstream from the root FortiGate.
For information about the recommended number of downstream FortiGates, see the FortiOS Best Practices.
Prerequisite
The edge FortiGate is typically configured as the root FortiGate, as this allows you to view the full topology of the
Security Fabric from the top down.
The following steps describe how to add the FortiGate to serve as the root device, and how to configure FortiAnalyzer
logging.
1. On the root FortiGate, go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
2. For Status, click Enable.
3. Set the Security Fabric role to Serve as Fabric Root. FortiAnalyzer logging is automatically enabled and the settings
can be configured in the slide-out pane.
When neither FortiAnalyzer Logging nor Cloud Logging are enabled, if the FortiGate
detects that a FortiAnalyzer Cloud entitlement is available on this FortiGate, the slide-out
pane will display Cloud Logging configurations. Otherwise, if Cloud Logging is enabled,
the slide-out pane will display the Cloud Logging page. If Cloud Logging is disabled but
FortiAnalyzer is enabled, then it will display the FortiAnalyzer Logging page.
In the Cloud Logging card, there are two options available, FortiGate Cloud and
FortiAnalyzer Cloud. If there are multiple services enrolled on the FortiGate, the
preference is: Cloud Logging (FortiAnalyzer Cloud), FortiAnalyzer Logging, then Cloud
Logging (FortiGate Cloud).
Using the root FortiGate with disk to store historic user and device information
This backend implementation allows the root FortiGate in a Security Fabric to store historic user and device information
in a database on its disk. This will allow administrators to visualize users and devices over a period of time.
The daemon, user_info_history, stores this data on the disk. The information source for the historical data will be the
user_info daemon, which would be recorded on the disk when user_info notifies user_info_history that a user has logged
out or the device is no longer connected.
Downstream device serial numbers can be pre-authorized from the root FortiGate, or allowed to join by request. New
authorization requests include the device serial number, IP address, and HA members. HA members can include up to
four serial numbers and is used to ensure that, in the event of a fail over, the secondary FortiGate is still authorized.
A downstream device's certificate can also be used to authorize the device by uploading the certificate to the root
FortiGate.
When a downstream Fortinet device's serial number or certificate is added to the trusted list on the root FortiGate, the
device can join the Security Fabric as soon as it connects. After the new device is authorized, connected FortiAP and
FortiSwitch devices are automatically included in the topology, where they can be authorized with one click.
The interface that connects to the downstream FortiGate must have Security Fabric Connection enabled.
To pre-authorize a FortiGate:
1. On the root FortiGate, go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
2. In the Device authorization field click Edit. The Device Authorization window opens.
3. Click Create New to add a new device for pre-authorization.
4. Enter the device name in the Name field.
5. Select the Authorization type, either Serial Number or Certificate.
6. If Certificate is selected, click Browse to upload the downstream device's certificate from the management
computer.
When you log in to an unauthorized downstream FortiGate, the log in prompt includes the option to authorize the device
on the root FortiGate.
3. Enter the log in credentials for the root FortiGate, then click Login.
A list of pending authorizations is shown.
4. Select Allow and then click OK to authorize the downstream FortiGate. You can also select Deny to reject the
authorization, or Later to postpone the decision to the next time that you log in.
When authorization is allowed, the pop-up window closes, and the log in prompt shows that the downstream
FortiGate has been authorized.
The root FortiGate pop-up window shows the state of the device authorization.
In this example, a downstream FortiGate is unauthorized and it is not registered to a FortiCloud account.
1. Log in to the root FortiGate and go to Security Fabric > Fabric Connectors. Devices requiring authorization are
highlighted in the Topology tree (right-side gutter).
2. Click on a highlighted device and select Authorize. The Authorize Devices pane opens.
3. Click Authorize. The Authorization Summary pane opens.
4. The FortiGate is now authorized, so click Register to register the device to a FortiCloud account.
You can use IPAM to automatically assign subnets to downstream FortiGates to prevent
duplicate IP addresses from overlapping within the same Security Fabric. See Configure IPAM
locally on the FortiGate on page 180.
CLI commands
Use the following commands to view, accept, and deny authorization requests, to view upstream and downstream
devices, and to list or test Fabric devices:
Command Description
diagnose sys csf View pending authorization requests on the root FortiGate.
authorization
pending-list
Command Description
diagnose sys csf Authorize a device to join the Security Fabric.
authorization accept
<serial number>
diagnose sys csf Deny a device from joining the Security Fabric.
authorization deny
<serial number>
diagnose sys csf Show connected downstream devices.
downstream
diagnose sys csf upstream Show connected upstream devices.
diagnose sys csf fabric- List all known Fabric devices.
device list
diagnose sys csf fabric- Test connections to locally configured Fabric devices.
device test
Desynchronizing settings
By default, the settings for FortiAnalyzer logging, central management, sandbox inspection, and FortiClient EMS are
synchronized between all FortiGates in the Security Fabric.
Deauthorizing a device
To deauthorize a device:
end
end
Configuring FortiAnalyzer
FortiAnalyzer or Cloud Logging is a required component for the Security Fabric. Either FortiAnalyzer, FortiAnalyzer
Cloud, or FortiGate Cloud can be used to met this requirement.
FortiAnalyzer allows the Security Fabric to show historical data for the Security Fabric topology and logs for the entire
Security Fabric. For more information about using FortiAnalyzer, see the FortiAnalyzer Administration Guide.
c. Click Apply.
2. In FortiOS, go to Security Fabric > Fabric Connectors and double-click the FortiAnalyzer Logging card.
3. Enter the FortiAnalyzer IP.
4. Click OK. The FortiAnalyzer Status (in the right-side gutter) is Unauthorized.
8. In FortiOS, refresh the FortiAnalyzer Logging page. The FortiAnalyzer Status is Authorized.
FortiGates with a FortiCloud Premium subscription (AFAC) for Cloud-based Central Logging & Analytics, can send traffic
logs to FortiAnalyzer Cloud in addition to UTM logs and event logs. After the Premium subscription is registered through
FortiCare, FortiGuard will verify the purchase and authorize the AFAC contract. Once the contract is verified, FortiGuard
will deliver the contract to FortiGate.
FortiGates with a Standard FortiAnalyzer Cloud subscription (FAZC) can only send UTM and event logs. FortiGates with
a Premium subscription will send the UTM and event logs even if the Standard subscription has expired.
For information about cloud logging, see Configuring FortiAnalyzer Cloud service on page 2106
The FAZC and AFAC fields display the subscription expiration date. The Support contract field displays the
FortiCare account information. The User ID field displays the ID for FortiAnalyzer-Cloud instance.
...
FAZC,Tue Sep 24 16:00:00 2030
AFAC,Mon Nov 29 16:00:00 2021
...
Support contract: pending_registration=255 got_contract_info=1
account_id=[****@fortinet.com] company=[Fortinet] industry=[Technology]
User ID: 979090
FortiGate Cloud is a hosted security management and log retention service for FortiGate devices. It provides centralized
reporting, traffic analysis, configuration management, and log retention without the need for additional hardware or
software.
FortiGate Cloud offers a wide range of features:
l Simplified central management
FortiGate Cloud provides a central GUI to manage individual or aggregated FortiGate and FortiWiFi devices.
Adding a device to the FortiGate Cloud management subscription is straightforward. FortiGate Cloud has detailed
traffic and application visibility across the whole network.
l Hosted log retention with large default storage allocated
Log retention is an integral part of any security and compliance program, but administering a separate storage
system is onerous. FortiGate Cloud takes care of this automatically and stores the valuable log information in the
cloud. Different types of logs can be stored, including Traffic, System Events, Web, Applications, and Security
Events.
l Monitoring and alerting in real time
Network availability is critical to a good end-user experience. FortiGate Cloud enables you to monitor your FortiGate
network in real time with different alerting mechanisms to pinpoint potential issues. Alerting mechanisms can be
delivered via email.
Before you can activate a FortiGate Cloud account, you must first register your device.
FortiGate Cloud accounts can be registered manually through the FortiGate Cloud website, https://www.forticloud.com,
or you can easily register and activate your account directly from your FortiGate.
1. Go to Security Fabric > Fabric Connectors > Cloud Logging or Log & Report > Log Settings.
2. Enable Cloud Logging.
3. Select an upload option: Realtime, Every Minute, or Every 5 Minutes (default).
4. Click Apply.
Once logging has been configured and you have registered your account, you can log into the FortiGate Cloud portal
and begin viewing your logging results. There are two methods to reach the FortiGate Cloud portal:
l If you have direct network access to the FortiGate:
a. Go to Dashboard > Status.
b. In the FortiGate Cloud widget, in the Status field, click Activated > Launch Portal, or, in the Licenses widget,
click FortiCare Support > Launch Portal.
l If you do not have access to the FortiGate’s interface, visit the FortiGate Cloud website (https://www.forticloud.com)
and log in remotely, using your email and password. It will ask you to confirm the FortiGate Cloud account you are
connecting to and then you will be granted access.
A Security Fabric can be created on the root device using FortiGate Cloud for cloud logging. When the FortiCloud
account enforcement is enabled (by default), members joining the Fabric must be registered to the same FortiCloud
account. Devices that are not activated with FortiCloud are also allowed.
For example, the root FortiGate (FGT_10_101F) is configured with FortiGate Cloud logging. In the Security Fabric
settings, the FortiCloud account enforcement option is enabled by default. The downstream FortiGate, FGT-F-VM, with
the same FortiCloud account ID is able to join the Fabric.
d. Click OK.
2. Configure the Security Fabric settings (see Configuring the root FortiGate and downstream FortiGates on page
2093). The FortiCloud account enforcement setting is enabled by default.
c. Click OK. The FortiGate is authorized and successfully joins the Security Fabric.
The FortiCloud account enforcement setting is enabled by default in the Security Fabric settings:
show system csf
config system csf
set status enable
set group-name "CSF_101"
set forticloud-account-enforcement enable
end
Cloud sandboxing
FortiGate Cloud can be used for automated sample tracking, or sandboxing, for files from a FortiGate. This allows
suspicious files to be sent to be inspected without risking network security. If the file exhibits risky behavior, or is found to
contain a virus, a new virus signature is created and added to the FortiGuard antivirus signature database.
See Configuring Sandboxing on page 2113 for instructions to configure FortiGate Cloud Sandbox. Sandboxing results
are shown on the Sandbox tab in the FortiGate Cloud portal.
Traffic logs are not currently supported by FortiAnalyzer Cloud without a FortiCloud Premium
subscription (AFAC). For information, see Configuring FortiAnalyzer on page 2100.
When FortiAnalyzer Cloud is licensed and enabled (see Deploying FortiAnalyzer Cloud for more information), all
event logs are sent to FortiAnalyzer Cloud by default. All traffic logs, security logs, and archive files are not sent to
FortiAnalyzer Cloud.
FortiAnalyzer Cloud differs from FortiAnalyzer in the following ways:
l You cannot enable FortiAnalyzer Cloud in vdom override-setting when global FortiAnalyzer Cloud is
disabled.
l You must use the CLI to retrieve and display logs sent to FortiAnalyzer Cloud. The FortiOS GUI is not supported.
l You cannot enable FortiAnalyzer Cloud and FortiGate Cloud at the same time.
In the Security Fabric > Fabric Connectors > Cloud Logging card settings, FortiAnalyzer Cloud is grayed out when you
do not have a FortiAnalyzer Cloud entitlement. When you have a FortiAnalyzer Cloud entitlement, FortiAnalyzer Cloud
is available and you can authenticate by the certificate.
You can also view the FortiAnalyzer Cloud settings in the Log & Report > Log Settings page.
In FortiAnalyzer Cloud, you can view logs from FortiOS in the Event > All Types page.
1. Go to Security Fabric > Fabric Connectors and double-click the Cloud Logging card.
2. Set the Type to FortiAnalyzer Cloud.
3. Click OK. A prompt appears to verify the FortiAnalyzer Cloud serial number.
4. Click Accept.
Sample log
Configuring FortiManager
When a FortiManager device is added to the Security Fabric, it automatically synchronizes with any connected
downstream devices.
To add a FortiManager to the Security Fabric, configure it on the root FortiGate. The root FortiGate then pushes this
configuration to downstream FortiGate devices. The FortiManager provides remote management of FortiGate devices
over TCP port 541. The FortiManager must have internet access for it to join the Security Fabric.
Once configured, the FortiGate can receive antivirus and IPS updates, and allows remote management through
FortiManager or the FortiGate Cloud service. The FortiGate management option must be enabled so that the FortiGate
can accept management updates to its firmware and FortiGuard services.
Adding a FortiManager device to the Security Fabric requires the following steps in FortiOS:
l Specify the FortiManager IP address or domain name.
l Approve the FortiManager serial number that is returned by the provided IP address or domain name.
You can complete the steps in FortiOS by using the GUI or CLI.
After you complete the steps in FortiOS, go to FortiManager to complete the process by authorizing the FortiGate.
If you have not previously configured a model device in FortiManager and leveraged a pre-
shared key for registration, you can enter any character for the PSK field in the execute
central-mgmt command.
3. Go to FortiManager and authorize the FortiGate. See Authorizing the FortiGate in FortiManager on page 2111.
1. On the root FortiGate, go to Security Fabric > Fabric Connectors and double-click the FortiManager card.
The FortiManager card is used to configure the FortiManager connection information.
2. For Status, click Enable.
After completing the GUI or CLI steps in FortiOS, go to FortiManager to authorize the FortiGate, which completes the
process.
1. On FortiManager, go to Device Manager and find the FortiGate in the Unauthorized Devices list.
The unauthorized device list is located in the root ADOM, regardless of the firmware version of the root ADOM or
FortiOS.
2. Select the FortiGate device or devices, and click Authorize in the toolbar.
3. In the Authorize Device pop-up, adjust the device names as needed, select the appropriate ADOM (if applicable),
and click OK.
For more information about using FortiManager, see the FortiManager Administration Guide.
This cloud-based SaaS management service is available through FortiManager. This service is included in FortiCloud
accounts with a FortiManager Cloud account level subscription (ALCI).
Once the FortiGate has acquired a contract named FortiManager Cloud, FortiCloud creates a cloud-based FortiManager
instance under the user account. You can launch the portal for the cloud-based FortiManager from FortiCloud, and its
URL starts with the User ID.
You can use a FortiGate with a contract for FortiManager Cloud to configure central management by using the FQDN of
fortimanager.forticloud.com. A FortiGate-FortiManager tunnel is established between FortiGate and the FortiManager
instance.
After the tunnel is established, you can execute FortiManager functions from the cloud-based FortiManager portal.
The FortiManager Cloud button can only be selected if you have a FortiManager Cloud
product entitlement.
2. In the FortiManager Cloud instance, go to Device Manager and authorize the FortiGate. See Authorizing devices for
more information.
When using the FortiGate to enable FortiManager Cloud, the FortiGate appears as an unauthorized device. After
authorizing the FortiGate, it becomes a managed device.
In FortiOS, the Security Fabric > Fabric Connectors page now displays green arrow in the FortiManager card
because FortiManager Cloud is registered.
Diagnostics
To verify the FortiManager Cloud instance has launched and the FortiGate is registered:
Configuring Sandboxing
FortiGate Cloud Files are sent to Fortinet’s Cloud Sandbox cluster for l The FortiGate must have a
Sandbox processing. valid AV license.
l The FortiCloud account
provides access to a portal
to view submissions. This is
not required for the Security
Fabric.
FortiSandbox Cloud Files are sent to a dedicated FortiCloud hosted instance l FortiCloud premium license
of FortiSandbox for processing. l FortiSandbox Cloud
entitlement
l The FortiGate and
FortiCloud license are
registered to the same
account.
To apply sandboxing in a Security Fabric, connect one of the FortiSandbox deployments, then configure an antivirus
profile to submit files for dynamic analysis. The submission results supplement the AV signatures on the FortiGate.
FortiSandbox inspection can also be used in web filter profiles.
In a Security Fabric environment, sandbox settings are configured on the root FortiGate. Once configured, the root
FortiGate pushes the settings to other FortiGates in the Security Fabric.
FortiGate Cloud Sandbox allows users to take advantage of FortiSandbox features without having to purchase, operate,
and maintain a physical appliance. It also allows you to control the region where your traffic is sent to for analysis. This
allows you to meet your country's compliance needs regarding data storage locations.
Users are not required to have a FortiCloud account to use FortiGate Sandbox Cloud.
The submission to the cloud with a valid FortiGuard Antivirus (AVDB) license is rate limited per FortiGate model. Refer to
the Service Description for details. For those without any AVDB license, the submission is limited to only 100 per day.
To configure FortiGate Cloud Sandbox, you must first activate the connection from the CLI. Note that FortiGate Cloud
Sandbox is decoupled from FortiGate Cloud logging, so you do not need to have a FortiCloud account or have cloud
logging enabled.
1. See the How to Purchase or Renew FortiGuard Services video for FortiGuard antivirus license purchase
instructions.
2. Once a FortiGuard license is purchased and activated, users are provided with a paid FortiSandbox Cloud license.
a. Go to Dashboard > Status to view the FortiSandbox Cloud license indicator.
b. Alternatively, go to System > FortiGuard to view the FortiSandbox Cloud license indicator.
1. Go to Security Fabric > Fabric Connectors and double-click the Cloud Sandbox card.
2. Set Status to Enable.
3. For Type, select FortiGate Cloud.
4. Select a Region from the dropdown.
5. Click OK.
FortiSandbox Cloud
FortiSandbox Cloud offers more features and better detection capability. Connecting to FortiSandbox Cloud will
automatically use the cloud user ID of the FortiGate to connect to the dedicated FortiSandbox Cloud instance. The
1. Go to Security Fabric > Fabric Connectors and double-click the Cloud Sandbox card.
2. Set Status to Enable.
3. For Type, select FortiSandbox Cloud.
If the FortiSandbox Cloud option is grayed out or not visible, enter the following in the CLI:
config system global
set gui-fortigate-cloud-sandbox enable
end
4. Click OK.
If the FortiGate does not detect the proper entitlement, a warning is displayed and the CLI configuration will not save.
FortiSandbox appliance
FortiSandbox appliance is the on-premise option for a full featured FortiSandbox. Connecting to a FortiSandbox
appliance requires that Cloud Sandbox is disabled.
1. Go to Security Fabric > Fabric Connectors and double-click the Cloud Sandbox card.
2. Set Status to Disabled.
3. Click OK.
1. Go to Security Fabric > Fabric Connectors and double-click the FortiSandbox card.
2. Set Status to Enable.
3. In the Server field, enter the FortiSandbox device's IP address.
4. Optionally, enter a Notifier email.
5. Click OK.
Once the FortiGate makes a connection to the FortiSandbox Cloud or appliance, the FortiGate must be authorized.
1. In the FortiSandbox GUI, go to Scan Input > Device in 3.2 or Security Fabric > Device in 4.0.
2. Search using the FortiGate serial number to locate the FortiGate. In the Auth column, click the link icon to authorize
the FortiGate.
3. Repeat this step to authorize the VDOMs if required.
The link icon changes from an open to a closed link, which indicates that the FortiGate is authorized.
4. In the FortiGate GUI, go to Security Fabric > Fabric Connectors and double-click the FortiSandbox card.
5. Click Test connectivity. The FortiGate is now authorized and the status displays as Connected.
Antivirus profiles
An antivirus profile must be configured to send files to the sandbox. Once submitted, sandbox inspection is performed on
the file to detect malicious activities. The FortiGate can use the dynamic malware detection database from the sandbox
to supplement the AV signature database. See Using FortiSandbox with antivirus on page 1053 for more information.
Sandbox inspection can be used in web filter profiles. The FortiGate uses URL threat detection database from the
sandbox to block malicious URLs. See Block malicious URLs discovered by FortiSandbox on page 1082 for more
information.
The FortiGate Security Fabric root device can link to FortiClient Endpoint Management System (EMS) and FortiClient
EMS Cloud (a cloud-based EMS solution) for endpoint connectors and automation. Up to three EMS servers can be
added to the Security Fabric, including a FortiClient EMS Cloud server. EMS settings are synchronized between all
fabric members.
To enable cloud-based EMS services, the FortiGate must be registered to FortiCloud with an appropriate user account.
The following examples presume that the EMS certificate has already been configured.
To add an on-premise FortiClient EMS server to the Security Fabric in the GUI:
1. On the root FortiGate, go to System > Feature Visibility and enable Endpoint Control.
2. Go to Security Fabric > Fabric Connectors and double-click the FortiClient EMS card.
3. For Type, click FortiClient EMS.
4. Optionally, enable EMS Threat Feed. See Malware threat feed from EMS on page 1043 for more information about
using this setting in an AV profile.
5. Enter a name and IP address or FQDN. When connecting to a multitenancy-enabled EMS, Fabric connectors must
use an FQDN to connect to EMS, where the FQDN hostname matches a site name in EMS (including "Default").
The following are examples of FQDNs to provide when configuring the connector to connect to the default site and
to a site named SiteA, respectively: default.ems.yourcompany.com, sitea.ems.yourcompany.com. See
Multitenancy.
6. Click OK.
A window appears to verify the EMS server certificate:
7. Click Accept.
The FortiClient EMS Status section displays a Successful connection and an Authorized certificate:
8. If the device is not authorized, log in to the FortiClient EMS to authorize the FortiGate under Administration > Fabric
Devices.
To add a FortiClient EMS Cloud server to the Security Fabric in the GUI:
FortiClient EMS Cloud can only be configured when the FortiGate is registered to FortiCloud
and the EMS Cloud entitlement is verified.
If the FortiCloud account does not pass the FortiClient EMS Cloud entitlement check, the
option is not selectable in the FortiClient EMS connector settings.
1. Go to Security Fabric > Fabric Connectors and double-click the FortiClient EMS card.
2. Set Type to FortiClient EMS Cloud.
3. Enter a name.
4. Click OK.
A window appears to verify the EMS server certificate.
5. Click Accept.
The FortiClient EMS Status section displays a Successful connection and an Authorized certificate.
1. Go to Security Fabric > Fabric Connectors and double-click the FortiClient EMS or FortiClient EMS Cloud card.
2. In the FortiClient EMS Status section under Connection, click Refresh.
To add an on-premise FortiClient EMS server to the Security Fabric in the CLI:
The https-port is the EMS HTTPS access port number, and the source-ip is the REST API call source IP address.
To add a FortiClient EMS Cloud server to the Security Fabric in the CLI:
DirName:/C=CA/ST=bc/L=burnaby/O=devqa/OU=top3/CN=fac155.fortinet.com/emailAddress=xyguo@fort
inet.com
serial:01:86:A4
Critical: no
Content:
Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key
Agreement, Certificate Sign, CRL Sign, Encipher Only, Decipher Only
Troubleshooting
When configuring a new connection to an EMS server, the certificate might not be trusted.
When you click Authorize, a warning displays: The server certificate cannot be authenticated with installed CA
certificates. Please install its CA certificates on this FortiGate.
In the CLI, an error message displays when you try to verify the certificate:
# execute fctems verify Win2K16-EMS
certificate not configured/verified: 2
Could not verify server certificate based on current certificate authorities.
Error 1--92-60-0 in get SN call: EMS Certificate is not signed by a known CA.
The default FortiClient EMS certificate that is used for the SDN connection is signed by the CA certificate that is saved on
the Windows server when FortiClient EMS is first installed. You can manually export and install it on the FortiGate.
1. Export the EMS certificate on the server that EMS is installed on:
a. On the Windows server that EMS is installed on, go to Settings > Manage computer certificates.
b. In the certificate management module, go to Trusted Root Certification Authorities > Certificates.
c. Right click on the certificate issued by FortiClient Enterprise Management Server and select All Tasks > Export.
d. The Certificate Export Wizard opens. Click Next.
f. Enter a file name for the certificate and click Browse to select the folder where it will be located, then click Next.
g. Review the settings, then click Finish. The certificate is downloaded to the specified folder.
2. On the FortiGate, import the certificate:
a. Go to System > Certificate. By default, the Certificate option is not visible, see Feature visibility on page 2043
for information.
b. Click Import > CA Certificate.
c. Set Type to File, and click Upload to import the certificate from the management computer.
d. Click OK. The imported certificate is shown in the Remote CA Certificate section of the certificate table.
3. Try to authorize the certificate on the FortiGate:
a. Go to Security Fabric > Fabric Connectors and edit the FortiClient EMS connector. The connection status
should now say that the certificate is not authorized.
b. Click Authorize. The following warning is shown:
d. Click OK.
FortiClient EMS with Fabric authorization and silent approval capabilities can approve the root FortiGate in a Security
Fabric once, and then silently approve remaining downstream FortiGates in the Fabric. Similarly in an HA scenario, an
approval only needs to be made once to the HA primary unit. The remaining cluster members are approved silently.
The FortiGate will enable the Fabric authorization and silent approval based on the EMS supported capabilities.
config endpoint-control fctems
edit "ems139"
set server "172.18.62.12"
set capabilities fabric-auth silent-approval websocket
next
end
3. Configure a downstream device in the Security Fabric (see Configuring the root FortiGate and downstream
FortiGates on page 2093 for more details). The downstream device will be silently approved.
4. Configure a secondary device in an HA system (see HA active-passive cluster setup on page 1924 and HA active-
active cluster setup on page 1926 for more details). The secondary device will be silently approved.
On FortiClient EMS versions that support push CA certs capability, the FortiGate will push CA certificates used in
SSL deep inspection (see Deep inspection on page 1216 for more details) to the EMS server. On the EMS server, the
CA certificates can be selected in the managed endpoint profiles so they can be installed on managed endpoints.
FortiClient EMS 7.0.1 and later is required to use this feature.
The default deep inspection profile, CA certificate, and untrusted CA certificates are used in this example.
3. Configure the firewall policy:
config firewall policy
edit 1
set name "deep-inspection"
set srcintf "port14"
set dstintf "port13"
set action accept
set srcaddr "all"
set dstaddr "all"
set schedule "always"
set service "ALL"
set utm-status enable
set inspection-mode proxy
b. Verify the certificate table to see that the EMS server received the CA certification from the different FortiGates.
5. Select the CA certificate in the endpoint profile:
a. Go to Endpoint Profiles > Manage Profiles and edit a profile. The default profile is used in this example.
b. Click Advanced in the top right corner and click the System Settings tab.
c. In the Other section, enable Install CA Certificate on Client and select the Fortinet_CA_SSL certificate for the
desired endpoint.
d. Click Save.
Once the FortiClient endpoint is registered, it receives the CA certificate. When the FortiClient endpoint tries to
access the internet through the FortiGate with the firewall policy that has deep inspection, no warning message
is displayed. The server certificate is trusted with the installed CA certificate to complete the certificate chain.
Verification
Before configuring deep inspection certificate synchronization, a warning message is displayed when a FortiClient
endpoint accesses the internet through the FortiGate with the firewall policy that has deep inspection. The FortiClient
certificate store does not have the FortiGate's CA that is used in the deep inspection SSL/SSH profile.
For example, accessing https://www.facebook.com in Chrome shows a warning. In the address bar, clicking Not secure
> Certificate opens the Certificate dialog, which indicates that Windows does not have enough information to verify the
certificate.
After the EMS profile is pushed to FortiClient endpoint, the expected FortiGate's certificate is shown in its certificate
store.
1. In Chrome, go to Settings > Privacy and security and open Manage certificates.
2. Click the Trusted Root Certification Authorities tab. The FortiGate's certificate appears in the list.
4. In the address bar, click the padlock, then click Certificate. The dialog displays the valid certificate information.
Diagnostics
Use the diagnose endpoint fctems json deep-inspect-cert-sync command in FortiOS to verify the
certificate information. In the following example, there are multiple VDOMs with FortiGates in HA mode.
},
{
"name":"Fortinet_CA_Untrusted",
"cert":"-----BEGIN CERTIFICATE-----\\nMIID8DCCAtig...3zBbfzP+nVUpC\\nZDPRZA==\\n--
---END CERTIFICATE-----"
}
]
},
{
"vdom":"vdom1",
"certs":[
{
"name":"Fortinet_CA_SSL",
"cert":"-----BEGIN CERTIFICATE-----\\nMIID5jCCAs6g...Sfu+Q8zE8Crmt6L1X\/bv+q\\n---
--END CERTIFICATE-----\\n"
},
{
"name":"Fortinet_CA_Untrusted",
"cert":"-----BEGIN CERTIFICATE-----\\nMIID8DCCAtig...3zBbfzP+nVUpC\\nZDPRZA==\\n--
---END CERTIFICATE-----"
}
]
}
]
}
"""
{
"name":"Fortinet_CA_SSL",
"cert":"-----BEGIN CERTIFICATE-----\\nMIID5jCCAs6g...Sfu+Q8zE8Crmt6L1X\/bv+q\\n---
--END CERTIFICATE-----\\n"
},
{
"name":"Fortinet_CA_Untrusted",
"cert":"-----BEGIN CERTIFICATE-----\\nMIID8DCCAtig...3zBbfzP+nVUpC\\nZDPRZA==\\n--
---END CERTIFICATE-----"
}
]
}
]
}
"""
ZTNA tags (formerly FortiClient EMS tags in FortiOS 6.4 and earlier) are tags synchronized from FortiClient EMS as
dynamic address objects on the FortiGate. FortiClient EMS uses zero-trust tagging rules to automatically tag managed
endpoints based on various attributes detected by the FortiClient. When the FortiGate establishes a connection with the
FortiClient EMS server via the EMS Fabric connector, it pulls zero-trust tags containing device IP and MAC addresses
and converts them to read-only dynamic address objects. It also establishes a persistent WebSocket connection to
monitor for changes in zero-trust tags, which keeps the device information current. These ZTNA tags can then be used in
ZTNA rules, firewall rules, and NAC policies to perform security posture checks. ZTNA tags are displayed in the Device
Inventory widget, FortiClient widget, and Asset Identity Center page.
When using WebSocket, EMS pushes notifications to the corresponding FortiGate when there are updates to tags or
other monitored attributes. The FortiGate then fetches the updated information using the REST API over TCP/8013.
When WebSocket is not used (due to an override or unsupported EMS version), updates are triggered on demand from
the FortiGate side over the REST API.
If the WebSocket capability is detected, the capabilities setting will automatically display the WebSocket option. You can
use the diagnose test application fcnacd 2 command to view the status of the WebSocket connection.
In the following example, the FortiGate connects to and retrieves ZTNA tags from a FortiClient EMS configured with
tagging rules. It is assumed that zero-trust tags and rules are already created on the FortiClient EMS. For more
information, see the Zero Trust Tags section of the EMS Administration Guide.
1. Go to Zero Trust Tags > Zero Trust Tagging Rules to view the tags.
2. Go to Zero Trust Tags > Zero Trust Tag Monitor to view the registered users who match the defined tag.
To configure the EMS Fabric connector to synchronize ZTNA tags in the GUI:
To configure the EMS Fabric connector to synchronize ZTNA tags in the CLI:
FCTEMS0000100000_Low: ID(78)
ADDR(172.17.194.209)
ADDR(10.10.10.20)
…
FCTEMS0000100000_Malicious-File-Detected: ID(190)
ADDR(172.17.194.209)
ADDR(10.10.10.20)
…
Configuring FortiNAC
A FortiNAC device can be added to the Security Fabric on the root FortiGate. After the device has been added and
authorized, you can log in to the FortiNAC from the FortiGate topology views.
Adding a FortiNAC to the Security Fabric requires a FortiNAC with a license issued in the year
2020 or later that includes an additional certificate. The device cannot be added if it has an
older license. Use the licensetool in the FortiNAC CLI to determine if your license includes
the additional certificate.
The FortiNAC tags connector under Security Fabric > Fabric Connectors has been deprecated. It was replaced with a
REST API (in FortiNAC and FortiOS) that is used by FortiNAC to send user logon and logoff information to the FortiGate.
The FortiNAC tag dynamic firewall address type is used to store the device IP, FortiNAC firewall tags, and FortiNAC
group information sent from FortiNAC by the REST API when user logon and logoff events are registered (see FortiNAC
tag dynamic address on page 855 for more information).
For upgrade support, the FSSO FortiNAC user type can still be configured in the CLI.
1. On the FortNAC, configure telemetry and input the IP address of the root FortiGate. See Security Fabric Connection
in the FortiNAC Administration Guide for more information.
2. On the root FortiGate, authorize the FortiNAC.
3. Verify the connection status in the topology views.
Optionally, you can also deny authorization to the FortiNAC to remove it from the list.
1. After the FortiNAC is authorized, go to Security Fabric > Physical Topology and confirm that it is included in the
topology.
2. Go to Security Fabric > Logical Topology and confirm the FortiNAC is also displayed there.
3. Run the following command in the CLI to view information about the FortiNAC device's status:
# diagnose sys csf downstream-devices fortinac
{
"path":"FG5H1E5818900126:FNVMCATM20000306",
"mgmt_ip_str":"10.1.100.197",
"mgmt_port":0,
"admin_port":8443,
"serial":"FNVMCATM20000306",
"host_name":"adnac",
"device_type":"fortinac",
"upstream_intf":"port2",
"upstream_serial":"FG5H1E5818900126",
"is_discovered":true,
"ip_str":"10.1.100.197",
"downstream_intf":"eth0",
"authorizer":"FG5H1E5818900126",
"idx":1
}
1. On the FortiGate, go to Security Fabric > Physical Topology or Security Fabric > Logical Topology.
2. Click on the FortiNAC and select Login to <serial_number>.
FortiAP and FortiSwitch devices can be authorized in the Security Fabric with one click. After connecting a FortiAP or
FortiSwitch device to an authorized FortiGate, it will automatically be listed in the topology tree.
For more information about configuring FortiAPs, see Configuring the FortiGate interface to manage FortiAP units and
Discovering, authorizing, and deauthorizing FortiAP units.
For more information about configuring FortiSwitches, see Using the FortiGate GUI.
Configuring FortiMail
FortiMail can be authorized into the Security Fabric using either the gutter on the Fabric Connectors page, or by pre-
authorizing using the FortiMail serial number or certificate.
1. Go to System > Customization and click the Corporate Security Fabric tab (or the Corporate Security Fabric tab in
FortiMail 6.4.2 and earlier).
2. Click the toggle to enable the Fabric.
3. Enter the Upstream IP Address (root FortiGate) and the Management IP of the FortiMail.
4. Click Apply.
If the FortiMail was added to the Security Fabric but not pre-authorized, you can authorize it in FortiOS on the Fabric
Connectors page.
To authorize FortiMail:
FortiMail can be pre-authorized using its serial number or certificate. When you pre-authorize, the FortiMail can join at
any time, and you will not need to authorize it FortiOS. In this example, FortiMail is pre-authorized using a certificate.
1. Log in to FortiMail.
2. Download the certificate. For example, in Chrome:
a. In the left side of the address bar, click the icon to view the site information.
b. Click Certificate.
c. Click the Details tab, then click Copy to File.
e. For the file format, select Base-64 encoded X.509 (.CER), then click Next.
f. Browse to the folder location and enter a file name, then click Next.
g. Click Finish, then click OK to close the dialog box.
3. In FortiOS, go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
4. Beside Device authorization, click Edit and configure the following:
a. Enter the FortiMail serial number.
b. For Authorization type, select Serial Number.
c. For Certificate, upload the .CER file you saved previously.
d. Click OK.
Configuring FortiAI
FortiAI can be added to the Security Fabric so it appears in the topology views and the dashboard widgets.
1. Enable the Security Fabric and configure the interface to allow other Security Fabric devices to join (see Configuring
the root FortiGate and downstream FortiGates on page 2093).
2. Install the FortiAI appliance and activate the product with a valid license (see Registering products in the Asset
Management Guide). A license file is provided after the product is registered.
3. In FortiAI, go to System > FortiGuard and verify that the pre-trained models (engines) are up to date. Refer to the
FortiGuard website for the latest FortiAI ANN versions.
4. Configure and authorize the FortiGate in the FortiAI GUI to join the Security Fabric:
a. Go to Security Fabric > Fabric Connectors and double-click the connector card.
b. Click the toggle to Enable Security Fabric.
c. Enter the FortiGate Root IP address and the FortiAI IP address.
The Security Fabric widget on the dashboard also updates when the FortiAI is authorized.
6. Go to Security Fabric > Physical Topology or Security Fabric > Logical Topology to view more information.
Configuring FortiDeceptor
FortiDeceptor can be added to the Security Fabric so it appears in the topology views and the dashboard widgets.
1. Enable the Security Fabric (see Configuring the root FortiGate and downstream FortiGates on page 2093 for more
details) with the following settings:
a. Configure the interface to allow other Security Fabric devices to join.
b. Enable Allow downstream device REST API access so the FortiDeceptor can communicate with the FortiGate,
and select an Administrator profile. The minimum permission required for the selected Administrator profile is
Read/Write for User & Device (set authgrp read-write).
2. In FortiDeceptor, integrate the device:
a. Go to Fabric > Integration Devices.
b. Click Quarantine Integration With New Device.
e. Click Apply.
3. Authorize the FortiDeceptor in FortiOS:
a. Go to Security Fabric > Fabric Connectors.
b. In the topology tree, click the highlighted FortiDeceptor serial number and select Authorize.
The authorized device appears in the topology tree. Hover over the device name to view the tooltip.
The Security Fabric widget on the dashboard also updates when the FortiDeceptor is authorized.
4. Go to Security Fabric > Physical Topology or Security Fabric > Logical Topology to view more information.
Physical topology view:
Configuring FortiWeb
A FortiWeb can be configured to join a Security Fabric through the root or downstream FortiGate. There are two methods
to add a FortiWeb to the Security Fabric:
l Trigger the authorization on the FortiWeb side and authorize from the FortiOS side.
l Pre-authorize the FortiWeb from the FortiOS side.
Once the FortiWeb joins the Fabric, the following features are available:
l View the FortiWeb on topology pages.
l Create a dashboard Fabric Device widget to view FortiWeb data.
l Configure single sign-on using SAML.
In this example, a FortiWeb triggers the authorization process, and then the device is approved in FortiOS. This is
example assumes the Security Fabric has already been configured.
1. Edit the FortiGate Fabric Connector settings in FortiWeb (see Fabric Connector: Single Sign On with FortiGate).
The Connection Status is currently Authorize pending.
2. In FortiOS, go to Security Fabric > Fabric Connectors.
3. In the topology tree, select the FortiWeb and click Authorize.
In this example, a FortiWeb is pre-authorized on the root FortiGate using certificate authorization. This is example
assumes the Security Fabric has already been configured.
1. Go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
2. Beside Device authorization, click Edit. The Device authorization pane opens.
3. Add the FortiWeb:
a. Click Create New and enter a device name.
b. For Authorization type, select Certificate.
c. Click Browse to upload the certificate.
d. For Action, select Accept.
e. Click OK. The FortiWeb appears in the table.
4. Go to Security Fabric > Physical Topology or Security Fabric > Logical Topology to view more information.
Physical topology view:
Configuring FortiTester
FortiTester can be added to the Security Fabric and authorized from the Security Fabric topology views. Once added,
the FortiTester will appear in the Security Fabric widget on the dashboard. A FortiTester can be added to the dashboard
as a Fabric device widget.
1. Enable the Security Fabric and configure the interface to allow other Security Fabric devices to join (see Configuring
the root FortiGate and downstream FortiGates on page 2093).
d. Click Apply.
The authorized device appears in the topology tree. Hover over the device name to view the tooltip.
The Security Fabric widget on the dashboard also updates when the FortiTester is authorized.
4. Go to Security Fabric > Physical Topology or Security Fabric > Logical Topology to view more information.
Physical topology view:
Configuring FortiMonitor
FortiMonitor can be added to the Security Fabric. When a FortiMonitor joins the Security Fabric and is authorized, it
appears in the Fabric topology pages.
1. Enable the Security Fabric (see Configuring the root FortiGate and downstream FortiGates on page 2093) with the
following settings:
a. Configure the interface to allow other Security Fabric devices to join.
b. Enable Allow downstream device REST API access and select an Administrator profile.
2. In FortiMonitor, start configuring the device to join the Security Fabric (see Enable Security Fabric monitoring for
detailed instructions):
The authorized device appears in the topology tree. Hover over the device name to view the tooltip.
4. Go to Security Fabric > Physical Topology or Security Fabric > Logical Topology to view more information.
Physical topology view:
5. In FortiMonitor, complete the device configuration (see Enable Security Fabric monitoring for detailed instructions).
Configuring FortiVoice
A FortiVoice can be added to the Security Fabric on the root FortiGate. Once the FortiVoice is added and authorized, you
can log in to the device from the Security Fabric topology pages or the topology tree. A FortiVoice can be authorized in
FortiOS, or can be pre-authroized with its serial number or certificate. A FortiVoice can be added to the dashboard as a
Fabric device widget.
1. On the FortiVoice, enable the Security Fabric. See Enabling Security Fabric in the FortiVoice Phone System
Administration Guide.
2. On the root FortiGate, go to Security Fabric > Fabric Connectors. The FortiVoice is highlighted in the topology list in
the right panel with the status Waiting for Authorization.
3. Click the highlighted FortiVoice and select Authorize.
A FortiVoice can be pre-authorized using its serial number or certificate. When pre-authorizing, the FortiVoice can join at
any time, and it will not need to be authorized in FortiOS. In the following example, the FortiVoice is pre-authorized using
a certificate.
f. Browse to the folder location, enter a file name, then click Next.
g. Click Finish, then click OK to close the wizard.
3. In FortiOS, go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
4. Beside Device authorization, click Edit.
1. After the FortiVoice is authorized, go to Security Fabric > Physical Topology and confirm that it is included in the
topology.
2. Go to Security Fabric > Logical Topology and confirm the FortiVoice is also displayed there.
1. Go to Security Fabric > Physical Topology or Security Fabric > Logical Topology.
2. Click on the FortiVoice and select Login to <serial_number>.
The following Fortinet devices are supported by the Security Fabric and can be configured in the CLI:
l FortiADC
l FortiDDoS
l FortiWLC
In FortiOS, the device details are shown in the Security Fabric and Fabric Device dashboard widgets, the Fabric
Connectors page, and the physical and logical topologies. See config system csf in the FortiOS CLI Reference for more
information.
config system csf
...
config fabric-device
edit <name>
set device-ip <IP address>
set https-port <integer>
set access-token <token>
next
end
end
To configure a FortiADC:
Dashboard widgets
The Security Fabric status widget shows a summary of the devices in the Security Fabric.
Hover the cursor over the top icons to view pop-ups showing the statuses of the devices in the fabric.
The device tree shows devices that are connected, or could be connected, to you Security Fabric, according to the
following color scheme:
l Blue: connected to the network
l Gray: not configured or not detected
l Red: no longer connected or not authorized
Hover over a device in the tree to view details about the device, such as it's serial number, operation mode, IP address,
CPU and memory usage, and others, depending on the device type.
Unauthorized FortiAP and FortiSwitch devices are highlighted in the list, and can be authorized by clicking on the device
name.
Fabric Device
A Fabric Device widget shows statistics and system information about the selected fabric device. Widgets can be added
for various Fabric devices including FortiMail, FortiAI, and FortiDeceptor.
For a FortiMail device, the widget can show:
l Mail Statistics: a chart of the total messages and total spam messages over time.
l Statistics Summary: a pie chart summarizes mail statistics.
l System Information: The FortiMail System Information widget
l System Usage: System usage information, such as CPU, memory, and disk usage, as well as the number of active
sessions.
FortiGate Cloud
The FortiGate Cloud widget shows the FortiGate Cloud status and information. If your account is not activated, you can
activate it from the widget.
1. Click on the Not Activated button and select Activate. The Activate FortiGate Cloud pane opens.
2. If you already have an account:
a. Fill in your email address, password, country or region, and reseller.
b. Click OK.
3. If you are creating an account:
a. In the FortiCloud field select Create Account.
b. Fill in all of the required information.
c. Click OK.
Topology
The full Security Fabric topology can be viewed on the root FortiGate. Downstream FortiGate devices' topology views do
not include upstream devices.
The Physical Topology page shows the physical structure of your network, including all connected devices and the
connections between them. The Logical Topology page shows information about the interfaces that connect devices to
the Security Fabric.
In both topology pages, you can use filtering and sorting options to control the information that is shown. Hover the
cursor over a device icon, port number, or endpoint to open a tooltip that shows information about that specific device,
port, or endpoint. Right-click on a device to log into, configure, or deauthorize it. Right-click on an endpoint to perform
various tasks, such as drilling down for more details in FortiView, quarantining the host, and banning the IP address.
The small number that might be shown in the top right corner of a device icon is the number of security ratings
recommendations or warnings for that device. The circle color indicates the severity of the highest security rating check
that failed. Clicking it opens the Security Rating page. See Security rating on page 2221 for more information.
Views
From the dropdown list beside the search bar, select one of the following views:
Endpoint groups
The Device Traffic and Device Count views display endpoint groups as donut charts, with the total number of endpoints
in the group in the center of the chart. Each sector of the donut chart represents a different endpoint operating system.
To zoom in on a donut chart, click any chart sector. Each sector represents a different endpoint OS. Hovering over each
sector allows you to see the OS that the sector represents and the number of endpoints that have that OS installed.
In this example, the endpoint group contains a total of nine endpoints, with the following OSes installed:
Orange Linux 2
Green FortiMail 1
Red FortiManager 1
Blue Other 5
To view the endpoint group in a bubble pack display, click the + button in the center of the donut chart. You can view
each individual endpoint in the bubble pack view.
Newly discovered FortiAP and FortiSwitch devices are initially shown in the topologies with gray icons to indicate that
they have not been authorized. To authorize a device, click on the device icon or name and select Authorize. Once
authorized, the device icon will turn blue.
Right-click on an authorized FortiAP device to Deauthorize or Restart the device. Right-click on a FortiSwitch device to
Deauthorize, Restart, or Upgrade the device, or to Connect to the CLI.
FortiAP and FortiSwitch links are enhanced to show link aggregation groups for the inter-switch link (ISL-LAG). To
differentiate them from physical links, ISL-LAG links are shown with a thicker line. The endpoint circles can also be used
as a reference to identify ISL-LAG groups that have more than two links.
When managed clients are connected over a VPN, EMS collects user information about these registered clients, such as
the VPN connection information. The FortiGate can synchronize this user information from EMS and display it in the
logical topology view to provide a detailed picture of clients and their associated VPN interfaces.
Client using an IPsec VPN interface:
Critical risks
Click the Critical Risks button to see a list of endpoints that are deemed critical risks, organized by threat severity. These
are the red endpoints in the current topology view.
For each endpoint, the user's photo, name, IP address, email address, and phone number are shown. The number of
vulnerabilities of each severity is shown, and if the IoC verdict is that the endpoint is compromised.
If applicable, the endpoint's host can be quarantined (click Quarantine Host) or their IP address can be banned (click Ban
IP).
The dropdown menu also provides options to drill down to more information on compromised hosts or endpoint
vulnerabilities.
The consolidated Risk view mode displays different risks within the Security Fabric topology. You can use the Risk view
mode to filter threats by Compromised Hosts, Vulnerability, and Threat Score.
1. On one of the topology pages, in the view option dropdown list beside the search bar, select Risk.
2. Select one of the following options from the Risk Type dropdown menu:
a. All
b. Compromised Hosts
c. Vulnerability
d. Threat Score
3. When devices fit into the risk metric, they will appear in the endpoint groups. Click the + in the endpoint group to
display the devices in a bubble chart.
On the physical and logical topology pages, you can view and control compromised hosts. Compromised hosts behind a
FortiSwitch or FortiAP can be quarantined.
1. Test that FortiGate detects a compromised endpoint host by opening a browser on the endpoint host and entering a
malicious website URL. The browser displays a Web Page Blocked! warning and does not allow access to the
website.
2. On the root FortiGate, go to Security Fabric > Physical Topology or Security Fabric > Logical Topology. Expand the
endpoint group connected to a FortiSwitch or FortiAP.
The endpoint host connected to the switch is highlighted in red. Mouse over the endpoint host to view a tooltip that
shows the IoC verdict. The endpoint host is compromised.
1. On the Physical Topology or Logical Topology page, right-click the endpoint host and select Quarantine Host.
A dialog displays the FortiGate, host MAC address, and description of the host to be quarantined. Quarantine
entries for each MAC address will be created on the FortiGate that the FortiSwitch or FortiAP is connected to.
2. Click OK.
3. Go to Dashboard > User & Devices and click the Quarantine widget to expand it.
4. In the top-right corner, use the dropdown to select the FortiGate in which this host was quarantined. In this example,
it is the Enterprise_Second_Floor FortiGate.
5. On the endpoint host, open a browser and visit a website such as https://www.fortinet.com/. If the website cannot be
accessed, this confirms that the endpoint host is quarantined.
1. Log in to the downstream device where the host was quarantined (Enterprise_Second_Floor).
2. Enter the following show command:
Enterprise_Second_Floor # show user quarantine
config user quarantine
set firewall-groups "QuarantinedDevices"
config targets
edit "Erin Malone PC"
set description "Manually quarantined"
config macs
edit **:**:**:**:**:**
set description "manual-qtn Hostname: Erin Malone PC"
next
end
next
end
end
The Asset Identity Center page unifies information from detected addresses, devices, and users into a single page, while
building a data structure to store the user and device information in the backend. Asset view groups information by
Device, while Identity view groups information by User. Hover over a device or a user in the GUI to perform different
actions relevant to the object, such as adding a firewall device address, adding an IP address, banning the IP,
quarantining the host, and more.
3. Click Identity to view information by user. The default columns are User, Device, and Properties. The optional
columns are IP Address, Logoff Time, and Logon Time.
Each view has a dropdown option to view the information within different time frames (Latest, 1 hour, 24 hours, and
7 days). Vulnerability information is displayed when applicable. The page displays user and device relationships,
such as which users are logged in to multiple devices or if multiple users are logged in to single devices.
4. Hover over a device in the list to view the tooltip and possible actions. In this example, the available actions are add
firewall device address, add firewall IP address, and ban the IP.
The following options are available for diagnose user-device-store unified <option>:
Option Description
device-memory-query Get device records and associated user records from memory.
device-query Get device records and associated user records from memory and disk.
user-memory-query Get user records and associated device records from memory.
user-query Get user records and associated device records from memory and disk.
re-query Retrieve query by <query-id> <iteration-start> <iteration-count>
(takes 0-3 arguments).
list List unified queries.
clear Delete all unified queries.
dump Dump unified query stats by <query-id> (takes 0-1 arguments).
delete Delete unified query by <query-id> (takes 0-1 arguments).
stats Get statistics for unified queries.
debug Enable/disable debug logs for unified queries.
The Fabric Management page allows administrators to manage the firmware running on each FortiGate, FortiAP, and
FortiSwitch in the Security Fabric, and to authorize and register these Fabric devices.
Administrators can also use the Fabric Management page to view the maturity level of FortiOS 7.0.6 and later firmware
images. See Firmware maturity levels on page 1862.
Upgrading firmware
A Fabric Upgrade can be performed immediately or during a scheduled time. Administrators can choose a firmware from
FortiGuard for the Fabric member to download directly to upgrade.
When upgrading FortiGates from mature firmware to feature firmware, a warning message is displayed.
To demonstrate the functionality of this feature, the examples use FortiGates that are running
interim builds.
1. Go to System > Fabric Management. The devices are displayed in the table with their firmware version, maturity
level (either (Feature) or (Mature)), and status.
3. After the root FortiGate reboots, upgrade the FortiSwitch using FortiGuard:
a. Go to System > Fabric Management and select the device, then click Upgrade. The Upgrade FortiSwitches
pane opens.
b. Select FortiGuard, ensure the device you want to upgrade is enabled, then click Upgrade.
4. Upgrade the FortiAP using local firmware:
a. Select the device and click Upgrade Device. The Upgrade FortiAPs pane opens.
b. Select Upload and click Browse to select the file.
c. Ensure the device you want to upgrade is enabled, then click Upgrade.
1. Go to System > Fabric Management and click Fabric Upgrade. The Firmware Management pane opens.
2. Select Latest or All Upgrades and select the option that is displayed, then click Next.
3. Select an upgrade schedule, either Immediate or Custom. If using Custom, enter an upgrade date and time
(Custom is used in this example).
In a custom upgrade, the configuration backups are saved when the administrator
schedules the upgrade. If the scheduled upgrade occurs after further configuration
changes are made, the latest changes will not be saved in a new backup configuration file.
4. Click Next and review the update schedule. For the FortiSwitch units, a message appears because no firmware
upgrade is currently available.
5. Click Confirm and Backup Config. The pane goes into a loading state to wait for all FortiGate configurations to save.
Once completed, the pane closes and the device list refreshes to reflect the latest changes.
Authorizing devices
If there are any notifications in the top banner dropdown for unauthorized devices or devices that require authorization,
clicking the notification redirects the user to the System > Fabric Management page. In this example, two devices require
authorization.
On the Fabric Management page, the unauthorized devices (a downstream FortiGate and a FortiAP) are grayed out, and
their status is Waiting for authorization.
3. Click the subsequent notification to refresh the page. The device's status is now Online.
1. Select a device.
2. Right-click and select Deauthorize.
CLI commands
Option Description
cancel Cancel the currently configured upgrade.
initialize Set up a federated upgrade.
status Show the current status of a federated upgrade.
With the WebSocket for Security Fabric events, subscribers to the WebSocket (such as the Fabric Management page)
are updated upon new Fabric events and alert users to reload the page.
Example
3. An alert appears in the bottom-right corner of the page. Click Reload Now to refresh the page.
This topic provides an example of deploying Security Fabric with three downstream FortiGates connecting to one root
FortiGate. To deploy Security Fabric, you need a FortiAnalyzer running firmware version 6.2 or later.
The following shows a sample network topology with three downstream FortiGates (Accounting, Marketing, and Sales)
connected to the root FortiGate (Edge).
1. Configure interfaces:
a. In the root FortiGate (Edge), go to Network > Interfaces.
b. Edit port16:
l Set Role to DMZ.
l For the interface connected to FortiAnalyzer, set the IP/Network Mask to 192.168.65.2/255.255.255.0
c. Edit port10:
l Set Role to LAN.
l For the interface connected to the downstream FortiGate (Accounting), set the IP/Network Mask to
192.168.10.2/255.255.255.0
d. Edit port11:
l Set Role to LAN.
l For the interface connected to the downstream FortiGate (Marketing), set the IP/Network Mask to
192.168.200.2/255.255.255.0
2. Configure Security Fabric:
a. In the root FortiGate (Edge), go to Security Fabric > Fabric Connectors and double-click the Security Fabric
Setup card.
b. For Status, click Enable.
c. Set the Security Fabric role to Serve as Fabric Root. The FortiAnalyzer settings can be configured.
d. Enter the FortiAnalyzer IP (192.168.65.10) and select and Upload option (the default is Real Time).
e. Click Test Connectivity.
A warning message indicates that the FortiGate is not authorized on the FortiAnalyzer. The authorization is
configured in a later step on the FortiAnalyzer.
f. Click OK. The FortiAnalyzer serial number is verified.
g. Enter a Fabric name, such as Office-Security-Fabric.
h. Ensure Allow other Security Fabric devices to join is enabled and add port10 and port11.
i. Click OK.
3. Create a policy to allow the downstream FortiGate (Accounting) to access the FortiAnalyzer:
a. In the root FortiGate (Edge), go to Policy & Objects > Addresses.
b. Click Create New.
l Set Name to FAZ-addr.
c. Click OK.
d. Click Create New.
l Set Name to Accounting.
e. Click OK.
f. In the root FortiGate (Edge), go to Policy & Objects > Firewall Policy and click Create New.
l Set Name to Accounting-to-FAZ.
l Enable NAT.
g. Click OK.
4. Create a policy to allow the two downstream FortiGates (Marketing and Sales) to access the FortiAnalyzer:
a. In the root FortiGate (Edge), go to Policy & Objects > Addresses and click Create New.
l Set Name to Marketing-addr.
b. Click OK.
c. In the root FortiGate (Edge), go to Policy & Objects > Firewall Policy and click Create New.
l Set Name to Marketing-to-FAZ.
l Enable NAT.
d. Click OK.
1. Configure interface:
a. In the downstream FortiGate (Accounting), go to Network > Interfaces.
b. Edit interface wan1:
l Set Role to WAN.
l For the interface connected to root, set the IP/Network Mask to 192.168.10.10/255.255.255.0
2. Configure the default static route to connect to the root FortiGate (Edge):
a. In the downstream FortiGate (Accounting), go to Network > Static Routes and click Create New or Create New
> IPv4 Static Route.
l Set Destination to 0.0.0.0/0.0.0.0.
b. Click OK.
3. Configure Security Fabric:
a. In the downstream FortiGate (Accounting), go to Security Fabric > Fabric Connectors and double-click the
Security Fabric Setup card.
b. For Status, click Enable.
FortiAnalyzer automatically enables logging. Settings for the FortiAnalyzer are retrieved from the root FortiGate
(Edge) when FortiGate (Accounting) connects to the root FortiGate (Edge).
c. Set the Security Fabric role to Join Existing Fabric.
d. Upstream FortiGate IP is filled in automatically with the default static route Gateway Address of 192.168.10.2
set in the previous step.
e. Disable Allow other FortiGates to join, because there is no downstream FortiGate connecting to it.
f. Click OK.
1. Configure interface:
a. In the downstream FortiGate (Marketing), go to Network > Interfaces.
b. Edit port12:
l Set Role to LAN.
l For the interface connected to the downstream FortiGate (Sales), set the IP/Network Mask to
192.168.135.11/255.255.255.0.
c. Edit wan1:
l Set Role to WAN.
l For the interface connected to the root FortiGate (Edge), set the IP/Network Mask to
192.168.200.10/255.255.255.0.
2. Configure the default static route to connect to the root FortiGate (Edge):
a. In the downstream FortiGate (Marketing), go to Network > Static Routes and click Create New or Create New >
IPv4 Static Route.
l Set Destination to 0.0.0.0/0.0.0.0.
b. Click OK.
3. Configure Security Fabric:
a. In the downstream FortiGate (Marketing), go to Security Fabric > Fabric Connectors and double-click the
Security Fabric Setup card.
b. For Status, click Enable.
FortiAnalyzer automatically enables logging. Settings for the FortiAnalyzer are retrieved from the root FortiGate
(Edge) when FortiGate (Marketing) connects to the root FortiGate (Edge).
c. Set the Security Fabric role to Join Existing Fabric.
d. Upstream FortiGate IP is filled in automatically with the default static route Gateway Address of 192.168.200.2
set in the previous step.
e. Enable Allow other FortiGates to join and add port12.
f. Click OK.
4. Create a policy to allow another downstream FortiGate (Sales) going through FortiGate (Marketing) to access the
FortiAnalyzer:
a. In the downstream FortiGate (Marketing), go to Policy & Objects > Addresses and click Create New.
l Set Name to FAZ-addr.
b. Click OK.
c. Click Create New.
l Set Name to Sales-addr.
d. Click OK.
e. In the downstream FortiGate (Marketing), go to Policy & Objects > Firewall Policy and click Create New.
l Set Name to Sales-to-FAZ.
l Enable NAT.
f. Click OK.
1. Configure interface:
a. In the downstream FortiGate (Accounting), go to Network > Interfaces.
b. Edit interface wan1:
l Set Role to WAN.
l For the interface connected to root, set the IP/Network Mask to 192.168.10.10/255.255.255.0
2. Configure the default static route to connect to the root FortiGate (Edge):
a. In the downstream FortiGate (Accounting), go to Network > Static Routes and click Create New or Create New
> IPv4 Static Route.
l Set Destination to 0.0.0.0/0.0.0.0.
b. Click OK.
3. Configure Security Fabric:
a. In the downstream FortiGate (Accounting), go to Security Fabric > Fabric Connectors and double-click the
Security Fabric Setup card.
b. For Status, click Enable.
FortiAnalyzer automatically enables logging. Settings for the FortiAnalyzer are retrieved from the root FortiGate
(Edge) when FortiGate (Accounting) connects to the root FortiGate (Edge).
c. Set the Security Fabric role to Join Existing Fabric.
d. Upstream FortiGate IP is filled in automatically with the default static route Gateway Address of 192.168.10.2
set in the previous step.
e. Disable Allow other FortiGates to join, because there is no downstream FortiGate connecting to it.
f. Click OK.
1. Configure interface:
a. In the downstream FortiGate (Sales), go to Network > Interfaces.
b. Edit wan2:
l Set Role to WAN.
l For the interface connected to the upstream FortiGate (Marketing), set the IP/Network Mask to
192.168.135.10/255.255.255.0.
2. Configure the default static route to connect to the upstream FortiGate (Marketing):
a. In the downstream FortiGate (Sales), go to Network > Static Routes and click Create New or Create New >
IPv4 Static Route.
l Set Destination to 0.0.0.0/0.0.0.0.
b. Click OK.
3. Configure Security Fabric:
a. In the downstream FortiGate (Sales), go to Security Fabric > Fabric Connectors and double-click the Security
Fabric Setup card.
b. For Status, click Enable.
FortiAnalyzer automatically enables logging. Settings for the FortiAnalyzer are retrieved from the root FortiGate
(Edge) when FortiGate (Sales) connects to the root FortiGate (Edge).
c. Set the Security Fabric role to Join Existing Fabric.
d. Upstream FortiGate IP is filled in automatically with the default static route Gateway Address of
192.168.135.11 set in the previous step.
e. Disable Allow other FortiGates to join, because there is no downstream FortiGate connecting to it.
f. Click OK.
To authorize downstream FortiGates (Accounting, Marketing, and Sales) on the root FortiGate (Edge):
1. In the root FortiGate (Edge), go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup
card.
The Topology tree highlights two connected FortiGates with their serial numbers and asks you to authorize the
highlighted devices.
2. Select the highlighted FortiGates and select Authorize.
After they are authorized, the two downstream FortiGates (Accounting and Marketing) appear in the Topology tree
in the Security Fabric > Fabric Connectors > Security Fabric Setup page. This means that the two downstream
FortiGates (Accounting and Marketing) have successfully joined the Security Fabric.
3. The Topology tree now highlights the FortiGate with the serial number that is connected to the downstream
FortiGate (Marketing) and asks you to authorize the highlighted device.
4. Select the highlighted FortiGates and select Authorize.
After it is authorized, the downstream FortiGate ( Sales) appears in the Topology tree in the Security Fabric > Fabric
Connectors > Security Fabric Setup page. This means that the downstream FortiGates (Sales) has successfully
joined the Security Fabric.
1. Run the diagnose sys csf authorization pending-list command in the root FortiGate to show the
downstream FortiGate pending for root FortiGate authorization:
Edge # diagnose sys csf authorization pending-list
Serial IP Address HA-Members Path
------------------------------------------------------------------------------------
FG201ETK18902514 0.0.0.0 FG3H1E5818900718:FG201ETK18902514
2. Run the diagnose sys csf downstream command in the root or middle FortiGate to show the downstream
FortiGates after they join Security Fabric:
Edge # diagnose sys csf downstream
1: FG201ETK18902514 (192.168.200.10) Management-IP: 0.0.0.0 Management-port:0
parent: FG3H1E5818900718
path:FG3H1E5818900718:FG201ETK18902514
data received: Y downstream intf:wan1 upstream intf:port11 admin-port:443
authorizer:FG3H1E5818900718
2: FGT81ETK18002246 (192.168.10.10) Management-IP: 0.0.0.0 Management-port:0 parent:
FG3H1E5818900718
path:FG3H1E5818900718:FGT81ETK18002246
data received: Y downstream intf:wan1 upstream intf:port10 admin-port:443
authorizer:FG3H1E5818900718
3: FG101ETK18002187 (192.168.135.10) Management-IP: 0.0.0.0 Management-port:0
parent: FG201ETK18902514
path:FG3H1E5818900718:FG201ETK18902514:FG101ETK18002187
data received: Y downstream intf:wan2 upstream intf:port12 admin-port:443
authorizer:FG3H1E5818900718
3. Run the diagnose sys csf upstream command in any downstream FortiGate to show the upstream FortiGate
after downstream FortiGate joins Security Fabric:
Marketing # diagnose sys csf upstream
Upstream Information:
Serial Number:FG3H1E5818900718
IP:192.168.200.2
Connecting interface:wan1
Connection status:Authorized
A Security Fabric can be enabled in multi-VDOM environments. This allows access to all of the Security Fabric features,
including automation, security rating, and topologies, across the VDOM deployment.
l Users can navigate to downstream FortiGate devices and VDOMs directly from the root FortiGate using the Fabric
selection menu.
l Security rating reports include results for all of the configured VDOMs as well the entire Fabric.
Downstream FortiGate devices must connect to the upstream FortiGate from its management
VDOM.
Topology
In this topology, there is a root FortiGate with three FortiGates connected through two different VDOMs. The root
FortiGate is able to manage all devices running in multi-VDOM mode.
This example assumes multi-VDOM mode is already configured on each FortiGate, and that FortiAnalyzer logging is
configured on the root FortiGate (see Configuring FortiAnalyzer on page 2100 and Configuring the root FortiGate and
downstream FortiGates on page 2093 for more details).
Device configurations
The Security Fabric is enabled, and configured so that downstream interfaces from all VDOMs can allow other Security
Fabric devices to join.
1. Go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
2. Ensure that the Status is Enabled and the Security Fabric role is set to Serve as Fabric Root.
3. Enable Allow other Security Fabric devices to join and click the + to add the interfaces (vlan50 and vlan90) from the
vdom_nat1 and root VDOMs.
1. Go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
2. For Status, select Enabled and set the role to Join Existing Fabric.
3. Enter the Upstream FortiGate IP, which is the IP of the root FortiGate vdom_nat1 interface (192.168.5.5).
Downstream-G must use the interface from the management VDOM to connect to the upstream FortiGate IP.
4. Enable Allow other Security Fabric devices to join and click the + to add the downstream interface (sw-vlan71) from
the FG-traffic VDOM.
1. Go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
2. For Status, select Enabled and set the role to Join Existing Fabric.
3. Enter the Upstream FortiGate IP, which is the IP of the root VDOM on Downstream-G (192.168.71.7).
1. Go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
2. For Status, select Enabled and set the role to Join Existing Fabric.
3. Enter the Upstream FortiGate IP, which is the IP of the root VDOM on Root-E (192.168.9.5).
When the Security Fabric is enabled, various objects such as addresses, services, and schedules are synced from the
upstream FortiGate to all downstream devices by default. FortiOS has the following settings for object synchronization
across the Security Fabric:
Parameter Description
fabric-object-unification default: Global CMDB objects will be synchronized in the Security Fabric.
local: Global CMDB objects will not be synchronized to and from this device.
This command is available on the root FortiGate. If set to local, the device does
not synchronize objects from the root, but will send the synchronized objects
downstream.
fabric-workers Define how many task worker process are created to handle synchronizations (1-
4, default = 2). The worker processes dies if there is no task to perform after 60
seconds.
The per object setting can be configured on the root FortiGate as follows:
config firewall <object>
edit <name>
set fabric-object {enable | disable}
...
next
end
Where:
l <object> is one of the following: address, address6, addrgrp, addrgrp6, service category, service
custom, service group, schedule group, schedule onetime, or schedule recurring.
l Enabling fabric-object sets the object as a Security Fabric-wide global object that is synchronized to
downstream FortiGates.
l Disabling fabric-object sets the object as local to this Security Fabric member.
l If a device in the Fabric is in multi-VDOM mode, the GUI will not display the Fabric synchronization option. Even if
this is enabled in the CLI, the object will not be synchronized to any downstream devices.
Sample topology
In this Security Fabric, the root FortiGate (FGTA-1) has fabric-object-unification set to default so the Fabric
objects can be synchronized to the downstream FortiGate. The level 1 downstream FortiGate (FGTB-1) has
configuration-sync set to local, so it will not apply the synchronized objects locally. The level 2 downstream
FortiGate (FGTC) has configuration-sync set to default, so it will apply the synchronized objects locally.
In this example, firewall addresses and address groups are used. Other supported Fabric objects have the same
behaviors. The following use cases illustrate common synchronization scenarios:
l If no conflicts exist, firewall addresses and address groups can be synchronized to downstream FortiGates (see
example below).
l If a conflict exists between the root and downstream FortiGates, it can be resolved with the conflict resolution
wizard. After the conflict is resolved, the firewall addresses and address groups can be synchronized to
downstream FortiGates (see example below).
l If set fabric-object (Fabric synchronization option in the GUI) is disabled for firewall addresses and address
groups on the root FortiGate, they will not be synchronized to downstream FortiGates (see example below).
3. Check the firewall address and address group on the downstream FortiGates:
FGTB-1 # show firewall address add_subnet_1
entry is not found in table
FGTB-1 # show firewall addrgrp group_subnet_1
entry is not found in table
The synchronized objects are not applied locally on this FortiGate because configuration-sync is set to
local.
FGTC # show firewall address add_subnet_1
config firewall address
edit "add_subnet_1"
set uuid 378a8094-34cb-51eb-ce40-097f298fcfdc
set fabric-object enable
set subnet 22.22.22.0 255.255.255.0
next
end
FGTC # show firewall addrgrp group_subnet_1
config firewall addrgrp
edit "group_subnet_1"
set uuid 4d7a8a52-34cb-51eb-fce7-d93f76915319
set member "add_subnet_1"
set color 19
set fabric-object enable
next
end
The objects are synchronized on this FortiGate because configuration-sync is set to default.
To resolve a firewall address and address group conflict in the Security Fabric:
Name sync_add_1
c. Click OK.
2. On FGTA-1 (Fabric root), create the firewall address with same name but a different subnet:
a. Go to Policy & Objects > Addresses and click Create New > Address.
b. Configure the following:
Name sync_add_1
c. Click OK.
3. Add the address to a different address group than what is configured on FGTC:
a. Go to Policy & Objects > Addresses and click Create New > Address Group.
b. Configure the following:
Name sync_group4
Members sync_add_1
c. Click OK.
4. Go to Security Fabric > Fabric Connectors. In the topology tree, there is a message that Firewall objects are in
conflict with other FortiGates in the fabric.
c. The conflict is resolved. Click Close to exit the Firewall Object Synchronization pane.
Name add_subnet_3
c. Click OK.
2. Create the firewall address group and add the address:
a. Go to Policy & Objects > Addresses and click Create New > Address Group.
b. Configure the following:
Name group_subnet_3
Members add_subnet_3
c. Click OK.
3. On FGTB-1, go to Policy & Objects > Addresses and search for subnet_3. No results are found because Fabric
synchronization is disabled on the root FortiGate (FGTA-1).
4. On FGTC, go to Policy & Objects > Addresses and search for subnet_3. No results are found because Fabric
synchronization is disabled on the root FortiGate (FGTA-1).
3. Check the firewall address and address group on the downstream FortiGates:
FGTB-1 # show firewall address add_subnet_3
entry is not found in table
FGTB-1 # show firewall addrgrp group_subnet_3
entry is not found in table
FGTC # show firewall address add_subnet_3
entry is not found in table
FGTC # show firewall addrgrp group_subnet_3
entry is not found in table
The objects are not synchronized from the root FortiGate (FGTA-1) because the fabric-object setting is
disabled.
Sample topology
This sample topology shows a downstream FortiGate (HQ2) connected to the root FortiGate (HQ1) over IPsec VPN to
join Security Fabric.
Sample configuration
1. Configure interface:
a. In the root FortiGate (HQ1), go to Network > Interfaces.
b. Edit port2:
l Set Role to WAN.
l For the interface connected to the Internet, set the IP/Network Mask to 10.2.200.1/255.255.255.0
c. Edit port6:
l Set Role to DMZ.
l For the interface connected to FortiAnalyzer, set the IP/Network Mask to 192.168.8.250/255.255.255.0
b. Click OK.
3. Configure IPsec VPN:
a. Go to VPN > IPsec Wizard.
l Set Name to To-HQ2.
l Click Next.
b. Leave all other fields in their default values and click OK.
4. Configure the IPsec VPN interface IP address which will be used to form Security Fabric:
a. Go to Network > Interfaces.
b. Edit To-HQ2:
l Set Role to LAN.
c. Click OK.
d. Click Create New
l Set Name to To-HQ2_local_subnet_1.
e. Click OK.
f. Click Create New
l Set Name to To-HQ2_remote_subnet_1.
g. Click OK.
6. Configure IPsec VPN static routes:
a. Go to Network > Static Routes
b. Click Create New or Create New > IPv4 Static Route.
l For Named Address, select Type and select To-HQ2_remote_subnet_1.
Click OK.
c. Click Create New or Create New > IPv4 Static Route.
For Named Address, select Type and select To-HQ2_remote_subnet_1.
l
d. Click OK.
7. Configure IPsec VPN policies:
a. Go to Policy & Objects > Firewall Policy
b. Click Create New.
l Set Name to vpn_To-HQ2_local.
l Disable NAT.
c. Click OK.
d. Click Create New.
l Set Name to vpn_To-HQ2_remote.
l Enable NAT.
e. Click OK.
8. Configure Security Fabric:
a. Go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
b. For Status, click Enable.
After FortiGate Telemetry is enabled, FortiAnalyzer automatically enables Logging and Upload is set to Real
Time.
c. Set the Security Fabric role to Serve as Fabric Root. The FortiAnalyzer settings can be configured.
d. Enter the FortiAnalyzer IP (192.168.8.250).
e. Click OK. The FortiAnalyzer serial number is verified.
f. Enter a Fabric name, such as Office-Security-Fabric.
g. Ensure Allow other Security Fabric devices to join is enabled and add VPN interface To-HQ2.
h. Click OK.
1. Configure interface:
a. Go to Network > Interfaces.
b. Edit interface wan1:
l Set Role to WAN.
l For the interface connected to the Internet, set the IP/Network Mask to 192.168.7.3/255.255.255.0.
l For the interface connected to local endpoint clients, set the IP/Network Mask to
10.1.100.3/255.255.255.0.
2. Configure the static route to connect to the Internet:
a. Go to Network > Static Routes and click Create New or Create New > IPv4 Static Route.
l Set Destination to 0.0.0.0/0.0.0.0.
b. Click OK.
3. Configure IPsec VPN:
a. Go to VPN > IPsec Wizard.
l Set VPN Name to To-HQ1.
l Click Next.
b. Leave all other fields in their default values and click OK.
4. Configure the IPsec VPN interface IP address which will be used to form Security Fabric:
a. Go to Network > Interfaces.
b. Edit To-HQ1:
l Set Role to WAN.
c. Click OK.
d. Click Create New
l Set Name to To-HQ1_remote_subnet_1.
e. Click OK.
6. Configure IPsec VPN static routes:
a. Go to Network > Static Routes and click Create New or Create New > IPv4 Static Route.
l For Named Address, select Type and select To-HQ1_remote_subnet_1.
b. Click OK.
c. Click Create New or Create New > IPv4 Static Route.
l For Named Address, select Type and select To-HQ1_remote_subnet_1.
d. Click OK.
7. Configure IPsec VPN policies:
a. Go to Policy & Objects > Firewall Policy and click Create New.
l Set Name to vpn_To-HQ1_local.
l Disable NAT.
b. Click OK.
l Disable NAT.
d. Click OK.
8. Configure Security Fabric:
a. Go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
b. For Status, click Enable.
FortiAnalyzer automatically enables logging. FortiAnalyzer settings will be retrieved when the downstream
FortiGate connects to the root FortiGate.
c. Set the Security Fabric role to Join Existing Fabric.
d. Set the Upstream FortiGate IP to 10.10.10.1.
e. Click OK.
1. In the root FortiGate (HQ1), go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup
card.
The Topology tree highlights the connected FortiGate (HQ2) with the serial number and asks you to authorize the
highlighted device.
2. Select the highlighted FortiGates and select Authorize.
After authorization, the downstream FortiGate (HQ2) appears in the Topology tree in the Security Fabric > Fabric
Connectors > Security Fabric Setup page. This means the downstream FortiGate (HQ2) has successfully joined the
Security Fabric.
1. Run the diagnose sys csf authorization pending-list command in the root FortiGate (HQ1) to show
the downstream FortiGate pending for root FortiGate authorization:
HQ1 # diagnose sys csf authorization pending-list
Serial IP Address HA-Members
Path
------------------------------------------------------------------------------------
FG101ETK18002187 0.0.0.0
FG3H1E5818900718:FG101ETK18002187
2. Run the diagnose sys csf downstream command in the root FortiGate (HQ1) to show the downstream
FortiGate (HQ2) after it joins Security Fabric:
HQ1 # diagnose sys csf downstream
1: FG101ETK18002187 (10.10.10.3) Management-IP: 0.0.0.0 Management-port:0 parent:
FG3H1E5818900718
path:FG3H1E5818900718:FG101ETK18002187
data received: Y downstream intf:To-HQ1 upstream intf:To-HQ2 admin-port:443
authorizer:FG3H1E5818900718
3. Run the diagnose sys csf upstream command in the downstream FortiGate (HQ2) to show the root
FortiGate (HQ1) after the downstream FortiGate joins Security Fabric:
HQ2 # diagnose sys csf upstream
Upstream Information:
Serial Number:FG3H1E5818900718
IP:10.10.10.1
Connecting interface:To-HQ1
Connection status:Authorized
LLDP reception is enabled on WAN interfaces, which prompts FortiGates that are joining the Security Fabric if the
upstream FortiGate asks.
l If the interface role is undefined, LLDP reception and transmission inherit settings from the VDOM.
l If the interface role is WAN, LLDP reception is enabled.
l If the interface role is LAN, LLDP transmission is enabled.
When a FortiGate B's WAN interface detects that FortiGate A's LAN interface is immediately upstream (through the
default gateway), and FortiGate A has Security Fabric enabled, FortiGate B will show a notification on the GUI asking to
join the Security Fabric.
VDOM Setting.
l If the interface's role is WAN, under Administrative Access, set Receive LLDP to Enable and Transmit LLDP to
Use VDOM Setting.
l If the interface's role is LAN, under Administrative Access, set Receive LLDP to Use VDOM Setting and
Transmit LLDP to Enable.
3. Click OK. A notification is shown on FortiGate B, You can connect to a Security Fabric via an upstream FortiGate at
10.2.200.1.
4. Click the notification. The Core Network Security page with the Security Fabric settings opens. All the required
settings automatically configured.
5. Click OK to apply the settings.
l WAN role
config system interface
edit "wan1"
set lldp-reception enable
set lldp-transmission vdom
set role wan
...
next
end
l LAN role
config system interface
edit "port2"
set lldp-reception vdom
set lldp-transmission enable
set role lan
...
next
end
Security Assertion Markup Language (SAML) is an open standard for exchanging authentication and authorization data
between one Identity Provider (IdP) and one or more Service Providers (SP). Both parties exchange messages using the
XML protocol as transport. FortiGate firewall devices can be configured as IdPs or SPs.
When the Security Fabric is enabled, you can configure the root FortiGate as the IdP. You can also configure
downstream FortiGates to be automatically configured as SPs, with all links required for SAML communication, when
added to the Security Fabric. Administrators must still be authorized on each device. Credentials are verified by the root
FortiGate, and login credentials are shared between devices. Once authorized, an administrator can move between
fabric devices without logging in again.
Optionally, the downstream FortiGate can also be manually configured as an SP, and then linked to the root FortiGate.
The authentication service is provided by the root FortiGate using local system admin accounts for authentication. Any of
the administrator account types can be used for SAML log in. After successful authentication, the administrator logs in to
the first downstream FortiGate SP, and can then connect to other downstream FortiGates that have the SSO account
properly configured, without needing to provide credentials again, as long as admins use the same browser session. In
summary, the root FortiGate IdP performs SAML SSO authentication, and individual device administrators define
authorization on FortiGate SPs by using security profiles.
SAML SSO enables a single FortiGate device to act as the identify provider (IdP), while other FortiGate devices act as
service providers (SP) and redirect logins to the IdP.
Only the root FortiGate can be the identity provider (IdP). The downstream FortiGates can be
configured as service providers (SP).
7. Click OK.
9. Click OK.
Because communication between the root FortiGate IdP and FortiGate SPs is secured, you must select a local server
certificate in the IdP certificate option on the root FortiGate. When downstream SPs join the IdP (root FortiGate), the SP
automatically obtains the certificate.
In the following SP example, the IdP certificate displays REMOTE_Cert_2, which is the root server certificate for the IdP:
It is possible to manually import a certificate from an SP to the IdP so it can be used for authentication.
After you have logged in to a Security Fabric member using SSO, you can navigate between any Security Fabric
member with SSO configured.
3. Click a Security Fabric member. The login page appears. Click Sign in with Security Fabric.
4. A prompt appears that an SSO administrator account has been created. Click Continue.
You are now logged in to the Security Fabric member with SSO. The letters "SSO" also display beside the user
name in the top banner.
5. Go to System > Administrators > Single-Sign-On Administrator to view the list of SSO admins created.
To enter a question mark (?) or a tab, Ctrl + V must be entered first. Question marks and tabs cannot be typed or copied
into the CLI Console or some SSH clients.
To configure an SP:
ngczjwqxujfsbhgr9ivhehwu37fml20/metadata/"
set idp-single-sign-on-url "https://172.16.106.74/csf_
ngczjwqxujfsbhgr9ivhehwu37fml20/login/"
set idp-single-logout-url "https://172.16.106.74/saml-idp/csf_
ngczjwqxujfsbhgr9ivhehwu37fml20/logout/"
set idp-cert "REMOTE_Cert_1"
set server-address "172.16.106.74:12443"
end
You can set up SAML SSO authentication in a Security Fabric environment by starting with a root FortiGate that has one
or more pre-authorized FortiGates.
After the initial configuration, you can add more downstream FortiGates to the Security Fabric, and they are
automatically configured with default values for a service provider.
4. Configure the IdP (see Configuring the root FortiGate as the IdP on page 2204).
5. Configure the SPs (see Configuring a downstream FortiGate as an SP on page 2205).
After you have logged in to a Security Fabric member by using SSO, you can navigate between any Security Fabric
member with SSO configured. This can be done using the Security Fabric members dropdown menu or by logging in to a
FortiGate SP from the root FortiGate IdP.
The Security Fabric members dropdown menu allows you to easily switch between all FortiGate devices that are
connected to the Security Fabric. You can also use this menu to customize a FortiGate in the Security Fabric.
1. In the Security Fabric members dropdown menu, hover the cursor over a FortiGate so the tooltip is shown.
2. Click Configure. The Configure pane opens.
3. Edit the settings as required.
4. Click OK.
The following example describes how to log in to a root FortiGate IdP, and navigate to other FortiGate SPs in the
Security Fabric without further authentication. The local administrator account is named test3. The local administrator
account must also be available as an SSO administrator account on all downstream FortiGate SPs. Different tabs of the
same browser are used to log in to the various FortiGates.
1. Log in to the root FortiGate IdP by using the local administrator account.
In this example, the local administrator account is named test3.
2. Go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
3. In the Topology tree, click one of the downstream FortiGate SPs, and select Login to <name of FortiGate>. The
login screen is displayed.
4. In the login screen, select Single Sign-On.
By using cookies in your local browser for the already-authenticated SSO administrator, FortiGate logs you in to the
downstream FortiGate SP as the SSO administrator. In this example, the SSO administrator name is test3.
5. While still logged into the root FortiGate IdP in your browser, go to the browser tab for the root FortiGate IdP, and log
in to another FortiGate SP that is displayed on the Security Fabric widget in the GUI.
SAML SSO login uses SAML_IDP session cookies of already authenticated admin users in your local browser
cache to send to the root FortiGate IdP for authentication. If your browser cache is manually cleared, or you close
your browser, you must authenticate again.
It is possible to log in to one downstream FortiGate SP in a Security Fabric, and then open
another tab in your browser to connect to another FortiGate SP that is not a member of the
Security Fabric.
This is useful in cases where the SSO administrator and the local system administrator on the
FortiGate SP both have the same login name, but are two different entities.
When a FortiGate acting as a Security Fabric root is configured as a SAML SSO identity provider (IdP), the FortiAnalyzer
of the Security Fabric can register itself as a service provider (SP). This simplifies the configuration by enabling the
setting in FortiAnalyzer to facilitate Fabric SSO access to the FortiAnalyzer once authenticated to the root FortiGate.
When signed in using SSO, the FortiAnalyzer includes a Security Fabric navigation dropdown, which allows easy
navigation to FortiGates in the Fabric.
1. On the root FortiGate, go to Security Fabric > Physical Topology or Logical Topology.
2. In the topology, click the FortiAnalyzer icon and select Login to FortiAnalyzer.
3. Enter the credentials to log in. A Security Fabric must be configured with the Fabric devices listed under the Fabric
name.
a. Go to Device Manager to verify the Fabric setup. There is an asterisk beside the root FortiGate.
c. Click Apply and log out of the FortiAnalyzer. The FortiAnalyzer will automatically register itself on the FortiGate
and is a visible appliance in the list of SPs.
6. Log in to the FortiAnalyzer. There is a new option to Login with Fabric Single Sign-On.
7. Click Login with Fabric Single Sign-On. A dialog appears to select a Fabric IdP.
end
next
end
end
When a FortiGate is configured as the SAML SSO IdP, FortiManager can be added as an SP.
1. On the root FortiGate, go to Security Fabric > Fabric Connectors, and edit the Security Fabric Setup connector.
2. In the Security Fabric Settings section, click Advanced Options.
3. In the Service Providers section, click Create New.
4. Enter a name and a prefix for the SP. FortiOS generates a unique prefix, but you can enter your own.
6. Click OK.
7. In FortiManager, go to System Settings > Admin > SAML SSO and in the Single Sign-On Mode section, click
Service Provider (SP).
8. Configure the IdP Settings:
a. For IdP Type, click Fortinet.
b. For IdP Address, enter the root FortiGate address including the port number.
c. Enter the Prefix of the SP.
d. For IdP Certificate, import the same certificate used on the root FortiGate.
e. Click Apply.
9. To verify that the configuration works, log out of FortiManager and log in using the Login via Single-Sign-On link.
From a root FortiGate IdP, you can edit each of the FortiGate SPs. For example, you can edit a FortiGate SP to generate
a new prefix, or you can add or modify SAML attributes. When you generate a new prefix value, it is propagated to the
respective downstream FortiGates.
1. Go to Security Fabric > Fabric Connectors and double-click the Security Fabric Setup card.
2. Click Advanced Options. The SAML SSO pane opens.
3. In the Service Providers table, select a device and click Edit. The Edit Service Provider pane opens.
Security rating
The security rating uses real-time monitoring to analyze your Security Fabric deployment, identify potential
vulnerabilities, highlight best practices that can be used to improve the security and performance of your network, and
calculate Security Fabric scores.
To view the security rating, go to Security Fabric > Security Rating on the root FortiGate.
The Security Rating page is separated into three major scorecards: Security Posture, Fabric Coverage, and
Optimization, which provide an executive summary of the three largest areas of security focus in the Security Fabric.
The scorecards show an overall letter grade and breakdown of the performance in sub-categories. Clicking a scorecard
drills down to a detailed report of itemized results and compliance recommendations. The point score represents the net
score for all passed and failed items in that area. In the drill down report, hover the cursor over a score to view the
calculation breakdown.
The report includes the security controls that were tested against, linking to specific FSBP or PCI compliance policies.
Click the FSBP and PCI buttons to reference the corresponding standard. Users can search or filter the report results. If
there is a failed check on the scorecard, there is a link in the Recommendations section that takes you to the page to
resolve the problem.
Certain remediations marked with an EZ symbol represent configuration recommendations that support Easy Apply. In
the panel on the right, in the Recommendations section, click Apply to apply the changes to resolve the failed security
control.
The report table can be customized by adding more columns, such as Category, to view, filter, or sort the results based
on scorecard categories. Click the gear icon to customize the table.
Users can also export the reports as CSV or JSON files by clicking the Export dropdown.
To exit the current view, click the icon beside the scorecard title to return to the summary view.
For more information about security ratings, and details about each of the checks that are performed, go to Security Best
Practices & Security Rating Feature.
The following licensing options are available for security rating checks:
l A base set of free checks
The base set can be run locally on any FortiGate and on all other devices in the Security
Fabric. On licensed FortiGates, ratings scores can be submitted to and received from
FortiGuard for ranking networks by percentile.
For a list of base and licensed security rating checks, see FortiGuard Security Rating Service.
Security rating notifications are shown on settings pages, which list configuration issues determined by the security
rating report. You can open the recommendations to see which items need to be fixed. Notifications can be dismissed in
the GUI. Dismissed issues are unique for each administrator. Hashes for dismissed notifications are saved in local
storage. If a user clears the local storage, all issues will show up again as not dismissed.
Notification locations
On the System > Settings page, there is a Security Rating Issues section in the right-side gutter. To dismiss a
notification, hover over the issue and click the X beside it. To view dismissed notifications, enable Show Dismissed.
On the Network > Interfaces page, there is a Security Rating Issues section in the table footer. Click Security Rating
Issues to view the list of issues. To dismiss a notification, click the X beside it. To view dismissed notifications, click Show
Dismissed.
Notification pop-ups
When you click a security rating notification, a pop-up appears and the related setting is highlighted in the GUI. The pop-
up contains a description of the problem and a timestamp of when the issue was found.
Once an issue is resolved, the notification disappears after the next security rating report runs.
Security rating checks by default are scheduled to run automatically every four hours.
Security rating scores can be submitted to FortiGuard for comparison with other organizations' scores, allowing a
percentile score to be calculated. If you opt out of submitting your score, only an absolute score will be available.
The results of past security checks are available on the Log & Report > Events > Security Rating Events page.
An event filter subtype can be created for the Security Fabric rating so event logs are created on the root FortiGate that
summarize the results and show detailed information for the individual tests.
In multi VDOM mode, security rating reports can be generated in the Global VDOM for all of the VDOMs on the device.
Administrators with read/write access can run the security rating report in the Global VDOM. Administrators with read-
only access can only view the report.
On the report scorecards, the Scope column shows the VDOMs that the check was run on. On checks that support Easy
Apply, the remediation can be run on all of the associated VDOMs.
Global scope:
VDOM scope:
The Security Fabric score is calculated when a security rating check is run, based on the severity level of the checks that
are passed or failed. A higher scores represents a more secure network. Points are added for passed checks and
removed for failed checks.
Critical 50
High 25
Medium 10
Low 5
To calculate the number of points awarded to a device for a passed check, the following equation is used:
The secure FortiGate multiplier is determined using logarithms and the number of FortiGate devices in the Security
Fabric.
For example, if there are four FortiGate devices in the Security Fabric that all pass the compatible firmware check, the
score for each FortiGate device is calculated with the following equation:
50
× 1.292 = 16.15 points
4
All of the FortiGate devices in the Security Fabric must pass the check in order to receive the points. If any one of the
FortiGate devices fails a check, the devices that passed are not awarded any points. For the device that failed the check,
the following equation is used to calculated the number of points that are lost:
For example, if the check finds two critical FortiClient vulnerabilities, the score is calculated with the following equation:
Scores are not affected by checks that do not apply to your network. For example, if there are no FortiAP devices in the
Security Fabric, no points will be added or subtracted for the FortiAP firmware version check.
Automation stitches
Automation stitches automate the activities between the different components in the Security Fabric, which decreases
the response times to security events. Events from any source in the Security Fabric can be monitored, and action
responses can be set up to any destination.
Automation stitches can also be used on FortiGate devices that are not part of a Security
Fabric.
An automation stitch consists of two parts: the trigger and the actions. The trigger is the condition or event on the
FortiGate that activates the action, for example, a specific log, or a failed log in attempt. The action is what the FortiGate
does in response to the trigger.
Automation stitches that use cloud-based actions (AWS Lambda, Azure Function, Google Cloud Function, and AliCloud
Function) have the option to delay an action after the previous action is completed.
Diagnose commands are available in the CLI to test, log, and display the stitch history and settings.
Automation stitches can only be created on the root FortiGate in a Security Fabric.
To create an automation stitch, a trigger event and a response action or actions are selected. Automation stitches can be
tested after they are created.
In the GUI, go to Security Fabric > Automation and click Create New. Automation stitches, actions, and triggers are
configured in separate dialogs.
The stitch Action execution can be set to either Sequential or Parallel. In sequential execution, actions will execute one
after another with a delay (if specified). If one action fails, then the action chain stops. This is the default setting. In
parallel execution, all actions will execute immediately when the stitch is triggered.
When creating a stitch, clicking Add Trigger and Add Action displays a list of available triggers and actions, and the
option to create a new one.
Once the stitch is configured, a process diagram of the trigger, actions, and delays is displayed. A delay can be added
before an action if Sequential action execution is used. Executing the next action can be delayed by up to 3600 seconds
(one hour).
Triggers and actions can be configured separately, and then added to an automation stitch.
On the Security Fabric > Automation page, there are tabs for Stitch, Trigger, and Action. The Stitch tab is the default view
that lists the trigger and actions used in each stitch. Individual triggers and actions can be created or edited in the
corresponding tabs.
Sample configuration
The following example shows how to configure a Security Rating Summary automation stitch with AWS Lambda and
Email actions. There is a 60-second delay before the Email action.
Name aws_no_delay
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the AWS Lambda function action:
a. Click Add Action.
b. Click Create and select AWS Lambda.
c. Enter the following:
Name aws_no_delay
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the Email notification action:
a. Click Add Action.
b. Click Create and select Email.
c. Enter the following:
Name email_action
d. Click OK.
e. Select the action in the list and click Apply.
6. Click the Add delay located between both actions. Enter 60 and click OK.
7. Click OK.
In the GUI, go to Security Fabric > Automation, right-click on the automation stitch and select Test Automation Stitch.
CLI configurations
next
end
config system automation-trigger
edit "Compromised Host - High"
set description "Default automation trigger configuration for when a high severity
compromised host is detected."
next
end
config system automation-stitch
edit "Compromised Host Quarantine"
set description "Default automation stitch to quarantine a high severity compromised
host on FortiAPs, FortiSwitches, and FortiClient EMS."
set status disable
set trigger "Compromised Host - High"
config actions
edit 1
set action "Quarantine on FortiSwitch + FortiAP"
next
edit 2
set action "Quarantine FortiClient EMS Endpoint"
next
end
next
end
Network Down
HA Failover
next
end
config system automation-stitch
edit "HA Failover"
set description "Default automation stitch to send an email when a HA failover is
detected."
set status disable
set trigger "HA Failover"
config actions
edit 1
set action "Default Email"
next
end
next
end
Reboot
edit 1
set action "Default Email"
next
end
next
end
The Incoming Webhook Quarantine stitch for API calls to the FortiGate accepts multiple parameters (MAC address and
FortiClient UUID) from an Incoming Webhook trigger, which enacts either the Access Layer Quarantine action (MAC
address) or the FortiClient Quarantine action (FortiClient UUID). This is a default automation stitch included in FortiOS.
"build":1545
Encode spaces in the automation stitch name with %20. For example,
Incoming%20Webhook%20Quarantine
Once the automation stitch is triggered, the MAC address is quarantined by the FortiGate, and an event log is
created. The FortiClient UUID is quarantined on the EMS server side.
3. Edit the cURL request to include parameters in the data field ("mac" and "fctuid"), then execute the request:
root@pc56:~# curl -k -X POST -H 'Authorization: Bearer
cfgtct1mmx0fQxr4khb000p70wdfmk' --data '{ "mac":"0c:0a:00:0c:ce:b0", "fctuid":
"3000BB0B0ABD0D00B0D0A0B0E0F0B00B"}'
https://100.10.100.200/api/v2/monitor/system/automation-
stitch/webhook/Incoming%20Webhook%20Quarantine
{
"http_method":"POST",
"status":"success",
"http_status":200,
"serial":"FGT80E0Q00000000",
"version":"v6.4.0",
"build":1545
Encode spaces in the automation stitch name with %20. For example,
Incoming%20Webhook%20Quarantine.
Once the automation stitch is triggered, the MAC address is quarantined by the FortiGate, and an event log is
created. The FortiClient UUID is quarantined on the EMS server side.
Sample log
Triggers
Security Fabric
l FortiClient Quarantine
l IP Ban
Security Rating A summary is available for a recently run Security Rating report.
Summary Options include:
l Security Posture
l Fabric Coverage
l Optimization
l Any
FortiAnalyzer Event The specified FortiAnalyzer event handler has occurred. See
Handler FortiAnalyzer event handler trigger on page 2244 for details.
FortiGate Cloud Event The specified FortiGate Cloud event handler has occurred.
Handler This option requires a FortiGate Cloud log retention license.
Fabric Connector Event An event has occurred on a specific Fabric connector. See Fabric
connector event trigger on page 2249 for details.
FortiGate Cloud-Based IOC detection from the FortiGate Cloud IOC service.
IOC This option requires an IOC license, a web filter license, and
FortiCloud logging must be enabled.
System
Conserve Mode A FortiGate entered conserve mode due to low memory. See Execute
a CLI script based on CPU and memory thresholds on page 2292 for
an example.
l FortiGuard AntiSpam
l FortiGuard AntiVirus
l FortiGuard IPS
l FortiGate Cloud
l Any
High CPU A FortiGate has high CPU usage. See Execute a CLI script based on
CPU and memory thresholds on page 2292 for an example.
Miscellaneous
You can trigger automation stitches based on FortiAnalyzer event handlers. This allows you to define rules based on
complex correlations across devices, log types, frequencies, and other criteria.
To set up a FortiAnalyzer event handler trigger:
1. Configure a FortiGate event handler on the FortiAnalyzer
2. Configure FortiAnalyzer logging on the FortiGate on page 2245
3. Configure an automation stitch that is triggered by a FortiAnalyzer event handler on page 2246
On the FortiAnalyzer, configure an event handler for the automation stitch. In this example, the event handler is triggered
when an administrator logs in to the FortiGate. See Creating a custom event handler in the FortiAnalyzer Administration
Guide for more information.
1. Go to FortiSoC > Handlers > FortiGate Event Handlers, and click Create New.
2. Configure an event handler with two conditions for the automation stitch:
Group By Device ID
Value Information
Value login
4. Click OK.
1. Go to Security Fabric > Fabric Connectors and double-click the FortiAnalyzer Logging card.
2. Ensure the Status is Enabled, and configure the settings as needed.
3. Click OK.
When a FortiAnalyzer event handler is triggered, it sends a notification to the FortiGate automation framework, which
generates a log and triggers the automation stitch.
To configure an automation stitch that is triggered by a FortiAnalyzer event handler in the GUI:
Name auto-faz-1
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the Email notification action:
a. Click Add Action.
b. Click Create and select Email.
c. Enter the following:
Name auto-faz-1_email
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
To configure an automation stitch that is triggered by a FortiAnalyzer event handler in the CLI:
Sample email
The email sent by the action will look similar to the following:
With the Fabric Connector Event trigger, any supported Fabric connector is able to trigger an automation stitch on the
FortiGate based on a specific event defined on the Fabric connector. Currently, only FortiDeceptor 4.1 supports this
trigger for the Insider Threat, Notify Ban, and Notify Unban events.
In the following example, an authorized FortiDeceptor in the Security Fabric deploys a decoy called ubuntu16 configured
with SSH, SAMBA, HTTP, and HTTPS services.
This example assumes the Security Fabric is already configured. Refer to Configuring the root FortiGate and
downstream FortiGates and FortiDeceptor for detailed configuration steps. On the root FortiGate, the Allow downstream
device REST API access option must be enabled (set downstream-access enable). The minimum permission
required for the selected Administrator profile is Read/Write for User & Device (set authgrp read-write).
Three stitches are configured, one for each FortiDeceptor trigger type:
To configure stitches with the Fabric connector event trigger in the GUI:
Name fdc_Insider_Threat
Description Insider_Threat
c. Click OK.
d. Repeat these steps to create two more triggers with the following settings:
Name fdc_Notify_Ban
Description Notify_Ban
Name fdc_Notify_Unban
Description Notify_Unban
Name email_log
CLI Script
Name fdc_unban
To configure stitches with the Fabric connector event trigger in the CLI:
Verification
A device with IP 172.16.200.33 uses SSH to access the decoy (ubuntu16) deployed in the FortiDeceptor. The
FortiDeceptor will detect the attacker IP 172.16.200.33, automatically quarantine it, and send the insider threat
notification to the FortiGate. This notification will trigger the fortideceptor_threat stitch due to the insider threat event
trigger, so an email alert is sent and the attacker IP (172.16.200.33) is banned.
In FortiDeceptor, if the attacker IP (172.16.200.33) is manually blocked or unblocked, the FortiDeceptor will send out the
internal block or unblock notification to FortiGate (see Quarantine Status for more details). This notification will trigger
the fortideceptor_ban or fortideceptor_unban stitch due the notify ban or unban event trigger. An email alert is sent, and
based on the event, the IP is banned or the CLI script runs to unban the IP.
You can configure a FortiOS event log trigger for when a specific event log ID occurs. You can select multiple event log
IDs, and apply log field filters.
1. Go to Security Fabric > Automation, select the Trigger tab, and click Create New.
2. In the Miscellaneous section, click FortiOS Event Log.
3. Enter a name and description.
4. In the Event field, click the + to select multiple event log IDs.
The Event options correspond to the Message Meaning listed in the FortiOS Log Message Reference. Hover over
an entry to view the tooltip that includes the event ID and log name. In this example, the Admin login successful
event in the GUI corresponds to log ID 32001, which is LOG_ID_ADMIN_LOGIN_SUCC.
5. In the Field filter(s) field, click the + to add multiple field filters. The configured filters much match in order for the
stitch to be triggered.
a. To view the list of available fields for a log, refer to the FortiOS Log Message Reference by appending the log
ID to the document URL (https://docs.fortinet.com/document/fortigate/7.0.7/fortios-log-message-
reference/<log_ID>).
6. Click OK.
Actions
The following table outlines the available actions. Multiple actions can be added to an automation stitch. Actions can be
reorganized in the Edit Automation Stitch page by dragging and dropping the actions in the diagram.
Security Response
Access Layer Quarantine This option is only available for Compromised Host triggers.
Quarantine the MAC address on access layer devices (FortiSwitch
and FortiAP).
FortiClient Quarantine This option is only available for Compromised Host triggers.
Use FortiClient EMS to block all traffic from the source addresses that
are flagged as compromised hosts.
Quarantined devices are flagged on the Security Fabric topology
views. Go to the Dashboard > Users & Devices > Quarantine widget
to view and manage quarantined IP addresses.
FortiNAC Quarantine This option is only available for Compromised Host and Incoming
Webhook triggers.
Use FortiNAC to quarantine a client PC and disable its MAC address.
See FortiNAC Quarantine action on page 2257 for details.
VMware NSX Security This option is only available for Compromised Host triggers.
Tag If an endpoint instance in a VMware NSX environment is
compromised, the configured security tag is assigned to the
compromised endpoint. See VMware NSX security tag action on
page 2260 and VMware NSX-T security tag action on page 2264 for
details.
Notifications
Email Send a custom email message to the selected recipients. At least one
recipient and an email subject must be specified.
The email body can use parameters from logs or previous action
results. Wrapping the parameter with %% will replace the expression
with the JSON value for the parameter, for example:
%%results.source%% is the source property from the previous
action.
Replacement messages can be enabled in the email body to create
branded email alerts. See Replacement messages for email alerts on
page 2268 for details.
Slack Notification Send a notification to a Slack channel. See Slack Notification action
on page 2272 for details.
Cloud Compute
AWS Lambda Send log data to an integrated AWS service. See AWS Lambda
action on page 2282 for details.
Azure Function Send log data to an Azure function. See Azure Function action on
page 2284 for details.
Google Cloud Function Send log data to a Google Cloud function. See Google Cloud
Function action on page 2285 for details.
AliCloud Function Send log data to an AliCloud function. See AliCloud Function action
on page 2287 for details.
General
CLI Script Run one or more CLI scripts. See CLI script action on page 2289 for
details. See Execute a CLI script based on CPU and memory
thresholds on page 2292 for an example.
Webhook Send an HTTP request using a REST callback. See Webhook action
on page 2299 for details, and Slack integration webhook on page
2304 and Microsoft Teams integration webhook on page 2306 for
examples.
Users can configure an automation stitch with the FortiNAC Quarantine action with a Compromised Host or Incoming
Webhook trigger. When the automation is triggered, the client PC will be quarantined and its MAC address is disabled in
the configured FortiNAC.
In this example, the FortiNAC has been configured to join an enabled Security Fabric. See FortiNAC for more
information.
The FortiNAC must also be configured to isolate disabled hosts:
l Endpoints connecting to FortiWiFi or wired ports on FortiGate:
l See the requisite Configure FortiNAC section in the FortiGate Endpoint Management Integration Guide.
l Endpoints connecting to FortiAP:
l Set the Dead End VLAN. See Model configuration.
l Endpoints connecting to FortiSwitch:
l Set the Dead End VLAN. See Model configuration.
l Add the switch to the physical address filtering group. See Systems groups and Modify a group.
e. Click OK.
2. Configure the automation stitch trigger:
a. Go to Security Fabric > Automation and click Create New.
b. Enter the stitch name (auto_webhook).
h. Click OK.
i. Select the trigger in the list and click Apply.
3. Configure the automation stitch action:
a. Click Add Action.
b. Click Create and select FortiNAC Quarantine.
c. Enter an action name (auto_webhook_quarantine-fortinac) and click OK.
d. Select the action in the list and click Apply.
e. Click OK.
4. On a Linux PC accessible by the FortiGate, create a cURL request to trigger the automation stitch:
root@pc56:~# curl -k -X POST -H 'Authorization: Bearer ckx7d9xdzzx14Nztd1Ncr701dpwwy9' -
-data '{ "srcip": "1.1.1.1", "mac":"00:0C:29:0B:A6:16", "fctuid":
"A8BA0B12DA694E47BA4ADF24F8358E2F"}'
https://172.17.48.225:4431/api/v2/monitor/system/automation-stitch/webhook/auto_webhook
5. In FortiOS, verify the automation stitch is triggered and the action is executed:
a. Go to Log & Report > Events and select System Events to confirm that the stitch was activated.
b. Go to Security Fabric > Automation to see the last time that the stitch was triggered.
In FortiNAC, the Host View shows the status of the client PC. It is quarantined and its MAC address is disabled.
next
end
next
end
5. On a Linux PC accessible by the FortiGate, create a cURL request to trigger the automation stitch:
root@pc56:~# curl -k -X POST -H 'Authorization: Bearer ckx7d9xdzzx14Nztd1Ncr701dpwwy9' -
-data '{ "srcip": "1.1.1.1", "mac":"00:0C:29:0B:A6:16", "fctuid":
"A8BA0B12DA694E47BA4ADF24F8358E2F"}'
https://172.17.48.225:4431/api/v2/monitor/system/automation-stitch/webhook/auto_webhook
6. In FortiOS, verify that the automation stitch is triggered and the action is executed:
# diagnose test application autod 2
csf: enabled root:yes
version:1592949233 sync time:Tue Jun 23 15:03:15 2020
stitch: auto_webhook
destinations: all
trigger: auto_webhook
(id:15)service=auto_webhook
If an endpoint instance in a VMware NSX environment is compromised, this action will assign the configured security tag
to the compromised endpoint.
This action is only available when the automation trigger is set to compromised host.
To set up the NSX quarantine action, you need to:
1. Configure a VMware NSX SDN connector
2. Configure an NSX security tag automation stitch
3. Configure FortiAnalyzer logging on the FortiGate
The FortiGate retrieves security tags from the VMware NSX server through the connector.
5. Click OK.
Security tags are retrieved from the VMware NSX server through the NSX SDN connector.
Name pcui-test
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the VMware NSX Security Tag action:
a. Click Add Action.
b. Click Create and select VMware NSX Security Tag.
c. Enter the following:
Name pcui-test_quarantine-nsx
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
1. Go to Security Fabric > Fabric Connectors and double-click the FortiAnalyzer Logging card.
2. Ensure the Status is Enabled, and configure the settings as needed.
3. Click Apply.
When an endpoint instance, such as pcui-ubuntu2, in the VMware NSX environment is compromised, the automation
stitch is triggered. The FortiGate then assigns the configured security tag, pcui-tag2 in this example, to the compromised
NSX endpoint instance.
VMware NSX SDN connectors' vCenter server and credentials can be configured so the FortiGate resolves NSX-T VMs.
The FortiGate uses the VMWare NSX Security Tag automation action to assign a tag to the VM through an automation
stitch.
The FortiGate is notified of a compromised host on the NSX-T network by an incoming webhook or other means, such as
FortiGuard IOC. An automation stitch can be configured to process this trigger and action it by assigning a VMware NSX
security tag on the VM instance.
To configure an automation stitch to assign a security tag to NSX-T VMs in the GUI:
e. Click OK.
2. Configure the automation stitch trigger:
a. Go to Security Fabric > Automation and click Create New.
b. Enter the stitch name (auto_webhook).
c. Click Add Trigger.
d. Click Create and select Incoming Webhook.
e. Enter a name (auto_webhook).
f. Click OK to close the Incoming Webhook URL prompt.
g. Select the trigger in the list and click Apply.
3. Configure the automation stitch action:
a. Click Add Action.
b. Click Create and select VMware NSX Security Tag.
c. Enter the following:
Name auto_webhook_quarantine-nsx
d. Click OK.
e. Select the action in the list and click Apply.
4. Click OK.
5. In NSX-T, create a cURL request to trigger the automation stitch on the FortiGate:
root@pc56:/home# curl -k -X POST -H 'Authorization: Bearer
3fdxNG08mgNg0fh4NQ51g1NQ1QHcxx' --data '{ "srcip": "10.1.30.242"}'
https://172.16.116.230/api/v2/monitor/system/automation-stitch/webhook/auto_webhook
{
"http_method":"POST",
"status":"success",
"http_status":200,
"serial":"FGVM08TM20000000",
"version":"v6.4.0",
"build":1608
}
The automation stitch is triggered and the configured tag is added to the NSX-T VM.
In FortiOS, the Security Fabric > Automation page shows the last trigger time.
To configure an automation stitch to assign a security tag to NSX-T VMs in the CLI:
3. In NSX-T, create a cURL request to trigger the automation stitch on the FortiGate:
root@pc56:/home# curl -k -X POST -H 'Authorization: Bearer
3fdxNG08mgNg0fh4NQ51g1NQ1QHcxx' --data '{ "srcip": "10.1.30.242"}'
https://172.16.116.230/api/v2/monitor/system/automation-stitch/webhook/auto_webhook
{
"http_method":"POST",
"status":"success",
"http_status":200,
"serial":"FGVM08TM20000000",
"version":"v6.4.0",
"build":1608
}
stitch: auto_webhook
destinations: all
trigger: auto_webhook
(id:15)service=auto_webhook
Automation stitches with an Email action can leverage the formatting options provided by replacement messages to
create branded email alerts.
You can enable a replacement message and edit the message body or select a customized replacement message group
when you configure the automation action. When the automation stitch is triggered, the FortiGate will send the email with
the defined replacement message.
In this example, a Security Rating report triggers an Email notification action. The email uses a customized replacement
message group.
Name group-sec1
3. Click OK.
4. Select the group in the list and click Edit.
Name rating_posture
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the Email notification action:
a. Click Add Action.
b. Click Create and select Email.
c. Enter the following:
Name email-group1
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
logid2stitch mapping:
id:52000 local hit: 1 relayed hits: 0
auto_rating
To configure an automation stitch with a Slack Notification action, you first need to configure an incoming webhook in
Slack. Then you can enter the webhook URL when you configure the Slack Notification action.
This example uses a Security Rating Summary trigger in the automation stitch with two Slack Notification actions with
different notification messages. One message is a custom message, and the other is for the Security Rating Summary
log with a 90 second delay.
3. Add an Incoming Webhook to a channel in the workspace (see Sending messages using Incoming Webhooks for
more details).
4. Activate the Incoming Webhook, and copy the Webhook URL to the clipboard.
Name auto-rating
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the first Slack Notification action:
a. Click Add Action.
b. Click Create and select Slack Notification.
c. Enter the following:
Name slack1
Message Text
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the second Slack Notification action:
a. Click Add Action.
b. Click Create and select Slack Notification.
c. Enter the following:
Name slack2
Message Text
d. Click OK.
e. Select the action in the list and click Apply.
f. Click the Add delay located between both actions. Enter 90 and click OK.
6. Click OK.
set delay 90
set required enable
next
end
next
end
Microsoft Teams Notification actions can be configured to send notifications to channels in Microsoft Teams. To trigger
the notifications, you need to add an Incoming Webhook connector to a channel in Microsoft Teams, then you can
configure the automation stitch with the webhook URL.
In the following example, you will configure an automation stitch with a Security Rating Summary trigger and two
Microsoft Teams Notification actions with different notification messages. One message is for the Security Rating
Summary log, and the other is a custom message with a ten second delay.
1. In Microsoft Teams, click the ... (More options) beside the channel name, and select Connectors.
2. Search for Incoming Webhook and click Configure.
3. Enter a name for the webhook, upload an image for the webhook, and click Create.
4. Copy the webhook to the clipboard and save it.
5. Click Done.
To configure an automation stitch with Microsoft Teams Notification actions in the GUI:
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the first Microsoft Teams Notification action:
a. Click Add Action.
b. Click Create and select Microsoft Teams Notification.
c. Enter the following:
Name teams_1
Message Text
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the second Microsoft Teams Notification action:
a. Click Add Action.
b. Click Create and select Microsoft Teams Notification.
c. Enter the following:
Name teams_2
Message Text
d. Click OK.
e. Select the action in the list and click Apply.
f. Click the Add delay located between both actions. Enter 10 and click OK.
6. Click OK.
7. Trigger the automation stitch:
a. Right-click the automation stitch and select Test Automation Stitch.
After the Security Rating report is finished, the automation is triggered and an event log is created by the
FortiGate. The two notifications are sent to the Microsoft Teams channel.
To configure an automation stitch with Microsoft Teams Notification actions in the CLI:
config actions
edit 1
set action "teams_1"
set required enable
next
edit 2
set action "teams_2"
set delay 10
set required enable
next
end
next
end
AWS Lambda functions can be called when an automation stitch is triggered. This example uses a Security Rating
Summary trigger in the automation stitch.
Name auto-aws
d. Click OK.
e. Select the trigger in the list and click Apply.
Name aws-action-1
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In AWS, the
log shows that the function was called, executed, and finished.
Azure functions can be called when an automation stitch is triggered. This example uses a Security Rating Summary
trigger in the automation stitch.
Name auto-azure
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the Azure Function action:
a. Click Add Action.
b. Click Create and select Azure Function.
c. Enter the following:
Name azure_function
Authorization Function
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In Azure,
the function log shows that the function was called, executed, and finished:
Google Cloud functions can be called when an automation stitch is triggered. This example uses a Security Rating
Summary trigger in the automation stitch.
Name auto-google1
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the Google Cloud Function action:
a. Click Add Action.
b. Click Create and select Google Cloud Function.
c. Enter the following:
Name google-echo
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In Google
Cloud, go to Logs to see the function log showing that the configured function was called, executed, and finished:
AliCloud functions can be called when an automation stitch is triggered. This example uses a Security Rating Summary
trigger in the automation stitch.
Name auto-ali
d. Click OK.
e. Select the trigger in the list and click Apply.
Name Ali-Action-1
Authorization Function
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In AliCloud,
the function log shows that the function was called, executed, and finished:
CLI scripts can run when an automation stitch is triggered. The scripts can be entered manually, uploaded as a file, or
recorded in the CLI console. The output of the script can be sent as an email action.
The maximum size of the CLI script action output is 16K characters.
In this example, the script sets the idle timeout value to 479 minutes, and sends an email with the script output.
Name auto-cli-1
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the CLI Script action:
a. Click Add Action.
b. Click Create and select CLI Script.
Name admintimeout
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the Email notification action:
a. Click Add Action.
b. Click Create and select Email.
c. Enter the following:
Name auto-cli-1_email
Body %%results%%
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK.
Sample email
The email sent by the action will look similar to the following:
Automation stitches can be created to run a CLI script and send an email message when CPU or memory usage
exceeds specified thresholds.
In this example, two automation stitches are created that run a CLI script to collect debug information, and then email the
results of the script to a specified email address when the CPU usage threshold is exceeded, or memory usage causes
the FortiGate to enter conserve mode.
The maximum size of the CLI script action output is 16K characters.
Where:
cpu-use-threshold Threshold at which CPU usage is reported, in percent of total possible CPU
utilization (default = 90).
memory-use-threshold-extreme Threshold at which memory usage is considered extreme, and new sessions are
dropped, in percent of total RAM (default = 95).
memory-use-threshold-green Threshold at which memory usage forces the FortiGate to exit conserve mode, in
percent of total RAM (default = 82).
memory-use-threshold-red Threshold at which memory usage forces the FortiGate to enter conserve mode,
in percent of total RAM (default = 88).
Name high_cpu_debug
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the Email notification action:
a. Click Add Action.
b. Click Create and select Email.
c. Enter the following:
Name auto_high_cpu_email
Body %%results%%
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK.
next
end
next
end
Name high_memory_debug
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the Email notification action:
a. Click Add Action.
b. Click Create and select Email.
c. Enter the following:
Name auto_high_memory_email
Body %%results%%
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK.
Results
When the FortiGate enters conserve mode due to the memory-use-threshold-red being exceeded, the GUI
displays a notice, and the auto_high_memory automation stitch is triggered. This causes the CLI script to run and the
Webhook action
The webhook automation stitch action makes HTTP and HTTPS requests to a specified server, with custom headers,
bodies, ports, and methods. It can be used to leverage the ubiquity of HTML requests and APIs to integrate with other
tools.
The URI and HTTP body can use parameters from logs or previous action results. Wrapping
the parameter with %% will replace the expression with the JSON value for the parameter, for
example: %%results.source%% is the source property from the previous action.
In this example, a specific log message (failed administrator log in attempt) triggers the FortiGate to send the contents of
the log to a server. The server responds with a generic reply. This example assumes that the server is already
configured and able to communicate with the FortiGate.
Name badLogin
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the automation stitch action:
a. Click Add Action.
b. Click Create and select Webhook.
c. Enter the following:
Protocol HTTP
URL 172.16.200.44
Method POST
HTTP body %%log%%
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
The body content is replaced with the log from the trigger.
3. On the FortiGate, go to Log & Report > Events and select System Events to confirm that the stitch was activated.
4. Go to Security Fabric > Automation to see the last time that the stitch was triggered.
Diagnose commands
stitch: badLogin
destinations: all
trigger: badLogin
stitch: badLogin
actions:
logid2stitch mapping:
id:32002 local hit: 3 relayed to: 3 relayed from: 3
badLogin
To enable debug output and turn on automation debug messages for about 30 minutes:
1. Create an incoming webhook in Slack. See Sending messages using Incoming Webhooks for more information.
2. Go to Security Fabric > Automation and click Create New.
3. Enter the stitch name.
4. Configure the trigger:
a. Click Add Trigger.
b. Click Create and select Configuration Change.
c. Enter a name (config change).
d. Click OK.
e. Select the trigger in the list and click Apply.
5. Configure the action:
a. Click Add Action.
b. Click Create and select Webhook.
c. Enter the following:
Protocol HTTPS
Method POST
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK.
1. Create an incoming webhook in Slack. See Sending messages using Incoming Webhooks for more information.
2. Create the automation trigger:
config system automation-trigger
edit "config change"
set event-type config-change
next
end
1. Create an incoming webhook in Teams. See Create an incoming webhook for information.
2. Go to Security Fabric > Automation and click Create New.
3. Enter the stitch name.
4. Configure the trigger:
a. Click Add Trigger.
b. Click Create and select Configuration Change.
c. Enter a name (Teams).
d. Click OK.
e. Select the trigger in the list and click Apply.
5. Configure the action:
a. Click Add Action.
b. Click Create and select Webhook.
c. Enter the following:
Protocol HTTPS
Method POST
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK.
1. Create an incoming webhook in Teams. See Create an incoming webhook for information.
2. Create the automation trigger:
config system automation-trigger
edit "Teams"
set event-type config-change
next
end
end
next
end
For information about more advanced messages that can be configured and sent to the
Teams incoming webhook, see Sending messages to connectors and webhooks.
Cloud SDN connectors provide integration and orchestration of Fortinet products with public and private cloud solutions.
In a typical cloud environment, resources are dynamic and often provisioned and scaled on-demand. By using an SDN
connector, you can ensure that changes to cloud environment attributes are automatically updated in the Security
Fabric.
To protect the East-West or North-South traffic in these environments, the FortiGate uses the SDN connector to sync the
dynamic addresses that these volatile environments use. You can then configure the dynamic address objects as
sources or destinations for firewall policies. When you make changes to cloud environment resources, such as moving
them to a new location or assigning different IP addresses to them, you do not need to modify the policy in FortiOS, as
the SDN connector syncs changes to the cloud address objects.
These configurations consist of three primary steps:
1. Configure the cloud SDN connector to connect your FortiGate and public or private cloud account.
2. Create dynamic address objects to use the SDN connector. Use filters to sync only cloud address objects that you
require.
3. Apply the dynamic address objects to your firewall policy to protect your traffic.
This chapter explores the steps in detail and describes how to connect to each currently supported cloud platform. This
chapter does not discuss cloud account role-based or permission requirements. The respective cloud documents
contain this information.
The following external connector categories are available in the Security Fabric: Public SDN, Private SDN,
Endpoint/Identity, and Threat Feeds.
If VDOMs are enabled, SDN and Threat Feeds connectors are in the global settings, and
Endpoint/Identity connectors are per VDOM.
You can use SDN connectors to connect your FortiGate to public and private cloud solutions. By using an SDN
connector, you can ensure that changes to cloud environment attributes are automatically updated in the Security
Fabric. You can use SDN connector address objects to create policies that provide dynamic access control based on
cloud environment attribute changes. There is no need to manually reconfigure addresses and policies whenever
changes to the cloud environment occur.
There are four steps to creating and using an SDN connector:
1. Gather the required information. The required information depends on which public or private cloud solution
SDN connector you are configuring.
2. Creating the SDN connector on page 2310
3. Creating an SDN connector address on page 2310
4. Adding the address to a firewall policy on page 2312
The following provides general instructions for creating an SDN connector and using the dynamic address object in a
firewall policy. For instructions for specific public and private cloud solutions, see the relevant topic in this guide. For
advanced scenarios regarding SDN connectors, see the appropriate FortiOS 7.0 cloud platform guide.
The available CLI commands vary depending on the selected SDN connector type.
You can set filtering conditions using multiple entries with AND ("&") or OR ("|"). When both AND and OR are
specified, AND is interpreted first, then OR.
e. Configure other settings as desired.
f. Click OK.
4. Ensure that the SDN connector resolves dynamic firewall IP addresses as configured:
a. Go to Policy & Objects > Addresses.
b. Hover over the address that you created to see a list of IP addresses for instances that satisfy the filter that you
configured. In this case, the IP addresses of instances that belong to the specified security group display:
2. Ensure that the SDN connector resolves dynamic firewall IP addresses as configured by running show. The
following shows example output:
config firewall address
edit "ali-address-security"
set type dynamic
config list
edit "10.0.0.16"
next
edit "10.0.0.17"
next
edit "10.0.20.20"
next
end
...
next
end
The available CLI commands vary depending on the selected SDN connector type.
You can use an SDN connector address as the source or destination address in a policy.
Connector tooltips
In Security Fabric > External Connectors, hover over an SDN connector to view a tooltip that shows basic configuration
information.
Button Information
View Connector Objects Connector's dynamic objects, such as filters and instances.
View Policies List of policies that use the dynamic addresses from the connector.
View Automation Rules List of automation actions that use the connector.
FortiOS automatically updates dynamic addresses for AliCloud using an AliCloud SDN connector, including mapping the
following attributes from AliCloud instances to dynamic address groups in FortiOS:
l ImageId
l InstanceId
l SecurityGroupId
l VpcId
l VSwitchId
l TagKey
l TagValue
interval is in seconds.
2. Create a dynamic firewall address for the configured AliCloud SDN connector:
a. Go to Policy & Objects > Addresses.
b. Click Create New, then select Address.
c. Configure the address as shown, selecting the desired filter in the Filter dropdown list. In this example, the
address will automatically populate and update IP addresses only for AliCloud instances that belong to the
specified security group:
3. Ensure that the AliCloud SDN connector resolves dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses.
b. Hover over the address created in step 2 to see a list of IP addresses for instances that belong to the security
group configured in step 2:
FortiOS automatically updates dynamic addresses for AWS using an AWS SDN connector, including mapping attributes
from AWS instances to dynamic address groups in FortiOS.
Configuring the SDN connector using the GUI, then checking the configuration using the CLI is recommended.
d. In the Secret access key field, enter the secret access key accompanying the above access key.
e. In the Region name field, enter the region name. Refer to AWS Regions and Endpoints for the desired region
name.
f. In the VPC ID field, enter the VPC ID within the specified region you desire to cover with the SDN connector.
g. Click OK.
2. Check the configuration using the CLI:
config system sdn-connector
edit "<connector-name>"
show
The output resembles the following:
config system sdn-connector
edit "<connector-name>"
set access-key "<example-access-key>"
set secret-key ENC <example-secret-key>
set region "us-west-2"
set vpc-id "vpc-e1e4b587"
set update-interval 1
next
end
If you see that the SDN connector is not enabled in Security Fabric > External Connectors in the GUI, run the
following commands to enable the SDN connector:
diagnose deb application awsd -1
diagnose debug enable
The output may display an error like the following:
FGT # awsd sdn connector AWS_SDN prepare to update
awsd sdn connector AWS_SDN start updating
aws curl response err, 403
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>UnauthorizedOperation</Code><Message>You are not
authorized to perform this
operation.</Message></Error></Errors><RequestID>8403cc11-b185-41da-ad6d-
23bb4db7d00a</RequestID></Response>
awsd curl failed 403
awsd sdn connector AWS_SDN failed to get instance list
aws curl response err, 403
{"Message":"User: arn:aws:iam::956224459807:user/jcarcavallo is not authorized to
perform: eks:ListClusters on resource: arn:aws:eks:us-east-
1:956224459807:cluster/*"}
awsd sdn connector AWS_SDN get EKS cluster list failed
awsd sdn connector AWS_SDN list EKS cluster failed
awsd sdn connector AWS_SDN start updating IP addresses
awsd sdn connector AWS_SDN finish updating IP addresses
awsd reap child pid: 569
In this case, you must configure power user access for the current administrator in the AWS management console:
e. In the Filter field, add the desired filters. The following filters are supported:
AZ placement.availabilityzone us-east-1a
VPC ID VpcId
next
edit "aws-eks1"
set type dynamic
set sdn "<connector-name>"
set filter "K8S_Region=us-west-2"
next
end
3. Confirm that the AWS SDN connector resolves dynamic firewall IP addresses using the configured filter:
config firewall address
edit "aws-ec2"
set type dynamic
set sdn "<connector-name>"
set filter "SecurityGroupId=sg-05f4749cf84267548"
set sdn-addr-type public
config list
edit "34.222.246.198"
next
edit "54.188.139.177"
next
edit "54.218.229.229"
next
end
next
edit "aws-eks1"
set type dynamic
set sdn "<connector-name>"
set filter "K8S_Region=us-west-2"
config list
edit "192.168.114.197"
next
edit "192.168.167.20"
next
edit "192.168.180.72"
next
edit "192.168.181.186"
next
edit "192.168.210.107"
next
end
next
end
1. Assume that you want to boot up another instance with an IP address of 34.222.246.178, which is currently
stopped. This instance belongs to the security group that the aws-ec2 address is filtering for. In the AWS
management portal, start the instance.
2. Verify that the instance is running.
3. At this point, running show again shows the SDN connector has automatically populated and added the
34.222.246.178 instance.
config firewall address
edit "aws-ec2"
set type dynamic
set sdn "<connector-name>"
set filter "SecurityGroupId=sg-05f4749cf84267548"
FortiOS automatically updates dynamic addresses for Azure using Azure SDN connector, including mapping attributes
from Azure instances to dynamic address groups in FortiOS.
d. Click OK.
2. Create a dynamic firewall address for the Azure connector.
a. Go to Policy & Objects > Addresses and click Create New > Address.
b. From the Type dropdown list, select Dynamic.
c. From the Sub Type dropdown list, select Fabric Connector Address.
d. From the SDN Connector dropdown list, select the Azure SDN connector.
e. In the Filter field, add filters as desired. The Azure SDN connector supports the following filters:
l vm=<VM name>
l securitygroup=<nsg id>
l vnet=<VNet id>
l subnet=<subnet id>
l tag.<key>=<value>
l servicetag=<value>
l tag.<key>=<value>
f. Click OK.
g. Hover the cursor over the address name to see the dynamic IP addresses that the connector resolves.
Cisco ACI (Application Centric Infrastructure) SDN connectors can be used in dynamic firewall addresses.
The Fortinet SDN Connector for Cisco ACI and Nuage Networks is a standalone connector that connects to SDN
controllers within Cisco ACI and Nuage Networks. You must configure a connection to the Fortinet SDN connector in
FortiOS to query the dynamic addresses.
To verify the dynamic firewall IPs are resolved by the SDN connector in the GUI:
To verify the dynamic firewall IPs are resolved by the SDN connector in the CLI:
ClearPass Policy Manager (CPPM) is a network access system that can send information about authenticated users to
third party systems, such as a FortiGate or FortiManager.
In this example, communications are established between CPPM and FortiManager, and then the FortiManager
forwards information to a managed FortiGate. On the FortiGate, the user information can be used in firewall policies and
added to FSSO dynamic addresses.
Establish communications between FortiManager and CPPM so that FortiManager can synchronize CPPM user groups.
See Creating a ClearPass connector in the FortiManager Administration Guide.
5. Click OK.
To add the local FSSO user group to a firewall policy in the GUI:
3. Click in the Source field and add the fsso-group user group.
To add the local FSSO user group to a firewall policy in the CLI:
Verification
To verify that a user was added to the FSSO list on the FortiGate:
The user group cp_test_FSSOROLE is listed separately because the user is a member of that group on the CPPM.
FortiOS automatically updates dynamic addresses for GCP using a GCP SDN connector, including mapping attributes
from GCP instances to dynamic address groups in FortiOS.
Once the connector is successfully configured, a green indicator appears at the bottom right corner. If the indicator
is red, the connector is not working. See Troubleshooting GCP SDN Connector.
4. Create a dynamic firewall address for the configured GCP SDN connector:
a. Go to Policy & Objects > Addresses. Click Create New, then select Address.
b. Configure the address:
i. Name: Enter the desired name.
ii. Type: Select Dynamic.
iii. Fabric Connector Type: Select Google Cloud Platform (GCP).
iv. Filter: The SDN connector automatically populates and updates only instances that match this filtering
condition. Currently GCP supports the following filters:
l id=<instance id> : This matches an VM instance ID.
l label.<gcp label key>=<gcp label value> : This matches a free form GCP label key and
its value.
In the example, the filter is set as 'network=default & zone=us-central-1f’. This configuration
populates all IP addresses that belong to the default network in the zone us-central-1f.
You can set filtering conditions using multiple entries with AND ("&") or OR ("|"). When both AND and OR
are specified, AND is interpreted first, then OR.
Note that wildcards (such as the asterisk) are not allowed in filter values.
v. Click OK.
The address has been created. Wait for a few minutes before the setting takes effect. You will know that the
address is in effect when the exclamation mark disappears from the address entry. When you hover over the
address, you can see the list of populated IP addresses.
If the exclamation mark does not disappear, check the address settings.
FortiOS can automatically update dynamic addresses for IBM Cloud using an SDN connector.
d. Click OK.
e. Click Create New, then select IBM Cloud.
f. Configure the connector for computer generation 2:
g. Click OK.
2. Create dynamic firewall addresses for the configured connectors:
a. Go to Policy & Objects > Addresses.
b. Click Create New > Address.
c. From the Type dropdown list, select Dynamic.
d. From the Sub Type dropdown list, select Fabric Connector Address.
e. From the SDN Connector dropdown list, select the IBM SDN connector.
f. In the Filter field, add the desired filters. The following filters are supported:
l <InstanceId>
l <InstanceName>
l <ImageId>
l <ImageName>
l <Architecture>
l <Profile>
l <Vpc>
l <Zone>
l <Subnet>
l <ResourceGroup>
g. Click OK.
h. Click Create New > Address.
i. Repeat the process for computer generation 2:
j. Click OK.
3. Ensure that the connectors resolve dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses.
b. Hover over the addresses created in step 2 to see a list of IP addresses that the connector has resolved:
edit "10.241.128.5"
next
edit "10.241.129.4"
next
edit "52.117.126.69"
next
end
next
end
The following topics provide information about configuring Kubernetes SDN connectors:
l AliCloud Kubernetes SDN connector using access key on page 2333
l AWS Kubernetes (EKS) SDN connector using access key on page 2335
l Azure Kubernetes (AKS) SDN connector using client secret on page 2338
l GCP Kubernetes (GKE) SDN connector using service account on page 2340
l Oracle Kubernetes (OKE) SDN connector using certificates on page 2343
l Private cloud K8s SDN connector using secret token on page 2345
When an AliCloud SDN connector is configured, dynamic address objects can support Kubernetes filters based on
cluster, service, node, pod, and more.
The following address filters can be applied:
l K8S_Cluster
l K8S_Namespace
l K8S_ServiceName
l K8S_NodeName
l K8S_PodName
l K8S_Region
l K8S_Zone
l K8S_Label
3. Confirm that the AliCloud SDN connector resolves dynamic firewall IP addresses using the configured filter:
config firewall address
edit "ali_add1"
show
config firewall address
edit "ali_add1"
set uuid c48e4f00-5435-51eb-0547-aced5cf80f1f
set type dynamic
set sdn "ali1"
set color 10
set filter "K8S_Cluster=zhmcluster1"
config list
edit "10.0.0.28"
next
edit "10.0.0.29"
next
edit "10.0.0.30"
next
...
end
next
end
next
end
AWS SDN connectors support dynamic address groups based on AWS Kubernetes (EKS) filters.
1. Go to Security Fabric > External Connectors. Click Create New, then select Amazon Web Services (AWS).
Configure the SDN connector as desired. See AWS SDN connector using certificates on page 2315
2. Go to Policies & Objects > Addresses. Click Create New > Address to create a dynamic firewall address for the
configured SDN connector using the supported Kubernetes filter.
3. From the Type dropdown list, select Dynamic.
4. From the Sub Type dropdown list, select Fabric Connector Address.
5. From the SDN Connector dropdown list, select the desired SDN connector.
6. In the Filter field, add the desired filters. The following filters are supported:
Filter Description
Azure SDN connectors support dynamic address groups based on Azure Kubernetes (AKS) filters.
2. Create a dynamic firewall address for the configured K8s SDN connector:
a. Go to Policy & Objects > Addresses.
b. Click Create New, then select Address.
c. From the Type dropdown list, select Dynamic.
d. From the Sub Type dropdown list, select Fabric Connector Address.
e. From the SDN Connector dropdown list, select the desired SDN connector.
f. In the Filter field, add the desired filter. The following filters are supported:
Filter Description
Filter Description
In this example, the address is configured to automatically populate and update IP addresses only for
instances that belong to the zhmKC cluster:
Google Cloud Platform (GCP) SDN connectors support dynamic address groups based on GCP Kubernetes Engine
(GKE) filters.
1. Go to Security Fabric > External Connectors, and configure an SDN connector for GCP.
2. Go to Policies & Objects > Addresses and create a dynamic firewall address for the configured SDN connector
using the supported Kubernetes filter.
3. To filter out the Kubernetes IP addresses, select the address filter or filters. The following filters are supported:
Filter Description
In this example, the GCP SDN connector will automatically populate and update IP addresses only for instances
that belong to the zhm-kc3 cluster:
OCI SDN connectors support dynamic address groups based on Oracle Kubernetes (OKE) filters.
2. Create dynamic firewall addresses for the configured SDN connector with supported Kubernetes filter:
a. Go to Policy & Objects > Addresses.
b. Click Create New, then select Address.
c. In the Filter field, select the desired filters. The following filters are supported:
Filter Description
FortiOS automatically updates dynamic and cluster IP addresses for Kubernetes (K8s) by using a K8s SDN connector,
enabling FortiOS to manage K8s pods as global address objects, as with other connectors. This includes mapping the
following attributes from K8s instances to dynamic address groups in FortiOS:
Filter Description
Label.XXX Filter service or node IP addresses with the given label XXX. For example: K8S_
Label.app=nginx.
FortiOS 6.2.3 and later collect cluster IP addresses in addition to external IP addresses for exposed K8s services.
There is no maximum limit for the number of IP addresses populated with the filters.
c. Click OK.
To verify the SDN connector resolves the dynamic firewall IP addresses in the GUI:
To verify the SDN connector resolves the dynamic firewall IP addresses in the CLI:
FortiOS automatically updates dynamic addresses for Nutanix using an Nutanix SDN connector, including mapping the
following attributes from Nutanix instances to dynamic address groups in FortiOS:
l Cluster name
l Cluster UUID
l Description
l Host name
l Host UUID
l Hypervisor type
l Image name
l Image UUID
l Subnet name
l Subnet UUID
l VM name
l VM UUID
next
end
next
end
You can configure SDN connector integration with Oracle Cloud Infrastructure (OCI).
4. Click OK.
5. At this stage, you must register the certificate's fingerprint to the specified OCI user.
a. Go to the OCI user, then API Keys > Add Public Key.
b. If you selected the Fortinet_Factory certificate in step 2f, do the following:
i. In FortiOS, go to System > Certificate. Select Fortinet_Factory, then click Download.
ii. You now have the Fortinet_Factory.cer file. Create a public key file in PEM format from it, using a freely
available tool of your choice such as OpenSSL.
c. Copy and paste the content of the certificate PEM key file in the Add Public Key window in OCI. Click Add.
8. Click OK.
2. Create a dynamic firewall address for the SDN connector with a supported filter:
config firewall address
edit "oci-address-1"
set type dynamic
set sdn "oci1"
set filter "CompartmentName=DevelopmentEngineering"
next
end
To confirm that dynamic firewall addresses are resolved by the SDN connector:
2. In the GUI, go to Policy & Objects > Addresses and hover the cursor over the address name.
The next step is to create an address that will be used as an address group or single address that acts as the
source/destination for firewall policies. The address is based on IP addresses and contains VM instances' IP addresses.
No matter what changes occur to the instances, the SDN connector populates and updates the changes automatically
based on the specified filtering condition so that administrators do not need to reconfigure the address content manually.
Appropriate firewall policies using the address are applied to instances that are members of the address.
1. Go to Policy & Objects > Address. Click Create New, then select Address.
2. Configure the address as follows:
a. Name: Name the address as desired.
b. Type: Select Dynamic.
c. Sub Type: Select Fabric Connector Address.
d. SDN Connector: Select openstack.
e. Filter: The SDN connector automatically populates and updates only IP addresses belonging to the specified
filter that matches the condition. OpenStack Horizon connectors support the following filters:
i. id=<instance id>: This matches a VM instance ID.
ii. name=<instance name>: This matches a VM instance name.
iii. flavor=<instance flavor name>: This matches an instance flavor name.
iv. keypair=<key pair name>: This matches a key pair name.
v. network=<net name>: This matches a network name.
vi. project=<project name>: This matches a project name.
vii. availabilityzone=<zone name>: This matches an availability zone name.
viii. servergroup=<group name>: This matches a server group name.
ix. securitygroup=<security group name>: This matches a security group name.
x. metadata.<key>=<value>: This matches metadata with its key and value pair.
You can set filtering conditions using multiple entries with AND ("&") or OR ("|"). When both AND and OR are
specified, AND is interpreted first, then OR.
For example, you could enter flavor=m1.nano&project=admin. In this case, IP addresses of instances that
match both the flavor name and project name are populated. Wildcards (asterisks) are not allowed in values.
In this example, let's use project=admin, assuming the project name is admin.
5. After a few minutes, the new address takes effect. Hover your cursor on the address to see a list of IP addresses
and instances with the project name "admin".
Dynamic addresses for VMware ESXi and vCenter servers can be automatically updated by using a VMware ESXi
SDN connector, including mapping the following attributes from VMware ESXi and vCenter objects to dynamic address
groups in FortiOS:
l vmid
l host
l name
l uuid
l vmuuid
l vmnetwork
l guestid
l guestname
l annotation
2. Create a dynamic firewall address for the configured VMware ESXi SDN connector:
a. Go to Policy & Objects > Addresses and click Create New > Address.
b. Configure the address as shown, selecting the desired filter in the Filter dropdown list. In this example, the
VMware ESXi fabric connector will automatically populate and update IP addresses only for instances that
belong to VLAN80:
3. Ensure that the VMware ESXi SDN connector resolves dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses.
b. Hover over the address created in step 2 to see a list of IP addresses for instances that belong to VLAN80 as
configured in step 2:
This feature provides SDN connector configuration for VMware NSX-T manager. You can import specific groups, or all
groups from the NSX-T Manager.
Address:6.6.6.6
Address:7.7.7.7
To view the dynamic firewall IP addresses that are resolved by the SDN connector in the GUI:
1. Go to Policy & Objects > Addresses to view the IP addresses resolved by an SDN connector.
To view the dynamic firewall IP addresses that are resolved by the SDN connector in the CLI:
end
next
end
This guide shows how to configure SDN connectors and resolve dynamic firewall addresses through the configured SDN
connector in FortiOS.
FortiOS supports multiple SDN connectors including public connectors (AWS, Azure, GCP, OCI, AliCloud) and private
connectors (Kubernetes, VMware ESXi, VMware NSX, OpenStack, Cisco ACI, Nuage). FortiOS also supports multiple
instances for each type of SDN connector.
This guide uses an Azure SDN connector as an example. The configuration procedure for all supported SDN connectors
is the same. In the following topology, the FortiGate accesses the Azure public cloud through the Internet:
i. Click OK.
This process creates two SDN connector firewall addresses to associate with the configured SDN connectors.
1. Go to Policy & Objects > Addresses.
2. Click Create New > Address. Configure the first SDN connector firewall address:
a. In the Name field, enter azure-address-1.
b. From the Type dropdown list, select Dynamic.
c. From the Sub Type dropdown list, select Fabric Connector address.
d. From the SDN Connector dropdown list, select azure1.
e. For SDN address type, select Private.
f. From the Filter dropdown list, select the desired filter.
g. For Interface, select any.
h. Click OK.
3. Click Create New > Address. Configure the second SDN connector firewall address:
a. In the Name field, enter azure-address-1.
b. From the Type dropdown list, select Dynamic.
c. From the Sub Type dropdown list, select Fabric Connector address.
d. From the SDN Connector dropdown list, select azure2.
e. For SDN address type, select Private.
f. From the Filter dropdown list, select the desired filter.
g. For Interface, select any.
h. Click OK.
Run the show sdn connector status command. Both SDN connectors should appear with a status of connected.
Run the diagnose debug application azd -1 command. The output should look like the following:
Level2-downstream-D # diagnose debug application azd -1
...
azd sdn connector azure1 start updating IP addresses
azd checking firewall address object azure-address-1, vd 0
IP address change, new list:
10.18.0.4
...
To restart the Azure SDN connector daemon, run the diagnose test application azd 99 command.
When configuring dynamic address mappings for filters in SDN connectors for Azure, GCP, OpenStack, Kubernetes,
and AliCloud, FortiGate can query the filters automatically.
Wildcards are supported for SDN connectors when configuring dynamic address filters.
The following SDN connector types are currently supported:
l AWS
l Azure
l Google Cloud Platform
l Kubernetes
l OpenStack
l Oracle Cloud Infrastructure
l VMware ESXi
d. Click OK.
3. In the address table, hover over the address to view what IPs it resolves to.
2. Create the dynamic firewall address and verify where the IP addresses resolve to:
config firewall address
edit "aws-address-1"
set type dynamic
set sdn "aws1"
set filter "Tag.Name=aws*"
set sdn-addr-type public
config list
edit "18.234.167.123"
next
edit "3.81.41.167"
next
edit "52.87.157.127"
next
end
next
end
Endpoint/Identity connectors
SSO fabric connectors integrate SSO authentication into the network. This allows users to enter their credentials only
once, and have those credentials reused when accessing other network resources through the FortiGate.
The following fabric connectors are available:
l Fortinet single sign-on agent on page 2372
l Poll Active Directory server on page 2373
l Symantec endpoint connector on page 2374
l RADIUS single sign-on agent on page 2380
l Exchange Server connector on page 2383
4. Fill in the Name, and Primary FSSO Agent server IP address or name and Password.
5. Optionally, add more FSSO agents by clicking the plus icon.
6. Optionally, enable Trusted SSL certificate and select or import a certificate.
7. Select the User group source:
l Collector Agent: User groups will be pushed to the FortiGate from the collector agent. Click Apply & Refresh to
then click Edit to select the Users, Groups, and Organizational Units. Optionally, enable Proactively retrieve
from LDAP server and configure the Search filter and Interval.
8. Click OK.
The FortiGate unit can authenticate users and allow them network access based on groups membership in Windows
Active Directory (AD).
4. Fill in the Server IP/Name, User, and Password for the AD server.
5. Select the LDAP server from the list.
6. If necessary, disable Enable Polling. This can be used to temporarily stop the FortiGate from polling security event
logs on the Windows logon server, for troubleshooting purposes.
7. Click OK.
With the Fabric connector for Symantec Endpoint Protection Manager (SEPM), you can use the client IP information
from SEPM to assign to dynamic IP addresses on FortiOS.
When communication between FortiGate and SEPM is established, FortiGate polls every minute for updates via TLS
over port 8446. You can use the CLI to change the default one minute polling interval.
For example, you can create a dynamic Fabric Connector IP address subtype and use it in firewall policies as the source
address. The dynamic IP address contains all IP addresses sent by SEPM.
This example shows a dynamic IP address with SEPM and one client PC managed by SEPM using FortiGate as the
default gateway.
1. In SEPM, create client packages for client hosts and group them into SEPM groups.
You can install packages locally on clients or download them directly from SEPM.
2. When a package is installed on the client host, the host is considered managed by SEPM.
Even if the host has multiple interfaces, only one IP per host is displayed.
f. Click OK.
When the connection is established, you can see a green up arrow in the bottom right of the card. You might
need to refresh your browser to see the established connection.
2. Go to Policy & Objects > Addresses and click Create New > Address:
a. Fill in the address Name.
b. Set Type to Dynamic.
c. Set Sub Type to Fabric Connector Address.
d. Set SDN Connector to the fabric connector that you just created.
f. Click OK.
Filter options are only available for active computers that are configured and registered
in SEPM. Free-form filters can be created manually by clicking Create and entering the
filter, in the format: filter_type=value.
Possible manual filter types are: GroupName, GroupID, ComputerName,
ComputerUUID, and OSName. For example: GroupName=MyGroup.
3. Go to Policy & Objects > Addresses and hover the cursor over the name of the new address to see the resolved IP
addresses of the host.
4. Go to Policy & Objects > Firewall Policy, click Create New, and add a policy that uses the dynamic IP address.
1. On the client PC, check that it is managed by SEPM to access the Internet.
2. On the FortiGate, you can check in Dashboard > FortiView Sources and Log & Report > Forward Traffic.
Because this traffic is not authenticated traffic but is based on source IP address only, it is
not shown in the GUI firewall monitor or in the diagnose firewall auth list CLI
command.
Output is sent every minute (default). All IPv4 learned from SEPM. IPv6 also sent but not
yet supported.
With RADIUS single sign-on (RSSO), a FortiGate can authenticate users who have authenticated on a remote RADIUS
server. Based on which user group the user belongs to, the security policy applies the appropriate UTM profiles.
The FortiGate does not interact with the remote RADIUS server; it only monitors RADIUS accounting records that the
server forwards (originating from the RADIUS client). These records include the user IP address and user group. The
remote RADIUS server sends the following accounting messages to the FortiGate:
Message Action
Start If the information in the start message matches the RSSO configuration on the
FortiGate, the user is added to the local list of authenticated firewall users.
Stop The user is removed from the local list of authenticated firewall users because the
user session no longer exists on the RADIUS server.
You can configure an RSSO agent connector using the FortiOSGUI; however, in most cases, you will need to use the
CLI. There are some default options you may need to modify, which can only be done in the CLI.
The value entered in Use RADIUS Shared Secret must be identical to what the remote
RADIUS server uses to authenticate when it sends RADIUS accounting messages to
the FortiGate.
You should enable Send RADIUS Responses because some RADIUS servers
continue to send the same RADIUS accounting message several times if there is no
response.
g. Click OK.
2. Edit the network interface:
a. Go to Network > Interfaces.
b. Double-click the interface that will receive the RADIUS accounting messages. The Edit Interface pane opens.
c. In the Administrative Access section, select the RADIUS Accounting checkbox. This will open listening for port
1813 on this interface. The FortiGate will then be ready to receive RADIUS accounting messages.
d. Click OK.
3. Create a local RSSO user group:
a. Go to User & Authentication > User Groups.
b. Click Create New.
c. Enter the group name.
d. For the Type field, click RADIUS Single-Sign-ON (RSSO).
e. Enter a value for RADIUS Attribute Value.
This value by default is the class attribute. The FortiGate uses the content of this attribute in RADIUS
accounting start messages to map a user to a FortiGate group, which then can be used in firewall policies.
In this example configuration, the FortiGate will only add a remote RADIUS user to the local firewall user list if
the class attribute in the RADIUS accounting START message contains the value group1.
If your users are in multiple groups, you will need to add multiple local RSSO user
group.
If the RADIUS attribute value used to map users to a local RSSO group is different than
the RADIUS attribute in the RADIUS accounting messages forwarded by the server,
you must change it in the CLI.
f. Click OK.
4. Edit the local RSSO agent to modify default options using the CLI.
For example, the default value for rsso-endpoint-attribute might work in common remote access scenarios
where users are identified by their unique Calling-Station-Id, but in other scenarios the user name might be in
a different attribute.
config user radius
edit "Local RSSO Agent"
set rsso-endpoint-attribute <attribute>
set sso-attribute <attribute>
next
end
Verification requires a working remote RADIUS server configured for RADIUS accounting forwarding and wireless or
wired clients that use RADIUS for user authentication.
For a quick test, you can use one of the publicly available RADIUS test tools to send RADIUS accounting start and stop
messages to the FortiGate. You can also use radclient.
1. In radclient, enter the RADIUS attributes. These attributes are then executed with the FortiGate IP parameters
(sends accounting messages to port 1813) and shared password you configured. -x is used for verbose output:
root@ControlPC:~# echo "Acct-Status-Type =Start,Framed-Ip-Address=10.1.100.185,User-
Name=test2,Acct-Session-Id=0211a4ef,Class=group1,Calling-Station-Id=00-0c-29-44-BE-B8" |
radclient -x 10.1.100.1 acct 123456
Sending Accounting-Request of id 180 to 10.1.100.1 port 1813
Acct-Status-Type = Start
Framed-IP-Address = 10.1.100.185
User-Name = "test2"
Acct-Session-Id = "0211a4ef"
Class = 0x67726f757031
Calling-Station-Id = "00-0c-29-44-BE-B8"
rad_recv: Accounting-Response packet from host 10.1.100.1 port 1813, id=180, length=20
root@ControlPC:~#
2. Verify that the user is in the local firewall user list with the correct type (rsso) and local firewall group (rsso-
group1):
# diagnose firewall auth l
10.1.100.185, test2
type: rsso, id: 0, duration: 5, idled: 5
flag(10): radius
server: vdom1
packets: in 0 out 0, bytes: in 0 out 0
group_id: 3
group_name: rsso-group-1
FortiGate can collect additional information about authenticated users from corporate Microsoft Exchange Servers. After
a user logs in, the additional information can be viewed in various parts of the GUI.
The Exchange connector must be mapped to the LDAP server that is used for authentication.
The following attributes are retrieved:
Kerberos Key Distribution Center (KDC) automatic discovery is enabled by default. The FortiGate must be able to use
DNS to resolve the KDC IP addresses, otherwise the FortiGate will be unable to retrieve additional user information from
the Exchange Server.
KDC automatic discovery can be disabled, and one or more internal IP addresses that the FortiGate can reach can be
configured for KDC.
The Override server IP address is enabled when the IP address of the Exchange server cannot be resolved by DNS and
must be entered manually.
If Auto-discover KDC is disabled, one or more KDC IP addresses can be manually entered.
8. Click OK.
5. Click OK.
Verification
To check the collected information after the user has been authenticated:
1. In the GUI, go to Dashboard > Users & Devices, expand the Firewall Users widget, and hover over the user name.
2. In the CLI, run the following diagnose command:
# diagnose wad user info 20 test1
'username' = 'test1'
'sourceip' = '10.1.100.185'
'vdom' = 'root'
'cn' = 'test1'
'givenName' = 'test1'
'sn' = 'test101'
'userPrincipalName' = '[email protected]'
'telephoneNumber' = '604-123456'
'mail' = '[email protected]'
'thumbnailPhoto' = '/tmp/wad/user_info/76665fff62ffffffffffffffffffff75ff68fffffffffa'
'company' = 'Fortinet'
'department' = 'Release QA'
'memberOf' = 'CN=group321,OU=Testing,DC=Fortinet-FSSO,DC=COM'
'memberOf' = 'CN=g1,OU=Testing,DC=Fortinet-FSSO,DC=COM'
'memberOf' = 'CN=group21,OU=Testing,DC=Fortinet-FSSO,DC=COM'
'memberOf' = 'CN=group1,OU=Testing,DC=Fortinet-FSSO,DC=COM'
'manager' = 'CN=test6,OU=Testing,DC=Fortinet-FSSO,DC=COM'
'streetAddress' = 'One Backend Street 1901'
'l' = 'Burnaby'
'st' = 'BC'
'postalCode' = '4711'
'co' = 'Canada'
'accountExpires' = '9223372036854
If the results are not as expected, verify what information FortiGate can collect from the Exchanger Server:
# diagnose test application wad 2500
# diagnose test application wad 162
Threat feeds
Threat feeds dynamically import an external block list from an HTTP server in the form of a plain text file, or from a
STIX/TAXII server. Block lists can be used to enforce special security requirements, such as long term policies to always
block access to certain websites, or short term requirements to block access to known compromised locations. The lists
are dynamically imported, so that any changes are immediately imported by FortiOS.
There are four types of threat feeds:
FortiGuard The file contains one URL per line. It is available as a Remote Category in Web Filter profiles,
Category SSL inspection exemptions, and proxy addresses. See Web rating override on page 1238 for
more information.
Example:
http://example/com.url
https://example.com/url
http://example.com:8080/url
IP Address The file contains one IP/IP range/subnet per line. It is available as an External IP Block List in
DNS Filter profiles, and as a Source/Destination in IPv4, IPv6, and proxy policies.
Example:
192.168.2.100
172.200.1.4/16
172.16.1.2/24
172.16.8.1-172.16.8.100
2001:0db8::eade:27ff:fe04:9a01/120
2001:0db8::eade:27ff:fe04:aa01-2001:0db8::eade:27ff:fe04:ab01
Domain Name The file contains one domain per line. Simple wildcards are supported. It is available as a
Remote Category in DNS Filter profiles. See External resources for DNS filter on page 2393 for
more information.
Example:
mail.*.example.com
*-special.example.com
www.*example.com
example.com
Malware Hash The file contains one hash per line in the format <hex hash> [optional hash
description]. Each line supports MD5, SHA1, and SHA256 hex hashes. It is automatically
used for virus outbreak prevention on antivirus profiles with external-blocklist enabled.
Note: For optimal performance, do not mix different hashes in the list. Only use one of MD5,
SHA1, or SHA256.
Example:
292b2e6bb027cd4ff4d24e338f5c48de
dda37961870ce079defbf185eeeef905 Trojan-Ransom.Win32.Locky.abfl
3fa86717650a17d075d856a41b3874265f8e9eab Trojan-Ransom.Win32.Locky.abfl
c35f705df9e475305c0984b05991d444450809c35dd1d96106bb8e7128b9082f
Trojan-Ransom.Win32.Locky.abfl
See External malware block list on page 1040 for an example.
To determine the external resource table size limit for your device:
# print tablesize
...
system.external-resource: 0 256 512
...
For this device, a FortiGate 60E, the global limit is 512 and the limit per VDOM is 256.
URI of external resource Enter the link to the external resource file. HTTP, HTTPS, and STIX protocols
are supported.
HTTP basic authentication Enable/disable basic HTTP authentication. When enabled, enter the
username and password in the requisite fields.
Refresh Rate The time interval to refresh the external resource, in minutes (1 - 43200,
default = 5).
The applicable threat feed will be triggered to refresh between 0 minutes and
the configured value. When the refresh is triggered, if another task is being
processed be the schedule worker, the refresh task will be added to the queue.
5. Click OK.
Parameters marked with an asterisk (*) are mandatory and must be filled in. Other parameters either have default values
or are optional.
When multi VDOM mode is enabled, threat feed external connectors can be defined in the
global VDOM or within a VDOM. See Threat feed connectors per VDOM on page 2397 for
example configurations.
Update history
To review the update history of a threat feed, go to Security Fabric > External Connectors, select a feed, and click Edit.
The Last Update field shows the date and time that the feed was last updated.
Click View Entries to view the current entries in the list.
A FortiGate can pull malware threat feeds from FortiClient EMS, which in turn receives malware hashes detected by
FortiClients. The malware hash can be used in an antivirus profile when AV scanning is enabled with block or monitor
actions. See Malware threat feed from EMS on page 1043 for an example.
You can use the external blocklist (threat feed) for web filtering, DNS, and in firewall policies.
Sample configuration
In this example, an IP address blocklist connector is created so that it can be used in a firewall policy.
The blocklist can now be used in web filter and DNS profiles, and in firewall policies.
5. Click OK.
The malware hash threat feed connector supports a list of file hashes that can be used as part of virus outbreak
prevention.
This example retrieves a malware hash from an Amazon S3 bucket, and then enables malware block lists in a antivirus
profile.
5. Click OK.
6. Edit the connector, then click View Entries to view the hash list.
7. Go to Security Profiles > AntiVirus and create a new profile, or edit an existing one.
8. Enable Use external malware block list.
9. Click the + and select AWS_Malware_Hash from the list.
10. Click OK.
Logs
The filehash and filehashsrc are included in outbreak prevention detection event logs.
This example shows the log generated when a file is detected by external malware hash list outbreak prevention:
1: date=2018-07-30 time=13:59:41 logid="0207008212" type="utm" subtype="virus"
eventtype="malware-list" level="warning" vd="root" eventtime=1532984381 msg="Blocked by
local malware list." action="blocked" service="HTTP" sessionid=174963 srcip=192.168.101.20
dstip=172.16.67.148 srcport=37045 dstport=80 srcintf="lan" srcintfrole="lan" dstintf="wan1"
dstintfrole="wan" policyid=1 proto=6 direction="incoming" filename="mhash_block.com"
checksum="90f0cb57" quarskip="No-skip" virus="mhash_block.com" dtype="File Hash"
filehash="93bdd30bd381b018b9d1b89e8e6d8753" filehashsrc="test_list"
url="http://172.16.67.148/mhash_block.com" profile="mhash_test" agent="Firefox/43.0"
analyticssubmit="false"
External resources provides the ability to dynamically import an external block list into an HTTP server. This feature
enables the FortiGate to retrieve a dynamic URL, domain name, IP address, or malware hash list from an external HTTP
server periodically. The FortiGate uses these external resources as the web filter's remote categories, DNS filter's
remote categories, policy address objects, or antivirus profile's malware definitions. If external resources are updated,
FortiGate objects are also updated dynamically.
External resource is divided into four types:
l URL list (type = category)
l Domain name list (type = domain)
l IP address list (type = address)
l Malware hash list (type = malware)
The DNS filter profile can use two types of external resources: domain type (domain name list) and address type (IP
address list).
When a domain type external resource is configured, it is treated as a remote category in the DNS filter profile. If the
domain name in DNS query matches the entry in this external resource file, it is treated as the remote category and
follows the action configured for this category in DNS filter profile.
When an address type external resource is configured, it can be enabled as external-ip-blocklist in DNS filter profile. If a
DNS resolved IP address in DNS response matches the entry in the external-ip-blocklist, this DNS query is blocked by
the DNS filter.
For external resources file format and limits, see External resources file format on page 2387.
In the CLI, you can configure external resources files in an external HTTP server. Under global, configure the external
resources file location and specify the resource type.
In each VDOM, the domain type external resource can be used in the DNS filter as remote category. In this example, the
domain name list in the Ext-Resource-Type-as-Domain-1.txt file is treated as a remote category (category ID 194). The
IP address list in the Ext-Resource-Type-as-Address-1.txt file can be applied in the DNS filter as an external-ip-
blocklist. If the DNS resolved IP address matches any entry in the list in that file, the DNS query is blocked.
end
end
set block-botnet enable
set external-ip-blocklist "Ext-Resource-Type-as-Address-1"
next
end
config firewall policy
edit 1
set name "DNSFilter"
set srcintf "port10"
set dstintf "port9"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set utm-status enable
set logtraffic all
set dnsfilter-profile "default"
set profile-protocol-options "protocol"
set ssl-ssh-profile "protocols"
set nat enable
next
end
To configure, edit, or view the entries for external resources in the GUI:
5. Click OK.
6. Double-click the Threat Feeds Object you just configured to open the Edit page.
7. Click View Entries to view the entry list in the external resources file.
8. Go to VDOM > Security Profiles > DNS Filter and open a DNS filter profile. The configured external resources
displays, and you can apply it in each DNS filter profile (remote category or external IP block lists).
Log sample
Remote categories
Go to VDOM > Log & Report > DNS Query. Some domains that match the remote category list are rated as remote
category, overriding their original domain rating.
Log example:
Go to VDOM > Log & Report > DNS Query. If the DNS query resolved IP address matches the entry in the external-
ip-blocklist, the DNS query is blocked.
Log example:
When multi-VDOM mode is enabled, a threat feed external connector can be defined in global or within a VDOM. Global
threat feeds can be used in any VDOM, but cannot be edited within the VDOM. FortiGuard category and domain name-
based external feeds have an added category number field to identify the threat feed. The threat feed name in global
must start with g-. Threat feed names in VDOMs cannot start with g-.
FortiGuard category and domain name-based external feed entries must have a number assigned to them that ranges
from 192 to 221. This number can be assigned to both external feed types. However, when a category number is used
under a global entry, such as 192 with the name g-cat-192, this category number cannot be used in any other global or
VDOM entries. If a category is used under a VDOM entry, such as 192 under VDOM1 with the name cat-192, the
category 192 can be used in another VDOM or root with the name cat-192.
A thread feed connector can only be used in profiles in the VDOM that it was created in. Global connectors can be used
in all VDOMs.
Each VDOM can have a maximum of 256 thread feed entries. But in total, a FortiGate can only have 511 thread feed
entries.
config global
config system external-resource
edit "g-category"
set status enable
set type category
set category 192
set comments ''
set resource "http://172.16.200.55/external-resource-test/513-FDGCategory.txt"
set refresh-rate 5
next
end
end
config vdom
edit vd1
config system external-resource
edit "vd1-domain"
set status enable
set type domain
set category 193
set comments ''
set resource "http://172.16.200.55/external-resource-test/513-Domain.txt"
set refresh-rate 5
next
end
next
end
2. In the VDOM, configure a firewall policy with the external address as the destination address:
config vdom
edit vd1
config firewall policy
edit 1
set name "test"
set srcintf "port10"
set dstintf "port9"
set srcaddr "all"
set dstaddr "vd1-address"
set action accept
set schedule "always"
set service "ALL"
set profile-protocol-options "protocol"
set nat enable
next
end
next
end
Since this firewall policy is configured under vd1, g-address can also be set as the
dstaddr.
The FortiGate's external threat feeds support feeds that are in the STIX/TAXII format. Use the stix:// prefix in the URI
to denote the protocol.
All external threat feeds support the STIX format. In this example, a FortiGuard Category threat feed in the STIX format
is configured.
To configure a FortiGuard Category threat feed in the STIX format in the GUI:
4. Click OK.
5. Edit the connector, and click View Entries in the right side bar to view the retrieved entries.
To configure a FortiGuard Category threat feed in the STIX format in the CLI:
If the connector is used in webfilter that blocks category 194, the traffic that matches the retrieved URLs, such as
rsiuk.co.uk, is blocked:
1: date=2021-10-06 time=18:07:46 eventtime=1633568867163763708 tz="-0700" logid="0316013056"
type="utm" subtype="webfilter" eventtype="ftgd_blk" level="warning" vd="vd1" policyid=1
sessionid=174974 srcip=10.1.100.12 srcport=48284 srcintf="port2" srcintfrole="undefined"
srcuuid="c6753ba2-231b-51ec-1675-090f2b5f1384" dstip=78.129.255.151 dstport=443
dstintf="port1" dstintfrole="undefined" dstuuid="c6753ba2-231b-51ec-1675-090f2b5f1384"
proto=6 service="HTTPS" hostname="rsiuk.co.uk" profile="test" action="blocked"
reqtype="direct" url="https://rsiuk.co.uk/" sentbyte=75 rcvdbyte=0 direction="outgoing"
FortiExplorer for Apple TV allows you to use a TV screen to monitor your entire Security Fabric.
FortiExplorer for Apple TV is an analysis tool that provides easy to use NOC and SOC monitoring capabilities. The app
features real-time data traffic, visual alerts, as well as a general overview of hardware devices, operating systems, and
interfaces. The monitor also provides a wireless health summary of your entire network across multiple buildings. If an
access point goes offline, you will be notified about the network's health. After the issues are resolved, you will
immediately see the health update on your screen.
Download FortiExplorer for Apple TV from the app store on Apple TV. After the app is installed, add devices using the
Apple TV remote or by sharing a login profile with FortiExplorer. Once the devices are added, you can use FortiExplorer
for Apple TV to view real-time data in the Network Operations Center, Security Operations Center, and Software-Defined
Branch.
1. Download the app and add devices to FortiExplorer for Apple TV.
You can add devices by sharing a login profile with FortiExplorer or logging into the device directly on FortiExplorer
for Apple TV.
2. View the physical topology of the Fabric to identify risks
3. View the Fabric components as seen on the root FortiGate.
4. View an executive summary of the three largest areas of security focus in the Security Fabric.
5. View data collected by FortiAnalyzer on the endpoints on your network.
6. View vulnerability data collected by FortiClient EMS.
7. Use the Software-Defined Branch module to monitor interface SD-WAN usage and associated service level
agreements.
In this example, you have configured your FortiGates, FortiAnalyzer and other devices in your Security Fabric. Now you
want to use FortiExplorer for Apple TV to display the status of the devices on a TV in your Network Operation Center or
Security Operation Center.
Topology
This topology has a Headquarter and two Branches. Within the Headquarter is the Enterprise Core and two FortiGates
acting as ISFWs. In addition, an on-premise FortiAnalyzer collects all logging information from the fabric devices. The
FortiClient EMS manages all the endpoints within the topology.
The two branches are configured with SD-WAN with VPN overlays to the Enterprise Core. Traffic is steered towards the
overlays and underlays based on SD-WAN Rules.
Using FortiExplorer for Apple TV, you will be able to monitor the different components in this topology.
To take advantage of the views in the FortiExplorer for Apple TV, you should configure:
l Security Fabric on all FortiGates. See Configuring the root FortiGate and downstream FortiGates on page 2093.
l FortiAnalyzer Logging. See Configuring FortiAnalyzer on page 2100.
l FortiClient EMS. See Configuring FortiClient EMS on page 2118
By adding the root FortiGate, you can view the entire topology and navigate to branch FortiGates in the SD-WAN view. If
you are already using FortiExplorer on a mobile device, you can connect the same FortiGate device to Apple TV by
sharing the login credentials on both devices. Alternatively, you can manually connect to your root FortiGate directly from
the app.
To share login credentials between FortiExplorer and FortiExplorer for Apple TV:
1. Connect the FortiExplorer and FortiExplorer for Apple TV devices to the same network.
2. On FortiExplorer for Apple TV, click New FortiGate.
3. In FortiExplorer, go to My Fabric.
4. Swipe right on the device you want to share, and tap Share Login Profile.
6. On Apple TV, click Accept. FortiExplorer for Apple TV confirms the request and proceeds to the device main menu.
1. In the Devices menu, click New FortiGate. The Login to FortiGate dialog box is displayed.
2. In the IP Address/Host Name field, take one of the following actions:
l Enter the device IP address and port, if not using the default admin port 443
l Enter the full host name including the domain. Enter port if not using the default admin port 443.
If the IP or hostname is not defined in the CN or SAN field of your certificate, you will
receive a prompt that "Your connection is not private". You may choose to continue with
your connection.
Use the Fabric Topology monitor to view the physical topology of the Fabric to identify risks. FortiGate devices with
version 6.4. and above can drilldown further to see additional information for devices such as FortiGates, FortiAPs, and
FortiSwitches.
To view the Fabric Topology monitor, go to Network Operations Center > Fabric Topology. This monitor displays the
same information as the Physical Topology on the FortiGate
Use your remote to navigate through the devices in the Fabric topology. Click a device to view the drilldown information.
To return to the default view, click the Menu button.
Use the Fabric Overview monitor to view the Fabric components as seen on the Dashboard of the Fabric Root FortiGate
in the example topology. Each device must be authorized and be part of the Fabric.
For information about configuring the Security Fabric, see Fortinet Security Fabric on page 2089
To view the Fabric Overview monitor, go to Network Operations Center > Fabric Overview.
The Security Fabric monitor has multiple panes. To see data populated on the panes, ensure that proper configurations
are applied on the Fabric devices:
Fabric Connectors Displays external SDN connectors that are Configure Security Fabric > External
enabled. Connectors.
Security Fabric Displays the number of devices in the Configure Security Fabric > Fabric
Overview topology. Connectors.
Attack Surface Displays devices detected by the FortiGate Ensure Device Detection is configured on the
with a server tag. interfaces(s). Go to Network > Interfaces.
Device Inventory Displays devices based on Hardware Vendor Ensure Device Detection is configured on the
and detected OS interface(s). Go to Network > Interfaces.
Endpoint Coverage Displays the number of online devices and Ensure Device Detection is configured on the
the percentage of Unscanned, Vulnerable, interface(s). Vulnerability scan results come
and Secured devices. from FortiClient EMS. Go to Network >
Interfaces.
Device related information only corresponds to devices local to the FortiGate. Device
information from downstream FortiGates do not propagate to the Upstream FortiGate.
The Security Rating monitor is separated into three major scorecards: Security Posture, Fabric Coverage, and
Optimization, which provide an executive summary of the three largest areas of security focus in the Security Fabric.
To see the Security Rating summary, the root FortiGate and all FortiGates within the Fabric should have the proper
FortiGuard Security Rating license. Security rating is performed on the root FortiGate. Its reports are generated
periodically.
To view the Security Rating monitor, go to Network Operations Center > Security Rating.
The scorecards show an overall score of the performance and sub-categories. The point score represents the net score
for all passed and failed items in that area.
For more information about the Security Rating score, see Security Fabric score on page 2227.
The Compromised Hosts monitor leverages the data collected by FortiAnalyzer on the endpoints on your network. To
see compromised hosts, the FortiAnalyzer must have a FortiGuard Indicators of Compromise license. The IOC service
helps identify compromised hosts based on infected websites that it may have visited.
This monitor captures the same information as seen on the Compromised Hosts monitor on the FortiGate.
l The Topology View pane displays the user's location in the topology.
l The Verdict View pane displays the Malware, Detected Method, and Security Action.
The Vulnerability Monitor obtains data from FortiClient EMS. It displays vulnerabilities detected by the FortiClient
endpoint, categorized into Critical, High, Medium and Low risk. In this example, an on-premise FortiClient EMS is
connected on the root FortiGate’s Fabric Connector.
This monitor captures the same information as seen on the Top Vulnerable Endpoint Devices monitor on the FortiGate.
1. Go to Security Operations Center > Vulnerability Monitor. The monitor displays a user list and their vulnerabilities.
2. Use your remote to scroll through the user list. The vulnerability details are displayed on the right side of the monitor.
l The User Information pane displays the user's contact details and IP address.
l The Vulnerability Summary pane displays the number of vulnerabilities categorized into Critical, High, Medium
and Low risk.
l The Topology View pane displays the user's location in the topology.
l The Top Vulnerabilities pane displays the top vulnerabilities by severity.
In the example topology, the branches are configured to use SD-WAN. You can use the top-right navigation menu in the
SD-WAN monitor to navigate to the Branch FortiGate to display information about the SD-WAN.
To view the SD-WAN monitor, go to Software-Defined Branch > SD-WAN Monitor.
The SD-WAN monitor summarizes the SD-WAN members, Zones, SD-WAN Rules and health checks deployed on the
FortiGate. It shows the interface member's SD-WAN usage and its associated service level agreements. The monitor
contains a chart that shows if the ports are meeting the SLA target for bandwidth, jitter and latency per the health check
in use in each SD-WAN Rule.
Some of the SD-WAN statistics are only available in FOS 6.4.1 and higher.
1. In the SD-WAN Overview area, Use your remote to select the SD-WAN Usage pane.
2. Scroll left and right to view Bandwidth, Volume and Sessions charts for the VIRTUAL-WAN-LINK and Underlay
interfaces in the SD-WAN Zones pane.
1. In the SD-WAN Rules area, use your remote to scroll the rules pane at the left-side of the monitor.
l The Destinations pane displays the destination details.
l The Performance SLA pane displays the SLA targets for the rule.
l The SD-WAN Active Interface pane displays a checkmark next to the active interface.
2. Use your remote to navigate between the Latency, Jitter, and Packet Loss charts.
1. Use your remote to swipe to the top navigation in the monitor. Wait for the topology to load.
2. At the top-right of the monitor, select the current device.
Troubleshooting
The following topics provide troubleshooting information for the Fortinet Security Fabric:
In downstream FortiGates, the diagnose sys csf global command shows a summary of all of the connected
FortiGates in the Security Fabric.
"upstream_intf":"Branch-HQ-A",
"upstream_serial":"FGVM01TM19000001",
"parent_serial":"FGVM01TM19000001",
"parent_hostname":"admin-root",
"upstream_status":"Authorized",
"upstream_ip":22569994,
"upstream_ip_str":"10.100.88.1",
"subtree_members":[
],
"is_discovered":true,
"ip_str":"10.0.10.2",
"downstream_intf":"To-HQ-A",
"idx":1
},
{
"path":"FGVM01TM19000001:FGVM01TM19000003",
"mgmt_ip_str":"104.196.102.183",
"mgmt_port":10407,
"sync_mode":1,
"saml_role":"service-provider",
"admin_port":443,
"serial":"FGVM01TM19000003",
"host_name":"Enterprise_Second_Floor",
"firmware_version_major":6,
"firmware_version_minor":2,
"firmware_version_patch":0,
"firmware_version_build":1010,
"upstream_intf":"port3",
"upstream_serial":"FGVM01TM19000001",
"parent_serial":"FGVM01TM19000001",
"parent_hostname":"admin-root",
"upstream_status":"Authorized",
"upstream_ip":22569994,
"upstream_ip_str":"10.100.88.1",
"subtree_members":[
],
"is_discovered":true,
"ip_str":"10.100.88.102",
"downstream_intf":"port1",
"idx":2
},
{
"path":"FGVM01TM19000001:FGVM01TM19000004",
"mgmt_ip_str":"104.196.102.183",
"mgmt_port":10424,
"sync_mode":1,
"saml_role":"service-provider",
"admin_port":443,
"serial":"FGVM01TM19000004",
"host_name":"Branch_Office_02",
"firmware_version_major":6,
"firmware_version_minor":2,
"firmware_version_patch":0,
"firmware_version_build":1010,
"upstream_intf":"HQ-MPLS",
"upstream_serial":"FGVM01TM19000001",
"parent_serial":"FGVM01TM19000001",
"parent_hostname":"admin-root",
"upstream_status":"Authorized",
"upstream_ip":22569994,
"upstream_ip_str":"10.100.88.1",
"subtree_members":[
],
"is_discovered":true,
"ip_str":"10.0.12.3",
"downstream_intf":"To-HQ-MPLS",
"idx":3
},
{
"path":"FGVM01TM19000001:FGVM01TM19000005",
"mgmt_ip_str":"104.196.102.183",
"mgmt_port":10404,
"sync_mode":1,
"saml_role":"service-provider",
"admin_port":443,
"serial":"FGVM01TM19000005",
"host_name":"Enterprise_First_Floor",
"firmware_version_major":6,
"firmware_version_minor":2,
"firmware_version_patch":0,
"firmware_version_build":1010,
"upstream_intf":"port3",
"upstream_serial":"FGVM01TM19000001",
"parent_serial":"FGVM01TM19000001",
"parent_hostname":"admin-root",
"upstream_status":"Authorized",
"upstream_ip":22569994,
"upstream_ip_str":"10.100.88.1",
"subtree_members":[
],
"is_discovered":true,
"ip_str":"10.100.88.101",
"downstream_intf":"port1",
"idx":4
}
]
Example:
Examples:
# diagnose test application autod 1
autod log dumping is enabled
# diagnose test application autod 1
autod log dumping is disabled
Example:
# diagnose test application autod 2
csf: enabled root:yes
total stitches activated: 3
stitch: Compromised-IP-Banned
destinations: all
trigger: Compromised-IP-Banned
stitch: HA-failover
destinations: HA-failover_ha-cluster_25;
trigger: HA-failover
stitch: rebooot
destinations: all
trigger: reboot
Example:
stitch: Compromised-IP-Banned
local hit: 0 relayed to: 0 relayed from: 0
last trigger:Wed Dec 31 20:00:00 1969
last relay:Wed Dec 31 20:00:00 1969
actions:
Compromised-IP-Banned_ban-ip:
done: 1 relayed to: 0 relayed from: 0
last trigger:Wed Dec 31 20:00:00 1969
last relay:
stitch: HA-failover
local hit: 0 relayed to: 0 relayed from: 0
last trigger:Thu May 24 11:35:22 2018
last relay:Thu May 24 11:35:22 2018
actions:
HA-failover_email:
done: 1 relayed to: 1 relayed from: 1
last trigger:Thu May 24 11:35:22 2018
last relay:Thu May 24 11:35:22 2018
stitch: rebooot
local hit: 2 relayed to: 1 relayed from: 1
last trigger:Fri May 3 13:30:56 2019
last relay:Fri May 3 13:30:23 2019
actions:
action1
done: 1 relayed to: 0 relayed from: 0
last trigger:Fri May 3 13:30:56 2019
last relay:
logid2stitch mapping:
id:20103 local hit: 0 relayed to: 0 relayed from: 0
License Expiry
lambada
Logging and reporting are useful components to help you understand what is happening on your network, and to inform
you about certain network activities, such as the detection of a virus, a visit to an invalid website, an intrusion, a failed log
in attempt, and myriad others.
Logging records the traffic that passes through, starts from, or ends on the FortiGate, and records the actions the
FortiGate took during the traffic scanning process. After this information is recorded in a log message, it is stored in a log
file that is stored on a log device (a central storage location for log messages). FortiGate supports sending all log types to
several log devices, including FortiAnalyzer, FortiAnalyzer Cloud, FortiGate Cloud, and syslog servers. Approximately
5% of memory is used for buffering logs sent to FortiAnalyzer. The FortiGate system memory and local disk can also be
configured to store logs, so it is also considered a log device.
Reports show the recorded activity in a more readable format. A report gathers all the log information that it needs, then
presents it in a graphical format with a customizable design and automatically generated charts showing what is
happening on the network. Reports can be generated on FortiGate devices with disk logging and on FortiAnalyzer
devices.
FortiView is a more comprehensive network reporting and monitoring tool. It integrates real-time and historical data into
a single view in FortiOS. For more information, seeFortiView monitors and widgets on page 102 .
Performance statistics are not logged to disk. Performance statistics can be received by a
syslog server or by FortiAnalyzer.
Event log subtypes are available on the Log & Report > Events page. Not all of the event log subtypes are available by
default.
When viewing event logs, use the event log subtype dropdown list on the to navigate between event log types.
VPN Events Available when VPN is enabled in System > Feature Visibility.
Endpoint Events Available when Endpoint Control is enabled in System > Feature Visibility.
Security Rating Events Always available, but logs are only generated when a Security Rating License is
registered.
WAN Opt. & Cache Events Available on devices with two hard disks by default. On devices with one hard
disk, the disk usage must be set to wanopt and then WAN Opt. & Cache must be
enabled in System > Feature Visibility.
WiFi Events Available on hardware devices when WiFi Controller is enabled in System >
Feature Visibility.
FortiExtender Events Available when FortiExtender is enabled in System > Feature Visibility.
This topic provides a sample raw log for each subtype and the configuration requirements.
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
Sample log
next
end
Sample log
next
end
Sample log
For SSL-UTM-log
#EVENTTYPE="SSL-ANOMALIES"
# EVENTTYPE="SSL-negotiation"
Enable ssl-negotiation-log to log SSL negotiation. Enable ssl-server-cert-log to log server certificate
information. Enable ssl-handshake-log to log TLS handshakes.
config firewall ssl-ssh-profile
edit "deep-inspection"
set comment "Read-only deep inspection profile."
set server-cert-mode re-sign
set caname "Fortinet_CA_SSL"
set untrusted-caname "Fortinet_CA_Untrusted"
set ssl-anomalies-log enable
set ssl-exemptions-log enable
set ssl-negotiation-log enable
set rpc-over-https disable
set mapi-over-https disable
set use-ssl-server disable
set ssl-server-cert-log enable
set ssl-handshake-log enable
next
end
For SSL-Traffic-log
For SSL-UTM-log
#EVENTTYPE="SSL-ANOMALIES"
FortiGates with an SSD disk have a configurable log buffer. When the connection to FortiAnalyzer is unreachable, the
FortiGate is able to buffer logs on disk if the memory log buffer is full. The logs queued on the disk buffer can be sent
successfully once the connection to FortiAnalyzer is restored.
The number of logs queued on the disk buffer is visible in the Log & Report > Log Settings page:
The queued logs are buffered to the memory first and then disk. Main miglogd handles the disk buffering job, while
miglogd-children handles the memory buffering. Disk buffer statistics only appear under Main miglogd, and
memory buffer statistics only appears under miglogd-children. If the total buffer is full, new logs will overwrite the old
logs.
2. Check the Main miglogd and miglogd-children statistics. The 200 MB disk buffer has been set, and there
are currently no logs buffered in memory or on disk when FortiAnalyzer is reachable:
# diagnose test application miglogd 41 0
cache maximum: 106100940(101MB) objects: 0 used: 0(0MB) allocated: 0(0MB)
VDOM:root
Queue for: global-faz
memory queue:
num:0 size:0(0MB) max:101906636(97MB) logs:0
memory queue:
num:0 size:0(0MB) max:101906636(97MB) logs:0
3. Disable the connection between the FortiGate and FortiAnalyzer. For example, delete the FortiGate from the
FortiAnalyzer authorized device list.
Assuming a massive number of logs (~ 300000) are recorded during this downtime, the logs will be queued in the
memory buffer first. If the memory buffer is full, then the remaining logs will be queued on the disk buffer.
4. Check the Main miglogd and miglogd-children statistics again. All 97 MB of the memory buffer is occupied,
and 76 of the 200 MB has been taken from the disk buffer:
# diagnose test application miglogd 41 0
cache maximum: 106100940(101MB) objects: 0 used: 0(0MB) allocated: 0(0MB)
VDOM:root
Queue for: global-faz
memory queue:
num:0 size:0(0MB) max:101906636(97MB) logs:0
memory queue:
num:165718 size:101906500(97MB) max:101906636(97MB) logs:165718
The overall miglogd statistics shows the total cached logs is the sum of the logs buffered in memory and on disk:
# diagnose test application miglogd 6
mem=0, disk=11, alert=0, alarm=0, sys=0, faz=300053, faz-cloud=0, webt=0, fds=0
interface-missed=44
Queues in all miglogds: cur:165718 total-so-far:165718
global log dev statistics:
faz 0: sent=0, failed=0, cached=300053, dropped=0 , relayed=0
Num of REST URLs: 0
memory queue:
num:0 size:0(0MB) max:101906636(97MB) logs:0
memory queue:
num:0 size:0(0MB) max:101906636(97MB) logs:0
devid:-1-10-0-1 status:buffering
Total in cache:0 size:0(0MB) max:4MB logs:0
FortiGate supports sending logs of all log types to FortiAnalyzer, FortiGate Cloud, and Syslog. For FortiGates with a
standard FortiAnalyzer Cloud subscription (FAZC contract), traffic logs are not sent to FortiAnalyzer Cloud; for
FortiGates with a Premium subscription (AFAC contract), all logs are sent.
FortiGates with a FortiCloud Premium subscription (AFAC) for Cloud-based Central Logging & Analytics, can send traffic
logs to FortiAnalyzer Cloud in addition to UTM logs and event logs. After the Premium subscription is registered through
FortiCare, FortiGuard will verify the purchase and authorize the AFAC contract. Once the contract is verified, FortiGuard
will deliver the contract to FortiGate.
FortiGates with a Standard FortiAnalyzer Cloud subscription (FAZC) can only send UTM and event logs. FortiGates with
a Premium subscription will send the UTM and event logs even if the Standard subscription has expired.
Example
In the following example, you will configure a FortiGate with a valid Premium subscription (AFAC) and expired Standard
subscription (FAZC) to send traffic logs to FortiAnalyzer Cloud.
1. Configure the log delivery.
config log fortianalyzer-cloud setting
set status enable
set ips-archive disable
set access-config enable
set enc-algorithm high
set ssl-min-proto-version default
set conn-timeout 10
set monitor-keepalive-period 5
set monitor-failure-retry-period 5
set certificate ''
set source-ip ''
set interface-select-method auto
set upload-option realtime
set priority default
set max-log-rate 0
end
2. Verify the status of the FortiCloud Premium subscription (AFAC) and standard FortiAnalyzer Cloud subscription
(FAZC).
The FAZC and AFAC fields display the subscription expiration date. The Support contract field displays the
FortiCare account information. The User ID field displays the ID for FortiAnalyzer-Cloud instance.
# diagnose test update info
...
FAZC,Tue Sep 24 16:00:00 2030
AFAC,Mon Nov 29 16:00:00 2021
...
Support contract: pending_registration=255 got_contract_info=1
account_id=[****@fortinet.com] company=[Fortinet] industry=[Technology]
User ID: 979090
The FAZC and AFAC subscriptions are valid (date of verification is November 29, 2020).
3. Check the status of FortiAnalyzer Cloud.
# execute log fortianalyzer-cloud test-connectivity
FortiAnalyzer Host Name: FAZVM64-VIO-CLOUD
FortiAnalyzer Adom Name: root
FortiGate Device ID: FG101FTK19000000
Registration: registered
Connection: allow
Adom Disk Space (Used/Allocated): 50351453B/53687091200B
Analytics Usage (Used/Allocated): 41368925B/37580963840B
Analytics Usage (Data Policy Days Actual/Configured): 60/60 Days
Archive Usage (Used/Allocated): 8982528B/16106127360B
Archive Usage (Data Policy Days Actual/Configured): 235/365 Days
Log: Tx & Rx (log not received)
IPS Packet Log: Tx & Rx
Content Archive: Tx & Rx
Quarantine: Tx & Rx
Certificate of Fortianalyzer valid and serial number is:FAZVCLTM20000000
4. When the FortiCloud Premium (AFAC) and standard FortiAnalyzer Cloud (FAZC) subscriptions are valid, the
FortiGate sends the traffic, event, and UTM logs to the remote FortiAnalyzer Cloud.
Traffic:
# execute log filter device fortianalyzer-cloud
# execute log filter category traffic
# execute log filter dump
category: traffic
device: fortianalyzer-cloud
start-line: 1
view-lines: 10
max-checklines: 0
HA member:
Oftp search string:
# execute log display
6512 logs found.
10 logs returned.
1: date=2020-11-29 time=13:57:33 id=6900668351836585985 itime="2020-11-29 13:57:34"
euid=3 epid=1027 dsteuid=3 dstepid=101 logflag=1 logver=604041797 type="traffic"
subtype="forward" level="notice" action="accept" policyid=1 sessionid=46536
srcip=10.1.100.72 dstip=172.16.100.55 transip=172.16.200.7 srcport=40797 dstport=53
transport=40797 trandisp="snat" duration=190 proto=17 sentbyte=268 rcvdbyte=0
sentpkt=4 rcvdpkt=0 logid=0000000013 service="DNS" app="DNS" appcat="unscanned"
srcintfrole="undefined" dstintfrole="undefined" srcserver=0 dstserver=0
policytype="policy" eventtime=1606687054554969021 poluuid="c041939c-2930-51eb-1448-
34c44a663331" srcmac="00:0c:29:eb:86:d6" mastersrcmac="00:0c:29:eb:86:d6"
dstmac="e8:1c:ba:c2:86:63" masterdstmac="e8:1c:ba:c2:86:63" srchwvendor="VMware"
osname="Linux" srccountry="Reserved" dstcountry="Reserved" srcintf="dmz"
dstintf="wan1" policyname="to_WAN" tz="-0800" devid="FG101FTK19000000" vd="root"
dtime="2020-11-29 13:57:33" itime_t=1606687054 devname="FortiGate-101F_F"
Event:
# execute log filter device fortianalyzer-cloud
# execute log filter category event
# execute log filter dump
category: event
device: fortianalyzer-cloud
start-line: 1
view-lines: 10
max-checklines: 0
HA member:
Oftp search string:
# execute log display
1067 logs found.
10 logs returned.
1: date=2020-11-29 time=14:12:16 id=6900672144292708352 itime="2020-11-29 14:12:17"
euid=3 epid=3 dsteuid=3 dstepid=3 logver=604041797 logid=0100038404 type="event"
subtype="system" level="error" msg="unable to resolve FortiGuard hostname"
logdesc="FortiGuard hostname unresolvable" hostname="service.fortiguard.net"
eventtime=1606687936888734117 tz="-0800" devid="FG101FTK19000000" vd="root"
dtime="2020-11-29 14:12:16" itime_t=1606687937 devname="FortiGate-101F_F"
UTM:
# execute log filter device fortianalyzer-cloud
# execute log filter category utm-virus
# execute log filter dump
category: virus
device: fortianalyzer-cloud
start-line: 1
view-lines: 10
max-checklines: 0
HA member:
This topic shows a sample configuration of multiple FortiAnalyzers on a FortiGate in multi-VDOM mode.
In this example:
l The FortiGate has three VDOMs:
l Root (management VDOM)
l VDOM1
l VDOM2
l FAZ3: 192.168.1.253
l FAZ4: 192.168.1.254
queue: qlen=0.
filter: severity=6, sz_exclude_list=0
voip dns ssh ssl
subcategory:
queue: qlen=0.
filter: severity=6, sz_exclude_list=0
voip dns ssh ssl
subcategory:
traffic: forward local multicast sniffer
anomaly: anomaly
When faz-override and/or syslog-override is enabled, the following CLI commands are available for configuring
VDOM override:
The log-uuid setting in system global is split into two settings: log-uuid-address and log-uuid policy.
The traffic log includes two internet-service name fields: Source Internet Service (srcinetsvc) and Destination
Internet Service (dstinetsvc).
Log UUIDs
UUIDs can be matched for each source and destination that match a policy that is added to the traffic log. This allows the
address objects to be referenced in log analysis and reporting.
As this may consume a significant amount of storage space, this feature is optional. By default, policy UUID insertion is
enabled and address UUID insertion is disabled.
To enable address and policy UUID insertion in traffic logs using the GUI:
3. Click Apply.
To enable address and policy UUID insertion in traffic logs using the CLI:
Sample log
Traffic logs for internet-service include two fields: Source Internet Service and Destination Internet Service.
Sample log
The signal-to-noise ratio (snr) and signal strength (signal) are logged per client in the WiFi event and traffic logs.
When a WiFi client connects to a tunnel or local-bridge mode SSID on an FortiAP that is managed by a FortiGate, signal-
to-noise ratio and signal strength details are included in WiFi event logs for local-bridge traffic statistics and
authentication, and in forward traffic logs for tunnel traffic. This allows you to store and view clients' historical signal
strength and signal-to-noise ratio information.
1. Go to Log & Report > Events and select WiFi Events from the events drop-down list.
The Signal and Signal/Noise columns show the signal strength and signal-to-noise ratio for each applicable client.
2. WiFi event log messages include the signal and snr values:
date=2020-05-27 time=11:26:28 logid="0104043579" type="event" subtype="wireless"
level="notice" vd="vdom1" eventtime=1590603988877156921 tz="-0700" logdesc="Wireless
client IP assigned" sn="FP231ETF20000455" ap="FP231ETF20000455" vap="stability3"
ssid="FOS_QA_Starr_140E_Guest-11" radioid=1 user="N/A" group="N/A"
stamac="1c:87:2c:b6:a8:49" srcip=11.10.80.2 channel=6 radioband="802.11n,g-only"
signal=-45 snr=50 security="WPA2 Personal" encryption="AES" action="client-ip-detected"
reason="Reserved 0" mpsk="N/A" msg="Client 1c:87:2c:b6:a8:49 had an IP address detected
(by DHCP packets)."
date=2020-05-27 time=11:26:11 logid="0104043573" type="event" subtype="wireless"
level="notice" vd="vdom1" eventtime=1590603970962702892 tz="-0700" logdesc="Wireless
client authenticated" sn="FP231ETF20000455" ap="FP231ETF20000455" vap="stability3"
ssid="FOS_QA_Starr_140E_Guest-11" radioid=1 user="N/A" group="N/A"
stamac="1c:87:2c:b6:a8:49" srcip=0.0.0.0 channel=6 radioband="802.11n,g-only" signal=-45
snr=50 security="WPA2 Personal" encryption="AES" action="client-authentication"
reason="Reserved 0" mpsk="N/A" msg="Client 1c:87:2c:b6:a8:49 authenticated."
2. Forward traffic log messages include the signal and snr values:
date=2020-05-27 time=11:30:26 logid="0000000013" type="traffic" subtype="forward"
level="notice" vd="vdom1" eventtime=1590604226533016978 tz="-0700" srcip=11.10.80.2
srcname="WIFI23" srcport=53926 srcintf="stability3" srcintfrole="lan" srcssid="FOS_QA_
Starr_140E_Guest-11" apsn="FP231ETF20000455" ap="FP231ETF20000455" channel=6
radioband="802.11n,g-only" signal=-31 snr=64 dstip=91.189.91.157 dstport=123
dstintf="wan1" dstintfrole="wan" srccountry="United States" dstcountry="United States"
sessionid=322069 proto=17 action="accept" policyid=13 policytype="policy"
poluuid="7c14770c-1456-51e9-4c57-806e9c499782" policyname="wmm" service="NTP"
trandisp="snat" transip=172.16.200.111 transport=53926 appid=16270 app="NTP"
appcat="Network.Service" apprisk="elevated" applist="g-default" duration=180 sentbyte=76
rcvdbyte=76 sentpkt=1 rcvdpkt=1 utmaction="allow" countapp=1 osname="Linux"
mastersrcmac="1c:87:2c:b6:a8:49" srcmac="1c:87:2c:b6:a8:49" srcserver=0 utmref=65534-66
To verify local-bridge traffic statistics when a client is connecting to a local-bridge mode SSID:
1. Go to Log & Report > Events and select WiFi Events from the events drop-down list.
The Signal and Signal/Noise columns show the signal strength and signal-to-noise ratio for each applicable client.
2. WiFi event log messages include the signal and snr values:
date=2020-05-26 time=17:48:57 logid="0104043687" type="event" subtype="wireless"
level="information" vd="vdom1" eventtime=1590540537841497433 tz="-0700" logdesc="Traffic
stats for station with bridge wlan" sn="FP231ETF20000455" ap="FP231ETF20000455"
vap="wifi.fap.01" ssid="FOS_QA_Starr-140E-LB-cap-2" srcip=10.128.100.4 user="N/A"
stamac="00:1e:e5:df:b1:63" signal=-53 snr=52 sentbyte=8970016 rcvdbyte=985910
nextstat=300 action="sta-wl-bridge-traffic-stats" msg="Traffic stats for bridge ssid
client 00:1e:e5:df:b1:63"
FortiGate can use RSSO accounting information from authenticated RSSO users to populate destination users and
groups, along with source users and groups.
RSSO user login information can be forwarded by the RADIUS server to the FortiGate that is listening for incoming
RADIUS accounting start messages on the RADIUS accounting port. Accounting start messages usually contain the
IP address, user name, and user group information. FortiGate uses this information in traffic logs, which include dstuser
and dstgroup fields for user and group destination information .
For instructions on configuring RSSO, see RADIUS single sign-on agent on page 2380.
The three following scenarios show traffic between pc1 and the internet, and pc1 and pc2.
Scenario 1
In this scenario, RSSO user test2 in group rsso-grp1 is authenticated on pc1. Traffic flows from pc1 to the internet.
Expected result:
In the logs, user test2 is shown as the source user in the rsso-grp1 group.
1. In the GUI, go to Log & Report > Forward Traffic and view the details of an entry with test2 as the source.
2. In the Source section, User is test2 and Group is the rsso-grp1.
Scenario 2
In this scenario, RSSO user test2 is authenticated on pc1. Traffic is initialized on pc2 (172.16.200.185) going to pc1
(10.1.100.188).
Expected result:
In the logs, user test2 is shown as the destination user (dstuser). No destination group (dstgroup) is logged because
no RSSO user is logged in on pc2, so the traffic from pc2 is unauthenticated.
1. In the GUI, go to Log & Report > Forward Traffic and view the details of an entry with 172.16.200.185 (pc2) as the
source.
2. In the Other section, Destination User is test2 and no destination group is shown.
Scenario 3
In this scenario, RSSO user test2 in group rsso-grp1 is authenticated on pc1, and user test3 in group rsso-grp2 is
authenticated on pc2. Traffic flows from pc2 to pc1.
Expected result:
In the logs, user test3 is shown as the source user in the rsso-grp1 group. User test2 is shown as destination user
(dstuser) in the rsso-grp1 destination group (dstgroup). The destination group is logged because an RSSO user is
logged in to pc2.
1. In the GUI, go to Log & Report > Forward Traffic and view the details of an entry with 172.16.200.185 (pc2) as the
source.
2. In the Source section, User is test3 and Group is the rsso-grp2. In the Other section, Destination User is test2 and
Destination Group is rsso-grp1.
3. The log message shows both the source and the destination users and groups:
8: date=2020-05-25 time=14:23:07 logid="0000000013" type="traffic" subtype="forward"
level="notice" vd="vdom1" eventtime=1590441786958007914 tz="-0700" srcip=172.16.200.185
srcport=64096 srcintf="port9" srcintfrole="undefined" dstip=10.1.100.188 dstport=80
dstintf="port10" dstintfrole="undefined" srccountry="Reserved" dstcountry="Reserved"
sessionid=112445 proto=6 action="close" policyid=3 policytype="policy"
poluuid="5894c368-9eca-51ea-fb4c-ec5a6c1d5043" policyname="pol2" user="test3"
group="rsso-grp2" authserver="vdom1" dstuser="test2" dstgroup="rsso-grp1"
dstauthserver="vdom1" service="HTTP" trandisp="snat" transip=10.1.100.1 transport=64096
duration=1 sentbyte=328 rcvdbyte=563 sentpkt=6 rcvdpkt=5 appcat="unscanned"
dsthwvendor="VMware" dstosname="Windows" dstswversion="7"
masterdstmac="00:0c:29:44:be:b9" dstmac="00:0c:29:44:be:b9" dstserver=0
The dstuser field in UTM logs records the username of a destination device when that user has been authenticated on
the FortiGate.
Examples
In the following topology, the user, bob, is authenticated on a client computer. The user, guest, is authenticated on the
server. Log are collected for AV and IPS in flow inspection mode. Logs are collected for application control and web filter
in proxy mode.
Threat weight
Threat weight helps aggregate and score threats based on user-defined severity levels. It adds several fields such as
threat level (crlevel), threat score (crscore), and threat type (craction) to traffic logs. Threat weight logging is
enabled by default and the settings can be customized. Threats can be viewed from the Top Threats FortiView
dashboard.
1. In the tree menu, click Dashboard and in the FortiView section, click the + sign (Add Monitor).
2. In the Security section, enable Show More and click Top Threats.
3. Configure the settings as needed.
4. Click Add Monitor.
5. Go to Dashboard > Top Threats. The Top Threats monitor displays threats based on the scores in the traffic logs.
The cli-audit-log option records the execution of CLI commands in system event logs (log ID 44548). In addition to
execute and config commands, show, get, and diagnose commands are recorded in the system event logs.
The cli-audit-log data can be recorded on memory or disk, and can be uploaded to FortiAnalyzer, FortiGate Cloud,
or a syslog server.
Sample log:
Free-style filters allow users to define a filter for logs that are captured to each individual logging device type. Filters can
include log categories and specific log fields. The filters can be created as an inclusive list or exclusive list.
Free-style filters can also be used to filter logs that have been captured on logging devices already to narrow down the
list of logs to view.
config log syslogd filter
config free-style
edit <id>
set category <option>
set filter <string>
set filter-type {include | exclude}
next
end
end
category <option> Set the log category. The following options are available: traffic, event,
virus, webfilter, attack, spam, anomaly, voip, dlp, app-ctrl, waf,
dns, ssh, ssl, file-filter, icap, and ztna.
filter <string> Enter the filter criteria. Multiple values can be added, for example:
set filter "logid <id> <id>"
filter-type {include Include/exclude logs that match the filter.
| exclude}
Use the following commands to view the results when multiple fields are used:
# execute log filter free-style "logid <id> <id>"
# execute log filter free-style "srcip <IP_address> <IP_address>"
# execute log filter free-style "(logid <id>) or (srcip <IP_address> <IP_address>)"
# execute log filter free-style "(srcip <IP_address>) and (dstip <IP_address>)"
In this example, the free-style filter is set to filter log IDs 0102043039 and 0102043040. The source IPs, 192.168.2.5 and
192.168.2.205, are also checked.
category: event
device: disk
start-line: 1
view-lines: 10
max-checklines: 0
HA member:
log search mode: on-demand
pre-fetch-pages: 2
Filter: logid 0102043039 0102043040
Oftp search string: (and (or logid=="0102043039" not-exact logid=="0102043040" not-exact))
# execute log filter free-style "(logid 0102043039) or (srcip 192.168.2.5 192.168.2.205)"
# execute log filter dump
category: event
device: disk
start-line: 1
view-lines: 10
max-checklines: 0
HA member:
log search mode: on-demand
pre-fetch-pages: 2
Filter: (logid 0102043039) or (srcip 192.168.2.5 192.168.2.205)
Oftp search string: (or (or (or srcip==192.168.2.5) (or srcip==192.168.2.205)) (or
logid=="0102043039" not-exact))
Troubleshooting
The following topics provide information about troubleshooting logging and reporting:
l Log-related diagnose commands on page 2470
l Backing up log files or dumping log messages on page 2476
l SNMP OID for logs that failed to send on page 2478
l The following commands display different status/statistics of miglogd at the proper level:
diagnose test application miglogd x
diagnose debug enable
To get the list of available levels, press Enter after diagnose test/debug application miglogd. The following
are some examples of commonly use levels.
If the debug log display does not return correct entries when log filter is set:
diagnose debug application miglogd 0x1000
For example, use the following command to display all login system event logs:
execute log filter device disk
execute log filter category event
execute log filter field action login
Files to be searched:
file_no=65523, start line=0, end_line=237
file_no=65524, start line=0, end_line=429
file_no=65525, start line=0, end_line=411
file_no=65526, start line=0, end_line=381
file_no=65527, start line=0, end_line=395
file_no=65528, start line=0, end_line=458
file_no=65529, start line=0, end_line=604
file_no=65530, start line=0, end_line=389
file_no=65531, start line=0, end_line=384
session ID=1, total logs=3697
back ground search. process ID=26240, session_id=1
start line=1 view line=10
( action "login" )
ID=1, total=3697, checked=238, found=5
ID=1, total=3697, checked=668, found=13
ID=1, total=3697, checked=1080, found=23
ID=1, total=3697, checked=1462, found=23
ID=1, total=3697, checked=1858, found=23
ID=1, total=3697, checked=2317, found=54
ID=1, total=3697, checked=2922, found=106
ID=1, total=3697, checked=3312, found=111
ID=1, total=3697, checked=3697, found=114
You can check and/or debug the FortiGate to FortiAnalyzer connection status.
match sn=FL-8HFT718900132
<16206> _faz_post_connection()-292: Certificate verification:enabled, Faz verified:1
<16206> _send_queue_item()-518: xfer_status changed from 2 to 1 for global-faz
<16206> _send_queue_item()-523: type=0, cat=0, logcount=0, len=0
<16206> _oftp_send()-487: dev=global-faz type=17 pkt_len=34
......
<16208> _send_queue_item()-523: type=3, cat=1, logcount=1, len=301
<16206> _oftp_recv()-1348: opt=78, opt_len=55
......
<16206> _build_ack()-784: xfer_status changed from 1 to 2 for global-faz
<16206> _process_response()-960: checking opt code=81
......
<16206> _send_queue_item()-523: type=1, cat=0, logcount=0, len=0
<16206> _oftp_send()-487: dev=global-faz type=1 pkt_len=24
......
To check real-time log statistics by log type since the miglogd daemon start:
report
event: logs=1244 len=225453, Sun=246 Mon=247 Tue=197 Wed=0 Thu=61 Fri=246 Sat=247
faz
event: logs=6 len=1548, Sun=0 Mon=0 Tue=6 Wed=0 Thu=0 Fri=0 Sat=0 compressed=5446
memory
traffic: logs=462 len=389648, Sun=93 Mon=88 Tue=77 Wed=0 Thu=13 Fri=116 Sat=75
event: logs=3724 len=1170237, Sun=670 Mon=700 Tue=531 Wed=0 Thu=392 Fri=747 Sat=684
app-ctrl: logs=16 len=9613, Sun=3 Mon=3 Tue=3 Wed=0 Thu=0 Fri=5 Sat=2
dns: logs=71 len=29833, Sun=0 Mon=0 Tue=0 Wed=0 Thu=71 Fri=0 Sat=0
disk
traffic: logs=462 len=389648, Sun=93 Mon=88 Tue=77 Wed=0 Thu=13 Fri=116 Sat=75
compressed=134638
event: logs=2262 len=550957, Sun=382 Mon=412 Tue=307 Wed=0 Thu=306 Fri=459 Sat=396
compressed=244606
app-ctrl: logs=16 len=9613, Sun=3 Mon=3 Tue=3 Wed=0 Thu=0 Fri=5 Sat=2 compressed=3966
dns: logs=71 len=29833, Sun=0 Mon=0 Tue=0 Wed=0 Thu=71 Fri=0 Sat=0 compressed=1499
report
traffic: logs=462 len=375326, Sun=93 Mon=88 Tue=77 Wed=0 Thu=13 Fri=116 Sat=75
event: logs=3733 len=1057123, Sun=670 Mon=700 Tue=531 Wed=0 Thu=401 Fri=747 Sat=684
app-ctrl: logs=16 len=9117, Sun=3 Mon=3 Tue=3 Wed=0 Thu=0 Fri=5 Sat=2
faz
traffic: logs=462 len=411362, Sun=93 Mon=88 Tue=77 Wed=0 Thu=13 Fri=116 Sat=75
compressed=307610
event: logs=3733 len=1348297, Sun=670 Mon=700 Tue=531 Wed=0 Thu=401 Fri=747 Sat=684
compressed=816636
app-ctrl: logs=16 len=10365, Sun=3 Mon=3 Tue=3 Wed=0 Thu=0 Fri=5 Sat=2 compressed=8193
dns: logs=71 len=33170, Sun=0 Mon=0 Tue=0 Wed=0 Thu=71 Fri=0 Sat=0 compressed=0
To check log statistics to the local/remote log device since the miglogd daemon start:
ID=2, duration=70486.
ID=3, duration=1.
FGT-B-LOG (global) # diagnose test application miglogd 14
FGT-B-LOG (global) # diagnose test application miglogd 15
Main miglogd: ID=0, children=2, active-children=2
ID=1, duration=70604.
ID=2, duration=70604.
To check the remote queue and see the maximum buffered memory size:
VDOM:root
Queue for: global-faz
memory queue:
num:0 size:0(0MB) max:105405644(100MB) logs:0
memory queue:
num:0 size:0(0MB) max:97852620(93MB) logs:0
When a log issue is caused by a particular log message, it is very help to get logs from that FortiGate. This topic provides
steps for using execute log backup or dumping log messages to a USB drive.
This command backs up all disk log files and is only available on FortiGates with an SSD disk.
Before running execute log backup, we recommend temporarily stopping miglogd and reportd.
Or
1. Determine the process, or thread, ID (PID) of miglogd and reportd:
# diagnose sys top 10 99
When a syslog server encounters low-performance conditions and slows down to respond, the buffered syslog
messages in the kernel might overflow after a certain number of retransmissions, causing the overflowed messages to
be lost. OIDs track the lost messages or failed logs.
SNMP query OIDs include log statistics for global log devices:
l FORTINET-FORTIGATE-MIB:fortinet.fnFortiGateMib.fgLog.fgLogDeviceNumber 1.3.6.1.4.1.12356.101.21.1.1
l FORTINET-FORTIGATE-
MIB:fortinet.fnFortiGateMib.fgLog.fgLogDevices.fgLogDeviceTable.fgLogDeviceEntry.fgLogDeviceEntryIndex
1.3.6.1.4.1.12356.101.21.2.1.1.1
l FORTINET-FORTIGATE-
MIB:fortinet.fnFortiGateMib.fgLog.fgLogDevices.fgLogDeviceTable.fgLogDeviceEntry.fgLogDeviceEnabled
1.3.6.1.4.1.12356.101.21.2.1.1.2
l FORTINET-FORTIGATE-
MIB:fortinet.fnFortiGateMib.fgLog.fgLogDevices.fgLogDeviceTable.fgLogDeviceEntry.fgLogDeviceName
1.3.6.1.4.1.12356.101.21.2.1.1.3
l FORTINET-FORTIGATE-
MIB:fortinet.fnFortiGateMib.fgLog.fgLogDevices.fgLogDeviceTable.fgLogDeviceEntry.fgLogDeviceSentCount
1.3.6.1.4.1.12356.101.21.2.1.1.4
l FORTINET-FORTIGATE-
MIB:fortinet.fnFortiGateMib.fgLog.fgLogDevices.fgLogDeviceTable.fgLogDeviceEntry.fgLogDeviceRelayedCount
1.3.6.1.4.1.12356.101.21.2.1.1.5
l FORTINET-FORTIGATE-
MIB:fortinet.fnFortiGateMib.fgLog.fgLogDevices.fgLogDeviceTable.fgLogDeviceEntry.fgLogDeviceCachedCount
1.3.6.1.4.1.12356.101.21.2.1.1.6
l FORTINET-FORTIGATE-
MIB:fortinet.fnFortiGateMib.fgLog.fgLogDevices.fgLogDeviceTable.fgLogDeviceEntry.fgLogDeviceFailedCount
1.3.6.1.4.1.12356.101.21.2.1.1.7
l FORTINET-FORTIGATE-
MIB:fortinet.fnFortiGateMib.fgLog.fgLogDevices.fgLogDeviceTable.fgLogDeviceEntry.fgLogDeviceDroppedCount
1.3.6.1.4.1.12356.101.21.2.1.1.8
Where:
l fgLogDeviceNumber is the number of devices in the table.
l fgLogDeviceEnabled is either 1 or 0, indicating whether the device is enabled.
l fgLogDeviceName is the name of the device.
A FortiGate connected to a syslog server or FortiAnalyzer generates statistics that can be seen using the diagnose
test application miglogd command:
The same statistics are also available in snmpwalk/snmpget on the OID 1.3.6.1.4.1.12356.101.21.
snmpwalk -v2c -c REGR-SYS 172.16.200.1 1.3.6.1.4.1.12356.101.21
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.1.1.0 = INTEGER: 9
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.1.0 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.1.1 = INTEGER: 1
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.1.2 = INTEGER: 2
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.1.3 = INTEGER: 3
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.1.4 = INTEGER: 4
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.1.5 = INTEGER: 5
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.1.6 = INTEGER: 6
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.1.7 = INTEGER: 7
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.1.8 = INTEGER: 8
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.0 = INTEGER: 1
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.1 = INTEGER: 1
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.2 = INTEGER: 1
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.3 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.4 = INTEGER: 1
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.5 = INTEGER: 1
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.6 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.7 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.8 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.3.0 = STRING: "syslog"
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.3.1 = STRING: "syslog2"
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.3.2 = STRING: "syslog3"
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.3.3 = STRING: "syslog4"
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.3.4 = STRING: "faz"
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.3.5 = STRING: "faz2"
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.3.6 = STRING: "faz3"
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.3.7 = STRING: "webtrends"
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.3.8 = STRING: "fds"
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.4.0 = Counter32: 254
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.4.1 = Counter32: 220
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.4.2 = Counter32: 95
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.4.3 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.4.4 = Counter32: 282
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.4.5 = Counter32: 272
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.4.6 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.4.7 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.4.8 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.5.0 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.5.1 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.5.2 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.5.3 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.5.4 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.5.5 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.5.6 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.5.7 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.5.8 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.6.0 = Gauge32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.6.1 = Gauge32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.6.2 = Gauge32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.6.3 = Gauge32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.6.4 = Gauge32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.6.5 = Gauge32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.6.6 = Gauge32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.6.7 = Gauge32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.6.8 = Gauge32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.7.0 = Counter32: 139
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.7.1 = Counter32: 139
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.7.2 = Counter32: 73
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.7.3 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.7.4 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.7.5 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.7.6 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.7.7 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.7.8 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.8.0 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.8.1 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.8.2 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.8.3 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.8.4 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.8.5 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.8.6 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.8.7 = Counter32: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.8.8 = Counter32: 0
To get the present state of the logging device that is attached to the FortiGate:
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.0 = INTEGER: 1
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.1 = INTEGER: 1
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.2 = INTEGER: 1
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.3 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.4 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.5 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.6 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.7 = INTEGER: 0
FORTINET-FORTIGATE-MIB::fnFortiGateMib.21.2.1.1.2.8 = INTEGER: 0
Microsoft Azure
Oracle OCI
AliCloud
Private cloud
VM license
You can access the FortiGate VM License page from the Dashboard > Status page in the Virtual Machine widget. Click
the device license and select FortiGate VM License.
The FortiGate VM License page displays the following information:
Field Description
FortiGuard server. FortiOS makes a check against how many days the
warning status is continuous. If the number is less than 30 days, the status
does not change.
l Invalid: VM cannot connect and validate against a FortiManager or
FortiGuard server. FortiOS makes a check against how many days the
warning status is continuous. If the number is 30 days or more, the status
changes to invalid. FortiOS restricts GUI access until you upload a valid
license. Firewall policies do not work. FortiGuard downloads are unavailable.
l Pending: temporary state where the VM attempts to validate its license.
FortiGuard server.
l The license might be expired. Check the expiration date for evaluation or
term-based licenses.
l Another VM has been already validated with FortiGuard using the same
This information is visible in the CLI by running get system status (see CLI troubleshooting).
After you submit an order for a FortiGate-VM, Fortinet sends a license registration code to the email address that you
entered in the order form. Use this code on the FortiCloud portal to register the FortiGate-VM.
Once the VM is registered, you can download the license file in .LIC format. On the FortiGate VM License page, click
Upload. The system prompts you to reboot and validate the license with the FortiGuard server. Once validated, your
FortiGate-VM is fully functional.
The VM license window may also appear immediately after logging in if you are running a VM with an evaluation license
that has expired.
In cases where the GUI is not accessible, you can upload the license using secure copy (SCP).
For information about injecting Flex-VM license tokens, see Injecting tokens into FortiGate-VM
in the Flex VM Deployment Guide.
1. Enable SCP:
config system global
set admin-scp enable
end
2. Enable SSH in the administrative access for the interface where the transfer will take place:
config system interface
edit <interface>
append allowaccess ssh
next
end
Types of VM licenses
FortiGate-VM offers perpetual licensing (normal series and V-series) and annual subscription licensing (S-series). SKUs
are based on the number of vCPUs (1, 2, 4, 8, 16, 32, or unlimited).
The Flex-VM program allows qualified enterprise and MSSP customers to create as many VM entitlements as required.
Resource consumption is based upon predefined points that are calculated on a daily basis. For information, see the
Flex-VM Program Guide in the Fortinet document library.
l UTM
l Enterprise
l ATP
vCPU number Not supported. Supported. You can Supported. You can
upgrade during also upgrade the apply different VM
contracted term support service entitlement
bundle. configurations in the
Contact a Fortinet Flex-VM portal. API
sales representative is not supported at
to upgrade. this time.
VDOM support By default, each CPU By default, all CPU By default, all CPU Flex-VM instances
level supports up to a levels do not support levels do not support support split-task
certain number of adding VDOMs. adding VDOMs. VDOMs without any
VDOMs. V-series VM S-series VM additional VDOM
Refer to the instances support instances support licenses.
FortiGate-VM data split-task VDOMs split-task VDOMs
sheet for default without any without any
limits. additional VDOM additional VDOM
licenses. licenses.
S-series
VM instances
support the
subscription
VDOM license.
In a scenario where you have not allocated all the vCPUs allotted by your VM entitlement, you can add additional vCPUs
to your FortiGate VM. The vCPU allocation can be verified in the GUI and CLI.
You can increase the number of vCPUs on running FortiGate VM models that support hot-adding. Once the hot-adding
is complete, perform one of the following for FortiOS to recognize the new CPUs:
l Enter execute cpu add <number_of_new_vCPUs>.
l Reboot the FortiGate.
CLI troubleshooting
In some cases, you can view more information from the CLI to diagnose issues with VM licensing. This is also useful
when the GUI is inaccessible due to an invalid contract.
Before you begin, ensure that your FortiGate has the proper routes to connect to the Internet. Run all following debug
commands for a full picture of the issue.
Valid 0 – Invalid
1 – Valid
Status 0 – Startup
1 – Success
2 – Warning
3 – Error
4 – Invalid Copy
5 – Eval Expired
6 - Grace Period. For Flex-VM, there is a two-hour grace period to begin passing
traffic upon retrieving the license from FortiCare.
This combination indicates the license itself is valid, but is running on a duplicate instance:
valid: 1
status: 4
code: 401
For Flex-VM licenses, the following command allows you to enter the license token and proxy information:
# execute vm-license <token> https://<username>:<password>@<proxy IP address>:<proxy port>
The following error codes can be received from the FortiCare server:
1 - Runtime error (server unhandled error on FortiCare sever)
57 - License Token is invalid
58 - License Token is already used and cannot be used again to retrieve license key
Each FortiGate-VM base license type allows a default number of virtual domains (VDOM). This topic provides sample
procedures to add VDOMs beyond the default number using separately purchased VDOM licenses.
This topic consists of the following steps:
1. Activate the FortiGate-VM with the base license.
2. Add more VDOMs to the FortiGate-VM.
page.
f. Go to Asset > Manage/View Products. Click the serial number to download the license file.
2. Upload the FortiGate-VM base license file to FortiOS:
a. Log in to the FortiGate-VM GUI.
b. In Dashboard > Status, in the Virtual Machine widget, click FortiGate VM License.
c. Click the Upload button.
d. Select the FortiGate-VM base license file, then click OK. The FortiGate-VM reboots after applying the base
license.
3. Verify the FortiGate-VM base license status and VDOM information:
a. Log in to the FortiGate-VM GUI.
b. In Dashboard > Status, in the Virtual Machine widget, ensure that there is a checkmark in front of the FortiGate-
VM base license name. The checkmark indicates that the base license is valid.
c. You can check VDOM information using the CLI. The following output shows that the maximum number of
VDOMs is currently one. This is correct since the FortiGate-VM base license only supports the default root
VDOM that the system uses.
You can repeat this procedure multiple times to stack multiple VDOM licenses on the same FortiGate-VM.
1. Purchase and register the FortiGate-VM upgrade license in FortiCare. This example adds 15 VDOMs:
a. Purchase the FortiGate-VM upgrade license from Fortinet or a Fortinet reseller.
b. You receive a license certification with a registration code. Open the certification.
c. Log in to Fortinet Customer Service & Support.
d. Go to Asset > Register/Activate and enter the provided registration code.
e. On the Specify License Confirmation Information screen, enter the FortiGate-VM serial number to apply the
VDOM upgrade license to the FortiGate-VM. In this example, the FortiGate-VM serial number is
FGVM4VTM19000476.
Fortinet's Terraform support provides customers with more ways to efficiently deploy, manage, and automate security
across physical FortiGate appliances and virtual environments. You can use Terraform to automate various IT
infrastructure needs, thereby diminishing mistakes from repetitive manual configurations.
For example, if Fortinet is releasing a new FortiOS version, your organization may require you to test a new functionality
to determine how it may impact the environment before globally deploying the new version. In this case, the ability to
rapidly stand up environments and test these functions prior to production environment integration provides a resource-
efficient and fault-tolerant approach.
The following example demonstrates how to use the Terraform FortiOS provider to perform simple configuration
changes on a FortiGate unit. It requires the following:
l FortiOS 6.0 or later
l FortiOS Provider: This example uses terraform-provider-fortios 1.0.0.
l Terraform: This example uses Terraform 0.11.14.
l REST API administrator created on the FortiGate with the API key
For more information, see the Terraform FortiOS Provider at https://www.terraform.io/docs/providers/fortios/index.html.
1. On the FortiGate, go to System > Administrators and click Create New > REST API Admin.
2. Enter the Username and, optionally, enter Comments.
3. Select an Administrator Profile.
4. We recommend that you create a new profile with minimal privileges for this terraform script:
a. In the Administrator Profile drop down click Create New.
b. Enter a name for the profile.
c. Configure the Access Permissions:
l None: The REST API is not permitted access to the resource.
l Read: The REST API can send read requests (HTTP GET) to the resource.
l Read/Write: The REST API can send read and write requests (HTTP GET/POST/PUT/DELETE) to the
resource.
d. Click OK.
5. Enter Trusted Hosts to specify the devices that are allowed to access this FortiGate.
6. Click OK.
An API key is displayed. This key is only shown once, so you must copy and store it securely.
4. Create the resources for configuring your DNS object and adding a static route:
resource "fortios_system_setting_dns" "test1" {
primary = "172.16.95.16"
secondary = "8.8.8.8"
}
resource "fortios_networking_route_static" "test1" {
dst = "110.2.2.122/32"
gateway = "2.2.2.2"
blackhole = "disable"
distance = "22"
weight = "3"
priority = "3"
device = "port2"
comment = "Terraform test"
}
8. Enter terraform plan to parse the configuration file and read from the FortiGate configuration to see what
Terraform changes:
This example create a static route and updates the DNS address. You can see that Terraform reads the DNS
addresses from the FortiGate and then lists them.
If you are running terraform-provider-fortios 1.1.0, you may see the following error:
Error: Error getting CA Bundle, CA Bundle should be set when
insecure is false.
In this case, add the following line to the FortiOS provider configuration in the test.tf file:
insecure = "true"
priority: "3"
weight: "3"
~ fortios_system_setting_dns.test1
primary: "96.45.45.45" => "172.16.95.16"
secondary: "208.91.112.22" => "8.8.8.8"
Plan: 1 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
fortios_networking_route_static.test1: Creating...
blackhole: "" => "disable"
comment: "" => "Terraform test"
device: "" => "port2"
distance: "" => "22"
dst: "" => "110.2.2.122/32"
gateway: "" => "2.2.2.2"
priority: "" => "3"
weight: "" => "3"
fortios_system_setting_dns.test1: Modifying... (ID: 96.45.45.45)
primary: "96.45.45.45" => "172.16.95.16"
secondary: "208.91.112.22" => "8.8.8.8"
fortios_networking_route_static.test1: Creation complete after 0s (ID: 2)
fortios_system_setting_dns.test1: Modifications complete after 0s (ID: 172.16.95.16)
Apply complete! Resources: 1 added, 1 changed, 0 destroyed.
b. Entering terraform apply deletes the static route that is commented out of the configuration file, and
reverts the DNS address to the old address:
root@mail:/home/terraform# terraform apply
fortios_system_setting_dns.test1: Refreshing state... (ID: 172.16.95.16)
Troubleshooting
Use the HTTPS daemon debug to begin troubleshooting why a configuration was not accepted:
# diagnose debug enable
# diagnose debug application httpsd -1
The REST API 403 error means that your administrator profile does not have sufficient
permissions.
The REST API 401 error means that you do not have the correct token or trusted host.
Physical Function (PF) and Virtual Function (VF) PCI Passthrough and SR-IOV drivers in FortiGate guest VM are
supported.
PF provides the ability for PCI Passthrough, but requires an entire Network Interface Card (NIC) for a VM. It can usually
achieve greater performance than a Virtual Function (VF) based SR-IOV. PF is also expensive. While VF allows one NIC
to be shared among multiple guests VMs, PF is allocated to one port on a VM.
The supported driver versions are:
Other hypervisors, such as Xen or Microsoft Hyper-V, may work with vSPU, although they are
unverified.
All tools and software utilities for UEFI 1.X have been removed from 6.2.0 and later releases.
Update to UEFI 2.x to use the UEFI tools or software utilities.
You perform the configuration to use PF or VF on the hypervisor, and do not configure it on the FortiGate.
Permanent Hwaddr:3c:fd:fe:1e:98:02
State: up
Link: up
Mtu: 1500
Supported: auto 1000full 10000full
Advertised: auto 1000full 10000full
Auto: disabled
Rx packets: 0
Rx bytes: 0
Rx compressed: 0
...
OCI IMDSv2 offers increased security for accessing instance metadata compared to IMDSv1. IMDSv2 is used in OCI
SDN connectors and on instance deployments with bootstrap metadata. When upgrading from previous FortiOS builds
with legacy IMDSv1 endpoints, the endpoints will be updated to IMDSv2, and the same calls can be made.
The following use cases illustrate IMDSv2 support on the FortiGate-VM.
1. In OCI, deploy an instance using IMDSv2 with bootstrap metadata. There are two methods to enable IMDSv2 :
l Use the OCI command line to deploy an instance using user-data. This example uses a MIME file that
contains the license and configuration, as well as a JSON file that specifies to disable V1 metadata.
oci compute instance launch
--availability-domain wwwl:US-ASHBURN-AD-1
--compartment-id
ocid1.tenancy.oc1..aaaaaaaaaaa3aaaaaaaaaaaaaaaaa7xxxxxxx54aaaaaa4xxxxxxxx55xxxa
--display-name fos-byol-v6.4.6-b2290-emulated
--image-id
ocid1.image.oc1.iad.aaaaaaaa6xxx43xxxxxxxxx7aaaaaaaaaaaaaaaaaaaa3xxxxxxxxxxxxxxx
--subnet-id
ocid1.subnet.oc1.iad.aaaaaaaaxxxxxxxxx2xxxxxxxxxxxxxxxxxxxx5aaa4xxxxxxxxxxxx42aaa
--shape VM.Standard1.4
--assign-public-ip true
--user-data-file /home/oci/userdata/mime.txt
--ssh-authorized-keys-file /home/oci/userdata/myfirstkeypair.pub
--instance-options file://home/oci/scripts/metadatav2.json
root@mail:/home/oci/scripts# cat metadatav2.json
{
"areLegacyImdsEndpointsDisabled": true
}
l While the instance is running, edit the instance metadata service version in the GUI ,and change the allowed
IMDS version to VERSION 2 ONLY (see Getting Instance Metadata in the OCI documentation).
2. The FortiGate will use the metadata v2 endpoints to get the metadata bootstrap information. In FortiOS, verify this
by running the following after bootup:
# diagnose debug cloudinit show
To configure an SDN connector with meta-IAM enabled and firewall addresses to obtain dynamic
addresses:
1. Configure an IAM policy and dynamic group (see How Policies Work and Managing Dynamic Groups in the OCI
documentation).
2. In FortiOS, configure the OCI Fabric connector (see OCI SDN connector using certificates on page 2353 for
detailed instructions):
# execute update-eip
instance: fos-byol-v6.4.6-b2290-emulated
vnic0: fos-byol-v6.4.6-b2290-emulated
10.0.0.58 (129.213.138.192)
port1: 10.0.0.58, eip: 129.213.138.192
EIP is updated successfully
FIPS cipher mode for AWS, Azure, OCI, and GCP FortiGate-VMs
AWS, Azure, OCI, and GCP FortiGate-VMs support FIPS cipher mode. You must remove all VPN configurations before
you can enable FIPS CC mode.
FIPS cipher mode only allows a restricted set of ciphers for features that require encryption, such as SSH, IPsec and
SSL VPN, and HTTPS. You cannot use insecure protocols such as Telnet, TFTP, and HTTP to access the FortiGate-
VM.
You must perform a factory reset to disable fips-ciphers mode.
The following behavior occurs when you enable FIPS cipher mode:
l You can restore a license, image, configuration, and so on from an FTP server.
l The following options are available:
l aes256gcm
l aes256gcm
l secp384r1
l secp521r1
DH group:
l RFC3526/Oakley group 14 (2048 bits)
l secp384r1
l secp521r1
Troubleshooting
This section is intended for administrators with super_admin permissions who require assistance with basic and
advanced troubleshooting. Administrators with other types of permissions may not be able to perform all of the tasks in
this section.
This section contains the following troubleshooting topics:
l Troubleshooting methodologies on page 2503
l Troubleshooting scenarios on page 2506
l Checking the system date and time on page 2507
l Checking the hardware connections on page 2508
l Checking FortiOS network settings on page 2509
l Troubleshooting CPU and network resources on page 2512
l FortiGuard server settings on page 2548
l Troubleshooting high CPU usage on page 2513
l Checking the modem status on page 2517
l Running ping and traceroute on page 2518
l Checking the logs on page 2521
l Verifying routing table contents in NAT mode on page 2522
l Verifying the correct route is being used on page 2523
l Verifying the correct firewall policy is being used on page 2523
l Checking the bridging information in transparent mode on page 2524
l Checking wireless information on page 2525
l Performing a sniffer trace (CLI and packet capture) on page 2526
l Debugging the packet flow on page 2529
l Testing a proxy operation on page 2532
l Displaying detail Hardware NIC information on page 2532
l Performing a traffic trace on page 2534
l Using a session table on page 2535
l Finding object dependencies on page 2539
l Diagnosing NPU-based interfaces on page 2540
l Identifying the XAUI link used for a specific traffic stream on page 2540
l Running the TAC report on page 2542
l Using the process monitor on page 2542
l Other commands on page 2544
l FortiGuard troubleshooting on page 2547
l View open and in use ports on page 2550
l Additional resources on page 2550
Troubleshooting methodologies
The sections in this topic provide an overview of how to prepare to troubleshoot problems in FortiGate. They include
verifiying your user permissions, establishing a baseline, defining the problem, and creating a plan.
If you are using a FortiGate that has virtual domains (VDOMs) enabled, you can often
troubleshoot within your own VDOM. However, you should inform the super_admin for the
FortiGate that you will be performing troubleshooting tasks.
You may also need access to other networking equipment, such as switches, routers, and
servers to carry out tests. If you do not have access to this equipment, contact your network
administrator for assistance.
Establish a baseline
FortiGate operates at all layers of the OSI model. For this reason, troubleshooting can be complex. Establishing baseline
parameters for your system before a problem occurs helps to reduce the complexity when you need to troubleshoot.
A best practice is to establish and record the normal operating status. Regular operation data shows trends, and allows
you to see where changes occur when problems arise. You can gather this data by using logs and SNMP tools to
monitor the system performance or by regularly running information gathering commands and saving the output.
You should back up your FortiOS configuration on a regular basis even when you are not
troubleshooting. You can restore the backed up configuration as needed to save time
recreating it from the factory default settings.
Use the following CLI commands to obtain normal operating data for a FortiGate:
get system status Displays firmware versions and FortiGuard engine versions, and
other system information.
get system performance status Displays CPU and memory states, average network usage, average
sessions and session setup rate, viruses caught, IPS attacks blocked,
and uptime.
get hardware memory Displays information about memory.
You can run any commands that apply to your system for information gathering. For example, if you have active VPN
connections, use the get vpn series of commands to get more information about them.
Use execute tac report to get an extensive snapshot of your system. This command runs many diagnostic
commands for specific configurations. It also records the current state of each feature regardless of the features
deployed on your FortiGate. If you need to troubleshoot later, you can run the same command again and compare the
differences to identify any suspicious output.
The following questions are intended to compare the current behavior of the FortiGate with normal operations to help
you define the problem. Be specific with your answers. After you define the problem, search for a solution in the
troubleshooting scenarios section, and then create a plan to resolve it.
What is the problem? The problem being observed may not be the actual problem. You should
determine where the problem lies before starting to troubleshoot the FortiGate.
Was the device working If the device never worked, it might be defective. For more information, see
before? Troubleshooting your installation on page 68.
Can the problem be If the problem is intermittent, it may be dependent on system load.
reproduced? Intermittent problems are challenging to troubleshoot because they are difficult to
reproduce.
What has changed? Use the FortiGate event log to identify possible configuration changes.
There may be changes in the operating environment. For example, there might be
a gradual increase in load as more sites are forwarded through the firewall.
If something has changed, roll back the change and assess the impact.
What is the scope of the After you isolate the problem, determine what applications, users, devices, and
problem? operating systems the problem affects.
The following questions are intended to narrow the scope of the problem and
identify what to check during troubleshooting. The more factors you can eliminate,
the less you need to check. For this reason, be as specific and accurate as
possible when gathering information.
l What is not working?
After you define the problem and its scope, develop a troubleshooting plan.
Create checklist Make a list all the possible causes of the problem and how you can test for each
cause.
Create a checklist to keep track of what has been tried and what is left to test.
Checklists are useful when more than one person is performing troubleshooting
tasks.
Obtain the required equipment Testing your solution may require additional networking equipment, computers, or
other devices.
Network administrators usually have additional networking equipment available to
loan you, or a lab where you can bring the FortiGate unit to test.
If you do not have access to equipment, check for shareware applications that can
perform the same tasks. Often, there are software solutions you can use when
hardware is too expensive.
Consult Fortinet After the checklist is created, refer to the troubleshooting scenarios sections to
troubleshooting resources assist with implementing your plan. See Troubleshooting scenarios on page
2506.
Gather information for If you still require technical assistance after the plan is implemented, be prepared
technical support to provide Fortinet technical support with following information:
l Firmware build version (use the get system status command)
Do not provide the output from the execute tac report unless
the support team requests it. The output from this command is
very large and is not required in many cases.
Contact technical support Before contacting technical support, ensure you have login access (preferably
with full read/write privileges) to all networking devices that could be relevant to
troubleshooting.
If you are using VMs, be prepared to have someone who can log in to the virtual
hosting platform in case it is necessary to check and possibly modify resource
allocation.
For information about contacting technical support, go to FortiCare Support
Service page.
Troubleshooting scenarios
The following table is intended to help you diagnose common problems and provides links to the corresponding
troubleshooting topics:
Hardware l Are all of the cables and interfaces Checking the hardware connections on page
connections connected properly? 2508
l Is the LED for the interface green?
FortiOS network l If you are having problems connecting to Checking FortiOS network settings on page
settings the management interface, is your 2509
protocol enabled on the interface for
administrative access?
l Does the interface have an IP address?
CPU and memory l Is the CPU running at almost 100 Troubleshooting CPU and network resources
resources percent usage? on page 2512
l Is your FortiGate running low on
memory?
Modem status l Is the modem connected? Checking the modem status on page 2517
l Are there PPP issues?
Ping and traceroute Is the FortiGate experiencing complete Running ping and traceroute on page 2518
packet loss?
Logs Do you need to identify a problem? Checking the logs on page 2521
Contents of the l Are there routes in the routing table for Verifying routing table contents in NAT mode
routing table (in default and static routes? on page 2522
NAT mode) l Do all connected subnets have a route in
the routing table?
l Does a route have a higher priority than
it should?
Traffic routes Is the traffic routed correctly? Verifying the correct route is being used on
page 2523
Firewall policies Is the correct firewall policy applied to the Verifying the correct firewall policy is being
expected traffic? used on page 2523
Bridging Are you having problems in transparent Checking the bridging information in
information in mode? transparent mode on page 2524
transparent mode
Firewall session l Are there active firewall sessions? Using a session table on page 2535
list
Wireless Network Is the wireless network working properly? Checking wireless information on page 2525
FortiGuard Is the FortiGate communicating properly with Verifying connectivity to FortiGuard on page
connectivity FortiGuard? 2547
Sniffer trace l Is traffic entering the FortiGate? Does Performing a sniffer trace (CLI and packet
the traffic arrive on the expected capture) on page 2526
interface?
l Is the ARP resolution correct for the
next-hop destination?
l Is the traffic exiting the FortiGate to the
destination as expected?
l Is the FortiGate sending traffic back to
the originator?
Packet flow Is traffic entering or leaving the FortiGate as Debugging the packet flow on page 2529
expected?
The system date and time are important for FortiGuard services, logging events, and sending alerts. The wrong time
makes the log entries confusing and difficult to use.
When possible, use Network Time Protocol (NTP) to set the date and time. This is an automatic method that does not
require manual intervention. However, you must ensure that the port is allowed through the firewalls on your network.
FortiToken synchronization requires NTP in many situations.
For information about setting the system date and time, see Setting the system time on page 1875.
1. Go to Dashboard > Status. The date and time are displayed in the System Information widget, next to System Time.
2. Go to System > Settings.
3. In the System Time section, select NTP, and then configure the Time Zone, and Set Time settings as required.
execute date
execute time
Use the set timezone ? command to display a list of timezones and the integers that represent them.
config system global
set timezone <integer>
end
config system ntp
set type custom
config ntpserver
edit 1
set server “ntp1.fortinet.net”
next
edit 2
set server “ntp2.fortinet.net”
next
end
set ntpsync enable
set syncinterval 60
end
If traffic is not flowing from the FortiGate, there may be a problem with the hardware connection.
l You are unsure of the type or quality of the cable, such as straight through or crossover.
You should still perform basic software connectivity tests to ensure complete connectivity even if there was a problem
with the hardware connection. The interface might also be disabled, or its Status might be set to Down. See Interfaces on
page 130.
1. Go to Network > Interfaces.
2. Select an interface, such as Port1, and click Edit.
3. In the Miscellaneous area, next to Status, click Enabled.
4. Click OK.
edit port1
set status up
next
end
Check the FortiOS network settings if you have problems connecting to the management interface. FortiOS network
settings include, interface settings, DNS Settings, and DHCP settings.
Interface settings
If you can access the FortiGate with the management cable only, you can view the interface settings in the GUI.
Setting Description
Link Status The status is Up when a valid cable is plugged in. The status is Down when an
invalid cable is plugged in.
The Link Status is shown physically by the connection LED for the interface. If the
LED is green, the connection is good. If Link Status is Down, the interface does not
work.
Link status also appears in the Network > Interfaces page by default.
Addressing mode Do not use DHCP if you do not have a DHCP server. You will not be able to log into
an interface in DHCP mode as it will not have an IP address.
IP/Network Mask An interface requires an IP address to connect to other devices. Ensure there is a
valid IP address in this field. The one exception is when DHCP is enabled for this
interface to get its IP address from an external DHCP server.
IPv6 address The same protocol must be used by both ends to complete the connection. Ensure
this interface and the remote connection are both using IPv4 or both are using IPv6
addresses.
Administrative access If no protocols are selected, you will have to use the local management cable to
connect to the unit. If you are using IPv6, configure the IPv6 administrative access
protocols.
Status Ensure the status is set to Up or the interface will not work.
DNS settings
DHCP servers are common on internal and wireless networks. The DHCP server will cause problems if it is not
configured correctly.
There are some situations, such as a new wireless interface, or during the initial FortiGate
configuration, where interfaces override the system DNS entries. When this happens, it often
shows up as intermittent Internet connectivity.
To fix the problem, go to Network > DNS, and enable Use FortiGuard Servers.
Check the CPU and memory resources when the FortiGate is not working, the network is slow, or there is a reduced
firewall session setup rate. All processes share the system resources in FortiOS, including CPU and memory.
Sample output:
The first line of the output shows the CPU usage by category:
CPU states: 0% user 0% system 0% nice 100% idle 0% iowait 0% irq 0% softirq
Memory usage should not exceed 90%. Using too much memory prevents some processes from functioning properly.
For example, if the system is running low on memory, antivirus scanning enters into failopen mode where it drops
connections or bypasses the antivirus system.
Other lines of output, such as average network usage, average session setup rate, viruses caught,
and IPS attacks blocked, help determine why system resource usage is high.
For example:
l A high average network usage may indicate high traffic processing on the FortiGate,
l A very low or zero, average session setup rate may indicate the proxy is overloaded and unable to do its
job.
If the FortiGate has stopped working, the first line of the output will look similar to this:
CPU states: 0% user 0% system 0% nice 100% idle
Network is slow
If your network is running slow, the first line of the output will look similar to this:
CPU states: 1% user 98% system 0% nice 1% idle
This example shows that all of the CPU is being used by system processes, and the FortiGate is overloaded. When
overloading occurs, it is possible a process such as scanunitid is using all the resources to scan traffic. In this case
you need to reduce the amount of traffic being scanned by blocking unwanted protocols, configuring more security
policies to limit scanning to certain protocols, or similar actions.
It is also possible a hacker has accessed your network and is overloading it with malicious activity, such as running a
spam server or using zombie PCs to attack other networks on the Internet.
You can use the following command to investigate the problem with the CPU:
get system performance top
This command shows all of the top processes that are running on the FortiGate and their CPU usage. The process
names are on the left. If a process is using most of the CPU cycles, investigate it to determine whether the activity is
normal.
A reduced firewall session setup rate can be caused by a lack of system resources on the FortiGate, or reaching the
session count limit for a VDOM.
As a best practice, administrators should record the session setup rate during normal
operation to establish a baseline to help define a problem when your are troubleshooting.
The session setup rate appears in the average sessions section of the output.
A reduced firewall session setup rate will look similar to this:
Average sessions: 80 sessions in 1 minute, 30 sessions in 10 minutes, 42 sessions in 30
minutes
Average session setup rate: 3 sessions per second in last 1 minute, 0 sessions per second in
last 10 minutes, 0 sessions per second in last 30 minutes
In the example above, there were 80 sessions in 1 minute, or an average of 3 sessions per second.
The values for 10 minutes and 30 minutes allow you to take a longer average for a more reliable value if your
FortiGate is working at maximum capacity. The smallest FortiGate can have 1,000 sessions established per second
across the unit.
The session setup rate is a global command. If you have multiple VDOMs configured with
many sessions in each VDOM, the session setup rate per VDOM will be slower than if there
are no VDOMs configured.
As with any system, a FortiGate has limited hardware resources, such as memory, and all processes running on the
FortiGate share the memory. Each process uses more or less memory, depending on its workload. For example, a
process usually uses more memory in high traffic situations. If some processes use all of the available memory, other
processes will not be able to run.
When high memory usage occurs, the services may freeze up, connections may be lost, or new connections may be
refused.
If you see high memory usage in the Memory widget, the FotiGate may be handling high traffic volumes. Alternatively,
the FortiGate may have problems with connection pool limits that are affecting a single proxy. If the FortiGate receives
large volumes of traffic on a specific proxy, the unit may exceed the connection pool limit. If the number of free
connections within a proxy connection pool reaches zero, issues may occur.
Sample output:
Connection-related problems may occur when FortiGate's CPU resources are over extended. This occurs when you
deploy too many FortiOS features at the same time.
You can view CPU usage levels in the GUI or CLI. For precise usage values for both overall usage and specific
processes, use the CLI.
Go to Dashboard > Status. Real-time CPU usage information is located in the CPU widget.
Sample output:
The following table explains the codes in the second line of the output:
Code Description
U Percentage of user space applications that are currently using the CPU
N Percentage of time that the CPU spent on low priority processes since the last shutdown
S Percentage of system processes (or kernel processes) that are using the CPU
I Percentage of idle CPU resources
WA Percentage of time that the CPU spent waiting on IO peripherals since the last shutdown
HI Percentage of time that the CPU spent handling hardware interrupt routines since the last shutdown
SI Percentage of time that the CPU spent handling software interrupt routines since the last shutdown
ST Steal time: Percentage of time a virtual CPU waits for the physical CPU when the hypervisor is
servicing another virtual processor
T Total FortiOS system memory in MB
F Free memory in MB
Each additional line of the command output displays information specific to processes or threads that are running on the
FortiGate unit. For example, the sixth line of the output is: newcli 20195 R 0.1 0.1
The following table describes the data in the sixth line of the output:
Item Description
newcli The process (or thread) name.
Duplicate process or thread names indicate that separate instances of that process or thread are
running.
20195 The process or thread ID, which can be any number.
R Current state of the process or thread. The process or thread state can be:
l R - running
l S - sleep
l Z - zombie
l D- disk sleep
0.1 The percentage of CPU capacity that the process or thread is using.
CPU usage can range from 0.0 for a process or thread that is sleeping to higher values for a process
or thread that's taking a lot of CPU time.
0.1 The amount of memory that the process or thread is using.
Memory usage can range from 0.1 to 5.5 and higher.
You can use the following single-key commands when running diagnose sys top or diagnose sys top-all:
l q to quit and return to the normal CLI prompt.
l p to sort the processes by the amount of CPU that the processes are using.
l m to sort the processes by the amount of memory that the processes are using.
The output only displays the top processes or threads that are running. For example, if 20 are listed, they are the top 20
currently running, sorted by either CPU or memory usage. You can configure the number of processes or threads
displayed, using the following CLI commands:
diagnose sys top <integer_seconds> <integer_maximum_lines>
diagnose sys top-all <integer_seconds> <integer_maximum_lines>
Where:
l <integer_seconds> is the delay in seconds (default is 5)
l <integer_maximum_lines> is the maximum number of lines (or processes) to list (default is 20)
You can use the CLI to view the top few processes that are currently running and using the most CPU resources.
The entries at the top are using the most CPU resources. The second column from the right shows CPU usage by
percentage. Note which processes are using the most resources and try to reduce their CPU load.
Processes you will see include:
l ipsengine: the IPS engine that scans traffic for intrusions
l scanunitd: antivirus scanner
l httpsd: secure HTTP
l iked: internet key exchange (IKE) in use with IPsec VPN tunnels
l newcli: active whenever you're accessing the CLI
l sshd: there are active secure socket connections
l cmdbsrv: the command database server application
Go to the features that are at the top of the list and look for evidence of CPU overuse. Generally, the monitor for a feature
is a good place to start.
These are some best practices that will reduce your CPU usage, even if the FortiGate is not experiencing high CPU
usage. Note that if the following information instructs you to turn off a feature that you require, disregard that part of the
instructions.
l Use hardware acceleration wherever possible to offload tasks from the CPU. Offloading tasks, such as encryption,
frees up the CPU for other tasks.
l Schedule antivirus, IPS, and firmware updates during off-peak hours. These updates do not usually consume CPU
resources but they can disrupt normal operation.
l Check the log levels and which events are being logged. This is the severity of the messages that are recorded.
Consider going up one level to reduce the amount of logging. Also, if there are events you do not need to monitor,
remove them from the list.
l Log to FortiCloud instead of logging to memory or disk. Logging to memory quickly uses up resources and logging
to local disk impacts overall performance and reduces the lifetime of the unit.
Fortinet recommends logging to FortiCloud to avoid using too much CPU.
l If the disk is almost full, transfer the logs or data off the disk to free up space. When a disk is almost full it consumes
a lot of resources to find free space and organize the files.
l If packet logging is enabled on the FortiGate, consider disabling it. When packet logging is enabled, it records every
packet that comes through that policy.
l Halt all sniffers and traces.
l Ensure the FortiGate isn't scanning traffic twice. Traffic does not need to be rescanned if it enters the FortiGate on
one interface, goes out another, and then comes back in again. Doing so is a waste of resources. However, ensure
that traffic truly is being scanned once.
l Reduce the session timers to close unused sessions faster. Enter the following CLI commands, which reduce the
default values. Note that, by default, the system adds 10 seconds to tcp-timewait.
config system global
set tcp-halfclose-timer 30
set tcp-halfopen-timer 30
set tcp-timewait-timer 0
set udp-idle-timer 60
end
l Go to System > Feature Visibility, and enable only features that you need.
SNMP monitoring
When CPU usage is under control, use SNMP to monitor CPU usage. Alternatively, use logging to record CPU and
memory usage every 5 minutes.
Once the system is back to normal, you should set up a warning system that sends alerts when CPU resources are used
excessively. A common method to do this is using SNMP. SNMP monitors many values in FortiOS and allows you to set
high water marks that generate events. You can run an application on your computer to watch for and record these
events.
To enable SNMP:
You can use the System Resources widget to record CPU usage if SNMP is too complicated.
However, the widget only records problems as they happen and will not send you alerts for
problems.
You can use the CLI to troubleshoot a modem that is not working properly, or troubleshoot a FortiGate that does not
detect the modem.
diagnose sys modem {cmd | com | detect | history | external-modem | query| reset}
You should always run the following command after you connect a USB modem to FortiGate:
diagnose sys modem detect
Use the following command to view the modem's configuration, vendor and custom product identification number:
get system modem
Ping and traceroute are useful tools in network troubleshooting. Alone, either tool can determine network connectivity
between two points. However, ping can be used to generate simple network traffic that you can view using diagnose
commands in FortiGate. This combination can be very powerful when you are trying to locate network problems.
Ping and traceroute can also tell you if your computer or network device has access to a domain name server (DNS).
Both tools can use IP addresses or device domain names to determine why particular services, such as email or web
browsing, may not work properly.
If ping does not work, it may be disabled on at least one of the interface settings and security
policies for that interface.
Both ping and traceroute require particular ports to be open on firewalls to function. Since you typically use these tools to
troubleshoot, you can allow them in the security policies and on interfaces only when you need them. Otherwise, keep
the ports disabled for added security.
Ping
The ping command sends a very small packet to a destination, and waits for a response. The response has a timer that
expires when the destination is unreachable.
Ping is part of layer 3 on the OSI Networking Model. Ping sends Internet Control Message Protocol (ICMP) “echo
request” packets to the destination, and listens for “echo response” packets in reply. However, many public networks
block ICMP packets because ping can be used in a denial of service (DoS) attack (such as Ping of Death or a smurf
attack), or by an attacker to find active locations on the network. By default, FortiGate units have ping enabled while
broadcast-forward is disabled on the external interface.
Beyond the basic connectivity information, ping can tell you the amount of packet loss (if any), how long it takes the
packet to make the round trip, and the variation in that time from packet to packet.
If packet loss is detected, you should investigate the following:
l Possible ECMP, split horizon, or network loops.
l Cabling, to ensure there are no loose connections.
Ping syntax is the same for nearly every type of system on a network.
1. Go to Dashboad, and connect to the CLI through either telnet or the CLI widget.
2. Enter execute ping 10.11.101.101 to send 5 ping packets to the destination IP address. There are no
options for this command.
Head_Office_620b # execute ping 10.11.101.101
PING 10.11.101.101 (10.11.101.101): 56 data bytes
64 bytes from 10.11.101.101: icmp_seq=0 ttl=255 time=0.3 ms
64 bytes from 10.11.101.101: icmp_seq=1 ttl=255 time=0.2 ms
64 bytes from 10.11.101.101: icmp_seq=2 ttl=255 time=0.2 ms
64 bytes from 10.11.101.101: icmp_seq=3 ttl=255 time=0.2 ms
64 bytes from 10.11.101.101: icmp_seq=4 ttl=255 time=0.2 ms
1. Go to a shell prompt.
2. Enter “ping 10.11.101.101”.
Traceroute
Where ping will only tell you if it reached its destination and returned successfully, traceroute shows each step of the
journey to its destination and how long each step takes. If ping finds an outage between two points, you can use
traceroute to locate exactly where the problem is.
Traceroute works by sending ICMP packets to test each hop along the route. It sends three packets, and then increases
the time to live (TTL) setting by one each time. This effectively allows the packets to go one hop farther along the route.
This is why most traceroute commands display their maximum hop count before they start tracing the route, which is the
maximum number of steps it takes before it declares the destination unreachable. Also, the TTL setting may result in
steps along the route timing out due to slow responses. There are many possible reasons for this to occur.
By default, traceroute uses UDP datagrams with destination ports numbered from 33434 to 33534. The traceroute utility
may also offer the option to select use of ICMP echo request (type 8) instead, which the Windows tracert utility uses. If
you must, allow both protocols inbound through the FortiGate security policies (UDP with ports from 33434 to 33534 and
ICMP type 8).
Go to Policy & Objects > Firewall Policy and view the packet count column.
This allows you to verify the connection and confirm which security policy the traceroute packets are using.
Both ping and traceroute verify connectivity between two points. However, only traceroute shows you each step in the
connection path. Also, ping and traceroute use different protocols and ports, so one may succeed where the other fails.
You can verify your DNS connection using traceroute. If you enter an FQDN instead of an IP address for the traceroute,
DNS tries to resolve that domain name. If the name isn't resolved, you have DNS issues.
Using traceroute
The traceroute command varies slightly between operating systems. In Microsoft Windows, the command name is
shortened to “tracert”. Also, your output lists different domain names and IP addresses along your route.
6 25 ms 45 ms 53 ms te8-7.mpd01.cogentco.com [154.54.27.249]
7 89 ms 70 ms 36 ms te3-x.mpd01.cogentco.com [154.54.6.206]
8 55 ms 77 ms 58 ms sl-st30-chi-.sprintlink.net [144.232.9.69]
9 53 ms 58 ms 46 ms sl-0-3-3-x.sprintlink.net [144.232.19.181]
10 82 ms 90 ms 75 ms sl-x-12-0-1.sprintlink.net [144.232.20.61]
11 122 ms 123 ms 132 ms sl-0-x-0-3.sprintlink.net [144.232.18.150]
12 129 ms 119 ms 139 ms 144.232.20.7
13 172 ms 164 ms 243 ms sl-321313-0.sprintlink.net [144.223.243.58]
14 99 ms 94 ms 93 ms 203.78.181.18
15 108 ms 102 ms 89 ms 203.78.176.2
16 98 ms 95 ms 97 ms 208.70.202.225
The first column on the left is the hop count, which cannot exceed 30 hops. When that number is reached, the
traceroute ends.
The second, third, and fourth columns display how much time each of the three packets takes to reach this stage of
the route. These values are in milliseconds and normally vary quite a bit. Typically a value of <1ms indicates a local
connection.
The fifth column (farthest to the right) shows the domain name of the device and its IP address, or possibly only the
IP address.
A log message records the traffic passing through FortiGate to your network and the action FortiGate takes when it
scans the traffic. You should log as much information as possible when you first configure FortiOS. If FortiGate logs are
too large, you can turn off or scale back the logging for features that are not in use.
It is difficult to troubleshoot logs without a baseline. Before you can determine if the logs indicate a problem, you need to
know what logs result from normal operation.
Verify the contents of the routing table when a FortiGate has limited or no connectivity.
The routing table stores the routes currently in use for both static and dynamic protocols. Storing a route in the routing
table saves time and resources performing a lookup. To ensure the most recently used routes remain in the table, old
routes are bumped to make room for new ones. You cannot perform this task when FortiGate is in transparent mode.
If FortiGate is running in NAT mode, verify that all desired routes are in the routing table, including local subnets, default
routes, specific static routes, and dynamic routing protocols.
Sample output:
Run a trace route from a machine in the local area network (LAN) to ensure traffic is flowing as expected through the
correct route when there is more than one default route.
In the following example output:
l The first hop contains the IP address 10.10.1.99, which is the internal interface of the FortiGate.
l The second hop contains the IP address 172.20.120.2, to which the wan1 interface of the FortiGate is
connected.
This means the route through the wan1 interface is being used for this traffic.
C:\>tracert www.fortinet.com
Tracing route to www.fortinet.com [66.171.121.34]
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms 10.10.1.99
2 1 ms <1 ms <1 ms 172.20.120.2
3 3 ms 3 ms 3 ms static-209-87-254-221.storm.ca [209.87.254.221]
4 3 ms 3 ms 3 ms core-2-g0-2.storm.ca [209.87.239.129]
5 13 ms 13 ms 13 ms core-3-bdi1739.storm.ca [209.87.239.199]
6 12 ms 19 ms 11 ms v502.core1.tor1.he.net [216.66.41.113]
7 22 ms 22 ms 21 ms 100ge1-2.core1.nyc4.he.net [184.105.80.9]
8 84 ms 84 ms 84 ms ny-paix-gni.twgate.net [198.32.118.41]
9 82 ms 84 ms 82 ms 217-228-160-203.TWGATE-IP.twgate.net [203.160.22
8.217]
10 82 ms 81 ms 82 ms 229-228-160-203.TWGATE-IP.twgate.net [203.160.22
8.229]
11 82 ms 82 ms 82 ms 203.78.181.2
12 84 ms 83 ms 83 ms 203.78.186.70
13 84 ms * 85 ms 66.171.127.177
14 84 ms 84 ms 84 ms fortinet.com [66.171.121.34]
15 84 ms 84 ms 83 ms fortinet.com [66.171.121.34]
You can also see the route taken for each session by debugging the packet flow in the CLI. For more information, see
Debugging the packet flow on page 2529.
If you have more than one firewall policy, you can check which policy is being used in the Policy & Objects module in the
GUI.
Checking the bridging information is useful when you are experiencing connectivity problems. When FortiGate is set to
transparent mode, it acts like a bridge and sends all incoming traffic out on the other interfaces. Each bridge is a link
between interfaces.
When traffic is flowing between the interfaces, you can see the bridges listed in the CLI. If no bridges are listed, this is the
likely cause of the connectivity issue. When investigating bridging information, check for the MAC address of the
interface or device in question.
Sample output:
You can use forwarding domains, or collision domains, in routing to limit where packets are forwarded on the network.
Layer 2 broadcasts are limited to the same group. By default, all interfaces are in group 0. For example, if the FortiGate
has 12 interfaces, only two may be in the same forwarding domain, which limits packets that are broadcast to those two
interfaces. This reduces traffic on the rest of the network.
Collision domains prevent the forwarding of ARP packets to all VLANs on an interface. Without collision domains,
duplicate MAC addresses on VLANs may cause ARP packets to be duplicated. Duplicate ARP packets can cause some
switches to reset. It's important to know what interfaces are part of which forwarding domains because this determines
which interfaces can communicate with each other.
Where <name> is the name of the forwarding domain to display and <id> is the domain ID.
Sample output:
id=101 dev=trunk_1 6
Sample output:
Sample output:
Check wireless connections, stations, and interfaces when the problem is not caused by a physical interface.
This example uses the station MAC address to find where it is failing:
When you troubleshoot networks and routing in particular, it helps to look inside the headers of packets to determine if
they are traveling the route that you expect them to take. Packet sniffing is also known as network tap, packet capture, or
logic analyzing.
For FortiGates with NP2, NP4, or NP6 interfaces that are offloading traffic, disable offloading
on these interfaces before you perform a trace or it will change the sniffer trace.
Sniffing packets
Before you start sniffing packets, you should prepare to capture the output to a file. A large amount of data may scroll by
and you will not be able to see it without saving it first. One method is to use a terminal program like puTTY to connect to
the FortiGate CLI. Once the packet sniffing count is reached, you can end the session and analyze the output in the file.
The general form of the internal FortiOS packet sniffer command is:
# diagnose sniffer packet <interface_name> <‘filter’> <verbose> <count> <tsformat>
<interface_name> The name of the interface to sniff, such as port1 or internal. This can also be
any to sniff all interfaces.
<‘filter’> What to look for in the information the sniffer reads. none indicates no filtering,
and all packets are displayed as the other arguments indicate.
The filter must be inside single quotes (‘).
<verbose> The level of verbosity as one of:
l 1 - print header of packets
This displays the next three packets on the port1 interface using no filtering, and verbose level 1. At this verbosity level,
you can see the source IP and port, the destination IP and port, action (such as ack), and sequence numbers.
In the output below, port 443 indicates these are HTTPS packets and that 172.20.120.17 is both sending and receiving
traffic.
Head_Office_620b # diagnose sniffer packet port1 none 1 3
interfaces=[port1]
filters=[none]
0.545306 172.20.120.17.52989 -> 172.20.120.141.443: psh 3177924955 ack 1854307757
0.545963 172.20.120.141.443 -> 172.20.120.17.52989: psh 1854307757 ack 3177925808
0.562409 172.20.120.17.52988 -> 172.20.120.141.443: psh 4225311614 ack 3314279933
The following commands will report packets on any interface that are traveling between a computer with the host name
of “PC1” and a computer with the host name of “PC2”. With verbosity 4 and above, the sniffer trace displays the interface
names where traffic enters or leaves the FortiGate unit. To stop the sniffer, type CTRL+C.
FGT# diagnose sniffer packet any "host <PC1> or host <PC2>" 4
or
FGT# diagnose sniffer packet any "(host <PC1> or host <PC2>) and icmp" 4
The following CLI command for a sniffer includes the ARP protocol in the filter which may be useful to troubleshoot a
failure in the ARP resolution. For example, PC2 may be down and not responding to the FortiGate ARP requests.
FGT# diagnose sniffer packet any "host <PC1> or host <PC2> or arp" 4
To use packet capture, the FortiGate must have a disk. You can enable the capture-packet in the firewall policy.
Max Packets to Save Enter the number of packets to capture before the filter stops.
This number cannot be zero. You can halt the capturing before this number is
reached.
VLAN(s) Enter one or more VLANs (if any). Separate multiple VLANs with commas.
Protocol Enter one or more protocols. Separate multiple protocols with commas. To enter a
range, use a dash without spaces. For example, 1-6, 17, 21-25.
Include IPv6 Packets Select this option if you are troubleshooting IPv6 networking, or if your network
uses IPv6. Otherwise, leave it disabled.
Include Non-IP Packets The protocols in the list are all IP based except for ICMP (ping).
Use this feature to capture non-IP based packets. Examples of non-IP packets
include IPsec, IGMP, ARP, and ICMP.
Managing filters
If you select a filter, you have the option to start and stop packet capture in the edit window, or download the captured
packets. You can also see the filter status and the number of packets captured.
You can select the filter and start capturing packets. When the filter is running, the number of captured packets increases
until it reaches the Max Packet Count or you stop it. You cannot download the output file while the filter is running.
To start, stop, or resume packet capture, use the symbols on the screen. These symbols are the same as those used for
audio or video playback. Hover over the symbol to reveal explanatory text. Similarly, to download the *.pcap file, use the
download symbol on the screen.
You can download the *.pcap file when the packet capture is complete. You must use a third party application, such as
Wireshark, to read *,pcap files. This tool provides you with extensive analytics and the full contents of the packets that
were captured.
Debug the packet flow when network traffic is not entering and leaving the FortiGate as expected. Debugging the packet
flow can only be done in the CLI. Each command configures a part of the debug action. The final commands starts the
debug.
Variable Description
addr IPv4 or IPv6 address
clear clear filter
daddr destination IPv4 or IPv6 address
dport destination port
negate inverse IPv4 or IPv6 filter
port port
proto protocol number
saddr source address
sport source port
vd index of virtual domain; -1 matches all
If FortiGate is connected to FortiAnalyzer or FortiCloud, the diagnose debug flow output will be
recorded as event log messages and then sent to the devices. Do not run this command
longer than necessary, as it generates a significant amount of data.
FortiASIC NP4 or NP6 interface pairs that offload traffic will change the packet flow. Before
debugging any NP4 or NP6 interfaces, disable offloading on those interfaces.
To do this, enter diagnose npu <interface pair> fastpath disable, where
interface pair is np4, np6, np4lite, or np6lite.
The following example shows the flow trace for a device with an IP address of 203.160.224.97:
# diagnose debug enable
# diagnose debug flow filter addr 203.160.224.97
# diagnose debug flow show function-name enable
# diagnose debug flow trace start 100
To observe the debug flow trace, connect to the website at the following address:
https://www.fortinet.com
Matched security policy. Check to see which policy this session matches:
id=20085 trace_id=209 func=fw_forward_handler line=317
msg="Allowed by Policy-3: SNAT"
ACK received:
id=20085 trace_id=211 func=resolve_ip_tuple_fast line=2700
msg="vd-root received a packet(proto=6,
192.168.3.221:1487->203.160.224.97:80) from port5."
The <option> value will depend on the application value used in the command.
For example, if the application is http, the CLI command that displays the <option> values is:
diagnose test application http ?
Monitoring the hardware NIC is important because interface errors indicate data link or physical layer issues which may
impact the performance of the FortiGate.
Sample output:
Tx_Bytes=1269751248
Rx_Errors=0
Tx_Errors=0
Rx_Dropped=0
Tx_Dropped=0
[……]
Error descriptions
The diagnose hardware deviceinfo nic command displays a list of error names and values that are related to
hardware.
The following table describes possible hardware errors:
Field Description
Rx_Missed_Errors Equals Rx_FIFO_Errors + CEXTERR (Carrier Extension Error Count); only valid in 1000M
mode, which is marked by PHY
Tx_Errors = Tx_ ECOL (Excessive Collisions Count); only valid in half-duplex mode
Aborted_Errors
Collisions Total number of collisions experienced by the transmitter; valid in half-duplex mode
Field Description
Tx_Carrier_Errors The PHY should assert the internal carrier sense signal during every transmission. Failure to
do so may indicate that the link has failed or the PHY has an incorrect link configuration. This
register only increments if transmits are enabled. This register isn't valid in internal SerDes 1
mode (TBI mode for the 82544GC/EI) and is valid only when the Ethernet controller is
operating at full duplex.
Tx_Single_Collision_ Counts the number of times that a successfully transmitted packet encountered a single
Frames collision
The value increments only if transmits are enabled and the Ethernet controller is in half-duplex
mode.
Tx_Multiple_ A Multiple Collision Count which indicates the number of times that a transmit encountered
Collision_Frames more than one collision, but less than 16. The value increments only if transmits are enabled
and the Ethernet controller is in half-duplex mode.
This register only increments if transmits are enabled. This counter does not increment for
streaming transmits that are deferred due to TX IPG.
Symbol Error Count Counts the number of symbol errors between reads - SYMERRS.
The count increases for every bad symbol that's received, whether or not a packet is currently
being received and whether or not the link is up. This register increments only in internal
SerDes mode.
Traffic tracing allows you to follow a specific packet stream. This is useful when you want to confirm that packets are
using the route you expect them to take on your network.
Use this command to view the characteristics of a traffic session though specific security policies.
diagnose sys session
A session is a communication channel between two devices or applications across the network. Sessions allow FortiOS
to inspect and act on a sequential group of packets in a session all at once instead of inspecting each packet individually.
Each session has an entry in the session table that includes important information about the session.
You can view FortiGate session tables from the FortiGate GUI or CLI. The most useful troubleshooting data comes from
the CLI. The session table in the GUI also provides useful summary information, particularly the current policy number
that the session is using.
Session tables are useful when verifying open connections. For example, if you have a web browser open to browse the
Fortinet website, you would expect a session entry from your computer on port 80 to the IP address for the Fortinet
website.
You can also use a session table to investigate why there are too many sessions for FortiOS to process.
GUI
Every program and device on your network must have an open communication channel or session to pass information.
FortiGate manages these sessions with features such as traffic shaping, antivirus scanning, and blocking known bad
websites. Each session will have an entry in the session table.
If a secure web browser session is not working properly, you can check the session table to ensure the session is still
active and going to the proper address. The session table can also tell you the security policy number it matches, so you
can check what is happening in that policy.
You need to be able to identify the session you want. To do this, you will need:
l The source IP address (usually your computer)
l The destination IP address (if you have it)
l The port number which is determined by the program you are using. Common ports are:
l Port 80 (HTTP for web browsing)
Go to Security Fabric > Physical Topology. From the Metrics dropdown, select Sessions.
To find your session, search for your source IP address, destination IP address (if you have it), and port number. The
policy ID is listed after the destination information.
If there are multiple pages of sessions, you can use a filter to hide the sessions you do not need. To filter the sessions in
the table, click Add Filter, and select an option from the list. You can filter the table by Destination IP, Source IP, or
Source Port.
CLI
The session table output in the CLI is very large. The CLI command supports filters to show only the data you need.
An entry is placed in the session table for each traffic session passing through a security policy
Value Definition
clear Clear session filter
dintf Destination interface
dport Destination port
dst Destination IP address
duration Duration of the session
expire Expire
negate Inverse filter
nport NAT'd source port
nsrc NAT'd source ip address
policy Policy ID
proto Protocol number
proto-state Protocol state
session-state1 Session state1
session-state2 Session state2
sintf Source interface
sport Source port
src Source IP address
vd Index of virtual domain, -1 matches all
Even though UDP is a sessionless protocol, FortiGate keeps track of the following states:
l When UDP reply does not have a value of 0
l When UDP reply has a value of 1
The following table displays firewall session states from the session table:
State Description
State Description
For example, the session for ftp control channel will have this state but ftp data
channel won't. This is also seen when NAT is enabled.
The firewall session list displays all open sessions in FortiGate. Examine the list for strange patterns, such as no
sessions apart from the internal network, or all sessions are only to one IP address.
When you examine the firewall session list in the CLI, you can use filters to reduce the output.
You can use a filter to limit the sessions displayed by source, destination address, port, or NAT'd address. To use more
than one filter, enter a separate line for each value.
The following example filters the session list based on a source address of 10.11.101.112:
FGT# diagnose sys session filter src 10.11.101.112
FGT# diagnose sys session list
The following example filters the session list based on a destination address of 172.20.120.222.
FGT# diagnose sys session filter dst 172.20.120.222
FGT# diagnose sys session list
Checking source NAT is important when you are troubleshooting from the remote end of the connection outside the
firewall.
When you display the session list in the CLI, you can match the NAT'd source address (nsrc) and port (nport). This is
useful when multiple internal IP addresses are NAT'd to a common external-facing source IP address.
FGT# diagnose sys session filter nsrc 172.20.120.122
FGT# diagnose sys session filter nport 8888
FGT# diagnose sys session list
You may be prevented from deleting a configuration object when other configuration objects depend on it. You can use
the GUI or CLI to identify objects which depend on, or make reference to the configuration you are trying to delete.
Additionally, if you have a virtual interface with dependent objects, you will need to find and remove those dependencies
before deleting the interface.
1. Go to Network > Interfaces. The Ref. column displays the number of objects that reference this interface.
2. Select the number in the Ref . column for the interface. A window listing the dependencies appears.
3. Use these detailed entries to locate and remove object references to this interface. The trash can icon is enabled
after all the object dependencies are removed.
4. Remove the interface by selecting the check box for the interface, and select Delete.
When running multiple VDOMs, use the following command in the global configuration only.
diagnose sys cmdb refcnt show <path.object.mkey>
The command searches for the named object in both the most recently used global and VDOM configurations.
Examples
Sample output:
In this example , the interface has dependent objects, including four address objects, one VIP, and three security
policies.
entry used by table firewall.address:name '10.98.23.23_host’
entry used by table firewall.address:name 'NAS'
entry used by table firewall.address:name 'all'
entry used by table firewall.address:name 'fortinet.com'
entry used by table firewall.vip:name 'TORRENT_10.0.0.70:6883'
entry used by table firewall.policy:policyid '21'
entry used by table firewall.policy:policyid '14'
entry used by table firewall.policy:policyid '19'
Some Fortinet products contain network processors, such as NP4, NP6Lite, or NP6. Offloading requirements will vary
depending on the model.
The diagnose npu np6 xaui-hash command takes a 6-tuple input of the traffic stream to identify the NP6 XAUI link
that the traffic passes through.
This command is only available on the 38xxD, 39xxD, 34xxE, 36xxE, and 5001E series devices.
Syntax
diagnose npu np6 xaui-hash <interface> <proto> <src_ip> <dst_ip> <src_port> <dst_port>
Variable Description
<interface> The network interface that the packets are coming from.
<proto> The proto number, 6 for TCP or 17 for UDP.
<src_ip> The source IP address.
<dst_ip> The destination IP address.
<src_port> The source port.
<dst_port> The destination port.
Examples
The NP6_ID is the NP index of the model that is being used. It can be found with the diagnose npu np6 port-list
command.
Fortinet support may ask you to check the date and time settings for log message timestamp synchronization and for
certificates that have a time requirement to check for validity.
execute time
execute date
If all devices have the same time, it helps to correlate log entries from different devices.
execute time
current time is: 12:40:48
last ntp sync:Thu Mar 16 12:00:21 2006
execute date
current date is: 2006-03-16
If all devices have the same time, it helps to correlate log entries from different devices.
The Technical Assistance Center (TAC) report runs an exhaustive series of diagnostic commands. Some of the
commands are only needed if you are using features, such as HA, VPN tunnels, or a modem. Fortinet support my ask
you to use the report output to provide information about the current state of your FortiGate.
Due the amount of output generated, the report may take a few minutes to run. If you are logging CLI output to a file, you
can run this command to familiarize yourself with the diagnostic commands.
The Process Monitor displays running processes with their CPU and memory usage levels. Administrators can sort,
filter, and terminate processes within the Process Monitor pane.
1. Go to Dashboard > Status:
l Left-click in the CPU or Memory widget and select Process Monitor.
l Click the user name in the upper right-hand corner of the screen, then go to System > Process Monitor.
The Process Monitor appears, which includes a line graph, donut chart, and process list.
2. Click the + beside the search bar to view which columns can be filtered.
1. Select a process.
2. Click the Kill Process dropdown.
l Force Kill: the equivalent to diagnose sys kill 9 <pid>. This can be viewed in the crash log.
l Kill & Trace: the equivalent to diagnose sys kill 11 <pid>. This generates a longer crash log and
Other commands
You may be asked to provide the following information when you contact Fortinet support.
l ARP table on page 2544
l IP address on page 2546
ARP table
The ARP table is used to determine the destination MAC addresses of the network nodes, as well as the VLANs and
ports from where the nodes are reached.
The FortiGate must make an ARP request when it tries to reach a new destination. The base ARP reachable value
determines how often an ARP request it sent; the default is 30 seconds. The actual ARP reachable time is a random
number between half and three halves of the base reachable time, or 15 to 45 seconds. The random number is updated
every five minutes.
ARP entries in the ARP cache are updated based on the state of the ARP entry and the objects that are using it, as
highlighted in the following output sample:
index=5 ifname=wan1 224.0.1.140 01:00:5e:00:01:8c state=00000040 use=924202
confirm=930202 update=924202 ref=1
There are multiple possible states for an ARP entry, and the state-transition mechanism can be complex. Common
states include the following:
000000020 or 0x20 FAILED Did not manage to resolve within the maximum
configured number of probes
000000040 or 0x40 NOARP Device does not support ARP, e.g. IPsec interface
An entry that is in the STALE (0x04) or FAILED (0x20) states with no references to it (ref=0) can be deleted. Many factors
affect the state-transmit mechanism and if an entry is used by other subsystems. For example, ARP creation, ARP
request/reply, neighbor lookup, routing, and others can cause an ARP entry to be in use or referenced.
The garbage collection mechanism runs every 30 seconds, and checks and removes stale and unreferenced entries if
they have been stale for longer than 60 seconds. Garbage collection will also be triggered when the number of ARP
entries exceeds the configured threshold. If the threshold is exceeded, no entries can be added to the ARP table.
arp-max-entry <integer> The maximum number of dynamically learned MAC addresses that can be added
to the ARP table (131072 to 2147483647, default = 131072).
IP address
You may want to verify the IP addresses assigned to the FortiGate interfaces are what you expect them to be.
To verify IP addresses:
Sample output:
FortiGuard troubleshooting
The FortiGuard service provides updates to AntiVirus (AV), Antispam (AS), Intrusion Protection Services (IPS),
Webfiltering (WF), and more. The FortiGuard Distribution System (FDS) consists of a number of servers across the
world that provide updates to your FortiGate unit. Problems can occur with the connection to FDS and its configuration
on your local FortiGate unit.
Some of the more common troubleshooting methods are listed here, including:
l Troubleshooting process for FortiGuard updates on page 2548
l FortiGuard server settings on page 2548
l FortiGuard server settings on page 2548
Sample output:
The following process shows the logical steps you should take when troubleshooting problems with FortiGuard updates:
1. Does the device have a valid license that includes these services?
Each device requires a valid FortiGuard license to access updates for some or all of these services. You can verify
the status of the support contract for your devices at the Fortinet Support website.
2. If the device is part of a high availability (HA) cluster, do all members of the cluster have the same level of
support?
You can verify the status of the support contract for all of the devices in your HA cluster at the Fortinet Support
website.
3. Are services enabled on the device?
To see the FortiGuard information and status for a device in the GUI, go to System > FortiGuard.
Use this page to verify the status of each component, and enable each service.
4. Can the device communicate with FortiGuard servers?
Go to System > FortiGuard in the GUI, and try to update AntiVirus and IPS, or test the availability of Web Filtering
and AS default and alternate ports.
5. Is there proper routing to reach the FortiGuard servers?
Ensure there is a static or dynamic route that allows your FortiGate to reach the FortiGuard servers. Usually a
generic default route to the internet is enough, but you may need to verify this if your network is complex.
6. Are there issues with DNS?
An easy way to test this is to attempt a traceroute from behind the FortiGate to an external network using the Fully
Qualified Domain Name (FQDN) for a location. If the traceroute FQDN name doesn't resolve, you have general
DNS problems.
7. Is there anything upstream that might be blocking FortiGuard traffic, either on the network or ISP side?
Many firewalls block all ports, by default, and ISPs often block ports that are low. There may be a firewall between
the FortiGate and the FortiGuard servers that's blocking the traffic. By default, FortiGuard uses port 53. If that port is
blocked you need to either open a hole for it or change the port it is using.
8. Is there an issue with source ports?
It is possible that ports that FortiGate uses to contact FortiGuard are being changed before they reach FortiGuard or
on the return trip before they reach FortiGate. A possible solution for this is to use a fixed-port at NAT'd firewalls to
ensure the port remains the same. You can use packet sniffing to find more information about what's happening with
ports.
9. Are there security policies that include antivirus?
If none of the security policies include antivirus, the antivirus database will not be updated. If antivirus is included,
only the database type that's used will be updated.
Your local FortiGate connects to remote FortiGuard servers to get updates to FortiGuard information, such as new
viruses that may have been found or other new threats.
This section provides methods to display FortiGuard server information on your FortiGate, and how to use that
information and update it to fix potential problems.
To get a list of FDS servers FortiGate uses to send web filtering requests:
or
diagnose debug rating
Rating requests are only sent to the server at the top of the list in normal operation. Each server is probed for Round Trip
Time (RTT) every two minutes. Rating may not be enabled on your FortiGate.
Optionally, you can add a refresh rate to the end of the command to determine how often the server list is refreshed.
Sample output:
Locale : english
License : Contract
Expiration : Thu Oct 9 02:00:00 2011
-=- Server List (Mon Feb 18 12:55:48 2008) -=-
IP Weight RTT Flags TZ Packets CurrLost TotalLost
a.b.c.d 0 1 DI 2 1926879 0 11176
10.1.101.1 10 329 1 10263 0 633
10.2.102.2 20 169 0 16105 0 80
10.3.103.3 20 182 0 6741 0 776
10.4.104.4 20 184 0 5249 0 987
10.5.105.5 25 181 0 12072 0 178
Output details
The server list includes the IP addresses of alternate servers if the first entry cannot be reached. In this example, the IP
addresses are not public addresses.
The following flags in get webfilter status indicate the server status:
Flag Description
D The server was found through the DNS lookup of the hostname.
If the hostname returns more than one IP address, all of them are flagged with D and are used first
for INIT requests before falling back to the other servers.
I The server to which the last INIT request was sent
F The server hasn't responded to requests and is considered to have failed
T The server is currently being timed
S Rating requests can be sent to the server.
The flag is set for a server only in two cases:
l The server exists in the servers list received from the (Undefined variable:
empty so the (Undefined variable: FortinetVariables.ProductName1) is the only server that the
(Undefined variable: FortinetVariables.ProductName6) knows and it should be used as the
rating server.
The server list is sorted first by weight. The server with the smallest RTT appears at the top of the list, regardless of
weight. When a packet is lost (there has been no response in 2 seconds), it is re-sent to the next server in the list.
Therefore, the top position in the list is selected based on RTT, while the other positions are based on weight.
Calculating weight
The weight for each server increases with failed packets and decreases with successful packets. To lower the possibility
of using a remote server, the weight isn't allowed to dip below a base weight. The base weight is calculated as the
difference in hours between the FortiGate and the server multiplied by 10. The farther away the server is, the higher its
base weight is and the lower it appears in the list.
Traffic destined for the FortiGate itself, and not being passed through or dropped, is called local-in traffic. It can be from a
variety of services, such as HTTPS for administrative access, or BGP for inter-router communication.
Local-in traffic is controlled by local-in policies. To enable viewing local-in policies in the GUI, go to System > Feature
Visibility and enable Local In Policy.
The Policy & Objects > Local In Policy page shows a read-only list of the local policies, populated with default values,
and values that are automatically enabled when the related service is enabled, for example, enabling BGP opens TCP
port 179. For more information, see Local-in policies on page 782.
To view ports that are being listened on, and active connections and the services or processes using
them:
For more information on incoming and outgoing ports, see the FortiOS Ports guide.
Additional resources
To learn more about FortiGate and FortiOS, and for information about technical issues, refer to the following resources.
Installation Guides, Administration Guides, Quick Start Guides, and other technical documents are available online at
the Fortinet Document Library.
Release notes
Issues that arise after the technical documentation has been published are often listed in the release notes. The release
notes are available in the Fortinet Document Library.
The Fortinet Video Library hosts a collection of videos that provide valuable information about Fortinet products.
Fortinet Community
The Fortinet Community provides a place to collaborate, share insights and experiences, and get answers to questions.
It incorporates the Fortinet Knowledge Base and technical discussion forums. You can access the Fortinet Community at
https://community.fortinet.com.
Knowledge Base
The Fortinet Knowledge Base provides access to a variety of articles, white papers, and other documentation that
provides technical insight into a range of Fortinet products. You can access the Knowledge Base at
https://community.fortinet.com/t5/Knowledge-Base/ct-p/knowledgebase.
The online technical forum allows administrators to contribute to discussions about issues related to their Fortinet
products. Searching the forum can help an administrator identify if an issue has been experienced by another user. You
can access the support forum at https://community.fortinet.com/t5/Fortinet-Forum/bd-p/fortinet-discussion.
The Fortinet Training Institute hosts a collection of tutorials and training materials that you can use to increase your
knowledge of Fortinet products. You can access these training resources at https://www.fortinet.com/training.html.
Fortinet Support
You defined your problem, researched a solution, put together a plan to find the solution, and executed that plan. At this
point, if the problem has not been solved, contact Fortinet Support for assistance.
Copyright© 2022 Fortinet, Inc. All rights reserved. Fortinet®, FortiGate®, FortiCare® and FortiGuard®, and certain other marks are registered trademarks of Fortinet, Inc., 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. 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.