FortiManager 7.0.0 CLI Reference
FortiManager 7.0.0 CLI Reference
FortiManager 7.0.0
FORTINET DOCUMENT LIBRARY
https://docs.fortinet.com
FORTINET BLOG
https://blog.fortinet.com
NSE INSTITUTE
https://training.fortinet.com
FORTIGUARD CENTER
https://www.fortiguard.com
FEEDBACK
Email: [email protected]
May 3, 2021
FortiManager 7.0.0 CLI Reference
02-700-686029-20210503
TABLE OF CONTENTS
Change Log 12
Introduction 13
FortiManager documentation 13
What’s New in FortiManager 7.0 14
FortiManager 7.0.0 14
Using the Command Line Interface 17
CLI command syntax 17
Connecting to the CLI 18
Connecting to the FortiManager console 18
Setting administrative access on an interface 19
Connecting to the FortiManager CLI using SSH 19
Connecting to the FortiManager CLI using the GUI 20
CLI objects 20
CLI command branches 20
config branch 21
get branch 22
show branch 24
execute branch 25
diagnose branch 25
Example command sequences 26
CLI basics 26
Command help 26
Command tree 27
Command completion 27
Recalling commands 27
Editing commands 27
Line continuation 28
Command abbreviation 28
Environment variables 28
Encrypted password support 28
Entering spaces in strings 29
Entering quotation marks in strings 29
Entering a question mark (?) in a string 29
International characters 29
Special characters 29
IPv4 address formats 29
Changing the baud rate 30
Debug log levels 30
Administrative Domains 31
ADOMs overview 31
Configuring ADOMs 32
Concurrent ADOM Access 33
system 35
admin 35
FortiManager Centralized Security Management provides a single-pane-of-glass for visibility across the entire Fortinet
Security Fabric, as well as to manage Fortinet’s security and networking devices to speed the identification of, and
response to, security incidents. It allows easy control of the deployment of security policies, FortiGuard content security
updates, firmware revisions, and individual configurations for thousands of Fortinet devices.
FortiManager includes:
l Enterprise-class centralized management with single pane-of-glass
l Full control of your network with the Fortinet security fabric
l Common security baseline enforcement for multi-tenancy environments
l Multi-tier management for administrative and virtual domain policy management
l Scalable centralized device & policy management
FortiManager documentation
The following tables list the commands and variables that have changed in the CLI.
FortiManager 7.0.0
The table below lists commands which have changed in version 7.0.0.
Command Change
config system admin profile Variables added:
l fabric-viewer
l run-report
l script-access
l triage-events
l update-incidents
config system admin setting Variables added:
l auth-addr
l auth-port
l idle_timeout_api
l idle_timeout_gui
config system admin user Variables added:
l login-max
l use-global-theme
l user-theme
config system docker Variables added:
l docker-user-login-max
l fortisoar
config system global Variables added:
l object-revision-db-max
l object-revision-mandatory-note
l object-revision-object-max
l object-revision-status
config system log Command added:
l ratelimit
l local-cert
Command Change
config system saml Variable added:
l forticloud-sso
import-template
l set-sim-profile to set-template
diagnose fmupdate check-disk-quota Command updated
diagnose fwmanager Command added:
l image-delete
Commands removed:
l delete-all
l delete-imported-images
l delete-official-images
l delete-serverlist
l imported-imagelist
l reset-schedule-database
l serverlist
Command renamed:
l download-image to image-
download
Command renamed and updated:
l official-imagelist to image-
list
Command updated:
l fwm-log
l dbhash-report
diagnose sql debug hcache-agg Command updated:
l show
Command Change
diagnose sql debug logview Command added
diagnose sql debug sqlqry Command updated:
l show
l dminstallog
l upgradelog
l vartmp
diagnose test application Command added:
l fabricsyncd
Command added:
l upload
This chapter explains how to connect to the CLI and describes the basics of using the CLI. You can use CLI commands
to view all system information and to change all system configuration settings.
This chapter describes:
l CLI command syntax
l Connecting to the CLI
l CLI objects
l CLI command branches
l CLI basics
l The single quotation mark ' and the double quotation mark “ are supported, but must be used in pairs.
l If there are spaces in a string, you must precede the spaces with the \ escape character or put the string in a
You can use a direct console connection, SSH, or the CLI console widget in the GUI to connect to the FortiManager CLI.
For more information, see the FortiManager Administration Guide and your device’s QuickStart Guide.
l Connecting to the FortiManager console
l Setting administrative access on an interface
l Connecting to the FortiManager CLI using SSH
l Connecting to the FortiManager CLI using the GUI
The following procedure describes how to connect to the FortiManager CLI using Windows
HyperTerminal software. You can use any terminal emulation program.
1. Connect the FortiManager console port to the available communications port on your computer.
2. Make sure that the FortiManager unit is powered on.
3. 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
To perform administrative functions through a FortiManagernetwork interface, you must enable the required types of
administrative access on the interface to which your management computer connects. Access to the CLI requires
Secure Shell (SSH) access. If you want to use the GUI, you need HTTPS access.
To use the GUI to configure FortiManager interfaces for SSH access, see the FortiManager Administration Guide.
1. Connect and log into the CLI using the FortiManager console port and your terminal emulation software.
2. Use the following command to configure an interface to accept SSH connections:
config system interface
edit <interface_name>
set allowaccess <access_types>
end
Where <interface_name> is the name of the FortiManager interface to be configured to allow administrative
access, and <access_types> is a whitespace-separated list of access types to enable.
For example, to configure port1 to accept HTTPS and SSH connections, enter:
config system interface
edit port1
set allowaccess https ssh
end
Remember to press Enter at the end of each line in the command example. Also, type
end and press Enter to commit the changes to the FortiManager configuration.
3. To confirm that you have configured SSH access correctly, enter the following command to view the access settings
for the interface:
get system interface <interface_name>
The CLI displays the settings, including the management access settings, for the named interface.
SSH provides strong secure authentication and secure communications to the FortiManager CLI from your internal
network or the internet. Once the FortiManager unit is configured to accept SSH connections, you can run an SSH client
on your management computer and use this client to connect to the FortiManager CLI.
CLI objects
The FortiManager CLI is based on configurable objects. The top-level objects are the basic components of FortiManager
functionality. Each has its own chapter in this guide.
fmupdate Configures settings related to FortiGuard service updates and the FortiManager unit’s built-in FDS.
See fmupdate on page 124.
system Configures options related to the overall operation of the FortiManager unit, such as interfaces,
virtual domains, and administrators. See system on page 35.
There is a chapter in this manual for each of these top-level objects. Each of these objects contains more specific lower
level objects. For example, the system object contains objects for administrators, dns, interfaces, and so on.
Examples showing how to enter command sequences within each branch are provided in the following sections.
config branch
The config commands configure objects of FortiManager functionality. Top-level objects are not configurable, they are
containers for more specific lower level objects. For example, the system object contains administrators, DNS
addresses, interfaces, routes, and so on. When these objects have multiple sub-objects, such as administrators or
routes, they are organized in the form of a table. You can add, delete, or edit the entries in the table. Table entries each
consist of keywords that you can set to particular values. Simpler objects, such as system DNS, are a single set of
keywords.
To configure an object, you use the config command to navigate to the object’s command “shell”. For example, to
configure administrators, you enter the command
config system admin user
The command prompt changes to show that you are in the admin shell.
(user)#
This is a table shell. You can use any of the following commands:
delete Remove an entry from the FortiManager configuration. For example in the
config system admin shell, type delete newadmin and press Enter to
delete the administrator account named newadmin.
edit Add an entry to the FortiManager configuration or edit an existing entry. For
example in the config system admin shell:
l type edit admin and press Enter to edit the settings for the default admin
administrator account.
l type edit newadmin and press Enter to create a new administrator
account with the name newadmin and to edit the default settings for the new
administrator account.
end Save the changes you have made in the current shell and leave the shell. Every
config command must be paired with an end command. You return to the root
FortiManager CLI prompt.
The end command is also used to save set command changes and leave the
shell.
get List the configuration. In a table shell, get lists the table members. In an edit shell,
get lists the keywords and their values.
purge Remove all entries configured in the current shell. For example in the config
user local shell:
l type get to see the list of user names added to the FortiManager
configuration,
l type purge and then y to confirm that you want to purge all the user names,
If you enter the get command, you see a list of the entries in the table of administrators. To add a new administrator, you
enter the edit command with a new administrator name:
edit admin_1
The FortiManager unit acknowledges the new table entry and changes the command prompt to show that you are now
editing the new entry:
new entry 'admin_1' added
(admin_1)#
From this prompt, you can use any of the following commands:
config In a few cases, there are subcommands that you access using a second config command while
editing a table entry. An example of this is the command to add host definitions to an SNMP
community.
end Save the changes you have made in the current shell and leave the shell. Every config command
must be paired with an end command.
The end command is also used to save set command changes and leave the shell.
get List the configuration. In a table shell, get lists the table members. In an edit shell, get lists the
keywords and their values.
next Save the changes you have made in the current shell and continue working in the shell. For
example if you want to add several new admin user accounts enter the config system admin
user shell.
1. Enter edit User1 and press Enter.
2. Use the set commands to configure the values for the new admin account.
3. Enter next to save the configuration for User1 without leaving the config system admin
user shell.
4. Continue using the edit, set, and next commands to continue adding admin user accounts.
5. Type end then press Enter to save the last configuration and leave the shell.
set Assign values. For example from the edit admin command shell, typing set passwd newpass
changes the password of the admin administrator account to newpass.
Note: When using a set command to make changes to lists that contain options separated by
spaces, you need to retype the whole list including all the options you want to apply and excluding
all the options you want to remove.
show Show changes to the default configuration in the form of configuration commands.
unset Reset values to defaults. For example from the edit admin command shell, typing unset
passwd resets the password of the admin administrator account to the default of no password.
The config branch is organized into configuration shells. You can complete and save the configuration within each
shell for that shell, or you can leave the shell without saving the configuration. You can only use the configuration
commands for the shell that you are working in. To use the configuration commands for another shell you must leave the
shell you are working in and enter the other shell.
The root prompt is the FortiManager host or model name followed by a #.
get branch
Use get to display settings. You can use get within a config shell to display the settings for that shell, or you can use
get with a full path to display the settings for the specified shell.
To use get from the root prompt, you must include a path to a shell.
Example
When you type get in the config system admin user shell, the list of administrators is displayed.
At the (user)# prompt, type:
get
Example
When you type get in the admin user shell, the configuration values for the admin administrator account are displayed.
edit admin
user_type : local
ssh-public-key1 :
ssh-public-key2 :
ssh-public-key3 :
meta-data:
last-name : (null)
first-name : (null)
email-address : (null)
phone-number : (null)
mobile-number : (null)
pager-number : (null)
hidden : 0
dashboard-tabs:
dashboard:
== [ 6 ]
moduleid: 6
== [ 1 ]
moduleid: 1
== [ 2 ]
moduleid: 2
== [ 3 ]
moduleid: 3
== [ 4 ]
moduleid: 4
== [ 5 ]
moduleid: 5
Example
You want to confirm the IPv4 address and netmask of the port1 interface from the root prompt.
At the # prompt, type:
get system interface port1
show branch
Use show to display the FortiManager unit configuration. Only changes to the default configuration are displayed. You
can use show within a config shell to display the configuration of that shell, or you can use show with a full path to
display the configuration of the specified shell.
To display the configuration of all config shells, you can use show from the root prompt.
Example
When you type show and press Enter within the port1 interface shell, the changes to the default interface
configuration are displayed.
At the (port1)# prompt, type:
show
Example
You are working in the port1 interface shell and want to see the system dns configuration. At the (port1)# prompt,
type:
show system dns
execute branch
Use execute to run static commands, to reset the FortiManager unit to factory defaults, or to back up or restore the
FortiManager configuration. The execute commands are available only from the root prompt.
Example
diagnose branch
Commands in the diagnose branch are used for debugging the operation of the FortiManager unit and to set
parameters for displaying different levels of diagnostic information. The diagnose commands are not documented in
this CLI Reference.
diagnose commands are intended for advanced users only. Contact Fortinet Customer
Support before using these commands.
CLI basics
Command help
You can press the question mark (?) key to display command help.
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.
Command tree
Enter tree to display the FortiManager CLI command tree. To capture the full output, connect to your device using a
terminal emulation program, such as PuTTY, and capture the output to a log file. For config commands, use the tree
command to view all available variables and sub-commands.
Command completion
You can use the tab key or the question mark (?) key to complete commands.
l You can press the tab key at any prompt to scroll through the options available for that prompt.
l You can type the first characters of any command and press the tab key or the question mark (?) key to complete
the command or to scroll through the options that are available at the current cursor position.
l After completing the first word of a command, you can press the space bar and then the tab key to scroll through the
options available at the current cursor position.
Recalling commands
You can recall previously entered commands by using the Up and Down arrow keys to scroll through commands you
have entered.
Editing commands
Use the left and right arrow keys to move the cursor back and forth in a recalled command. You can also use Backspace
and Delete keys, and the control keys listed in the following table to edit the command.
Line continuation
To break a long command over multiple lines, use a \ at the end of each line.
Command abbreviation
You can abbreviate commands and command options to the smallest number of non-ambiguous characters. For
example, the command get system status can be abbreviated to g sy st.
Environment variables
$USERFROM The management access type (SSH, Telnet and so on) and the IPv4 address of
the logged in administrator.
Variable names are case sensitive. In the following example, when entering the variable, you can type $ followed by a
tab to auto-complete the variable to ensure that you have the exact spelling and case. Continue pressing tab until the
variable you want to use is displayed.
config system global
set hostname $SerialNum
end
After you enter a clear text password using the CLI, the FortiManager unit encrypts the password and stores it in the
configuration file with the prefix ENC. For example:
show system admin user user1
config system admin user
edit "user1"
set password ENC
UAGUDZ1yEaG30620s6afD3Gac1FnOT0BC1rVJmMFc9ubLlW4wEvHcqGVq+ZnrgbudK7aryyf1scXcX
dnQxskRcU3E9XqOit82PgScwzGzGuJ5a9f
set profileid "Standard_User"
next
end
Enter:
set password ENC
UAGUDZ1yEaG30620s6afD3Gac1FnOT0BC1rVJmMFc9ubLlW4wEvHcqGVq+ZnrgbudK7aryyf1scXcXdnQxsk
RcU3E9XqOit82PgScwzGzGuJ5a9f
If you want to include a quotation mark, single quote, or apostrophe in a string, you must precede the character with a
backslash character. To include a backslash, enter two backslashes.
If you want to include a question mark (?) in a string, you must precede the question mark with CTRL-V. Entering a
question mark without first entering CTRL-V causes the CLI to display possible command completions, terminating the
string.
International characters
Special characters
The characters <, >, (, ), #, ’, and " are not permitted in most CLI fields, but you can use them in passwords. If you use the
apostrophe (‘) or quote (") character, you must precede it with a backslash (\) character when entering it in the CLI set
command.
You can enter an IPv4 address and subnet using either dotted decimal or slash-bit format. For example you can type
either:
or
set ip 192.168.1.1/24
The IPv4 address is displayed in the configuration file in dotted decimal format.
Using execute console baudrate, you can change the default console connection baud rate.
The following table lists available debug log levels on your FortiManager.
ADOMs overview
FortiManager can manage a large number of Fortinet devices. ADOMs enable administrators to manage only those
devices that are specific to their geographic location or business division. This also includes FortiGate units with multiple
configured VDOMs.
If ADOMs are enabled, each administrator account is tied to an administrative domain. When a particular administrator
logs in, they see only those devices or VDOMs that have been enabled for their account. The one exception is the admin
administrator account which can see and maintain all administrative domains and the devices within those domains.
Administrative domains are not enabled by default, and enabling and configuring the domains can only be performed by
the admin administrator. For more information, see Configuring ADOMs on page 32.
The default and maximum number of administrative domains you can add depends on the FortiManager system model.
The table below outlines these limits.
FMG-100C 30 / 30
FMG-200D 30 / 30
FMG-VM-Base 10 / 10
Configuring ADOMs
To use administrative domains, the admin administrator must first enable the feature, create ADOMs, and assign
existing FortiManager administrators to ADOMs.
Enabling ADOMs moves non-global configuration items to the root ADOM. Back up the
FortiManager unit configuration before enabling ADOMs.
ADOMs must be enabled before adding FortiMail, FortiWeb, and FortiCarrier devices to the
FortiManager system. FortiMail and FortiWeb devices are added to their respective pre-
configured ADOMs.
In FortiManager 5.0.3 and later, FortiGate and FortiCarrier devices can no longer be grouped
into the same ADOM. FortiCarrier devices should be grouped into a dedicated FortiCarrier
ADOM.
Within the CLI, you can enable ADOMs and set the administrator ADOM. To configure the ADOMs, you must use the
GUI.
To Enable/disable ADOMs:
An administrative domain has two modes: normal and advanced. Normal mode is the default device mode. In normal
mode, a FortiGate unit can only be added to a single administrative domain. In advanced mode, you can assign different
VDOMs from the same FortiGate to multiple administrative domains.
Enabling the advanced mode option will result in more complicated management scenarios. It
is recommended only for advanced users.
edit <name>
set adom <adom_name>
next
end
where <name> is the administrator user name and <adom_name> is the ADOM name.
System administrators can enable/disable concurrent access to the same ADOM if multiple administrators are
responsible for managing a single ADOM. When enabled, multiple administrators can log in to the same ADOM
concurrently. When disabled, only a single administrator has read/write access to the ADOM, while all other
administrators have read-only access.
Concurrent ADOM access can be enabled or disabled using the CLI or the GUI. The settings apply to all ADOMs, unless
you set workspace-mode to per-ADOM. When per-ADOM is enabled, you can apply different settings to each ADOM by
using the GUI.
Concurrent ADOM access is enabled by default. This can cause conflicts if two administrators
attempt to make configuration changes to the same ADOM concurrently.
To enable ADOM locking and disable concurrent ADOM access for all ADOMs:
To disable ADOM locking and enable concurrent ADOM access for all ADOMs:
When workflow mode is enabled, then the admin will have and extra option in the admin page
under profile to allow the admin to approve or reject workflow requests.
When per-adom is enabled, then the admin can set the workspace mode for each ADOM by
using the GUI.
Use system commands to configure options related to the overall operation of the FortiManager unit.
TCP port numbers cannot be used by multiple services at the same time with the same IP
address. If a port is already in use, it cannot be assigned to another service. For example,
HTTPS and HTTP cannot have the same port number.
admin
admin group
Use this command to add, edit, and delete admin user groups.
Syntax
Variable Description
<group> Enter the name of the group you are editing or enter a new name to create an
entry (character limit = 63).
admin ldap
Use this command to add, edit, and delete Lightweight Directory Access Protocol (LDAP) users.
Syntax
Variable Description
<server> Enter the name of the LDAP server or enter a new name to create an entry
(character limit = 63).
adom <adom-name> Set the ADOM name to link to the LDAP configuration.
attributes <filter> Attributes used for group searching (for multi-attributes, a use comma as a
separator). For example:
l member
l uniquemember
l member,uniquemember
Variable Description
ca-cert <string> CA certificate name. This variable appears only when secure is set to ldaps or
starttls.
cnid <string> Enter the common name identifier (character limit = 20, default = cn).
connect-timeout <integer> Set the LDAP connection timeout, in milliseconds (default = 500).
group <string> Enter an authorization group. The authentication user must be a member of this
group (full DN) on the server.
password <passwd> Enter a password for the username above. This variable appears only when type
is set to regular.
port <integer> Enter the port number for LDAP server communication (1 - 65535, default = 389).
secondary-server <string> Enter the secondary LDAP server domain name or IPv4 address. Enter a new
name to create a new entry.
server <string> Enter the LDAP server domain name or IPv4 address. Enter a new name to
create a new entry.
tertiary-server <string> Enter the tertiary LDAP server domain name or IPv4 address. Enter a new name
to create a new entry.
username <string> Enter a username. This variable appears only when type is set to regular.
Example
This example shows how to add the LDAP user user1 at the IPv4 address 206.205.204.203.
config system admin ldap
edit user1
set server 206.205.204.203
set dn techdoc
admin profile
Use this command to configure access profiles. In a newly-created access profile, no access is enabled. Setting an
option to none hides it from administrators with that profile assigned.
Syntax
Variable Description
<profile> Enter the name of the access profile, enter a new name to create a new profile
(character limit = 35). The pre-defined access profiles are Super_User, Standard_
User, Restricted_User, and Package_User.
adom-lock {none | read | read- Configure ADOM locking permissions for profile:
write} l none: No permission (default).
adom-switch {none | read | read- Configure administrative domain (ADOM) permissions for this profile (default =
write} none).
This command corresponds to the Administrative Domain option in the GUI.
Controlled functions: ADOM settings in DVM, ADOM settings in All ADOMs page
(under System Settings tab)
Dependencies: If system-setting is none, the All ADOMs page is not
accessible, type must be system
Variable Description
allow-to-install {enable | disable} Enable/disable allowing restricting users to install objects to the devices (default =
enable).
app-filter {enable | disable} Enable/disable IPS Sensor permission for the restricted admin profile (default =
disable).
Dependencies: type must be restricted.
assignment {none | read | read- Configure assignment permissions for this profile (default = none).
write} This command corresponds to the Assignment option in the GUI. It is a sub-
setting of policy-objects.
Controlled functions: Global assignment in Global ADOM
Dependencies: type must be system
change-password {enable | Enable/disable allowing restricted users to change their password (default =
disable} disable).
config-retrieve {none | read | Set the configuration retrieve settings for this profile (default = none).
read-write} This command corresponds to the Retrieve Configuration from Devices option in
the GUI. It is a sub-setting of device-manager.
Controlled functions: Retrieve configuration from devices
Dependencies: type must be system
config-revert {none | read | read- Set the configuration revert settings for this profile (default = none).
write} This command corresponds to the Revert Configuration from Revision History
option in the GUI. It is a sub-setting of device-manager.
Controlled functions: Revert configuration from revision history
Dependencies: type must be system
consistency-check {none | read | Configure Policy Check permissions for this profile (default = none).
read-write} This command corresponds to the Policy Check option in the GUI. It is a sub-
setting of policy-objects.
Controlled functions: Policy check
Dependencies: type must be system
l email: Email
l message: Message
l srcip: Source IP
Variable Description
datamask-unmasked-time Enter the time without data masking, in days (default = 0).
<integer>
deploy-management {none | Enter the level of access to the deployment management configuration settings
read | read-write} for this profile (default = none).
This command corresponds to the Install to Devices option in the GUI. It is a sub-
setting of device-manager.
Controlled functions: Install to devices
Dependencies: type must be system
description <string> Enter a description for this access profile (character limit = 1023). Enclose the
description in quotes if it contains spaces.
device-ap Enter the level of access to device AP settings for this profile (default = none).
This command corresponds to the AP Manager option in the GUI.
Controlled functions: AP Manager pane
Dependencies: type must be system
device-config {none | read | read- Enter the level of access to device configuration settings for this profile (default =
write} none).
This command corresponds to the Manage Device Configuration option in the
GUI. It is a sub-setting of device-manager.
Controlled functions: Edit devices, All settings under Menu in Dashboard
Dependencies: type must be system
device-forticlient {none | read | Enter the level of access to FortiClient settings for this profile (default = none).
read-write} This command corresponds to the FortiClient Manager option in the GUI.
Controlled functions: FortiClient Manager pane
Dependencies: type must be system
device-fortiswitch {none | read | Enter the level of access to the FortiSwitch Manager module for this profile
read-write} (default = none).
This command corresponds to the FortiSwitch Manager option in the GUI.
Controlled functions: FortiSwitch Manager pane
Dependencies: type must be system
device-manager {none | read | Enter the level of access to Device Manager settings for this profile (default =
read-write} none).
This command corresponds to the Device Manager option in the GUI.
Controlled functions: Device Manager pane
Dependencies: type must be system
device-op {none | read | read- Add the capability to add, delete, and edit devices to this profile (default = none).
write} This command corresponds to the Add/Delete Devices/Groups option in the GUI.
It is a sub-setting of device-manager.
Variable Description
device-policy-package-lock Configure device policy package locking permissions for this profile (default =
{none | read | read-write} none).
Controlled functions: Policy package locking.
Dependencies: type must be system
device-profile {none | read | read- Configure device profile permissions for this profile (default = none).
write} This command corresponds to the Provisioning Templates option in the GUI. It is
a sub-setting of device-manager.
Controlled functions: Provisioning Templates
Dependencies: type must be system
device-revision-deletion {none | Configure device revision deletion permissions for this profile (default = none).
read | read-write} This command corresponds to the Delete Device Revision option in the GUI. It is
a sub-setting of device-manager.
Controlled functions: Deleting device revisions
Dependencies: type must be system
device-wan-link-load-balance Enter the level of access to wan-link-load-balance settings for this profile
(default = none).
This command corresponds to SD-WAN option in the GUI. It is a sub-setting of
device-manager.
Controlled functions: SD-WAN
Dependencies: type must be system
event-management {none | read | Set the Event Management permissions (default = none).
read-write} This command corresponds to the Event Management option in the GUI.
Controlled functions: Event Management pane and all its operations
Dependencies: faz-status must be set to enable in system global, type
must be system
fabric-viewer {none | read | read- Configure Fabric Viewer permissions (default = none):
write} l none: No permission.
fgd_center {none | read | read- Set the FortiGuard Center permissions (default = none).
write} This command corresponds to the FortiGuard Center option in the GUI.
Controlled functions: FortiGuard pane, All the settings under FortiGuard
Dependencies: type must be system
Variable Description
global-policy-packages {none | Configure global policy package permissions for this profile (default = none).
read | read-write} This command corresponds to the Global Policy Packages & Objects option in the
GUI. It is a sub-setting of policy-objects.
Controlled functions: All operations in Global ADOM
Dependencies: type must be system
import-policy-packages {none | Configure importing policy package permissions for this profile (default = none).
read | read-write} This command corresponds to the Import Policy Package option in the GUI.
Controlled functions: Importing policy packages
Dependencies: type must be system
intf-mapping {none | read | read- Configure interface mapping permissions for this profile (default = none).
write} This command corresponds to the Interface Mapping option in the GUI.
Controlled functions: Mapping interfaces
Dependencies: type must be system
ips-filter {enable | disable} Enable/disable Application Sensor permission for the restricted admin profile
(default = disable).
Dependencies: type must be restricted
log-viewer {none | read | read- Set the Log View permissions (default = none).
write} This command corresponds to the Log View option in the GUI.
Controlled functions: Log View and all its operations
Dependencies: faz-status must be set to enable in system global, type
must be system
policy-objects {none | read | read- Set the Policy & Objects permissions (default = none).
write} Controlled functions: Policy & Objects pane
Variable Description
read-passwd {none | read | read- Add the capability to view the authentication password in clear text to this profile
write} (default = none).
Dependencies: type must be system
realtime-monitor {none | read | Enter the level of access to the Drill Down configuration settings for this profile
read-write} (default = none).
Dependencies: faz-status must be set to enable in system global, type must
be system
report-viewer {none | read | read- Set the Reports permissions (default = none).
write} This command corresponds to the Reports option in the GUI.
Controlled functions: Reports pane and all its operations
Dependencies: faz-status must be set to enable in system global, type
must be system
run-report {none | read | read- Configure run reports permission for this profile (default = none):
write} l none: No permission.
system-setting {none | read | Configure System Settings permissions for this profile (default = none).
read-write} This command corresponds to the System Settings option in the GUI.
Controlled functions: System Settings pane, all the settings under system setting
Dependencies: type must be system
term-access {none | read | read- Set the terminal access permissions for this profile (default = none).
write} This command corresponds to the Terminal Access option in the GUI. It is a sub-
setting of device-manager.
Controlled functions: Connect to the CLI via Telnet or SSH
Dependencies: Depends on device-config option, type must be System
Admin
Variable Description
triage-events {none | read | read- Set the triage events permissions for this profile (default = none).
write}
vpn-manager {none | read | read- Enter the level of access to VPN console configuration settings for this profile
write} (default = none).
This command corresponds to the VPN Manager option in the GUI. It is a sub-
setting of policy-objects.
Controlled functions: VPN Console
Dependencies: type must be System Admin
web-filter {enable | disable} Enable/disable Web Filter Profile permission for the restricted admin profile
(default = disable).
Dependencies: type must be Restricted Admin
field-category {alert | all | fortiview Enter the field category (default = all).
| log | euba}
field-type {email | ip | mac | string} Enter the field type (default = string).
admin radius
Use this command to add, edit, and delete administration RADIUS servers.
Syntax
Variable Description
<server> Enter the name of the RADIUS server or enter a new name to create an entry
(character limit = 63).
auth-type {any | chap | mschap2 | The authentication protocol the RADIUS server will use.
pap} l any: Use any supported authentication protocol (default).
(MS-CHAPv2).
l chap: Challenge Handshake Authentication Protocol (CHAP)
nas-ip <ipv4_address> The network access server (NAS) IPv4 address and called station ID.
port <integer> The RADIUS server port number (1 - 65535, default = 1812).
secondary-secret <passwd> The password to access the RADIUS secondary-server (character limit = 64).
secondary-server <string> The RADIUS secondary-server DNS resolvable domain name or IPv4 address.
secret <passwd> The password to access the RADIUS server (character limit = 64).
server <string> The RADIUS server DNS resolvable domain name or IPv4 address.
Example
This example shows how to add the RADIUS server RAID1 at the IPv4 address 206.205.204.203 and set the shared
secret as R1a2D3i4U5s.
config system admin radius
edit RAID1
set server 206.205.204.203
set secret R1a2D3i4U5s
end
admin setting
Use this command to configure system administration settings, including web administration ports, timeout, and
language.
Syntax
Variable Description
admin-https-redirect {enable | Enable/disable redirection of HTTP admin traffic to HTTPS (default= enable).
disable}
admin-login-max <integer> Set the maximum number of admin users that be logged in at one time (1 - 256,
default = 256).
admin_server_cert <admin_ Enter the name of an https server certificate to use for secure connections (default
server_cert> = server.crt).
allow_register {enable | disable} Enable/disable the ability for an unregistered device to be registered (default=
disable).
auth-port <integer> Set the port which is used by FortiGate to authorize FortiManager (default = 443).
Variable Description
chassis-update-interval Set the chassis background update interval, in minutes (4 - 1440, default = 15).
<integer>
http_port <integer> Enter the HTTP port number for web administration (1 - 65535, default = 80).
https_port <integer> Enter the HTTPS port number for web administration (1 - 65535, default = 443).
idle_timeout <integer> Enter the idle timeout value, in seconds (60 - 28800, default = 900).
idle_timeout_api <integer> Enter the idle timeout for the API sessions, in seconds (1 - 28800, default = 900).
idle_timeout_gui <integer> Enter the idle timeout for the GUI sessions, in seconds (60 - 28800, default =
900).
install-ifpolicy-only {enable | Enable/disable allowing only the interface policy to be installed (default = disable).
disable}
offline_mode {enable | disable} Enable/disable offline mode to shut down the protocol used to communicate with
managed devices (default = disable).
register_passwd <passwd> Enter the password to use when registering a device (character limit = 19).
show-add-multiple {enable | Enable/disable show the add multiple button in the GUI (default = disable).
disable}
Variable Description
show-device-import-export Enable/disable import/export of ADOM, device, and group lists (default = disable).
{enable | disable}
show_hostname {enable | Enable/disable showing the hostname on the GUI login page (default = disable).
disable}
unreg_dev_opt {add_allow_ Select action to take when an unregistered device connects to FortiManager:
service | add_no_service} l add_allow_service: Add unregistered devices and allow service
requests (default).
l add_no_service: Add unregistered devices and deny service requests.
l korean: Korean
l spanish: Spanish
admin tacacs
Use this command to add, edit, and delete administration TACACS+ servers.
Syntax
Variable Description
<server> Enter the name of the TACACS+ server or enter a new name to create an entry
(character limit = 63).
l auto: Uses PAP, MSCHAP, and CHAP (in that order) (default).
CHAP)
l pap: Password Authentication Protocol (PAP).
port <integer> Port number of the TACACS+ server (1 - 65535, default = 49).
secondary-key <passwd> Key to access the secondary server (character limit = 128).
tertiary-key <passwd> Key to access the tertiary server (character limit = 128).
Example
This example shows how to add the TACACS+ server TAC1 at the IPv4 address 206.205.204.203 and set the key as
R1a2D3i4U5s.
config system admin tacacs
edit TAC1
set server 206.205.204.203
set key R1a2D3i4U5s
end
admin user
You can create meta-data fields for administrator accounts. These objects must be created
using the FortiManager GUI. The only information you can add to the object is the value of the
field (pre-determined text/numbers). For more information, see System Settings in the
FortiManager Administration Guide.
Syntax
Variable Description
<name_string> Enter the name of the admin user or enter a new name to create a new user
(character limit = 35).
login-max <integer> Set the maximum number of login sessions for this user (default = 32).
Variable Description
password <passwd> Enter a password for the administrator account (character limit = 128). For
improved security, the password should be at least 6 characters long.
This variable is available only if user_type is local.
change-password {enable | Enable/disable allowing restricted users to change their password (default =
disable} disable).
trusthost1 <ipv4_mask> Optionally, type the trusted host IPv4 address and network mask from which the
trusthost2 <ipv4_mask> administrator can log in to the FortiManager system. You can specify up to ten
trusthost3 <ipv4_mask> trusted hosts. Setting trusted hosts for all of your administrators can enhance the
security of your system.
...
Defaults:
trusthost10 <ipv4_mask>
trusthost1: 0.0.0.0 0.0.0.0 for all
others: 255.255.255.255 255.255.255.255 for none
ipv6_trusthost1 <ipv6_mask> Optionally, type the trusted host IPv6 address from which the administrator can
ipv6_trusthost2 <ipv6_mask> log in to the FortiManager system. You can specify up to ten trusted hosts. Setting
ipv6_trusthost3 <ipv6_mask> trusted hosts for all of your administrators can enhance the security of your
system.
...
Defaults:
ipv6_trusthost10 <ipv6_mask>
ipv6_trusthost1: ::/0 for all
others: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none
profileid <profile-name> Enter the name of the access profile to assign to this administrator account
(character limit = 35, default = Restricted_User). Access profiles control
administrator access to FortiManager features.
adom <adom_name(s)> Enter the name(s) of the ADOM(s) the administrator belongs to. Any configuration
of ADOMs takes place via the FortiManager GUI.
dev-group <group-name> Enter the device group that the admin use can access. This option can only be
used for administrators with access to only one ADOM.
web-filter <Web Filter profile Enter the Web Filter profile to associate with the restricted admin profile.
name> Dependencies: admin user must be associated with a restricted admin profile.
ips-filter <IPS Sensor name> Enter the IPS Sensor to associate with the restricted admin profile.
Dependencies: The admin user must be associated with a restricted admin
profile.
app-filter <Application Sensor Enter the Application Sensor to associate with the restricted admin profile.
name> Dependencies: The admin user must be associated with a restricted admin
profile.
Variable Description
description <string> Enter a description for this administrator account (character limit = 127). Enclose
the description in quotes if it contains spaces.
(default).
l pki-auth: The administrator uses PKI.
ldap-server <string> Enter the LDAP server name if the user type is set to LDAP.
This option is only available when user_type is ldap.
radius_server <string> Enter the RADIUS server name if the user type is set t o RADIUS.
This option is only available when user_type is radius.
tacacs-plus-server <string> Enter the TACACS+ server name if the user type is set to TACACS+.
This option is only available when user_type is tacacs-plus.
ssh-public-key1 <key-type> You can specify the public keys of up to three SSH clients. These clients are
<key-value> authenticated without being asked for the administrator password. You must
ssh-public-key2 <key-type> create the public-private key pair in the SSH client application.
<key-value> <key type> is ssh-dss for a DSA key, ssh-rsa for an RSA key.
ssh-public-key3 <key-type> <key-value> is the public key string of the SSH client.
<key-value>
avatar <string> Image file for the administrator's avatar (maximum 4K base64 encode).
ext-auth-accprofile-override Enable/disable allowing the use of the access profile provided by the remote
{enable | disable} authentication server (default = disable).
ext-auth-adom-override {enable | Enable/disable allowing the use of the ADOM provided by the remote
disable} authentication server (default = disable).
In order to support vendor specific attributes (VSA), the authentication server
requires a dictionary to define which VSAs to support. The Fortinet RADIUS
vendor ID is 12365. The Fortinet-Vdom-Name attribute is used by this
command.
Variable Description
ext-auth-group-match <string> Only admin users that belong to this group are allowed to log in.
password-expire <yyyy-mm-dd> When enforcing the password policy, enter the date that the current password will
expire.
rpc-permit {none | read-only | Set the permission level for log in via Remote Procedure Call (RPC) (default =
read-write} none).
use-global-theme {enable | Enable/disble global theme for administration GUI (default = enable).
disable}
user-theme {astronomy | autumn Set the color scheme to use for the admin user GUI (default = blue):
| binary-tunnel | blue | calla-lily l astronomy: Astronomy
Variable Description
l spring: Spring
l summer: Summer
l technology: Technology
l twilight: Twilight
l winter: Winter
l zebra: Zebra
This command is available when use-global-theme is disabled.
fieldname The label/name of the field (read-only, default = 50). Enclose the name in quotes if
it contains spaces.
fieldlength The maximum number of characters allowed for this field (read-only, default =
50).
fieldvalue <string> Enter a pre-determined value for the field. This is the only value that can be
changed with the config meta-data subcommand (character limit = 255).
diskio-content-type {blks | iops | Set the Disk I/O Monitor widget's chart type.
util} l blks: the amount of data of I/O requests.
Variable Description
diskio-period {1hour | 24hour | Set the Disk I/O Monitor widget's data period (default = 1hour).
8hour}
tabid <integer> ID of the tab where the widget is displayed (default = 0).
log-rate-type {device | log} Log receive monitor widget’s statistics breakdown options (default = device).
log-rate-topn {1 | 2 | 3 | 4 | 5} Log receive monitor widgets’s number of top items to display (default = 5).
log-rate-period {1hour | 2min | Log receive monitor widget’s data period (default = 2min).
6hours}
time-period {1hour | 24hour | Set the Log Database Monitor widget's data period (default = 1hour).
8hour}
Setting trusted hosts for all of your administrators increases the security of your network by further restricting
administrative access. In addition to knowing the password, an administrator must connect only through the subnet or
subnets you specify. You can even restrict an administrator to a single IPv4 address if you define only one trusted host
IPv4 address with a netmask of 255.255.255.255.
When you set trusted hosts for all administrators, the FortiManager system does not respond to administrative access
attempts from any other hosts. This provides the highest security. If you leave even one administrator unrestricted, the
unit accepts administrative access attempts on any interface that has administrative access enabled, potentially
exposing the unit to attempts to gain unauthorized access.
The trusted hosts you define apply both to the GUI and to the CLI when accessed through SSH. CLI access through the
console connector is not affected.
Example
Use the following commands to add a new administrator account named admin_2 with the password set to p8ssw0rd
and the Super_User access profile. Administrators that log in to this account will have administrator access to the
FortiManager system from any IPv4 address.
config system admin user
edit admin_2
set description "Backup administrator"
set password p8ssw0rd
set profileid Super_User
end
alert-console
Use this command to configure the alert console options. The alert console appears on the dashboard in the GUI.
Syntax
Variable Description
period {1 | 2 | 3 | 4 | 5 | 6 | 7} Enter the number of days to keep the alert console alerts (default = 7).
severity-level {information | notify Enter the minimum severity level to display on the alert console on the dashboard:
| warning | error | critical | alert | l emergency: The unit is unusable (default).
Variable Description
l warning: Functionality might be affected.
l notification: Information about normal events.
l information: General information about unit operations.
Example
This example sets the alert console message display to warning for a duration of three days.
config system alert-console
set period 3
set severity-level warning
end
alertemail
Use this command to configure alert email settings for your FortiManager unit.
All variables are required when authentication is enabled.
Syntax
Variable Description
authentication {enable | disable} Enable/disable alert email authentication (default = enable).
fromaddress <email-address_ The email address the alert message is from. This is a required variable.
string>
fromname <string> The SMTP name associated with the email address. Enclose the name in quotes if
it contains spaces.
smtppassword <passwd> Set the SMTP server password (character limit = 39).
smtpport <integer> The SMTP server port (1 - 65535, default = 25).
smtpserver {<ipv4_ The SMTP server address, either a DNS resolvable host name or an IPv4
address>|<fqdn_string>} address.
smtpuser <username> Set the SMTP server username (character limit= 63).
Example
Here is an example of configuring alertemail. Enable authentication, the alert is set in Mr. Customer’s name and from
his email address, the SMTP server port is the default port(25), and the SMTP server is at IPv4 address of
192.168.10.10.
config system alertemail
set authentication enable
set fromaddress [email protected]
set fromname “Mr. Customer”
set smtpport 25
set smtpserver 192.168.10.10
end
alert-event
Use alert-event commands to configure the FortiManager unit to monitor logs for log messages with certain severity
levels, or information within the logs. If the message appears in the logs, the FortiManager unit sends an email or SNMP
trap to a predefined recipient(s) of the log message encountered. Alert event messages provide immediate notification of
issues occurring on the FortiManager unit.
When configuring an alert email, you must configure at least one DNS server. The FortiGate unit uses the SMTP server
name to connect to the mail server and must look up this name on your DNS server.
alert-event was removed from the GUI in FortiManager version 5.0.3. This command has
been kept in the CLI for customers who previously configured this function.
Syntax
end
Variable Description
<name_string> Enter a name for the alert event (character limit = 63).
enable-generic-text {enable | Enable generic text match (default = disable).
disable}
enable-severity-filter {enable | Enable/disable alert severity filter (default = disable).
disable}
event-time-period {0.5 | 1 | 3 | 6 | The period of time in hours during which if the threshold number is exceeded, the
12 | 24 | 72 | 168} event will be reported:
l 0.5: 30 minutes (default)
l 1: 1 hour
l 3: 3 hours
l 6: 6 hours
l 12: 12 hours
l 24: 1 day
l 72: 3 days
l 168: 1 week
generic-text <string> Text that must be contained in a log to trigger alert (character limit = 255).
num-events {1 | 5 | 10 | 50 | 100} Set the minimum number of events that must occur in the given interval before it is
reported (default = 1).
severity-filter {high | low | Set the required log severity to trigger an alert (default = high).
medium | medium-high | medium-
low}
severity-level-comp {>= | = | <=} Set the log severity threshold comparison criterion (default = =). Log messages
are monitored based on the log level. For example, alerts may be monitored if the
messages are greater than or equal to (>=) the Warning log level.
severity-level-logs {no-check | Set the log severity threshold level. That is, the log level the FortiManager looks
information | notify | for when monitoring for alert messages.
warning |error | critical | alert | l no-check: Do not check severity level for this log type (default).
Variable Description
from <email_address> Enter the sender email address to use in alert emails. This is available when type
is set to mail.
to <email_address> Enter the recipient email address to use in alert emails. This is available when
type is set to mail.
smtp-name <server_name> Enter the name of the mail server. This is available when type is set to mail.
snmp-name <server_name> Enter the snmp server name. This is available when type is set to snmp.
syslog-name <server_name> Enter the syslog server name or IPv4 address. This is available when type is set
to syslog.
Example
In the following example, the alert message is set to send an email to the administrator when 5 warning log messages
appear over the span of three hours.
config system alert-event
edit warning
config alert-destination
edit 1
set type mail
set from [email protected]
set to [email protected]
set smtp-name mail.example.com
end
set enable-severity-filter enable
set event-time-period 3
set severity-level-log warning
set severity-level-comp =
set severity-filter medium
end
auto-delete
Use this command to automatically delete policies for logs, reports, and archived and quarantined files.
Syntax
Variable Description
retention {days | weeks | months} Automatic deletion in days, weeks, or months (default = days).
backup all-settings
Use this command to set or check the settings for scheduled backups.
Syntax
Variable Description
status {enable | disable} Enable/disable scheduled backups (default = disable).
server {<ipv4_address>|<fqdn_ Enter the IPv4 address or DNS resolvable host name of the backup server.
str>}
user <username> Enter the user account name for the backup server (character limit = 63).
directory <string> Enter the name of the directory on the backup server in which to save the backup
file.
week_days {monday tuesday Enter the days of the week on which to perform backups. You may enter multiple
wednesday thursday friday days.
saturday sunday}
time <hh:mm:ss> Enter the time of day to perform the backup. Time is required in the form
<hh:mm:ss>.
protocol {ftp | scp | sftp} Enter the transfer protocol (default = sftp).
passwd <passwd> Enter the password for the backup server (character limit = 63).
cert <certificate_name> SSH certificate for authentication. Only available if the protocol is set to scp.
The SSH certificate object must already be configured. See certificate ssh on
page 67.
crptpasswd <passwd> Optional password to protect backup content (character limit = 63).
Example
This example shows a whack where backup server is 172.20.120.11 using the admin account with no password, saving
to the /usr/local/backup directory. Backups are done on Mondays at 1:00pm using ftp.
config system backup all-settings
set status enable
set server 172.20.120.11
set user admin
set directory /usr/local/backup
set week_days monday
set time 13:00:00
set protocol ftp
end
certificate
certificate ca
When a CA processes your Certificate Signing Request (CSR), it sends you the CA certificate, the signed local
certificate and the Certificate Revocation List (CRL).
Syntax
To view all of the information about the certificate, use the get command:
get system certificate ca <ca_name>
Variable Description
certificate crl
Syntax
Variable Description
comment <string> Optionally, enter a descriptive comment for this CRL (character limit = 127).
certificate local
Use this command to install local certificates. When a CA processes your CSR, it sends you the CA certificate, the
signed local certificate and the CRL.
Syntax
Variable Description
password <passwd> Enter the local certificate password (character limit = 67).
comment <string> Enter any relevant information about the certificate (character limit = 127).
You should not modify the following variables if you generated the CSR on this unit:
certificate oftp
Syntax
Variable Description
local {Fortinet_Local | Fortinet_ Choose from the two available local certificates.
Local2}
mode {custom | default | local} Mode of certificates used by OFTPD (default = default):
l custom: Use a custom certificate.
certificate remote
Syntax
Variable Description
certificate ssh
5. Use the system certificate SSH command to install the SSH certificate. Depending on your terminal
software, you can copy the certificate and paste it into the command.
Syntax
Variable Description
comment <comment_text> Enter any relevant information about the certificate (character limit = 127).
You should not modify the following variables if you generated the CSR on this unit.
connector
Syntax
Variable Description
fsso-refresh-interval <integer> Set the FSSO refresh interval, in seconds (60 - 1800, default = 180).
fsso-sess-timeout <integer> Set the FSSO session timeout, in seconds (30 - 600, default = 300).
px-refresh-interval <integer> Set the pxGrid refresh interval, in seconds (60 - 1800, default = 300).
px-svr-timeout <integer> Set the pxGrid session timeout, in seconds (30 - 600, default = 900).
dm
Syntax
config system dm
set concurrent-install-image-limit <integer>
set concurrent-install-limit <integer>
set concurrent-install-script-limit <integer>
set conf-merge-after-script {enable | disable}
set discover-timeout <integer>
set dpm-logsize <integer>
set fgfm-install-refresh-count <integer>
set fgfm-sock-timeout <integer>
set fgfm_keepalive_itvl <integer>
set force-remote-diff {enable | disable}
set fortiap-refresh-cnt <integer>
set fortiap-refresh-itvl <integer>
set fortiext-refresh-cnt <integer>
set install-image-timeout <integer>
set install-tunnel-retry-itvl <integer>
set max-revs <integer>
set nr-retry <integer>
set retry {enable | disable}
set retry-intvl <integer>
set rollback-allow-reboot {enable | disable}
set script-logsize <integer>
set skip-scep-check {enable | disable}
set skip-tunnel-fcp-req {enable | disable}
set verify-install {enable | disable | optimal}
end
Variable Description
concurrent-install-image-limit The maximum number of concurrent installs (1 - 1000, default = 500).
<integer>
concurrent-install-limit <integer> The maximum number of concurrent installs (5 - 2000, default = 480).
concurrent-install-script-limit The maximum number of concurrent install scripts (5 - 2000, default = 480).
<integer>
conf-merge-after-script {enable | Merge config after running the script on the remote device, instead of a full retrieve
disable} (default = disable).
discover-timeout <integer> Check connection timeout when discovering a device (3 - 15, default = 6).
dpm-logsize <integer> The maximum DPM log size per device, in kilobytes (1 - 10000, default = 10000).
fgfm-install-refresh-count The maximum FGFM install refresh attempts (default = 10).
<integer>
fgfm-sock-timeout <integer> The maximum FGFM communication socket idle time, in seconds (90 - 1800,
default = 360).
fgfm_keepalive_itvl <integer> The FortiManager/FortiGate communication protocol keep alive interval, in
seconds (30 - 600, default = 120).
force-remote-diff {enable | Enable/disable always using remote diff when installing (default = disable).
disable}
Variable Description
fortiap-refresh-cnt <integer> Maximum auto refresh FortiAP number each time (1 - 10000, default = 500).
fortiap-refresh-itvl <integer> Auto refresh FortiAP status interval, in minutes (1 - 1440, 0 to disable, default =
10).
fortiext-refresh-cnt <integer> Maximum device number for FortiExtender auto refresh (1 - 10000, default = 50).
install-image-timeout <integer> Maximum waiting time for image transfer and device upgrade, in seconds (600 -
7200, default = 3600).
install-tunnel-retry-itvl <integer> Time to re-establish tunnel during install, in seconds (10 - 60, default = 60).
max-revs <integer> The maximum number of revisions saved (1 - 250, default = 100).
nr-retry <integer> The number of times the FortiManager unit will retry (default = 1).
retry {enable | disable} Enable/disable configuration installation retries (default = enable).
retry-intvl <integer> The interval between attempting another configuration installation following a
failed attempt (default = 15).
rollback-allow-reboot {enable | Enable/disable allowing a FortiGate unit to reboot when installing a script or
disable} configuration (default = disable).
script-logsize <integer> Enter the maximum script log size per device, in kilobytes (1 - 10000, default =
100).
skip-scep-check {enable | Enable/disable installing scep related objects even if the scep URL is configured
disable} (default = disable).
skip-tunnel-fcp-req {enable | Enable/disable skipping the FCP request sent from an FGFM tunnel (default =
disable} enable).
verify-install {enable | disable | Enable/disable verify install against remote configuration:
optimal} l disable: Disable.
Example
This example shows how to set up configuration installations. It shows how to set 5 attempts to install a configuration on
a FortiGate device, waiting 30 seconds between attempts.
config system dm
set retry enable
set nr-retry 5
set retry-intvl 30
end
dns
Use these commands to set the DNS server addresses. Several FortiManager functions, including sending alert email,
use DNS. You can configure both IPv4 and IPv6 DNS server addresses.
Syntax
Variable Description
primary <ipv4_address> Enter the primary DNS server IPv4 address.
secondary <ipv4_address> Enter the secondary DNS IPv4 server address.
ip6-primary <ipv6_address> Enter the primary DNS server IPv6 address.
ip6-secondary <ipv6_address> Enter the secondary DNS IPv6 server address.
Example
This example shows how to set the primary FortiManager DNS server IPv4 address to 172.20.120.99 and the
secondary FortiManager DNS server IPv4 address to 192.168.1.199.
config system dns
set primary 172.20.120.99
set secondary 192.168.1.199
end
docker
Syntax
Variable Description
cpu <integer> Set the maximum % of CPU usage (10 - 50, default = 50).
default-address-pool_base Set the default-address-pool CIDR. Enter the IP address and the netmask (default
<ip&netmask> = 172.17.0.0 255.255.0.0).
docker-user-login-max <integer> Set the maximum login sessions for the docker users (default = 32).
mem <integer> Set the maximum % of RAM usage (10 - 50, default = 50).
status {enable | disable | qa | dev} Enable/disable Docker and set registry (default = disable):
l enable: Enable production registry.
fips
Use this command to set the Federal Information Processing Standards (FIPS) status. FIPS mode is an enhanced
security option for some FortiManager models. Installation of FIPS firmware is required only if the unit was not ordered
with this firmware pre-installed.
Syntax
Variable Description
status enable Enable the FIPS-CC mode of operation.
Variable Description
Note: enable option is available only when the device is not in FIPS mode.
entropy-token {enable | disable | Configure support for the FortiTRNG entropy token when switching to FIPS mode:
dynamic} l enable: The token must be present during boot up and reseeding. If the
token is not present, the boot up or reseeding is interrupted until the token is
inserted.
l disable: The current entropy implementation is used to seed the Random
token is not present, the boot process is not blocked and the old entropy
implementation is used.
re-seed-interval <integer> The amount of time between RNG reseeding, in minutes (0 - 1440, default =
1440).
fortiview
fortiview setting
Syntax
Variable Description
not-scanned apps {exclude | Include/exclude unscanned applications in FortiView (default = include). Set to
include} exclude to filter out never scanned applications.
resolve-ip {enable | disable} Enable/disable resolving the IP address to the hostname in FortiView (default =
disable).
fortiview autocache
Syntax
end
Variable Description
aggressive-fortiview {enable | Enable/disable aggressive auto-cache on FortiView (default = disable).
disable}
interval <integer> The time interval for FortiView auto-cache, in hours (default = 168).
status {enable | disable} Enable/disable FortiView auto-cache (default = enable).
global
Use this command to configure global settings that affect miscellaneous FortiManager features.
Syntax
Variable Description
admin-lockout-duration <integer> Set the lockout duration for FortiManager administration, in seconds (default =
60).
admin-lockout-threshold Set the lockout threshold for FortiManager administration (1 - 10, default = 3).
<integer>
adom-mode {advanced | normal} Set the ADOM mode (default = normal).
adom-rev-auto-delete {by-days | Auto delete features for old ADOM revisions:
by-revisions | disable} l by-days: Auto delete ADOM revisions by maximum days.
revisions (default).
l disable: Disable auto delete function for ADOM revision.
Variable Description
adom-select {enable | disable} Enable/disable a pop-up window that allows administrators to select an ADOM
after logging in (default = enable).
adom-status {enable | disable} Enable/disable administrative domains (default = disable).
clone-name-option {default | Set the cloned object name option:
keep} l default: Add a Clone of prefix to the name.
clt-cert-req {enable | disable} Enable/disable requiring a client certificate for GUI login (default = disable).
When both clt-cert-req and admin-https-pki-required are enabled,
only PKI administrators can connect to the GUI.
console-output {more | standard} Select how the output is displayed on the console (default = standard).
Select more to pause the output at each full screen until keypress. Select
standard for continuous output without pauses.
country-flag {enable | disable} Enable/disable a country flag icon beside an IP address (default = enable).
create-revision {enable | disable} Enable/disable create revision by default (default = disable).
daylightsavetime Enable/disable daylight saving time (default = enable).
{enable | disable} If you enable daylight saving time, the FortiManager unit automatically adjusts the
system time when daylight saving time begins or ends.
detect-unregistered-log-device Enable/disable unregistered log device detection (default = enable).
{enable | disable}
device-view-mode {regular | tree} Set the devices/groups view mode (default = regular).
dh-params <integer> Set the minimum size of the Diffie-Hellman prime for SSH/HTTPS, in bits (default
= 2048).
disable-module {fortiview-noc} Disable module list.
enc-algorithm {high | medium | Set SSL communication encryption algorithms:
low} l high: SSL communication using high encryption algorithms (default).
Variable Description
import-ignore-addr-cmt Enable/disable import ignore of address comments (default = disable).
{enable | disable}
language {english | japanese | GUI language:
simch | spanish | trach} l english: English (default)
l japanese: Japanese
l spanish: Spanish
l md5-auth: Record log file’s MD5 hash value and authentication code.
log-forward-cache-size <integer> Set the log forwarding disk cache size, in gigabytes (default = 0).
longitude <string> Set the FortiManager device's longitude.
max-log-forward <integer> Set the maximum log forwarding and aggregation number (5 - 20).
max-running-reports <integer> Maximum running reports number (1 - 10, default = 1).
mc-policy-disabled-adoms Set the multicast policy disabled ADOMs, separated by spaces. Only ADOMs
<adom-name> below version 6.0 can be included.
multiple-steps-upgrade-in- Enable/disable multiple steps upgrade in an autolink process (default = disable).
autolink {enable | disable}
object-revision-db-max <integer> Maximum revisions for a single database (10000 - 1000000, default = 100000).
object-revision-mandatory-note Enable/disable mandatory note when creating a revision (default = enable).
{enable | disable}
object-revision-object-max Set the maximum revisions for a single object (10 - 1000, default = 100).
<integer>
object-revision-status {enable | Enable/disable creating revisions when modifying objects (default = enable).
disable}
oftp-ssl-protocol {sslv3 | tlsv1.0 | Set the lowest SSL protocols for oftpd (default = tlsv1.2).
tlsv1.1 | tlsv1.2 | tlsv1.3}
partial-install {enable | disable} Enable/disable partial install (install only some objects) (default= disable).
Use this command to enable pushing individual objects of the policy package
down to all FortiGates in the Policy Package.
Once enabled, in the GUI you can right-click an object and choose to install it.
Variable Description
partial-install-force {enable | Enable/disable partial install when the Dev database is modified (default=
disable} disable).
This option is only available when partial-install is enabled.
partial-install-rev {enable | Enable/disable partial install revision (default= disable).
disable} This option is only available when partial-install is enabled.
perform-improve-by-ha {enable | Enable/disable performance improvement by distributing tasks to secondary HA
disable} units (default= disable).
per-policy-lock {enable | disable} Enable/disable per policy lock (default= disable).
This option is only available in workspace lock mode.
policy-object-icon {enable | Enable/disable show icons of policy objects (default= disable).
disable}
policy-object-in-dual-pane Enable/disable show policies and objects in dual pane (default= disable).
{enable | disable}
pre-login-banner {enable | Enable/disable pre-login banner (default= disable).
disable}
pre-login-banner-message Set the pre-login banner message.
<string>
private-data-encryption Enable/disable private data encryption using an AES 128 bit key (default =
{enable | disable} disable).
remoteauthtimeout <integer> Remote authentication (RADIUS/LDAP) timeout, in seconds (default = 10).
search-all-adoms {enable | Enable/disable search all ADOMs for where-used queries (default= disable).
disable}
ssl-low-encryption {enable | Enable/disable SSL low-grade (40-bit) encryption (default= disable).
disable}
ssl-protocol {tlsv1.3 | tlsv1.2 | Set the SSL protocols (default = tlsv1.3 tlsv1.2).
tlsv1.1 | tlsv1.0 | sslv3}
ssl-static-key-ciphers {enable | Enable/disable SSL static key ciphers (default = enable).
disable}
swapmem {enable | disable} Enable/disable virtual memory.
task-list-size <integer> Set the maximum number of completed tasks to keep (default = 2000).
timezone <integer> The time zone for the FortiManager unit (default = Pacific Time). See Time zones
on page 79
tunnel-mtu <integer> Set the maximum transportation unit (68 - 9000, default = 1500).
usg {enable | disable} Enable/disable contacting only FortiGuard servers in the USA (default = enable).
vdom-mirror {enable | disable} Enable/disable VDOM mirror (default = disable).
Variable Description
Once enabled in the CLI, you can select to enable VDOM Mirror when editing a
virtual domain in the System > Virtual Domain device tab in Device
Manager. You can then add devices and VDOMs to the list so they may be
mirrored. An icon is displayed in the Mirror column of the page to indicate that the
VDOM is being mirrored to another device/VDOM.
When changes are made to the primary device’s VDOM database, a copy is
applied to the mirror device’s VDOM database. A revision is created and then
installed to the devices.
VDOM mirror is intended to be used by MSSP or enterprise companies who need
to provide a backup VDOM for their customers.
webservice-proto {tlsv1.3 | Web Service connection (default = tlsv1.3 tlsv1.2).
tlsv1.2 | tlsv1.1 | tlsv1.0 | sslv3 |
sslv2}
workspace-mode {disabled | Enable/disable Workspace and Workflow (ADOM locking):
normal | per-adom | workflow} l disabled: Workspace is disabled (default).
Example
The following command turns on daylight saving time, sets the FortiManager unit name to FMG3k, and chooses the
Eastern time zone for US & Canada.
config system global
set daylightsavetime enable
set hostname FMG3k
set timezone 12
end
Time zones
ha
Use the config system ha command to enable and configure FortiManager high availability (HA). FortiManager HA
provides a solution for a key requirement of critical enterprise management and networking components: enhanced
reliability.
A FortiManager HA cluster consists of up five FortiManager units of the same FortiManager model. One of the
FortiManager units in the cluster operates as a primary unit and the other one to four units operate as backup units. All of
the units are visible on the network. The primary unit and the backup units can be at the same location. FortiManager HA
also supports geographic redundancy so the primary unit and backup units can be in different locations attached to
different networks as long as communication is possible between them (for example over the Internet, over a WAN, or
through a private network).
Note: With FortiManager 7.0.0, you can enable FortiAnalyzer features, or you can have FortiManager HA, but not both
at the same time.
Administrators connect to the primary unit GUI or CLI to perform FortiManager operations. The primary unit also
interacts with managed FortiGate devices, and FortiSwitch devices. Managed devices connect with the primary unit for
configuration backup and restore. If FortiManager is being used to distribute firmware updates and FortiGuard updates
to managed devices, the managed devices can connect to the primary unit or one of the backup units.
If the primary FortiManager unit fails you must manually configure one of the backup units to become the primary unit.
The new primary unit will have the same IPv4 addresses as it did when it was the backup unit. For the managed devices
to automatically start using the new primary unit, you should add all of the FortiManager units in the cluster to the
managed devices.
For more information, see the FortiManager Administration Guide.
Syntax
config system ha
set clusterid <clusert_ID_int>
set file-quota <integer>
set hb-interval <integer>
set hb-lost-threshold <integer>
set local-cert <string>
set mode {primary | secondary | standalone}
set password <passwd>
config peer
edit <peer_id_int>
set ip <peer_ipv4_address>
Variable Description
clusterid <clusert_ID_int> A number that identifies the HA cluster (1 - 64, default = 1).
All members of the HA cluster must have the same cluster ID. If you have more
than one FortiManager HA cluster on the same network, each HA cluster must
have a different ID.
file-quota <integer> Set the HA file quota, in megabytes (2048 - 20480, default = 4096).
hb-interval <integer> The time that a cluster unit waits between sending heartbeat packets, in seconds
(1 - 255, default = 10).
The heartbeat interval is also the amount of time that a cluster unit waits before
expecting to receive a heartbeat packet from the other cluster unit.
hb-lost-threshold <integer> The number of heartbeat intervals that one of the cluster units waits to receive HA
heartbeat packets from other cluster units before assuming that the other cluster
units have failed (1 - 255, default = 30).
In most cases you do not have to change the heartbeat interval or failover
threshold. The default settings mean that if the a unit fails, the failure is detected
after 3 x 5 or 15 seconds; resulting in a failure detection time of 15 seconds.
If the failure detection time is too short the HA cluster may detect a failure when
none has occurred. For example, if the primary unit is very busy it may not
respond to HA heartbeat packets in time. In this situation, the backup unit may
assume that the primary unit has failed when the primary unit is actually just busy.
Increase the failure detection time to prevent the backup unit from detecting a
failure when none has occurred.
If the failure detection time is too long, administrators will be delayed in learning
that the cluster has failed. In most cases, a relatively long failure detection time
will not have a major effect on operations. But if the failure detection time is too
long for your network conditions, then you can reduce the heartbeat interval or
failover threshold.
password <passwd> A group password for the HA cluster. All members of the HA cluster must have the
same group password. If you have more than one FortiManager HA cluster on the
same network, each HA cluster must have a different password (character limit:
19).
Variable Description
<peer_id_int> Add a peer and add the peer’s IPv4 or IPv6 address and serial number.
ip6 <peer_ipv6_address> Enter the IPv6 address of the peer FortiManager unit.
serial-number <string> Enter the serial number of the peer FortiManager unit.
status {enable | disable} Enter the status of the peer FortiManager unit (default = enable).
The following steps assume that you are starting with four FortiManager units running the same firmware build and are
set to the factory default configuration. The primary unit and the first backup unit are connected to the same network. The
second and third backup units are connected to a remote network and communicate with the primary unit over the
Internet.
1. Enter the following command to configure the primary unit for HA operation.
config system ha
set mode primary
set password <password_str>
set clusterid 10
config peer
edit 1
set ip <peer_ip_ipv4>
set serial-number <peer_serial_str>
next
edit 2
set ip <peer_ip_ipv4>
set serial-number <peer_serial_str>
next
edit 3
set ip <peer_ip_ipv4>
set serial-number <peer_serial_str>
next
end
This command configures the FortiManager unit to operate as the primary unit, adds a password, sets the
clusterid to 10, and accepts defaults for the other HA settings. This command also adds the three backup units
to the primary unit as peers.
2. Enter the following command to configure the backup units for HA operation.
config system ha
set mode secondary
set password <password_str>
set clusterid 10
config peer
edit 1
set ip <peer_ip_ipv4>
set serial-number <peer_serial_str>
next
end
This command configures the FortiManager unit to operate as a backup unit, adds the same password, and
clusterid as the primary unit, and accepts defaults for the other HA settings. This command also adds the
primary unit to the backup unit as a peer.
3. Repeat step 2 to configure each backup unit.
interface
Syntax
Variable Description
<port> The port can be set to a port number such as port1, port2, port3, or port4. Different
FortiManager models have different numbers of ports.
status {up | down} Start (up) or stop (down) the interface (default = up). If the interface is stopped it
does not accept or send packets. If you stop a physical interface, VLAN interfaces
associated with it also stop.
ip <ipv4_mask> Enter the interface IPv4 address and netmask. The IPv4 address cannot be on the
same subnet as any other interface.
allowaccess {http https ping snmp Enter the types of management access permitted on this interface. Separate
soc-fabric ssh webservice} multiple selected types with spaces.
If you want to add or remove an option from the list, retype the list as required.
serviceaccess {fclupdates Enter the types of service access permitted on this interface. Separate multiple
fgtupdates webfilter-antispam} selected types with spaces. If you want to add or remove an option from the list,
retype the list as required.
l fclupdates: FortiClient updates access.
Variable Description
l fgtupdates: FortiGate updates access.
l webfilter-antispam: Web filtering and antispam access.
update-service-ip <ip&netmask> The IP address for the FortiGate update service. It must be on the same subnet as
the interface IP address.
This variable is only available when serviceaccess is fgtupdates.
rating-service-ip <ip&netmask> The IP address for the FortiGate rating service. It must be on the same subnet as
the interface IP address.
This variable is only available when serviceaccess is webfilter-antispam.
speed {1000full 100full 100half Enter the speed and duplexing the network port uses:
10full 10half auto} l 100full: 100M full-duplex
Example
This example shows how to set the FortiManager port1 interface IPv4 address and network mask to
192.168.100.159 and 255.255.255.0, and the management access to ping, https, and ssh.
config system interface
edit port1
set allowaccess ping https ssh
set ip 192.168.110.26 255.255.255.0
set status up
end
locallog
locallog setting
Syntax
Variable Description
log-interval-dev-no-logging Interval for logging the event of no logs received from a device, in minutes (default
<integer> = 1400).
log-interval-disk-full <integer> Interval for logging the event of disk full, in minutes (default = 5).
log-interval-gbday-exceeded Interval for logging the event of the GB/Day license exceeded, in minutes (default
<integer> = 1400).
Use this command to configure the disk settings for uploading log files, including configuring the severity of log levels.
l status must be enabled to view diskfull, max-log-file-size and upload variables.
l upload must be enabled to view/set other upload* variables.
Syntax
Variable Description
status {enable | disable} Enable/disable logging to the local disk (default = enable)
max-log-file-size <integer> Enter the size at which the log is rolled, in megabytes (1 - 1024, default = 100).
roll-schedule {none | daily | Enter the period for the scheduled rolling of a log file:
weekly} l none: Not scheduled; the log rolls when max-log-file-size is reached
(default).
l daily: Every day.
roll-day {sunday | monday | Enter the day for the scheduled rolling of a log file (default = sunday).
tuesday | wednesday | thursday |
friday | saturday}
roll-time <hh:mm> Enter the time for the scheduled rolling of a log file.
diskfull {nolog | overwrite} Enter action to take when the disk is full:
l nolog: stop logging
log-disk-full-percentage Enter the percentage at which the log disk will be considered full (50 - 90, default
<integer> = 80).
upload {enable | disable} Enable/disable uploading of logs when rolling log files (default = disable).
server-type {FTP | SCP | SFTP} Enter the server type to use to store the logs:
l FTP: upload via FTP (default)
uploadport <integer> Enter the port to use when communicating with the destination server (1 - 65535,
default = 0).
Variable Description
uploadpass <passwd> Enter the password of the user account on the destination server (character limit =
127).
uploadtype <event> Enter to upload the event log files (default = event).
uploadzip {enable | disable} Enable to compress uploaded log files (default = disable).
upload-delete-files {enable | Enable/disable deleting log files after uploading (default = enable).
disable}
Example
In this example, the logs are uploaded to an upload server and are not deleted after they are uploaded.
config system locallog disk setting
set status enable
set severity information
set max-log-file-size 1000MB
set roll-schedule daily
set upload enable
set uploadip 10.10.10.1
set uploadport port 443
set uploaduser myname2
set uploadpass 12345
set uploadtype event
set uploadzip enable
set uploadsched enable
set upload-time 06:45
set upload-delete-file disable
end
locallog filter
Use this command to configure filters for local logs. All keywords are visible only when event is enabled.
Syntax
Variable Description
devcfg {enable | disable} Enable/disable logging device configuration messages (default = enable).
devops {enable | disable} Enable/disable managed device's operations messages (default = enable).
diskquota {enable | disable} Enable/disable logging FortiAnalyzer disk quota messages (default = enable).
docker {enable | disable} Enable/disable docker application generic messages (default = enable).
dvm {enable | disable} Enable/disable logging device manager messages (default = enable).
ediscovery {enable | disable} Enable/disable logging device manager messages (default = enable).
epmgr {enable | disable} Enable/disable logging endpoint manager messages (default = enable).
event {enable | disable} Enable/disable configuring log filter messages (default = enable).
Variable Description
eventmgmt {enable | disable} Enable/disable logging FortiAnalyzer event handler messages (default = enable).
fazsys {enable | disable} Enable/disable logging FortiAnalyzer system messages (default = enable).
fgd {enable | disable} Enable/disable logging FortiGuard service messages (default = enable).
fmgws {enable | disable} Enable/disable logging web service messages (default = enable).
fmlmgr {enable | disable} Enable/disable logging FortiMail manager messages (default = enable).
fmwmgr {enable | disable} Enable/disable logging firmware manager messages (default = enable).
fortiview {enable | disable} Enable/disable logging FortiAnalyzer FortiView messages (default = enable).
glbcfg {enable | disable} Enable/disable logging global database messages (default = enable).
ha {enable | disable} Enable/disable logging high availability activity messages (default = enable).
incident {enable | disable} Enable/disable logging FortiAnalyzer incident messages (default = enable).
iolog {enable | disable} Enable/disable input/output log activity messages (default = enable).
logdb {enable | disable} Enable/disable logging FortiAnalyzer log DB messages (default = enable).
logdev {enable | disable} Enable/disable logging FortiAnalyzer log device messages (default = enable).
logfile {enable | disable} Enable/disable logging FortiAnalyzer log file messages (default = enable).
logging {enable | disable} Enable/disable logging FortiAnalyzer logging messages (default = enable).
lrmgr {enable | disable} Enable/disable logging log and report manager messages (default = enable).
report {enable | disable} Enable/disable logging FortiAnalyzer report messages (default = enable).
rev {enable | disable} Enable/disable logging revision history messages (default = enable).
rtmon {enable | disable} Enable/disable logging real-time monitor messages (default = enable).
scfw {enable | disable} Enable/disable logging firewall objects messages (default = enable).
scply {enable | disable} Enable/disable logging policy console messages (default = enable).
scrmgr {enable | disable} Enable/disable logging script manager messages (default = enable).
scvpn {enable | disable} Enable/disable logging VPN console messages (default = enable).
Variable Description
system {enable | disable} Enable/disable logging system manager messages (default = enable).
webport {enable | disable} Enable/disable logging web portal messages (default = enable).
Example
In this example, the local log filters are log and report manager, and system settings. Events in these areas of the
FortiManager unit will be logged.
config system locallog filter
set event enable
set lrmgr enable
set system enable
end
Use this command to enable or disable, and select the severity threshold of, remote logging to the FortiAnalyzer units.
You can configure up to three FortiAnalyzer devices.
The severity threshold required to forward a log message to the FortiAnalyzer unit is separate from event, syslog, and
local logging severity thresholds.
Syntax
Variable Description
severity {emergency | alert | Select the logging severity level (default = notification).
critical | error | warning | The FortiManager unit logs all messages at and above the logging severity level
notification | information | debug } you select.
Variable Description
upload-time <hh:mm> Set the time to upload local log files (default = 00:00).
Example
You might enable remote logging to the FortiAnalyzer unit configured. Events at the information level and higher, which
is everything except debug level events, would be sent to the FortiAnalyzer unit.
config system locallog fortianalyzer setting
set status enable
set severity information
end
Use this command to configure memory settings for local logging purposes.
Syntax
Variable Description
diskfull {nolog | overwrite} Enter the action to take when the disk is full:
l nolog: stop logging when disk full
severity {emergency | alert | Select the logging severity level (default = notification).
critical | error | warning | The FortiManager unit logs all messages at and above the logging severity level
notification | information | debug} you select.
status {enable | disable} Enable/disable logging to the memory buffer (default = disable).
Example
This example shows how to enable logging to memory for all events at the notification level and above. At this level of
logging, only information and debug events will not be logged.
config system locallog memory
set severity notification
set status enable
end
Use this command to configure the settings for logging to a syslog server. You can configure up to three syslog servers:
syslogd, syslogd2 and syslogd3.
Syntax
Variable Description
csv {enable | disable} Enable/disable producing the log in comma separated value (CSV) format
(default = disable).
If you do not enable CSV format the FortiManager unit produces space separated
log files.
facility {alert | audit | auth | Enter the facility type (default = local7).
authpriv | clock | cron | daemon | The facility identifies the source of the log message to syslog. Change facility
ftp | kernel | local0 | local1 | local2 to distinguish log messages from different FortiManager units so you can
| local3 | local4 | local5 | local6 | determine the source of the log messages. local0 to local7 are reserved for
local7 | lpr | mail | news | ntp | local use.
syslog | user | uucp}
severity {emergency | alert | Select the logging severity level (default = notification).
critical | error | warning | The FortiManager unit logs all messages at and above the logging severity level
notification | information | debug} you select.
status {enable | disable} Enable/disable logging to the remote syslog server (default = disable).
Example
In this example, the logs are uploaded to a previously configured syslog server named logstorage. The FortiManager
unit is identified as facility local0.
config system locallog syslogd setting
set facility local0
set syslog-name logstorage
set status enable
set severity information
end
log
log alert
Syntax
Variable Description
max-alert-count <integer> Maximum number of alerts supported (100 - 10000, default = 1000).
log device-disable
Syntax
Variable Description
TTL <string> Set the duration for Time to Live (TTL). For instance, enter 1d5h for 1 day and 5
hours.
Supported units:
l d- day.
l h- hour.
l m- minute.
l s- second.
Leave the field unset for no expiration.
Note: Do not input auto generated part from [expire:.
log interface-stats
Syntax
Variable Description
billing-report {enable | disable} Enable/disable billing report feature (default = disable).
retention-days <integer> The number of days that interface data are stored (0 - 2000, default = 100)
sampling-interval <integer> The interval in which interface data are received from FortiGate devices, in
seconds (300 - 86400, default = 1200)
status {enable | disable} Enable/disable interface statistics (default = enable).
log ioc
Use this command to configure log based IoC (Indicators of Compromise) settings.
Syntax
Variable Description
notification {enable | disable} Enable/disable IoC notification (default = enable).
notification-throttle <integer> Set the minute value for throttling the rate of IoC notifications (1 - 10080, default =
1440).
rescan-max-runner <integer> Set the maximum number of concurrent IoC rescans (1 to CPU count, default = 8).
rescan-run-at <integer> Set the hour of the day when IoC rescan runs (1 - 24, 0 = run immediately, default
= 24).
rescan-status {enable | disable} Enable/disable IoC rescan (default = enable).
status {enable | disable} Enable/disable the IoC feature (default = enable).
log mail-domain
Syntax
Variable Description
<id> The ID of the FortiMail domain.
devices <string> The device IDs for domain to VDOM mapping, separated by commas (default =
All_FortiMails).
For example: FEVM020000000000,FEVM020000000001
domain <string> The FortiMail domain.
vdom <string> The VDOM name that is mapping to the FortiMail domain.
log ratelimit
Syntax
Variable Description
device-ratelimit-default <integer> The default maximum device log rate limit (default = 0).
Note: This command is only available when the mode is set to manual.
mode {disable | manual} The logging rate limit mode (default = disable).
Variable Description
In the manual mode, the system rate limit and the device rate limit both are
configurable, no limit if not configured.
system-ratelimit <integer> The maximum system log rate limit (default = 0).
Note: This command is only available when the mode is set to manual.
ratelimit <integer> The maximum device log rate limit (default = 0).
log settings
Syntax
Variable Description
browse-max-logfiles <integer> Maximum number of log files for each log browse attempt, per ADOM (default =
10000).
dns-resolve-stip {enable | Enable/disable resolving destination IP by DNS (default = disable).
disable}
download-max-logs <integer> Maximum number of logs for each log download attempt (default = 100000).
FAC-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FAZ-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FCH-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FCT-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FDD-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FGT-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FMG-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FML-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FPX-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FSA-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
FWB-custom-field1 <string> Enter a name of the custom log field to index (character limit = 31).
ha-auto-migrate {enable | Enabled/disable automatically merging HA member's logs to HA cluster (default =
disable} disable).
Variable Description
import-max-logfiles <integer> Maximum number of log files for each log import attempt (default = 10000).
log-file-archive-name {basic | Log file name format for archiving.
extended} l basic: Basic format for log archive file name (default), for example:
FGT20C0000000001.tlog.1417797247.log.
l extended: Extended format for log archive file name, for example:
FGT20C0000000001.2014-12-05-
08:34:58.tlog.1417797247.log.
sync-search-timeout <integer> The maximum amount of time that a log search session can run in synchronous
mode, in seconds (1 - 86400, default = 60).
Variables for config {rolling-regular | rolling-local | rolling-analyzer} subcommand:
days {fri | mon| sat | sun | thu | tue Log files rolling schedule (days of the week). When when is set to weekly, you
| wed} can configure days, hour, and min values.
del-files {enable | disable} Enable/disable log file deletion after uploading (default = disable).
directory <string> The upload server directory (character limit = 127).
file-size <integer> Roll log files when they reach this size, in megabytes (10 - 1000, default = 200).
gzip-format {enable | disable} Enable/disable compression of uploaded log files (default = disable).
hour <integer> The hour of the day that log files are rolled (0 - 23, default = 0).
ip <ipv4_address> Upload server IPv4 addresses. Configure up to three servers.
ip2 <ipv4_address>
ip3 <ipv4_address>
log-format {csv | native | text} Format of uploaded log files:
l csv: CSV (comma-separated value) format.
min <integer> The minute of the hour that log files are rolled (0 - 59, default = 0).
password <passwd> Upload server log in passwords (character limit = 128).
password2 <passwd>
password3 <passwd>
port <integer> Upload server IP port number.
port2 <integer>
port3 <integer>
server-type {ftp | scp | sftp} Upload server type (default = ftp).
upload {enable | disable} Enable/disable log file uploads (default = disable).
upload-hour <integer> The hour of the day that log files are uploaded (0 - 23, default = 0).
upload-mode {backup | mirror} Configure upload mode with multiple servers. Servers are tried then used one
after the other upon failure to connect.
l backup: Servers are attempted and used one after the other upon failure to
connect (default).
l mirror: All configured servers are attempted and used.
Variable Description
upload-trigger {on-roll | on- Event triggering log files upload:
schedule} l on-roll: Upload log files after they are rolled (default).
log-fetch
log-fetch client-profile
Syntax
Variable Description
data-range {custom} The data range settings for the fetched logs, which is always custom.
end-time <hh:mm> Set the end date and time of the data-range.
<yyyy/mm/dd>
index-fetch-logs {enable | Enable/disable indexing logs automatically after fetching logs (default = enabled).
disable}
log-filter-logic {and | or} Set the logic for the log filters (default = or).
secure-connection {enable | Enable/disable protecting log-fetch connection with TLS/SSL (default = enabled).
disable}
start-time <hh:mm> Set the start date and time of the data-range. The start date should be earlier than
<yyyy/mm/dd> the end date.
Variable Description
value <string> Enter the field filter operand or free-text matching expression.
log-fetch server-setting
Syntax
Variable Description
max-conn-per-session <integer> The maximum number of concurrent file download connections per session
(default = 3).
max-sessions <integer> The maximum number of concurrent fetch sessions (default = 1).
session-timeout <integer> Set the fetch session timeout period, in minutes (default = 10). This option is only
available in server mode.
Syntax
Variable Description
<id> Enter the mail service ID of the entry you would like to edit or type a new name to
create an entry (character limit = 63).
auth {enable | disable} Enable/disable authentication (default = disable).
auth-type {certificate | psk} Select the SMTP authentication type (default = psk):
l certificate: Use local certificate to authenticate.
(default).
l none: Communication will be in plain text format.
metadata
Use this command to add additional information fields to the administrator accounts of your FortiManager unit.
This command creates the metadata fields. Use config system admin user to add data
to the metadata fields.
Syntax
Variable Description
<fieldname> Enter the name of the field.
field_length {20 | 50 | 255} Select the maximum number of characters allowed in this field (default = 50).
importance {optional | required} Select if this field is required or optional when entering standard information
(default = required).
status {enabled | disabled} Enable/disable the metadata (default = enabled).
ntp
Use this command to configure automatic time setting using a network time protocol (NTP) server.
Syntax
Variable Description
status {enable | disable} Enable/disable NTP time setting (default = disable).
sync_interval <string> Enter how often the FortiManager unit synchronizes its time with the NTP server,
in minutes (1 - 1440, default = 60).
Variables for config ntpserver subcommand:
<id> Time server ID.
ntpv3 {enable | disable} Enable/disable NTPv3 (default = disable).
authentication {enable | disable} Enable/disable MD5 authentication (default = disable).
key <passwd> The authentication key (character limit = 63).
key-id <integer> The key ID for authentication (default = 0).
server <string> Enter the IPv4 or IPv6 address or fully qualified domain name of the NTP server.
password-policy
Syntax
Variable Description
status {enable | disable} Enable/disable the password policy (default = disable).
minimum-length <integer> Set the password’s minimum length (8 - 256, default = 8).
must-contain {lower-case-letter Characters that a password must contain.
non-alphanumeric number upper- l lower-case-letter: the password must contain at least one lower case
case-letter} letter
l non-alphanumeric: the password must contain at least one non-
alphanumeric characters
l number: the password must contain at least one number
letter.
change-4-characters {enable | Enable/disable changing at least 4 characters for a new password (default =
disable} disable).
expire <integer> Set the number of days after which admin users' passwords will expire (0 - 3650, 0
= never, default = 0).
report
report auto-cache
Syntax
Variable Description
aggressive-schedule {enable | Enable/disable auto-cache on schedule reports aggressively (default = disable).
disable}
order {latest-first | oldest-first} The order of which SQL log table is processed first:
l latest-first: The newest SQL log table is processed first.
status {enable | disable} Enable/disable the SQL report auto-cache (default = enable).
report est-browse-time
Syntax
Variable Description
max-read-time <integer> Set the read time threshold for each page view (1 - 3600, default = 180).
status {enable | disable} Enable/disable estimating browse time (default = enable).
report group
Syntax
Variable Description
<group-id> The identification number of the group to be edited or created.
adom <adom-name> The ADOM that contains the report group.
case-insensitive {enable Enable/disable case sensitivity (default = enable).
| disable}
report-like <string> Report pattern.
Variables for config chart-alternative subcommand:
<chart-name> The chart name.
chart-replace <string> Chart replacement.
Variables for config group-by subcommand:
<var-name> The variable name.
var-expression <string> Variable expression.
var-type {enum | integer | ip | Variable type (default = string).
string}
report setting
Syntax
Variable Description
aggregate-report {enable | Enable/disable including a group report along with the per-device reports (default
disable} = disable).
capwap-port <integer> Exclude capwap traffic by port (default = 5246).
capwap-service <string> Exclude capwap traffic by service.
exclude-capwap {by-port | by- Exclude capwap traffic (default = by-port).
service | disable}
Variable Description
hcache-lossless {enable | Enable/disable ready-with-loss hcaches (default = disable).
disable}
ldap-cache-timeout <integer> Set the LDAP cache timeout in minutes (0 = do not use cache, default = 60).
max-table-rows <integer> Set the maximum number of rows that can be generated in a single table (10000 -
100000, default = 10000).
report-priority {auto | high | low} Set the Priority of the SQL report (default = auto).
template-auto-install {default | Set the language used for new ADOMs (default = default).
english}
week-start {mon | sun} Set the day that the week starts on, either sun (Sunday) or mon (Monday) (default
= sun).
route
Use this command to view or configure static routing table entries on your FortiManager unit.
Syntax
Variable Description
<seq_int> Enter an unused routing sequence number to create a new route. Enter an
existing route number to edit that route.
device <port> Enter the port (interface) used for this route.
dst <dst_ipv4mask> Enter the IPv4 address and mask for the destination network.
gateway <gateway_ipv4_ Enter the default gateway IPv4 address for this network.
address>
route6
Use this command to view or configure static IPv6 routing table entries on your FortiManager unit.
Syntax
edit <seq_int>
set device <string>
set dst <ipv6_prefix>
set gateway <ipv6_address>
end
Variable Description
<seq_int> Enter an unused routing sequence number to create a new route. Enter an
existing route number to edit that route.
device <string> Enter the port (interface) used for this route.
dst <ipv6_prefix> Enter the IPv6 address and mask for the destination network.
gateway <ipv6_address> Enter the default gateway IPv6 address for this network.
saml
Syntax
Variable Description
acs-url
login-auto-redirect {enable | Enable/disable automatic redirect to the IDP login page (default = disable).
disable}
sls-url
prefix <string> The prefix. Can contain only letters and numbers.
Variable Description
To view the service provider IdP information, use the following commands:
config system saml
config service-providers
edit <name>
get
Output:
name : name prefix : y9jr06vq0k sp-cert : (null) sp-entity-id :
http://https://172.27.2.225//metadata/ sp-single-sign-on-url:
https://https://172.27.2.225//saml/?acs sp-single-logout-url:
https://https://172.27.2.225//saml/?sls idp-entity-id : http://172.27.2.225/saml-
idp/y9jr06vq0k/metadata/ idp-single-sign-on-url: https://172.27.2.225/saml-
idp/y9jr06vq0k/login/ idp-single-logout-url: https://172.27.2.225/saml-
idp/y9jr06vq0k/logout/
sniffer
Syntax
Variable Description
host <string> IP addresses of the hosts to filter for in sniffer traffic. Multiple individual
IP addresses and ranges of addresses can be entered.
port <string> The ports to sniff. Individual ports or port ranges can be entered.
protocol <string> Integer value for the protocol type as defined by IANA (0 - 255).
snmp
snmp community
Syntax
Variable Description
<index_number> Enter the index number of the community in the SNMP communities table. Enter
an unused index number to create a new SNMP community.
events <events_list> Enable the events for which the FortiManager unit should send traps to the SNMP
managers in this community (default = All events enabled). The raid_changed
event is only available for devices that support RAID.
l cpu-high-exclude-nice: CPU usage exclude NICE threshold.
l ha_switch: HA switch.
name <community_name> Enter the name of the SNMP community. Names can be used to distinguish
between the roles of the hosts in the groups.
For example the Logging and Reporting group would be interested in the disk_
low events, but likely not the other events.
The name is included in SNMPv2c trap packets to the SNMP manager, and is also
present in query packets from, the SNMP manager.
query-v1-port <integer> Enter the SNMPv1 query port number used when SNMP managers query the
FortiManager unit (1 - 65535, default = 161).
Variable Description
query-v1-status {enable | disable} Enable/disable SNMPv1 queries for this SNMP community (default = enable).
query-v2c-port <integer> Enter the SNMP v2c query port number used when SNMP managers query the
FortiManager unit. SNMP v2c queries will include the name of the community (1 -
65535, default = 161).
query-v2c-status {enable | Enable/disable SNMPv2c queries for this SNMP community (default = enable).
disable}
status {enable | disable} Enable/disable this SNMP community (default = enable).
trap-v1-rport <integer> Enter the SNMPv1 remote port number used for sending traps to the SNMP
managers (1 - 65535, default = 162).
trap-v1-status {enable | disable} Enable/disable SNMPv1 traps for this SNMP community (default = enable).
trap-v2c-rport <integer> Enter the SNMPv2c remote port number used for sending traps to the SNMP
managers (1 - 65535, default = 162).
trap-v2c-status {enable | disable} Enable/disable SNMPv2c traps for this SNMP community. SNMP v2c traps sent
out to SNMP managers include the community name (default = enable).
Variables for config hosts subcommand:
<host_number> Enter the index number of the host in the table. Enter an unused index number to
create a new host.
interface <interface_name> Enter the name of the FortiManager unit that connects to the SNMP manager
(default = any).
ip <ipv4_address> Enter the IPv4 address of the SNMP manager.
Variables for config hosts6 subcommand:
<host_number> Enter the index number of the host in the table. Enter an unused index number to
create a new host.
interface <interface_name> Enter the name of the FortiManager unit that connects to the SNMP manager
(default = any).
ip <ipv6_address> Enter the IPv6 address of the SNMP manager.
Example
This example shows how to add a new SNMP community named SNMP_Com1. The default configuration can be used
in most cases with only a few modifications. In the example below the community is added, given a name, and then
because this community is for an SNMP manager that is SNMP v1 compatible, all v2c functionality is disabled. After the
community is configured the SNMP manager, or host, is added. The SNMP manager IPv4 address is 192.168.20.34 and
it connects to the FortiManager unit internal interface.
config system snmp community
edit 1
set name SNMP_Com1
set query-v2c-status disable
set trap-v2c-status disable
config hosts
edit 1
set interface internal
set ip 192.168.10.34/24
end
end
snmp sysinfo
Use this command to enable the FortiManager SNMP agent and to enter basic system information used by the SNMP
agent. Enter information about the FortiManager unit to identify it. When your SNMP manager receives traps from the
FortiManager unit, you will know which unit sent the information. Some SNMP traps indicate high CPU usage, log full, or
low memory.
For more information on SNMP traps and variables, see the Fortinet Document Library.
Syntax
Variable Description
contact-info <string> Add the contact information for the person responsible for this FortiManager unit
(character limit = 255).
description <description> Add a name or description of the FortiManager unit (character limit = 255).
engine-id <string> Local SNMP engine ID string (character limit = 24).
location <location> Describe the physical location of the FortiManager unit (character limit = 255).
status {enable | disable} Enable/disable the FortiManager SNMP agent (default = disable).
trap-cpu-high-exclude-nice- SNMP trap for CPU usage threshold (excluding NICE processes), in percent
threshold <percentage> (default = 80).
trap-high-cpu-threshold SNMP trap for CPU usage threshold, in percent (default = 80).
<percentage>
trap-low-memory-threshold SNMP trap for memory usage threshold, in percent (default = 80).
<percentage>
Example
This example shows how to enable the FortiManager SNMP agent and add basic SNMP information.
config system snmp sysinfo
set status enable
set contact-info 'System Admin ext 245'
set description 'Internal network unit'
snmp user
Use this command to configure SNMPv3 users on your FortiManager unit. To use SNMPv3, you will first need to enable
the FortiManager SNMP agent. For more information, see snmp sysinfo. There should be a corresponding configuration
on the SNMP server in order to query to or receive traps from FortiManager.
For more information on SNMP traps and variables, see the Fortinet Document Library.
Syntax
Variable Description
<name> Enter a SNMPv3 user name to add, edit, or delete.
auth-proto {md5 | sha} Authentication protocol. The security level must be set to auth-no-priv or
auth-priv to use this variable:
l md5: HMAC-MD5-96 authentication protocol
auth-pwd <passwd> Password for the authentication protocol. The security level must be set to auth-
no-priv or auth-priv to use this variable.
events <events_list> Enable the events for which the FortiManager unit should send traps to the
SNMPv3 managers in this community (default = All events enabled). The raid_
changed event is only available for devices which support RAID.
l cpu-high-exclude-nice: CPU usage exclude nice threshold.
Variable Description
l log-rate: High incoming log rate detected.
l mem_low: The available memory is low.
l raid_changed: RAID status changed.
l sys_reboot: The FortiManager unit has rebooted.
notify-hosts <ipv4_address> Hosts to send notifications (traps) to.
notify-hosts6 <ipv6_address> Hosts to send notifications (traps) to.
priv-proto {aes | des} Privacy (encryption) protocol. The security level must be set to auth-no-priv or
auth-priv to use this variable:
l aes: CFB128-AES-128 symmetric encryption protocol (default)
priv-pwd <passwd> Password for the privacy (encryption) protocol. The security level must be set to
auth-no-priv or auth-priv to use this variable.
queries {enable | disable} Enable/disable queries for this user (default = enable)
query-port <integer> SNMPv3 query port (1 - 65535, default = 161).
security-level {auth-no-priv | auth- Security level for message authentication and encryption:
priv | no-auth-no-priv} l auth-no-priv: Message with authentication but no privacy (encryption).
(encryption) (default).
soc-fabric
Syntax
Variable Description
Variable Description
role {member | supervisor} Set the SOC Fabric role (default = member).
sql
Syntax
end
config ts-index-field
edit <category>
set value <string>
next
end
end
Variable Description
background-rebuild {enable | Disable/enable rebuilding the SQL database in the background (default = enable).
disable}
compress-table-min-age Minimum age in days for SQL tables to be compressed (0 - 10000, default = 7).
<integer> Note: 0-day allows you to compress SQL tables with less than one-day of age.
database-name <string> Remote SQL database name (character limit = 64).
Command only available when status is set to remote.
database-type <postgres> Database type (default = postgres).
This command only available when status is set to local or remote.
device-count-high {enable | Enable/disable a high device count (default = disable).
disable} You must set to enable if the count of registered devices is greater than 8000:
l disable: Set to disable if device count is less than 8000.
Variable Description
status {disable | local} SQL database status:
l disable: Disable SQL database.
text-search-index {enable | Enable/disable the creation of a text search index (default = disable).
disable}
traffic-table-partition-time Maximum SQL database table partitioning time range for traffic logs (1 - 1440, 0 =
<integer> unlimited, default = 0).
utm-table-partition-time Maximum SQL database table partitioning time range in minutes for UTM logs (1 -
<integer> 1440, 0 = unlimited, default = 0).
username <string> The user name that the unit will use to authenticate with the remote database
(character limit = 64).
Variables for config custom-index subcommand:
case-sensitive Enable/disable case sensitivity.
device-type {FortiAuthenticator | Set the device type (default = FortiGate).
FortiCache | FortiClient |
FortiDDoS | FortiGate | FortiMail |
FortiManager | FortiSandbox |
FortiWeb}
index-field <Field-Name> Enter a valid field name. Select one of the available field names. The available
options for index-field is dependent on the device-type entry.
log-type <Log-Enter> Enter the log type. The available options for log-type is dependent on the
device-type entry.
Variables for config custom-skipidx subcommand:
List of aditional SQL skip index fields.
device-type <device> Set the device type (default = FortiGate).
index-field <Field-Name> Enter a valid field name. Select one of the available field names. The available
options depend on the device-type.
log-type <Log-Enter> Enter the log type (default = traffic). The available options depend on the device-
type.
Variable Description
Variables for config ts-index-field subcommand:
<category> Category of the text search index fields. The following is the list of categories and
their default fields.
Category Value
FGT-app-ctrl user,group,srcip,dstip,dstport,service,app,action,hostname
FGT-attack severity,srcip,dstip,action,user,attack
FGT-content from,to,subject,action,srcip,dstip,hostname,status
FGT-dlp user,srcip,service,action,filename
FGT-emailfilter user,srcip,from,to,subject
FGT-event subtype,ui,action,msg
FGT-traffic user,srcip,dstip,service,app,utmaction
FGT-virus service,srcip,dstip,action,filename,virus,user
FGT-voip action,user,src,dst,from,to
FGT-webfilter user,srcip,dstip,service,action,catdesc,hostname
FGT-netscan user,dstip,vuln,severity,os
FGT-fct-event (null)
FGT-fct-traffic (null)
FGT-fct- (null)
netscan
FGT-waf user,srcip,dstip,service,action
FGT-gtp msisdn,from,to,status
FGT-dns (null)
FGT-ssh login,srcip,dstip,direction,action
FML-emailfilter client_name,dst_ip,from,to,subject
FML-event subtype,msg
FML-history classifier,disposition,from,to,client_
name,direction,domain,virus
FML-virus src,msg,from,to
FWB-attack http_host,http_url,src,dst,msg,action
FWB-event ui,action,msg
FWB-traffic src,dst,service,http_method,msg
Variable Description
value <string> Fields of the text search filter. Enter one or more field names separated with a
comma.
syslog
Syntax
Variable Description
<name> Syslog server name.
ip <string> Enter the syslog server IPv4 address or hostname.
port <integer> Enter the syslog server port (1 - 65535, default = 514).
workflow approval-matrix
Syntax
Variable Description
<ADOM_name> The name of the ADOM.
mail-server <string> Enter the mail server IPv4 address or hostname.
Variable Description
notify <string> Enter the notified users. Use a comma as a separator.
Variables for config approver subcommand:
<sequence_number> Enter the entry number.
member <string> Enter the members of the approval group. Use a comma as a separator.
Example
This example shows configuring the admin administrator as an approver for the root ADOM.
config system workflow approval-matrix
edit "root"
config approver
edit 1
set member "admin"
next
end
set mail-server "mail.fortinet.com"
set notify "admin"
end
Use fmupdate to configure settings related to FortiGuard service updates and the FortiManager unit’s built-in FDS.
disk-quota publicnetwork
fct-services server-access-priorities
TCP port numbers cannot be used by multiple services at the same time with the same IP
address. If a port is already in use, it cannot be assigned to another service. For example,
HTTPS and HTTP cannot have the same port number.
analyzer virusreport
Syntax
Variable Description
status {enable | disable} Enable/disable sending virus detection notification to FortiGuard (default =
enable).
Example
av-ips
Use the following commands to configure antivirus and IPS related settings.
av-ips advanced-log
Use this command to enable logging of FortiGuard antivirus and IPS update packages received by the FortiManager
unit’s built-in FDS from the external FDS.
Syntax
Variable Description
log-fortigate {enable | disable} Enable/disable logging of FortiGuard antivirus and IPS service updates of
FortiGate devices (default = disable).
log-server {enable | disable} Enable/disable logging of update packages received by the built-in FDS server
(default = enable).
Example
You could enable logging of FortiGuard antivirus updates to FortiClient installations and update packages downloaded
by the built-in FDS from the FDS.
config fmupdate av-ips advanced-log
set log-forticlient enable
set log-server enable
end
av-ips web-proxy
Use this command to configure a web proxy if FortiGuard antivirus and IPS updates must be retrieved through a web
proxy.
Syntax
end
Variable Description
address <string> Enter the web proxy address.
mode {proxy | tunnel} Enter the web proxy mode (default = tunnel).
password <passwd> If the web proxy requires authentication, enter the password for the user name
(character limit = 63).
port <integer> Enter the port number of the web proxy (1 - 65535, default = 80).
status {enable | disable} Enable/disable connections through the web proxy (default = disable).
username <string> If the web proxy requires authentication, enter the user name (character limit =
63).
Example
You could enable a connection through a non-transparent web proxy on an alternate port.
config fmupdate av-ips web-proxy
set status enable
set mode proxy
set address 10.10.30.1
set port 8890
set username avipsupdater
set password cvhk3rf3u9jvsYU
end
custom-url-list
Use this command to configure the URL database for rating and filtering. You can select to use the FortiGuard URL
database, a custom URL database, or both. When selecting to use a custom URL database, use the fmupdate {ftp
| scp | tftp} import command to import the custom URL list. When FortiManager performs the URL rating, it will
check the custom URL first. If a match is found, the custom rating is returned. If there is no match, then FortiManager will
check the FortiGuard database.
Syntax
Variable Description
db_selection {both | custom-url | Manage the FortiGuard URL database:
fortiguard-db} l both: Support both custom URL database and the FortiGuard database
(default)
l custom-url: Customer imported URL list.
disk-quota
Use this command to configure the disk space available for use by the Upgrade Manager.
If the Upgrade Manager disk space is full or if there is insufficient space to save an update package to disk, the package
will not download and an alert will be sent to notify you.
Syntax
Variable Description
value <size_int> Configure the size of the Upgrade Manager disk quota, in megabytes (default =
51200). If you set the disk-quota smaller than the size of an update package, the
update package will not download and you will get a disk full alert.
fct-services
Use this command to configure the built-in FDS to provide FortiGuard services to FortiClient installations.
Syntax
Variable Description
status {enable | disable} Enable/disable built-in FDS service to FortiClient installations (default = enable).
port <integer> Enter the port number on which the built-in FDS should provide updates to
FortiClient installations (1 - 65535, default = 80).
Example
You could configure the built-in FDS to accommodate older versions of FortiClient installations by providing service on
their required port.
config fmupdate fct-services
set status enable
set port 80
end
fds-setting
Syntax
Variable Description
fds-clt-ssl-protocol {sslv3 | tlsv1.0 Set the SSL protocols version for connecting FDS server (default = tlsv1.2).
| tlsv1.1 | tlsv1.2}
fds-ssl-protocol {sslv3 | tlsv1.0 | Set the SSL protocols version for FDS service (default = tlsv1.0).
tlsv1.1 | tlsv1.2}
fmtr-log {alert | critical | debug | The fmtr log level. Set to disable to disable the log (default = info).
disable | emergency | error | info |
notice | warn}
fortiguard-anycast-source {aws | Configure which servers provide FortiGuard services in FortiGuard's anycast
fortinet} network (default = fortinet).
linkd-log {alert | critical | debug | The linkd log level (default = info).
disable | emergency | error | info |
notice | warn}
Variable Description
max-av-ips-version <integer> The maximum number of AV/IPS full version downloadable packages (default =
20).
max-work <integer> The maximum number of worker processing downlink requests (default = 1).
send_report {enable | disable} Enable/disable sending reports to the FDS server (default = enable).
send_setup {enable | disable} Enable/disable sending setup to the FDS server (default = disable).
system-support-fct {5.4 5.6 6.0 Set the FortiClient support version, disable the linkd log, or set the log level to
6.2 | disable | emergency} emergency (default = emergency).
umsvc-log {alert | critical | debug | The um_service log level (default = info).
disable | emergency | error | info |
notice | warn}
(default).
l ignore: Ignore all unregistered devices.
fds-setting push-override
Use this command to enable or disable push updates, and to override the default IP address and port to which the FDS
sends FortiGuard antivirus and IPS push messages.
This is useful if push notifications must be sent to an IP address and/or port other than the FortiManager unit, such as the
external or virtual IP address of a NAT device that forwards traffic to the FortiManager unit.
Syntax
end
end
Variable Description
ip <ipv_address> Enter the external or virtual IP address of the NAT device that will forward push
messages to the FortiManager unit.
port <integer> Enter the receiving port number on the NAT device (1 - 65535, default = 9443).
Example
You could enable the FortiManager unit’s built-in FDS to receive push messages.
If there is a NAT device or firewall between the FortiManager unit and the FDS, you could also notify the FDS to send
push messages to the external IP address of the NAT device, instead of the FortiManager unit’s private network IP
address.
config fmupdate fds-setting
config push-override
set status enable
set ip 172.16.124.135
set port 9000
end
end
You would then configure port forwarding on the NAT device, forwarding push messages received on User Datagram
Protocol (UDP) port 9000 to the FortiManager unit on UDP port 9443.
fds-setting push-override-to-client
Use this command to enable or disable push updates, and to override the default IP address and port to which the FDS
sends FortiGuard antivirus and IPS push messages.
This command is useful if push notifications must be sent to an IP address and/or port other than the FortiManager unit,
such as the external or virtual IP address of a NAT device that forwards traffic to the FortiManager unit.
Syntax
Variable Description
fds-setting server-override
Use this command to override the default IP address and port that the built-in FDS contacts when requesting FortiGuard
spam updates.
Syntax
Variable Description
status {enable | disable} Enable/disable the override (default = disable).
Variable for config servlist subcommand:
<id> Enter the override server ID (1 - 10).
ip <ipv4_address> Enter the IPv4 address of the override server address.
ip6 <ipv6_address> Enter the IPv6 address of the override server address.
port <integer> Enter the port number to use when contacting the FDS (1 - 65535, default = 443).
server-type {fct| fds} Set the override server type (default = fds).
fds-setting update-schedule
Use this command to schedule when the built-in FortiGuard retrieves antivirus and IPS updates.
Syntax
Variable Description
day {Sunday | Monday | Tuesday The day that the update will occur (Sunday - Saturday, default = Monday).
| Wednesday | Thursday | Friday | This option is only available if the update frequency is weekly.
Saturday}
frequency {every | daily | weekly} The update frequency: every given time interval, once a day, or once a week
(default = every).
time <hh:mm> The time interval between updates, or the hour and minute when the update
occurs (hh: 0 - 23, mm: 0 - 59 or 60 = random, default = 00:10).
fwm-setting
Syntax
Variable Description
auto-scan-fgt-disk {enable | Enable/disable automatic scanning of a FortiGate disk when required (default =
disable} enable).
check-fgt-disk {enable | disable} Enable/disable checking a FortiGate disk prior to upgrading the image (default =
enable).
fds-failover-fmg {enable | Enable/disable using the a local image file on the FortiManager when the FDS
disable} download fails (default = enable).
Variable Description
fds-image-timeout <integer> Set the timer for FortiGate image downloads from FortiGuard, in seconds (300 -
3600, default = 1800).
immx-source {cloud | fgt | fmg} Configure which of the IMMX file to be used for choosing the upgrade patch:
l cloud: Use the IMMX file for FortiCloud.
multiple-steps-interval <integer> Set the waiting time between multiple step upgrades, in seconds (30 - 180, default
= 60).
multilayer
Syntax
Variable Description
webspam-rating {enable | Enable/disable URL/antispam rating service (default = enable).
disable}
publicnetwork
Use this command to enable access to the public FDS. If this function is disabled, the service packages, updates, and
license upgrades must be imported manually.
Syntax
Variable Description
status {enable | disable} Enable/disable the public network (default = enable).
server-access-priorities
Use this command to configure how a FortiGate unit may download antivirus updates and request web filtering services
from multiple FortiManager units and private FDS servers.
Use the private-server subcommand to configure multiple FortiManager units and private servers.
By default, the FortiGate unit receives updates from the FortiManager unit if the FortiGate unit
is managed by the FortiManager unit and the FortiGate unit was configured to receive updates
from the FortiManagerunit.
Syntax
Variable Description
access-public {enable | disable} Enable/disable allowing FortiGates to access public FortiGuard servers when
private servers are unavailable (default = disable).
av-ips {enable | disable} Enable/disable receiving antivirus and IPS update service for private servers
(default = disable).
web-spam {enable | disable} Enable/disable Web Filter and Email Filter update service for private servers
(default = enable).
Variables for config private-server subcommand:
<id> Enter a number to identify the FortiManager unit or private server (1 - 10).
ip <ipv4_address> Enter the IPv4 address of the FortiManager unit or private server.
ip6 <ipv6_address> Enter the IPv6 address of the FortiManager unit or private server.
time_zone <integer> Enter the correct time zone of the private server (-24 = local time zone, default = -
24).
Example
The following example configures access to public FDS servers and allows FortiGate units to receive antivirus updates
from other FortiManager units and private FDS servers. This example also configures three private servers.
config fmupdate server-access-priorities
set access-public enable
server-override-status
Syntax
Variable Description
mode {loose | strict} Set the server override mode:
l loose: Allow access other servers (default).
service
Use this command to enable or disable the services provided by the built-in FDS.
Syntax
Variable Description
avips {enable | disable} Enable/disable the built-in FortiGuard to provide FortiGuard antivirus and IPS
updates (default = enable).
query-antispam {enable | disable} Enable/disable antispam service (default = disable).
query-antivirus {enable | disable} Enable/disable antivirus service (default = disable).
query-filequery {enable | disable} Enable/disable file query service (default = disable).
query-outbreak-prevention Enable/disable outbreak prevention query service (default = disable).
{enable | disable}
query-webfilter {enable | disable} Enable/disable web filter service (default = disable).
webfilter-https-traversal {enable | Enable/disable Web Filter HTTPS traversal (default = disable).
disable}
Example
web-spam
web-spam fgd-setting
Syntax
Variable Description
as-cache <integer> Antispam service maximum memory usage, in megabytes (maximum = physical
memory-1024, 0 = no limit, default = 300).
as-log {all | disable | nospam} Antispam log setting:
l all: Log all spam lookups.
as-preload {enable | disable} Enable/disable preloading the antispam database into memory (default = disable).
av-cache <integer> Antivirus service maximum memory usage, in megabytes (100 - 500, default =
300).
av-log {all | disable | novirus} Antivirus log setting:
l all: Log all virus lookups.
av-preload {enable | disable} Enable/disable preloading antivirus database to memory (default = disable).
av2-cache <integer> Antispam service maximum memory usage, in megabytes ( physical memory to
1024, 0 = no limit, default = 800).
av2-log {all | disable | novirus} Outbreak prevention log setting:
Variable Description
l all: Log all av2 lookups.
l disable: Disable av2 logs.
l noav2: Log non-av2 events (default).
av2-preload {enable | disable} Enable/disable preloading outbreak prevention database to memory (default =
disable).
eventlog-query {enable | disable} Enable/disable record query to event-log besides fgd-log (default = disable).
fgd-pull-interval <integer> FortiGuard pull interval setting, in minutes (1 - 1440, default = 10).
fq-cache <integer> File query service maximum memory usage, in megabytes (100 - 500, default =
300).
fq-log {all | disable | nofilequery} Filequery log setting:
l all: Log all file query.
fq-preload {enable | disable} Enable/disable preloading the filequery database to memory (default = disable).
linkd-log {alert | critical | debug | Linkd log setting:
disable | emergency | error | info | l alert: Immediate action is required.
max-client-worker <integer> Maximum workers to use for TCP client connections (0 - 16, 0 = use CPU count,
default = 0).
max-log-quota <integer> Maximum log quota setting, in megabytes (100 - 20480, default = 6144).
max-unrated-size <integer> Maximum number of unrated site in memory, in kilobytes(10 - 5120, default =
500).
restrict-as1-dbver <string> Restrict system update to indicated antispam(1) database version (character limit
= 127).
restrict-as2-dbver <string> Restrict system update to indicated antispam(2) database version (character limit
= 127).
restrict-as4-dbver <string> Restrict system update to indicated antispam(4) database version (character limit
= 127).
restrict-av-dbver <string> Restrict system update to indicated antivirus database version (character limit =
127).
restrict-av2-dbver <string> Restrict system update to indicated outbreak prevention database version
(character limit = 127).
Variable Description
restrict-fq-dbver <string> Restrict system update to indicated file query database version (character limit =
127).
restrict-wf-dbver <string> Restrict system update to indicated web filter database version (character limit =
127).
stat-log-interval <integer> Statistic log interval setting, in minutes (1 - 1440, default = 60).
stat-sync-interval <integer> Synchronization interval for statistic of unrated site in minutes (1 - 60, default =
60).
update-interval <integer> FortiGuard database update wait time if not enough delta files, in hours (2 - 24,
default = 6).
update-log {enable | disable} Enable/disable update log setting (default = enable).
wf-cache <integer> Web filter service maximum memory usage, in megabytes (maximum = physical
memory-1024, 0 = no limit, default = 600).
wf-dn-cache-expire-time Web filter DN cache expire time, in minutes (1 - 1440, 0 = never, default = 30).
wf-dn-cache-max-number Maximum number of Web filter DN cache (0 = disable, default = 10000).
wf-log {all | disable | nourl} Web filter log setting:
l all: Log all URL lookups.
wf-preload {enable | disable} Enable/disable preloading the web filter database into memory (default = disable).
Variables for config server-override subcommand:
status {enable | disable} Enable/disable the override (default = disable).
<id> Override server ID (1 - 10).
ip <ipv4_address> IPv4 address of the override server.
ip6 <ipv6_address> IPv6 address of the override server.
port <integer> Port number to use when contacting FortiGuard (1 - 65535, default = 443).
service-type {fgc | fgd | fsa} Override service type.
web-spam web-proxy
Syntax
Variable Description
address <string> Enter the web proxy address.
mode {proxy | tunnel} Enter the web proxy mode (default = tunnel).
password <passwd> If the web proxy requires authentication, type the password for the user name.
port <integer> Enter the port number of the web proxy (1- 65535, default = 80).
status {enable | disable} Enable/disable connections through the web proxy (default = disable).
username <string> If the web proxy requires authentication, enter the user name.
The execute commands perform immediate operations on the FortiManager unit. You can:
l Back up and restore the system settings, or reset the unit to factory settings.
l Set the unit date and time.
l Use ping to diagnose network problems.
l View the processes running on the FortiManager unit.
l Start and stop the FortiManager unit.
l Reset or shut down the FortiManager unit.
add-on-license
Use this command to load add-on licenses to support more devices with a license key.
Syntax
Variable Description
add-vm-license
Syntax
Variable Description
Example
The contents of the license file needs to be in quotes in order for it to work.
execute add-vm-license "-----BEGIN FMG VM LICENSE-----
QAAAAJ09s+LTe...ISJTTYPcKoDmMa6
-----END FAZ VM LICENSE-----"
backup
Syntax
execute backup all-settings {ftp | scp | sftp} <ip:port> <string> <username> <passwd>
<ssh-cert> [crptpasswd] [force-docker]
execute backup logs <device name(s)> {ftp | scp | sftp} <ip> <username> <passwd>
<directory> [vdlist]
execute backup logs-only <device name(s)> {ftp | scp | sftp} <ip> <username> <passwd>
<directory> [vdlist]
execute backup logs-rescue <device serial number(s)> {ftp | scp | sftp} <ip> <username>
<passwd> <directory> [vdlist]
execute backup reports <report schedule name(s)> {ftp | scp | sftp} <ip> <username>
<passwd> <directory> [vdlist]
execute backup reports-config <adom name(s)> {ftp | scp | sftp} <ip> <username> <passwd>
<directory> [vdlist]
Variable Description
logs-rescue Use this hidden command to backup logs regardless of DVM database for
emergency reasons. This command will scan folders under /Storage/Logs/ for
possible device logs to backup.
<device name(s)> Enter the device name(s) separated by a comma, or enter all for all devices.
<device serial number(s)> Enter the device serial number(s) separated by a comma, or enter all for all
devices.
<report schedule name(s)> Enter the report schedule name(s) separated by a comma, or enter all for all
reports schedules.
<adom name(s)> Enter the ADOM name(s) separated by a comma, or enter all for all ADOMs.
{ftp | scp | sftp} Enter the server type: ftp, scp, or sftp.
<ip:port> Enter the server IP address and optionally , for FTP servers, the port number.
<string> Enter the path and file name for the backup.
<passwd> Enter the password for the username on the backup server.
Note: You cannot use \\ in passwords.
<ssh-cert> Enter the SSH certification for the server. This option is only available for backup
operations to SCP servers.
[crptpasswd] Optional password to protect backup content. Leave blank for no password.
<directory> Enter the path to where the file will be backed up to on the backup server.
Example
This example shows how to backup the FortiManager unit system settings to a file named fmg.cfg on a server at IP
address 192.168.1.23 using the admin username, a password of 123456.
execute backup all-settings ftp 192.168.1.23 fmd.cfg admin 123456
Starting backup all settings...
Starting transfer the backup file to FTP server...
bootimage
Set the image from which the FortiManager unit will boot the next time it is restarted.
Syntax
Variable Description
{primary | secondary} Select to boot from either the primary or secondary partition.
If you do not specify primary or secondary, the command will report whether it last booted from the primary or secondary
boot image.
If your FortiManager unit does not have a secondary image, the bootimage command will inform you that option is not
available.
To reboot your FortiManager unit, use:
execute reboot
certificate
certificate ca
Syntax
Variable Description
certificate local
Use these commands to list, import, or export local certificates, and to generate a certificate request
Syntax
Variable Description
import-pkcs12 {ftp | scp | sftp} Import a certificate and private key from a PKCS#12 file.
<ip:port> <filename> l ftp, scp, sftp - The type of server the file will be imported from.
<username> <password> l ip:port - The server IP address and, optional, the port number.
<password> <name> l filename - The path and file name on the server.
Variable Description
information>] can contain numbers (0-9), uppercase and lowercase letters (A-Z, a-z), and
the special characters - and _. Other special characters and spaces are not
allowed.
l number - The size, in bits, of the encryption key, 512, 1024, 1536, or 2048.
list Generate a list of CA certificates and requests that are on the FortiManager
system.
You must enter the optional variables in the order that they are listed in the table. To enter any optional variable you must
enter all of the variables that come before it in the list.
For example, to enter the organization_name_str, you must first enter the country_code_str, state_name_
str, and city_name_str.
While entering optional variables, you can type ? for help on the next required variable.
Variable Description
<state_name_str> Enter the name of the state or province where the FortiManager unit is located.
<city_name_str> Enter the name of the city, or town, where the person or organization certifying the
FortiManager unit resides.
<organization-name_str> Enter the name of the organization that is requesting the certificate for the
FortiManager unit.
<organization-unit_name_str> Enter a name that identifies the department or unit within the organization that is
requesting the certificate for the FortiManager unit.
<ca_server_url> Enter the URL of the CA (SCEP) certificate server that allows auto-signing of the
request.
<challenge_password> Enter the challenge password for the SCEP certificate server.
certificate remote
Syntax
Variable Description
chassis
Syntax
Variable Description
console baudrate
Syntax
If you do not specify a baudrate, the command returns the current baudrate.
Setting the baudrate will disconnect your console session.
Example
date
Syntax
Example
device
Use this command to change a device password or serial number when changing devices due to a hardware issue.
Syntax
Variable Description
<serial_number> The new serial number for the new device, for example: FWF40C391XXX0062.
Example
dmserver
dmserver delrev
Use this command to delete configuration revisions. The device name will be kept.
Syntax
Variable Description
Variable Description
<startrev> The starting configuration revision number that you want to delete.
<endrev> The ending configuration revision number that you want to delete.
dmserver revlist
Syntax
Variable Description
dmserver showconfig
Syntax
Variable Description
dmserver showdev
Use this command to show a list of available devices. For each listed device, this command lists the device ID, device
name, and serial number.
Syntax
dmserver showrev
Syntax
Variable Description
erasedisk
Overwrite the flash (boot device) with random data a specified number of times. When you run this command, you will be
prompted to confirm the request.
Executing this command will overwrite all information on the FortiManager system’s flash
drive. The FortiManager system will no longer be able to boot up.
Syntax
Variable Description
<erase-times> Number of times to overwrite the flash with random data (1 - 35, default = 1).
factory-license
Use this command to enter a factory license key. This command is hidden.
Syntax
Variables Description
fgfm reclaim-dev-tunnel
Use this command to reclaim a management tunnel. The device name is optional.
Syntax
Variable Description
fmpolicy
fmpolicy check-upgrade-object
Syntax
Variable Description
{basic | auto | misc | full} l basic: only do basic (know cases) checking/fixing.
l auto: only do auto (syntax based) checking/fixing.
l misc: only do misc (know cases) checking/fixing.
l full: do a full basic/auto/misc checking/fixing.
fmgpolicy clone-adom-object
Syntax
Variable Description
fmpolicy copy-adom-object
Syntax
Variable Description
fmpolicy install-config
Syntax
Variable Description
fmpolicy print-adom-database
Use this command to display the device database configuration for an ADOM.
Syntax
fmpolicy print-adom-object
Syntax
Variable Description
fmpolicy print-adom-package
Syntax
Variable Description
Variable Description
fmpolicy print-adom-policyblock
Syntax
Variable Description
fmpolicy print-device-database
Syntax
Variable Description
fmpolicy print-device-object
Syntax
Variable Description
fmpolicy promote-adom-object
Syntax
Variable Description
fmpolicy upload-print-log
Use this command to upload the latest print command logs to a server.
Syntax
Variable Description
Variable Description
fmprofile
fmprofile copy-to-device
Syntax
Variable Description
fmprofile delete-profile
Syntax
Variable Description
fmprofile export-profile
Syntax
Variable Description
fmprofile import-from-device
Syntax
Variable Description
fmprofile import-profile
Syntax
Variable Description
<filename> Enter the full path to the input file containing CLI configuration.
fmprofile list-profiles
Syntax
Variable Description
fmscript
fmscript clean-sched
Syntax
fmscript copy
Syntax
Variable Description
<script ID> The name of the script to copy (0000 = copy all scripts).
Variable Description
[<prefix>] Assign the conflict prefix. The default is the ADOM name.
fmscript delete
Syntax
Variable Description
fmscript import
Syntax
Variable Description
<comment> A comment about the script being imported, such as a brief description.
<os_type> The operating system type, such as FortiOS. Options include any, FortiOS, and
others.
<os_version> The operating system version, such as FortiOS. Options include any, 400, and
500.
Variable Description
<platform> The hardware platform this script can be run on. Options include any, or the
model of the device such as Fortigate 60C.
<device_name> The device name to run this script on. Options include any, or the specific device
name as it is displayed on the FortiManager system
<build_number> The specific build number this script can be run on. Options include any, or the
three digit build number. Build numbers can be found in the firmware name for the
device.
<hostname> The host name of the device this script can be run on. Options include any, or the
specific host name.
<serial_number> The serial number of the device this script can be run on. Options include any, or
the specific serial number of the device, such as FGT60C3G28033042.
fmscript list
Syntax
Example
fmscript run
Run a script on a device, the device’s object database, or on the global database. Only CLI scripts can be run on
databases, and they must contain only complete commands. Any scripts that use shortened CLI commands will
generate errors.
When a script is run on the database, the device will be updated with any configuration changes the next time the
configuration is uploaded from the FortiManager system to the device.
Syntax
Variable Description
l group: on a group
<dev/grp/pkgid> Enter the name of the device or group, or the ID of the package, to run the script
on.
fmscript showlog
Display the log of scripts that have run on the selected device.
Syntax
Variable Description
Example
This example shows the output of execute fmscript showlog Dev3 that displays the output from a CLI script
called xml_script1 that was run on the object database.
execute fmscript showlog Dev3
Starting log
config firewall address
edit 33
set subnet 33.33.33.33 255.255.255.0
config firewall address
edit 33
Running script(xml_script1) on DB success
cdb_find_entry_by_canon,52:parent=1,category=2,key=(null)
fmupdate
Import or export packages using the FTP, SCP, or FTFP servers, and import database files from a CD-ROM.
Syntax
execute fmupdate {ftp | scp | tftp} import <type> <remote_file> <ip> <port> <remote_path>
<user> <password>
execute fmupdate {ftp | scp | tftp} export <type> <remote_file> <ip> <port> <remote_path>
<user> <password>
execute fmupdate {ftp | tftp} fds-export <objid> <remote_file> <ip> <remote_path> <user>
<password>
Variables Description
{ftp | scp | tftp} Select the file transfer protocol to use: ftp, scp, or tftp.
<port> Enter the port to connect to on the remote SCP host (1 - 65535).
<remote_path> Enter the name of the directory of the file to download from the FTP server or SCP
host. If the directory name has spaces, use quotes instead.
<user> Enter the user name to log into the FTP server or SCP host
<password> Enter the password to log into the FTP server or SCP host
fmupdate cdrom
Import database files from a CD-ROM. The CD-ROM must be mounted first.
This command is only available on FortiManager models that have CD-ROM drives.
Syntax
Variables Description
format
Format the hard disk on the FortiManager system. You can select to perform a secure (deep-erase) format which
overwrites the hard disk with random data. You can also specify the number of time to erase the disks.
Syntax
When you run this command, you will be prompted to confirm the request.
Executing this command will erase all device settings/images, VPN & Update Manager
databases, and log data on the FortiManager system’s hard drive. The FortiManager device’s
IP address, and routing information will be preserved.
Variable Description
<disk | disk-ext3 | disk-ext4> Select to format the hard disk or format the hard disk with ext4 file system.
<disk_partition_2-ext4> Format hard disk partition 2 (static) with ext4 file system.
<disk_partition_3-ext4> Format hard disk partition 3 (dynamic) with ext4 file system.
<disk_partition_4-ext4> Format hard disk partition 4 (misc) with ext4 file system.
deep-erase Overwrite the hard disk with random data. Selecting this option will take longer
than a standard format.
<erase-times> Number of times to overwrite the hard disk with random data (1 - 35, default = 1).
Variable Description
<RAID level> Enter the RAID level to be set on the device. This option is only available on
FortiManager models that support RAID.
Enter * to show available RAID levels.
iotop
Syntax
Parameter Description
-o, --only Only show processes or threads that are actually doing I/O.
iotps
Use this command to list system processes sorted by their read/write system call rate.
Syntax
execute iotps
Variable Description
<parameter> Parameters:
l -r
l -w
l -e
l -t [intv]
log
Syntax
Variable Description
<adom_name> Enter the ADOM name, or enter All for all ADOMs.
Syntax
Variable Description
<device_id> Enter the log device ID number, or All for all devices.
Variable Description
Syntax
Variable Description
<device_id> Enter the log device ID number, or All for all devices.
Syntax
Variable Description
add <device_name> <ADOM> Add a new VDOM to a device with the device name, the ADOM that contains the
<VDOM> device, and the name of the new VDOM.
Syntax
Variable Description
<archive type> Enter the device archive type: all, email, im, ftp, http, or mms.
log import
Use this command to import log files from another device and replace the device ID on imported logs.
Syntax
Variable Description
<service> Select the file transfer protocol to use: ftp, sftp, scp, or tftp.
<device-id> Replace the device ID on imported logs. Enter a device serial number of one of
your log devices.
Syntax
Variable Description
Syntax
Variable Description
log storage-warning
Syntax
log-fetch
log-fetch client
Syntax
Variable Description
log-fetch server
Syntax
Variable Description
cancel <session id> Pause and clear one session or all sessions.
log-integrity
Syntax
Variable Description
lvm
With Logical Volume Manager (LVM), a FortiManager VM device can have up to fifteen total log disks added to an
instance. More space can be added by adding another disk and running the LVM extend command.
Syntax
Variables Description
max-dev-licence
Use this command to load add-on licenses to support more devices with a license key.
Syntax
migrate
Use this command to migrate all backup settings from the FTP, SCP, or SFTP server.
Syntax
execute migrate all-settings {ftp | scp | sftp} <ip:port> <string> <username> <password>
<ssh-cert> [<crptpasswd>]
Variable Description
{ftp | scp | sftp} Enter the server type: ftp, scp, or sftp.
<ip:port> Enter the server IP address and optionally, for FTP servers, the port number.
<string> Enter the path and file name for the backup.
<passwd> Enter the password for the username on the backup server.
<ssh-cert> Enter the SSH certification for the server. This option is only available for backup
operations to SCP servers.
[<crptpasswd>] Optional password to protect backup content. Use any for no password.
ping
Send an ICMP echo request (ping) to test the network connection between the FortiManager system and another
network device.
Syntax
Variable Description
<ip | hostname> IPv4 address or DNS resolvable hostname of network device to contact.
Example
This example shows how to ping a host with the IPv4 address 192.168.1.23:
execute ping 192.168.1.23
ping6
Send an ICMP echo request (ping) to test the network connection between the FortiManager system and another
network device.
Syntax
Variable Description
<ip | hostname> Enter the IPv6 address or DNS resolvable hostname of network device to contact.
Example
This example shows how to ping a host with the IPv6 address 8001:0DB8:AC10:FE01:0:0:0:0:
execute ping6 8001:0DB8:AC10:FE01:0:0:0:0:
raid
This command is only available on hardware-based FortiManager models that support RAID.
Syntax
Variable Description
reboot
Restart the FortiManager system. This command will disconnect all sessions on the FortiManager system.
Syntax
execute reboot
remove
Use this command to remove all custom settings in Logview, all reports for a specific device, resync files, and a security
fabric from a specific ADOM.
Syntax
Variable Description
<device-id> The device identifier for the device that all reports are being removed from.
<adom-name> The ADOM that contains the security fabric that is being removed.
Example
reset
Use this command to reset the FortiManager unit. These commands will disconnect all sessions and restart the
FortiManager unit.
Syntax
Variable Description
all-except-ip Reset all settings except the current IP address and route information.
reset-sqllog-transfer
Syntax
restore
Use this command to restore the configuration or database from a file and change the FortiManager unit image. These
commands will disconnect all sessions and restart the FortiManager unit.
Syntax
Variable Description
all-settings Restore all FortiManager settings from a file on a server. The new settings replace
the existing settings, including administrator accounts and passwords.
image Upload a firmware image from a TFTP server to the FortiManager unit. The
FortiManager unit reboots, loading the new firmware.
<ip:port> Enter the IP address of the server to get the file from and optionally , for FTP
servers, the port number.
<device name(s)> Enter the device name(s) separated by a comma, or enter all for all devices.
<report name(s)> Restore specific reports (separated by commas), all for all reports, or reports
with names containing given pattern.
A '?' matches any single character.
A '*' matches any string, including the empty string, e.g.:
l foo: for exact match
<filename> Enter the file to get from the server. You can enter a path with the filename, if
required.
<filepath> Enter the file to get from the server. You can enter a path with the filename, if
required.
<username> The username to log on to the server. This option is not available for restore
operations from TFTP servers.
<password> The password for username on the server. This option is not available for restore
operations from TFTP servers.
<ssh-cert> The SSH certification for the server. This option is only available for restore
operations from SCP servers.
[<crptpassword>] Optional password to protect backup content. Use any for no password.
Variable Description
[option1+option2+...] Enter keepbasic to retain IP and routing information on the original unit.
Example
This example shows how to upload a configuration file from a FTP server to the FortiManager unit. The name of the
configuration file on the FTP server is backupconfig. The IP address of the FTP server is 192.168.1.23. The user is
admin with a password of mypassword. The configuration file is located in the /usr/local/backups/ directory on
the TFTP server.
execute restore all-settings 192.168.1.23 /usr/local/backups/backupconfig admin mypasword
sdns
Use this command to enable and reboot the SDNS system, and to load an SDNS image.
Syntax
Variable Description
sensor
Syntax
Variable Description
shutdown
Shut down the FortiManager system. This command will disconnect all sessions.
Syntax
execute shutdown
sql-local
Use these commands to remove the SQL database and logs from the FortiManager system and to rebuild the database
and devices.
When rebuilding the SQL database, new logs will not be available until the rebuild is complete.
The time required to rebuild the database is dependent on the size of the database. Please
plan a maintenance window to complete the database rebuild. You can use the diagnose
sql status rebuild-db command to display the SQL log database rebuild status.
The following features will not be available until after the SQL database rebuild has completed:
FortiView, Log View, Event Management, and Reports.
Syntax
Variable Description
rebuild-adom Rebuild log SQL database from log data for particular ADOMs.
rebuild-db Rebuild entire log SQL database from log data. This operation will remove the
SQL database and rebuild from log data. It will also reboot the device.
Variable Description
<adom> The ADOM name. Multiple ADOM names can be entered when rebuilding
ADOMs.
<log type> Enter the log type from available log types, for example: emailfilter
sql-query-dataset
Use this command to execute a SQL dataset against the FortiManager system.
Syntax
Variable Description
sql-query-generic
Use this command to execute a SQL statement against the FortiManager system.
Syntax
Variable Description
sql-report
Use these commands to import and display language translation and fonts files, and to run a SQL report once against
the FortiManager system.
Syntax
Variable Description
Variable Description
<language-name> Enter the language name to import, export, or delete a language translation file, or
select one of the following options:
l English l Portuguese
l French l Simplified_Chinese
l Japanese l Spanish
l Korean l Traditional_Chinese
<argument 1> For FTP, SFTP, or SCP, type a user name. For TFTP, enter a file name.
<argument 2> For FTP, SFTP, or SCP, type a password or ‘-’. For TFTP, press <enter>.
Variable Description
<start-time> The start date and time of the report schedule, in the format: "HH:MM
yyyy/mm/dd"
<end-time> The enddate and time of the report schedule, in the format: "HH:MM
yyyy/mm/dd"
l en - English l ko - Korean
l de - German l pt - Portuguese
l es - Spanish l ru - Russian
l fr - French l zh - Simplified Chinese
l it - Italian l zh_Hant - Traditional Chinese
l ja - Japanese
ssh
Syntax
Variable Description
<destination> Enter the IP address or fully qualified DNS resolvable hostname of the system you
are connecting to.
<username> Enter the user name to use to log on to the remote system.
To leave the SSH session type exit. To confirm that you are connected or disconnected from the SSH session, verify
the command prompt has changed.
ssh-known-hosts
Syntax
Variable Description
tac
Syntax
Variable Description
<ip> Enter the server IP address. For ftp, the port can be specified by adding :port.
time
Syntax
Variable Description
All parts of the time are required. Single digits are allowed for each of hh, mm, and
ss.
If you do not specify a time, the command returns the current system time.
Example
top
Use this command to view the processes running on the FortiManager system.
Syntax
Variable Description
Use the following commands when viewing the running processes. Press h or ? for help.
Command Description
Z,B,E,e Global: 'Z' colors; 'B' bold; 'E'/'e' summary/task memory scale
l,t,m Toggle Summary: 'l' load avg; 't' task/cpu stats; 'm' memory info
0,1,2,3,I Toggle: '0' zeros; '1/2/3' cpus or numa node views; 'I' Irix mode
Command Description
R,H,V,J . Toggle: 'R' Sort; 'H' Threads; 'V' Forest view; 'J' Num justify
c,i,S,j . Toggle: 'c' Cmd name/line; 'i' Idle; 'S' Time; 'j' Str justify
n,#,^O. Set: 'n'/'#' max tasks displayed; Show: Ctrl+'O' other filter(s)
q or <Esc> Quit
traceroute
Test the connection between the FortiManager system and another network device, and display information about the
network hops between the device and the FortiManager system.
Syntax
Variable Description
traceroute6
Test the connection between the FortiManager system and another network device, and display information about the
network hops between the device and the FortiManager system.
Syntax
Variable Description
The diagnose commands display diagnostic information that help you to troubleshoot problems.
docker ha sql
auto-delete
Use this command to diagnose auto deletion of DLP files, log files, quarantine files, and report files.
Syntax
Variable Description
deletion policy.
l list: List DLP files according to system automatic deletion policy.
deletion policy.
l list: List log files according to system automatic deletion policy.
Variable Description
deletion policy.
l list: List report files according to system automatic deletion policy.
cdb
Use this command to check and repair or upgrade and repair the object configuration database and global policy
assignment table.
Syntax
Variable Description
check adom-integrity [adom] Check and repair the specified ADOM's database.
check adom-revision [adom] Check or remove invalid ADOM revision database. Optionally, preview the check
[preview] before running it.
check reference-integrity Check the ADOM reference table integrity. Optionally, preview the check before
[preview] running it.
name] l 0 | 1: update only empty values (default), or always update (1)
Variable Description
check update-devinfo sslvpn-flag Upgrade the device SSL-VPN flag on the specified device.
<devname>
upgrade check <action> Perform a check to see if upgrade and repair is necessary.
l objcfg-integrity - Object config database integrity
target
l fw-addr-type - Firewall address wrong FQDN type
upgrade force-retry <action> Re-run an upgrade that was already performed in previous release.
l clear-max-policyid - Clear ADOM max_policyid cache
upgrade pending-list Display the list of upgrades scheduled for the next reboot.
debug
debug application
Use this command to view or set the debug levels for the FortiManager applications. All of the debug levels are 0 by
default.
Syntax
Variable Description
alertmail <integer> Set the debug level of the alert email daemon.
apiproxyd <integer> Set the debug level of the API proxy daemon.
auth <integer> Set the debug level of the Fortinet authentication module.
curl <integer> Set the debug level of the curl daemon. Use this CLI command to enable debug
for monitoring progress when performing a backup/restore of a large database
via FTP.
ddmd <integer> <deviceName> Set the debug level of the dynamic data monitor. Enter a device name to only
show messages related to that device.
Note: Enter "" to reset.
dmworker <integer> Set the debug level of the deployment manager worker.
fabricsyncd <integer> Set the debug level of the fabricsyncd daemon (0 - 8).
fdssvrd <integer> Set the debug level of the FDS server daemon.
fgdsvr <integer> Set the debug level of the FortiGuard query daemon.
fgdupd <integer> Set the debug level of the FortiGuard update daemon.
fgfmsd <integer> <deviceName> Set the debug level of FGFM daemon. Enter a device name to only show
messages related to that device.
Note: Enter "" to reset. Multiple device names should be separated by commas.
For example, Host1, Host2.
Variable Description
fortimanagerws <integer> Set the debug level of the FortiManager Web Service.
lrm <integer> Set the debug level of the Log and Report Manager.
oftpd <integer> Set the debug level of the oftpd daemon. Enter an IPv4 address, device serial
<IP/deviceSerial/deviceName> number, or device name to only show messages related to that device or IPv4
address.
Note: Enter "" to reset.
ptsessionmgr <integer> Set the debug level of the Portal Session Manager.
rtmmond <integer> Set the debug level of the real time monitor daemon.
scansched <integer> Set the debug level of the scan schedule daemon.
scheduled <integer> Set the debug level of the schedule task daemon.
securityconsole <integer> Set the debug level of the security console daemon.
sql_dashboard_rpt <integer> Set the debug level of the SQL dashboard report daemon.
sqlplugind <integer> <filter> Set the debug level of the SQL plugin daemon. Set filter for sqlplugind.
Variable Description
sqlreportd <integer> <filter> Set the debug level (0-8) of the SQL report daemon. Set the filter for sqlreportd.
Note: Enter "" to reset the filter. Without <integer> and <filter>, it shows
the current debug level and filter of sqlreportd.
sqlrptcached <integer> Set the debug level of the SQL report caching daemon.
storaged <integer> Set the debug level of communication with java clients.
Example
This example shows how to set the debug level to 7 for the upload daemon:
diagnose debug application uploadd 7
debug backup-oldformat-script-logs
Use this command to backup script log files that failed to be upgraded to the FTP server.
Syntax
Variable Description
<string> Enter the path/filename to save the log to the FTP server.
debug cdbchk
Use these commands to enable or disable CLI CDB check debug output.
Syntax
debug cli
Syntax
Variable Description
debug console
Syntax
Variable Description
debug coredump
Syntax
Variable Description
enable-once <daemon> Enable core dump the next time a daemon starts (one time only).
upload <daemon> <service> Upload core dumps for a daemon to the specified server.
<ip> <username> <password>
<directory>
debug crashlog
Syntax
Variable Description
debug disable
Syntax
debug dpm
Syntax
Variable Description
comm-trace {enable | disable | Enable/disable a DPM to FortiGate communication trace, or view the status of it.
status}
conf-trace {enable | disable | Enable/disable a DPM to FortiGate configuration trace, or view the status of it.
status}
debug enable
Syntax
debug gui
Syntax
debug info
Syntax
debug klog
Syntax
debug reset
Use this command reset the debug level settings. All debug settings will be reset.
Syntax
debug service
Use this command to view or set the debug level of various service daemons.
Syntax
Variable Description
The anonymous, dbcache, dump, fazcmd, and rpc-auth commands are only available on hardware devices.
debug sysinfo
Syntax
debug sysinfo-log
Use this command to generate one system log information log file every two minutes.
Syntax
debug sysinfo-log-backup
Use this command to backup all system information log files to an FTP server.
Syntax
Variable Description
<filepath> Enter the path/filename to save the log to the FTP server.
debug sysinfo-log-list
Syntax
Variable Description
debug timestamp
Syntax
debug vmd
Use this command to show all the VMD (Virtual Machine Daemon) logs.
Syntax
debug vminfo
Syntax
dlp-archives
Syntax
Variable Description
quar-cache list-all-process List all processes that are using the quarantine cache.
quar-cache kill-process <pid> Kill a process that is using the quarantine cache.
Variable Description
statistics {show | flush} Display or flush the quarantined and DLP archived file statistics.
docker
Use this command to view Docker status, clean up Docker data, and upgrade Docker management extensions.
Syntax
Variable Description
upgrade {fortiauthenticator | Upgrade the specified management extension. Optionally, enter a tag to upgrade
fortiportal | fortisigconverter | to (for debugging only).
fortisoar | fortiwlm |
sdwancontroller} [tag]
Example
dvm
dvm adom
Syntax
Variable Description
clone <adom> <new_adom> Clone an ADOM. Enter the name of the ADOM that will be cloned, and the name
of the clone.
list List ADOMs, state, product, OS version (OSVER), major release (MR), name,
mode, VPN management, and IPS.
dvm capability
Syntax
Variable Description
dvm chassis
Syntax
Variable Description
dvm check-integrity
Syntax
dvm csf
Syntax
Variable Description
dvm dbstatus
Syntax
dvm debug
Use this command to enable/disable debug channels, and show debug message related to DVM.
Syntax
diagnose dvm debug {enable | disable} <channel> <channel> <channel> <channel> <channel>
diagnose dvm debug trace [filter]
Variable Description
<channel> The following channels are available: all, dvm_db, dvm_dev, shelfmgr, ipmi,
lib, dvmcmd, dvmcore, gui, and monitor
<filter> The following filters are available: all, dvm_db, dvm_dev, shelfmgr, ipmi,
lib, dvmcmd, dvmcore, gui, and monitor.
dvm device
Syntax
Variable Description
list <device> <vdom> List devices. Optionally, enter a device or VDOM name.
monitor <device> <api> JSON API for device monitor. Specify the device name and the monitor API
name.
object-reference <device> List object reference. Specify the device name, VDOM, category (or all for all
<vdom> <category> <object> categories), and object.
Example
The following example shows the results of running the monitor command for WiFi clients.
FMG-VM64 # diagnose dvm device monitor FortiGate-VM64 wifi/client
Request :
{
"id": 1473975442,
"method": "exec",
"params": [
{
"data": {
"action": "get",
"resource": "/api/v2/monitor/wifi/client",
"target": [
"adom/root/device/FortiGate-VM64"
]
},
"url": "sys/proxy/json"
}
]
}
Response :
{
"id": 1473975442,
"result": [
{
"data": [
{
"response": {
"action": "select",
"build": 0047,
"http_method": "GET",
"name": "client",
"path": "wifi",
"results": null,
"serial": "FGVMEV0000000000",
"status": "success",
"vdom": "root",
"version": "v7.0.0"
},
"status": {
"code": 0,
"message": "OK"
},
"target": "FortiGate-VM64"
}
],
"status": {
"code": 0,
"message": "OK"
},
"url": "sys/proxy/json"
}
]
}
dvm device-tree-update
Syntax
Variable Description
dvm extender
Use these commands to list FortiExtender devices, synchronize FortiExtender data via JSON, and perform other
actions.
Syntax
Variable Description
copy-data-to-device <device> Copy extender data (data plan and SIM profile) to the device. Enter the device
name.
import-template <device> Import dataplan and SIM profile to the ADOM template. Enter the device name or
<extender id> ID, and the extender ID.
set-template <device> <extender Set template to the extender modem. Enter the device name or ID, extender ID,
id> <template> and template.
sync-extender-data <device> Synchronize FortiExtender data by JSON. Optionally: save the data to the
[savedb] [syncadom] [task] database, synchronize the ADOM, and/or create a task.
dvm fap
Syntax
Variable Description
dvm fsw
Syntax
Variable Description
dvm group
Syntax
Variable Description
dvm lock
Syntax
dvm proc
Syntax
dvm remove
Syntax
dvm supported-platforms
Syntax
Variable Description
list <detail> List supported platforms by device type. Enter detail to show details with syntax
support.
dvm task
Syntax
Variable Description
repair Repair the task database while preserving existing data where possible. The
FortiManager will reboot after the repairs.
reset Reset the task database to its factory default state. All existing tasks and the task
history will be erased. The FortiManager will reboot after the reset.
dvm taskline
Syntax
Variable Description
repair Repair the task lines while preserving data wherever possible. The FortiManager
will reboot after the repairs.
dvm transaction-flag
Syntax
Variable Description
dvm workflow
Syntax
Variable Description
faz-cdb
faz-cdb upgrade
Syntax
Variable Description
<adom name> Enter the ADOM name or enter all for all ADOMs.
<service> Enter the transfer protocol one of: ftp, sftp, or scp.
<ip> Enter the server IP address. For FTP, the port can be specified by adding :port
to the server IP address.
faz-cdb reset
Syntax
fgfm
Use this command to get installation session, object, and session lists.
Syntax
Variable Description
fmnetwork
fmnetwork arp
Syntax
Variable Description
fmnetwork interface
Syntax
Variable Description
fmnetwork netstat
Syntax
Variable Description
list [-r] List all connections, or use -r to list only resolved IP addresses.
tcp [-r] List all TCP connections, or use -r to list only resolved IP addresses.
udp [-r] List all UDP connections, or use -r to list only resolved IP addresses.
fmupdate
Syntax
Variable Description
as the string.
l <clean>: Clean the directory if necessary. Only cleans the export/import
directory.
del-device {fct | fds | fgd | fgc} Delete a device. UID is required for FortiClient (fct) only.
<serial> <uid>
del-log Delete all the logs for FDS and FortiGuard update events.
del-object {fds | fct | fgd | fgc | fgd- Remove all objects from the specified service. Optionally, enter the object type
fgfq} <type> <version> and version or time.
del-serverlist {fct | fds | fgd | fgc} Delete the server list file (fdni.dat) from the specified service.
l fds-log: Dump the FDS svrd log. Optionally, enter a rolling number from 0
to 10.
l fect: Dump the FortiClient image file. Choose from the two available options
l immx: Dump the image upgrade matrix file. You can dump the IMMX files for
Variable Description
l oblt: Dump the object list file. You can dump the object list files for FortiGate
or FortiClient service.
l srul: Dump the FDS select filtering rules.
fds-getobject <filter type> <filter> Get the versions of all FortiGate objects for antivirus-IPS.
<other options> l <filter type>: Enter product or objid as the filter type.
l <filter>: Choose from the seven available filters. These filters are
only objects.
fgd-asdevice-stat {10m | 30m | Display antispam device statistics for single or all devices.
1h | 6h | 12h | 24h | 7d} {all | l <integer>: Number of time periods to display (optional, default = 1).
<serial>} <integer>
fgd-dbver {wf | as | av-query} Get the version of the database. Optionally, enter the database type.
fgd-del-db {wf | as | av-query | Delete FortiGuard database. Optionally, enter the database type.
file-query}
fgd-get-downstream-device Get information on all downstream FortiGate web filter and spam devices.
fgd-test-client <ip> <serial> Execute FortiGuard test client. Optionally, enter the hostname or IPv4 address of
<string> <integer> the FGD server, the serial number of the device, and the query number per
second or URL.
fgd-url-rating <ip> <serial> Rate URLs within the FortiManager database using the FortiGate serial number.
<version> <url> Optionally, enter the category version and URL.
fgd-wfas-log {name | ip} <string> View the FortiGuard service log file. Optionally, enter the device filter type, and
device name or IPv4 address.
fgd-wfas-rate {wf | av | as_ip | as_ Get the web filter / antispam rating speed. Optionally, enter the server type.
url | as_hash}
fgd-wfdevice-stat {10m | 30m | Display web filter device statistics. Optionally, enter a specific device’s serial
1h | 6h | 12h | 24h | 7d} number.
<serialnum>
Variable Description
fgd-wfserver-stat {top10sites | Display web filter server statistics for the top 10 sites or devices. Optionally, enter
top10devices} {10m | 30m | 1h | the time frame to cover.
6h | 12h | 24h | 7d}
fgt-del-statistics Remove all statistics (antivirus / IPS and web filter / antispam). This command
requires a reboot.
get-device {fct | fds | fgd | fgc} Get device information. Optionally, enter a serial number.
<serialnum>
list-object {fds | fct | fgd | fgc | fgd- List downloaded objects of linkd service. Optional enter the object type and
fgfq} [type] [version] version or time.
show-bandwidth {fct | fgt | fml | Display the download bandwidth for a device type over a specified time period.
faz} {1h | 6h | 12h | 24h | 7d | 30d}
show-dev-obj [serial_num] Display an objects version of a device. Optionally, enter a serial number.
view-linkd-log {fct | fds | fgd | fgc} View the linkd log file.
fortilogd
Syntax
Variable Description
fwmanager
Syntax
Variable Description
get-all-schedule [filter by status] Display all recorded upgrade schedules. Optionally, filter for the schedule
(succeeded, failed, or unfinished).
get-dev-schedule <device> [filter Get scheduled upgrades for the specified device. Optionally, filter for the schedule
by status] (succeeded, failed, or unfinished).
get-grp-schedule <group> [filter Get scheduled upgrades for the specified group name or ID. Optionally, filter for
by status] the schedule (succeeded, failed, or unfinished).
image-download <platform> Download the official image. Enter the platform name and version.
<version>
image-list <product> Get the local firmware image list for the product:
l FGT: FortiGate
l FMG: FortiManager
l FAZ: FortiAnalyzer
l FAP: FortiAP
l FSW: FortiSwitch
l FXT: FortiExtender
set-dev-schedule <device> Create an upgrade schedule for a device. The build number is only needed for
<version> [flags] [date_time] special images, use 0 for regular images.
show-grp-disk-check-status Show whether the devices in the group need disk checks
<group>
ha
Syntax
Variable Description
hardware
Syntax
incident
Syntax
Variable Description
Variable Description
<attachment type> The attachment type: report, alertevent, note, file, or all for all types.
license
Syntax
Variable Description
log device
Use this command to view and manage device logging. If required, filter by device ID or ADOM.
Syntax
Variable Description
pm2
Use this command to print from and check the integrity of the policy manager database.
Syntax
diagnose pm2 check-integrity {all adom device global ips task ncmdb}
diagnose pm2 print <log-type>
Variable Description
check-integrity {all adom device Check policy manager database integrity. Multiple database categories can be
global ips task ncmdb} checked at once.
report
Syntax
Variable Description
clean {ldap-cache | report-queue} Cleanup the SQL report queue or LDAP cache.
status {pending | running} Check status information on pending and running reports.
sniffer
Use this command to perform a packet trace on one or more network interfaces.
Packet capture, also known as sniffing, records some or all of the packets seen by a network interface. By recording
packets, you can trace connection states to the exact point at which they fail, which may help you to diagnose some
types of problems that are otherwise difficult to detect.
FortiManager units have a built-in sniffer. Packet capture on FortiManager units is similar to that of FortiGate units.
Packet capture is displayed on the CLI, which you may be able to save to a file for later analysis, depending on your CLI
client.
Packet capture output is printed to your CLI display until you stop it by pressing CTRL + C, or until it reaches the number
of packets that you have specified to capture.
Packet capture can be very resource intensive. To minimize the performance impact on your
FortiManager unit, use packet capture only during periods of minimal traffic, with a serial
console CLI connection rather than a Telnet or SSH CLI connection, and be sure to stop the
command when you are finished.
Syntax
Variable Description
<interface> Enter the name of a network interface whose packets you want to capture, such
as port1, or type any to capture packets on all network interfaces.
<filter> Enter either none to capture all packets, or type a filter that specifies which
protocols and port numbers that you do or do not want to capture, such as 'tcp
port 25'. Surround the filter string in quotes.
The filter uses the following syntax:
'[[src|dst] host {<host1_fqdn> | <host1_ipv4>}] [and|or]
[[src|dst] host {<host2_fqdn> | <host2_ipv4>}]
[and|or] [[arp|ip|gre|esp|udp|tcp] port <port1_int>]
[and|or] [[arp|ip|gre|esp|udp|tcp] port <port2_int>]'
To display only the traffic between two hosts, specify the IP addresses of both
hosts. To display only forward or only reply packets, indicate which host is the
source and which is the destination.
For example, to display UDP port 1812 traffic between 1.example.com and either
2.example.com or 3.example.com, you would enter:
'udp and port 1812 and src host 1.example.com and dst \
( 2.example.com or 2.example.com \)'
<verbose> Enter one of the following numbers indicating the depth of packet headers and
payloads to capture:
l 1: print header of packets (default)
For troubleshooting purposes, Fortinet Technical Support may request the most
verbose level (3).
Example 1
The following example captures the first three packets’ worth of traffic, of any port number or protocol and between any
source and destination (a filter of none), that passes through the network interface named port1. The capture uses a low
level of verbosity (indicated by 1).
Commands that you would type are highlighted in bold; responses from the Fortinet unit are not in bold.
Packet capture can be very resource intensive. To minimize the performance impact on your
FortiManager unit, use packet capture only during periods of minimal traffic, with a
serial console CLI connection rather than a Telnet or SSH CLI connection, and be
sure to stop the command when you are finished.# diag sniffer packet port1 none 1 3
interfaces=[port1]
filters=[none]
0.918957 192.168.0.1.36701 -> 192.168.0.2.22: ack 2598697710
0.919024 192.168.0.2.22 -> 192.168.0.1.36701: psh 2598697710 ack 2587945850
0.919061 192.168.0.2.22 -> 192.168.0.1.36701: psh 2598697826 ack 2587945850
If you are familiar with the TCP protocol, you may notice that the packets are from the middle of a TCP connection.
Because port 22 is used (highlighted above in bold), which is the standard port number for SSH, the packets might be
from an SSH session.
Example 2
The following example captures packets traffic on TCP port 80 (typically HTTP) between two hosts, 192.168.0.1 and
192.168.0.2. The capture uses a low level of verbosity (indicated by 1). Because the filter does not specify either host as
the source or destination in the IPv4 header (src or dst), the sniffer captures both forward and reply traffic.
A specific number of packets to capture is not specified. As a result, the packet capture continues until the administrator
presses the control key + C. The sniffer then confirms that five packets were seen by that network interface.
Commands that you would type are highlighted in bold; responses from the Fortinet unit are not in bold.
Packet capture can be very resource intensive. To minimize the performance impact on your
FortiManager unit, use packet capture only during periods of minimal traffic, with a
serial console CLI connection rather than a Telnet or SSH CLI connection, and be
sure to stop the command when you are finished.# diag sniffer packet port1 'host
192.168.0.2 or host 192.168.0.1 and tcp port 80' 1
192.168.0.2.3625 -> 192.168.0.1.80: syn 2057246590
192.168.0.1.80 -> 192.168.0.2.3625: syn 3291168205 ack 2057246591
192.168.0.2.3625 -> 192.168.0.1.80: ack 3291168206
192.168.0.2.3625 -> 192.168.0.1.80: psh 2057246591 ack 3291168206
192.168.0.1.80 -> 192.168.0.2.3625: ack 2057247265
5 packets received by filter
0 packets dropped by kernel
Example 3
The following example captures all TCP port 443 (typically HTTPS) traffic occurring through port1, regardless of its
source or destination IPv4 address. The capture uses a high level of verbosity (indicated by 3).
A specific number of packets to capture is not specified. As a result, the packet capture continues until the administrator
presses the control key + C. The sniffer then confirms that five packets were seen by that network interface.
Verbose output can be very long. As a result, output shown below is truncated after only one packet.
Commands that you would type are highlighted in bold; responses from the Fortinet unit are not in bold.
Packet capture can be very resource intensive. To minimize the performance impact on your
FortiManager unit, use packet capture only during periods of minimal traffic, with a
serial console CLI connection rather than a Telnet or SSH CLI connection, and be
sure to stop the command when you are finished. # diag sniffer port1 'tcp port 443'
3
interfaces=[port1]
filters=[tcp port 443]
10.651905 192.168.0.1.50242 -> 192.168.0.2.443: syn 761714898
0x0000 0009 0f09 0001 0009 0f89 2914 0800 4500 ..........)...E.
0x0010 003c 73d1 4000 4006 3bc6 d157 fede ac16 .<s.@.@.;..W....
0x0020 0ed8 c442 01bb 2d66 d8d2 0000 0000 a002 ...B..-f........
0x0030 16d0 4f72 0000 0204 05b4 0402 080a 03ab ..Or............
0x0040 86bb 0000 0000 0103 0303 ..........
Instead of reading packet capture output directly in your CLI display, you usually should save the output to a plain text file
using your CLI client. Saving the output provides several advantages. Packets can arrive more rapidly than you may be
able to read them in the buffer of your CLI display, and many protocols transfer data using encoding other than US-
ASCII. It is usually preferable to analyze the output by loading it into in a network protocol analyzer application such as
Wireshark (http://www.wireshark.org/).
For example, you could use PuTTY or Microsoft HyperTerminal to save the sniffer output. Methods may vary. See the
documentation for your CLI client.
Requirements
The fgt2eth.pl script is provided as-is, without any implied warranty or technical support,
and requires that you first install a Perl module compatible with your operating system.
To use fgt2eth.pl, open a command prompt, then enter a command such as the following:
fgt2eth.pl -in packet_capture.txt -out packet_capture.pcap
where:
l fgt2eth.pl is the name of the conversion script; include the path relative to the current directory, which is
indicated by the command prompt
l packet_capture.txt is the name of the packet capture’s output file; include the directory path relative to
your current directory where you want the converted output to be saved
15. Open the converted file in your network protocol analyzer application. For further instructions, see the
documentation for that application.
For additional information on packet capture, see the Fortinet Knowledge Base article Using the FortiOS built-in
packet sniffer.
sql
Syntax
diagnose sql hcache add-task agg <adom> <norm-query-hash> <agg-level> <timestamp> <num-
of-days>
diagnose sql hcache add-task agg-update <adom> <hid>
diagnose sql hcache dump-task <filter>
diagnose sql hcache list <adom> <query-hash/tag> <filter> <detail>
diagnose sql hcache plan <adom> <start-time> <end-time> <query-tag/norm-qry-hash/sql>
<is-fortiview> <max-time-scale>
diagnose sql hcache rebuild-both <start-time> <end-time>
diagnose sql hcache rebuild-fortiview <start-time> <end-time>
diagnose sql hcache rebuild-report <start-time> <end-time>
diagnose sql hcache rebuild-status
diagnose sql hcache show hcache <adom> <id>
diagnose sql hcache show hcache-query <adom> <norm-qry-hash>
diagnose sql hcache show hcache-res-tbl <adom> <res-tbl-id>
diagnose sql hcache show time <time> <time> <time> <time>
diagnose sql hcache status {all | all-summary | <adom>}
diagnose sql process kill <pid>
diagnose sql process list [full]
diagnose sql remove {hcache <adom> [fast] | query-cache | rebuild-db-flag | tmp-tabe}
diagnose sql show {db-size | hcache-size | log-filters | log-stfile <device-id> <vdom> |
policy info <adom> }
diagnose sql status {rebuild-adom <adom> | rebuild-db | run_sql_rpt | sqlplugind |
sqlreportd}
diagnose sql upload {ftp | tftp} <host> <directory> <user_name> <password>
Variable Description
config auto-cache-delay [set Show, set, or reset the auto-cache delay, in seconds (default = 300).
<seconds>| reset]
config debug-filter {set | test} Show sqlplugind and sqlreportd debug filter. Enter sqlplugind, sqlreportd or
<daemon> <string> both as the <daemon>. Enter the filter string.
config deferred-index-timespan View or set the time span for the deferred index (default = 10000).
[set <value>]
config hcache-agg-step [reset | Show, set, or reset the hcache aggregation step (default = 10).
set <integer>]
config hcache-base-trim-interval Show, set, or reset the hcache base trim interval (default = 172800).
[reset | set <integer>]
config hcache-max-fv-row [reset | Show, set, or reset max row number for fortiview hcache (default = 100000).
set <integer>]
config hcache-max-rpt-row [reset Show, set, or reset max row number for report hcache (default = 18000).
| set <integer>]
config sampling-max-row [reset | Show, set, or reset max row number for sampling (default = 1000000).
set <integer>]
config sampling-status [reset | Show, set, or reset the sampling status. Enter 0 for disabling and 1 for enabling
set <integer>] the sample status (default = 1).
config sampling-type [reset | set Show, set, or reset the type of sampling (default = 0).
<integer>]
Variable Description
debug hcache-agg show [<filter>] Show the last 10 lines of the hcache-agg debug file. Set filter for the debug file,
[<NUM>] and show the last NUM lines of the debug file. The filter and NUM variables
optional.
debug hcache-agg upload {ftp | Upload hcache-agg debug file to FTP or SFTP server. Enter host IP address,
sftp} <host> <dir> <user name> directory, user name, and password.
<password>
debug logview dbgon <level Enable log view debug output. Set log view debug level (1-5). Default level is 1.
value>
debug logview show [<filter>] Show the last 10 lines of the Log view debug file.Set filter for debug file, and show
[<NUM>] last NUM lines of the debug file. The filter and NUM variables are optional.
debug logview upload {ftp | sftp} Upload log view debug file to FTP or SFTP server. Enter host IP address,
<host> <dir> <user name> directory, user name, and password.
<password>
debug sqlqry dbgon <level Enable SQL query debug output. Set SQL query debug level (1-5). The default
value> level is 1.
Note: When the debug level is 5, the final SQL running in sqlreportd will show in
the debug output as well.
debug sqlqry show [<filter>] Show the last 10 lines of the SQL query debug file. Set filter for the debug file, and
[<NUM>] show the last NUM lines of the debug file. The filter and NUM variables are
optional.
debug sqlqry upload {ftp | sftp} Upload SQL query debug file to FTP or SFTP server. Enter host IP address,
<host> <dir> <user name> directory, user name, and password.
<password>
Variable Description
hcache dump-task <filter> Dump hcache tasks. Enter the task filter.
l query-hash/tag: The hash or tag filter query, or all for all hcaches.
l filter: Narrow down the hcache list search result by using a filter. The filter
keywords include:
l status: The hcache status. 0(Ready), 1(Ready-Loss), 2(In-Building),
3(Error), 4(Invalid-SQL ), 5(No-Data), 6(Not-Ready).
l fv_flag: List FortiView/report only. 1(fortiview), 0(report).
l sql: The SQL query match. '*' for wildcard, e.g. *select*.
l time_start: Start of the log time. format: yyyy-mm-dd hh:MM:ss.
l time_end: End of the log time. format: yyyy-mm-dd hh:MM:ss.
The following shows an example of the variable <filter>:
l "status=0,1,5 sql=\"*srcip, dstip*\" time_
start>=\"2020-11-01 00:00:00\" time_end<=\"2020-11-
30 23:59:59\"".
Enter "" for no filter.
l detail: Show detailed information.
or sql statement.
l is-fortiview: Enter 1 for FortiView, or 0 for report.
hcache rebuild-both <start-time> Rebuild hcache for both report and FortiView. Start and end times are in the
<end-time> format yyyy-mm-dd hh:mm:ss.
hcache rebuild-fortiview <start- Rebuild hcache for FortiView only. Start and end times are in the format yyyy-mm-
time> <end-time> dd hh:mm:ss.
hcache rebuild-report <start- Rebuild hcache for report only. Start and end times are in the format yyyy-mm-dd
time> <end-time> hh:mm:ss.
hcache show hcache <adom> Show hcache information. Enter the ADOM name and hcache ID.
<id>
hcache show hcache-query Show hcache query information. Enter the ADOM name and the normalized query
<adom> <norm-qry-hash> hash.
Variable Description
hcache show hcache-res-tbl Show hcache result table information. Enter the ADOM name and the result table
<adom> <res-tbl-id> ID.
hcache show time <time> <time> Show hcache time. Enter up to four timestamps.
<time> <time>
hcache status {all | all-summary | Show detailed hcache information. Enter the ADOM name, all-summary for the
<adom>} summary, or all for all ADOMs.
l rebuild-db-flag: Remove the rebuild database flag. The system will exit
show {db-size | hcache-size | log- Show the database, hcache size, log filters, or log status file:
filters | log-stfile <device-id> l db-size: Show database size.
l log-stfile: Show logstatus file for the specified device (for HA cluster,
upload {ftp | tftp} <host> Upload sqlplugind messages / pgsvr logs with FTP or TFTP.
<directory> <user_name>
<password>
svctools
Import or export the FortiAnalyzer configuration (when FortiAnalyzer features are enabled), and run JSON files.
Syntax
Variable Description
export remote <ip> <string> Export the configuration to a remote FTP server.
<username> <password>
import local name <adom> Import a local configuration from the specified ADOM.
import remote <ip> <string> Import a remote configuration from an FTP server to the specified ADOM.
<username> <password>
<adom>
run remote <ip> <string> Run a remote file from an FTP server.
<username> <password>
Example
system
system admin-session
Syntax
Variable Description
system disk
Syntax
Variable Description
system export
Syntax
diagnose system export crashlog <ftp server> <username> <password> <directory> <filename>
diagnose system export dminstallog <devid> <ftp server> <username> <password> <directory>
<filename>
diagnose system export fmwslog {ftp | sftp} <type> <(s)ftp server> <username> <password>
<directory> <filename>
diagnose system export raidlog <ftp server> <username> <password> [remote path]
[filename]
diagnose system export umlog {ftp | sftp} <type> <(s)ftp server> <username> <password>
<directory> <filename>
diagnose system export upgradelog <ftp server> <username> <password> <directory>
<filename>
diagnose system export vartmp <ftp server> <username> <password> <directory> <filename>
Variable Description
dminstallog <devid> <ftp server> Export the deployment manager install log.
<username> <password> <directory>
<filename>
fmwslog {ftp | sftp} <type> <(s)ftp server> Export the web service log files.
<username> <password> <directory> The type is the log file prefix and can be: SENT, RECV, or TEST.
<filename>
umlog {ftp | sftp} <type> <(s)ftp server> Export the update manager and firmware manager log files.
<username> <password> <directory> The type options are: fdslinkd, fctlinkd, fgdlinkd, fgdsvr,
<filename> update, service, misc, umad, and fwmlinkd
vartmp <ftp server> <username> Export the system log files in /var/tmp.
<password> <directory> <filename>
system flash
Syntax
Variable Description
Variable Description
The information displayed includes the image name, version, total size (KB), used
(KB), percent used, boot image, and running image.
system fsck
Syntax
Variable Description
harddisk Check and repair the file system, then reboot the system.
system geoip
Syntax
Variable Description
Example
system geoip-city
Syntax
Variable Description
system interface
Syntax
Variable Description
system mapserver
Syntax
Variable Description
Variable Description
set <url> Set the map server. Enter the map server URL.
system ntp
Syntax
Variable Description
system print
Syntax
Variable Description
connector [adom] <server_type> Print connector information. Enter the ADOM name, or Global, the server type
<server> (pxGrid, clearpass, or nsx), and then the server name.
Variable Description
netstat Print the network statistics for active Internet connections (servers and
established).
system process
Syntax
Variable Description
l <pid>: Process ID
list List all processes running on the FortiManager. The information displayed
includes the PID, user, VSZ, stat, and command.
system raid
Syntax
Variable Description
system route
Use this command to help diagnose routes. The listed information includes the destination IP, gateway IP, netmask,
flags, metric, reference, use, and interface for each IPv4 route.
Syntax
system route6
Use this command to help diagnose routes. The listed information includes the destination IP, gateway IP, netmask,
flags, metric, reference, use, and interface for each IPv6 route.
Syntax
system server
Syntax
test
test application
Use this command to test applications. Multiple variables can be entered for each command.
Syntax
Variable Description
Variable Description
l 7: Meta-InterfaceRole module
l 8: Tunnel module
l 9: oftpd file fwd module
l 10: Service module
l 97: HA module
l 98: Monitor status
l 99: Restart clusterd
l 100: Restart clusterd and clusterd-monitor
l 2: show statistics
Variable Description
l 99: restart
l 75: data masking test: <passwd> <plaint test> <1|0 (high secure)> [do_
unmasking]
l 99: restart daemon
Variable Description
l 3: logstat status
Variable Description
l 2: show states
l 4: list adoms
Variable Description
l 5: re-check an adom
l 99: restart daemon
Variable Description
l 71: show the progress of upgrading log files into per-vdom storage
Variable Description
test connection
Syntax
Variable Description
test deploymanager
Syntax
Variable Description
test policy-check
Syntax
Variable Description
test search
Syntax
Variable Description
test sftp
Use this command to test the secure file transfer protocol (SFTP) scheduled backup.
Syntax
Variable Description
<directory> The directory on the SFTP server where you want to put the file (default = /).
upload
upload clear
Syntax
diagnose upload clear log {all | original | backup | mirror 1 | mirror 2 | mirror 3}
diagnose upload clear report
Variable Description
l mirror 1: Clear log uploading requests in the mirror queue for server 1.
l mirror 2: Clear log uploading requests in the mirror queue for server 2.
l mirror 3: Clear log uploading requests in the mirror queue for server 3.
Variable Description
upload status
Syntax
vpn
Use this command to flush SAD entries and list tunnel information.
Syntax
Variable Description
The get command displays all settings, even if they are still in their default state.
Although not explicitly shown in this section, for all config commands, there are related get
and show commands that display that part of the configuration. Get and show commands use
the same syntax as their related config command, unless otherwise specified.
The get command displays all settings, including settings that are in their default state.
Unlike the show command, get requires that the object or table whose settings you want to display are specified, unless
the command is being used from within an object or table.
For example, at the root prompt, this command would be valid:
get system status
fmupdate analyzer fmupdate web-spam system fips system ntp system syslog
fmupdate av-ips system admin system fortiview system password- system workflow
policy
fmupdate analyzer
Syntax
fmupdate av-ips
Syntax
Example
This example shows the output for get fmupdate av-ips web-proxy:
ip : 0.0.0.0
mode : proxy
password : *
port : 80
status : disable
username : (null)
fmupdate custom-url-list
Syntax
fmupdate disk-quota
Use this command to view the disk quota for the update manager.
Syntax
Example
fmupdate fct-services
Syntax
Example
fmupdate fds-setting
Syntax
Example
fds-ssl-protocol : tlsv1.2
fmtr-log : info
linkd-log : info
max-av-ips-version : 20
max-work : 1
push-override:
push-override-to-client:
send_report : enable
send_setup : disable
server-override:
system-support-fct : emergency
system-support-fgt :
system-support-fml :
system-support-fsa :
system-support-fsw :
umsvc-log : info
unreg-dev-option : add-service
update-schedule:
time: 00:10
wanip-query-mode : disable
fmupdate fwm-setting
Syntax
Example
fmupdate multilayer
Syntax
fmupdate publicnetwork
Syntax
fmupdate server-access-priorities
Syntax
Example
fmupdate server-override-status
Syntax
fmupdate service
Syntax
Example
fmupdate web-spam
Syntax
Example
This example shows the output for get fmupdate web-spam web-proxy:
ip : 0.0.0.0
ip6 : ::
mode : proxy
password : *
port : 80
status : disable
username : (null)
system admin
Syntax
Example
This example shows the output for get system admin setting:
access-banner : disable
admin-https-redirect: enable
admin-login-max : 256
admin_server_cert : server.crt
allow_register : disable
auth-addr : (null)
auth-port : 443
auto-update : enable
banner-message : (null)
chassis-mgmt : disable
chassis-update-interval: 15
device_sync_status : enable
gui-theme : blue
http_port : 80
https_port : 443
idle_timeout : 900
idle_timeout_api : 900
idle_timeout_gui : 900
install-ifpolicy-only: disable
mgmt-addr : (null)
mgmt-fqdn : (null)
objects-force-deletion: enable
offline_mode : disable
register_passwd : *
sdwan-monitor-history: disable
sdwan-skip-unmapped-input-device: disable
shell-access : disable
show-add-multiple : disable
show-adom-devman : enable
show-checkbox-in-table: disable
show-device-import-export: disable
show-fct-manager : disable
show-hostname : disable
show_automatic_script: disable
show_grouping_script: enable
show_schedule_script: disable
show_tcl_script : disable
unreg_dev_opt : add_allow_service
webadmin_language : auto_detect
system alert-console
Syntax
Example
system alertemail
Syntax
Example
system alert-event
Syntax
Example
This example shows the output for an alert event named Test that has default values:
name : Test
alert-destination:
enable-generic-text : disable
enable-severity-filter: disable
event-time-period : 0.5
generic-text : (null)
num-events : 1
severity-filter : high
severity-level-comp : =
severity-level-logs : no-check
system auto-delete
Use this command to view automatic deletion policies for logs, reports, DLP files, and quarantined files.
Syntax
system backup
Syntax
Example
This example shows the output for get system backup status:
All-Settings Backup
Last Backup: Tue Sep 29 08:03:35 2020
Next Backup: N/A
system certificate
Syntax
Example
This example shows the output for get system certificate local Fortinet_Local:
name : Fortinet_Local
password : *
comment : Default local certificate
private-key :
certificate :
Subject: C = US, ST = California, L = Sunnyvale, O = Fortinet, OU = FortiManager, CN =
FMG-VM0A11000137, emailAddress = [email protected]
Issuer: C = US, ST = California, L = Sunnyvale, O = Fortinet, OU = Certificate
Authority, CN = support, emailAddress = [email protected]
Valid from: 2011-01-07 26:58:75 GMT
Valid to: 2031-02-21 31:88:05 GMT
Fingerprint: 0A:--:--:--:--:--:--:--:--:--:--:--:--:--:0B
Root CA: No
Version: 3
Serial Num:
89
Extensions:
Name: X509v3 Basic Constraints
Critical: no
Content:
CA:FALSE
csr :
system connector
Syntax
Example
system dm
Use this command to view device manager information on your FortiManager unit.
Syntax
get system dm
Example
system dns
Syntax
Example
system docker
Syntax
Example
system fips
Syntax
system fortiview
Syntax
Example
This example shows the output for get system fortiview auto-cache:
aggressive-fortiview: disable
interval : 168
status : enable
system global
Syntax
Example
perform-improve-by-ha: disable
policy-object-icon : disable
policy-object-in-dual-pane: disable
pre-login-banner : disable
private-data-encryption : disable
remoteauthtimeout : 10
search-all-adoms : disable
ssl-low-encryption : disable
ssl-protocol : tlsv1.3 tlsv1.2
ssl-static-key-ciphers: enable
task-list-size : 2000
timezone : (GMT-8:00) Pacific Time (US & Canada).
tunnel-mtu : 1500
usg : disable
vdom-mirror : disable
webservice-proto : tlsv1.3 tlsv1.2
workspace-mode : disabled
system ha
Syntax
get system ha
Example
system ha-status
Syntax
Example
system interface
Syntax
Example
This example shows the output for get system interface port1:
name : port1
status : up
ip : 172.172.172.222 255.255.255.0
allowaccess : ping https ssh snmp soc-fabric http webservice
serviceaccess :
speed : auto
description : (null)
alias : (null)
mtu : 1500
ipv6:
ip6-address: ::/0 ip6-allowaccess:
system locallog
Syntax
Examples
This example shows the output for get system locallog disk setting:
status : enable
severity : information
upload : disable
server-type : FTP
max-log-file-size : 100
roll-schedule : none
diskfull : overwrite
log-disk-full-percentage: 80
This example shows the output for get system locallog syslogd3 filter:
event : enable
devcfg : enable
devops : enable
diskquota : enable
dm : enable
docker : enable
dvm : enable
ediscovery : enable
epmgr : enable
eventmgmt : enable
faz : enable
fazsys : enable
fgd : enable
fgfm : enable
fmgws : enable
fmlmgr : enable
fmwmgr : enable
fortiview : enable
glbcfg : enable
ha : enable
hcache : enable
incident: enable
iolog : enable
logd : enable
logdb : enable
logdev : enable
logfile : enable
logging : enable
lrmgr : enable
objcfg : enable
report : enable
rev : enable
rtmon : enable
scfw : enable
scply : enable
scrmgr : enable
scvpn : enable
system : enable
webport : enable
system log
Syntax
Example
This example shows the output for get system log settings:
FAC-custom-field1 : (null)
FAZ-custom-field1 : (null)
FCH-custom-field1 : (null)
FCT-custom-field1 : (null)
FDD-custom-field1 : (null)
FGT-custom-field1 : (null)
FMG-custom-field1 : (null)
FML-custom-field1 : (null)
FPX-custom-field1 : (null)
FSA-custom-field1 : (null)
FWB-custom-field1 : (null)
browse-max-logfiles : 10000
dns-resolve-dstip : disable
download-max-logs : 100000
ha-auto-migrate : disable
import-max-logfiles : 10000
log-file-archive-name: basic
rolling-regular:
sync-search-timeout : 60
Syntax
Example
This example shows the output for get system log-fetch server-settings:
max-conn-per-session: 3
max-sessions : 1
session-timeout : 10
system loglimits
Syntax
Example
Where:
system mail
Syntax
Example
This example shows the output for an alert email named Test:
id : Test
auth : disable
auth-type : psk
passwd : *
port : 25
secure-option : default
server : mailServer
user : [email protected]
system metadata
Syntax
Example
This example shows the output for get system metadata admins 'Contact Email':
fieldname : Contact Email
fieldlength : 50
importance : optional
status : enabled
system ntp
Syntax
Example
system password-policy
Syntax
Example
system performance
Syntax
Example
Used: 4.89%
Used(Excluded NICE): 4.89%
%used %user %nice %sys %idle %iowait %irq %softirq
CPU0 4.89 2.85 0.00 2.04 95.11 0.00 0.00 0.00
Memory:
Total: 4,134,728 KB
Used: 2,011,824 KB 48.7%
Hard Disk:
Total: 82,434,456 KB
Used: 44,018,112 KB 53.4%
IOStat: tps r_tps w_tps r_kB/s w_kB/s queue wait_ms svc_ms %util sampling_sec
6.9 5.5 1.4 193.4 195.4 0.0 5.1 0.7 0.5 108708.57
Flash Disk:
Total: 499,656 KB
Used: 113,504 KB 22.7%
IOStat: tps r_tps w_tps r_kB/s w_kB/s queue wait_ms svc_ms %util sampling_sec
0.0 0.0 0.0 0.0 0.0 0.0 1.4 0.6 0.0 108708.62
system report
Syntax
Example
This example shows the output for get system report setting:
aggregate-report : disable
ldap-cache-timeout : 60
max-table-rows : 10000
report-priority : auto
template-auto-install: default
week-start : sun
system route
Syntax
Example
This example shows the output for get system route 66:
seq_num : 66
device : port5
dst : 0.0.0.0 0.0.0.0
gateway : 10.111.1.16
system route6
Syntax
system saml
Syntax
Example
system sniffer
Syntax
system snmp
Syntax
Example
This example shows the output for get system snmp sysinfo:
contact_info : (null)
description : Test FMG
engine-id : (null)
location : (null)
status : enable
trap-cpu-high-exclude-nice-threshold: 80
trap-high-cpu-threshold: 80
trap-low-memory-threshold: 80
system soc-fabric
Syntax
Example
system sql
Syntax
Example
== [ FML-emailfilter ]
category: FML-emailfilter value: client_name,dst_ip,from,to,subject
== [ FML-event ]
category: FML-event value: subtype,msg
== [ FML-history ]
category: FML-history value: classifier,disposition,from,to,client_
name,direction,domain,virus
== [ FML-virus ]
category: FML-virus value: src,msg,from,to
== [ FWB-attack ]
category: FWB-attack value: http_host,http_url,src,dst,msg,action
== [ FWB-event ]
category: FWB-event value: ui,action,msg
== [ FWB-traffic ]
category: FWB-traffic value: src,dst,service,http_method,msg
background-rebuild : enable
compress-table-min-age : 7
database-type : postgres
device-count-high : disable
event-table-partition-time: 0
fct-table-partition-time: 360
rebuild-event : enable
rebuild-event-start-time: 00:00 2000/01/01
start-time : 00:00 2000/01/01
traffic-table-partition-time: 0
utm-table-partition-time: 0
system status
Syntax
Example
system syslog
Syntax
Example
This example shows the output for an syslog server named Test:
name : Test
ip : 10.10.10.1
port : 514
system workflow
Syntax
The show commands display a part of your unit’s configuration in the form of the commands that are required to achieve
that configuration from the firmware’s default state.
Although not explicitly shown in this section, for all config commands, there are related show
commands that display that part of the configuration. The show commands use the same
syntax as their related config command.
Unlike the get command, show does not display settings that are in their default state.
Example
Some FortiManager CLI commands issue numerical error codes. The following table lists the error codes and
descriptions.
0 Success
2 Unknown protocol
4 Memory failure
5 Session failure
6 Authentication failure
Copyright© 2021 Fortinet, Inc. All rights reserved. Fortinet®, FortiGate®, FortiCare® and FortiGuard®, and certain other marks are registered trademarks of Fortinet, Inc., and other Fortinet names herein
may also be registered and/or common law trademarks of Fortinet. All other product or company names may be trademarks of their respective owners. Performance and other metrics contained herein were
attained in internal lab tests under ideal conditions, and actual performance and other results may vary. Network variables, different network environments and other conditions may affect performance
results. Nothing herein represents any binding commitment by Fortinet, and Fortinet disclaims all warranties, whether express or implied, except to the extent Fortinet enters a binding written contract,
signed by Fortinet’s General Counsel, with a purchaser that expressly warrants that the identified product will perform according to certain expressly-identified performance metrics and, in such event, only
the specific performance metrics expressly identified in such binding written contract shall be binding on Fortinet. For absolute clarity, any such warranty will be limited to performance in the same ideal
conditions as in Fortinet’s internal lab tests. Fortinet disclaims in full any covenants, representations, and guarantees pursuant hereto, whether express or implied. Fortinet reserves the right to change,
modify, transfer, or otherwise revise this publication without notice, and the most current version of the publication shall be applicable.