FortiOS-7.4.5-Administration - Guide (2) - Parte1
FortiOS-7.4.5-Administration - Guide (2) - Parte1
FortiOS 7.4.5
FORTINET DOCUMENT LIBRARY
https://docs.fortinet.com
FORTINET BLOG
https://blog.fortinet.com
FORTIGUARD LABS
https://www.fortiguard.com
FEEDBACK
Email: [email protected]
Change Log 27
Getting started 28
Summary of steps 29
Setting up FortiGate for management access 30
Completing the FortiGate Setup wizard 31
Configuring basic settings 31
Registering FortiGate 35
Configuring a firewall policy 36
Backing up the configuration 37
Troubleshooting your installation 38
Using the GUI 39
Connecting using a web browser 39
Menus 40
Tables 41
Entering values 45
GUI-based global search 47
Loading artifacts from a CDN 48
Accessing additional support resources 48
Command palette 49
Recovering missing graphical components 51
Using the CLI 53
Connecting to the CLI 53
CLI basics 56
Command syntax 62
Subcommands 64
Permissions 67
Configuration and management 67
Using FortiExplorer Go and FortiExplorer 68
Migrating a configuration with FortiConverter 76
Accessing Fortinet Developer Network 82
Terraform: FortiOS as a provider 86
Product registration with FortiCare 90
FortiCare and FortiGate Cloud login 90
FortiCare Register button 93
Transfer a device to another FortiCloud account 94
Deregistering a FortiGate 96
FortiGate models 97
Differences between models 98
Low encryption models 98
LEDs 98
Proxy-related features not supported on FortiGate 2 GB RAM models 101
Dashboards and Monitors 103
Using dashboards 103
Using widgets 105
Widgets 106
2024-09-23 Added Configuring SDN connector proxy via FortiManager on page 3458.
2024-10-25 Updated HTTPS sessions and active-active load balancing on page 2894.
2024-11-14 Updated Basic ZTNA configuration on page 1192, Configuring a DNS filter profile on page 1727,
and Configuration backups and reset on page 3173.
2024-11-19 Updated PF and VF SR-IOV driver and virtual SPU support on page 3713.
FortiOS is the operating system that runs on Fortinet’s FortiGate Next-Generation Firewall (NGFW). It supports different
platforms, including:
l Physical appliances
l Hypervisors
l Cloud computing platforms
FortiOS delivers security as a hybrid mesh firewall that spans a meshed topology of on-prem and cloud environments.
With FortiGuard's AI-powered security services, FortiOS provides protection across the attack surface with IPS,
advanced malware protection, web security, inline malware prevention, data loss prevention, and more.
In addition, FortiOS is central to the SD-WAN solution by providing SD-WAN functionality and intelligence in a single
FortiGate, a mesh of FortiGates, or integrated into a SASE environment. It is also central to the Zero Trust Network
Access (ZTNA) solution by making policy decisions and applying policy enforcement based on security posture input.
Use the following resources to get started with FortiOS:
Follow the steps to set up a new See Summary of steps on page 29.
FortiGate If you are migrating a configuration from another vendor to FortiGate, see the
Migration section of the Best Practices guide or use the FortiConverter service.
Learn about best practices for Review Basic configuration in the Best Practices guide.
FortiOS
Learn about new See FortiOS New Features and FortiOS Release Notes > New Features section.
FortiOS features
Learn about standard practices Go to Best Practices | 4-D Resources and review the document categories.
for deploying a solution or an
architecture
For the latest information about FortiOS 7.4, see the latest patch version of the Administration
Guide.
Summary of steps
These steps summarize how to get your FortiGate up and running by using the GUI. For information about the Command
Line Interface (CLI), see Using the CLI on page 53.
1. Set up your FortiGate for initial management access with the GUI. See Setting up FortiGate for management
access on page 30.
Physical appliances, such as Go to FortiGate/FortiOS Hardware Guides to view QuickStart Guides for all
FortiGate supported FortiGate models.
Hypervisors, such as FortiGate- Go to FortiGate Public Cloud or FortiGate Private Cloud and follow the
VM on ESXi, KVM, Hyper-V, deployment section of the administration guide for your hypervisor, for
and so on. example, Microsoft Hyper-V Administration Guide > Deployment.
Depending on the topology and FortiGate model, internet access may not yet be configured for the FortiGate. If no
internet access, you cannot yet register the FortiGate with Fortinet until later in the setup.
2. In the GUI, follow the FortiGate Setup wizard to change the hostname, change the password, and specify a default
layout for the FortiOS dashboards. See Completing the FortiGate Setup wizard on page 31.
3. Complete the basic configuration steps for FortiOS. After this step, all FortiGate models should have internet
access. See Configuring basic settings on page 31.
4. Register FortiGate with Fortinet by using your FortiCare/FortiCloud account with Fortinet Technical Support
(https://support.fortinet.com). See Registering FortiGate on page 35.
5. Configure a policy for the FortiGate to give clients behind FortiGate access to the internet. See Configuring a firewall
policy on page 36.
6. Back up the configuration. See Backing up the configuration on page 37.
7. If necessary, troubleshoot the installation. See Troubleshooting your installation on page 38.
After completing the Getting started section, next steps can include:
l Getting familiar with the FortiOS GUI and CLI:
l See Using the GUI on page 39.
l See Using the CLI on page 53.
l Configuring FortiOS features. The following table lists a few of the features available with FortiOS. Many additional
features are available:
For Go to
Security profiles See antivirus, IPS, web filter, and application control.
Zero Trust Network Access See Zero Trust Network Access on page 1189.
(ZTNA)
After you receive your FortiGate, open the box, connect the cables for management and internet access, and use a
management computer to access the FortiOS GUI.
For information about setting up FortiGate on hypervisors, such as FortiGate-VM on ESXi, KVM, Hyper-V, and so on, go
to FortiGate Public Cloud or FortiGate Private Cloud and follow the deployment section of the administration guide for
your hypervisor and cloud computing platform, for example, Microsoft Hyper-V Administration Guide > Deployment.
4. Use a second Ethernet cable to connect the WAN on the FortiGate to an upstream router, switch, or modem with
access to the internet.
On some FortiGate models, dedicated WAN interface(s) labeled WAN1, WAN2, and so on are available. If no
dedicated WAN interfaces are present, select an interface of your choice for the WAN connection.
Internet access is available when the FortiGate model has addressing mode set to DHCP by default on the WAN
interface, and the WAN interface is connected to a network with a DHCP server assigning the correct IP and
gateway for internet access. If these conditions are not met, then internet access is not available after connecting
your WAN interface. See Configuring basic settings on page 31.
5. On the management computer, assign an address in the 192.168.1.0/24 network.
6. In a web browser, go to https://192.168.1.99 and enter the default user name, admin, and leave the password field
blank.
By default, the management interface or the internal interface is configured to allow HTTPS access with the IP
address 192.168.1.99.
The GUI is displayed in your browser.
7. Watch the video and complete the FortiGate Setup wizard. See Completing the FortiGate Setup wizard on page 31.
After logging in to FortiOS, you can access a FortiOS video as well as a FortiGate Setup wizard to help you get familiar
with the product.
1. After logging in to the FortiOS GUI, a FortiOS 7.4 What's new video is presented. Watch the video, and then click
OK to proceed.
The FortiGate Setup wizard is displayed to help you set up the FortiGate by completing the following steps:
l Register with FortiCare
l Specify a hostname
l Set up the FortiOS dashboard
l Change your password
2. Click Begin to start the wizard.
The Register with FortiCare page is displayed.
3. If the FortiGate has internet access, register with FortiCare, and click OK.
If internet access is not yet set up for the FortiGate, you cannot complete registration. Click Later to skip this step
and proceed to the next step.
The Specify Hostname page is displayed.
4. Specify a name for the FortiGate, and click OK.
The Change your Password page is displayed.
5. Change the password for the admin account for the FortiGate, and click OK.
The Dashboard Setup page is displayed.
6. Choose what dashboards to display by default in FortiOS, and click OK.
The FortiGate Setup is complete, and the FortiOS GUI is displayed.
Complete the following basic settings on the FortiGate to get the device up and running
1. Plan interface usage for MGMT, WAN, and LAN access, and configure the interfaces. See Planning and configuring
the MGMT, WAN, and LAN interfaces on page 32.
2. Configure the default route. See Configuring the default route on page 34.
3. Configure the hostname if not done when completing the FortiGate Setup wizard. See Configuring the hostname on
page 34.
4. Ensure internet and FortiGuard connectivity. See Ensuring internet and FortiGuard connectivity on page 35.
5. Use the default certificate for HTTPs administrative access. See Using the default certificate for HTTPS
administrative access on page 35.
After configuring the basic settings, the FortiGate can access the internet and communicate with FortiGuard. Next, you
can register the FortiGate with Fortinet. See Registering FortiGate on page 35. Firewall policies are also ready to be
configured using the WAN and LAN interfaces.
On a typical deployment where the FortiGate NGFW is configured as an edge firewall, the administrator typically sets up
access control between the LAN and WAN interface, and permanent management access either through in-band
management or out-of-band management. The following sections outline steps to plan and configure your management,
WAN, and LAN interfaces
Management access
So far the new FortiGate setup has been completed over a management interface, which is either a dedicated MGMT
port named MGMT or MGMT1 or a port on the internal switch interface.
What interface to use for FortiGate management can depend on the FortiGate model. Some FortiGate models have a
dedicated MGMT interface and some do not:
l Mid-size and high-end FortiGate models typically have a dedicated MGMT interface, and you can use the MGMT
interface for FortiGate management. There is also a separate management network for accessing the FortiGate
and other devices on the network. This is called out-of-band management.
l Desktop FortiGate models typically do not have a dedicated MGMT interface. In this case, you might be using the
Internal or LAN interface for FortiGate management. There is no dedicated management network, and the
management traffic is shared with internal traffic. This is called in-band management.
Following is a summary of what FortiGate models typically support in-band and out-of-band management:
*Although natively the FortiGate does not support out-of-band management, you can pick an unused interface and
configure it as a dedicated interface for out-of-band management.
WAN interface
Similar to the management interface, some models have an interface labelled WAN, WAN1, or WAN2, and other models
do not. On models with dedicated WAN interface(s), the interfaces are also configured as DHCP clients. Therefore, if a
DHCP server is present in the WAN network that points to the correct internet gateway, then internet access is available
without further configuration.
On models without dedicated WAN interfaces, or in situations where you choose to configure the WAN interface
statically, select an interface for WAN access. Connect the interface to your upstream router, L3 switch, or modem. Then
use the following steps to configure your WAN interface.
LAN interface
On desktop and some mid-range models, a set of ports are grouped together by default in virtual switch mode for LAN
access. The virtual switch interface may be called internal or lan, and it helps facilitate connecting endpoints directly to
the FortiGate on the same L2 switching network.
Endpoints connected this way will also share the same access control configured for the internal or lan interface.
On models that lack a default LAN interface, or when you choose to configure a LAN interface manually, select an
interface for LAN access. Connect this interface to an internal switch that connects to your LAN network. Then use the
following steps to configure your LAN interface.
Setting the default route enables the FortiGate to route traffic through this interface and default gateway when no specific
routes are found for a particular destination. The gateway address should be your upstream router or L3 switch that the
FortiGate is connected to. Set the interface to be the WAN interface that the gateway is connected to.
If the WAN interface uses DHCP for address assignment, the default route may already be learned from the DHCP
server, and this step is not needed.
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.
3. Click Apply.
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.
By default, the FortiGate uses the Fortinet_GUI_Server certificate for HTTPS administrative access. Administrators
should download the CA certificate and install it on their PC to avoid warnings in their browser. See Using the default
certificate for HTTPS administrative access on page 2827 for more information.
Registering FortiGate
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. Register with FortiCare
b. Migrate Config with FortiConverter
c. Specify Hostname
d. Change Your Password
e. Dashboard Setup
f. Upgrade Firmware
If you completed the Configuring basic settings on page 31, 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.
FortiGates can be registered with the Register More button in the Products views. For details, see Registering assets in
the FortiCloud Account Services Asset Management guide.
When devices are behind FortiGate, you must configure a firewall policy on FortiGate to grant the devices access to the
internet. In other words, a firewall policy must be in place for any traffic that passes through a FortiGate.
Schedule Always
Service All
Action Accept
4. Click Save.
Once you successfully configure the FortiGate, it is extremely important that you back up 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 must be recreated, unless a backup can be
used to restore it.
You can back up the configuration in FortiOS or YAML format. You have the option to save the configuration file in
FortiOS format to various locations including the local PC and USB key.
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.
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.
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.
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
Licenses 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 few minutes, 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)
12. 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.
13. Contact Fortinet Support for assistance
If you require further assistance, visit the Fortinet Support website.
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 48
l Accessing additional support resources on page 48
l Command palette on page 49
l Recovering missing graphical components on page 51
For information about using the dashboards, see Dashboards and Monitors on page 103.
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 is insecure.
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 3093.
The GUI contains the following main menus, which provide access to configuration options for most FortiOS features:
Dashboard The dashboard displays various widgets and monitors that display important
system information and allow you to configure some system options.
For more information, see Dashboards and Monitors on page 103.
Network Options for networking, including configuring system interfaces and routing
options.
For more information, see Network on page 162.
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 1324.
Security Profiles Configure your FortiGate's security features, including Antivirus, Web Filter, and
Application Control.
For more information, see Security Profiles on page 1604.
VPN Configure options for IPsec and SSL virtual private networks (VPNs).
For more information, see IPsec VPN on page 2029 and SSL VPN on page 2361.
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 2738 and Switch
Controller on page 2739.
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 3183.
Log & Report Configure logging and alert email as well as reports.
For more information, see Log and Report on page 3581.
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.
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 the add filter button, , in the table search bar. 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. Click Apply.
1. Click the filter icon on the right side of the column header.
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 Remove All Filters.
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.
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.
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 45
l Numbers on page 46
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 79 characters, while its FQDN can contain
255 characters:
# tree firewall address
-- [address] --*name (79)
|- uuid
|- subnet
|- type
|- route-tag (0,4294967295)
|- sub-type
|- clearpass-spt
Numbers
Numbers are used to set sizes, rates, 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 by relevance (by search weight), or alphabetically in increasing or decreasing order
l Search by category
l Search in Security Fabric members (accessed by the Security Fabric members dropdown menu in the banner)
l Search for dashboard widgets and monitors, and preview the widget or go directly to the monitor dashboard if it
exists.
Examples
In this example, searching for the word ZTNA yields the following results:
l A ZTNA server, user group, and SAML SSO server that have the ZTNA in the Name field.
l Various ZTNA tag.
l ZTNA navigation tree items: Policy & Objects > ZTNA and Log & Report > ZTNA Traffic.
l The FortiView ZTNA Servers dashboard widget.
CMDB objects have a higher search weight (50) than navigation objects (20), so the navigation menus and widgets
appears at the bottom of the results when sorting by relevance.
In this example, searching for the address 10.100.88.5 yields the following results:
l Various address objects that have a subnet of 10.100.88.5.
l A Virtual IP/Server object, EMS, that has a mapped IP address/range with 10.100.88.5.
l Address objects that have IP subnets of 0.0.0.0/0, which the search term falls into.
l Address group objects that contains members addresses that have IP subnets of 0.0.0.0/0.
Sorting by Relevance displays address objects that are more closely matched at the top (10.100.88.5), 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.
Additional support resources can be accessed from the GUI to troubleshoot issues and get the most out of FortiOS.
Online guides, FortiOS documentation, and additional support can now be accessed straight from the help menu.
Command palette
The command palette is a keyboard shortcut menu that can be used to quickly navigate to GUI pages or run specific
actions, such as opening the CLI console or restoring a system configuration.
1. Press ctrl+p (or cmd+p for Mac). The command palette is displayed with available navigation links.
1. Press ctrl+p (or cmd+p for Mac) and then enter a >. On supported browsers, ctrl+shift+p (or cmd+shift+p
for Mac) can be used.
The command palette is displayed with a runnable command list.
Errors can sometimes cause the application icons, or other minor graphical components, to no longer show up in the
GUI.
For example, in the FortiView Applications monitor, the icons could be missing from the Application column.
The diagnose fortiguard-resources update command can be used to delete cached files and force
downloads of the FortiGuard resource, including icons.
2. Refresh the browser window. You might also need to clear your browser cache.
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 information about the CLI config commands, see the FortiOS CLI
Reference.
l Connecting to the CLI on page 53
l CLI basics on page 56
l Command syntax on page 62
l Subcommands on page 64
l Permissions on page 67
You can connect to the CLI using a direct console connection, SSH, the FortiExplorer app, 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 device to configure, manage, and monitor your
FortiGate. See Using FortiExplorer Go and FortiExplorer on page 68 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. On many GUI pages, the CLI console can be opened with that pages
specific commands already shown by clicking Edit in CLI in the right-side gutter.
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)
l DB-9 to RJ-45 cable (a DB-9-to-USB adapter can be used)
l USB to RJ-45 cable
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.
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 + - (depending on the method being used to access the CLI)
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:
end
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.
1. Backup the configuration. See Configuration backups and reset on page 3173 for details.
2. Open the configuration file in a plain text editor that supports UNIX-style line endings.
3. Edit the file as needed.
4. Restore the modified configuration to the FortiGate. See Configuration backups and reset on page 3173 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.
set allowaccess {ping https ssh snmp http fgfm radius-acct probe-
response capwap ftm}
You can enter any of the following:
set allowaccess ping
set allowaccess https ping ssh
set allowaccess http https snmp ssh ping
In most cases, to make changes to lists that contain options separated by spaces, you need to
retype the entire list, including all the options that you want to apply and excluding all the
options that you want to remove.
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
The edit subcommand changes the command prompt to the name of the table
value that is being edited, such as (27) #.
The move subcommand is only available in tables where the order of the table
entries matters.
The rename subcommand is only available in tables where the entries can be
renamed.
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
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 2766.
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.
See Default administrator password on page 2806 and Password policy on page 2757 for more information.
FortiOS can be managed through the graphical user interface (GUI) or the Command Line Interface (CLI) as well as
other tools.
For Use
Direct or individual configuration FortiOS GUI and CLI. See Using the GUI on page 39 and Using the CLI on page
53.
FortiExplorer Go and FortiExplorer. See Using FortiExplorer Go and FortiExplorer
on page 68.
Mass provisioning, management, FortiManager and FortiGate Cloud. See the FortiManager page and the FortiGate
and orchestration Cloud page on the Fortinet Document Library.
Automation REST API accessible through Fortinet Developer Network (FNDN). See
Accessing Fortinet Developer Network on page 82 and REST API administrator.
Automation tools, such as Terraform and Ansible. See Terraform: FortiOS as a
provider on page 86.
Other tools and FortiConverter The FortiConverter service helps you migrate a configuration from one FortiGate
to another FortiGate, or from a third-party firewall to a FortiGate. See Migrating a
configuration with FortiConverter on page 76.
FortiExplorer Go
FortiExplorer Go is a free mobile application that provisions and deploys BLE capable FortiGates with the BLE
Autodiscovery feature. You can also use FortiExplorer Go to remotely manage FortiGates registered to your FortiCare
account and deployed in FortiGate Cloud.
FortiExplorer Go is available on both iOS and Android devices. For more information, refer to the FortiExplorer Go User
Guide for your respective device OS.
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.
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 72. 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:
3. Log into the FortiGate in the app using the default credentials: admin and no password.
4. If this is the first time logging into the device, set a password.
5. Optionally, register with FortiCare.
6. Configure the FortiGate, including the WAN and internal interfaces, static routes, and other required settings.
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 3333 for
more information.
A configuration can be migrated from an older FortiGate device to a new FortiGate device directly from the FortiGate
GUI, without having to access the FortiConverter portal.
Both the source and target FortiGates must be registered under the same FortiCare account and have internet
connectivity to reach the FortiConverter server. The target FortiGate must also have a valid FortiConverter license.
In this example, FortiGate A (FGTA) is replacing FortiGate B (FGTB). The configuration is migrated using
FortiConverter, but without accessing the FortiConverter portal.
1. On FGTB, go to System > Settings, enable Allow FortiConverter to obtain config file once, then click Apply.
2. Log in to FGTA and on the GUI startup menu click Begin to start Migrate Config with FortiConverter.
You can toggle the Don't show again option and click Later to turn off reminders about the migration process.
4. Enter the user contact information, then click Save and continue.
l To upload from a file, set Source config to Upload then click Browse to locate the file.
l To import from FGTB, set Source config to Import from source FortiGate then select the FGTB. Allow
FortiConverter to obtain config file once must be enabled in System > Settings on FGTB.
6. Click Save and continue, then wait for the FGTB configuration file to be uploaded to FortiConverter and processed.
After the configuration is uploaded, the Allow FortiConverter to obtain config file once is automatically disabled on
FGTB.
7. Define the interface mapping between the source and target configuration, then click Save and continue. The target
interfaces are prepopulated.
8. Optionally, configure management access on the target FortiGate (FGTA), then click Save and continue.
9. Enter conversion notes in the Comments field, then click Save and continue.
The conversion request is sent, an email is sent to confirm that the conversion process has started in
FortiConverter, and the ticket status is shown. The estimated conversion time is one business day.
13. Click Apply migrated config to apply the converted configuration to the FortiGate. This will cause the FortiGate to
reboot. The existing configuration will be backed up before the converted configuration is applied.
14. To manually load to configuration file:
a. Click your administrator name and select Configuration > Restore.
b. Upload the converted configuration file, then click OK. This will cause the FortiGate to reboot.
The Fortinet Developer Network (FNDN) is a subscription-based community that helps administrators enhance and
increase the effectiveness of Fortinet products. Administrators can access the FortiAPI forum in FNDN to help create
applications that interact with Fortinet products, such as custom web portals, automated deployment and provisioning
systems, and scripted tasks. FNDN makes it easy for administrators and Fortinet professionals to interact, share sample
code, and upload their own tools. The FortiOS REST API documentation is available within the FortiAPI forum.
All FNDN users must be sponsored by two Fortinet employees. The sponsors must be able to confirm the user’s identity
and need for access. Approvals from both sponsors are required before access is granted to new users. The sponsors'
email addresses are required to create a new FNDN account.
Basic and licensed access options are available. Refer to the Fortinet Developer Network data sheet for more
information.
4. Enter the information in the form fields and agree to the Terms of Use.
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.
root@mail:/home/terraform# terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
fortios_networking_route_static.test1: Refreshing state... (ID: 2)
fortios_system_setting_dns.test1: Refreshing state... (ID: 96.45.45.45)
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
~ update in-place
Terraform will perform the following actions:
+ fortios_networking_route_static.test1
id: <computed>
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
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.
------------------------------------------------------------------------
Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
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"
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)
fortios_networking_route_static.test1: Refreshing state... (ID: 2)
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
- destroy
Terraform will perform the following actions:
- fortios_networking_route_static.test1
~ fortios_system_setting_dns.test1
primary: "172.16.95.16" => "96.45.45.45"
secondary: "8.8.8.8" => "208.91.112.22"
Plan: 0 to add, 1 to change, 1 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: Destroying... (ID: 2)
fortios_system_setting_dns.test1: Modifying... (ID: 172.16.95.16)
primary: "172.16.95.16" => "96.45.45.45"
secondary: "8.8.8.8" => "208.91.112.22"
fortios_networking_route_static.test1: Destruction complete after 0s
fortios_system_setting_dns.test1: Modifications complete after 0s (ID: 96.45.45.45)
Apply complete! Resources: 0 added, 1 changed, 1 destroyed.
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.
It is recommended to register your product with Fortinet. A FortiCare/FortiCloud account with Fortinet Technical Support
(https://support.fortinet.com) is required to register products. This section describes how to register the product and
includes information about other tasks performed with a FortiCare/FortiCloud account.
l FortiCare and FortiGate Cloud login on page 90
l FortiCare Register button on page 93
l Transfer a device to another FortiCloud account on page 94
l Deregistering a FortiGate on page 96
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:
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.
The FortiCare Register button is displayed in the GUI on various Fabric and device related pages and widgets.
l To access the Register button on a topology page, click on or hover over the FortiGate device:
l To access the button from the System > Firmware & Registration or System > HA page, right-click on the device
name.
The Register button is also accessible from tooltips for devices on the Managed FortiAPs and
Managed FortiSwitches pages.
Clicking Register opens the Device Registration pane. If a device is already registered, the pane still opens and displays
the device information.
Primary and secondary HA members can be registered to FortiCare at the same time from the primary unit by using the
Register button. The secondary unit will register through the HA proxy.
In this example, a HA member is registered from the Physical Topology page.
1. On the primary unit, go to Security Fabric > Physical Topology, or expand the Security Fabric widget on the Status
dashboard.
2. Hover over the HA member and click Register. The Device Registration pane opens.
3. Select the device and click Register.
4. Enter the required FortiCloud account information (password, country or region, reseller) and click Submit.
5. Once the registration is complete, click Close.
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.
Deregistering a FortiGate
An administrator can deregister a FortiGate if the device has been registered for three or more years, using the GUI or
CLI, without having to contact FortiCare administration. After the device is deregistered, all associated contracts are also
deregistered, and all of the administrator's information is wiped.
1. Go to System > FortiGuard and in the FortiCare Support row select Actions > Deregister FortiGate.
The FortiCare Deregistration pane opens.
If the FortiGate has been registered for less then three years, the deregistration will fail.
If the FortiGate has been registered for less then three years, the deregistration will fail:
forticare_product_deregister:1335: Failed to get response (rc = 0, http_code = 403)
Unit deregistration unsuccessful.
FortiGate models
Not all FortiGates have the same features, and some models support low encryption. This section also describes typical
LEDs found on FortiGate models.
l Differences between models on page 98
l Low encryption models on page 98
l LEDs on page 98
l Proxy-related features not supported on FortiGate 2 GB RAM models on page 101
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 3093.
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.
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
See your device's QuickStart guide for power supply and fan LED information:
Power supplies and fans
FortiGate QuickStart Guides.
Port LEDs
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.
As part of improvements to enhance performance and optimize memory usage on FortiGate models with 2 GB RAM or
less, starting from version 7.4.4, FortiOS no longer supports proxy-related features. This change impacts the
FortiGate/FortiWiFi 40F, 60E, 60F, 80E, and 90E series of devices and their variants, and FortiGate-Rugged 60F (2 GB
versions only).
FortiGate VMs are not affected by the size of the memory and will continue to support proxy-
related features after upgrading to FortiOS 7.4.4. However, it is recommended to have at least
4 GB of RAM for proper operation.
After upgrade to FortiOS 7.4.4 or later, the following proxy features are no longer supported on impacted devices:
l Zero Trust Network Access (ZTNA)
This includes all ZTNA objects and functionalities, including applying ZTNA tags in IP/MAC based access control.
For example, ztna-status can no longer be enabled, and ztna-ems-tag and ztna-geo-tag can no longer be
used.
l UTM profile with proxy-based inspection mode
l Firewall policy with proxy-based inspection mode
l Explicit and transparent proxies
l Layer 7 Virtual server types (HTTP/HTTPS/IMAPS/POP3S/SMTPS/SSL)
l Proxy-only UTM profiles:
l Video Filter
l Inline CASB
l ICAP
Before starting the upgrade from a firmware version that supports proxy-related features to FortiOS 7.4.4 or later that no
longer supports proxy-related features on FortiGate 2 GB RAM models, it is crucial that you carefully review the following
upgrade scenarios. The scenarios provide important information about the upgrade process and its potential impacts.
Please proceed with the upgrade only after you fully understand and are comfortable with the conditions and potential
outcomes outlined in these upgrade scenarios.
Proxy-based inspection mode is Inspection mode is converted to flow mode, and the proxy-only UTM profiles are
enabled on a firewall policy with removed. Proxy-only UTM profiles are no longer supported.
proxy-only UTM profiles, such as
WAF applied.
Proxy-related settings are The security profile is converted to flow-based, and the proxy-related setting is no
configured on a security profile, longer available.
such as Content Disarm on an
AntiVirus Profile.
Before initiating the firmware upgrade process, it is crucial to create a backup of the current
working configuration. This step ensures that you have a fallback option in case of any
unforeseen issues during the upgrade.
Once you have secured a backup, you can proceed with the upgrade process. After the
upgrade has been successfully completed, it is highly recommended to thoroughly review all
your policies.
This review process lets you confirm that all the policies that you expect to be in place are
present and will function as intended. Ensure any settings that are removed do not impact the
security of your firewall policy. See the Best Practices guide for more information.
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 2832.
Category Widgets
Network l DHCP
l DNS
l Interface Bandwidth
l IP Pool Utilization
l IPsec
l Load Balance
Category Widgets
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
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, Assets & Identities, 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
Assets & Identities 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 & Registration 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.
If the GUI is using the default HTTPS certificate, a warning is shown where you can download the HTTPS CA certificate
or change the HTTPS server certificate.
The Logs Sent widget displays chart for remote logging sources (FortiAnalyzer, FortiGate Cloud, and FortiAnalyzer
Cloud) sent daily.
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.
The Security dashboard contains the following widgets:
Widget Description
Compromised Hosts by Shows the session information for a compromised host. See Viewing session
Verdict information for a compromised host on page 116.
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.
1. Go to Dashboard > Security and expand the Compromised Hosts by Verdict widget.
3. Select a session then click View session logs to view the session logs.
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 117.
DHCP Shows the addresses leased out by FortiGate's DHCP servers. See DHCP
monitor on page 120.
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 122.
SSL-VPN Shows a summary of remote active users and the connection mode. See SSL-
VPN monitor on page 124.
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.
4. To view neighbors and paths, click the monitors dropdown and select the required neighbor or path type.
For example:
l BGP Neighbors
l BGP Paths
5. To filter a column:
a. Hover over the column heading, and click the Filter/Configure Column icon.
6. (Optional) Click the Save as Monitor button to save the widget as monitor.
Sample output:
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 the
Filter/Configure Column button.
To revoke a lease:
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 the
Filter/Configure Column button.
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:
3. Click OK.
Sample output:
list all ipsec tunnel in vd 0
------------------------------------------------------
name=Branch-HQ-B_1 ver=2 serial=8 10.100.65.101:0->10.100.67.13:0 tun_id=10.0.11.2 tun_
id6=::10.0.0.8 dst_mtu=1500 dpd-link=on weight=1
bound_if=7 lgwy=static/1 tun=intf mode=dial_inst/3 encap=none/74408 options[122a8]=npu rgwy-
chg frag-rfc run_state=0 role=primary accept_traffic=1 overlay_id=0
parent=Branch-HQ-B index=1
proxyid_num=1 child_num=0 refcnt=5 ilast=0 olast=0 ad=s/1
stat: rxp=1000472 txp=869913 rxb=184682116 txb=40548952
dpd: mode=on-idle on=1 idle=60000ms retry=3 count=0 seqno=1
natt: mode=none draft=0 interval=0 remote_port=0
fec: egress=0 ingress=0
proxyid=Branch-HQ-B proto=0 sa=1 ref=6 serial=1 ads
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=20a03 type=00 soft=0 mtu=1438 expire=414/0B replaywin=2048
seqno=1bcc esn=0 replaywin_lastseq=0000201a qat=0 rekey=0 hash_search_len=1
life: type=01 bytes=0/0 timeout=1790/1800
dec: spi=b4d54183 esp=aes key=16 6735d235de02f37d26809c0e8be44bbf
ah=sha1 key=20 17261a0387d9c9a33a00a47bcf260fc59150535e
enc: spi=28572715 esp=aes key=16 48b8a72ae69eee58699b43692ce1ccf1
ah=sha1 key=20 3e7a219f4da33c785302ae7b935a6c15c4cc2a2a
dec:pkts/bytes=16434/3317744, enc:pkts/bytes=14230/1299224
npu_flag=00 npu_rgwy=10.100.67.13 npu_lgwy=10.100.65.101 npu_selid=3 dec_npuid=0 enc_
npuid=0
------------------------------------------------------
name=Branch-HQ-A ver=2 serial=1 10.100.64.101:0->0.0.0.0:0 tun_id=10.0.0.1 tun_
id6=::10.0.0.1 dst_mtu=0 dpd-link=on weight=1
bound_if=3 lgwy=static/1 tun=intf mode=dialup/2 encap=none/552 options[0228]=npu frag-rfc
role=primary 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 the
Filter/Configure Column button.
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 Assets & Identities 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 users,
add IP addresses, ban IP addresses, quarantine hosts, and other such tasks.
The Assets & Identities dashboard includes the following widgets:
Widget Description
Assets Shows information from detected addresses, devices, and users on a single
page. Information is grouped by device. For more information see Assets on page
125.
Identities Shows information from detected addresses, devices, and users on a single
page. Information is grouped by user.
Firewall Users Monitor users that are logged into the network.
Matched NAC Devices Monitor VLANs assigned to devices by FortiSwitch NAC policies.
Assets
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.
To filter or configure a column in the table, hover over the column heading, and click
Filter/Configure Column. See Assets and filtering on page 126.
The Assets widget contains a series of summary charts that provide an overview of the operating system, vulnerability
level, status, and interfaces. You can use these clickable charts to simplify filtering among your devices.
5. 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 Assets 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.
4. In the Name field, give the device a descriptive name so that it is easy to find it 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 currently logged in firewall and proxy users. 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 the
Filter/Configure Column button.
or
# diagnose wad user clear
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.
To access the WiFi dashboard, go to Dashboard > WiFi.
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 103.
This section describes the following monitors available for the WiFi Dashboard:
l FortiAP Status monitor on page 130
l Clients by FortiAP monitor on page 132
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 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 111.
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 111.
Template Monitors
Template Monitors
l FortiView Threats
l FortiView Compromised Hosts
l FortiView Policies
l FortiView Sessions
l Device Inventory Monitor
l Routing Monitor
l DHCP Monitor
l SD-WAN Monitor
l FortiGuard Quota Monitor
l IPsec Monitor
l SSL-VPN Monitor
l Firewall User Monitor
l Quarantine Monitor
l FortiClient Monitor
l FortiAP Clients Monitor
l Rogue APs Monitor
FortiView 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 (+).
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. From the Sort By dropdown, select the sorting method.
7. 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, FortiAnalyzer, or FortiGate Cloud). Hover over its
icon to see a description of the chart, as well as links to the requirements.
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.
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, and Policies.
Select an entry, then click View session logs to view the session 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 View session logs 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, Sniffer Traffic, or ZTNA Traffic views.
2. In the toolbar, select Disk for the log location dropdown.
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 3197
When Data Source is set to Best Available Device, FortiAnalyzer is selected when
available, then FortiGate Cloud, and then FortiGate.
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 cloud logging on page 3200.
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, quarantine hosts, and temporarily or permanently ban IPs.
1. In the table, hover over the source or device MAC address. An information window opens.
2. Click Firewall Address > Create Firewall Device Address or Firewall Address > Create Firewall IP Address. The
New Address pane opens.
3. Configure the address settings as needed, then click OK.
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 quarantine a host:
1. In the table, hover over the source or device MAC address. An information window opens.
2. Click Quarantine > Quarantine Host. The Quarantine Host dialog is displayed.
3. Configure the quarantine settings, then click OK.
To ban an IP address:
1. In the table, hover over the source or device MAC address. An information window opens.
2. Click Quarantine > Ban IP . The Ban IP dialog is displayed.
3. Configure the ban IP settings, then click OK.
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 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. Click on End Session(s) to end the selected sessions, or End All Sessions to end all active sessions.
3. Click OK in the confirmation dialog.
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.
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 139.
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. From the Sort By dropdown, select Bytes, Sessions, Bandwidth, or Packets.
7. Click OK. The monitor is added to the tree menu.
1. Open the FortiView Source Firewall Objects or FortiView Destination Firewall Objects monitor.
2. Select any source or destination object and click Drill down.
3. Click the tabs to sort the sessions.
4. Select an entry, then click View session logs to view the session logs.
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.
6. From the Sort By dropdown, select Browsing Time, Threat Score, Bytes, or Sessions.
7. Click OK. The widget is added to the tree menu.
The web filter category name appears in the Category column of the dashboard.
Click the Web Sites tab. The category name appears in the Category column.
Click View session logs to a view a list of the session logs. The category name appears in the Category column.
The category name also appears in the Category column in the FortiView Websites monitor and when drilling down in
the FortiView Sources monitor.
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.
Go to Security Profiles > Application Control and edit a profile. On the Edit Application Sensor page in the Categories
section, the eye icon next to a category means that category is monitored and logged.
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 > Security Events, select 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 > Security Events and look for log entries for browsing and playing YouTube
videos in the Application Control card.
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. FortiOS has options for configuring interfaces and groups of sub-networks that can scale as your organization
grows. The following table lists commonly used interface types.
Physical A physical interface can be connected to with either Ethernet or optical cables.
Depending on the FortiGate model, there is a varying number of Ethernet or
optical physical interfaces. Some FortiGates have a grouping of interfaces labeled
as lan that have a built-in switch functionality.
See Physical interface on page 193 for more information.
VLAN A virtual local area network (VLAN) logically divides a local area network (LAN)
into distinct broadcast domains using IEEE 802.1Q VLAN tags. A VLAN interface
supports VLAN tagging and is associated with a physical interface that can be
connected to a device, such as a switch or a router that supports these tags.
VLANs can be used on a FortiGate in NAT or transparent mode, and the
FortiGate functions differently depending on the operation mode
See VLAN on page 194 for more information.
Redundant A redundant interface combines multiple physical interfaces where traffic only
uses one of the interfaces at a time. Its primary purpose is to provide redundancy.
This interface is typically used with a fully-meshed HA configuration.
See Aggregation and redundancy on page 208 for more information.
Software switch A software switch is a virtual switch interface implemented in firmware that allows
member interfaces to be added to it. Devices connected to member interfaces
communicate on the same subnet, and packets are processed by the FortiGate’s
CPU. A software switch supports adding a wireless SSID as a member interface.
See Software switch on page 218 for more information.
Hardware switch A hardware switch is a virtual switch interface implemented at the hardware level
that allows member interfaces to be added to it. Devices connected to member
interfaces communicate on the same subnet. A hardware switch relies on specific
hardware to optimize processing and supports the Spanning Tree Protocol (STP).
See Hardware switch on page 220 for more information.
Zone A zone is a logical group containing one or more physical or virtual interfaces.
Grouping interfaces in zones can simplify firewall policy configurations.
See Zone on page 226 for more information.
Virtual wire pair A virtual wire pair (VWP) is an interface that acts like a virtual wire consisting of
two interfaces, with an interface at each of the wire. No IP addressing is
configured on a VWP, and communication is restricted between the two interfaces
using firewall policies.
See Virtual wire pair on page 228 for more information.
FortiExtender WAN extension A FortiExtender WAN extension is a managed interface that allows a connected
FortiExtender to provide WAN connectivity to the FortiGate.
See FortiExtender on page 564 for more information.
FortiExtender LAN extension A FortiExtender LAN extension is a managed interface that allows a connected
FortiExtender to provide LAN connectivity to the FortiGate.
See FortiExtender on page 564 for more information.
Enhanced MAC VLAN An enhanced media access control (MAC) VLAN, or EMAC VLAN, interface
allows a physical interface to be virtually subdivided into multiple virtual interfaces
with different MAC addresses. In FortiOS, the EMAC VLAN functionality acts like
a bridge.
See Enhanced MAC VLAN on page 235 for more information.
VXLAN A Virtual Extensible LAN (VXLAN) interface encapsulates layer 2 Ethernet frames
within layer 3 IP packets and is used for cloud and data center networks.
See VXLAN on page 237 for more information.
Tunnel A tunnel virtual interface is used for IPsec interface-based or GRE tunnels and are
created when configuring IPsec VPN and GRE tunnels, respectively. The tunnel
interface can be configured with IP addresses on both sides of the tunnel since
this is a requirement when using a tunnel interface with a dynamic routing
protocol.
See OSPF with IPsec VPN for network redundancy on page 2184, GRE over
IPsec on page 2081, and Cisco GRE-over-IPsec VPN on page 2111 for more
information.
WiFi SSID A WiFi SSID interface is used to control wireless network user access to a
wireless local radio on a FortiWiFi or to a wireless access point using a FortiAP.
The SSID is created using the WiFi & Switch Controller > SSIDs page, and it
appears in the Network > Interfaces page once it is created.
See Defining a wireless network interface (SSID) in the FortiWiFi and FortiAP
Configuration Guide for more information.
VDOM link A VDOM link allows VDOMs to communicate internally without using additional
physical interfaces.
See Inter-VDOM routing for more information.
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 SSID.
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 addresses from overlapping within the same Security Fabric. See
Configure IPAM locally on the FortiGate on page 170.
l PPPoE: Get the interface IP address and other network settings from a
PPPoE server. This option is only available on entry-level FortiGate
models.
l One-Arm Sniffer: Set the interface as a sniffer port so it can be used to
detect attacks. See One-arm sniffer on page 180.
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 and automatically enabled when Role is set to LAN or
matching subnet DMZ.
This creates an address object that matches the interface subnet and
dynamically updates the object when the IP/Netmask changes.
See Interface subnet on page 1484 for more information.
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 168.
IPv6 Administrative Access Select the types of administrative access permitted for IPv6 connections to this
interface. See Configure administrative access to interfaces on page 168.
DHCP Server Enable a DHCP server for the interface. See DHCP servers and relays on
page 400.
Stateless Address Auto- Enable to provide IPv6 addresses to connected devices using SLAAC.
configuration (SLAAC)
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 1562 for more information.
Miscellaneous
4. Click OK.
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.
3. In the Administrative Access section, select which protocols to enable for IPv4 and IPv6 Administrative Access.
Industrial Connectivity Allow Industrial Connectivity service access to proxy traffic between serial port and
TCP/IP.
Available with FortiGate Rugged models equipped with a serial RS-232 (DB9/RJ45)
interface and when Role is set to Undefined or WAN. See Industrial Connectivity on
page 771.
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 Running speed tests from the hub to the spokes in dial-up
IPsec tunnels on page 1156.
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.
40000full}
set mediatype {sr4 | lr4 | cr4}
set forward-error-correction {disable | cl91-rs-fec | cl74-fc-fec}
next
end
Since the speed changed to 100G, 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.
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.
Interfaces with a LAN role, wireless network interfaces (vap-switch type), and FortiExtender LAN extension interfaces
(lan-extension type) can receive an IP address from an IPAM server without any additional configuration at the
interface level (see Interfaces on page 162 for more information).
IPAM detects and resolves any IP conflicts that may occur on the interfaces that it manages. Users have the option to
manually edit the interface or reallocate the IP.
IPAM can be configured on the Network > IPAM page using the IPAM Settings, IPAM Rules, IPAM Interfaces, and IPAM
Subnets tabs.
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.
automatic-conflict- Enable/disable automatic conflict resolution.
resolution {enable |
disable} When automatic-conflict-resolution is enabled, IPAM will periodically
check and validate the addresses of all interfaces. In case of any conflicts, IPAM
will automatically attempt to obtain a new address for the affected interface
managed by IPAM, ensuring no address duplication.
manage-lan-addresses Enable/disable default management of LAN interface addresses.
{enable | disable}*
manage-lan-extension- Enable/disable default management of FortiExtender LAN extension interface
addresses {enable | addresses.
disable}*
manage-ssid-addresses Enable/disable default management of FortiAP SSID addresses.
{enable | disable}*
config pools Set the subnet for the IP pool.
config rules Set the device, interface, and IP pool for IPAM rules.
*
When a manage- option is enabled, any interface that meets the specified criteria will automatically receive an IP
address from IPAM. However, if this option is disabled, interfaces that meet the criteria will not be configured by IPAM.
All manage- options are disabled by default. The central FortiIPAM configuration can be overridden at the interface
level.
The default setting is to inherit from the global configuration (inherit-global) through the
relevant manage- option under config system ipam.
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
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 Subnets Managed by IPAM pane opens.
4. Select Enabled, 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.
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.
3. Click OK.
On downstream FortiGates, the settings on the Network > IPAM > IPAM Settings tab cannot be changed if IPAM is
enabled on the root FortiGate.
Go to Network > IPAM > IPAM Interfaces 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.
In this example, the FortiGate serves as the Security Fabric root and has two interfaces: test-ssid (vap-switch type)
and FG019TM22004646 (lan-extension type). Currently, neither interface has an IP address assigned to it.
IPAM is disabled by default, so all these options are disabled by default. Each option must
be activated individually to function, and they do not depend on one another.
3. Click OK.
After enabling IPAM on the root FortiGate with the specified settings, FortiGates that are part of the Security Fabric
and have an interface set to either the LAN role, vap-switch type, or lan-extension type will automatically
receive an IP assignment from the IPAM server without requiring any additional configuration at the interface level.
4. Verify the list of IPAM entries:
# diagnose sys ipam list entries
Entries: (sn, vdom, interface, subnet/mask, conflict)
IPAM Entries:
FGVM08TM22004645 root FG019TM22004646 192.168.4.254/24
FGVM08TM22004645 root test-ssid 192.168.2.254/24
When a downstream FortiGate joins the Security Fabric, the port7 interface is configured with a static IP
(192.168.4.254/24), and port8 is set to a LAN role with no IP address assigned. The IPAM server assigns an IP to port8
of the downstream FortiGate since its role was set to LAN. It is observed that the FG019TM22004646 interface of the
root FortiGate conflicts with port7 of the downstream FortiGate.
1. On the root FortiGate, go to Network > IPAM and select the IPAM Interfaces tab.
There is a conflict marker (warning icon) beside the IP address of FG019TM22004646 due to a conflict between the
IPAM-assigned interface FG019TM22004646 of the root FortiGate and the manually configured interface of the
downstream FortiGate.
a. Verify the list of IPAM entries in the CLI:
# diagnose sys ipam list entries
Entries: (sn, vdom, interface, subnet/mask, conflict)
IPAM Entries:
FGVM08TM22004645 root test-ssid 192.168.2.254/24
FGVM08TM22004647 root port8 192.168.3.254/24
FGVM08TM22004645 root FG019TM22004646 192.168.4.254/24 C
2. After some time, since Auto-resolve conflicts is enabled in the IPAM settings, the conflict is resolved automatically.
IPAM Entries:
FGVM08TM22004645 root FG019TM22004646 192.168.1.254/24
FGVM08TM22004645 root test-ssid 192.168.2.254/24
FGVM08TM22004647 root port8 192.168.3.254/24
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 (see Configurations in the CLI on page 1331), 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 if the role is set to WAN. Ensure the role is set to LAN, DMZ, or undefined.
One-arm sniffer supports VLAN, VXLAN, and GRE interfaces.
The following table lists some of the one-arm sniffer settings you can configure:
Field Description
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
The following profiles are only configurable in the CLI:
l Email filter
l DLP
Field Description
l IPS DoS
Each security profile has a predefined profile for One-Arm Sniffer called sniffer-profile. The
sniffer-profile can be viewed or edited from the GUI through the Edit Interface page only.
Please refer to the Example configuration on page 181 for a demonstration.
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.
Example 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 tries 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 Custom captive portal pages on page 191.
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
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 3057.
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 3059.
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.
A FortiGate interface can be configured to act as a 802.1X supplicant. The settings can be enabled on the network
interface in the CLI. The EAP authentication method can be either PEAP or TLS using a user certificate.
config system interface
edit <interface>
set eap-supplicant {enable | disable}
set eap-method {peap | tls}
set eap-identity <identity>
set eap-password <password>
set eap-ca-cert <CA_cert>
set eap-user-cert <user_cert>
next
end
Example
In this example, the FortiGate connects to an L3 switch that is not physically secured. All devices that connect to the
internet through the L3 switch must be authenticated with 802.1X on the switch port by either a username and password
(PEAP), or a user certificate (TLS). Configuration examples for both EAP authentication methods on port33 are shown.
set allowaccess ping https ssh snmp http telnet fgfm radius-acct probe-response
fabric
set stpforward enable
set type physical
set snmp-index 42
set eap-supplicant enable
set eap-method tls
set eap-identity "[email protected]"
set eap-ca-cert "root_G_CA_Cert_1.cer"
set eap-user-cert "root_eap_client_global.cer"
next
end
Physical interface
A FortiGate has several physical interfaces that can connect to Ethernet or optical cables. Depending on the FortiGate
model, it can have a varying combination of Ethernet, small form-factor pluggable (SFP), and enhanced small form-
factor pluggable (SFP+) interfaces.
The port names, as labeled on the FortiGate, appear in the interfaces list on the Network > Interfaces page. Hover the
cursor over a port to view information, such as the name and the IP address.
Refer to Configuring an interface for basic GUI and CLI configuration steps.
Transceiver status information for SFP and SFP+ interfaces installed on the FortiGate can be displayed in the GUI and
CLI. For example, the type, vendor name, part number, serial number, and port name. The CLI output includes additional
information that can be useful for diagnosing transmission problems, such as the temperature, voltage, and optical
transmission power.
1. Go to Network > Interfaces. The Transceiver column is visible in the table, which displays the transceiver vendor
name and part number.
2. Hover the cursor over a transceiver to view more information.
VLAN
Virtual local area networks (VLANs) multiply the capabilities of your FortiGate 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.
l the VLAN networks to access the external network.
next
end
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 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.4: 40F, 60F, 70F, 80F, 90G, 100E, 100F, 120G, 140E, 200F,
300E, 400E, 400F, 600F, 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.
3. Click Apply.
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 2923
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"
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
set interface "PORT"
set vlanid 232
next
end
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
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.
Link aggregation (IEEE 802.3ad/802.1ax) 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.
Example 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.
Example 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: 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
FortiGate can signal LAG (link aggregate group) interface status to the peer device. If the number of available links in the
LAG on the FortiGate falls below the configured minimum number of links (min-links), the LAG interface goes down
on both the FortiGate and the peer device.
When the minimum number of links is satisfied again, the LAG interface automatically resumes operation on both the
FortiGate and the peer device. While the LAG interface is down, interface members are in the Link Aggregation Control
Protocol (LACP) MUX state of Waiting.
Example
In this example, the LAG interface is configured on FGT_A and peered with FGT_B.
1. On FGT_A, check the minimum number of links for the LAG interface named test_agg1.
In the following example, set min-links 1 indicates that a minimum of one alive interface member is required to
keep the LAG interface up.
# show
config system interface
edit "test_agg1"
set vdom "vdom1"
set ip 11.1.1.1 255.255.255.0
set allowaccess ping https
set type aggregate
set member "port7" "port8" "port9"
set device-identification enable
set lldp-transmission enable
set role lan
set snmp-index 41
set min-links 1
next
end
status: up
npu: y
flush: n
asic helper: y
oid: 72
ports: 3
link-up-delay: 50ms
min-links: 1
ha: master
distribution algorithm: L4
LACP mode: active
LACP speed: slow
LACP HA: enable
aggregator ID: 1
actor key: 17
actor MAC address: d4:76:a0:01:e0:44
partner key: 17
partner MAC address: d4:76:a0:01:e8:1e
member: port7
index: 0
link status: up
link failure count: 1
permanent MAC addr: d4:76:a0:01:e0:44
LACP state: established
LACPDUs RX/TX: 4/17
actor state: ASAIEE
actor port number/key/priority: 1 17 255
partner state: ASAIEE
partner port number/key/priority: 1 17 255
partner system: 1 d4:76:a0:01:e8:1e
aggregator ID: 1
speed/duplex: 1000 1
RX state: CURRENT 6
MUX state: COLLECTING_DISTRIBUTING 4
member: port8
index: 1
link status: up
link failure count: 2
permanent MAC addr: d4:76:a0:01:e0:45
LACP state: established
LACPDUs RX/TX: 216/222
actor state: ASAIEE
actor port number/key/priority: 2 17 255
partner state: ASAIEE
partner port number/key/priority: 2 17 255
partner system: 1 d4:76:a0:01:e8:1e
aggregator ID: 1
speed/duplex: 1000 1
RX state: CURRENT 6
MUX state: COLLECTING_DISTRIBUTING 4
member: port9
index: 2
link status: down
link failure count: 0
permanent MAC addr: d4:76:a0:01:e0:46
set snmp-index 41
set min-links 3
next
end
status: down
npu: y
flush: n
asic helper: y
oid: 230
ports: 3
link-up-delay: 50ms
min-links: 3
ha: master
distribution algorithm: L4
LACP mode: active
LACP speed: slow
LACP HA: enable
aggregator ID: 1
actor key: 17
actor MAC address: e8:1c:ba:b3:d0:df
partner key: 17
partner MAC address: e8:1c:ba:df:a0:ba
member: port7
index: 0
link status: up
link failure count: 1
permanent MAC addr: e8:1c:ba:b3:d0:df
LACP state: negotiating
LACPDUs RX/TX: 10/23
actor state: ASAODD
actor port number/key/priority: 1 17 255
partner state: ASAIDD
partner port number/key/priority: 1 17 255
partner system: 61440 e8:1c:ba:df:a0:ba
aggregator ID: 1
speed/duplex: 1000 1
RX state: CURRENT 6
MUX state: WAITING 2
member: port8
index: 1
link status: up
link failure count: 1
permanent MAC addr: e8:1c:ba:b3:d0:e0
LACP state: negotiating
LACPDUs RX/TX: 222/228
actor state: ASAODD
actor port number/key/priority: 2 17 255
partner state: ASAIDD
partner port number/key/priority: 65 17 255
partner system: 61440 e8:1c:ba:df:a0:ba
aggregator ID: 1
speed/duplex: 1000 1
RX state: CURRENT 6
MUX state: WAITING 2
member: port9
index: 2
link status: down
link failure count: 0
permanent MAC addr: e8:1c:ba:b3:d0:ed
status: down
npu: y
flush: n
asic helper: y
oid: 72
ports: 3
link-up-delay: 50ms
min-links: 1
ha: master
distribution algorithm: L4
LACP mode: active
LACP speed: slow
LACP HA: enable
aggregator ID: 1
actor key: 17
actor MAC address: d4:76:a0:01:e8:1e
partner key: 17
partner MAC address: d4:76:a0:01:e0:44
member: port7
index: 0
link status: up
member: port8
index: 1
link status: up
link failure count: 1
permanent MAC addr: d4:76:a0:01:e8:1f
LACP state: negotiating
LACPDUs RX/TX: 15/14
actor state: ASAIDD
actor port number/key/priority: 2 17 255
partner state: ASAODD
partner port number/key/priority: 2 17 255
partner system: 44237 d4:76:a0:01:e0:44
aggregator ID: 1
speed/duplex: 1000 1
RX state: CURRENT 6
MUX state: ATTACHED 3
member: port9
index: 2
link status: down
link failure count: 0
permanent MAC addr: d4:76:a0:01:e8:20
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.
Loopback interface
A loopback interface is a logical interface that is always up. Its IP address does not depend on one specific physical port,
and the attached subnet is always present in the routing table. Therefore, it can be accessed through several physical or
VLAN interfaces.
Typically, a loopback interface can be used with management access, BGP peering, PIM rendezvous points, and SD-
WAN.
A loopback interface requires appropriate firewall policies to allow traffic to the interface. For example, see IPsec tunnel
terminated on a loopback interface on page 217.
Multiple loopback interfaces can be configured in either non-VDOM mode or in each VDOM.
Dynamic routing protocols can be enabled on loopback interfaces. For example, loopback interfaces are a good practice
for OSPF. To make it easier to troubleshoot OSPF, set the OSPF router ID to the same value as the loopback IP address
to access a specific FortiGate using that IP address and SSH.
A loopback interface is configured using similar steps as a physical interface (see Configuring an interface).
As mentioned above, a loopback interface requires appropriate firewall policies to allow traffic to the interface. In other
words, traffic ingressing on an interface that is destined for the IP address associated with a loopback interface requires
an appropriate firewall policy from that interface to the loopback interface otherwise the traffic will be dropped.
For example, consider the following topology where an IPsec tunnel is terminated on a loopback interface, VPN_LO, on
the FortiGate FGT-1 and on a WAN interface on the FortiGate FGT-2.
IPsec tunnel terminates on a loopback interface, VPN_LO, which has an associated IP address that the remote peer will
use as its IPsec remote gateway address.
The IPsec tunnel uses wan1 as its underlay interface.
In this scenario, the administrator of the FortiGate FGT-1 device must configure a firewall policy from the wan1 interface
to the VPN_LO interface that allows incoming traffic from the remote peer to reach the VPN_LO interface for proper
IPsec tunnel connectivity.
For example:
config firewall policy
edit 4
set name "Loopback-In"
set srcintf "wan1"
set dstintf "VPN_LO"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set logtraffic disable
next
end
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, a software switch lets you 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 is not
regulated by security policies, and traffic passing in and out of the switch is 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 Ensure the Create address object matching subnet option is disabled, if any port Role is set to either LAN or DMZ.
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 synchronization between an iPhone and a local computer. Because synchronization between two subnets is
problematic, putting both interfaces on the same subnet allows synchronization to 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 disabled and that there are no other dependencies on
these interfaces.
c. Save the current configuration so that it can be recovered if something goes 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, 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.
After ports are added to a virtual switch with STP or 802.1x enabled, you can enable or disable STP or 802.1x for each
member port.
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.
next
end
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.
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.
next
end
In this example, FortiGate is connected to two switches, and a virtual switch named hw1 is configured with two port
members: port3 and port5. 802.1x authentication is enabled for port3 and disabled for port5.
In this example, FortiGate is connected to two switches, and a virtual switch named hw1 is configured with two port
members: port3 and port5. STP is enabled for port3 and disabled for port5. Any STP sent to port5 is silently ignored.
Port3 remains enabled for STP.
Port5 is enabled as an edge port with STP disabled. Port3 remains enabled for STP.
Zone
Zones are a group of one or more physical or virtual FortiGate interfaces that you can apply firewall policies to for
controlling inbound and outbound traffic. Grouping interfaces and VLAN subinterfaces into zones simplifies creating
firewall 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
firewall 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 firewall policy and protection profiles to access the Internet. Rather than the administrator making nine
separate firewall policies, he can make administration simpler by adding the required interfaces to a zone and creating
three policies.
Example 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 firewall 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.
When creating a new virtual wire pair, the Interface members field displays interfaces without
assigned addresses. Interfaces with assigned addresses are not displayed.
Therefore, you cannot add to a virtual wire pair an interface with Addressing mode set to
DHCP. If you change the interface settings to Manual with IP/Netmask set to 0.0.0.0/0.0.0.0,
you can add the interface to a virtual wire 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.
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.
VLAN sub-interfaces, such as regular 802.1Q and 802.1ad (QinQ), are allowed to be members of a virtual wire pair.
Example
In this example, the FortiGate has two VLAN interfaces. The first interface is a QinQ (802.1ad) interface over the
physical interface port3. The second interface is a basic 802.1Q VLAN interface over physical interface port5. These two
interfaces are grouped in a virtual wire pair so that bi-directional traffic is allowed. This example demonstrates ICMP from
the client (3.3.3.4) sent to the server (3.3.3.1).
per_ip_shaper=
class_id=0 ha_id=0 policy_dir=0 tunnel=/ vlan_cos=0/0
state=may_dirty br npu
statistic(bytes/packets/allow_err): org=168/2/1 reply=168/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=56->55/55->56 gwy=0.0.0.0/0.0.0.0
hook=pre dir=org act=noop 3.3.3.4:3072->3.3.3.1:8(0.0.0.0:0)
hook=post dir=reply act=noop 3.3.3.1:3072->3.3.3.4:0(0.0.0.0:0)
src_mac=08:5b:0e:71:bf:c6 dst_mac=d4:76:a0:5d:b2:de
misc=0 policy_id=1 pol_uuid_idx=534 auth_info=0 chk_client_info=0 vd=3
serial=00005f6c tos=ff/ff app_list=0 app=0 url_cat=0
rpdb_link_id=00000000 ngfwid=n/a
npu_state=0x4000c00 ofld-O ofld-R
npu info: flag=0x81/0x81, offload=8/8, ips_offload=0/0, epid=187/156, ipid=156/187,
vlan=0x0005/0x0021
vlifid=156/187, vtag_in=0x0005/0x0021 in_npu=1/1, out_npu=1/1, fwd_en=0/0, qid=0/5
total session 1
DVLAN 802.1ad and 802.1Q modes are supported on NP7 platforms over virtual wire pairs, which provides better
performance and packet processing.
The default DVLAN mode is 802.1ad, but the DVLAN mode can be changed using diagnose npu np7 dvlan-mode
<dvlan_mode> {<npid> | all}. The DVLAN mode can be applied to a specific NPID or all NPIDs. For example:
l diagnose npu np7 dvlan-mode 802.1AD 0 will set NP0 to work in 802.1ad mode.
l diagnose npu np7 dvlan-mode 802.1Q all will set all NPUs to work in 802.1Q mode.
A reboot is required for custom DVLAN settings to take effect. To avoid any inconveniences or
disruptions, changing the DVLAN settings should be done during a scheduled downtime or
maintenance window.
The DVLAN mode should only be changed if you are solely using the virtual wire pair (VWP)
and are seeking to enhance performance. Enabling this feature may impact VLAN interfaces
within your network.
In the virtual wire pair settings, the outer-vlan-id can be set. This is the same value as the outer provider-tag (S-
Tag).
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 as the VLAN interfaces share the same MAC address. To avoid overlapping MAC addresses on the
same NPU Vlink, use EMAC VLANs instead.
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.
FortiGate supports a maximum of 512 EMAC VLAN interfaces per underlying interface, and a
maximum of 600 MAC addresses including EMAC VLAN interfaces.
VXLAN
Virtual Extensible LAN (VXLAN) is a network virtualization technology used in large cloud computing deployments. It
encapsulates layer 2 Ethernet frames within layer 3 IP packets using the UDP transport protocol on port 4789. VXLAN
endpoints that terminate VXLAN tunnels can be virtual or physical switch ports, and are known as VXLAN tunnel
endpoints (VTEPs).
A VXLAN packet encapsulation occurs by first inserting a VXLAN header in front of the original layer 2 frame. This
VXLAN header uses 3 B for the VNID that is used to identify the VXLAN segment, meaning that there are 16,777,215
different possible VNIDs. This allows for more unique LAN segments than possible VLANs. The original frame and the
VXLAN header are then encapsulated into the UDP payload. The outer IP header allows it to be routed and transported
over a layer 3 network, thus providing a layer 2 overlay scheme over a layer 3 network.
This equates to 50 B of overhead over the original frame: 14 B (Ethernet) + 20 B (IPv4) + 8 B (UDP) + 8 B (VXLAN
headers). Since fragmenting a VXLAN packet is not recommended, it is advisable to increase the MTU size to 1550 B or
above if possible, or to decrease the TCP MSS size inside a firewall policy.
For more information about VXLAN, see RFC 7348.
The following topics provide information about VXLAN:
l General VXLAN configuration and topologies on page 238
l VLAN inside VXLAN on page 242
l Virtual wire pair with VXLAN on page 244
l VXLAN over IPsec tunnel with virtual wire pair on page 246
l VXLAN over IPsec using a VXLAN tunnel endpoint on page 250
l VXLAN with MP-BGP EVPN on page 255
l VXLAN troubleshooting on page 267
This topic describes general VXLAN configurations and commonly used topologies. In the most basic configuration, a
FortiGate is configured as a VXLAN tunnel endpoint (VTEP).
interface <string> Set the local outgoing interface for the VXLAN encapsulated traffic.
vni <integer> Set the VXLAN network ID.
ip-version {ipv4-unicast Set the IP version to use for the VXLAN device and communication over
| ipv6-unicast | VXLAN (default = ipv4-unicast).
ipv4-multicast |
ipv6-multicast}
dstport <integer> Set the VXLAN destination port (default = 4789).
remote-ip <IP_address> Set the IPv4 address of the remote VXLAN endpoint.
remote-ip6 <IP_address> Set the IPv6 address of the remote VXLAN endpoint.
3. Connect the internal interface and VXLAN interface to the same L2 network.
l Connect using a software switch:
config system switch-interface
edit <name>
set vdom <string>
set member <member_1> <member_2> ... <member_n>
set intra-switch-policy {implicit | explicit}
next
end
member <member_1> Enter the VXLAN interface and other physical or virtual interfaces that will
<member_2> ... share the L2 network.
<member_n>
When adding an interface member to a software switch, it cannot have an
IP address or be referenced in any other settings. For newly created VLAN
interfaces, it is advised to change the role from LAN to undefined so that an
address is not automatically assigned.
intra-switch-policy Allow any traffic between switch interfaces or require firewall policies to
{implicit | allow traffic between switch interfaces:
explicit}
l implicit: traffic between switch members is implicitly allowed.
member <member_1> Enter the VXLAN interface and other physical or virtual interface that will
<member_2> share the L2 network.
wildcard-vlan {enable | Enable/disable wildcard VLAN. Disable to prevent VLAN-tagged traffic
disable} between the members of the virtual wire pair (default). Enable for VLAN
tags to be allowed between the members.
vlan-filter <filter> When wildcard-vlan is enabled, set the VLAN filter to specify which VLANs
are allowed. By default, an empty vlan-filter allows all VLANs.
4. If using a virtual wire pair, configure a firewall policy that allows bi-directional traffic between the members of the
virtual wire pair and inspection between them:
config firewall policy
edit <id>
set name <name>
set srcintf <member_1> <member_2>
set dstintf <member_1> <member_2>
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
end
Topologies
Many topologies can be deployed with VXLAN. A FortiGate can connect to VXLAN endpoints that are Fortinet devices or
devices from other vendors. In the following topologies, it is assumed that at least one of the VTEPs is a FortiGate. The
second VTEP can be any vendor.
In this topology, a FortiGate (VTEP 1) is configured with a VXLAN interface over port1 where the remote-ip points to
port1 of VTEP 2. The VXLAN interface and port2 can be associated with the same L2 network by making them members
of either a software switch or a virtual wire pair. Devices under the L2 switches are part of the same L2 network.
See Virtual wire pair with VXLAN on page 244 for an example configuration.
In this topology, a FortiGate (VTEP 1) is configured with a VXLAN interface over port1 where the remote-ip points to
port1 of VTEP 2. The VXLAN interface is combined with port2 into the same L2 network using a virtual wire pair. The
virtual wire pair allows wildcard VLANs to pass, which allows VLAN tags to be encapsulated over VXLAN. As a result,
VLANs can span different switches over VXLAN.
Variations of these two scenarios can also be found in FortiGate to FortiSwitch FortiLink connections over VXLAN. See
Deployment procedures in the FortiSwitch VXLAN Deployment Guide for example configurations.
In scenarios where VTEPs are located in different sites and traffic must be secured between the sites, VXLAN will need
to be encrypted over IPsec. The VXLAN interface must use the IPsec interface as its outgoing interface. The remote-
ip must be configured as the IP of the remote IPsec gateway. The VXLAN interface can be combined with port2 into the
same L2 network using a software switch or virtual wire pair. Devices under the L2 switches can communicate with each
other.
See VXLAN over IPsec tunnel with virtual wire pair on page 246 for an example configuration. A variation of this scenario
is explained in FortiGate LAN extension on page 746 and in FortiExtender as FortiGate LAN extension (FortiExtender
FortiGate-Managed Administration Guide).
In this topology, an IPsec VPN hub and spoke overlay network is already configured between sites. To allow networks
behind the hub and spokes to be connected together, each spoke has a VXLAN connection to the hub, and the hub
allows interconnection between its private network and each of the VXLAN interfaces to the spokes. In this scenario, the
private networks behind each spoke are actually on the same L2 network as the private network behind the hub.
See VXLAN over IPsec using a VXLAN tunnel endpoint on page 250 for an example configuration.
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
set interface vxlan2
next
end
3. Configure software-switch:
config system switch-interface
edit sw1
set vdom root
set member vlan100 vxlan100
next
end
This captures the VXLAN traffic between 172.1.1.1 and 172.1.1.2 with the VLAN 100 tag inside.
end
config system vxlan
edit "vxlan1"
set interface "port11"
set vni 1000
set remote-ip "10.2.2.2"
next
end
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):
config system interface
edit "SPOKES"
set vdom "root"
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:
config system VXLAN
edit "HUB_VXLAN"
set interface "HUB"
set vni 2
The virtual wire pair requires an explicit policy to allow traffic between interfaces.
FortiOS supports VXLAN as implemented according to RFC 7348. Currently, VXLAN relies on determining the MAC
address of the destination host by using address resolution protocol (ARP) broadcast frames encapsulated in multicast
packets.
l A multicast group is maintained with all the VXLAN tunnel endpoints (VTEPs) associated with the same VXLAN,
namely, with the same VXLAN network identifier (VNI).
l The multicast packets that encapsulate ARP broadcast frames are sent to this multicast group, and then the
destination host replies to the source host using unicast IP packet encapsulated using VXLAN.
l The source and destination FortiGates as VTEPs each maintain a mapping of MAC addresses to remote VTEPs.
As with non-VXLAN traffic, VXLAN relies on the preceding ARP process, commonly known as flood-and-learn that
floods the network with broadcast frames encapsulated as multicast packets to learn MAC addresses. In the RFC 7348
implementation of VXLAN, the data plane is simultaneously used as a control plane.
The following topology demonstrates how flood-and-learn uses ARP broadcast traffic flooded throughout the VXLAN for
PC A to learn PC D's MAC address when PC A tries to connect to PC D.
Multiprotocol Border Gateway Protocol Ethernet Virtual Private Network (MP-BGP EVPN) support for VXLAN allows for
learning MAC addresses in a way that is more suitable for large deployments than flood-and-learn.
MP-BGP EVPN is a standards-based control plane that supports the distribution of attached host MAC and IP addresses
using MP-BGP, namely, using the EVPN address family and MAC addresses treated as routing entries in BGP. As a
control plane that is separate from the data plane, MP-BGP EVPN avoids flood-and-learn in the network, and the wide
use of BGP as an external gateway protocol on the internet proves its ability to scale well with large deployments. The
following topology demonstrates how MP-BGP EVPN distributes route type 2 MAC/IP advertisement routes among
VTEPs in the VXLAN, and minimizes ARP broadcast traffic required for PC A to learn PC D's MAC address when PC A
tries to connect to PC D.
For more information about MP-BGP EVPN, see RFC 7432. For more information about
EVPN and VXLAN, see RFC 8365.
The MP-BGP EVPN feature builds on the CLI commands used for configuring VXLAN using a VXLAN tunnel endpoint
(VTEP). See General VXLAN configuration and topologies on page 238 for more details.
After configuring VXLAN using a VTEP, the following CLI commands are configured to enable MP-BGP EVPN on each
VTEP.
The ip-local-learning setting is used to enable/disable monitoring the local ARP table of the switch interface
to learn the IP/MAC bindings, and advertise them to neighbors. This setting is disabled by default, but must be
enabled when configuring MP-BGP EVPN.
The arp-suppression setting is used to enable/disable using proxy ARP to perform suppression of ARP
discovery using the flood-and-learn approach. This setting is disabled by default. When enabled, proxy ARP entries
are added on the switch interface to suppress the ARP flooding of known IP/MAC bindings, which were learned by
the MP-BGP EVPN control plane.
2. Configure the EVPN settings within the VXLAN settings:
config system vxlan
edit <name>
set interface <string>
set vni <integer>
set evpn-id <integer>
set learn-from-traffic {enable | disable}
next
end
The learn-from-traffic setting is used to enable/disable learning of remote VNIs from VXLAN traffic. This
setting is disabled by default, and should only be enabled when local and all remote peers are using same VNI
value, and some of the peers do not have MP-BGP EVPN capability.
3. Configure the BGP settings:
config router bgp
set ibgp-multipath {enable | disable}
set recursive-next-hop {enable | disable}
set graceful-restart {enable | disable}
config neighbor
edit <WAN_IP_of_other_VTEP>
set ebgp-enforce-multihop {enable | disable}
set next-hop-self {enable | disable}
set next-hop-self-vpnv4 {enable | disable}
set soft-reconfiguration {enable | disable}
set soft-reconfiguration-evpn {enable | disable}
set remote-as <AS_number>
next
end
end
config system ha
set evpn-ttl <integer>
end
Example
In this example, two FortiGates are configured as VXLAN tunnel endpoints (VTEPs). A VXLAN is configured to allow L2
connectivity between the networks behind each FortiGate. The VXLAN interface vxlan1 and port2 are placed on the
same L2 network using a software switch (sw1). An L2 network is formed between PC1 and PC2. MP-BGP EVPN is
used as the control plane to learn and distribute MAC address information within a single L2 domain identified using a
specific VNI.
The MAC address of PC1 is 00:50:00:00:06:00. The MAC address of PC2 is 00:50:00:00:07:00.
This example assumes that the WAN interface and default route settings have already been configured on the VTEP 1
and VTEP 2 FortiGates. These configurations are omitted from the example. All peers are configured for MP-BGP
EVPN.
next
end
3. Configure the local interface and EVPN settings within the VXLAN settings:
config system vxlan
edit "vxlan1"
set interface "loopback1"
set vni 1000
set evpn-id 100
next
end
next
end
7. Configure the firewall policies between the member interfaces in the software switch:
config firewall policy
edit 1
set srcintf "port2"
set dstintf "vxlan1"
set action accept
set srcaddr "all"
set dstaddr "all"
set schedule "always"
set service "ALL"
next
edit 2
set srcintf "vxlan1"
set dstintf "port2"
set action accept
set srcaddr "all"
set dstaddr "all"
set schedule "always"
set service "ALL"
next
end
3. Configure the local interface and EVPN settings within the VXLAN settings:
config system vxlan
edit "vxlan1"
set interface "loopback2"
set vni 1000
set evpn-id 100
next
end
next
end
7. Configure the firewall policies between the member interfaces in the software switch:
config firewall policy
edit 1
set srcintf "port2"
set dstintf "vxlan1"
set action accept
set srcaddr "all"
set dstaddr "all"
set schedule "always"
set service "ALL"
next
edit 2
set srcintf "vxlan1"
set dstintf "port2"
set action accept
set srcaddr "all"
set dstaddr "all"
set schedule "always"
set service "ALL"
next
end
2. On the VTEP1 FortiGate, run the switch and VXLAN debug commands.
3. Run the BGP EVPN commands and observe the route type 2 (MAC/IP advertisement route) and route type 3
(inclusive multicast Ethernet tag route).
a. Verify the BGP L2 VPN EVPN summary information:
# get router info bgp evpn summary
*>i[2][0][48][00:50:00:00:07:00][0]/72
2.2.2.2 0 100 0 0 i <-/>
*>i[2][0][48][00:50:00:00:07:00][32][172.18.1.33]/104
2.2.2.2 0 100 0 0 i <-/>
*> [3][0][32][1.1.1.1]/80
1.1.1.1 0 100 32768 0 i <-/>
*>i[3][0][32][2.2.2.2]/80
2.2.2.2 0 100 0 0 i <-/>
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
EVPN IP table:
Address VNI Remote Addr MAC
172.18.1.33 1000 2.2.2.2 00:50:00:00:07:00
VXLAN troubleshooting
Topology
The following topology is used as an example configuration to demonstrate VXLAN troubleshooting steps.
In this example, two FortiGates are configured as VXLAN tunnel endpoints (VTEPs). A VXLAN is configured to allow L2
connectivity between the networks behind each FortiGate. The VXLAN interface and port6 are placed on the same L2
network using a software switch (sw100). An L2 network is formed between PC1 and PC2.
The VTEPs have the following MAC address tables:
The MAC address of PC1 is 00:0c:29:90:4f:bf. The MAC address of PC2 is 00:0c:29:f0:88:2c.
next
end
The MAC address of port6 is 00:0c:29:4e:5c:1c. The MAC address of vxlan100 is 7e:f2:d1:84:75:0f. The MAC
address 00:0c:29:f0:88:2c of PC2 is learned from the remote network.
4. Run diagnostics on the VTEP 2 FortiGate.
a. Verify the forwarding database of VXLAN interface vxlan100:
# diagnose sys vxlan fdb list vxlan100
mac=00:00:00:00:00:00 state=0x0082 remote_ip=192.168.2.86 port=4789 vni=100 ifindex=6
mac=00:0c:29:90:4f:bf state=0x0002 remote_ip=192.168.2.86 port=4789 vni=100 ifindex=6
The MAC address of port6 is 00:0c:29:d0:3e:0d. The MAC address of vxlan100 is ca:fa:31:23:8d:c1. The MAC
address 00:0c:29:90:4f:bf of PC1 is learned from the remote network.
5. Perform a sniffer trace on the VTEP 1 FortiGate to view the life of the packets as they pass through the FortiGate:
# diagnose sniffer packet any 'host 10.10.100.20 or (udp and host 192.168.2.87)' 4 0 l
Using Original Sniffing Mode
interfaces=[any]
filters=[host 10.10.100.20 or (udp and host 192.168.2.87)]
2022-11-04 14:35:18.567602 port6 in arp who-has 10.10.100.20 tell 10.10.100.10
2022-11-04 14:35:18.567629 vxlan100 out arp who-has 10.10.100.20 tell 10.10.100.10
2022-11-04 14:35:18.567642 port2 out 192.168.2.86.4804 -> 192.168.2.87.4789: udp 68
2022-11-04 14:35:18.567658 sw100 in arp who-has 10.10.100.20 tell 10.10.100.10
2022-11-04 14:35:18.568239 port2 in 192.168.2.87.4789 -> 192.168.2.86.4789: udp 68
2022-11-04 14:35:18.568263 vxlan100 in arp reply 10.10.100.20 is-at 00:0c:29:f0:88:2c
2022-11-04 14:35:18.568272 port6 out arp reply 10.10.100.20 is-at 00:0c:29:f0:88:2c
2022-11-04 14:35:18.568425 port6 in 10.10.100.10 -> 10.10.100.20: icmp: echo request
2022-11-04 14:35:18.568435 vxlan100 out 10.10.100.10 -> 10.10.100.20: icmp: echo request
2022-11-04 14:35:18.568443 port2 out 192.168.2.86.4805 -> 192.168.2.87.4789: udp 82
2022-11-04 14:35:18.568912 port2 in 192.168.2.87.4789 -> 192.168.2.86.4789: udp 68
2022-11-04 14:35:18.568925 vxlan100 in arp who-has 10.10.100.10 tell 10.10.100.20
2022-11-04 14:35:18.568935 port6 out arp who-has 10.10.100.10 tell 10.10.100.20
2022-11-04 14:35:18.568945 sw100 in arp who-has 10.10.100.10 tell 10.10.100.20
2022-11-04 14:35:18.569070 port6 in arp reply 10.10.100.10 is-at 00:0c:29:90:4f:bf
2022-11-04 14:35:18.569076 vxlan100 out arp reply 10.10.100.10 is-at 00:0c:29:90:4f:bf
2022-11-04 14:35:18.569081 port2 out 192.168.2.86.4806 -> 192.168.2.87.4789: udp 68
2022-11-04 14:35:18.569417 port2 in 192.168.2.87.4789 -> 192.168.2.86.4789: udp 82
The packet that leaves the physical port2 is encapsulated in UDP and has a VXLAN header with VNI 100 as the
identifier. There is an additional 50 B overhead of the UDP encapsulated VXLAN packets as opposed to the
unencapsulated packets (for example, packet 4 versus packets 1 and 2).
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 273
l DNS domain list on page 276
l FortiGate DNS server on page 278
l DDNS on page 285
l DNS latency information on page 289
l DNS over TLS and HTTPS on page 291
l Transparent conditional DNS forwarder on page 295
l Interfaces in non-management VDOMs as the source IP address of the DNS conditional forwarding server on page
299
l DNS session helpers on page 301
l DNS troubleshooting on page 302
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.
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).
fqdn-cache-ttl
fqdn-min-refresh
FQDN cache minimum refresh time, in seconds (10 - 3600, default = 60).
An FQDN normally requeries for updates according to the lowest TTL interval returned from all the DNS records in a
DNS response. The FortiGate has a default minimum refresh interval of 60 seconds; if a TTL interval is shorter than 60
seconds, it still requires a minimum of 60 seconds for the FortiGate to requery for new addresses. The fqdn-min-
refresh setting changes the interval. The settings could be shortened if there are FQDNs that require fast resolutions
based on a short TTL interval.
For example, if fqdn_min_refresh is unspecified:
# diagnose test application dnsproxy 3
worker idx: 0
...
FQDN: min_refresh=60 max_refresh=3600
...
# diagnose test application dnsproxy 6
worker idx: 0
vfid=0 name=aa.com ver=IPv4 wait_list=0 timer=28 min_ttl=20 cache_ttl=0 slot=-1 num=1
wildcard=0
23.202.195.114 (ttl=20:0:0)
The min_refresh is the default value of 60 seconds. Although the min_ttl (TTL returned) value is shorter, the
FortiGate only requeries for updates based on the min_refresh value. the timer value is the countdown until the next
refresh is triggered. The FortiGate triggers a refresh slightly earlier than the larger of the min_refresh or min_ttl
value.
If fqdn_min_refresh is configured:
config system dns
set fqdn-min-refresh 20
end
# diagnose test application dnsproxy 3
worker idx: 0
...
FQDN: min_refresh=20 max_refresh=3600
...
This setting can be used in combination with fqdn-cache-ttl and cache-ttl to send more frequent queries and
store more resolved addresses in cache. This is useful in scenarios where the FQDN has many resolutions and changes
very frequently.
fqdn-max-refresh
FQDN cache maximum refresh time, in seconds (3600 - 86400, default = 3600).
The fqdn-max-refresh setting is used to control the global upper limit of the FQDN refresh timer. FQDN entries with a
TTL interval that is longer than the fqdn-max-refresh value will have their refresh timer reduced to this upper limit.
This allows the FortiGate to dictate the upper limit in querying for DNS updates for its FQDN addresses.
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.
For more information on VDOM DNS, see Interfaces in non-management VDOMs as the source IP address of the DNS
conditional forwarding server on page 299.
config vdom
edit <vdom>
config system vdom-dns
set vdom-dns enable
set primary <primary_DNS>
set secondary <secondary_DNS>
set protocol {cleartext dot doh}
set ip6-primary <primary_IPv6_DNS>
set ip6-secondary <secondary_IPv6_DNS>
set source-ip <IP_address>
set interface-select-method {auto | sdwan | specify}
end
next
end
You can configure up to eight domains in the DNS settings using the GUI or the CLI.
When a FortiGate 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, FortiGates use 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.
As the request does not include an FQDN, FortiOS traverses the configured DNS domain list to find a match.
Because host1 is mapped to the host1.sample.com, FortiOS resolves host1 to sample.com, the first entry in the
domain list.
3. Enter execute ping host2.
The system returns the following response:
PING host2.example.com (2.2.2.2): 56 data bytes
FortiOS traverses the domain list to find a match. It first queries sample.com, the first entry in the domain list, but
does not find a match. It then queries the second entry in the domain list, example.com. Because host2 is mapped
to the FQDN of host2.example.com, FortiOS resolves host2 to 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 291 for details.
DNS over QUIC (DoQ) and DNS over HTTP3 (DoH3) are supported in proxy mode inspection for transparent and local-
in explicit modes. See DNS over QUIC and DNS over HTTP3 for transparent and local-in DNS modes on page 1752 for
details.
See Basic DNS server configuration example on page 282 for a sample configuration.
By default, DNS server options are not available in the FortiGate GUI.
shadow DNS database. If the record is not found locally, the query is
then forwarded to the system’s DNS server for further lookup. This
mode ensures a comprehensive search for the requested record,
utilizing both local and system DNS resources.
l Non-Recursive: Search is restricted to the Public DNS database only.
If the requested record is not found, the query will not be forwarded to
the system’s DNS server. This mode is useful when you need to limit
queries strictly to local resources.
l Forward to System DNS: The local DNS database is bypassed and all
queries are forwarded directly to the system’s DNS server. This is
beneficial when you need to rely solely on system-level DNS
resources for resolving queries.
DNS Filter Apply a DNS filter profile to DNS server. This option is not available when
Mode is Non-Recursive. See Applying DNS filter to FortiGate DNS server
on page 1748 for more information.
DNS over HTTPS Enable DNS over HTTPS (DoH). DoH is a method of performing DNS
resolution over a secure HTTPS connection. See DNS over TLS and
HTTPS on page 291 for more information
DNS over HTTP3 Enable DNS over HTTP3 (DoH3). DoH3 is a method of performing DNS
resolution over an HTTP3 connection. See DNS over QUIC and DNS over
HTTP3 for transparent and local-in DNS modes on page 1752 for more
information
DNS over QUIC Enable DNS over QUIC (DoQ). DoQ is a method of performing DNS
resolution over a QUICK UDP Internet Connection (QUIC) connection. See
DNS over QUIC and DNS over HTTP3 for transparent and local-in DNS
modes on page 1752 for more information
c. Click OK.
3. Build the DNS database:
Hostname of Primary DNS The domain name of the default DNS server for this zone. This option is
only available when Type is Primary.
IP of Primary The IP address of the primary DNS server. This option is only available
when Type is Secondary.
Contact Email Address The email address of the administrator for this zone. You can specify only
the username, such as admin, or the full email address, such as
[email protected]. When using only a username, the domain of the email is
the zone. This option is only available when Type is Primary.
TTL The default time-to-live value for the entries of this DNS zone. This option
is only available when Type is Primary.
Authoritative Enabling Authoritative makes this server is the primary and sole source of
information for this specific DNS zone. It prevents the FortiGate from
seeking DNS records further upstream. Enabling authoritative is not
recommended.
DNS Forwarder
Type The resource record type. The availability of the subsequent settings
vary depending on the selected type.
l Address (A): This is the host type. It maps a hostname to an IPv4
See config system dns-server in the CLI reference for a comprehensive list of commands.
2. Configure DNS database:
config system dns-database
edit <name>
set authoritative {enable | disable}
set contact {string}
set domain {string}
set forwarder {user}
set primary-name {string}
set ttl {integer}
See config system dns-database in the CLI reference for a comprehensive list of commands.
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.
In this example, the Local site is configured as an unauthoritative primary DNS server.
d. Configure the remaining settings as needed. The options might 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 port1.
d. Set the Mode to Recursive.
e. Click OK.
1. Send a DNS query for a DNS entry configured locally on the Local site FortiGate:
C:\Users\demo>nslookup office.microsoft.com
Server: Unknown
Address: 172.16.200.1
Non-authoritative answer:
Name: web.example.com
Address: 172.16.200.254
The query is resolved to the IP address configured in the shadow DNS database on the Local site FortiGate.
2. Send a DNS query for a domain that is not configured on the Local site FortiGate:
C:\Users\demo>nslookup facebook.com
Server: Unknown
Address: 172.16.200.1
Non-authoritative answer:
Name: facebook.com
Addresses: 157.240.22.35
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.
Multiple DDNS interfaces can be configured in the GUI. The number of DDNS entries that can be configured is restricted
by table size, with limits of 16, 32, and 64 entries for entry-level, mid-range, and high-end FortiGates respectively.
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.
d. Click OK.
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.
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.
edit 1
set category 30
set action block
next
end
end
next
end
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
;; From 10.1.100.173@853(TCP) in 0.2 ms
root@client:/tmp#
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.
The transparent conditional DNS forwarder allows the FortiGate to intercept and reroute DNS queries for specific
domains to a specific DNS server. For example, when a client’s DNS is located in a distant location, in order to resolve
destination addresses (such as SaaS applications) to the closest application server, the FortiGate can intercept and
reroute the requests to a local DNS to resolve.
This is done by parsing entries and creating a list of filters based on the domain names of zones. When a DNS request
matches one of these filters, the DNS proxy will retrieve the zone's data. The DNS request will then be handled based on
the zone's forwarder settings and whether a local answer is available. It may be forwarded to the original destination
address, the forwarder address, or not forwarded at all if a local answer is available.
This provides greater control over DNS requests, especially when the administrator is not managing the DNS server
configuration of the client devices. This can improve network efficiency and performance by resolving IPs local to the
client's PCs rather than IPs local to the central DNS server.
This feature is not supported on FortiGate models with 2 GB RAM or less. See Proxy-related features not supported on
FortiGate 2 GB RAM models on page 101 for more information.
Example
In this example, FortiGates at various locations are connected to a central site by VPN tunnels where the corporate DNS
server is located. Typically, DNS queries from different sites are sent to the central DNS server and resolved to an IP
local to the central site, which might cause latency and performance issues for certain destinations, such as SaaS
applications.
The Local Site FortiGate is configured with the Microsoft domain and a local DNS entry. Traffic matching the Microsoft
domain is either forwarded to the local DNS server or resolved by the FortiGate, which resolves it to an IP local to the
Local Site, thus improving performance.
This example assumes the following have been configured:
l A successfully operational site-to-site VPN between the Local Site and the Central Site FortiGates (see Site-to-site
VPN on page 2064 for more information).
l Appropriate routing and network interfaces.
l The client PCs are configured to use the Central DNS Server.
The transparent conditional DNS forwarder feature only works with a proxy-based firewall
policy.
To configure the DNS zone and local DNS entries on the Local Site FortiGate in the GUI:
If the DNS server is accessed over a VPN, it may be necessary to specify a source IP for
the FortiGate to reach the DNS server. See How to let the FortiGate access internal DNS
through site-to-site IPsec VPN for more information.
Site-to-site VPN is not a mandatory requirement for this feature to work and is only
applicable to this example.
To configure the DNS zone and local DNS entries on the Local Site FortiGate in the CLI:
config dns-entry
edit 1
set hostname "office"
set ip 172.16.200.55
next
end
next
end
1. Go to Policy & Objects > Firewall Policy and edit the outbound policy towards the IPsec VPN tunnel.
2. Set the Inspection Mode to Proxy-based.
3. In the Security Profiles section, enable DNS Filter and select the profile created in the previous procedure (SaaS).
4. In the Logging Options section, enable Log Allowed Traffic.
5. Configure the remaining settings as needed.
6. Click OK.
To apply the DNS filter profile to the outbound policy towards the IPsec VPN tunnel in the CLI:
From one of the Windows client desktops, use the nslookup command to send various DNS queries.
1. Send a DNS query for a DNS entry configured locally on the Local Site FortiGate:
C:\Users\demo>nslookup office.microsoft.com
Server: Unknown
Address: 192.168.16.254
Non-authoritative answer:
Name: osiprod-wus-pineapple-100.westus.cloudapp.azure.com
Address: 172.16.200.55
The query is resolved to the IP address configured on the Local Site FortiGate.
2. Send a DNS query for the domain configured on the Local Site FortiGate:
C:\Users\demo>nslookup teams.microsoft.com
Server: Unknown
Address: 192.168.16.254
Non-authoritative answer:
Name: s-0005.s-msedge.net
Address: 172.16.200.254
The configuration for IPv6 is similar to an IPv4 conditional DNS forwarder. When configuring the DNS forwarder address,
the IPv6 address must be specified.
If the DNS server is accessed over a VPN, it may be necessary to specify a source IP for the
FortiGate to reach the DNS server. See How to let the FortiGate access internal DNS through
site-to-site IPsec VPN for more information.
Interfaces that are in non-management VDOMs can be the source IP address of the DNS conditional forwarding server.
l When vdom-dns is enabled in a VDOM, only the IP addresses of interfaces in that VDOM can be configured as the
source-ip.
l When vdom-dns is disabled (default), only the IP address of interfaces in the management VDOM can be
configured as the source-ip.
For more information on VDOM DNS, see Important DNS CLI commands on page 273.
In this example:
l vdom1 is a non-management VDOM
l port8 is assigned to vdom1 and has IP address 13.13.13.13
l port1 is assigned to the management VDOM (root) and has IP address 172.16.200.1
config global
config system interface
edit "port8"
set vdom "vdom1"
set ip 13.13.13.13 255.255.255.0
next
edit "port1"
set vdom "root"
set ip 172.16.200.1 255.255.255.0
next
end
end
config vdom
edit vdom1
config system vdom-dns
set vdom-dns disable
end
next
end
l port8 cannot be used as the source IP address in a DNS database because it is assigned to vdom1, and not to a
management VDOM:
config vdom
edit vdom1
config system dns-database
edit "1"
set source-ip 13.13.13.13
13.13.13.13 does not match any interface ip in vdom root.
node_check_object fail! for source-ip 13.13.13.13
l port1 can be used as the source IP address in a DNS database because it is assigned to the management VDOM:
config vdom
edit vdom1
config system dns-database
edit "1"
set source-ip 172.16.200.1
next
end