Fortiadc 5.1.0 Cli Reference PDF
Fortiadc 5.1.0 Cli Reference PDF
VERSION 5.1.0
FORTINET DOCUMENT LIBRARY
http://docs.fortinet.com
FORTINET VIDEO GUIDE
http://video.fortinet.com
FORTINET BLOG
https://blog.fortinet.com
CUSTOMER SERVICE & SUPPORT
https://support.fortinet.com
FORTIGATE COOKBOOK
http://cookbook.fortinet.com
FORTINET TRAINING SERVICES
http://www.fortinet.com/training
FORTIGUARD CENTER
http://www.fortiguard.com
FEEDBACK
Email: [email protected]
First Edition
TABLE OF CONTENTS
Change Log 10
Introduction 11
Using the CLI 14
Connecting to the CLI 14
Command syntax 18
Subcommands 22
Permissions 26
Tips & tricks 26
config config 32
config config sync-list 32
config firewall 34
config firewall connlimit 34
config firewall connlimit6 36
config firewall nat-snat 37
config firewall policy 39
config firewall policy6 41
config firewall qos-filter 42
config firewall qos-filter6 44
config firewall qos-queue 44
config firewall vip 45
config global 48
config global-dns-server 49
config global-dns-server address-group 49
config global-dns-server dns64 51
config global-dns-server dsset-info-list 52
config global-dns-server general 53
config global-dns-server policy 54
config global-dns-server remote-dns-server 57
config global-dns-server response-rate-limit 58
config global-dns-server trust-anchor-key 59
config global-dns-server zone 60
config global-load-balance 66
config global load balance analytic 66
config global-load-balance data-center 67
config global-load-balance link 68
config global-load-balance servers 69
config global-load-balance setting 73
config global-load-balance topology 78
config global-load-balance virtual-server-pool 79
config global-load-balance host 81
config link-load-balance 84
config link-load-balance flow-policy 84
config link-load-balance gateway 87
config link-load-balance link-group 89
config link-load-balance persistence 91
config link-load-balance proximity-route 93
config link-load-balance virtual-tunnel 95
config load-balance 98
config load-balance auth-policy 98
config load-balance caching 100
config load-balance certificate-caching 102
config load-balance client-ssl-profile 103
config load-balance clone-pool 107
config load-balance compression 110
config load-balance connection-pool 112
config load-balance content-rewriting 113
config load-balance content-routing 118
config load-balance decompression 121
config load-balance error-page 123
config load-balance geoip-list 123
config load-balance http2-profile 130
config load-balance ippool 131
config load-balance l2-exception-list 133
config load-balance method 134
config load-balance pagespeed 135
config load-balance pagespeed-profile 137
config load-balance persistence 138
config load-balance pool 141
config load-balance profile 147
config load-balance real-server-ssl-profile 176
config load-balance reputation 180
config load-balance reputation-exception 182
config load-balance schedule-pool 183
config load-balance virtual-server 183
config load-balance web-category 192
config load-balance web-filter-profile 193
config load-balance web-sub-category 194
config load-balance whitelist 196
config log 198
config log fast_report 198
config log report 200
config log report email 202
config log report_queryset 202
config log setting fast_stats 204
config log setting highspeed 205
config log setting local 206
config log setting remote 209
config router 213
config router isp 213
config router md5-ospf 214
config router ospf 215
config router policy 220
config router setting 221
config router static 223
config router bgp 224
config security 232
config security waf bot-detection 232
config security waf exception 234
config security waf heuristic-sql-xss-injection-detection 235
config security waf http-protocol-constraint 238
config security waf profile 245
config security waf url-protection 248
config security waf web-attack-signature 249
config security waf json-validation-detection 252
config security waf xml-schema file 255
config security waf_soap-wsdl-file 255
config security waf xml-validation-detection 255
config security antivirus profile 260
config security antivirus quarantine 261
config security antivirus settings 263
config system fortisandbox 263
config system 265
config system accprofile 267
config system address 270
config system address6 271
config system addrgrp 272
config system addrgrp6 273
config system admin 274
config system auto backup 277
config system certificate ca 279
config system certificate ca_group 280
config system certificate certificate_verify 280
config system certificate crl 282
config system certificate intermediate_ca 283
config system certificate intermediate_ca_group 284
config system certificate local 284
config system certificate local_cert_group 285
config system certificate remote 286
config system certificate ocsp 287
config system certificate ocsp_stapling 290
config system console 291
config system dns 291
config system dos-prevention 292
config system fortiguard 293
config system global 294
config system ha 296
config system health-check 304
config system health-check-script 315
config system interface 315
config system isp-addr 323
config system mailserver 327
config system overlay-tunnel 328
config system password-policy 330
config system schedule-group 331
config system scripting 332
config system service 332
config system servicegrp 334
config system setting 336
config system snmp community 337
config system snmp sysinfo 339
config system snmp user 340
config system tcpdump 342
config system time manual 343
config system time ntp 344
config system traffic-group 345
config system web-filter 346
config system tunneling 347
config system alert-syslog 348
config system alert-email 349
config system alert-snmp-trap 349
config system alert-action 350
config system alert 351
config system alert-policy 355
config user 357
config user ldap 357
config user local 358
config user radius 358
config user user-group 359
config user authentication-relay 362
config user saml-idp 364
config user saml-sp 364
diagnose 368
diagnose antivirus quarantine 369
diagnose crashlog 370
diagnose debug cmdb 371
diagnose debug enable/disable 372
diagnose debug flow 373
diagnose debug info 375
diagnose debug module 376
diagnose debug module kernel 378
diagnose debug module fnginx 379
diagnose debug module httproxy ssl 379
diagnose debug timestamp 380
diagnose hardware deviceinfo 381
diagnose hardware ioport 382
diagnose hardware pciconfig 384
diagnose hardware sysinfo 386
diagnose llb policy list 387
diagnose netlink backlog 387
diagnose netlink device 388
diagnose netlink interface 389
diagnose netlink ip/ipv6 389
diagnose netlink neighbor/neighbor6 390
diagnose netlink route/route6 391
diagnose netlink tcp 392
diagnose netlink udp 393
diagnose server-load-balance dns-clients 394
diagnose server-load-balance persistence 394
diagnose server-load-balance session 395
diagnose server-load-balance slb_load 397
diagnose sniffer packet 397
diagnose system top 400
diagnose system vm 401
diagnose tech-report 402
execute 403
execute backup 404
execute caching 405
execute certificate ca 406
execute certificate config 406
execute certificate crl 407
execute certificate local 407
execute certificate remote 408
execute checklogdisk 409
execute clean 409
execute config-sync 409
execute date 410
execute discovery-glb-virtual-server 411
execute dumpsystem 411
execute dumpsystem-file 412
execute factoryreset 413
execute fixlogdisk 413
execute formatlogdisk 413
execute geolookup 414
execute glb-dprox-lookup 414
execute glb-persistence-lookup 415
execute ha force sync-config 415
execute ha force standby traffic-group 415
execute ha manage 416
execute health-check-verify 416
execute isplookup 417
execute log delete-file 417
execute log delete-type 417
execute log list-type 418
execute log rebuild-db 418
execute nslookup 419
execute packet-capture/packet-capture6 419
execute packet-capture-file 420
execute ping-option/ping6-option 421
execute ping/ping6 423
execute reboot 424
execute reload 425
execute restore 425
execute shutdown 426
execute ssh 427
execute statistics-db 428
execute telnet 428
execute traceroute 428
execute vm license 429
execute web-category-test 429
execute SSL client-side session statistics 430
execute SSL handshake record statistics 430
execute web vulnerability scan 430
Syntax 431
get 432
get router info ospf 433
get router info routing-table 434
get security waf-signature-status 434
get security scan-report 435
get security scan-task 435
get system ha-status 435
get system performance 436
get system status 437
get system traffic-group 438
get system traffic-group status 438
get router info bgp all 439
get router info bgp ip 439
get router info bgp neighbors 440
get router info bgp regexp 440
get router info bgp summary 441
get router info6 bgp all 441
get router info6 bgp ip 442
get router info6 bgp neighbors 442
get router info6 bgp regexp 443
get router info6 bgp summary 444
show 445
Appendix A: Virtual domains 447
Overview 447
Enabling VDOMs 448
Creating VDOMs 448
Editing a VDOM 449
Assigning interfaces to a VDOM 451
Assigning administrators to a VDOM 451
Disabling VDOMs 451
Viewing VDOMs 452
Change Log
Change Log
FortiADC Handbook 10
Fortinet Technologies, Inc.
Introduction
Introduction
Welcome, and thank you for selecting Fortinet products for your network protection.
Scope
This document describes how to use the command-line interface (CLI) of the FortiADC appliance. It assumes
that you have already successfully installed the FortiADC appliance and completed basic setup.
At this stage:
Conventions
This document uses the conventions described in this section.
IP addresses
To avoid IP conflicts that would occur if you used examples in this document with public IP addresses that belong
to a real organization, the IP addresses used in this document are fictional. They belong to the private IP address
ranges defined by these RFCs.
Warns you about procedures or feature behaviors that could have unexpected or
undesirable results including loss of data or damage to equipment.
11 FortiADC CLI Reference
Fortinet Technologies, Inc.
Introduction
Typographical conventions
Convention Example
A GUI element you are From Minimum log level, select Notification.
instructed to click or
select
end
Emphasis HTTP connections are not secure and can be intercepted by a third
party.
Hyperlink https://support.fortinet.com
Command syntax
The CLI requires that you use valid syntax, and conform to expected input constraints. It rejects invalid
commands.
FortiADC Handbook 12
Fortinet Technologies, Inc.
Introduction
For command syntax conventions such as braces, brackets, and command constraints such as <address_
ipv4>, see Notation.
13 FortiADC CLI Reference
Fortinet Technologies, Inc.
Using the CLI Connecting to the CLI
You can use either interface or both to configure the FortiADC appliance. In the web UI, you use buttons, icons,
and forms, while, in the CLI, you either type text commands or upload batches of commands from a text file, like
a configuration script.
If you are new to Fortinet products, or if you are new to the CLI, this section can help you to become familiar.
l Locally — Connect your computer, terminal server, or console directly to the console port.
l Through the network — Connect your computer through any network attached to one of the network ports. To
connect using an Secure Shell (SSH) or Telnet client, enable the network interface for Telnet or SSH administrative
access. Enable HTTP/HTTPS administrative access to connect using the CLI Console widget in the web UI.
Local access is required in some cases:
l If you are installing your FortiADC appliance for the first time and it is not yet configured to connect to your network,
unless you reconfigure your computer’s network settings for a peer connection, you might only be able to connect to
the CLI using a local console connection. See the FortiADC Handbook.
l Restoring the firmware utilizes a boot interrupt. Network access to the CLI is not available until after the boot
process completes, and therefore local CLI access is the only viable option.
Before you can access the CLI through the network, you usually must enable SSH and/or HTTP/HTTPS and/or
Telnet on the network interface through which you will access the CLI.
Requirements
The following procedure describes connection using PuTTY software; steps may vary
with other terminal emulators.
14 FortiADC CLI Reference
Fortinet Technologies, Inc.
Connecting to the CLI Using the CLI
1. Using the null modem or RJ-45-to-DB-9 cable, connect the FortiADC appliance’s console port to the serial
communications (COM) port on your management computer.
2. On your management computer, start PuTTY.
3. In the Category tree on the left, go to Connection > Serial and configure the following:
Serial port COM1 (or, if your computer has multiple serial ports, the name of the
connected serial port)
Data bits 8
Stop bits 1
Parity None
4. In the Category tree on the left, go to Session (not the sub-node, Logging) and from Connection type, select
Serial.
5. Click Open.
6. Press the Enter key to initiate a connection.
The login prompt appears.
7. Type a valid administrator account name (such as admin) then press Enter.
8. Type the password for that administrator account and press Enter. (In its default state, there is no password for
the admin account.)
The CLI displays the following text, followed by a command line prompt:
Welcome!
You can now enter CLI commands, including configuring access to the CLI through SSH or Telnet.
If you do not want to use an SSH/Telnet client and you have access to the web UI, you
can alternatively access the CLI through the network using the CLI Console widget in
the web UI.
You must enable SSH and/or Telnet on the network interface associated with that physical network port. If your
computer is not connected directly or through a switch, you must also configure the FortiADC appliance with a
static route to a router that can forward packets from the FortiADC appliance to your computer.
FortiADC Handbook 15
Fortinet Technologies, Inc.
Using the CLI Connecting to the CLI
Requirements
l a computer with an available serial communications (COM) port and RJ-45 port
l terminal emulation software such as PuTTY
l the RJ-45-to-DB-9 or null modem cable included in your FortiADC package
l a crossover Ethernet cable (if connecting directly) or straight-through Ethernet cable (if connecting through a switch
or router)
To enable SSH or Telnet access to the CLI using a local console connection
1. Using the network cable, connect the FortiADC appliance’s network port either directly to your computer’s network
port, or to a network through which your computer can reach the FortiADC appliance.
2. Note the number of the physical network port.
3. Using a local console connection, connect and log into the CLI.
4. Enter the following commands:
config system interface
edit <interface_name>
set allowaccess {http https ping snmp ssh telnet}
end
where:
<interface_name> is the name of the network interface associated with the physical network port, such
as port1
{http https ping snmp ssh telnet} is the complete, space-delimited list of permitted administrative access
protocols, such as https ssh telnet; omit protocols that you do not want to permit
For example, to exclude HTTP, SNMP, and Telnet, and allow only HTTPS, ICMP ECHO (ping), and SSH
administrative access on port1:
config system interface
edit "port1"
set allowaccess ping https ssh
next
end
Telnet is not a secure access method. SSH should be used to access the CLI from the
Internet or any other untrusted network.
5. To confirm the configuration, enter the command to view the access settings for the interface.
show system interface <interface_name>
The CLI displays the settings, including the management access settings, for the interface.
6. If you will be connecting indirectly, through one or more routers or firewalls, configure the appliance with at least
one static route so that replies from the CLI can reach your client.
16 FortiADC CLI Reference
Fortinet Technologies, Inc.
Connecting to the CLI Using the CLI
Secure Shell (SSH) provides both secure authentication and secure communications to the CLI. Supported SSH
protocol versions, ciphers, and bit strengths vary by whether or not you have enabled FIPS-CC mode or are using
a low encryption (LENC) version, but generally include SSH version 2 with AES-128, 3DES, Blowfish, and SHA-1.
Requirements
The SSH client may display a warning if this is the first time you are connecting to the FortiADC appliance
and its SSH key is not yet recognized by your SSH client, or if you have previously connected to the FortiADC
appliance but it used a different IP address or SSH key. If your management computer is directly connected
to the FortiADC appliance with no network hosts between them, this is normal.
6. Click Yes to verify the fingerprint and accept the FortiADC appliance’s SSH key. You will not be able to log in until
you have accepted the key.
The CLI displays a login prompt.
7. Type a valid administrator account name (such as admin) and press Enter.
8. Type the password for this administrator account and press Enter.
If three incorrect login or password attempts occur in a row, you will be disconnected.
Wait one minute, then reconnect to attempt the login again.
The FortiADC appliance displays a command prompt (its hostname followed by a #). You can now enter CLI
commands.
FortiADC Handbook 17
Fortinet Technologies, Inc.
Using the CLI Command syntax
Telnet is not a secure access method. SSH should be used to access the CLI from the
Internet or any other untrusted network.
Requirements
If three incorrect login or password attempts occur in a row, you will be disconnected.
Wait one minute, then reconnect to attempt the login again.
The CLI displays a command line prompt (by default, its host name followed by a #). You can now enter CLI
commands.
Command syntax
When entering a command, the CLI requires that you use valid syntax and conform to expected input constraints.
It will reject invalid commands.
For example, if you do not type the entire object that will receive the action of a command operator such as
config, the CLI will return an error message such as:
Command fail. CLI parsing error
Fortinet documentation uses the following conventions to describe valid command syntax.
Terminology
Each command line consists of a command word followed by words for the configuration data or other specific
item that the command uses or affects, for example:
get system admin
18 FortiADC CLI Reference
Fortinet Technologies, Inc.
Command syntax Using the CLI
Fortinet documentation uses the terms in Figure 1 to describe the function of each word in the command line.
l command — A word that begins the command line and indicates an action that the FortiADC appliance should
perform on a part of the configuration or host on the network, such as config or execute. Together with other
words, such as fields or values, that you terminate by pressing the Enter key, it forms a command line. Exceptions
include multi-line command lines, which can be entered using an escape sequence.
Valid command lines must be unambiguous if abbreviated. Optional words or other command line
permutations are indicated by syntax notation.
If you do not enter a known command, the CLI will return an error message such as:
Unknown action 0
l subcommand — A kind of command that is available only when nested within the scope of another command.
After entering a command, its applicable subcommands are available to you until you exit the scope of the
command, or until you descend an additional level into another subcommand. Indentation is used to indicate levels
of nested commands.
Not all top-level commands have subcommands. Available subcommands vary by their containing scope.
l object — A part of the configuration that contains tables and/or fields. Valid command lines must be specific
enough to indicate an individual object.
l table — A set of fields that is one of possibly multiple similar sets that each have a name or number, such as an
administrator account, policy, or network interface. These named or numbered sets are sometimes referenced by
other parts of the configuration that use them.
l field — The name of a setting, such as ip or hostname. Fields in some tables must be configured with values.
Failure to configure a required field will result in an invalid object configuration error message, and the FortiADC
appliance will discard the invalid table.
l value — A number, letter, IP address, or other type of input that is usually the configuration setting held by a field.
Some commands, however, require multiple input values which may not be named but are simply entered in
sequential order in the same command line. Valid input types are indicated by constraint notation.
l option — A kind of value that must be one or more words from a fixed set of options.
FortiADC Handbook 19
Fortinet Technologies, Inc.
Using the CLI Command syntax
Indentation
Indentation indicates levels of nested commands, which indicate what other subcommands are available from
within the scope.
For example, the edit subcommand is available only within a command that affects tables, and the next
subcommand is available only from within the edit subcommand:
config system interface
edit port1
set status up
next
end
For information about available subcommands, see Subcommands.
Notation
Brackets, braces, and pipes are used to denote valid permutations of the syntax. Constraint notations, such as
<address_ipv4>, indicate which data types or string patterns are acceptable value input.
If you do not use the expected data type, the CLI returns an error message such
as:
object set operator error, -4003 discard the setting
The request URL must start with "/" and without domain
name.
or:
invalid unsigned integer value :-:
Convention Description
indicates that you may either omit or type both the verbose word and its
accompanying option, such as:
verbose 3
20 FortiADC CLI Reference
Fortinet Technologies, Inc.
Command syntax Using the CLI
Convention Description
Curly braces { } A word or series of words that is constrained to a set of options delimited
by either vertical bars or spaces.
You must enter at least one of the options, unless the set of options is
surrounded by square brackets [ ].
Note: To change the options, you must re-type the entire list. For
example, to add snmp to the previous example, you would type:
If the option adds to or subtracts from the existing list of options, instead of
replacing it, or if the list is comma-delimited, the exception will be noted.
FortiADC Handbook 21
Fortinet Technologies, Inc.
Using the CLI Subcommands
Convention Description
Subcommands
22 FortiADC CLI Reference
Fortinet Technologies, Inc.
Subcommands Using the CLI
Each command line consists of a command word that is usually followed by words for the configuration data or
other specific item that the command uses or affects, for example:
get system admin
Subcommands are available from within the scope of some commands.When you enter a subcommand level, the
command prompt changes to indicate the name of the current command scope. For example, after entering:
config system admin
the command prompt becomes:
(admin)#
Applicable subcommands are available to you until you exit the scope of the command, or until you descend an
additional level into another subcommand.
For example, the edit subcommand is available only within a command that affects tables; the next
subcommand is available only from within the edit subcommand:
config system interface
edit port1
set status up
next
end
Available subcommands vary by command.From a command prompt within config, two types of
subcommands might become available:
Table commands
The following table describes commands used to manage configuration tables that contain sets of members or
sets of rules, for example.
FortiADC Handbook 23
Fortinet Technologies, Inc.
Using the CLI Subcommands
l edit the settings for the default admin administrator account by typing edit
admin.
l add a new administrator account with the name newadmin and edit
newadmin‘s settings by typing edit newadmin.
edit is an interactive subcommand: further subcommands are available
from within edit.
edit changes the prompt to reflect the table you are currently editing.
end Save the changes to the current object and exit the config command.
This returns you to the top-level command prompt.
In objects, get lists the table names (if present), or fields and their values.
For example, in config user local-user, you could type get to see
the list of all local user names, then type purge and then y to confirm that
you want to delete all users.
show Display changes to the default configuration. Changes are listed in the form
of configuration commands.
24 FortiADC CLI Reference
Fortinet Technologies, Inc.
Subcommands Using the CLI
(admin_1)#
Field commands
The following table describes commands to manage field settings.
abort Exit both the edit and/or config commands without saving the
fields.
end Save the changes made to the current table or object fields, and exit
the config command. (To exit without saving, use abort instead.)
In objects, get lists the table names (if present), or fields and their
values.
next Save the changes you have made in the current table’s fields, and exit
the edit command to the object prompt. (To save and exit
completely to the root prompt, use end instead.)
next is useful when you want to create or edit several tables in the
same object, without leaving and re-entering the config command
each time.
show Display changes to the default configuration. Changes are listed in the
form of configuration commands.
FortiADC Handbook 25
Fortinet Technologies, Inc.
Using the CLI Permissions
Permissions
Depending on the account that you use to log in to the FortiADC appliance, you may not have complete access to
all CLI commands or areas of the web UI.
Access profiles control which commands and areas an administrator account can access. Access profiles assign
either:
For complete access to all commands, you must log in with the administrator account named admin.
Basic features and characteristics of the CLI environment provide support and ease of use for many CLI tasks.
l Help
l Shortcuts & key commands
l Command abbreviation
l Special characters
l Language support & regular expressions
l Screenl paging
26 FortiADC CLI Reference
Fortinet Technologies, Inc.
Tips & tricks Using the CLI
Help
l To display brief help during command entry, press the question mark (?) key.
l Press the question mark (?) key at the command prompt to display a list of the commands available and a
description of each.
l Press the question mark (?) key after a command keyword to display a list of the objects available with that
command and a description of each.
l Type a word or part of a word, then press the question mark (?) key to display a list of valid word completions or
subsequent words, and to display a description of each.
Action Keys
If multiple words could complete your entry, display all possible completions with
helpful descriptions of each.
Ctrl + N
Move the cursor left or right within the command line. Left or
Right
arrow
FortiADC Handbook 27
Fortinet Technologies, Inc.
Using the CLI Tips & tricks
Action Keys
Abort current interactive commands, such as when entering multiple lines. Ctrl + C
If you are not currently within an interactive command such as config or edit, this
closes the CLI connection.
Continue typing a command on the next line for a multi-line command. \ then
Enter
For each line that you want to continue, terminate it with a backslash ( \ ). To
complete the command line, terminate it by pressing the spacebar and then the Enter
key, without an immediately preceding backslash.
Command abbreviation
You can abbreviate words in the command line to their smallest number of non-ambiguous characters. For
example, the command get system status could be abbreviated to:
g sy st
If you enter an ambiguous command, the CLI returns an error message such as:
ambiguous command before 's'
Value conflicts with system settings.
Special characters
Special characters <, >, (,), #, ', and " are usually not permitted in CLI. If you use them, the CLI will often return an
error message such as:
The string contains XSS vulnerability characters
Character Key
? Ctrl + V then ?
28 FortiADC CLI Reference
Fortinet Technologies, Inc.
Tips & tricks Using the CLI
Character Key
' \'
" \"
\ \\
l English
l Japanese
l Simplified Chinese
l Traditional Chinese
In general, the names of configuration objects should be composed from common characters A-Z, a-z, 0-
9, _, -.
Characters such as ñ, é, symbols, and ideographs are sometimes acceptable input. Support varies by the nature
of the item being configured. CLI commands, objects, field names, and options must use their exact ASCII
characters, but some items with arbitrary names or values may be input using your language of choice.
For example, the host name must not contain special characters, and so the web UI and CLI will not accept most
symbols and other non-ASCII encoded characters as input when configuring the host name. This means that
languages other than English often are not supported. However, some configuration items, such as names and
comments, may be able to use the language of your choice.
To use other languages in those cases, you must use the correct encoding.
The system stores the input using Unicode UTF-8 encoding, but it is not normalized from other encodings into
UTF-8 before stored. If your input method encodes some characters differently than in UTF-8, your configured
items may not display or operate as expected.
Regular expressions are especially impacted. Matching uses the UTF-8 character values. If you enter a regular
expression using another encoding, or if an HTTP client sends a request in an encoding other than UTF-8,
matches may not be what you expect.
For example, with Shift-JIS, backslashes ( \ ) could be inadvertently interpreted as yen symbols ( ¥ ) and vice
versa. A regular expression intended to match HTTP requests containing money values with a yen symbol
therefore may not work it if the symbol is entered using the wrong encoding.
FortiADC Handbook 29
Fortinet Technologies, Inc.
Using the CLI Tips & tricks
l Use only the characters whose numerically encoded values are the same in UTF-8, such as the US-ASCII
characters that are also encoded using the same values in ISO 8859-1, Windows code page 1252, Shift-JIS and
other encodings, or
l For regular expressions that must match HTTP requests, use the same encoding as your HTTP clients
HTTP clients may send requests in encodings other than UTF-8. Encodings usually
vary by the client’s operating system or input language. If you cannot predict the cli-
ent’s encoding, you may only be able to match any parts of the request that are in Eng-
lish, because regardless of the encoding, the values for English characters tend to be
encoded identically. For example, English words may be legible regardless of inter-
preting a web page as either ISO 8859-1 or as GB2312, whereas simplified Chinese
characters might only be legible if the page is interpreted as GB2312.
To configure the system using other encodings, you might need to switch language settings on your management
computer, including for your web browser or Telnet or SSH client. For instructions on how to configure your
management computer’s operating system language, locale, or input method, see its documentation.
If you choose to configure parts of the system using non-ASCII characters, verify that
all systems interacting with the FortiADC appliance also support the same encodings.
You should also use the same encoding throughout the configuration if possible in
order to avoid needing to switch the language settings of your web browser or Telnet
or SSH client while you work.
Similarly to input, your web browser or CLI client should usually interpret display output as encoded using UTF-8.
If it does not, your configured items may not display correctly in the web UI or CLI. Exceptions include items such
as regular expressions that you may have configured using other encodings in order to match the encoding of
HTTP requests that the system receives.
Depending on your Telnet or SSH client’s support for your language’s input methods and for sending
international characters, you may need to interpret them into character codes before pressing Enter.
30 FortiADC CLI Reference
Fortinet Technologies, Inc.
Tips & tricks Using the CLI
Screen paging
When output spans multiple pages, you can configure the CLI to pause after each page. When the display
pauses, the last line displays --More--. You can then either:
FortiADC Handbook 31
Fortinet Technologies, Inc.
config config config config sync-list
config config
The config config commands are used to configure the configuration push/pull settings.
l You must plan for the impact the configuration push/pull has on the target deployment.
l You must have read-write permission for system settings.
Syntax
config config sync-list
edit <name>
set server-ip <class_ip>
set password <string>
set type {fw gds lb llb log route security system}
set comment <string>
next
end
comment A string to describe the purpose of the configuration, to help you and other admin-
istrators more easily identify its use. Put phrases in quotes. For example: “SLB
and GLB settings to Data Center East”.
Example
32 FortiADC CLI Reference
Fortinet Technologies, Inc.
config config sync-list config config
See Also
l execute config-sync
FortiADC Handbook 33
Fortinet Technologies, Inc.
config firewall config firewall connlimit
config firewall
Use this command to create connection limit security rules for IPv4 addresses.
The firewall connection limit policy allows or denies traffic based on a matching tuple: source address, destination
address, and service; and connection count. The purpose is to detect anomalous connection requests.
By default, if firewall connection limit rules are not configured, the system does not perform connection limit
policy processing. The firewall connection limit can be configured for non-SLB traffic and for Layer 7 SLB traffic,
but not Layer 4 SLB traffic.
Note: The purpose of the firewall connection limit is distinct from the virtual server connection limit. The firewall
connection limit setting is a security setting; the virtual server connection limit is a capacity setting.
l You must have a good understanding and knowledge of the capacity of your backend servers.
l You must have created the address configuration objects and service configuration objects that define the matching
tuple in your connection limit rules.
l You must have read-write permission for firewall settings.
34 FortiADC CLI Reference
Fortinet Technologies, Inc.
config firewall connlimit config firewall
Syntax
config firewall connlimit
config rule
edit <name>
set connection-limit <integer>
set destination-address <datasource>
set in-interface <datasource>
set out-interface <datasource>
set service <datasource>
set source-address <datasource>
set type {host | rule}
set side {both | destination | source}
next
end
end
side When the connection limit is per host, specify whether the connection
counter gets incremented when the host IP address appears in:
Example
FortiADC-VM # config firewall connlimit
FortiADC-VM (connlimit) # config rule
FortiADC-VM (rule) # edit dest-rule
Add new entry 'dest-rule' for node 1890
FortiADC Handbook 35
Fortinet Technologies, Inc.
config firewall config firewall connlimit6
connection-limit : 1048576
Use this command to create connection limit security rules for IPv6 addresses.
The firewall connection limit policy allows or denies traffic based on a matching tuple: source address, destination
address, and service; and connection count. The purpose is to detect anomalous connection requests.
By default, if firewall connection limit rules are not configured, the system does not perform connection limit
policy processing. The firewall connection limit can be configured for non-SLB traffic and for Layer 7 SLB traffic,
but not Layer 4 SLB traffic.
Note: The purpose of the firewall connection limit is distinct from the virtual server connection limit. The firewall
connection limit setting is a security setting; the virtual server connection limit is a capacity setting.
l You must have a good understanding and knowledge of the capacity of your backend servers.
l You must have created the address configuration objects and service configuration objects that define the matching
tuple in your connection limit rules.
l You must have read-write permission for firewall settings.
Syntax
config firewall connlimit6
config rule
edit <name>
set connection-limit <integer>
set destination-address6 <datasource>
set in-interface <datasource>
set out-interface <datasource>
set service <datasource>
set source-address6 <datasource>
set type {host | rule}
set side {both | destination | source}
36 FortiADC CLI Reference
Fortinet Technologies, Inc.
config firewall nat-snat config firewall
next
end
end
side When the connection limit is per host, specify whether the connection
counter gets incremented when the host IP address appears in:
You use SNAT when clients have IP addresses from private networks. This ensures you do not have multiple
sessions from different clients with source IP 192.168.1.1, for example. Or, you can map all client traffic to a
single source IP address because a source address from a private network is not meaningful to the FortiADC
system or backend servers.
The system maintains this NAT table and performs the inverse translation when it receives the server-to-client
traffic. Be sure to configure the backend servers to use the FortiADC address as the default gateway so that
server responses are also rewritten by the NAT module.
Note: This SNAT feature is not supported for traffic to virtual servers. Use the virtual server SNAT feature
instead.
Syntax
config firewall nat-snat
edit <name>
set from <ip&netmask>
set out-interface <datasource>
set status {enable | disable}
FortiADC Handbook 37
Fortinet Technologies, Inc.
config firewall config firewall nat-snat
set to <ip&netmask>
set traffic-group <datasource>
set trans-to-type {ip | pool | no-nat}
set trans-to-ip <class_ip>
set trans-to-ip-start <class_ip>
set trans-to-ip-end <class_ip>
next
end
from Address/mask notation to match the source IP address in the packet header.
0.0.0.0/0 matches all IP addresses.
trans-to-ip Specify an IPv4 address. The source IP address in the packet header will be
translated to this address.
Example
FortiADC-VM # config firewall nat-snat
FortiADC-VM (nat-snat) # edit fw-snat-example
Add new entry 'fw-snat-example' for node 1941
38 FortiADC CLI Reference
Fortinet Technologies, Inc.
config firewall policy config firewall
from : 0.0.0.0/0
to : 192.0.2.0/24
out-interface : port5
trans-to-type : ip
trans-to-ip : 192.0.2.10
traffic-group :
status : enable
Use this command to configure firewall policy rules for IPv4 addresses.
A firewall policy is a filter that allows or denies traffic to be forwarded to the system based on a matching tuple:
source address, destination address, and service. By default, firewall policy rules are stateful: if client-to-server
traffic is allowed, the session is maintained in a state table, and the response traffic is allowed.
The FortiADC system evaluates firewall policies before other rules. It matches traffic against the firewall policy
table, beginning with the first rule. If a rule matches, the specified action is taken. If the session is denied by a
firewall policy rule, it is dropped. If the session is accepted, system processing continues.
By default, if firewall rules are not configured, the system does not perform firewall processing; all traffic is
processed as if the system were a router, and traffic is forwarded according to routing and other system rules.
Note: You do not need to create firewall rules for routine management traffic associated with the management
port or HA ports. The interface “allow access” option enables permitted protocols. The system automatically
permits from-self traffic, such as health check traffic, and expected responses.
Syntax
config firewall policy
set default-action {deny|accept}
set stateful {enable|disable}
config rule
edit <name>
set action {deny | accept}
set destination-address <datasource>
set in-interface <datasource>
set out-interface <datasource>
set service <datasource>
set source-address <datasource>
set status {enable | disable}
next
end
end
FortiADC Handbook 39
Fortinet Technologies, Inc.
config firewall config firewall policy
config rule
Example
FortiADC-VM # config firewall policy
FortiADC-VM (policy) # set default-action deny
FortiADC-VM (policy) # config rule
FortiADC-VM (rule) # edit fw-allow-http
Add new entry 'fw-allow-http' for node 1871
40 FortiADC CLI Reference
Fortinet Technologies, Inc.
config firewall policy6 config firewall
in-interface : port4
out-interface : port5
source-address : fw-source-addr1
destination-address : fw-dest-addr1
service : fw-http
status : enable
action : accept
Use this command to configure firewall policy rules for IPv6 addresses.
A firewall policy is a filter that allows or denies traffic to be forwarded to the system based on a matching tuple:
source address, destination address, and service. By default, firewall policy rules are stateful: if client-to-server
traffic is allowed, the session is maintained in a state table, and the response traffic is allowed.
The FortiADC system evaluates firewall policies before other rules. It matches traffic against the firewall policy
table, beginning with the first rule. If a rule matches, the specified action is taken. If the session is denied by a
firewall policy rule, it is dropped. If the session is accepted, system processing continues.
By default, if firewall rules are not configured, the system does not perform firewall processing; all traffic is
processed as if the system were a router, and traffic is forwarded according to routing and other system rules.
Note: You do not need to create firewall rules for routine management traffic associated with the management
port or HA ports. The interface “allow access” option enables permitted protocols. The system automatically
permits from-self traffic, such as health check traffic, and expected responses.
Syntax
config firewall policy6
set default-action {deny|accept}
set stateful {enable|disable}
config rule
edit <name>
set action {deny | accept}
set destination-address6 <datasource>
set in-interface <datasource>
set out-interface <datasource>
set service <datasource>
set source-address6 <datasource>
set status {enable | disable}
next
end
end
FortiADC Handbook 41
Fortinet Technologies, Inc.
config firewall config firewall qos-filter
config rule
A QoS filter is the policy that assigns traffic to the QoS queue.
Note: The QoS policy feature is not supported for traffic to virtual servers.
Before you begin:
l You must have a good understanding and knowledge of traffic in your network that requires QoS provisioning.
l You must have created the address configuration objects and service configuration objects that define the matching
tuple for QoS rules.
l You must have created a QoS queue configuration object.
l You must have read-write permission for firewall settings.
Syntax
config firewall qos-filter
edit <name>
set destination-address <datasource>
set in-interface <datasource>
set out-interface <datasource>
42 FortiADC CLI Reference
Fortinet Technologies, Inc.
config firewall qos-filter config firewall
queue QoS queue that will be used for packets that match the filter criteria.
Example
FortiADC-VM # config firewall qos-filter
FortiADC Handbook 43
Fortinet Technologies, Inc.
config firewall config firewall qos-filter6
A QoS filter is the policy that assigns traffic to the QoS queue.
Note: The QoS policy feature is not supported for traffic to virtual servers.
Before you begin:
l You must have a good understanding and knowledge of traffic in your network that requires QoS provisioning.
l You must have created the address configuration objects and service configuration objects that define the matching
tuple for QoS rules.
l You must have created a QoS queue configuration object.
l You must have read-write permission for firewall settings.
Syntax
config firewall qos-filter6
edit <name>
set destination-address6 <datasource>
set in-interface <datasource>
set out-interface <datasource>
set queue <datasource>
set service <datasource>
set source-address6 <datasource>
set status {enable|disable}
next
end
queue QoS queue that will be used for packets that match the filter criteria.
44 FortiADC CLI Reference
Fortinet Technologies, Inc.
config firewall vip config firewall
You can use QoS policies to provision bandwidth for any traffic that matches the rule. You might consider QoS
policies for latency- or bandwidth-sensitive services, such as VoIP and ICMP.
The FortiADC system does not provision bandwidth based on the TOS bits (also called differentiated services) in
the IP header to control packet queueing. Instead, the system provisions bandwidth based on a
source/destination/service matching tuple that you specify.
Note: The QoS policy feature is not supported for traffic to virtual servers.
Basic steps
1. Configure a queue.
2. Configure a QoS filter.
Before you begin:
Syntax
config firewall qos-queue
edit <name>
set bandwidth <digit>[G|M|K]
next
end
bandwidth Maximum bandwidth rate. Specify a number and a unit abbreviation. For example,
specify 100K for 100 Kbps, 10M for 10 Mbps, and 1G for 1Gbps.
Example
The following commands configure a firewall policy rule:
FortiADC-VM # config firewall qos-queue
You can use 1-to-1 NAT when you want to publish public or “external” IP addresses for FortiADC resources but
want the communication among servers on the internal network to be on a private or “internal” IP address range.
FortiADC Handbook 45
Fortinet Technologies, Inc.
config firewall config firewall vip
1-to-1 NAT is supported for traffic to virtual servers. The address translation occurs before the ADC has processed
its rules, so FortiADC server load balancing policies that match source address (such as content routing and
content rewriting rules) should be based on the mapped address space.
The system maintains this NAT table and performs the inverse mapping when it sends traffic from the internal
side to the external side.
Syntax
config firewall vip
edit <name>
set extif <datasource>
set extip <class_ip>
set extport <integer>
set mappedip-min <class_ip>
set mappedip-max <class_ip>
set mappedport-min <integer>
set mappedport-max <integer>
set portforward {enable | disable}
set protocol {tcp | udp}
set status {enable | disable}
set traffic-group <datasource>
next
end
extip Specify the first address in the range. The last address is calculated after you
enter the mapped IP range.
extport Specify the first port number in the range. The last port number is calculated after
you enter the mapped port range.
46 FortiADC CLI Reference
Fortinet Technologies, Inc.
config firewall vip config firewall
Example
FortiADC-VM # config firewall vip
FortiADC-VM (vip) # edit 1-to-1-NAT
Add new entry '1-to-1-NAT' for node 661
FortiADC Handbook 47
Fortinet Technologies, Inc.
config global
config global
The config global command is applicable to VDOMs and visible only to super admin users. See Appendix
A: Virtual domains for information about special VDOM commands.
48 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-dns-server config global-dns-server address-group
config global-dns-server
The config global-dns-server commands configure the DNS server used in global load balancing.
Use this command to configure the source and destination IP addresses that are the matching criteria for DNS
policies. The system includes the predefined address groups any and none.
l You must have read-write permission for global load balancing settings.
After you have configured an address group, you can specify it in the DNS64 and DNS policy configurations.
Syntax
config global-dns-server address-group
edit <name>
config member
edit <No.>
set action {include|exclude}
set addr-type {ipv4|ipv6}
set ip-network <ip&netmask>
set ip6-network <ip&netmask>
next
end
next
end
action l include—The rule logic creates an address object that includes addresses matching the
specified address block.
l exclude—The rule logic creates an address object that excludes addresses matching the
specified address block.
49 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-dns-server address-group config global-dns-server
Create objects to match source IPv4 address and different objects to match
destination IPv4 address.
ip6-network Address/mask notation to match the IPv6 address in the packet header.
Create objects to match source IPv6 address and different objects to match
destination IPv6 address.
Example
FortiADC-VM # config global-dns-server address-group
FortiADC-VM (address-group) # edit campus
Add new entry 'campus' for node 2206
FortiADC Handbook 50
Fortinet Technologies, Inc.
config global-dns-server config global-dns-server dns64
next
end
next
end
Use this command to map IPv4 addresses to AAAA queries when there are no AAAA records. This feature is
optional. It can be used in network segments that use NAT64 to support IPv6 client communication with IPv4
backend servers.
l You must have a good understanding of DNS and knowledge of the DNS deployment in your network.
l You must have configured address objects that specify the network segments for which the DNS64 map applies.
l You must have read-write permission for global load balancing settings.
After you have created a DNS64 configuration, you can specify it in a DNS policy configuration.
Syntax
config global-dns-server dns64
edit <name>
set exclude {any | none | <datasource>}
set mapped-address {any | none | <datasource>}
prefix6 <ip&netmask>
source-address {any | none | <datasource>}
next
end
exclude Specify a wildcard (any or none) or an address object. Allows specification of a list
of IPv6 addresses that can be ignored. Typically, you exclude addresses that do
have AAAA records.
mapped- Address object that specifies the IPv4 addresses that are to be mapped in the
address corresponding A RR set.
prefix6 IP address and netmask that specify the DNS64 prefix. Compatible IPv6 prefixes
have lengths of 32, 40, 48, 56, 64 and 96 as per RFC 6052.
Each DNS64 configuration has one prefix. Multiple configurations can be defined.
source-address Specify an address object. Only clients that match the source IP use the DNS64
lookup table.
Example
FortiADC-VM # config global-dns-server dns64
FortiADC-VM (dns64) # edit 1
Add new entry '1' for node 2289
51 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-dns-server dsset-info-list config global-dns-server
Use this command to paste in the content of the DSSET files provided by child domain servers or stub domains.
If you enable DNSSEC, secure communication between the FortiADC DNS server and any child DNS servers is
based on keys contained in delegation signer files (DSSET files). In DNSSEC deployments, DSSET files are
generated automatically when the zone is signed by DNSSEC.
Note: You use the Global DNS zone configuration to generate the DSSET file for this server. The file generated
by the zone configuration editor is the one you give to any parent zone or the registrar of your domain.
l You must have a good understanding of DNSSEC and knowledge of the DNS deployment in your network.
l You must have used DNSSEC to sign the child domain servers and have downloaded the DSset files to a location
you can reach from your management computer.
l You must have read-write permission for global load balancing settings.
Syntax
config global-dns-server dsset-info-list
edit <name>
set filename <string>
set content <string>
next
end
filename Specify the filename. The convention is dsset-<domain>, for example, dsset-
example.com.
FortiADC Handbook 52
Fortinet Technologies, Inc.
config global-dns-server config global-dns-server general
content Specify (paste) the DSset file content. The content of DSset files is similar to the
following:
dns.example.com. IN DS 13447 5 1
A5AD9EFB6840F58CF817F3CC7C24A7ED2DD5559C
Use this command to configure basic behavior for the DNS server.
The general settings configuration specifies the interfaces that listen for DNS requests. By default, the system
listens on the IPv4 and IPv6 addresses of all configured interfaces for DNS requests.
The other settings in the general settings configuration are applied when traffic does not match a Global DNS
policy.
l You must have a good understanding of DNS and knowledge of the DNS deployment in your network.
l You must have read-write permission for global load balancing settings.
Syntax
config global-dns-server general
set dnssec-status {enable|disable}
set dnssec-validate-status {enable|disable}
set forward {first | only}
set forwarders <datasource>
set gds-status {enable|disable}
set ipv4-accessed-status {enable|disable}
set ipv6-accessed-status {enable|disable}
set listen-on-all-interface {enable|disable}
set listen-on-interface <datasource>
set recursion-status {enable|disable}
set response-rate-limit <datasource>
set traffic-log {enable|disable}
set use-system-dns-server {enable|disable}
end
forward l first—The DNS server queries the forwarder before doing its own DNS
lookup.
l only—Only queries the forwarder. Does not perform its own DNS
lookups.
forwarders If the DNS server zone has been configured as a forwarder, specify the
remote DNS server to which it forwards requests.
53 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-dns-server policy config global-dns-server
listen-on-interface If you do not listen on all interfaces, select one or more ports to listen
on.
use-system-dns-server Forward DNS requests to the system DNS server instead of the
forwarder.
Example
FortiADC-VM # config global-dns-server general
Use this command to configure a rulebase that matches traffic to DNS zones.
FortiADC Handbook 54
Fortinet Technologies, Inc.
config global-dns-server config global-dns-server policy
Traffic that matches both source and destination criteria is served by the policy. Traffic that does not match any
policy is served by the DNS “general settings” configuration.
l You must have a good understanding of DNS and knowledge of the DNS deployment in your network.
l You must have configured address objects, remote servers, DNS zones, and optional configuration objects you
want to specify in your policy.
l You must have read-write permission for global load balancing settings.
Syntax
config global-dns-server policy
edit <name>
set destination-address <datasource>
set dns64-list {<datasource> ...}
set dnssec-status {enable|disable}
set dnssec-validate-status {enable|disable}
set forward {first | only}
set forwarders <datasource>
set recursion-status {enable|disable}
set response-rate-limit <datasource>
set source-address <datasource>
set zone-list {<datasource> ...}
next
end
dns64-list Specify one or more DNS64 configurations to use when resolving IPv6
requests.
forward l first—The DNS server queries the forwarder before doing its own DNS
lookup.
l only—Only queries the forwarder. Does not perform its own DNS lookups.
forwarders If the DNS server zone has been configured as a forwarder, specify the
remote DNS servers to which it forwards requests.
55 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-dns-server policy config global-dns-server
zone-list Specify one or more zone configurations to serve DNS requests from
matching traffic.
Example
FortiADC-VM (policy) # edit lan_policy
Add new entry 'lan_policy' for node 2236
FortiADC Handbook 56
Fortinet Technologies, Inc.
config global-dns-server config global-dns-server remote-dns-server
response-rate-limit :
DNS forwarders are commonly used when you do not want the local DNS server to connect to Internet DNS
servers. For example, if the local DNS server is behind a firewall and you do not want to allow DNS through that
firewall, you implement DNS forwarding to a remote server that is deployed in a DMZ or similar network region
that can contact Internet DNS servers.
l You must have a good understanding of DNS and knowledge of the remote DNS servers that can be used to
communicate with Internet domain servers.
l You must have read-write permission for global load balancing settings.
After you have configured a remote DNS server, you can select it in the DNS zone and DNS policy configurations.
Syntax
config global-dns-server remote-dns-server
edit <name>
config member
edit <No.>
set addr-type {ipv4|ipv6}
set ip <class_ip>
set ip6 <class_ip>
set port <integer>
next
end
next
end
port Port number the remote server uses for DNS. The default is 53.
Example
FortiADC-VM # config global-dns-server remote-dns-server
FortiADC-VM (remote-dns-ser~e) # edit google.com
Add new entry 'google.com' for node 2329
57 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-dns-server response-rate-limit config global-dns-server
Use this command to configure response rate limit objects that you specify in the DNS policy and DNS general
configurations.
The response rate limit keeps the FortiADC authoritative DNS server from being used in amplifying reflection
denial of service (DoS) attacks.
Syntax
config global-dns-server response-rate-limit
edit <name>
set per-second <integer>
next
end
per-second Maximum number of responses per second. The valid range is 1-2040. The default is
1000.
Example
FortiADC-VM # config global-dns-server response-rate-limit
FortiADC-VM (response-rate-~i) # edit gdns-rl-1
Add new entry 'gdns-rl-1' for node 2313
FortiADC-VM (gdns-rl-1) # end
FortiADC Handbook 58
Fortinet Technologies, Inc.
config global-dns-server config global-dns-server trust-anchor-key
Use this command to change the trust anchor key (if necessary).
DNSSEC validation requires that a DNS name server know the trust anchor key for the root DNS domain in order
to validate already signed responses. In general, trust anchor keys do not change often, but they do change
occasionally, and might change unexpectedly in the event the keys are compromised.
The FortiADC DNS server is preconfigured with a trust anchor key for the root DNS domain. If you are informed
that you must update this key, you can use the configuration editor to paste the new content into the DNS server
configuration.
Further reading:
http://data.iana.org/root-anchors/draft-icann-dnssec-trust-anchor.html
Before you begin:
l You must have a good understanding of DNSSEC and knowledge of the DNS deployment in your network.
l You must have already obtained the key so that you can copy and paste it into the DNS server configuration.
l You must have read-write permission for global load balancing settings.
Syntax
config global-dns-server trust-anchor-key
edit <name>
set value <string>
set description <string>
next
end
value The key value. The key format is a string with the following format:
\"<domainname>\" <num1> <num2> <num3> \"<content>\"
The following is an example:
\".\" 256 3 5
\"AwEAAbDrWmiIReotvZ6FObgKygZwUxSUJW9z5pjiQMLH0JBGXooHrR1
6 pdKhI9mNkM8bLUMtwYfgeUOYXIvfagee8rk=\"
Example
FortiADC-VM # config global-dns-server trust-anchor-key
FortiADC-VM (trust-anchor-key) # edit sss
Add new entry 'sss' for node 2240
59 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-dns-server zone config global-dns-server
The DNS zone configuration is the key to the global load balancing solution. This configuration contains the key
DNS server settings, including:
l You must have a good understanding of DNS and knowledge of the DNS deployment in your network.
l You must have authority to create authoritative DNS zone records for your network.
l You must have read-write permission for global load balancing settings.
After you have configured a DNS zone, you can select it in the DNS policy configuration.
Syntax
config global-dns-server zone
edit <name>
set type {forward|fqdn-generate|master}
set domain-name <string>
set negative-ttl <integer>
set primary-server-ip <class_ip>
set primary-server-ip6 <class_ip>
set primary-server-name <string>
set responsible-mail <string>
set ttl <integer>
set forward {first | only}
set forwarders <datasource>
set dnssec-status {enable|disable}
set dnssec-algorithm RSASHA1
set dsset-info <string>
set dssetinfo-filename <string>
set dsset-info-list <datasource>
set KSK <string>
set KSK-Filename <string>
set ZSK <string>
set ZSK-Filename <string>
FortiADC Handbook 60
Fortinet Technologies, Inc.
config global-dns-server config global-dns-server zone
config a-aaaa-record
edit <No.>
set hostname <string>
set source-type {ipv4 | ipv6}
set ip <class_ip>
set ip6 <class_ip>
set method wrr
set weight <integer>
next
end
config cname-record
edit <No.>
set alias <string>
set target <string>
next
end
config mx-record
edit <No.>
set domain-name <string>
set hostname <string>
set type {ipv4|ipv6}
set ip <class_ip>
set ip6 <class_ip>
set priority <integer>
next
end
config ns-record
edit <No.>
set domain-name <string>
set host-name <string>
set type {ipv4|ipv6}
set ip <class_ip>
set ip6 <class_ip>
next
end
config txt-record
edit <No.>
set name <string>
set text <name>=<value>,<name>=<value>
next
end
config srv-record
edit 1
set hostname 222
set target-server 222
next
end
config ptr-record
edit <No.>
set ptr-address <string>
set fqdn <string>
next
end
next
end
61 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-dns-server zone config global-dns-server
domain-name The domain name must end with a period. For example: example.com.
negative-ttl The last field in the SOA—the negative caching TTL. This informs other servers
how long to cache no-such-domain (NXDOMAIN) responses from you. The
default is 3600 seconds. The valid range is 0 to 2,147,483,647.
responsible-mail Username of the person responsible for this zone, such as root.
ttl The $TTL directive at the top of the zone file (before the SOA) gives a
default TTL for every RR without a specific TTL set.
forward l first—The DNS server queries the forwarder before doing its own DNS lookup.
l only—Only query the forwarder. Do not perform a DNS lookup.
dssetinfo-filename The file is generated by the system if DNSSEC is enabled for the zone. The
file generated by the zone configuration editor is the one you give to any
parent zone or the registrar of your domain.
FortiADC Handbook 62
Fortinet Technologies, Inc.
config global-dns-server config global-dns-server zone
KSK Type characters for a string key. The file is generated by the system if
DNSSEC is enabled for the zone.
KSK-Filename The file is generated by the system if DNSSEC is enabled for the zone.
ZSK Type characters for a string key. The file is generated by the system if
DNSSEC is enabled for the zone.
ZSK-Filename The file is generated by the system if DNSSEC is enabled for the zone.
config a-aaaa-record
Note:
l You can specify the @ symbol to denote the zone root. The value
substituted for @ is the preceding $ORIGIN directive.
l A hostname can contain alphanumeric characters such as a–z, A–Z,
and 0–9, but must NOT end with - (hyphen) or . (period).
l You can also use * (wild card) in a domain name.
config cname-record
alias An alias name to another true or canonical domain name (the target). For
instance, www.example.com is an alias for example.com.
config mx-record
hostname The hostname part of the FQDN for a mail exchange server, such as mail.
63 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-dns-server zone config global-dns-server
priority Preference given to this RR among others at the same owner. Lower values
have greater priority.
config ns-record
domain-name The domain for which the name server has authoritative answers, such as
example.com.
config txt-record
name Hostname.
TXT records are name-value pairs that contain human readable information
about a host. The most common use for TXT records is to store SPF
records.
If you complete the entry from the CLI, put the string in quotes. (If you
complete the entry from the the Web UI, you do not put the string in
quotes.)
config srv-record
config ptr-record
FortiADC Handbook 64
Fortinet Technologies, Inc.
config global-dns-server config global-dns-server zone
If you use the number, the domain name is in the format "x.x.x.in-
addr.arpa.".
Example
FortiADC-VM # config global-dns-server zone
FortiADC-VM (zone) # edit wan-zone
Add new entry 'wan-zone' for node 2248
65 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance config global load balance analytic
config global-load-balance
The config global-load-balance commands configure the global load balancing feature settings. You
configure global load balancing settings on the FortiADC instance that hosts the DNS server that is used for
global load balancing. You do not configure these settings on the local FortiADC instances that are load
balanced.
Creates a dynamic chart visible in Fortiview that shows the status of the data-center.
Syntax
config global-load-balance analytic
edit <name>
set type <data-center/link/server/virtual-server-pool>
set data-center/link/server/virtual-server-pool <name>
set range <1DAY/1HOUR/1MONTH/1WEEK/1YEAR/6HOURS>
next
end
Example
FortiADC-VM # config global-load-balance analytic
FortiADC-VM (analytic) edit 1
Add new entry '1'
FortiADC-VM (1) # get
type :
66 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance data-center config global-load-balance
data-center :
range :
FortiADC-VM (1) # set type data-center
FortiADC-VM (1) # set data-center name1
FortiADC-VM (1) # set range 1DAY
next
end
Use this command to create data center configurations that you associate with the server configurations for local
FortiADCs. The data center configuration sets key properties: Location and/or ISP and ISP province. These
properties are keys in the global load balancing algorithm that selects the FortiADC in closest proximity to the
client.
The system includes the FortiGuard geolocation database and predefined ISP address books that you use in the
configuration.
l If you want to specify a user-defined ISP address book, you must create it before using this command.
l You must have read-write permission for global load balancing settings.
After you have created a data center configuration object, you can specify it in the global load balance servers
configuration.
Syntax
config global-load-balance data-center
edit <name>
set location <datasource>
set description <string>
next
end
Note: Starting from FortiADC 5.0.0, you are required to the country or city
code instead of the full name of the country or city.
FortiADC Handbook 67
Fortinet Technologies, Inc.
config global-load-balance config global-load-balance link
Example
FortiADC-VM # config global-load-balance data-center
FortiADC-VM (data-center) # edit dc-china
Add new entry 'dc1' for node 2836
FortiADC-VM (dc1) # get
location :
description :
FortiADC-VM (dc1) # set location CN
FortiADC-VM (dc1) # end
A link can be an access point of an ISP, and you can specify the data-center and the ISP in the link configuration.
For the gateway in config gateway, you can specify the LLB gateway of each o f the SLB devices which are
related to this link. A global load-balancing device can find out the status of the LLB link to this link according to
the gateway configuration. At the same time, the RTT detection result of the same link could be shared.
Syntax
config global-load-balance link
edit "link"
set data-center <data-center name>
set isp <isp name>
set isp-province <isp province name>
config gateway
edit 1
set server <server name>
set gateway-name <gateway>
next
edit 2
set server <server>
set gateway-name <gateway name>
next
end
next
end
68 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance servers config global-load-balance
Example
config global-load-balance link
edit "link1"
set data-center dc1
set isp china-mobile
set isp-province Henan
config gateway
edit 1
set server slb48
set gateway-name gw_81
next
edit 2
set server slb48_dris
set gateway-name gw81_dris
next
end
next
end
In the context of the global server load balance configuration, servers are the local SLB (FortiADC instances or
third-party servers) that are to be load balanced. For FortiADC instances, the GLB checks status and
synchronizes configuration from the local SLB so that it can learn the set of virtual servers that are possible to
include in the GLB virtual server pool.
Figure 1 illustrates configuration discovery. You use the execute discovery-glb-virtual-server command to
populate the virtual-server-list configuration. Placement in this list does not include them in the pool. You also
must name them explicitly in the virtual server pool configuration.
FortiADC Handbook 69
Fortinet Technologies, Inc.
config global-load-balance config global-load-balance servers
l You must have created the data center configuration objects that are associated with the local SLB.
l You must have created virtual server configurations on the local FortiADC SLB so that you can use execute
discovery-glb-virtual-server command to discover them.
l You must have read-write permission for global load balancing settings.
After you have created a server configuration object, you can specify it the global load balancing virtual server
pool configuration.
Syntax
config global-load-balance servers
edit <name>
set address-type {ipv4|ipv6}
set auth-key <string>
set auth-type <non/TCP_MD5SIG/auth_verify>
set auto-sync <enable/disable>
set data-center <datasource>
set ip <class_ip>
set port <integer>
set server-type {FortiADC-SLB|Generic-Host}
set sync-status {enable|disable}
set health-check-ctrl {enable|disable}
set health-check-list <datasource> <datasource> ...
set health-check-relation {AND|OR}
config virtual-server-list
edit <name>
set address-type {ipv4|ipv6}
set ip <class-ip>
70 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance servers config global-load-balance
auto-sync Automatic synchronization with the remote server, ennable or disable; enabled, the
virtual-server-list will synchronize automatically.
data-center Specify a data center configuration object. The data center configuration object
properties are used to establish the proximity of the servers and the client requests.
sync-status Enable/disable synchronization of the virtual server status from the local FortiADC
SLB. Disabled by default. If enabled, synchronization occurs whenever there is a
change in virtual server status.
health- If type is Generic Host, enable/disable health checks for the virtual server list. The
check- health check settings at this configuration level are the parent configuration. When
ctrl
you configure the list, you can specify whether to inherit or override the parent
configuration.
If type is FortiADC-SLB, this option is not available. Health checking is built-in, and
you can optionally configure a gateway health check.
health- l AND—All of the specified health checks must pass for the server to be considered
check- available.
relation
l OR—One of the specified health checks must pass for the server to be considered
available.
config virtual-server-list
FortiADC Handbook 71
Fortinet Technologies, Inc.
config global-load-balance config global-load-balance servers
When servers are FortiADC servers, use execute discovery-glb-virtual-server to populate the basic
virtual-server-list configuration. After it has been populated, you can add a gateway health check.
(optional).
<name> Must match the virtual server configuration name on the local FortiADC.
Specify a gateway to enable an additional health check: is the gateway beyond the
FortiADC reachable? Specify a string that matches the configuration name of a link
load balancing gateway.
health- If type is Generic Host, enable to inherit the health check settings from the parent con-
check- figuration. Disable to specify health check settings in this member configuration.
inherit
health- l AND—All of the selected health checks must pass for the server to the considered
check- available.
relation
l OR—One of the selected health checks must pass for the server to be considered
available.
Example
FortiADC-VM # config global-load-balance servers
72 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance setting config global-load-balance
FortiADC Handbook 73
Fortinet Technologies, Inc.
config global-load-balance config global-load-balance setting
Listen on interface/port
The listen port means the port used for communication for GLB and SLB server. The GLB listen port is 5858 by
default. User can change to other port from 1 to 65535.
Syntax
config global-load-balance setting
set listen-on-all-interfaces <enable/disable}
set ipv4-accessed-status <enable/disable>
set ipv6-accessed-status <enable/disable?
set port <integer>
end
port listen-on-port
Example
FortiADC-VM (setting) # get
ipv6-accessed-status: enable
ipv4-accessed-status: enable
listen-on-all-interface : enable
port : 5858
FortiADC-VM (setting) # set port 5858
FortiADC-VM (setting) # end
74 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance setting config global-load-balance
Persistence
Use this command to configure source address affinity and a timeout for GSLB persistence. You enable
persistence per host in the GSLB host configuration.
If the DNS query is for a host that has persistence enabled, the DNS server replies with an answer that has the
virtual server IP addresses listed in the order determined by the GSLB proximity algorithms, and the client source
IP address (for example 192.168.1.100) is recorded in the persistence table. If source address affinity is set to 24
bits, subsequent queries for the host from the 192.168.1.0/24 network are sent an answer with the virtual servers
listed in the same order (unless a server becomes unavailable and is therefore omitted from the answer).
Persistence is required for applications that include transactions across multiple hosts, so the persistence table is
also used for queries for other hosts with the same domain. For example, a transaction on a banking application
might include connections to login.bank.com and transfer.bank.com. To support persistence in these cases, the
GSLB persistence lookup accounts for domain as well. The first query for login.bank.com creates a mapping for
the source address network 192.168.1.0/24 and the domain bank.com. When the DNS server receives
subsequent requests, it consults the persistence table for a source network match, then a domain match and a
hostname match. In this example, as long as you have created host configurations for both login.bank.com and
transfer.bank.com, and persistence is enabled for each, the persistence table can be used to ensure the DNS
answers to queries from the same network list the resource records in the same order.
l You must have read-write permission for global load balancing settings.
Syntax
config global-load-balance setting
set persistence-mask-length <integer>
set persistence-mask-length6 <integer>
set persistence-timeout <integer>
end
persistence-mask-length Number of IPv4 netmask bits that define network affinity for the per-
sistence table. The default is 24.
persistence-mask-length6 Number of IPv6 netmask bits that define network affinity for the per-
sistence table. The default is 64.
persistence-timeout This setting specifies the length of time in seconds for which the entry is
maintained in the persistence table. The default is 86400. The valid range
is 60-2,592,000 seconds.
Example
FortiADC-docs # config global-load-balance setting
FortiADC-docs (setting) # get
password : *
proximity-detect-protocol : icmp
proximity-detect-retry-count : 3
proximity-cache-mask-length : 24
proximity-cache-mask-length6 : 64
proximity-detect-interval : 3
FortiADC Handbook 75
Fortinet Technologies, Inc.
config global-load-balance config global-load-balance setting
proximity-cache-aging-period : 86400
persistence-mask-length : 24
persistence-mask-length6 : 64
persistence-timeout : 60
FortiADC-docs (setting) # set persistence-mask-length 24
FortiADC-docs (setting) # set persistence-mask-length6 64
FortiADC-docs (setting) # set persistence-timeout 60
FortiADC-docs (setting) # end
Proximity
Use this command to configure dynamic proximity. Dynamic proximity is used to order DNS lookup results based
on the shortest application response time (RTT) for ICMP or TCP probes sent by the local SLB to the DNS
resolver that sent the DNS request.
The system caches the RTT results for the period specified by the timeout. When there are subsequent requests
from clients that have a source IP address within the same network (as specified by the netmask affinity), the
RTT is taken from the results table instead of a new, real-time probe. This reduces response time.
l You must have read-write permission for global load balancing settings.
The settings you configure are applied if the dynamic-proximity RTT option is enabled in the virtual server pool
configuration.
Syntax
config global-load-balance setting
set proximity-cache-aging-period <integer>
set proximity-cache-mask-length <integer>
set proximity-cache-mask-length6 <integer>
set proximity-detect-interval <integer>
set proximity-detect-protocol {icmp|icmp-and-tcp}
set proximity-detect-retry-count <integer>
end
proximity-cache-aging- RTT results are cached. This setting specifies the length of time in seconds
period for which the RTT cache entry is valid. The default is 86400. The valid
range is 60-2,592,000 seconds.
proximity-cache-mask- Number of IPv4 netmask bits that define network affinity for the RTT table.
length The default is 24. For example, if the GLB records an RTT for a client with
source IP address 192.168.1.100, the record is stored and applies to all
requests from the 192.168.1.0/24 network.
proximity-cache-mask- Number of IPv6 netmask bits that define network affinity for the RTT table.
length6 The default is 64.
proximity-detect- Interval between retries if the probe fails. The default is 3. The valid range
interval is 1-3600 seconds.
proximity-detect- l icmp
protocol
l icmp-and-tcp
76 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance setting config global-load-balance
proximity-detect-retry- Retry count if the probe fails. The default is 3. The valid range is 1-10
count times.
Example
FortiADC-docs # config global-load-balance setting
FortiADC-docs (setting) # get
password : *
proximity-detect-protocol : icmp
proximity-detect-retry-count : 3
proximity-cache-mask-length : 24
proximity-cache-mask-length6 : 64
proximity-detect-interval : 3
proximity-cache-aging-period : 86400
persistence-mask-length : 24
persistence-mask-length6 : 64
persistence-timeout : 60
FortiADC-docs (setting) # set proximity-detect-protocol icmp
FortiADC-docs (setting) # set proximity-detect-retry-count 2
FortiADC-docs (setting) # set proximity-cache-mask-length 24
FortiADC-docs (setting) # set proximity-cache-mask-length6 64
FortiADC-docs (setting) # set proximity-detect-interval 2
FortiADC-docs (setting) # set proximity-cache-aging-period 200
FortiADC-docs (setting) # end
Password
Use this command to set a password. This password is used for authentication between the GLB and the server.
The same password must be set on both, otherwise the two will not be able to sync.
l You must have read-write permission for global load balancing settings.
Syntax
config global-load-balance setting
set auth-type <none/TCP_MD5SIG/auth_verify>
set password <string>
end
l none
l TCP_MD5SIG
l auth_verify
FortiADC Handbook 77
Fortinet Technologies, Inc.
config global-load-balance config global-load-balance topology
Example
FortiADC-docs # config global-load-balance setting
FortiADC-docs (setting) # get
password : *
proximity-detect-protocol : icmp
proximity-detect-retry-count : 3
proximity-cache-mask-length : 24
proximity-cache-mask-length6 : 64
proximity-detect-interval : 3
proximity-cache-aging-period : 86400
persistence-mask-length : 24
persistence-mask-length6 : 64
persistence-timeout : 60
set auth-type TCP_MD5SIG
FortiADC-docs (setting) #set password *
FortiADC-docs (setting) # end
Use this command to edit the member location list. This location is used when a vitual server pool is added to the
host.
Starting from FortiADC 5.x.x, you can specify one location list as "any" to indicate any country other than the one
that is already specified if you use DNS query origin method in a host.
Syntax
config global-load-balance host
edit <No.>
set member <country or city>
next
end
Example
FortiADC-VM # config global-load-balance topology
FortiADC-VM (topology) # edit "1"
FortiADC-VM (1) # set member CN11
FortiADC-VM (1) # next
FortiADC-VM (topology) # end
Note: Starting from FortiADC 5.x.x, you must use country or city code to indicate a country or city. In the example
above, "CN11" stands for "China, Beijing".
78 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance virtual-server-pool config global-load-balance
The virtual server pool configuration defines the set of virtual servers that can be matched in DNS resource
records, so it should include, for example, all the virtual servers that can be answers for DNS requests to resolve
www.example.com.
You also specify the key parameters of the global load balancing algorithm, including proximity options, status
checking options, load balancing method, and weight.
The DNS response is an ordered list of answers. Virtual servers that are unavailable are excluded. Available
virtual servers are ordered based on the following priorities:
1. Geographic proximity
2. Dynamic proximity
3. Weighted round robin
A client that receives DNS response with a list of answers tries the first and only proceeds to the next answers if
the first answer is unreachable.
l You must have created the global load balance server configuration and you must know the names of the virtual
servers that have been populated in that configuration.
l You must have read-write permission for global load balancing settings.
After you have created a virtual server pool configuration object, you can specify it global load balancing host
configuration.
Syntax
config global-load-balance virtual-server-pool
edit <name>
set check-server-status {enable|disable}
set check-virtual-server-existence {enable|disable}
set preferred {None | GEO | GEO-ISP | RTT | Least-Connections | Connection-Limit |
Bytes-Per-Second}
set alternate {None | GEO | GEO-ISP | RTT | Least-Connections | Connection-Limit |
Bytes-Per-Second}
set load-balance-method wrr
config member
edit <No.>
set backup {enable|disable}
set server <datasource>
set server-member-name <string>
set weight <integer>
next
end
next
end
FortiADC Handbook 79
Fortinet Technologies, Inc.
config global-load-balance config global-load-balance virtual-server-pool
end
preferred The preferred schedule method for this virtual server pool.
alternate The alternate schedule method for this virtual server pool.
preferred Bytes-Per-Second If the BPS method is used, the virtual server with the least
throughput should be the answer responded by GLB.
config member
server-member-name Specify the name of the virtual server that is in the servers
virtual server list configuration.
80 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance host config global-load-balance
Example
FortiADC-VM # config global-load-balance virtual-server-pool
FortiADC-VM (virtual-server~p) # edit pool_test
Add new entry 'pool_test' for node 2858
FortiADC-VM (pool_test) # get
preferred : NONE
check-server-status : disable
check-virtual-server-existence: disable
load-balance-method : wrr
FortiADC-VM (pool_test) # set preferred GEO-ISP
FortiADC-VM (pool_test) # config member
FortiADC-VM (member) # edit 1
Add new entry '1' for node 2864
FortiADC-VM (1) # get
server :
server-member-name :
weight : 1
backup : disable
FortiADC-VM (1) # set server neighbor1
FortiADC-VM (1) # set server-member-name vs-1
FortiADC-VM (1) # set weight 2
FortiADC-VM (1) # next
FortiADC-VM (member) # edit 2
Add new entry '2' for node 2864
FortiADC-VM (2) # set server neighbor1
FortiADC-VM (2) # set server-member-name vs-2
FortiADC-VM (2) # next
FortiADC-VM (member) # edit 3
Add new entry '3' for node 2864
FortiADC-VM (3) # set server neighbor2
FortiADC-VM (3) # set server-member-name vs-3
FortiADC-VM (3) # set weight 2
FortiADC-VM (3) # next
FortiADC-VM (member) # edit 4
Add new entry '4' for node 2864
FortiADC-VM (4) # set server neighbor2
FortiADC-VM (4) # set server-member-name vs-4
FortiADC-VM (4) # end
FortiADC-VM (pool_test) # end
Use this command to create host configurations. Host settings are used to form the zone configuration and
resource records in the generated DNS zone used for global load balancing.
FortiADC Handbook 81
Fortinet Technologies, Inc.
config global-load-balance config global-load-balance host
l You must have created the global virtual server pools you want to use.
l You must have read-write permission for global load balancing settings.
After you have created a host configuration object, it can be used to form the zone and resource records in the
generated DNS zone configuration.
Syntax
config global-load-balance host
edit <name>
set domain-name <string>
set host-name <string>
set response-single-record {enable|disable}
set persistence {enable|disable}
set default-feedback-ip <ip>
set default-feedback-ip6 <ip>
set load-balance-method {global availability|none|topology}
config virtual-server-pool-list
edit <No.>
set virtual-server-pool <string>
next
end
next
end
domain-name The domain name must end with a period. For example: example.com.
Note: You can specify the @ symbol to denote the zone root. The value
substituted for @ is the preceding $ORIGIN directive.
respond-single- Enable/disable an option to send only the top record in response to a query. Dis-
record abled by default. By default, the response is an ordered list of records.
default-feedback-ip Specify an IP address to return in the DNS answer if no virtual servers are
available.
default-feedback- Specify an IPv6 address to return in the DNS answer if no virtual servers are
ip6 available.
load-balance-method Specify a virtual server pool selection method. Set to "weight" by default.
82 FortiADC CLI Reference
Fortinet Technologies, Inc.
config global-load-balance host config global-load-balance
virtual-server-pool Specify a virtual server pool configuration object to host, i.e., a virtual server
pool name, location list (optional), and/or ISP (optional).
Example
FortiADC-VM # config global-load-balance host
FortiADC-VM (host) # edit www_fadc_com
Add new entry 'www_fadc_com' for node 2869
FortiADC-VM (www_fadc_com) # get
host-name :
domain-name :
respond-single-record : disable
persistence : disable
load-balance-method : weight
default-feedback-ip : 0.0.0.0
default-feedback-ip6 : ::
FortiADC-VM (www_fadc_com) # set host-name www
FortiADC-VM (www_fadc_com) # set domain-name fadc.com
FortiADC-VM (www_fadc_com) # config virtual-server-pool-list
FortiADC-VM (virtual-server~p) # edit "1"
FortiADC-VM (1) # set virtual-server-pool test
FortiADC-VM (1) # next
FortiADC-VM (virtual-server~p) # end
FortiADC-VM (www_fadc_com) # end
FortiADC Handbook 83
Fortinet Technologies, Inc.
config link-load-balance config link-load-balance flow-policy
config link-load-balance
The config link-load-balance commands configure the link load balancing feature settings.
A link policy matches traffic to rules that select a link group or virtual tunnel.
The policy uses a matching tuple: source, destination, service, and schedule. The policy match is a Boolean
AND—All must match for the rule to be applied.
The elements of the tuple support specification by group objects. This is a Boolean OR—If source IP address
belongs to member 1 OR member 2, then source matches.
The logical combinations enable you to subscribe multiple address spaces or services to a group of links, and
create load balancing rules on that group basis.
The policy table is consulted from top to bottom. The first rule to match is applied.
The FortiADC system evaluates traffic to determine the routing rules to apply.
With regard to link load balancing, the system evaluates rules in the following
order and applies the first match:
1. LLB link policy
2. Policy route
3. Static/Dynamic route
4. LLB default link group
l You must have configured any address, service, and schedule objects that you want to use as match criteria for your
policy.
l You must have configured a link group or virtual tunnel group.
l You must have read-write permission for link load balancing settings.
84 FortiADC CLI Reference
Fortinet Technologies, Inc.
config link-load-balance flow-policy config link-load-balance
Syntax
config link-load-balance flow-policy
set default-link-group <datasource>
config rule
edit <name>
set group-type {link-group | virtual-tunnel}
set link-group <datasource>
set virtual-tunnel <datasource>
set destination-type {address|addrgrp|isp}
set destination-address <datasource>
set destination-addrgrp <datasource>
set destination-isp <datasource>
set in-interface <datasource>
set schedule <datasource>
set service-type {service|servicegrp}
set service <datasource>
set servicegrp <datasource>
set source-type {address|addrgrp|isp}
set source-address <datasource>
set source-addrgrp <datasource>
set source-isp <datasource>
next
end
default-link-group Specify a link group configuration object that is used as the default when
traffic does not match policy rules.
config rule
link-group If you specify the link group type, specify a link group configuration object.
virtual-tunnel If you specify the virtual tunnel group type, specify a virtual tunnel
configuration object.
destination-type Specify whether to use address, address group, or ISP address objects for this
rule.
FortiADC Handbook 85
Fortinet Technologies, Inc.
config link-load-balance config link-load-balance flow-policy
schedule Specify the schedule object that determines the times the system uses the
logic of this configuration. The link policy is active when the current time
falls in a time period specified by one or more schedules in the schedule
group. If you do not specify a schedule, the rule applies at all times.
service-type Specify whether to use service or service group objects for this rule.
service Specify a service object to match destination services. If you do not specify
a service, the rule matches any service.
servicegrp Specify a service group object to match destination services. If you do not
specify a service, the rule matches any service.
source-type Specify whether to use address, address group, or ISP address objects for this
rule.
source-address Specify an address object to match source addresses. If you do not specify
a source address, the rule matches any source address.
source-addrgrp Specify an address object to match source addresses. If you do not specify a
source address, the rule matches any source address.
source-isp Specify an address object to match source addresses. If you do not specify a
source address, the rule matches any source address.
Example
FortiADC-docs # config link-load-balance flow-policy
86 FortiADC CLI Reference
Fortinet Technologies, Inc.
config link-load-balance gateway config link-load-balance
The gateway link configuration enables you to specify health checks, bandwidth rate thresholds, and spillover
threshold behavior for the gateway links you add to link groups.
l You must know the IP addresses of the ISP gateway link used in the network segment where the FortiADC
appliance is deployed.
l You must have added health check configuration objects that you want to use to probe the gateway links.
l You must have read-write permission for link load balancing settings.
After you have configured a gateway link configuration object, you can select it in the link group configuration.
Syntax
config link-load-balance gateway
edit <name>
set health-check-ctrl {enable|disable}
set health-check-list {<datasource> ...}
set health-check-relation {AND|OR}
set inbound-bandwidth <integer>
set ip <class_ip>
set outbound-bandwidth <integer>
set spillover-threshold-in <integer>
set spillover-threshold-out <integer>
set spillover-threshold-total <integer>
next
end
health-check-relation l AND—All of the specified health checks must pass for the server to the
considered available.
l OR—One of the specified health checks must pass for the server to be
considered available.
inbound-bandwidth Maximum bandwidth rate for inbound traffic through this gateway
link.
FortiADC Handbook 87
Fortinet Technologies, Inc.
config link-load-balance config link-load-balance gateway
outbound-bandwidth Maximum bandwidth rate for outbound traffic to this gateway link. If
traffic exceeds this threshold, the FortiADC system considers the
gateway to be full and does not dispatch new connections to it.
spillover-threshold- Maximum total bandwidth rate (inbound plus outbound) for a link in a
total spillover load balancing pool.
Example
FortiADC-VM (gateway) # edit llb-gateway
Add new entry 'llb-gateway' for node 2501
FortiADC-VM (llb-gateway) # get
ip : 0.0.0.0
inbound-bandwidth : 2000000
outbound-bandwidth : 2000000
health-check-ctrl : disable
spillover-threshold-in: 2000000
spillover-threshold-out: 2000000
spillover-threshold-total: 2000000
88 FortiADC CLI Reference
Fortinet Technologies, Inc.
config link-load-balance link-group config link-load-balance
Link groups include ISP gateways your company uses for outbound traffic. Grouping links reduces the risk of
outages and provisions additional bandwidth to relieve potential traffic congestion.
The link group configuration specifies the load balancing algorithm and the gateway routers in the load balancing
pool. You can enable LLB options, such as persistence rules and proximity routes.
l You must have configured gateway links and persistence rules and before you can select them in the link group
configuration.
l You must have read-write permission for link load balancing settings.
After you have configured a link group configuration object, you can select it in the link policy configuration.
Syntax
config link-load-balance link-group
edit <name>
set addr-type ipv4
set persistence <datasource>
set proximity-route {enable|disable}
set route-method {consistent-hash-ip | least-connection | least-new-cps | least-
throughput-all | least-throughput-in | least-throughput-out | spillover-
throughput-all | spillover-throughput-in | spillover-throughput-out | wrr>
config link-member
edit <name>
set backup {enable|disable}
set gateway <datasource>
set spillover-priority <integer>
set status {enable|disable}
set weight <integer>
next
end
next
end
FortiADC Handbook 89
Fortinet Technologies, Inc.
config link-load-balance config link-load-balance link-group
route-method l consistent-hash-ip: Selects the gateway link based on a hash of the source IP
address.
l least-connection: Dispatches new connections to the link member with the
lowest number of connections.
l least-new-cps: Dispatches new connections to the link member that has the
lowest rate of new connections per second.
l least-throughput-all: Dispatches new connections to the link member with the
least total traffic (that is, inbound plus outbound).
l least-throughput-in: Dispatches new connections to the link member with the
least inbound traffic.
l least-throughput-out: Dispatches new connections to the link member with the
least outbound traffic.
l spillover-throughput-all: Spillover list based on total traffic (that is, inbound plus
outbound).
l spillover-throughput-in: Spillover list based on inbound traffic.
l spillover-throughput-out: Dispatches new connections according to the spillover
list based on outbound traffic.
l wrr: Dispatches new connections to link members using a weighted round-robin
method. This is the default.
backup l enable—Designate the link as a backup member of the group. All backup
members are inactive until all main members are down.
l disable—Designate the link as a main member of the group.
spillover-priority Assigns a priority to the link when using a spillover load balancing method.
Higher values have greater priority. When a spillover method is enabled, the
system dispatches new connections to the link that has the greatest spillover
priority until its threshold is exceeded; then it dispatches new connections to
the link with the next greatest priority until its threshold is exceeded, and so
on.
If multiple links in a link group have the same spillover priority, the system
dispatches new connections among those links according to round robin.
90 FortiADC CLI Reference
Fortinet Technologies, Inc.
config link-load-balance persistence config link-load-balance
All load balancing methods consider weight, except spillover, which uses its
own priority configuration. Servers are dispatched requests proportional to
their weight, relative to the sum of all weights.
Example
FortiADC-VM (link-group) # edit llb-link-group
Add new entry 'llb-link-group' for node 618
FortiADC Handbook 91
Fortinet Technologies, Inc.
config link-load-balance config link-load-balance persistence
Persistence rules identify traffic that should be ignored by load balancing rules and instead be forwarded to the
same gateway each time the traffic traverses the FortiADC appliance.
You should use persistence rules with applications that use a secure connection. Such applications drop
connections when the server detects a change in a client’s source IP address.
l You must have an awareness of the types of outbound traffic from your network. Persistence rules are useful for
traffic that requires an established session, such as secure connections (HTTPS and SSH, for example).
l You must have knowledge of the source and/or destination subnets to which the persistence rules should apply.
l You must have read-write permission for link load balancing settings.
You can use persistence rules in link groups but not virtual tunnels.
Syntax
config link-load-balance persistence
edit <name>
set timeout <integer>
set type {destination-address | source-address | source-destination-address |
source-destination-pair}
set dst-ipv4-maskbits <integer>
set src-ipv4-maskbits <integer>
next
end
dst-ipv4-maskbits Number of bits in a subnet mask to specify a network segment that should
following the persistence rule.
For example, if you set this to 24, and the system chooses a particular gateway
router for destination IP 192.168.1.100, the system will select that same
gateway for traffic to all destination IPs in subnet 192.168.1.0/24.
92 FortiADC CLI Reference
Fortinet Technologies, Inc.
config link-load-balance proximity-route config link-load-balance
src-ipv4-maskbits Number of bits in a subnet mask to specify a network segment that should
following the persistence rule.
For example, if you set this to 24, and the system chooses a particular gateway
router for client IP 192.168.1.100, the system will select that same gateway for
subsequent client requests when the subsequent client belongs to subnet
192.168.1.0/24.
Example
FortiADC-VM # config link-load-balance persistence
FortiADC-VM (persistence) # edit llb-persistence
Add new entry 'llb-persistence' for node 674
The proximity route feature enables you to associate link groups with efficient routes. Proximity routes can
improve user experience over the WAN because traffic is routed over fast routes.
l Dynamic Detection—The system polls the network for efficient routes. The algorithm selects a gateway based on
latency. When the bandwidth usage of a gateway reaches 100%, the gateway is considered too busy and is not
selected.
l Static Table—You specify the gateways to use for traffic on destination networks.
If you configure both, the system checks the static table first for a matching route and, if any, uses it. If there is no
matching static route, the system uses dynamic detection.
Note: Adding a new static route does not affect existing sessions. Deleting or editing a static route causes the
related sessions to be re-created.
l You must have knowledge of IP addresses used in outbound network routes to configure a static route.
l You must have read-write permission for link load balancing settings.
Syntax
config link-load-balance proximity-route
set mode {disable | dynamic-detect-only | static-table-first | static-table-only}
set dynamic-cache-aging-period <integer>
set dynamic-detect-protocol {icmp|icmp-and-tcp}
set dynamic-detect-retry-count <class_ip>
FortiADC Handbook 93
Fortinet Technologies, Inc.
config link-load-balance config link-load-balance proximity-route
mode l disable
l dynamic-detect-only
l static-table-first
l static-table-only
config static-table
94 FortiADC CLI Reference
Fortinet Technologies, Inc.
config link-load-balance virtual-tunnel config link-load-balance
Example
FortiADC-VM # config link-load-balance proximity-route
FortiADC-VM (proximity-route) # set mode static-table-first
Virtual tunnels enable reliable, site-to-site connectivity using Generic Routing Encapsulation (GRE) to tunnel
traffic between pairs of FortiADC appliances.
The virtual tunnel group configuration sets the list of tunnel members, as well as load balancing options like
algorithm and weight.
FortiADC Handbook 95
Fortinet Technologies, Inc.
config link-load-balance config link-load-balance virtual-tunnel
When you add members to a virtual tunnel configuration, you specify a local and remote IP address. These
addresses are IP addresses assigned to a network interface on the local and remote FortiADC appliance.
l You must have read-write permission for link load balance settings.
After you have configured a virtual tunnel configuration object, you can select it in the link policy configuration.
Syntax
config link-load-balance virtual-tunnel
edit <name>
set dispatch-method {vt-wrr|vt-chash}
config vt-member
edit <name>
set health-check-ctrl {enable|disable}
set status {enable|disable}
set tunnel-local-addr <class_ip>
set tunnel-remote-addr <class_ip>
set weight <integer>
next
end
next
end
backup l enable—Designate the tunnel as a backup member of the group. All backup
members are inactive until all main members are down.
l disable—Designate the tunnel as a main member of the group.
tunnel-local-addr IP address for the network interface this system uses to form a VPN tunnel
with the remote system.
tunnel-remote-addr IP address that the remote FortiADC system uses to form a VPN tunnel with
this system.
Example
FortiADC-VM # config link-load-balance virtual-tunnel
96 FortiADC CLI Reference
Fortinet Technologies, Inc.
config link-load-balance virtual-tunnel config link-load-balance
FortiADC Handbook 97
Fortinet Technologies, Inc.
config load-balance config load-balance auth-policy
config load-balance
Use this command to configure an auth policy. The parameters of the policy set the matching terms that mandate
authentication and reference the user group that has authorization. For example, you can define an auth-policy
that has the following logic: if the Host header matches example.com and the URI matches /index.html, then the
group example-group is authorized. FortiADC supports the Basic Authentication Scheme described in RFC 2617.
98 FortiADC CLI Reference
Fortinet Technologies, Inc.
config load-balance auth-policy config load-balance
1. The client sends an HTTP request for a URL belonging to a FortiADC virtual server that has an authorization
policy.
2. FortiADC replies with an HTTP 401 to require authorization. On the client computer, the user might be prompted
with a dialog box to provide credentials.
3. The client reply includes an Authorization header that gives the credentials.
4. FortiADC sends a request to the server (local, LDAP, or RADIUS) to authenticate the user.
5. The authentication server sends its response, which can be cached according to your user group configuration.
6. If authentication is successful, FortiADC continues processing the traffic and forwards the request to the real
server.
7. The real server responds with an HTTP 200 OK.
8. FortiADC processes the traffic and forwards the server response to the client.
Before you begin:
l You must have created the user groups to be authorized with the policy. You also configure users and
authentication servers separately.
l You must have read-write permission for load balancing settings.
After you have configured an auth policy, you can select it in the virtual server configuration. Note the following
requirements:
Syntax
config load-balance auth-policy
edit <name>
config members
FortiADC Handbook 99
Fortinet Technologies, Inc.
config load-balance config load-balance caching
edit 1
set auth-path <path>
set host <hostname>
set host-status {enable|disable}
set user-group <datasource>
set user-realm <string>
next
end
next
end
auth-path Require authorization only if the URI of the HTTP request matches this
pathname. If none is specified, requests to any URI require authorization.
The value is parsed as a match string prefix. For example, /abc matches
http://www.example.com/abcd and
http://www.example.com/abc/11.html but not
http://www.example.com/1abcd.
host Specify the HTTP Host header. If host-status is enabled, the policy matches
only if the hostname header matches this value. Complete, exact matching
is required. For example, www.example.com matches
www.example.com but not www.example.com.hk.
host-status If enabled, require authorization only for the specified host. If disabled,
ignore hostname in the HTTP request header and require authorization for
requests with any Host header. Disabled by default.
user-realm Realm to which the auth-path URI belongs. If a request is authenticated and
a realm specified, the same credentials should be valid for all other requests
within this realm.
The system RAM cache can store HTTP content and serve subsequent HTTP requests for that content without
forwarding the requests to the backend servers, thereby reducing the load on the backend servers.
You can configure basic static caching or dynamic caching rules. For an overview of static and dynamic caching,
see the FortiADC Handbook.
l You must have a good understanding of caching and knowledge about the size of content objects clients access on
the backend servers.
l You must have read-write permission for load balancing settings.
Caching is not enabled by default. After you have configured caching, you can select it in the profile configuration.
To enable caching, select the profile when you configure the virtual server.
Syntax
config load-balance caching
edit <name>
set max-age <integer>
set max-cache-size <integer>
set max-entries <integer>
set max-object-size <integer>
config uri_exclude_list
edit <No.>
set uri <string>
next
end
config dyn-cache-list
edit <No.>
set uri <string>
set age <integer>
set invalid-uri <string>
next
end
next
end
The backend real server response header also includes a maximum age
value. The FortiADC system enforces whichever value is smaller.
max-cache-size The default is 100 MB. The valid range is 1 byte to 500 MB.
config uri_exclude_list
uri Specify URIs to build a list or sites to exclude from caching. You can use
regular expressions.
This list has precedence over the Dynamic Cache Rule List. In other words,
if a URI matches this list, it is ineligible for caching, even if it also matches
the Dynamic Cache Rule list.
config dyn-uri-list
uri Pattern to match the URIs that have content you want cached and served
by FortiADC.
Be careful with matching patterns and the order rules in the list. Rules are
consulted from lowest rule ID to highest. The first rule that matches is
applied.
FortiADC Handbook 101
Fortinet Technologies, Inc.
config load-balance config load-balance certificate-caching
age Timeout for the dynamic cache entry. The default is 60 seconds. The valid
range is 1-86,400. This age applies instead of any age value in the backend
server response header.
Be careful with matching patterns and the order rules in the list. Rules are
consulted from lowest rule ID to highest. The first rule that matches is
applied.
This list has precence over the Dynamic Cache URI list. In other words, if a
URI matches this list, it is ineligible for caching, even if it also matches the
Dynamic Cache URI list.
Example
FortiADC-VM # config load-balance caching
Use the command to set certificate-caching related configuration. Certificate caching is used to restore re-signed
certificates.
Syntax
config load-balance certificate-caching
edit "1"
set max-certificate-cache-size <size>
set max-entries <entries>
next
max-certificate- The maximum cache size used to store certificates. Valid values range from
cache-size 10 Mb to 500 Mb.
max-entries The maximum number of certificates that can be stored on the appliance
(FortiADC), which can range from 1 to 2,621,444.
Example
config load-balance certificate-caching
edit "1"
set max-certificate-cache-size 100M
set max-entries 10000
next
Use this command to configure SSL-type real servers using the client-ssl-profile.
Profile Description
Recommended SSL versions:
l SSLv3
l TLSv1.0
l TLSv1.1
l TLSv1.2
l SSLv3
l TLSv1.0
l TLSv1.1
l TLSv1.2
Recommended SSL version:
l TLSv1.2
Syntax
config load-balance client-ssl-profile
edit <name>
FortiADC Handbook 103
Fortinet Technologies, Inc.
config load-balance config load-balance client-ssl-profile
client-sni-required If enabled, clients are required to use the TLS server name indication (SNI)
extension to include the server hostname in the TLS client hello message.
This will allow FortiADC to select the appropriate local server certificate to
present to the client.
local-certificate- Configure the local certificate group that includes the certificates the
group virtual server presents to SSL/TLS clients.
forward-client-cer- Enable/disable. If enabled, FortiADC will send the whole client certificate
tificate encoded in the BASE64 code in the specified HTTP header, which is either the
X-Client-Cert or a user-defined header.
forward-client-cer- The default is X-Client-Cert, but you can customize it using this command.
tificate-header
forward-proxy-inter- Set the intermediate CA group used to sign the server certificate.
mediate-ca-group
ocsp-stapling-skew- The default is 0 (in seconds). It means the skew time of this updated time
time and next updated time.
FortiADC Handbook 105
Fortinet Technologies, Inc.
config load-balance config load-balance client-ssl-profile
ssl-auto-chain-flag Enabled by default. It means that when the configured certificate is used
in the same client-ssl-profile as the local certificate, and the local
certificate is issued by the CA set in the Client Certificate Verify section,
ADC will automatically form a certificate chain to the client.
use-tls-tickets Enable to allow reusing SSL tickets. This option is automatically disabled
when the client-certificate-verify-option is set to optional.
Example 1: Create a new client-SSL profile and quote it in virtual server configuration
Step 1: Configure a client SSL profile
config load-balance client-sssl-profile
edit "csp1"
set ssl-customize-ciphers-flag disable
set ssl-ciphers DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA256 DHE-RSA-AES256-SHA
AES256-GCM-SHA384 AES256-SHA256 AES256-SHA DHE-RSA-AES128-GCM-SHA256 DHE-RSA-
AES128-SHA256 DHE-RSA-AES128-SHA AES128-GCM-SHA256 AES128-SHA256 AES128-SHA RC4-
SHA RC4-MD5 EDH-RSA-DES-CBC3-SHA DES-CBC3-SHA EDH-RSA-DES-CBC-SHA DES-CBC-SHA
set ssl-allowed-versions sslv3 tlsv1.0 tlsv1.1 tlsv1.2
set forward-proxy enable
unset client-certificate-verify
set forward-proxy-certificate-caching LB_CERT_RAM_CACHING_DEFAULT
set forward-proxy-local-signing-CA SSLPROXY_LOCAL_CA
unset forward-proxy-intermediate-ca-group
unset backend-certificate-verify
set backend-ssl-sni-forward enable
set backend-ssl-customize-ciphers-flag enable
set backend-ssl-customized-ciphers test
set backend-ssl-allowed-versions sslv3 tlsv1.0 tlsv1.1 tlsv1.2
set ssl-auto-chain-flag-enable
next
Example 2: Create a certificate-caching object and quote it in the client SSL profile
config load-balance certificate-caching
edit "1"
set max-certificate-cache-size 100M
set max-entries 10000
next
config load-balance client-ssl-profile
edit "test"
set forward-proxy-certificate-caching 1
set forward-proxy-local-signing-CA ca1
set forward-proxy-intermediate-ca-group inter_group
set backend-ssl-sni-forward enable
set backend-ssl-customize-ciphers-flag disable
set backend-ssl-customized-ciphers ECDHE-ECDSA-AES256-GCM-SHA384 (when backend-ssl-
customize-ciphers-flag dis enable)
set backend-ssl-customize-ciphers-flag enable/disable
set backend-ssl-ciphers DHE-RSA-AES256-SHA DES-CBC3-SHA
set backend-allow-ssl-versions tlsv1.1 tlsv1.2
End
Example 3: Create a client-certificate-verify object and quote it in the client SSL profile
config load-balance client-sssl-profile
edit "csp1"
set ssl-customize-ciphers-flag disable
set ssl-ciphers DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA256 DHE-RSA-AES256-SHA
AES256-GCM-SHA384 AES256-SHA256 AES256-SHA DHE-RSA-AES128-GCM-SHA256 DHE-RSA-
AES128-SHA256 DHE-RSA-AES128-SHA AES128-GCM-SHA256 AES128-SHA256 AES128-SHA RC4-
SHA RC4-MD5 EDH-RSA-DES-CBC3-SHA DES-CBC3-SHA EDH-RSA-DES-CBC-SHA DES-CBC-SHA
set ssl-allowed-versions sslv3 tlsv1.0 tlsv1.1 tlsv1.2 set forward-proxy enable
unset client-certificate-verify
set forward-proxy-certificate-caching LB_CERT_RAM_CACHING_DEFAULT set forward-proxy-
local-signing-CA SSLPROXY_LOCAL_CA
unset forward-proxy-intermediate-ca-group
set client-certificate-verify verify
set client-certificate-verify-option required
set ssl-session-cache-flag enable
set use-tls-tickets enable
set backend-ssl-sni-forward enable
set backend-ssl-customize-ciphers-flag enable
set backend-ssl-customized-ciphers test
set backend-ssl-allowed-versions sslv3 tlsv1.0 tlsv1.1 tlsv1.2
set ssl-auto-chain-flag-enable
next
Use this command to create a new clone-pool, and to configure clone pool members inside it.
Syntax
config load-balance clone-pool
FortiADC Handbook 107
Fortinet Technologies, Inc.
config load-balance config load-balance clone-pool
edit <name>
config pool_member
edit <name>
set mode <mirror-dst-mac-update/mirror-interface/mirror-ip-update/mirror=src-
dst-mac-update/mirror-src-mac-update>
set destination-interface <port>
set destination-mac <xx:xx:xx:xx:xx:xx>
next
end
Clone Pool
Pool Member
interface Select the interface (port) FortiADC uses to send out packets
to the clone server.
Example
FortiADC-VM (root) # config load-balance clone-pool
FortiADC-VM (clone-pool) # edit 1
FortiADC-VM (1) # config pool_member
FortiADC-VM (pool_member) # edit name
FortiADC-VM (name) # set
FortiADC-VM (name) # set mode mirror-dst-mac-update
FortiADC Handbook 109
Fortinet Technologies, Inc.
config load-balance config load-balance compression
destination-mac : 00:00:00:00:00:00
next
end
l application/javascript
l application/soap+xml
l application/x-javascript
l application/xml
l text/css
l text/html
l text/javascript
l text/plain
l text/xml
Not all HTTP responses should be compressed. Compression offers the greatest performance improvements
when applied to URLs whose media types compress well, such as repetitive text such as tagged HTML, and
scripts such as JavaScript. Files that already contain efficient compression such as GIF images usually should not
be compressed, as the CPU usage and time spent compressing them will result in an increased delay rather than
network throughput improvement. Plain text files where no words are repeated, such as configurations with
unique URLs or IPs, also may not be appropriate for compression.
l You must have a good understanding of HTTP compression and knowledge of the content types served from the
backend real servers.
l You must have read-write permission for load balancing settings.
Compression is not enabled by default. After you have configured a compression rule, you can select it in the
profile configuration. To enable compression, select the profile when you configure the virtual server.
Syntax
config load-balance compression
edit <name>
set cpu-limit <integer>
set max-cpu-usage <integer>
set min-content-length <integer>
set uri-list-type {include | exclude>
config uri_list
edit <No.>
set uri <string>
next
end
config content_types
edit <No.>
max-cpu-usage Maximum CPU usage for compression operations. The default is 80.
min-content-length Do not compress files smaller than this size. The default is 1024 bytes.
uri-list-type Specify whether to include or exclude items in the list from compression.
config uri_list
uri Specify URIs to build a list or sites to include/exclude from compression. You
can use regular expressions.
config content_type
content-type l application/javascript
l application/soap+xml
l application/x-javascript
l application/xml
l text/css
l text/html
l text/javascript
l text/plain
l text/xml
Example
FortiADC-VM (compression) # config load-balance compression
FortiADC-VM (compression) # edit lb-compression
Add new entry 'lb-compression' for node 1627
FortiADC Handbook 111
Fortinet Technologies, Inc.
config load-balance config load-balance connection-pool
A connection pool enables Layer 7 load balancing virtual servers to “reuse” existing TCP connections. Using a
connection pool can reduce the impact of TCP overhead on web server and application performance.
l You must have read-write permission for load balancing feature settings.
After you have created a connection pool configuration, you can specify it in a virtual server configuration.
Note: The feature is not supported for profiles with the Source Address option enabled.
Syntax
config load-balance connection-pool
edit <name>
set age <integer>
set reuse <integer>
set size <integer>
set timeout <integer>
next
end
reuse Maximum number of times that the virtual server can reuse the connection. The
recommended value is 2000.
size Maximum number of connections in the connection pool. The recommended value is
0, which specifies that there is no limit on the connection size.
timeout Maximum number of seconds a connection can be idle before the system deletes it.
The recommended value is 30.
Predefined connection-pool
config load-balance connection-pool
edit "LB_CONNECTION_POOL_DEFAULT"
set size 10000
set age 86400
set reuse 10000
set timeout 50
next
end
Example
FortiADC-VM # config load-balance connection-pool
You might rewrite the HTTP headers for various reasons, including the following:
l Redirect HTTP to HTTPS—You can use the content rewriting feature to send redirects when the requested
resource requires a secure connection. For example, create a rule that matches requests to
http://example.com/resource with an action to send a redirect that has the secure URL in the Location
header: https://example.com/resource.
l External-to-internal URL translation—It is standard for web servers to have external and internal domain names.
You can use content-based routing to forward HTTP requests to example.com to a server pool that includes
server1.example.com, server2.example.com, and server3.example.com. When you use content routing like this,
you should also rewrite the Location header in the HTTP response so that the client receives HTTP with
example.com in the header and not the internal domain server1.example.com. Create a rule that matches the
regular expression server.*\.example\.com in the Location header of the HTTP response with an action to
rewrite the Location header with the public URL http://example.com.
l Other security reasons—Another use case for external-to-internal URL translation involves masking pathnames that
give attackers information about your web applications. For example, the unmasked URL for a blog might be
http://www.example.com/wordpress/?feed=rss2, which exposes that the blog is a wordpress application. In this
case, you want to publish an external URL that does not have clues of the underlying technology. For example, in
your web pages, you create links to http://www.example.com/blog. On FortiADC, you create a rule that matches
requests to http://www.example.com/resource2 with an action to rewrite the URL to the internal URL
http://www.example.com/wordpress/?feed=rss2. For the return traffic, you create another rule that
matches http://www.example.com/wordpress/?feed=rss2 in the Location header of the HTTP
response with an action to rewrite it with the public URL http://www.example.com/blog.
Table 7 summarizes the HTTP header fields that can be rewritten.
FortiADC Handbook 113
Fortinet Technologies, Inc.
config load-balance config load-balance content-rewriting
The first line of an HTTP request includes the HTTP method, relative URL, and HTTP version. The next lines are
headers that communicate additional information. The following example shows the HTTP request for the URL
http://www.example.com/index.html:
GET /index.html HTTP/1.1
Host: www.example.com
Referer: http://www.google.com
The following is an example of an HTTP redirect including the HTTP Location header:
HTTP/1.1 302 Found
Location: http://www.iana.org/domains/example/
You can use literal strings or regular expressions to match traffic to rules. To match a request URL such as
http://www.example.com/index, you create two match conditions: one for the Host header www.example.com
and another for the relative URL that is in the GET line: /index.html.
For HTTP redirect rules, you can specify the rewritten location as a literal string or as a regular expression. For all
other types or rules, you must specify the complete URL as a literal string.
Note: You can select multiple content rewriting rules in the virtual server configuration. Rules you add to that
configuration are consulted from top to bottom. The first to match is applied. If the traffic does not match any of
the content rewriting rule conditions, the header is not rewritten.
Syntax
config load-balance content-rewriting
edit <name>
set action-type {request|response>
set action {add_http_header | delete_http_header | redirect | rewrite_http_header |
rewrite_http_location | send-403-forbidden}
set header-name [string/regular express]
set header-value [string/regular express]
set redirect <string>
set host-status {enable|disable}
set host <string>
set referer-status {enable|disable}
action If you configure a rule based on the HTTP request, you can specify the following
actions:
l add_http_header
l delete_http_header
l rewrite_http_header
l redirect
l send-403-forbidden
If you configure a rule based on the HTTP response, you can specify the following
action:
l rewrite_http_location
header-name Creates a new header or deletes an existing header with the header name.
header-value Creates a new header or deletes an existing header with the header value.
redirect Sends a redirect with the URL you specify in the HTTP Location header field.
FortiADC Handbook 115
Fortinet Technologies, Inc.
config load-balance config load-balance content-rewriting
host-status Enable/disable rewriting the Host header by replacing the hostname with the
string you specify.
host Rewrites the Host header by replacing the hostname with the string you specify.
For Host rules, specify a replacement domain and/or port.
Note: The rewrite string is a literal string. Regular expression syntax is not
supported.
referer-status Enable/disable rewriting the Referer header with the URL you specify.
referer Rewrites the Referer header with the URL you specify. For Referer rules, you
must specify an absolute URL.
Note: The rewrite string is a literal string. Regular expression syntax is not
supported.
url-status Enable/disable rewriting the Host header by replacing the whole URL with the
string you specify.
url Rewrites the request URL and Host header using the string you specify. For URL
rules, specify a URL in one of the following formats:
Note: The rewrite string is a literal string. Regular expression syntax is not
supported.
Note: The rewrite string is a literal string. Regular expression syntax is not
supported.
config match-condition
l http-host-header
l http-location-header
l http-referer-header
l http-request-url
l ip-source-address
Note: When you add multiple conditions, FortiADC joins them with an AND
operator. For example, if you specify both a HTTP Host Header and HTTP
Request URL to match, the rule is a match only for traffic that meets both
conditions.
type l string
l regular-expression
Example
The following example creates a configuration to rewrite a literal string:
FortiADC-VM # config load-balance content-rewriting
FortiADC-VM (content-rewrit~n) # edit c-rewrite-0
Add new entry 'c-rewrite-0' for node 1737
FortiADC Handbook 117
Fortinet Technologies, Inc.
config load-balance config load-balance content-routing
Content routes select the backend server pool based on matches to TCP/IP or HTTP header values.
Layer 7 content route rules are based on matches to the following header values:
l HTTP Host
l HTTP Referer
l HTTP Request URL
l SNI
l Source IP address
You might want to use Layer 7 content routes to simplify front-end coding of your web pages or to obfuscate the
precise server names from clients. For example, you can publish links to a simple URL named example.com and
use content route rules to direct traffic for requests to example.com to a server pool that includes
server1.example.com, server2.example.com, and server3.example.com.
Layer 4 content route rules are based on matches to the following header values:
l Source IP address
Before you begin:
Note: You can select multiple content routing rules in the virtual server configuration. Rules you add to that
configuration are consulted from top to bottom. The first rule to match is applied. If the traffic does not match any
of the content routing rule conditions specified in the virtual server configuration, the system behaves
unexpectedly. Therefore, it is important that you create a “catch all” rule that has no match conditions. In the
virtual server configuration, this rule should be ordered last so it can be used to forward traffic to a default pool.
Syntax
config load-balance content-routing
edit <name>
type l4-content-routing
l7-content-routing
connection-pool-inherit Enable to use the connection pool configuration object specified in the
virtual server configuration.
method-inherit Enable (default) to use the method specified in the virtual server
configuration.
persistence-inherit Enable (default) to use the persistence object specified in the virtual
server configuration.
FortiADC Handbook 119
Fortinet Technologies, Inc.
config load-balance config load-balance content-routing
config match-condition
l http-host-header
l http-referrer-header
l http-request-url
l sni
l ip-source-address
Note: When you add multiple conditions, FortiADC joins them with an
AND operator. For example, if you specify both a HTTP Host Header
and HTTP Request URL to match, the rule is a match only for traffic
that meets both conditions.
type l string
l regular-expression
Example
FortiADC-VM # config load-balance content-routing
FortiADC-VM (content-routing) # edit example.com
Add new entry 'example.com' for node 1756
The decompression function is used in the Web Application Firewall (WAF) module. If this feature is enabled,
FortiADC will decompress content before checking it for potential issues.
Syntax
config load-balance decompression
edit <name>
set cpu-limit {enable | disable}
set max-cpu-usage [1-100]
set uri-list-type {include | exclude}
FortiADC Handbook 121
Fortinet Technologies, Inc.
config load-balance config load-balance decompression
config uri_list
edit <ID>
set uri <regex_pattern>
next
end
config content-types
edit <ID>
set content-type <types>
next
end
end
l application/javascript
l application/soap+xml
l application/x-javascript
l application/xml
l custom <plain-string>
l text/css
l text/html
l text/javascript
l text/plain
l text/xml
Example
config load-balance decompression
edit "get"
set cpu-limit enable
set max-cpu-usage 80
set uri-list-type exclude
config uri_list
end
config content_types
edit 1
set content-type application/soap+xml
next
end
next
end
Deprecated. You must use the web UI to upload an error page and create an error page configuration object.
The FortiGuard Geo IP service provides a database that maps IP addresses to countries, satellite providers, and
anonymous proxies. The database is updated periodically.
The Geo IP block list is a policy that takes the action you specify when the virtual server receives requests from IP
addresses in the blocked country’s IP address space.
For Layer 4 virtual servers, FortiADC blocks access when the first TCP SYN packet arrives. For Layer 7 virtual
servers, FortiADC blocks access after the handshake, allowing it to redirect the traffic if you have configured it to
do so.
Basic Steps
1. Configure the connection to FortiGuard so the system can receive periodic Geo IP Database updates.
2. Create rules to block traffic from locations.
3. Maintain a whitelist to allow traffic from specified subnets even if they belong to the address space blocked by the
Geo IP block list.
4. Select the Geo IP block list and whitelist in the profiles you associate with virtual servers.
Before you begin:
Syntax
config load-balance geoip-list
edit <name>
set action {deny | pass | redirect | send-403-forbidden}
set log {enable|disable}
set severity {high | low | medium}
set status {enable|disable}
config geoip-member
edit <No.>
set region-list <country-code>
next
next
end
FortiADC Handbook 123
Fortinet Technologies, Inc.
config load-balance config load-balance geoip-list
action l Pass
l Deny
l Redirect (you can specify a redirect URL in the virtual server configuration)
l Send 403 Forbidden
Note: Layer 4 and TCPS virtual servers do not support Redirect or Send 403
Forbidden. If you apply a configuration that uses these options to a Layer 4 or TCPS
virtual server, FortiADC logs the action as Redirect or Send 403 Forbidden, but in
fact denies the traffic.
severity The severity to apply to the event. Severity is useful when you filter and sort logs:
l low
l medium
l high
config geoip-member
region-list Specify a geolocation object. Type ? to see a list. The list includes countries as well
as selections for anonymous proxies and satellite providers.
Example
FortiADC-VM # config load-balance geoip-list
AF Afghanistan
AG Antigua and Barbuda
AI Anguilla
AL Albania
AM Armenia
AN Netherlands Antilles
AO Angola
AP Asia/Pacific Region
AQ Antarctica
AR Argentina
AS American Samoa
AT Austria
AU Australia
AW Aruba
AX Aland Islands
AZ Azerbaijan
BA Bosnia and Herzegovina
BB Barbados
BD Bangladesh
BE Belgium
BF Burkina Faso
BG Bulgaria
BH Bahrain
BI Burundi
BJ Benin
BL Saint Bartelemey
BM Bermuda
BN Brunei Darussalam
BO Bolivia
BQ Bonaire, Saint Eustatius and Saba
BR Brazil
BS Bahamas
BT Bhutan
BV Bouvet Island
BW Botswana
BY Belarus
BZ Belize
CA Canada
CC Cocos (Keeling) Islands
CD Congo, The Democratic Republic of the
CF Central African Republic
CG Congo
CH Switzerland
CI Cote d'Ivoire
CK Cook Islands
CL Chile
CM Cameroon
CN China
CO Colombia
CR Costa Rica
CU Cuba
CV Cape Verde
CW Curacao
CX Christmas Island
CY Cyprus
CZ Czech Republic
DE Germany
FortiADC Handbook 125
Fortinet Technologies, Inc.
config load-balance config load-balance geoip-list
DJ Djibouti
DK Denmark
DM Dominica
DO Dominican Republic
DZ Algeria
EC Ecuador
EE Estonia
EG Egypt
EH Western Sahara
ER Eritrea
ES Spain
ET Ethiopia
EU Europe
FI Finland
FJ Fiji
FK Falkland Islands (Malvinas)
FM Micronesia, Federated States of
FO Faroe Islands
FR France
GA Gabon
GB United Kingdom
GD Grenada
GE Georgia
GF French Guiana
GG Guernsey
GH Ghana
GI Gibraltar
GL Greenland
GM Gambia
GN Guinea
GP Guadeloupe
GQ Equatorial Guinea
GR Greece
GS South Georgia and the South Sandwich Islands
GT Guatemala
GU Guam
GW Guinea-Bissau
GY Guyana
HK Hong Kong
HM Heard Island and McDonald Islands
HN Honduras
HR Croatia
HT Haiti
HU Hungary
ID Indonesia
IE Ireland
IL Israel
IM Isle of Man
IN India
IO British Indian Ocean Territory
IQ Iraq
IR Iran, Islamic Republic of
IS Iceland
IT Italy
JE Jersey
JM Jamaica
JO Jordan
JP Japan
KE Kenya
KG Kyrgyzstan
KH Cambodia
KI Kiribati
KM Comoros
KN Saint Kitts and Nevis
KP Korea, Democratic People's Republic of
KR Korea, Republic of
KW Kuwait
KY Cayman Islands
KZ Kazakhstan
LA Lao People's Democratic Republic
LB Lebanon
LC Saint Lucia
LI Liechtenstein
LK Sri Lanka
LR Liberia
LS Lesotho
LT Lithuania
LU Luxembourg
LV Latvia
LY Libyan Arab Jamahiriya
MA Morocco
MC Monaco
MD Moldova, Republic of
ME Montenegro
MF Saint Martin
MG Madagascar
MH Marshall Islands
MK Macedonia
ML Mali
MM Myanmar
MN Mongolia
MO Macao
MP Northern Mariana Islands
MQ Martinique
MR Mauritania
MS Montserrat
MT Malta
MU Mauritius
MV Maldives
MW Malawi
MX Mexico
MY Malaysia
MZ Mozambique
NA Namibia
NC New Caledonia
NE Niger
NF Norfolk Island
NG Nigeria
NI Nicaragua
NL Netherlands
NO Norway
NP Nepal
NR Nauru
NU Niue
FortiADC Handbook 127
Fortinet Technologies, Inc.
config load-balance config load-balance geoip-list
NZ New Zealand
OM Oman
PA Panama
PE Peru
PF French Polynesia
PG Papua New Guinea
PH Philippines
PK Pakistan
PL Poland
PM Saint Pierre and Miquelon
PN Pitcairn
PR Puerto Rico
PS Palestinian Territory
PT Portugal
PW Palau
PY Paraguay
QA Qatar
RE Reunion
RO Romania
RS Serbia
RU Russian Federation
RW Rwanda
SA Saudi Arabia
SB Solomon Islands
SC Seychelles
SD Sudan
SE Sweden
SG Singapore
SH Saint Helena
SI Slovenia
SJ Svalbard and Jan Mayen
SK Slovakia
SL Sierra Leone
SM San Marino
SN Senegal
SO Somalia
SR Suriname
SS South Sudan
ST Sao Tome and Principe
SV El Salvador
SX Sint Maarten
SY Syrian Arab Republic
SZ Swaziland
TC Turks and Caicos Islands
TD Chad
TF French Southern Territories
TG Togo
TH Thailand
TJ Tajikistan
TK Tokelau
TL Timor-Leste
TM Turkmenistan
TN Tunisia
TO Tonga
TR Turkey
TT Trinidad and Tobago
TV Tuvalu
TW Taiwan
TZ Tanzania, United Republic of
UA Ukraine
UG Uganda
UM United States Minor Outlying Islands
US United States
UY Uruguay
UZ Uzbekistan
VA Holy See (Vatican City State)
VC Saint Vincent and the Grenadines
VE Venezuela
VG Virgin Islands, British
VI Virgin Islands, U.S.
VN Vietnam
VU Vanuatu
WF Wallis and Futuna
WS Samoa
XK Kosovo
YE Yemen
YT Mayotte
ZA South Africa
ZM Zambia
ZW Zimbabwe
CN11 China,Beijing
CN12 China,Tianjin
CN13 China,Hebei
CN14 China,Shanxi(Taiyuan)
CN15 China,Neimenggu
CN21 China,Liaoning
CN22 China,Jilin
CN23 China,Heilongjiang
CN31 China,Shanghai
CN32 China,Jiangsu
CN33 China,Zhejiang
CN34 China,Anhui
CN35 China,Fujian
CN36 China,Jiangxi
CN37 China,Shandong
CN41 China,Henan
CN42 China,Hubei
CN43 China,Hunan
CN44 China,Guangdong
CN45 China,Guangxi
CN46 China,Hainan
CN50 China,Chongqing
CN51 China,Sichuan
CN52 China,Guizhou
CN53 China,Yunnan
CN54 China,Xizang
CN61 China,Shaanxi(Xian)
CN62 China,Gansu
CN63 China,Qinghai
CN64 China,Ningxia
CN65 China,Xinjiang
FortiADC Handbook 129
Fortinet Technologies, Inc.
config load-balance config load-balance http2-profile
This command is used by HTTP or HTTPS profiles. You must enable the HTTP/2 gateway function to use this
profile.
Profile Description
Syntax
config load-balance http2-profile
edit <profile name>
set priority-mode best-effort
set upgrade-mode upgradeable
set max-concurrent-stream <integer>
set max-receive-window <integer>
set max-frame-size <integer>
set header-table-size <integer>
set max-header-list-size <integer>
set ssl-constraint disable/enable
Parameter Description
Example:
config load-balance http2-profile
edit "http2"
set priority-mode best-effort
set upgrade-mode upgradeable
set max-concurrent-stream 5
set max-receive-window 32767
set max-frame-size 16384
set header-table-size 4096
set max-header-list-size 65536
set ssl-constraint disable
next
end
Use this command to configure a NAT IP address range pool to be used in a Layer 4 virtual server deployment
In a Layer 4 virtual server configuration, you select a “packet forwarding method” that includes the following
network address translation (NAT) options:
l You must have a good understanding of NAT. You must know the address ranges your network has provisioned for
NAT.
l Be sure to configure the backend servers to use the FortiADC address as the default gateway so that server
FortiADC Handbook 131
Fortinet Technologies, Inc.
config load-balance config load-balance ippool
Syntax
config load-balance ippool
edit <No.>
set interface <datasource>
set addr-type {ipv4|ipv6}
set ip-min <class_ip>
set ip-max <class_ip>
config node-member
edit <name>
set ha-node <integer>
set interface <datasource>
set addr-type {ipv4|ipv6}
set ip-min <class_ip>
set ip-max <class_ip>
next
end
next
end
interface Interface to receive responses from the backend server. The interface used for the
initial client traffic is determined by the virtual server configuration.
config node-member
<name> Create a node member list to be used in an HA active-active deployment when the
node interfaces have multiple IP addresses.
Name is a configuration name. Valid characters are A-Z, a-z, 0-9, _, and -. No
spaces. You reference this name in the virtual server configuration.
Note: After you initially save the configuration, you cannot edit the name.
interface Interface to receive responses from the backend server. The interface used for the
initial client traffic is determined by the virtual server configuration.
Use this command to configure an exception list for SSL forward proxy decryption. You can leverage FortiGuard
web filter categories, and you can configure a list of additional destinations.
l You must have created a web-filter-profile configuration if you want to specify it in the exception list.
l You must have hostname or IP address details on additional destinations you want to exclude from SSL decryption.
l You must have read-write permission for load balancing settings.
After you have configured an exception list, you can specify it in the virtual server configuration.
Syntax
config load-balance l2-exception-list
edit <name>
set description <string>
set web-filter-profile <datasource>
config member
edit <No.>
set type {host|ip}
set host-pattern <string>
set ip-netmask <ip&netmask>
next
end
next
end
description A string to describe the purpose of the configuration, to help you and other
administrators more easily identify its use. Put phrases in quotes. For example:
“Customer ABC”.
config member
l host
l ip
FortiADC Handbook 133
Fortinet Technologies, Inc.
config load-balance config load-balance method
ip-network Specify the IP address and CIDR-formatted subnet mask, separated by a forward
slash, such as 192.0.2.0/24. Dotted quad formatted subnet masks are not
accepted.
Example
FortiADC-docs # config load-balance l2-exception-list
FortiADC-docs (l2-exception-l~s) # edit financial
Add new entry 'financial' for node 3880
FortiADC-docs (financial) # set description "financial websites"
FortiADC-docs (financial) # config member
FortiADC-docs (member) # edit 1
Add new entry '1' for node 3883
FortiADC-docs (1) # set type host
FortiADC-docs (1) # set host-pattern *.bankofamerica.com
FortiADC-docs (1) # next
FortiADC-docs (member) # edit 2
Add new entry '2' for node 3883
FortiADC-docs (2) # set type host
FortiADC-docs (2) # set host-pattern *.schwab.com
FortiADC-docs (2) # end
FortiADC-docs (financial) # end
The system includes predefined configuration objects for all supported load balancing methods, and there is no
need to create additional configuration objects. You may choose to do so, however, for various reasons, for
example, to use a naming convention that makes the purpose of the configuration clear to other administrators.
Predefined Description
LB_METHOD_ROUND_ROBIN Selects the next server in the series: server 1, then server 2,
then server 3, and so on.
LB_METHOD_FASTEST_ Selects the server with the fastest response to health check
RESPONSE tests.
Predefined Description
LB_METHOD_URI Selects the server based on a hash of the URI found in the
HTTP header, excluding hostname.
LB_METHOD_FULL_URI Selects the server based on a hash of the full URI string found
in the HTTP header. The full URI string includes the
hostname and path.
LB_METHOD_HOST_DOMAIN Selects the server based on a hash of the domain name in the
HTTP Request header Host field.
Syntax
config load-balance method
edit <name>
set type {dest-ip-hash | fastest-response | full-uri-hash | host-domain-hash | host-
hash | least-connection | round-robin | uri-hash}
next
end
Use this command to set which kind of HTTP requests will be handled by PageSpeed and how to accelerate.
Syntax
config load-balance pagespeed
edit <name>
set file-cache-inode-limit <1-100000>
set file-cache-size-limit <1-512>
set profile <datasource>
config page-control
edit <id>
set type include/exclude
set uri-pattern <uri regex>
FortiADC Handbook 135
Fortinet Technologies, Inc.
config load-balance config load-balance pagespeed
next
end
config resource-control
edit <id>
set fetch-domain <string>
set origin-domain-pattern <regex string>
set rewrite-domain <string>
next
end
end
Parameter Description
config page-control
Config resource-con-
trol
Note: In the HTTP response body, the HTML sometimes links with certain
resource URL. If the resource contain a domain name, FortiADC will perform
the activity according to the fetch-domain setting or the rewrite-domain
setting.
Example:
config load-balance pagespeed
edit "all"
set profile all
Use this command to specify the resources that will be handled by PageSpeed.
Syntax
config load-balance pagespeed-profile
edit <name>
set html enable/disable
set css enable/disable
set image enable/disable
set combine-css enable/disable
set max-combine-css-byte <1-10240>
set jpeg-sampling enable/disable
set resize-image enable/disable
set move-css-to-head enable/disable
next
end
Parameter Description
resize-image Resizes images when the corresponding img tag specifies a smaller width and
height.
FortiADC Handbook 137
Fortinet Technologies, Inc.
config load-balance config load-balance persistence
Example:
config load-balance pagespeed-profile
edit "all"
set html enable
set css enable
set image enable
set combine-css enable
set max-combine-css-byte 4096
set jpeg-sampling disable
set resize-image enable
set move-css-to-head enable
next
end
Persistence rules identify traffic that should not be load balanced, but instead forwarded to the same backend
server that has seen requests from that source before. Typically, you configure persistence rules to support server
transactions that depend on an established client-server session, like e-commerce transactions or SIP voice calls.
The system maintains persistence session tables to map client traffic to backend servers based on the session
attribute specified by the persistence rule.
The persistence table is evaluated before load balancing rules. If the packets received by the ADC match an entry
in the persistence session table, the packets are forwarded to the server that established the connection, and
load balancing rules are not applicable.
Most persistence rule types have a timeout. When the time that has elapsed since the system last received a
request from the client IP address is greater than the timeout, the system does not use the mapping table to
forward the request. Instead, it again selects the server using the method specified in the virtual server
configuration. Hash-based rule types have a timeout built into the hash algorithm. For other types, you can
specify the timeout.
Table 9 describes the predefined persistence rules. You can get started with these commonly used persistence
methods or create custom objects.
Predefined Description
Predefined Description
LB_PERSIS_RDP_COOKIE Persistence based on RDP cookie sent by RDP clients in the initial con-
nection request.
l You must have a good understanding and knowledge of the applications that require persistent sessions and the
methods that can be used to identify application sessions.
l You must have read-write permission for load balancing settings.
After you have configured a persistence rule, you can select it in the virtual server configuration.
Syntax
config load-balance persistence
edit <name>
set type {consistent-hash-ip | embedded-cookie | hash-cookie | hash-http-header |
hash-http-request | hash-source-address-port | insert-cookie | persistent-cookie
| radius-attribute | rdp-cookie | rewrite-cookie | source-address | ssl-session-
id}
set timeout <integer>
set keyword <string>
set match-across-servers {enable|disable}
set ipv4-maskbits <integer>
set ipv6-maskbits <integer>
set override-connection-limit {enable|disable}
set radius-attribute-relation {AND|OR}
config radius-attribute
edit <No.>
set type {1-user-name | 4-nas-ip-address | 5-nas-port | 6-service-type | 7-
framed-protocol | 8-framed-ip-address | 9-framed-ip-netmask | 12-framed-
mtu | 13-framed-compression | 14-login-ip-host | 19-callback-number |
24-state | 26-vendor-specific | 30-called-station-id | 31-calling-
station-id | 32-nas-identifier | 33-proxy-state | 34-login-lat-service |
35-login-lat-node | 36-login-lat-group | 60-chap-challenge | 61-nas-
port-type | 62-port-limit | 63-login-lat-port}
set vendor-id <integer>
set vendor-type <integer>
next
end
next
end
FortiADC Handbook 139
Fortinet Technologies, Inc.
config load-balance config load-balance persistence
timeout Timeout for an inactive persistence session table entry. The default is 300
seconds. The valid range is 1-86,400.
When the time that has elapsed since the system last received a request
from the client IP is greater than the timeout, the system does not use the
mapping table to forward the request. Instead, it again selects the server
using the method specified in the virtual server configuration.
ipv4-maskbits Number of bits in a subnet mask to specify a network segment that should
following the persistence rule.
For example, if IPv4 maskbits is set to 24, and the backend server A
responds to a client with the source IP 192.168.1.100, server A also
responds to all clients from subnet 192.168.1.0/24.
ipv6-maskbits Number of bits in a subnet mask to specify a network segment that should
following the persistence rule.
radius-attribute- An option for radius-attribute only. The relation when multiple radius
relation attributes are configured.
AND—All of the specified radius attributes must be the same in the hash
table to be persistent.
OR—Search the first radius attribute in the hash table for persistence if the
first radius attribute exists. If not, search the following radius attributes in
sequence.
config radius-attribute
vendor-id An option for radius attribute type 26-vendor-specific only. The number
specifies vendor id. 0 means the entire attribute will be used as a
persistence input.
vendor-type An option for radius attribute type 26-vendor-specific only. The number
specifies vendor type. 0 means the entire attribute will be used as a
persistence input.
A server pool is a group of the real servers that host the applications that you load balance.
FortiADC Handbook 141
Fortinet Technologies, Inc.
config load-balance config load-balance pool
l You must have a good understanding and knowledge of the backend server boot behavior, for example, how many
seconds it takes to “warm up” after a restart before it can process traffic.
l You must know the IP address and port of the applications.
l You must have already created real server SSL profiles if you want to specify them in the real server configuration.
l You must have read-write permission for load balancing settings.
After you have configured a real server pool, you can select it in the virtual server configuration.
Syntax
config load-balance pool
edit <name>
set addr-type {ipv4|ipv6}
set health-check-ctrl {enable|disable}
set health-check-list {<datasource> ...}
set health-check-relation {AND|OR}
set real-server-profile <datasource>
config pool_member
edit <No.>
set backup {enable|disable}
set connection-limit <integer>
set connection-rate-limit <integer>
set health-check-inherit {enable|disable}
set health-check-ctrl {enable|disable}
set health-check-list {<datasource> ...}
set health-check-relation {AND|OR}
set ip <class_ip>
set ip6 <class_ip>
set pool_member_cookie <string>
set pool_member_server_name <string>
set pool_member_service_port <integer>
set pool_member_weight <integer>
set recover <integer>
set rs-profile-inherit {enable|disable}
set real-server-profile <datasource>
set ssl {enable|disable}
set status {enable|disable|maintain}
set warm-rate <integer>
set warm-up <integer>
next
end
next
end
addr-type l IPv4
l IPv6
health-check-ctrl Enable health checking for the pool. The health check settings at this
configuration level are the parent configuration. When you configure
the pool members, you can specify whether to inherit or override the
parent configuration.
health-check-relation l AND—All of the specified health checks must pass for the server to be
considered available.
l OR—One of the specified health checks must pass for the server to be
considered available.
real-server-profile Specify a real server profile. Real server profiles determine settings for com-
munication between FortiADC and the backend real servers.
config pool_member
backup Server that the ADC directs traffic to only when other servers in the
pool are down. The backup server receives connections when all the
other pool members fail the health check or you have manually
disabled them, for example.
connection-rate-limit Limit the number of new connections per second to this server. The
default is 0 (disabled). The valid range is 1 to 86,400 connections per
second.
In Layer 4 deployments, you can apply a connection rate limit per real
server and per virtual server. Both limits are enforced.
Note: The connection rate limit applies only when the real servers
belong to a Layer 4 virtual server. If you add a real server pool with this
setting configured to a Layer 7 virtual server, for example, the setting
is ignored.
Note: Connection Rate Limit is not supported for FTP or SIP servers.
health-check-inherit Enable to inherit the health check settings from the parent configuration.
Disable to specify health check settings in this member configuration.
health-check-relation l AND—All of the selected health checks must pass for the server to the
considered available.
l OR—One of the selected health checks must pass for the server to be
considered available.
FortiADC Handbook 143
Fortinet Technologies, Inc.
config load-balance config load-balance pool
If you do not specify a cookie name, it is set to the pool member server
name string.
pool_member_server_name Real server member configuration name to appear in logs and reports.
Alphabetic, numeric, underscore (_), and hyphen (-) characters are
allowed.
pool_member_service_port Backend server listening port number. Usually HTTP is 80, HTTPS is
443, FTP is 21, SMTP is 25, DNS is 53, POP3 is 110, IMAP4 is 143,
RADIUS is 1812, and SNMP is 161.
l A server is coming back online after the health check monitor detected it
was down.
l A network service is brought up before other daemons have finished
initializing and therefore the server is using more CPU and memory
resources than when startup is complete.
To avoid connection problems, specify the separate warm-up rate,
recovery rate, or both.
rs-profile-inherit Enable to inherit the real server profile from the pool configuration. Disable
to specify the real server profile in this member configuration.
real-server-profile If not configured to inherit the pool setting, specify a real server profile.
Real server profiles determine settings for communication between
FortiADC and the backend real servers.
FortiADC Handbook 145
Fortinet Technologies, Inc.
config load-balance config load-balance pool
warm-rate Maximum connection rate while the server is starting up. The default
is 10 connections per second. The valid range is 1 to 86,400
connections per second.
The warm up calibration is useful with servers that have the network
service brought up before other daemons have finished initializing. As
the servers are brought online, CPU and memory are more utilized
than they are during normal operation. For these servers, you define
separate rates based on warm-up and recovery behavior.
warm-up If the server cannot initially handle full connection load when it begins
to respond to health checks (for example, if it begins to respond when
startup is not fully complete), indicate how long to forward traffic at a
lesser rate. The default is 0 (disabled). The valid range is 1 to 86,400
seconds.
Example
FortiADC-VM # config load-balance pool
FortiADC-VM (pool) # edit lb-pool
Add new entry 'lb-pool' for node 1705
Use this command to configure virtual server profiles. A profile is a configuration object that defines how you want
the FortiADC virtual server to handle traffic for specific protocols. Virtual server profiles determine settings used in
network communication on the client-FortiADC segment, in contrast to real server profiles, which determine the
settings used in network communication on the FortiADC-real server segment.
Table 10 describes usage for profile type, including compatible virtual server types, load balancing methods, and
persistence methods.
FTP Use with FTP servers. Layer Round Robin, Least Source Address,
4 Connections, Fastest Source Address
Response Hash
FortiADC Handbook 147
Fortinet Technologies, Inc.
config load-balance config load-balance profile
HTTPS Use for secured web Layer Same as HTTP Same as HTTP,
server traffic when 7, plus SSL Session ID
offloading TLS/SSL Layer
from the backend 2
servers. You must
import the backend
server certificates into
FortiADC and select
them in the HTTPS
profile.
HTTP Use for unsecured Layer Round Robin, Least Source Address
Turbo HTTP traffic that does 7 Connections, Fastest
not require advanced Response
features like caching,
compression, content
rewriting, rate
limiting, Geo IP
blocking, or source
NAT. The profile can
be used with content
routes and
destination NAT, but
the HTTP request
must be in the first
data packet.
RDP Use with Windows Ter- Layer 7 Round Robin, Least Con- Source Address, Source
minal Server (remote nections Address Hash, Source
desktop protocol). Address-Port Hash, RDP
Cookie
SIP Use with applications that Layer 7 Round Robin, URI Hash, Source Address, Source
use session initiation pro- Full URI Hash Address Hash, Source
tocol (SIP), such as VoIP, Address-Port Hash, SIP
instant messaging, and Call ID
video.
FortiADC Handbook 149
Fortinet Technologies, Inc.
config load-balance config load-balance profile
TCP Use for other TCP Layer Layer 4: Round Source Address,
protocols. 4, Robin, Least Source Address
Layer Connections, Fastest Hash
2 Response
Layer 2: Round
Robin, Least
Connections, Fastest
Response,
Destination IP Hash
TCPS Use for secured TCP Layer Layer 7: Round Source Address,
when offloading 7, Robin, Least Source Address
TLS/SSL from the Layer Connections Hash, Source
backend servers. Like 2 Address-Port Hash,
Layer 2: Round
the HTTPS profile, SSL Session ID
Robin, Least
you must import the
Connections,
backend server
Destination IP Hash
certificates into
FortiADC and select
them in the TCPS
profile.
UDP Use for other UDP Layer Layer 4: Round Source Address,
protocols. 4, Robin, Least Source Address
Layer Connections, Fastest Hash
2 Response
Layer 2: Round
Robin, Least
Connections, Fastest
Response,
Destination IP Hash
DNS Used with DNS servers Layer Round Robbin, Least Con- Not supported.
7 nections
IP Combines with Layer 2 Layer Round Robbin only Source Address, Source
TCP/UDP/HTTP virtual 2 Address Hash
server to balance the rest
of the IP packets passed
through FortiADC. When
running the IP protocol 0
virtual servers, the traffic
always tries to match none
protocol 0 virtual servers
first.
DIAMETER Used with Diameter Layer Round Robbin only Source Address
server. 7
MySQL Used with MySQL service Layer 7 Round Robbin, Least Con- Not supported
to load- balance MySQL nections
requests among the
MySQL servers. It has two
working modes: one is
"single-master" and the
other is "sharding-data".
Creating an MySQL profile
also adds the MySQL-type
health-check.
RTMP Used to configure RTSP Layer 7 Round Robbin, Least Con- Source Address, Source
profiles. nections Address Hash
RTSP Used to configure RTMP Layer 7 Round Robbin, Least Con- Source Address, Source
profiles. nections Address Hash
SMTP Used with SMTP servers. Layer 7 Round Robbin, Least Con- Source Address, Source
nections Address Hash
Table 11 provides a summary of the predefined profiles. You can select predefined profiles in the virtual server
configuration, or you can create user-defined profiles, especially to include configuration objects like certificates,
caching settings, compression options, and IP reputation.
Profile Defaults
IP Reputation—disabled
IP Reputation—disabled
FortiADC Handbook 151
Fortinet Technologies, Inc.
config load-balance config load-balance profile
Profile Defaults
Buffer Pool—enabled
Source Address—disabled
X-Forwarded-For—disabled
HTTP Mode—ServerClose
Compression—none
Caching—none
IP Reputation—disabled
IP Reputation—disabled
IP Reputation—disabled
Profile Defaults
Buffer Pool—enabled
Source Address—disabled
IP Reputation—disabled
Server Keepalive—enabled
Client Keepalive—disabled
Client Protocol—UDP
Server Protocol—unset
FortiADC Handbook 153
Fortinet Technologies, Inc.
config load-balance config load-balance profile
Profile Defaults
Buffer Pool—enabled
Source Address—disabled
IP Reputation—disabled
SSL Ciphers—none
Certificate Group—LOCAL_CERT_
GROUP
Profile Defaults
Buffer Pool—enabled
Source Address—disabled
X-Forwarded-For—disabled
HTTP Mode—ServerClose
Compression—none
Caching—none
IP Reputation—disabled
SSL Ciphers—none
Certificate Group—LOCAL_CERT_
GROUP
FortiADC Handbook 155
Fortinet Technologies, Inc.
config load-balance config load-balance profile
Profile Defaults
LB_PROF_IP IP Reputation—Disabled
Geo IP Whitelist—None
Timeout IP Session—100
LB_PROF_RTSP Max-header-size—4096
Client-address —Disable
LB_PROF_DIAMETER server-close-propagation—Disable
Idle-timeout —300
l You must have already created configuration objects for certificates, caching, and compression if you want the
profile to use them.
l You must have read-write permission for load balance settings.
Syntax
config load-balance profile
edit <name>
set type {ftp | http | https | radius | rdp | sip | tcp | tcps | turbohttp | udp |
diameter}
set timeout_tcp_session <integer>
set timeout_tcp_session_after_FIN <integer>
set timeout-radius-session <integer>
set timeout_udp_session <integer>
set buffer-pool {enable|disable}
set caching <datasource>
set cache-response-type {single-answer | round-robin}
set client-address {enable|disable}
set client-timeout <integer>
set compression <datasource>
set connect-timeout <integer>
set http-keepalive-timeout <integer>
set http-mode {KeepAlive|OnceOnly|ServerClose}
set http-request-timeout <integer>
set http-x-forwarded-for {enable|disable}
set http-x-forwarded-for-header <string>
set queue-timeout <integer>
set server-timeout <integer>
set tune-bufsize <integer>
set tune-maxrewrite <integer>
set ip-reputation {enable|disable}
set geoip-list <datasource>
set whitelist <datasource>
set geoip-redirect <string>
set client-keepalive {enable|disable}
set client-protocol {tcp|udp}
set failed-client {drop|send}
set failed-client-str <string>
set failed-server {drop|send}
set failed-server-str <string>
set max-size <integer>
set server-keepalive {enable|disable}
set server-keepalive-timeout <integer>
set server-protocol {tcp|udp}
set sip-insert-client-ip {enable|disable}
config client-request-header-erase
edit <No.>
set type {all|first}
set string <string>
next
end
config client-request-header-insert
edit <No.>
set type {append-always | append-if-not-exist | insert-always insert-if-not-
exist}
set string <string>
next
end
config client-response-header-erase
edit <No.>
set type {all|first}
set string <string>
next
end
config client-response-header-insert
FortiADC Handbook 157
Fortinet Technologies, Inc.
config load-balance config load-balance profile
edit <No.>
set type {append-always | append-if-not-exist | insert-always insert-if-not-
exist}
set string <string>
next
end
config server-request-header-erase
edit <No.>
set type {all|first}
set string <string>
next
end
config server-request-header-insert
edit <No.>
set type {append-always | append-if-not-exist | insert-always insert-if-not-
exist}
set string <string>
next
end
config server-response-header-erase
edit <No.>
set type {all|first}
set string <string>
next
end
config server-response-header-insert
edit <No.>
set type {append-always | append-if-not-exist | insert-always insert-if-not-
exist}
set string <string>
next
end
next
end
The following commands are used to invoke the "LB_PROF_DNS" profile in Layer-7 virtual servers.
config load-balance profile
edit "dns"
set caching {enable|disable}
set malform-query-action {drop|forward}
set max-cache-age <integer>
set max-cache-entry-size <integer>
set max-cache-size <integer>
set max-query-length <integer>
set redirect-to-tcp-port {enable|disable}
next
end
The following commands are used to invoke the "LB_PROF_IP" profile in Layer-2 virtual servers. When the profile
of a Layer-2 virtual server is set to "LB_PROF_IP", you must specify the protocol numbers the virtual server can
accept.
config load-balance profile
edit "ip"
set type ip
set timeout-ip-session <integer>
set ip-reputation {enable|disable}
set geoip-list <string>
set whitelist <string>
next
end
FortiADC Handbook 159
Fortinet Technologies, Inc.
config load-balance config load-balance profile
end
next
end
The following commands are used to configure a MySQL profile in data-sharding mode:
config load-balance profile
edit <name>
set mysql-mode sharding
config mysql-sharding
edit <id>
set type range
set table <table name>
set key <column name>
set group <group id>:<range> <group id>:<range> ... # such as set groups
0:0-999 1:1000-9999
next
edit <id>
set type hash
set database <database name>
set table <table name>
set key <column name>
set group <group id> <group id>
next
end
next
end
The following commands are used to configure MySQL profile-specific pool members:
config load-balance pool
edit <pool name>
config pool_member
edit 1
set mysql-group-id <group id> #for Data Sharding
set mysql-read-only enable #for Slave
next
end
next
end
The following commands are used to create an RTSP profile:
config load-balance profile
edit "RTSP"
set type rtsp
set max-header-size <size>
set client-address <enable/disable>
next
The following commands are used to configure an RTMP profile:
config load-balance profile
edit "RTMP"
set type rtmp
set client-address <enable/disable>
next
The following commands are used to configure a diameter proxy_mode profile:
config load-balance profile
edit "diameter_proxy"
set type diameter
set identity <string>
IP
RTSP
RTMP
DNS
FortiADC Handbook 161
Fortinet Technologies, Inc.
config load-balance config load-balance profile
FTP
HTTP
FortiADC Handbook 163
Fortinet Technologies, Inc.
config load-balance config load-balance profile
l SSLv2
l SSLv3
l TLSv1.0
l TLSv1.1
l TLSv1.2
We recommend retaining the default list. If
necessary, you can specify a space-separated list
of SSL versions you want to support for this
profile.
FortiADC Handbook 165
Fortinet Technologies, Inc.
config load-balance config load-balance profile
RADIUS
RDP
TCP
TCPS
TurboHTTP
UDP
SIP
FortiADC Handbook 167
Fortinet Technologies, Inc.
config load-balance config load-balance profile
l tcp
l udp (default)
l tcp
l udp
Default is "unset", so the client-side protocol
determines the server-side protocol.
type l all
l first
type l append-always
l append-if-not-exist
l insert-always
l insert-if-not-exist
type l all
l first
FortiADC Handbook 169
Fortinet Technologies, Inc.
config load-balance config load-balance profile
type l append-always
l append-if-not-exist
l insert-always
l insert-if-not-exist
type l all
l first
type l append-always
l append-if-not-exist
l insert-always
l insert-if-not-exist
Diameter
Identity Sets the value of Diameter AVP 264. This AVP can
be a character string and specifies the identity of
the originating host for Diameter messages.
Realm Sets the value of Diameter AVP 296. This AVP can
be a character string and specifies the Diameter
realm from which Diameter messages, including
requests, are originated.
FortiADC Handbook 171
Fortinet Technologies, Inc.
config load-balance config load-balance profile
product-name Sets the value of Diameter AVP 269. This AVP can
be a character string and specifies the product; for
example, “fortiadc”.
Vendor-id Sets the value of Diameter AVP 266. This AVP can
be a character string and specifies the vendor; for
example, “156”.
Disabled by default.
Example
The following example shows the list of predefined profiles:
FortiADC-VM # get load-balance profile
== [ LB_PROF_TCP ]
== [ LB_PROF_UDP ]
== [ LB_PROF_HTTP ]
== [ LB_PROF_TURBOHTTP ]
== [ LB_PROF_FTP ]
== [ LB_PROF_RADIUS ]
== [ LB_PROF_SIP ]
== [ LB_PROF_TCPS ]
== [ LB_PROF_HTTPS ]
== [ LB_PROF_HTTP2_H2C]
== [ LB_PROF_HTTP2_H2 ]
== [ LB_PROF_SMTP ]
== [ LB_PROF_RTSP ]
== [ LB_PROF_RTMP ]
== [ LB_PROF_DIAMETER ]
== [ LB_PROF_IP ]
== [ LB_PROF_RDP ]
== [ LB_PROF_HTTP_SERVERCLOSE ]
== [ LB_PROF_HTTPS-SERVERCLOSE ]
== [ LB_PROF_DNS ]
The following example shows the details of the predefined HTTPS profile:
FortiADC-VM (profile) # get load-balance profile LB_PROF_HTTPS
type : https
tune-bufsize : 8030
tune-maxrewrite : 1024
client-timeout : 50
server-timeout : 50
connect-timeout : 5
queue-timeout : 5
http-request-timeout : 50
http-keepalive-timeout : 50
buffer-pool : enable
client-address : disable
http-x-forwarded-for : disable
http-x-forwarded-for-header :
FortiADC Handbook 173
Fortinet Technologies, Inc.
config load-balance config load-balance profile
http-mode : ServerClose
compression :
caching :
ip-reputation : disable
geoip-list :
whitelist :
geoip-redirect : http://
edit "dns"
set type dns
set malform-query-action drop
set redirect-to-tcp-port disable
set caching enable
set max-query-length 512
set max-cache-age 3600
set max-cache-entry-size 512
set max-cache-size 10
next
end
FortiADC Handbook 175
Fortinet Technologies, Inc.
config load-balance config load-balance real-server-ssl-profile
Use this command to configure real server profiles. A real server profile determines settings used in network
communication on the FortiADC-server segment, in contrast to a virtual server profile, which determines the
settings used in network communication on the client-FortiADC segment.
Table 12 provides a summary of the predefined profiles. You can select predefined profiles in the real server
configuration, or you can create user-defined profiles.
Profile Defaults
Profile Defaults
FortiADC Handbook 177
Fortinet Technologies, Inc.
config load-balance config load-balance real-server-ssl-profile
Profile Defaults
Syntax
config load-balance real-sever-ssl-profile
edit <name>
set ssl {enable|disable}
set allow-ssl-versions {sslv3 tlsv1.0 tlsv1.1 tlsv1.2}
set server-cert-verify <datasource>
set ssl-ciphers {ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES256-SHA384 ECDHE-
ECDSA-AES256-SHA ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-ECDSA-AES128-SHA256 ECDHE-
ECDSA-AES128-SHA ECDHE-ECDSA-DES-CBC3-SHA ECDHE-ECDSA-RC4-SHA ECDHE-RSA-AES256-
GCM-SHA384 ECDHE-RSA-AES256-SHA384 ECDHE-RSA-AES256-SHA DHE-RSA-AES256-GCM-
SHA384 DHE-RSA-AES256-SHA256 DHE-RSA-AES256-SHA AES256-GCM-SHA384 AES256-SHA256
AES256-SHA ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-
SHA DHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES128-SHA256 DHE-RSA-AES128-SHA AES128-
GCM-SHA256 AES128-SHA256 AES128-SHA ECDHE-RSA-RC4-SHA RC4-SHA RC4-MD5 ECDHE-RSA-
DES-CBC3-SHA EDH-RSA-DES-CBC3-SHA DES-CBC3-SHA EDH-RSA-DES-CBC-SHA DES-CBC-SHA
eNULL }
set ssl-customize-ciphers-flag {enable|disable}
set ssl-customized-ciphers <string>
set ssl-session-reuse {enable|disable}
set ssl-session-reuse-limit <integer>
set ssl-sni-forward {enable|disable}
set ssl-tls-ticket-reuse {enable|disable}
set server-OCSP-stapling-support {enable|disable}
next
end
ssl Enable/disable SSL for the connection between the FortiADC and the
real server.
ssl-sni-forward Enable/disable forwarding the client SNI value to the server. The SNI
value will be forwarded to the real server only when the client-side Cli-
entHello message contains a valid SNI value; otherwise, nothing is
forwarded.
Example
FortiADC-VM # config load-balance real-server-ssl-profile
FortiADC-VM (real-server-ss~-) # get
== [ LB_RS_SSL_PROF_NONE ]
== [ LB_RS_SSL_PROF_LOW_SSLV2 ]
== [ LB_RS_SSL_PROF_LOW_SSLV3 ]
== [ LB_RS_SSL_PROF_MEDIUM ]
== [ LB_RS_SSL_PROF_HIGH ]
== [ LB_RS_SSL_PROF_ECDSA ]
== [ LB_RS_SSL_PROF_ECDSA_SSLV3 ]
== [ LB_RS_SSL_PROF_ECDSA_TLS12 ]
== [ LB_RS_SSL_PROF_ENULL ]
== [ LB_RS_SSL_PROF_DEFAULT ]
FortiADC Handbook 179
Fortinet Technologies, Inc.
config load-balance config load-balance reputation
The FortiGuard IP Reputation service provides a regularly updated data set that identifies compromised and
malicious clients.
The IP reputation configuration allows you to specify the action the system takes when it receives traffic from a
client with an IP address on the list. Table 13 lists limitations for IP reputation actions.
Redirect IPv4 only Not supported for RADIUS, FTP, TCP, UDP.
Send 403 IPv4 only Not supported for RADIUS, FTP, TCP, UDP.
Forbidden
Note: IP reputation is also not supported for Layer 4 virtual servers when the Packet Forwarding Mode is Direct
Routing.
Basic Steps
Syntax
config load-balance reputation
edit <No.>
set action {deny | pass | redirect | send-403-forbidden}
set category <string>
set log {enable|disable}
set severity {high | low | medium}
set status {enable|disable}
next
end
action l Pass
l Deny
l Redirect
l Send 403 Forbidden
Note: Layer 4 and TCPS virtual servers do not support Redirect or Send 403
Forbidden. If you apply an IP reputation configuration that uses these options to a
Layer 4 or TCPS virtual server, FortiADC logs the action as Redirect or Send 403
Forbidden, but in fact denies the traffic.
l Botnet
l Anonymous Proxy
l Phishing
l Spam
l Others
severity The severity to apply to the event. Severity is useful when you filter and sort logs:
l Low
l Medium
l High
Example
FortiADC-VM # get load-balance reputation
== [ 1 ]
== [ 2 ]
== [ 3 ]
== [ 4 ]
== [ 5 ]
FortiADC Handbook 181
Fortinet Technologies, Inc.
config load-balance config load-balance reputation-exception
Use this command to add exceptions to IP reputation rules. If enabled, the specified IP address or range of
IP addresses will be allowed to pass through.
l You must have read-write permission for load balancing feature settings.
Syntax
config load-balance reputation-exception
edit <No.>
status Enable or disable the exception. You might have occasion to toggle to exception
off and on.
Use this command to create a new schedule-pool which can control the working real server by schedule-group
(config system schedule-group).
Syntax
config load-balance schedule-pool
edit <name>
set load-balance-pool <datasource>
set schedule <datasource>
next
end
Example
config load-balance schedule-pool
edit "new"
set load-balance-pool example-pool
set schedule example-schedule
next
end
The virtual server configuration supports three classes of application delivery control:
l Layer 7—Persistence, load-balancing, and routing are based on Layer-7 objects, such as HTTP headers, cookies,
and so on.
l Layer 4—Persistence, load-balancing, and network address translation are based on Layer-4 objects, such as
source and destination IP address.
l Layer 2—This feature is useful when the request’s destination IP is unknown and you need to load-balance
connections between multiple next-hop gateways.
Before you begin:
FortiADC Handbook 183
Fortinet Technologies, Inc.
config load-balance config load-balance virtual-server
l You must have a deep understanding of the backend servers and your load balancing objectives.
l You must have configured a real server pool (required) and other configuration objects that you can incorporate into
the virtual server configuration, such as persistence rules, user-defined profiles, source IP address pools if you are
deploying full NAT, content routes and rewriting rules, and error messages.
l You must have read-write permission for load balancing settings.
Syntax
config load-balance virtual-server
edit <vs-name>
set type {l2-load-balance | l4-load-balance | l7-load-balance}
set addr-type {ipv4|ipv6}
set alone {enable|disable}
set auth-policy <datasource>
set clone-pool <datasource>
set clone-traffic-type <both-sides/client-side/server-side>
set comments <string>
set connection-limit <integer>
set connection-pool <datasource>
set connection-rate-limit <integer>
set content-rewriting {enable|disable}
set content-rewriting-list <string>
set content-routing {enable|disable}
set content-routing-list <string>
set error-msg <string>
set geoip-block-list <datasource>
set whitelist <datasource>
set interface <datasource>
set ip <class_ip>
set l2-exception-list <datasource>
set port <value> port range "portA-portB" or single port number "portA"
set port <number>
set load-balance-method <datasource>
set load-balance-persistence <datasource>
set load-balance-pool <datasource>
set load-balance-profile <datasource>
set multi-process <integer>
set packet-forwarding-method { FullNAT|NAT|NAT46|NAT64|direct_routing| tunneling}
set ippool-list <datasource> <datasource> ...
set scripting-flag enable
set scripting-list <datasource> <datasource> ...
set status {enable|disable|maintain}
set traffic-log {enable|disable}
set event-log {enable|disable}
set trans-rate-limit <integer>
set waf-profile <datasource>
set warm-rate <integer>
set warm-up <integer>
set traffic-group <string>
set ssl-mirror <enable/disable>
Note: IPv6 is not supported for FTP, HTTP Turbo, RDP, or SIP
profiles.
comments A string to describe the purpose of the configuration, to help you and other
administrators more easily identify its use. Put phrases in quotes. For
example: “Customer ABC”.
FortiADC Handbook 185
Fortinet Technologies, Inc.
config load-balance config load-balance virtual-server
You can apply a connection limit per real server and per virtual server.
Both limits are enforced. Attempted connections that are dropped by
security rules are not counted.
connection-rate-limit With all Layer 4 profiles, and with the Layer 2 TCP profile, you can limit
the number of new connections per second. The default is 0 (disabled).
The valid range is 1 to 86,400 connections per second.
You can apply a connection rate limit per real server and per virtual
server. Both limits are enforced. Attempted connections that are
dropped by security rules are not counted.
Note: You can select multiple content rewriting rules in the virtual
server configuration. Rules that you add are consulted from top to
bottom. The first rule to match is applied. If the traffic does not match
any of the content rewriting rule conditions, the header is not rewritten.
Note: You can specify multiple content routing rules in the virtual
server configuration. Rules that you add are consulted from top to
bottom. The first rule to match is applied. If the traffic does not match
any of the content routing rule conditions specified in the virtual server
configuration, the system behaves unexpectedly. Therefore, it is
important that you create a “catch all” rule that has no match
conditions. In the virtual server configuration, this rule should be
ordered last so it can be used to forward traffic to a default pool.
error-page If you do not use an error page, you can enter an error message to be
returned to clients in the event no server is available.
interface Network interface that receives client traffic for this virtual server.
Note: A L7 virtual server can have up to 256 ports, but there is no such
a limit for L4 virtual servers.
port range Specify the number of ports in a port range. For example, if port is 80,
and port-range is 254, then the virtual port range starts at 80 and goes
to 334.
The default is 0 (no range). The valid range is 0-255. For SIP, the valid
range is 0-5.
Note: Not supported for FTP, HTTP Turbo, RADIUS, or Layer 2 TCP
profiles
FortiADC Handbook 187
Fortinet Technologies, Inc.
config load-balance config load-balance virtual-server
After you have specified the profile, the CLI commands are constrained
to the ones that are applicable to the specified profile type, not all of
the settings described in this table.
multi-process If your system has a multicore CPU, you can assign the number of CPU
cores to handle traffic for a virtual server. The valid range is 1 to 15.
ippool-list If you are configuring a Layer 4 virtual server and enable Full NAT,
NAT46, or NAT64, specify a space-separated list of IP address pool
configuration objects to be used for SNAT.
trans-rate-limit Limit the number of HTTP or SIP requests per second. The default is 0
(disabled). The valid range is 1 to 1,048,567 transactions per second.
The system counts each client request against the limit. When the
request rate exceeds the limit, the virtual server sends an HTTP 503
error response to the client.
FortiADC Handbook 189
Fortinet Technologies, Inc.
config load-balance config load-balance virtual-server
warm-rate Maximum connection rate while the virtual server is starting up. The
default is 10 connections per second. The valid range is 1 to 86,400
connections per second.
warm-up If the server cannot initially handle full connection load when it begins
to respond to health checks (for example, if it begins to respond when
startup is not fully complete), indicate how long to forward traffic at a
lesser rate. The default is 0 (disabled). The valid range is 1 to 86,400
seconds.
ssl-miror-intf Specify the outgoing interfaces be ssl-mirror interfaces. You can set up
to four outgoing interfaces.
pagespeed Set PageSpeed to let FortiADC speed up HTTP responses using its Web
Performance Optimization solutions.
max-persistence- Maximum persistence entries size. This command only works if load-bal-
entries ance-persistence is enabled with type source-address.
Example
FortiADC-VM # config load-balance virtual-server
FortiADC-VM (virtual-server) # edit lb-vs1
Add new entry 'lb-vs1' for node 1775
FortiADC Handbook 191
Fortinet Technologies, Inc.
config load-balance config load-balance web-category
load-balance-pool :
traffic-log : disable
warm-up : 0
warm-rate : 10
connection-rate-limit: 0
id : 0
clone-pool : 1
clone-traffic-type : both-sides
FortiADC-VM (lb-vs1) # set ip 192.168.200.1
FortiADC-VM (lb-vs1) # set interface port4
FortiADC-VM (lb-vs1) # set load-balance-profile LB_PROF_TCP
FortiADC-VM (lb-vs1) # set load-balance-method LB_METHOD_ROUND_ROBIN
FortiADC-VM (lb-vs1) # set load-balance-pool lb-pool
FortiADC-VM (lb-vs1) # end
Read-only. Displays the web filter categories imported from FortiGuard. You specify web categories when you
create web filter groups with the config load-balance web-filter-profile command.
http://fortiguard.com/webfilter
Before you begin:
Example
== [ Adult/Mature Content ]
== [ Bandwidth Consuming ]
== [ Security Risk ]
== [ General Interest - Personal ]
== [ General Interest - Business ]
See Also
l config system web-filter
Use this command to configure web filter profile. The web filter profile should include categories that should not
be processed by the outbound L2 SSL forward proxy feature. To address privacy concerns, you can include
categories such as "Personal Privacy", "Finance and Banking", "Health and Wellness", and Medicine.
Syntax
config load-balance web-filter-profile
edit <name>
set description <string>
config category-members
edit <No.>
set category <datasource>
next
end
next
end
description A string to describe the purpose of the configuration, to help you and other
administrators more easily identify its use. Put phrases in quotes. For example:
“Customer ABC”.
config member
category Specify a FortiGuard category or subcategory. Put phrases in quotes. For example:
“Personal Privacy”.
Example
FortiADC-docs # config load-balance web-filter-profile
FortiADC-VM (web-filter-pro~i) # edit fortiguard-categories2passthrough
Add new entry 'fortiguard-categories2passthrough' for node 4622
FortiADC Handbook 193
Fortinet Technologies, Inc.
config load-balance config load-balance web-sub-category
Read-only. Displays the web filter subcategories imported from FortiGuard. You specify web subcategories when
you create web filter groups with the config load-balance web-filter-profile command.
http://fortiguard.com/webfilter
Before you begin:
Example
== [ Pornography ]
== [ Dating ]
== [ Weapons (Sales) ]
== [ Advertising ]
== [ Brokerage and Trading ]
== [ Freeware and Software Downloads ]
== [ Games ]
== [ Web-based Email ]
== [ File Sharing and Storage ]
== [ Streaming Media and Download ]
== [ Malicious Websites ]
== [ Entertainment ]
== [ Arts and Culture ]
== [ Education ]
== [ Finance and Banking ]
== [ Health and Wellness ]
== [ Job Search ]
== [ Medicine ]
== [ News and Media ]
== [ Social Networking ]
== [ Political Organizations ]
== [ Reference ]
== [ Global Religion ]
== [ Search Engines and Portals ]
== [ Shopping ]
== [ General Organizations ]
== [ Society and Lifestyles ]
== [ Sports ]
== [ Travel ]
== [ Personal Vehicles ]
== [ Business ]
== [ Information and Computer Security ]
== [ Government and Legal Organizations ]
== [ Information Technology ]
== [ Armed Forces ]
== [ Dynamic Content ]
== [ Meaningless Content ]
== [ Web Hosting ]
== [ Marijuana ]
== [ Folklore ]
== [ Proxy Avoidance ]
== [ Phishing ]
== [ Plagiarism ]
== [ Sex Education ]
== [ Alcohol ]
== [ Tobacco ]
== [ Lingerie and Swimsuit ]
== [ Sports Hunting and War Games ]
== [ Web Chat ]
== [ Instant Messaging ]
== [ Newsgroups and Message Boards ]
== [ Digital Postcards ]
FortiADC Handbook 195
Fortinet Technologies, Inc.
config load-balance config load-balance whitelist
See Also
l config system web-filter
Use this command to configure the Geography IP address whitelist.You use the whitelist to permit requests from
clients that otherwise might be denied by the Geography IP address block list. For example, you might have a
good reason to block requests from the whole address range for a country, except for the addresses for your
known customers.
Syntax
config load-balance geoip-whitelist
edit <name>
set description <string>
set status {enable|disable}
config whitelist-member
edit <No.>
set ip-network <ip&netmask>
next
next
end
description A string to describe the purpose of the configuration, to help you and other
administrators more easily identify its use. Put phrases in quotes. For example:
“Customer ABC”.
config whitelist-member
ip-network Specify the IP address and CIDR-formatted subnet mask, separated by a forward
slash, such as 192.0.2.0/24. Dotted quad formatted subnet masks are not
accepted.
Example
FortiADC-VM # config load-balance whitelist
FortiADC Handbook 197
Fortinet Technologies, Inc.
config log config log fast_report
config log
Syntax
config log fast_report
edit <Name>
set module {slb|attack}
set history_runchart {enable|disable}
set range {1DAY | 1HOUR | 1MONTH| 1WEEK | 10MINS}
set traffic_data_type {bytes|sessions}
set slb_subtype {top_browser | top_dest | top_dev | top_domain | top_os | top_
referrer | top_session | top_source_country | top_src | top_url }
set filter_object {srccountry|dstcountry}
set filter_value <string>
set topx <integer>
set topy <integer>
next
end
l slb
l attack
Example
FortiADC-VM # config log fast_report
FortiADC-VM (fast_report) # edit fast-report
Add new entry 'fast-report' for node 4590
FortiADC-VM (fast-report) # get
module : slb
history_runchart : disable
range : 10MINS
traffic_data_type : bytes
slb_subtype : top_src
filter_object :
filter_value :
FortiADC-VM (fast-report) # set filter_object srccountry
FortiADC-VM (fast-report) # set filter_value "United States"
FortiADC-VM (fast-report) # end
Example
FortiADC-VM # config log fast_report
FortiADC-VM (fast_report) # edit "all_attack"
Add new entry 'all_attack' for node 4590
FortiADC-VM (all_attack) # set module attack
FortiADC-VM (all_attack) # set history_runchart enable
FortiADC-VM (all_attack) # set attack_sort_type count
FortiADC-VM (all_attack) # set attack_subtype top_attack_type_for_all
FortiADC-VM (all_attack) # unset filter_object
FortiADC-VM (all_attack) # unset filter_value
FortiADC-VM (all_attack) # set topx 5
FortiADC-VM (all_attack) # set topy 5
FortiADC-VM (all_attack) # get
module : attack
history_runchart : enable
attack_sort_type : count
attack_subtype : top_attack_type_for_all
filter_object :
filter_value :
topx : 5
topy : 5
FortiADC-VM (all_attack) #set filter_object srccountry
FortiADC Handbook 199
Fortinet Technologies, Inc.
config log config log report
Syntax
config log report
edit <name>
set email-format pdf
set email-attachname <string>
set email-body <string>
set email-compress {enable|disable}
set email-subject <string>
set on-schedule {enable|disable}
set period-relative {absolute|last-2-weeks|last-7-days|last-14-days|last-30-
days|last-N-days|last-N-hours|last-N-weeks| last-month|last-quarter|last-
week|this-month|this-quarter|this-week|this-year|today|yesterday}
set period-absolute-from <YYYY-MM-DD-HH:MM:SS>
set period-absolute-to <YYYY-MM-DD-HH:MM:SS>
set queryset <datasource>
set schedule-hour <integer>
set schedule-type {daily|weekdays}
set schedule-weekdays {friday monday saturday sunday thursday tuesday wednesday}
next
end
email-format Attachment format. Only PDF is supported. If you schedule reports and set
this option, the report is sent on schedule to all addresses in the config log
report email list.
schedule-hour 0-23.
schedule-weekdays If you do not schedule the report daily, specify the days on which to run it.
Example
FortiADC-docs # config log report
FortiADC-docs (report) # edit my_report
Add new entry 'my_report' for node 1962
FortiADC Handbook 201
Fortinet Technologies, Inc.
config log config log report email
FortiADC-docs (my_report) # set email-body "This report was sent by your website admin.
Please contact [email protected] to request changes to daily report metrics."
Before you begin, make sure you have read-write permission for log settings.
Syntax
config log report_email
edit <name>
set from <string>
set to <string>
next
end
Use this command if you need to configure report queries that are different from the predefined queries.
Syntax
config log report_queryset
edit <name>
set module {attack|dns|event|llb|slb}
set attack_sort_type count
set attack_subtype {top_destip_for_geo|top_destip_for_ipreputation|top_destip_for_
sysflood|top_destip_for_waf|top_source_country_for_geo|top_source_country_for_
ipreputation|top_source_country_for_waf|top_source_for_geo|top_source_for_
ipreputation|top_source_for_waf}
set dns_sort_type count
set dns_subtype {top_policy|top_source}
set event_sort_type count
set event_subtype {top_admin_config|top_admin_login|top_failed_admin_login}
set llb_subtype {top_link|slb_history_flow}
set slb_subtype {slb_history_flow|top_policy|top_source|top_source_country}
set traffic_data_type {sessions|bytes}
next
end
module Set the reporting module. This setting also filters the commands so
that only relevant options are available.
Example
FortiADC-docs # config log report_queryset
FortiADC-docs (report_queryset) # edit my_slb_query
Add new entry 'my_slb_query' for node 2514
FortiADC Handbook 203
Fortinet Technologies, Inc.
config log config log setting fast_stats
Use this command to enable or disable real-time statistics collection for fast reports. Enabled by default. Can be
disabled if you encounter issues.
Syntax
config log setting fast_stats
set status {enable|disable}
set traffic-log-status {enable|disable}
set traffic-log-category slb
set attack-log-status {enable|disable}
set attack-log-category synflood
ipreputation waf geo av
end
traffic-log-category Enable/disable fast statistics for traffic categories. SLB is enabled by default.
attack-log-category Enable/disable fast statistics for attack categories. Syn flood, IP reputation,
WAF, GEO, and AV are enabled by default.
Example
docs-2 # config log setting fast_stats
docs-2 (fast_statis) # get
status : enable
traffic-log-status : enable
traffic-log-category : slb
attack-log-status : enable
attack-log-category : synflood ipreputation waf geo
The high speed log feature is intended for deployments that require a high volume of logging activity. The logs
are sent in binary format so they can be sent at a high speed. If you want to use high speed logging, contact
Fortinet to obtain a utility for handling the binary format.
The feature supports traffic logs. Event logs and security logs are not supported.
Syntax
config log setting highspeed
set server <string>
set status {enable | disable}
set traffic-log-status {enable | disable}
set traffic-log-category {slb|dns}
set udpport <integer>
end
FortiADC Handbook 205
Fortinet Technologies, Inc.
config log config log setting local
traffic-log-status Enable/disable logging for traffic processed by the load balancing modules.
udpport Listening port number of the syslog server. Usually this is UDP port 514.
Typically, you use the local log to capture information about system health and system administration activities.
We recommend that you use local logging during evaluation and verification of your initial deployment, and then
configure remote logging to send logs to a log management repository where they can be stored long term and
analyzed using preferred analytic tools.
Local log disk settings are configurable. You can select a subset of system events, traffic, and security logs.
Syntax
config log setting local
set attack-log-cached-lines {0|100|500|800|1000|2000|5000|10000}
set attack-log-category {synflood ipreputation waf geo}
set attack-log-status {enable|disable}
set disk-full {overwrite | nolog}
set event-log-cached-lines {0|100|500|800|1000|2000|5000|10000}
set event-log-category {admin configuration fw glb health-check llb slb system user}
set event-log-status {enable|disable}
set loglevel {alert | critical | debug | emerge | error | information | notification |
warning}
set rate_limit <integer>
set rotation-size <integer>
set status {enable|disable}
set traffic-log-cached-lines {0|100|500|800|1000|2000|5000|10000}
set traffic-log-category {slb | dns | llb}
set traffic-log-status {enable|disable}
set script-log-status {enable|disable}
set script-log-category {slb}
end
attack-log-cached-lines Limit the number of logs that are cached. The default is 0 (disabled).
Valid multiples are 100, 500, 800, 1000, 2000, 5000, 10000. If 0,
every generated log is written to disk immediately. If 1000, logs are
written to disk in batches of 1000.
disk-full Specify log behavior when the maximum disk space for local logs
(30% of total disk space) is reached:
event-log-cached-lines Limit the number of logs that are cached. The default is 0 (disabled).
Valid multiples are 100, 500, 800, 1000, 2000, 5000, 10000. If 0,
every generated log is written to disk immediately. If 1000, logs are
written to disk in batches of 1000.
l Configuration—Configuration changes.
l Admin—Administrator actions.
l System—System operations, warnings, and errors.
l User—Authentication results logs.
l Health Check—Health check results and client certificate validation
check results.
l SLB—Notifications, such as connection limit reached.
l LLB—Notifications, such as bandwidth thresholds reached.
l GLB—Notifications, such as the status of associated local SLB and
virtual servers.
l Firewall—Notifications for the "firewall" module, such as SNAT source IP
pool is using all of its addresses.
FortiADC Handbook 207
Fortinet Technologies, Inc.
config log config log setting local
loglevel Specify the lowest severity for which alerts are sent:
rotation-size Maximum size for a local log file. The default is 200 MB. When the
current log file reaches this size, a new file is created.
traffic-log-cached-lines Limit the number of logs that are cached. The default is 0 (disabled).
Valid multiples are 100, 500, 800, 1000, 2000, 5000, 10000. If 0,
every generated log is written to disk immediately. If 1000, logs are
written to disk in batches of 1000.
Example
FortiADC-VM (root) # get log setting local
status : enable
rotation-size : 199
disk-full : overwrite
loglevel : information
event-log-status : enable
event-log-category : configuration admin health_check system user slb llb glb fw
traffic-log-status : enable
traffic-log-category : slb dns
attack-log-status : enable
attack-log-category : synflood ipreputation waf geo
script-log-status : enable
script-log-category : slb
event-log-cached-lines : 0
traffic-log-cached-lines : 0
attack-log-cached-lines : 0
rate_limit : 0
A remote syslog server is a system provisioned specifically to collect logs for long term storage and analysis with
preferred analytic tools.
Syntax
config log setting remote
edit <name>
set attack-log-status {enable|disable}
set attack-log-category {synflood ipreputation waf geo}
set comma-separated-value {enable|disable}
set event-log-status {enable|disable}
set event-log-category {admin configuration fw glb health-check llb slb system user}
set facility {alert | audit | auth | authpriv | clock | cron | daemon | ftp | kern |
local0, local1, local2, local3, local4, local5, local6, local7, lpr, mail, news,
ntp}
set loglevel {alert | critical | debug | emerge | error | information | notification
| warning}
set port <integer>
set server <string>
set status {enable|disable}
set traffic-log-status {enable|disable}
set traffic-log-category {slb dns llb}
set script-log-status {enable|disable}
set script-log-category {slb}
next
end
FortiADC Handbook 209
Fortinet Technologies, Inc.
config log config log setting remote
l Configuration—Configuration changes.
l Admin—Administrator actions.
l System—System operations, warnings, and errors.
l User—Authentication results logs.
l Health Check—Health check results and client certificate validation check
results.
l SLB—Notifications, such as connection limit reached.
l LLB—Notifications, such as bandwidth thresholds reached.
l GLB—Notifications, such as the status of associated local SLB and virtual
servers.
l Firewall—Notifications for the "firewall" module, such as SNAT source IP pool
is using all of its addresses.
facility Identifier that is not used by any other device on your network when
sending logs to FortiAnalyzer/syslog.
loglevel Specify the lowest severity for which alerts are sent:
port Listening port number of the syslog server. Usually this is UDP port 514.
traffic-log-category l SLB—Server Load Balancing traffic logs related to sessions and throughput.
l GLB—Global Load Balancing traffic logs related to DNS requests.
l LLB—Link Load Balancing traffic logs related to sessions and throughput.
Example
FortiADC-VM # config log setting remote
FortiADC-VM (remote) # edit 1
Add new entry '1' for node 547
FortiADC Handbook 211
Fortinet Technologies, Inc.
config log config log setting remote
config router
Network systems maintain route tables to determine where to forward TCP/IP packets. Use this command to
configure ISP routes. ISP routes can be used for outbound traffic and link load balancing traffic.
Routes for outbound traffic are chosen according to the following priorities:
1. Link local routes—Self-traffic uses link local routes.
2. LLB policy route—Configured policy routes have priority over default routes.
3. System policy route—Configured policy routes have priority over default routes.
4. Static route / ISP route / OSPF route—Priority is based on the distance metric. By default, distance for static
routes is 10, for ISP routes is 20, and for OSPF routes is 110. The distance metric is configurable for static routes
and OSPF routes, but not ISP routes.
5. Default LLB route—Default routes have lower priority than configured routes.
6. Default static route / OSPF route—Default routes have lower priority than configured routes.
Before you begin:
Syntax
config router isp
edit <No.>
set destination <datasource>
set gateway <class_ip>
next
end
Note: Two ISP routes cannot reference the same ISP address book. The ISP
routing feature does not support multipath routing.
gateway IP address of the gateway router that can route packets to the destination IP
address that you have specified.
Example
FortiADC-VM # config router isp
See also
l get router info routing-table
Use this command to configure a table of MD5 keys used in OSPF cryptographic authentication. The table can
include up to 256 entries. All OSPF interfaces that want to learn routes from each other must be configured with
the same authentication type and password or MD5 key (one match is enough).
OSPF cryptographic authentication involves the use of a shared secret key to authenticate all router traffic on a
network. The key is never sent over the network in the clear—a packet is sent and a condensed and encrypted
form of the packet is appended to the end of the packet. A non-repeating sequence number is included in the
OSPF packet to protect against replay attacks that could try to use already sent packets to disrupt the network.
When a packet is accepted as authentic, the authentication sequence number is set to the packet sequence
number. If a replay attack is attempted, the packet sent will be out of sequence and ignored.
Syntax
config router md5-ospf
edit <name>
config md5-member
edit <No.>
set md5-key <string>
next
end
next
end
<No.> A number 1-255. Each member key ID must be unique to its member list.
md5-key A string of up to 16 characters to be hashed with the cryptographic MD5 hash function.
FortiADC Handbook 214
Fortinet Technologies, Inc.
config router config router ospf
Example
FortiADC-docs # config router md5-ospf
FortiADC-docs (md5-ospf) # edit md5-key-pool
Add new entry 'md5-key-pool' for node 3752
FortiADC-docs (md5-key-pool) # config md5-member
FortiADC-docs (md5-member) # edit 1
Add new entry '1' for node 3754
FortiADC-docs (1) # set key 0123456789abcdef
FortiADC-docs (1) # end
FortiADC-docs (md5-key-pool) # end
FortiADC-docs #
Use this command to configure OSPF. FortiADC supports OSPF version 2. OSPF (Open Shortest Path First) is
described in RFC2328.
OSPF is a link-state interior routing protocol. Compared with RIP, OSPF can provide scalable network support
and faster convergence times. OSPF is widely used in large networks such as ISP backbone and enterprise
networks.
Syntax
config router ospf
set router-id <integer>
set default-metric <integer>
set distance <integer>
set default-information-originate {always|enable|disable}
set default-information-metric-type {1|2}
set default-information-metric <integer>
set redistribute-connected {enable|disable}
set redistribute-connected-metric-type {1|2}
set redistribute-connected-metric <integer>
set redistribute-static {enable|disable}
set redistribute-static-metric-type {1|2}
set redistribute-static-metric <integer>
config area
edit <class_ip>
set authentication {md5|none|text}
next
end
config network
edit <No.>
set area <datasource>
set prefix <ip&netmask>
next
end
config ospf-interface
edit <name>
set authentication {md5|none|text}
set authentication-md5 <datasource>
set authentication <text>
set cost <integer>
set dead-interval <integer>
set hello-interval <integer>
set interface <datasource>
set mtu-ignore {enable|disable}
set network-type {broadcast | point-to-multipoint | point-to-point}
set priority <integer>
set retransmit-interval <integer>
set transmit-delay <integer>
next
end
end
router-id 32-bit number that identifies the router. The router ID uses dotted
decimal notation. sets the router-ID of the OSPF process. The router-
ID must be an IP address of the router, and it must be unique within
the entire OSPF domain to the OSPF speaker.
default-information- l 1
metric-type
l 2
redistribute-connected- l 1
metric-type
l 2
FortiADC Handbook 216
Fortinet Technologies, Inc.
config router config router ospf
redistribute-static Enable/disable to redistribute static routes into OSPF, with the metric
type and metric set if specified. Redistributed routes are distributed
into OSPF as Type-5 External LSAs into links to areas.
redistribute-static- l 1
metric-type
l 2
config area
<class_id> 32-bit number that identifies the OSPF area. An OSPF area is a
smaller part of the larger OSPF AS. Areas are used to limit the link-
state updates that are sent out. The flooding used for these updates
would overwhelm a large network, so it is divided into these smaller
areas for manageability.
config network
config ospf-interface
authentication Specify an authentication type. All OSPF interfaces that want to learn
routes from each other must be configured with the same
authentication type and password or MD5 key (one match is enough).
Options are:
cost Set link cost for the specified interface. The cost value is set to router-
LSA's metric field and used for SPF calculation. The default is 0.
dead-interval Number of seconds for RouterDeadInterval timer value used for Wait
Timer and Inactivity Timer. This value must be the same for all routers
attached to a common network. The default is 40 seconds.
network-type l broadcast
l point-to-point
l point-to-multipoint
priority The router with the highest priority will be more eligible to become
Designated Router. Setting the value to 0 makes the router ineligible
to become Designated Router. The default is 1.
transmit-delay Increment LSA age by this value when transmitting. The default is 1
second.
FortiADC Handbook 218
Fortinet Technologies, Inc.
config router config router ospf
Example
FortiADC1
end
FortiADC2
See Also
l config router md5-ospf
l get router info ospf
Network systems maintain route tables to determine where to forward TCP/IP packets. Use this command to
configure system policy routes. Policy routes are based on IP layer values, specifically the source and/or
destination fields.
Routes for outbound traffic are chosen according to the following priorities:
FortiADC Handbook 220
Fortinet Technologies, Inc.
config router config router setting
Most policy route settings are optional, so a matching route might not provide enough information to forward the
packet. In that case, the FortiADC appliance may refer to the routing table in an attempt to match the information
in the packet header with a route in the routing table. For example, if the destination address is the only match
criteria in the policy route, the FortiADC appliance looks up the IP address of the next-hop router in its routing
table. This situation could occur when interfaces are dynamic (such as DHCP or PPPoE) and you do not want or
are unable to specify a static IP address of the next-hop router.
Syntax
config router policy
edit <No.>
set destination <ip&netmask>
set gateway <class_ip>
set source <ip&netmask>
next
end
gateway IP address of the gateway router that can route packets to the destination IP
address that you have specified.
Use this command to change basic routing settings. However, the default settings are recommended for most
deployments.
Syntax
config router setting
set ip-forward {enable | disable}
set ip6-forward {enable | disable}
set rt-cache-reverse {enable | disable}
set rt-cache-strict {enable | disable}
config rt-cache-reverse-exception
edit <No.>
set ip-netmask <ip&netmask>
next
end
end
rt-cache-reverse When enabled, forwards reply packets to the ISP link that forwarded the
corresponding request packet.
When not enabled, forwards all packets based on the results of routing lookup.
The rt-cache-reverse function is useful when your site gets traffic routed to it
from multiple ISP links.
Enabled by default.
rt-cache-strict Enable it when you want to send reply packets only via the same interface that
received the request packets. When enabled, source interface becomes part of
the matching tuple FortiADC uses to identify sessions, so reply traffic is
forwarded from the same interface that received the traffic. Normally each
session is identified by a 5-tuple: source IP, destination IP, protocol, source port,
and destination port.
Disabled by default.
config rt-cache-reverse-exception
ip-netmask If rt-cache-reverse is enabled, you can specify source IP addresses that should
be handled differently. Specify a subnet IP address and netmask for each
exception. For example, if you configure an exception for 192.168.1.0/24,
FortiADC will not maintain a pointer to the ISP for traffic from source
192.168.1.18. Reply packets will be forwarded based on the results of routing
lookup.
FortiADC Handbook 222
Fortinet Technologies, Inc.
config router config router static
Example
FortiADC-VM # config route setting
FortiADC-VM (setting) # get
rt-cache-strict : disable
rt-cache-reverse : enable
ip-forward : enable
ip6-forward : enable
Network systems maintain route tables to determine where to forward TCP/IP packets. Use this command to
configure static routes. Static routes are based on destination IP addresses.
Routes for outbound traffic are chosen according to the following priorities:
1. Link local routes—Self-traffic uses link local routes.
2. LLB Link Policy route—Configured policy routes have priority over default routes.
3. Policy route—Configured policy routes have priority over default routes.
4. Static route / ISP route / OSPF route—Priority is based on the distance metric. By default, distance for static
routes is 10, for ISP routes is 20, and for OSPF routes is 110. The distance metric is configurable for static routes
and OSPF routes, but not ISP routes.
5. Default LLB Link Policy route—Default routes have lower priority than configured routes.
6. Default static route / OSPF route—Default routes have lower priority than configured routes.
The system evaluates policy routes, then static routes. The packets are routed to the first route that matches.
The static route table, therefore, is the one that must include a “default route” to be used when no more specific
route has been determined.
Static routes specify the IP address of a next-hop router that is reachable from that network interface. Routers are
aware of which IP addresses are reachable through various network pathways, and can forward those packets
along pathways capable of reaching the packets’ ultimate destinations. The FortiADC system itself does not need
to know the full route, as long as the routers can pass along the packet.
You must configure at least one static route that points to a router, often a router that is the gateway to the
Internet. You might need to configure multiple static routes if you have multiple gateway routers, redundant ISP
links, or other special routing cases.
Syntax
config router static
edit <No.>
If you do not define a default route, and if there is a gap in your routes where no
route matches a packet’s destination IP address, packets passing through the
FortiADC towards those IP addresses will, in effect, be null routed. While this can
help to ensure that unintentional traffic cannot leave your FortiADC and therefore
can be a type of security measure, the result is that you must modify your routes
every time that a new valid destination is added to your network. Otherwise, it will
be unreachable. A default route ensures that this kind of locally-caused
“destination unreachable” problem does not occur.
distance The default administrative distance is 10, which makes it preferred to OSPF
routes that have a default of 110. We recommend you do not change these
settings unless your deployment has exceptional requirements.
gateway Specify the IP address of the gateway router that can route packets to the
destination IP address that you have specified.
Example
FortiADC-VM # config router static
Use these commands to configure BGP-related options, such as AS ID, router ID, distance of routes, redistribute
route , etc., including BGP network, neighbor, and ha-router-id-list configurations.
FortiADC Handbook 224
Fortinet Technologies, Inc.
config router config router bgp
Syntax
config router bgp
set as <id>
set router-id <ipv4 address>
set distance-external <1-255>
set distance-external6 <1-255>
set distance-internal <1-255>
set distance-internal6 <1-255>
set distance-local <1-255>
set distance-local6 <1-255>
set redistribute-ospf <enable/disable>
set redistribute-connected <enable/disable>
set redistribute-static <enable/disable>
set redistribute-connected6 <enable/disable>
set redistribute-static6 <enable/disable>
set always-compare-med <enable/disable>
set deterministic-med <enable/disable>
set bestpath-as-path-ignore <enable/disable>
set bestpath-cmp-routerid <enable/disable>
set bestpath-med-missing-as-worst <enable/disable>
config network
edit <id>
set type <ipv4/ipv6>
set prefix <ipv4-netmask>
set prefix6 <ipv6-netmask>
next
end
config neighbor
edit <id>
set remote-as <id>
set addr-type <ipv4/ipv6>
set ip <ipv4 address>
set ip6 <ipv6 address>
set interface <interface name>
set port <0-65535>
set keepalive-timer <0-65535>
set holdtime-timer <0-65535>
set default-originate <enable/disable>
set distribute-list-in <access list name>
set distribute-list-out <access list name>
set prefix-list-in <prefix list name>
set prefix-list-out <prefix list name>
set ebgp-multihop <1-255 >
set next-hop-self <enable/disable >
set passive <enable/disable >
set password <password>
set shutdown <enable/disable >
set ttl-security <1-254>
set update-source-type <interface/address>
set update-source-interface <interface name>
set update-source-ip <ipv4 address>
set update-source-ip6 <ipv6 address>
set weight <0-65535>
next
end
config ha-router-id-list
edit <id>
set router-id <ipv4 address>
set node <index>
next
end
end
FortiADC Handbook 226
Fortinet Technologies, Inc.
config router config router bgp
router-id Specify a unique value to identify the router, using an IPv4 address.
distance-external6 Specify the distance for IPv6 routes external to the AS.
distance-internal6 Specify the distance for IPv6 routes internal to the AS.
distance-local6 Specify the distance for IPv6 routes local to the AS.
redistribute-ospf Enable or disable the redistribute OSPF route to the BGP server.
redistribute-connected Enable or disable the redistribute connected route to the BGP server.
redistribute-static Enable or disable the redistribute static route to the BGP server.
redistribute-connected6 Enable or disable the redistribute connected IPv6 route to the BGP server.
redistribute-static6 Enable or disable the redistribute static IPv6 route to the BGP server.
always-compare-med Enable or disable always compare MED (Multi-Exit Discriminator) for BGP
decision.
bestpath-cmp-routerid Enable or disable compare router ID for identical EBGP paths for BGP
decision.
bestpath-med-missing- Enable or disable treat missing MED as least preferred for BGP decision.
as-worst
Network
prefix Specify the network prefix when (address) type is IPv4, using the IP/mask
format.
prefix6 Specify the network prefix when (address) type is IPv6, using the IPv6/mask
format.
Neighbor
ip IP address of neighbor.
ebgp-multihop Specify the maximum multi-hops allowed for EBGP neighbors. Only need
for ebgp neighbor, can’t set with ttl-security
ttl-security Specify the maximum number of hops to the BGP neighbor.Only need for
ebgp neighbor
FortiADC Handbook 228
Fortinet Technologies, Inc.
config router config router bgp
weight Default weight for routes from this neighbor. range is <0-65535>
HA router ID list
Configure BGP router
FortiADC-VM (root) # config router bgp
FortiADC-VM (bgp) # set as 101
FortiADC-VM (bgp) # set router-id 10.0.6.217
FortiADC-VM (bgp) # set distance-internal 300
FortiADC-VM (bgp) # set redistribute-static enable
Configure BGP network
FortiADC-VM (bgp) # config network
FortiADC-VM (network) # edit 1
FortiADC-VM (1) # set type ipv4
FortiADC-VM (1) # set prefix 172.15.1.0/24
FortiADC-VM (1) # next
FortiADC-VM (network) # edit 2
FortiADC-VM (1) # set type ipv4
FortiADC-VM (1) # set prefix 192.168.11.0/24
FortiADC-VM (1) # next
FortiADC-VM (network) # end
Configure BGP neighbor
FortiADC-VM (bgp) # config neighbor
FortiADC-VM (neighbor) # edit 1
FortiADC-VM (1) # set remote-as 101
FortiADC-VM (1) # set ip 172.15.11.218
FortiADC-VM (1) # set interface port2
FortiADC-VM (1) # next
FortiADC-VM (neighbor) # end
FortiADC-VM (bgp) # get
as : 101
router-id : 10.0.6.217
distance-external : 20
distance-internal : 250
distance-local : 200
redistribute-ospf : disable
redistribute-connected : disable
redistribute-static : enable
redistribute-connected6 : disable
redistribute-static6 : disable
always-compare-med : disable
deterministic-med : disable
bestpath-as-path-ignore : disable
bestpath-cmp-routerid : disable
bestpath-med-missing-as-worst : disable
== [ 1 ]
== [ 2 ]
== [ 1 ]
FortiADC-VM (bgp) # end
FortiADC Handbook 230
Fortinet Technologies, Inc.
config router config router bgp
config security
The config security commands configure web application firewall (WAF) settings.
Use this command to configure bot detection policies. Bot detection policies use heuristics to detect client traffic
likely to be generated by robots instead of genuine clients. You can use predefined blacklists and whitelists to get
started. You can use the user-specified whitelist table to fine-tune detection.
Syntax
config security waf bot-detection
edit <name>
set status {enable|disable}
set bad-robot {enable|disable}
set search-engine-crawler {enable|disable}
set action {alert| deny | period-block}
set block-period <integer>
set http-request-rate <integer>
set severity {high | low | medium}
config whitelist
edit <No.>
action l alert
l deny
l period-block
http-request-rate The default is 0 (off). The valid range is 0-100,000,000 requests per
second.
severity l high
l medium
l low
config whitelist
Example
FortiADC-VM # config security waf bot-detection
FortiADC-VM (bot-detection) # edit waf-bot-detection-policy
Add new entry 'waf-bot-detection-policy' for node 3220
FortiADC-VM (waf-bot-detect~o) # get
status : disable
FortiADC-VM (waf-bot-detect~o) # set status enable
FortiADC-VM (waf-bot-detect~o) # get
status : enable
search-engine-crawler : enable
FortiADC Handbook 233
Fortinet Technologies, Inc.
config security config security waf exception
bad-robot : enable
http-request-rate : 0
action : alert
severity : low
block-period : 3600
FortiADC-VM (waf-bot-detect~o) # config whitelist
FortiADC-VM (whitelist) # edit 1
Add new entry '1' for node 3228
FortiADC-VM (1) # get
ip : 0.0.0.0/0
url-pattern :
url-parameter-name-pattern :
user-agent-pattern :
cookie-name-pattern :
FortiADC-VM (1) # set ip 10.1.1.0/24
FortiADC-VM (1) # end
FortiADC-VM (waf-bot-detect~o) # end
FortiADC-VM #
Use this command to create exception configuration objects. An exception configuration object defines hosts or
URLs that should not be processed by the WAF rule.
Syntax
config security waf exception
edit <name>
config exception-rule
edit <No.>
set host-status {enable|disable}
set host-pattern <host-pattern>
set url-pattern <url-pattern>
next
end
next
end
host-pattern Matching string. Regular expressions are supported. For example, you
can specify www.example.com, *.example.com, or www.ex-
ample.* to match a literal host pattern or a wildcard host pattern.
url-pattern Matching string. Must begin with a URL path separator (/). Regular
expressions are supported. For example, you can specify
pathnames and files with expressions like \/admin,
.*\/data\/1.html, or \/data.*.
Example
FortiADC-docs # config security waf exception
FortiADC-docs (exception) # edit exception-group
Add new entry 'exception-group' for node 3200
FortiADC-docs (exception-group) # config exception-rule
FortiADC-docs (exception-rule) # edit 1
Add new entry '1' for node 3202
FortiADC-docs (1) # set host-status enable
FortiADC-docs (1) # set host-pattern example.com
FortiADC-docs (1) # set url-pattern /1.index
FortiADC-docs (1) # end
FortiADC-docs (exception-group) # end
Use this command to configure SQL injection and cross-site scripting (XSS) detection policies.
In many cases, you can use predefined policies, and you do not need to create them. Table 14 describes the
predefined policies.
Predefined
Detection Action Severity Detection Action Severity
Rules
FortiADC Handbook 235
Fortinet Technologies, Inc.
config security config security waf heuristic-sql-xss-injection-detection
The configurations for these policies are shown in the examples that follow. If desired, you can create user-
defined policies.
Syntax
config security waf heuristic-sql-xss-injection-detection
edit <name>
set exception <datasource>
set sql-injection-detection {enable|disable}
set sql-injection-detection-exception <datasource>
set sql-injection-action {alert|deny}
set sql-injection-severity {high|medium|low}
set uri-sql-injection-detection {enable|disable}
set referer-sql-injection-detection {enable|disable}
set cookie-sql-injection-detection {enable|disable}
set body-sql-injection-detection {enable|disable}
set xss-detection {enable|disable}
set xss-exception <datasource>
set xss-action {alert|deny}
set xss-severity {high|medium|low}
set uri-xss-detection {enable|disable}
set referer-xss-detection {enable|disable}
set cookie-xss-detection {enable|disable}
set body-xss-detection {enable|disable}
next
end
sql-injection-action l alert
l deny
sql-injection-severity l high
l medium
l low
xss-action l alert
l deny
xss-severity l high
l medium
l low
Example
FortiADC-docs # get security waf heuristic-sql-xss-injection-detection High-Level-Security
sql-injection-detection : enable
sql-injection-action : deny
sql-injection-severity : high
uri-sql-injection-detection : enable
referer-sql-injection-detection: enable
cookie-sql-injection-detection: enable
body-sql-injection-detection : disable
xss-detection : enable
xss-action : deny
xss-severity : high
uri-xss-detection : enable
referer-xss-detection : enable
cookie-xss-detection : enable
body-xss-detection : disable
sql-injection-detection-exception:
xss-exception :
exception :
FortiADC Handbook 237
Fortinet Technologies, Inc.
config security config security waf http-protocol-constraint
xss-detection : disable
xss-action : alert
xss-severity : low
sql-injection-detection-exception:
exception :
Use this command to configure HTTP protocol checks: HTTP request parameter lengths, HTTP request method,
and HTTP response code.
High-Level-Security Maximum URI length is 2048 characters. Action is set to deny. Severity is
set to high.
Medium-Level- Maximum URI length is 2048 characters. Action is set to alert. Severity is
Security set to medium.
Alert-Only Maximum URI length is 2048 characters. Action is set to alert. Severity is
set to low.
The configurations for these rules are shown in the examples that follow. If desired, you can create user-defined
rules to filter traffic with invalid HTTP request methods or drop packets with the specified server response codes.
Syntax
config security waf http-protocol-constraint
edit <name>
set exception <datasource>
FortiADC Handbook 239
Fortinet Technologies, Inc.
config security config security waf http-protocol-constraint
illegal-host-name-check- l alert
action
l deny
illegal-host-name-check- l high
severity
l medium
l low
illegal-http-version-check- l alert
action
l deny
illegal-http-version-check- l high
severity
l medium
l low
max-cookie-number-in- l alert
request-action
l deny
max-cookie-number-in- l high
request-severity
l medium
l low
max-header-number-in- l alert
request-action
l deny
max-header-number-in- l high
request-severity
l medium
l low
max-request-body-length Maximum length of the HTTP body. The default is 67108864. The
valid range is 1-67108864.
max-request-body-length- l alert
action
l deny
max-request-body-length- l high
severity
l medium
l low
max-request-header-length Maximum length of the HTTP request header. The default is 8192.
The valid range is 1-16384.
max-request-header-action l alert
l deny
max-request-header-severity l high
l medium
l low
max-request-header-name- l alert
length-action
l deny
max-request-header-name- l high
length-severity
l medium
l low
max-request-header-value- l alert
length-action
l deny
max-request-header-value- l high
length-severity
l medium
l low
FortiADC Handbook 241
Fortinet Technologies, Inc.
config security config security waf http-protocol-constraint
max-uri-length-action l alert
l deny
max-uri-length-severity l high
l medium
l low
max-url-parameter-name- l alert
length-action
l deny
max-url-parameter-name- l high
length-severity
l medium
l low
max-url-parameter-value- l alert
length-action
l deny
max-url-parameter-value- l high
length-severity
l medium
l low
config request-method-rule
action l alert
l deny
severity l high
l medium
l low
l CONNECT
l DELETE
l GET
l HEAD
l OPTIONS
l POST
l PUT
l TRACE
l Others
Note: The first 8 methods are described in RFC 2616. Others
contains not commonly used HTTP methods defined by Web
Distributed Authoring and Version (WebDAV) extensions.
config response-code-rule
action l alert
l deny
severity l high
l medium
l low
Example
FortiADC-docs # get security waf http-protocol-constraint High-Level-Security
max-uri-length : 2048
max-uri-length-action : deny
max-uri-length-severity : high
max-request-header-name-length: 1024
max-request-header-name-length-action: deny
max-request-header-name-length-severity: high
max-request-header-value-length: 4096
max-request-header-value-length-action: deny
max-request-header-value-length-severity: high
max-url-parameter-name-length : 1024
max-url-parameter-name-length-action: deny
max-url-parameter-name-length-severity: high
max-url-parameter-value-length: 4096
max-url-parameter-value-length-action: deny
max-url-parameter-value-length-severity: high
FortiADC Handbook 243
Fortinet Technologies, Inc.
config security config security waf http-protocol-constraint
illegal-http-version-check : enable
illegal-http-version-check-action: deny
illegal-http-version-check-severity: high
illegal-host-name-check : enable
illegal-host-name-check-action: deny
illegal-host-name-check-severity: high
max-cookie-number-in-request : 16
max-cookie-number-in-request-action: deny
max-cookie-number-in-request-severity: high
max-header-number-in-request : 50
max-header-number-in-request-action: deny
max-header-number-in-request-severity: high
max-request-header-length : 8192
max-request-header-length-action: deny
max-request-header-length-severity: high
max-request-body-length : 67108864
max-request-body-length-action: deny
max-request-body-length-severity: high
exception :
max-uri-length : 2048
max-uri-length-action : alert
max-uri-length-severity : low
max-request-header-name-length: 1024
max-request-header-name-length-action: alert
max-request-header-name-length-severity: low
max-request-header-value-length: 4096
max-request-header-value-length-action: alert
max-request-header-value-length-severity: low
max-url-parameter-name-length : 1024
max-url-parameter-name-length-action: alert
max-url-parameter-name-length-severity: low
max-url-parameter-value-length: 4096
max-url-parameter-value-length-action: alert
max-url-parameter-value-length-severity: low
illegal-http-version-check : enable
illegal-http-version-check-action: alert
illegal-http-version-check-severity: low
illegal-host-name-check : enable
illegal-host-name-check-action: alert
illegal-host-name-check-severity: low
max-cookie-number-in-request : 16
max-cookie-number-in-request-action: alert
max-cookie-number-in-request-severity: low
max-header-number-in-request : 50
max-header-number-in-request-action: alert
max-header-number-in-request-severity: low
max-request-header-length : 8192
max-request-header-length-action: alert
max-request-header-length-severity: low
max-request-body-length : 67108864
max-request-body-length-action: alert
max-request-body-length-severity: low
exception :
Use this command to configure web application firewall (WAF) profiles. A WAF profile references the WAF
policies that are to be enforced.
In many cases, you can use predefined profiles to get started. Table 16 describes the three predefined policies.
FortiADC Handbook 245
Fortinet Technologies, Inc.
config security config security waf profile
The configurations for these profiles are shown in the examples that follow. If desired, you can create user-
defined profiles.
l You can use predefined WAF profiles, create profiles based on predefined feature options, or create profiles based
on user-defined configuration objects. If you want to add user-defined configuration objects, you must create them
before using this command to add them to a WAF profile.
l You must have read-write permission for security settings.
After you have created a WAF profile, you can specify it in a virtual server configuration.
Syntax
config security waf profile
edit <name>
set exception <datasource>
set bot-detection <datasource>
set description <string>
set heuristic-sql-xss-injection-detection <datasource>
set http-protocol-constraint <datasource>
set url-protection <datasource>
set web-attack-signature <datasource>
set http-header-cache {enable|disable}
set xml-validation <datasource>
set json-validation <datasource>
next
end
Example
FortiADC-docs # get security waf profile High-Level-Security
web-attack-signature : High-Level-Security
url-protection :
http-protocol-constraint : High-Level-Security
heuristic-sql-xss-injection-detect: High-Level-Security
description :
http-header-cache : enable
exception :
FortiADC Handbook 247
Fortinet Technologies, Inc.
config security config security waf url-protection
exception :
Use this command to configure URL protection policies. URL protection policies can filter HTTP requests that
match specific character strings and file extensions.
Syntax
config security waf url-protection
edit <name>
set exception <datasource>
config url-access-rule
edit <No.>
set exception <datasource>
set action {alert|deny}
set severity {high|medium|low}
set url-pattern <url-pattern>
next
end
config file-extension-rule
edit <No.>
set exception <datasource>
set action {alert|deny}
set severity {high|medium|low}
set file-extension-pattern <file-extension-pattern>
next
end
next
end
action l alert
l deny
severity l high
l medium
l low
Example
FortiADC-docs # config security waf url-protection
FortiADC-docs (url-protection) # edit url-policy
Add new entry 'url-policy' for node 3050
FortiADC-docs (url-policy) # config url-access-rule
FortiADC-docs (url-access-rule) # edit 1
Add new entry '1' for node 3052
FortiADC-docs (1) # get
url-pattern :
action : alert
severity : low
exception :
FortiADC-docs (1) # set url-pattern tmp
FortiADC-docs (1) # end
FortiADC-docs (url-policy) # config file-extension-rule
FortiADC-docs (file-extension~r) # edit 1
Add new entry '1' for node 3057
FortiADC-docs (1) # get
file-extension-pattern :
action : alert
severity : low
exception :
FortiADC-docs (1) # set file-extension-pattern tmp
FortiADC-docs (1) # end
FortiADC-docs (url-policy) # end
Use this command to configure web attack signature policies. The attack signature policy includes rules to enable
scanning of HTTP headers and HTTP body content in HTTP requests, HTTP responses, or both.
Table 17 describes the predefined policies. You can select the predefined policies in your WAF profiles, or you
can create policies that enable a different set of scan classes or a different action. In this release, you cannot
exclude individual signatures or create custom signatures. You can enable or disable the scan classes.
FortiADC Handbook 249
Fortinet Technologies, Inc.
config security config security waf web-attack-signature
Syntax
config security waf web-attack-signature
edit <name>
set exception <datasource>
set scan-enable {enable|disable}
set scan-request-body {enable|disable}
set scan-response-body {enable|disable}
set high-severity-action {alert|deny}
set medium-severity-action {alert|deny}
set low-severity-action {alert|deny}
config signature
edit <datasource>
set status
set exception
set description <string>
next
end
next
end
high-severity-action l alert
l deny
medium-severity-action l alert
l deny
low-severity-action l alert
l deny
config signature
description A string to describe the purpose of the configuration, to help you and
other administrators more easily identify its use.
Example
FortiADC-VM # get security waf web-attack-signature High-Level-Security
status : enable
request-body-detection : enable
response-body-detection : disable
high-severity-action : deny
medium-severity-action : deny
low-severity-action : alert
exception:
FortiADC Handbook 251
Fortinet Technologies, Inc.
config security config security waf json-validation-detection
description :
exception :
FortiADC-docs (1002010728) # set status disable
FortiADC-docs (1002010728) # set description "investigate false positive"
FortiADC-docs (1002010728) # end
Note: This command only checks HTTP requests with content-type being application/json.
Table 18: Predefined WAF profiles
severity —high
action — deny
severity — medium
action — alert
severity — low
action — alert
Syntax
config security waf json-validation-detection
edit <name>
set format-checks enable/disable
set limit-checks enable/disable
set limit-max-array-value-num <0-4096>
set limit-max-depth-num <0-4096>
set limit-max-object-num <0-4096>
limit-max-array-value-num Specify the maximum value within a single array. The default
value is 256. Valid values range from 0 to 4,096.
limit-max-depth-num Specify the maximum depth in a JSON value. The default value is
16. Valid values range from 0 to 4,096.
FortiADC Handbook 253
Fortinet Technologies, Inc.
config security config security waf json-validation-detection
exception Optional. Select the exception profile to be applied to the JSON detec-
tion profile.
severity Set the severity level in WAF logs for potential attacks detected by
the JSON detection profile by selecting one of the following:
l High
l Medium
l Low
action Specify the action that FortiADC will take upon detecting a
potential attack:
Example
config security waf json-validation-detection
edit "all"
set format-checks enable
set meta-os-checks disable
set limit-checks enable
set limit-max-array-value-num 1
set limit-max-depth-num 0
set limit-max-object-num 0
set limit-max-string-len 0
set xss-checks enable
set sql-injection-checks enable
unset exception
set severity high
set action alert
next
end
Use this command to create an XML-schema file which defines an XML schema format for XML validation
detection.
Note: For this 4.8.0 release, this feature is supported on the GUI only.
Syntax
config security waf xml-validation-detection
edit <name>
Use this command to create a SOAP-WSDL file which defines the message format and protocol details for a web
service. WSDL is written in XML.
Note: For this 5.0.0 release, this feature is supported on the GUI only.
Syntax
config security waf soap-wsdl-file
edit <name>
Note: This command only checks HTTP requests with content type being application/xml and text/xml.
Table 19: Predefined WAF profiles
severity —high
action — deny
FortiADC Handbook 255
Fortinet Technologies, Inc.
config security config security waf xml-validation-detection
severity — mdeium
action — alert
severity — low
action — alert
Syntax
config security waf xml-validation-detection
edit <name>
set format-checks enable/disable
set soap-format-checks enable/disable
set wsdl-checks enable/disable
set soap_wsdl_id <datasource>
set schema-checks enable/disable
set xml-schema-id <datasource>
set limit-checks enable/disable
set limit-max-attr-num <1-256>
set limit-max-attr-name-len <1-2048>
set limit-max-attr-value-len <1-2048>
set limit-max-cdata-len <1-65535>
set limit-max-elem-child-num <1-65535>
set limit-max-elem-depth-num <1-65535>
set limit-max-elem-name-len <1-65535>
set limit-max-namespace-num <0-256>
set limit-max-namespace-url-len <0-1024>
set xss-checks enable/disable
set sql-injection-checks enable/disable
set exception <datasource>
set severity low/medium/high
set action alert/deny
next
end
l limit-max-attr-num
l limit-max-attr-name-len
l limit-max-attr-value-len
l limit-max-cdata-len
l limit-max-elem-child-num
l limit-max-elem-depth-num
l limit-max-elem-name-len
l limit-max-namespace-num
l limit-max-namespace-url-len
limit-max-attr-name-len Specify the maximum length of each attribute name. The default
value is 128. Valid values range from 1 to 2,048.
FortiADC Handbook 257
Fortinet Technologies, Inc.
config security config security waf xml-validation-detection
limit-max-attr-value-len Specify the maximum length of each attribute value. The default
value is 128. Valid values range from 1 to 2,048.
limit-max-cdata-len Specify the length of the Cdata for each element. The default
value is 65,535. Valid values range from 1 to 65,535.
limit-max-elem-name-len Specify the maximum length of the name of each element. The
default value is 128. Valid values range from 1 to 65,535.
limit-max-namespace-url-len Specify the URL length for each namespace declaration. The
default value is 256. Valid values range from 0 to 1,024.
exception Optional. Select the exception profile to be applied to the XML detec-
tion profile.
severity Set the severity level in WAF logs for potential attacks detected by
the XML detection profile by selecting one of the following:
l High
l Medium
l Low
action Specify the action that FortiADC will take upon detecting a
potential attack:
Example
config security waf xml-validation-detection
edit "all"
set format-checks enable
set soap-format-checks enable
set wsdl-checks enable
unset soap_wsdl_id
set schema-checks enable
unset xml-schema-id
set limit-checks enable
set limit-max-attr-num 100
set limit-max-attr-name-len 100
set limit-max-attr-value-len 100
set limit-max-cdata-len 1
set limit-max-elem-child-num 100
set limit-max-elem-depth-num 100
set limit-max-elem-name-len 100
set limit-max-namespace-num 1
set limit-max-namespace-url-len 1
set xss-checks enable
set sql-injection-checks enable
unset exception
set severity medium
set action alert
next
end
FortiADC Handbook 259
Fortinet Technologies, Inc.
config security config security antivirus profile
In many cases, you can use a predefined AV profile, and you are not required to create a new AV profile of your
own.
Before you begin, make sure that you have read-write permission to configure the system's security settings.
After you have created an anti-virus profile, you can include it in HTTP or HTTPS virtual service profiles.
Syntax
config security antivirus profile
edit <name>
set comments <string>
set uncomp-size-limit <integer>
set uncomp-nest-limit <integer>
set scan-bzip2 {enable | disable}
set streaming-content-bypass {enable | disable}
set oversize-limit <integer>
set oversize {bypass | log | block}
set options {avmonitor | quarantine}
set emulator {enable | disable}
set fsa-analytics {disable | suspicious | all}
set analytics-max-upload <integer>
set analytics-db {disable | enable}
set av-virus-log {disable | enable}
next
end
uncomp-size-limit The maximum size in MB of the memory buffer used to temporarily decom-
press files.
streaming-content- Enable or disable bypass streaming content (rather than buffering it).
bypass
Example
FortiADC-docs # config security antivirus profile
FortiADC-docs (profile) # edit av_profile_01
FortiADC-docs (av_profile_01) # set comments test_for_doc
FortiADC-docs (av_profile_01) # set uncomp-size-limit 10
FortiADC-docs (av_profile_01) # set uncomp-nest-limit 5
FortiADC-docs (av_profile_01) # set scan-bzip2 enable
FortiADC-docs (av_profile_01) # set streaming-content-bypass enable
FortiADC-docs (av_profile_01) # set oversize-limit 1024
FortiADC-docs (av_profile_01) # set oversize log
FortiADC-docs (av_profile_01) # set options quarantine
FortiADC-docs (av_profile_01) # set emulator enable
FortiADC-docs (av_profile_01) # set fsa-analytics suspicious
FortiADC-docs (av_profile_01) # set analytics-max-upload 1024
FortiADC-docs (av_profile_01) # set analytics-db enable
FortiADC-docs (av_profile_01) # set av-virus-log enable
FortiADC-docs (av_profile_01) # next
FortiADC-docs (profile) # end
Reference to an AV profile
Use the following commands to reference an AV profile to a HTTP/HTTPs or SMTP virtual service.
Syntax
config load-balance virtual-server
edit <name>
set av-profile <profile-name>
end
end
Example
FortiADC-docs # config load-balance virtual-server
FortiADC-docs (virtual-server) # edit vs1
FortiADC-docs (vs1) # set load-balance-profile LB_PROF_HTTP
FortiADC-docs (vs1) # set av-profile av_profile_01
FortiADC-docs (vs1) # end
Syntax
config security antivirus quarantine
set destination {NULL | disk}
set agelimit <integer>
set maxfilesize <integer>
set quarantine-quota <integer>
set drop-infected {http | https | smtp}
FortiADC Handbook 261
Fortinet Technologies, Inc.
config security config security antivirus quarantine
destination The destination for quarantined files, which could be either of the following:
l NULL—Disable quarantine.
l Disk—Send quarantined files to the hard disk.
age-limit
The number of hours that quarantined files are kept on the hard disk. The
default is 1 hour. Valid values range form 0 to 336 hours.
Note: If the age limit is set to 0 (zero), it means that there is no age limit
and quarantined files will remain on the hard disk forever.
maxfilesize The maximum size (in KB) of a single file that can be quarantined. The
default is 1024 (KB). Valid values range from 1 to 2048 KB.
Note: Files larger than the set Max File Size will not be quarantined. In
reality, this value is subject the available quarantine quota that remains on
the hard disk. For example, when there is less than 1024 KB of quarantine
quota (disk space reserved for quarantined files) remaining, a file of 1024
KB in size still will not be quarantined even though you've set Max File Size
to 1024.
The default is 512 MB. Valid values range from 0 to 1024 MB. If the value
is set to 0, no files are quarantined
l HTTP
l HTTPS
l SMTP
Note: By default neither option is selected, which means that both types
of files are quarantined. If selected, files involving the specified protocol or
protocols will be dropped (not quarantined).
lowspace Specify the way in which new files are handled when the system disk space
is running low, which could be either of the following:
Example
FortiADC-docs # config security antivirus quarantine
FortiADC-docs (quarantine) # set destination disk
FortiADC-docs (quarantine) # set agelimit 1
FortiADC-docs (quarantine) # set maxfilesize 1
FortiADC-docs (quarantine) # set quarantine-quota 256
FortiADC-docs (quarantine) # set drop-infected http
Syntax
config security antivirus settings
set default-db {normal | extended | extreme}
end
l normal—The regular virus database, which includes “In the Wild” viruses and
most commonly seen viruses on the network. It provides regular protection.
l extended—The extended virus database, which includes both “In the Wild”
viruses and a large collection of zoo viruses that are no longer seen in recent
virus studies. It provides enhanced security protection.
l extreme—The extreme virus database, which includes both “In the Wild”
viruses and all known zoo viruses that are no longer seen in recent virus
studies. It provides the highest level of security protection.
Example
FortiADC-docs # config security antivirus settings
FortiADC-docs (settings) # set default-db extended
FortiADC-docs (settings) # end
Syntax
config system fortisandbox
set type {fsa}
set status {enable | disable}
set server <server_ip>
set email <email_address>
set source-ip <ip_address>
end
FortiADC Handbook 263
Fortinet Technologies, Inc.
config security config system fortisandbox
config system
FortiADC Handbook 266
Fortinet Technologies, Inc.
config system config system accprofile
Access profiles provision permissions to roles. The following permissions can be assigned:
In larger companies where multiple administrators divide the share of work, access profiles often reflect the
specific job that each administrator does (“role”), such as account creation or log auditing. Access profiles can
limit each administrator account to their assigned role. This is sometimes called role-based access control
(RBAC).
Table 20 lists the administrative areas that can be provisioned. If you provision read access, the role can view the
web UI menu (or issue a CLI get command). If you provision read-write access, the role can save configuration
changes (or issue a CLI set command).
For complete access to all commands and abilities, you must log in with the administrator account named
admin.
Syntax
config system accprofile
edit <name>
set firewall {none|read|read-write}
set global-load-balance {none|read|read-write}
set link-load-balance {none|read|read-write}
set load-balance {none|read|read-write}
set log {none|read|read-write}
set router {none|read|read-write}
set security {none|read|read-write}
set system {none|read|read-write}
next
end
FortiADC Handbook 268
Fortinet Technologies, Inc.
config system config system accprofile
Example
FortiADC-docs # config system accprofile
FortiADC-docs (accprofile) # edit doc-user
Add new entry 'doc-user' for node 772
Use this command to create the IPv4 address objects that you use to specify matching source and destination
addresses in policies.
Basic Steps
Syntax
config system address
edit <name>
set type {ip-netmask | ip-range}
set ip-netmask <ip&netmask>
set ip-min <class_ip>
set ip-max <class_ip>
next
end
Example
FortiADC-docs # config system address
FortiADC-docs (address) # edit TEST-NET-1
Add new entry 'TEST-NET-1' for node 3800
FortiADC-docs (TEST-NET-1) # get
type : ip-netmask
ip-netmask : 0.0.0.0/0
FortiADC Handbook 270
Fortinet Technologies, Inc.
config system config system address6
Use this command to create the IPv6 address objects that you use in firewall rules.
You create address objects to specify matching source and destination addresses in policies.
Basic Steps
Syntax
config system address6
edit <No.>
set type {ip6-network | ip6-range}
set ip6-network <ip&netmask>
set ip6-min <class_ip>
set ip6-max <class_ip>
next
end
Example
FortiADC-docs # config system address6
FortiADC-docs (address6) # edit WAN
Add new entry 'WAN' for node 3811
FortiADC-docs (WAN) # set ip6-network 2001:DB8::/32
FortiADC-docs (WAN) # end
Use this command to create the IPv4 address groups that you use to specify matching source and destination
addresses in policies.
Basic Steps
Syntax
config system addrgrp
edit <name>
config member
edit <name>
set address <datasource>
next
end
next
end
Example
FortiADC-docs # config system addrgrp
FortiADC-docs (addrgrp) # edit WAN
Add new entry 'WAN' for node 3806
FortiADC-docs (WAN) # config member
FortiADC-docs (member) # edit 1
Add new entry '1' for node 3808
FortiADC-docs (1) # set address TEST-NET-3
FortiADC-docs (1) # end
FortiADC Handbook 272
Fortinet Technologies, Inc.
config system config system addrgrp6
Use this command to create the IPv6 address groups that you use to specify matching source and destination
addresses in policies.
Basic Steps
Syntax
config system addrgrp6
edit <name>
config member
edit <name>
set address <datasource>
next
end
next
end
Example
FortiADC-docs # config system addrgrp6
FortiADC-docs (addrgrp6) # edit WAN-6
We recommend that only network administrators—and if possible, only a single person—use the admin account.
You can configure accounts that provision different scopes of access. For example, you can create an account for
a security auditor who must only be able to view the configuration and logs, but not change them.
l If you want to use RADIUS or LDAP authentication, you must have already have created the RADIUS server or
LDAP server configuration.
l You must have read-write permission for system settings.
Syntax
config system admin
edit <name>
set access-profile <datasource>
set auth-strategy {local | ldap | radius}
set ldap-server <datasource>
set radius-server <datasource>
set is-system-admin {no|yes}
set password <passwd>
set trusted-hosts <ip&netmask>
set vdom <datasource>
set wildcard {disable|enable}
next
end
Do not use spaces or special characters except the ‘at’ symbol ( @) or dot (.). The
maximum length is 35 characters.
Note: This is the user name that the administrator must provide when logging in to
the CLI or web UI.
After you initially save the configuration, you cannot edit the name.
FortiADC Handbook 274
Fortinet Technologies, Inc.
config system config system admin
access-profile Specify a user-defined or predefined profile. The predefined profile named super_
admin_prof is a special access profile used by the admin account. However,
specifying this access profile will not confer all permissions of the admin account.
For example, the new administrator would not be able to reset lost administrator
passwords.
Note: This option does not appear for the admin administrator account, which by
definition always uses the super_admin_prof access profile.
password Set a strong password for all administrator accounts. The password should be at
least eight characters long, be sufficiently complex, and be changed regularly.
trusted-hosts Source IP address and netmask from which the administrator is allowed to log in.
For multiple addresses, separate each entry with a space. You can specify up to
three trusted areas. They can be single hosts, subnets, or a mixture.
Trusted host definitions apply both to the web UI and to the CLI when accessed
through Telnet, SSH, or the CLI console widget. Local console access is not
affected by trusted hosts, as the local console is by definition not remote, and
does not occur through the network.
If ping is enabled, the address you specify here is also a source IP address to
which the system will respond when it receives a ping or traceroute signal.
To allow logins only from one computer, enter only its IP address and 32- or 128-
bit netmask:
192.0.2.2/32
2001:0db8:85a3::8a2e:0370:7334/128
0.0.0.0/0.
Caution: If you restrict trusted hosts, do so for all administrator accounts. Failure
to do so means that all accounts are still exposed to the risk of brute force login
attacks. This is because if you leave even one administrator account unrestricted
(i.e. 0.0.0.0/0), the system must allow login attempts on all network interfaces
where remote administrative protocols are enabled, and wait until after a login
attempt has been received in order to check that user name’s trusted hosts list.
Tip: If you allow login from the Internet, set a longer and more complex New
Password, and enable only secure administrative access protocols. We also
recommend that you restrict trusted hosts to IPs in your administrator’s
geographical area.
Tip: For improved security, restrict all trusted host addresses to single IP
addresses of computer(s) from which only this administrator will log in.
vdom If you have enabled the virtual domain feature, specify the virtual domain that this
administrator can view and manage.
Example
FortiADC-VM # config system admin
FortiADC-VM (admin) # edit doc-admin
Add new entry 'doc-admin' for node 78
FortiADC-VM (doc-admin) # set access-profile doc-admin
FortiADC-VM (doc-admin) # end
FortiADC Handbook 276
Fortinet Technologies, Inc.
config system config system auto backup
Syntax
config system auto-backup
set address <ip>
set folder <string>
set overwrite-config {enable|disable}
set password <string>
set port <integer>
set scheduled-backup-day {Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday}
set scheduled-backup-frequency {daily|weekly|every}
set scheduled-backup-status {enable|disable}
set scheduled-backup-time <hh:mm>
set storage {disk|sftp}
set username <string>
end
scheduled-backup-day Specify one day of the week (i.e., Sunday, Monday, Tuesday,
Wednesday, Thursday, Friday, Saturday.)
scheduled-backup-time Specify the backup time in the format of <hh:mm> hour and minute, hh: 0-
23, mm: {00|15|30|45}.
l disk—Hard disk.
l sftp—SFTP server.
username The user name used to log into the SFTP server.
Example
The following example for a scenario where the storage is on a local disk:
FortiADC-VM # config system auto-backup
FortiADC-VM (auto-backup) # get
scheduled-backup-status : disable
FortiADC-VM (auto-backup) # set scheduled-backup-status enable
FortiADC-VM (auto-backup) # set scheduled-backup-day Monday
FortiADC-VM (auto-backup) # set scheduled-backup-time 03:30
FortiADC-VM (auto-backup) # set overwrite-config enable
FortiADC-VM (auto-backup) # show full
The following example is for a scenario where the storage is on an SFTP server:
FortiADC-VM # config sys auto-backup
FortiADC Handbook 278
Fortinet Technologies, Inc.
config system config system certificate ca
Syntax
config system certificate ca
edit <name>
set certificate-file <certificate-filename>
next
end
certificate Paste the name of a CA certificate file between quotation marks as shown in the
example.
Example
FortiADC-VM # config system certificate ca
FortiADC-VM (ca) # edit "ca-new"
FortiADC-VM (ca-new) # set ca-new.cer
FortiADC-VM (ca-new) # end
Create CA groups to facilitate the configuration of the certificate validator that is associated with a virtual server.
Include in the CA group all of the CAs for the pool of backend servers to be associated with a single virtual server.
l You must have already added the CAs to the CA certificate store.
l You must have read-write permission for system settings.
Syntax
config system certificate ca_group
edit <name>
config group_member
edit <No.>
set ca <datasource>
next
end
next
end
FortiADC Handbook 280
Fortinet Technologies, Inc.
config system config system certificate certificate_verify
You select a certificate validation configuration object in the profile configuration for a virtual server. If the client
presents an invalid certificate during the authentication phase of a SSL/TLS session initiation, the FortiADC
system will not allow the connection.
l You must have already created a CA group and OCSP or CRL configuration.
l You must have read-write permission for system settings.
Syntax
config system certificate certificate_verify
edit "verify"
set verify-depth <integer>
set customize-error-ignore <enable/disable>
set ca-ignore-errors <ca_errors>
set cert-ignore-errors <cert_errors>
config group_member
edit 1
set ca-certificate <ca>
set ocsp <ocsp rule>
set crl <crl rule>
next
end
next
end
verify-depth Specify the depth from the last intermediate CA to the root CA.
cert-ignore-errors Specify the errors on the certificate to be ignored. Applicable only when
"customize-error-ignore" is enabled.
Example
FortiADC-VM # config system certificate certificate_verify
FortiADC-VM (certificate_ve~i) # edit "verify"
FortiADC-VM (verify) # set verify-depth
<integer> Verify depth
FortiADC-VM (verify) # set customize-error-ignore
enable enable option
disable disable option
FortiADC-VM (verify) # set ca-ignore-errors
UNABLE_TO_GET_ISSUER_CERT OPENSSL 2
UNABLE_TO_GET_CRL OPENSSL 3
CERT_NOT_YET_VALID OPENSSL 9
CERT_HAS_EXPIRED OPENSSL 10
CRL_NOT_YET_VALID OPENSSL 11
CRL_HAS_EXPIRED OPENSSL 12
DEPTH_ZERO_SELF_SIGNED_CERT OPENSSL 18
SELF_SIGNED_CERT_IN_CHAIN OPENSSL 19
UNABLE_TO_GET_ISSUER_CERT_LOCALLY OPENSSL 20
UNABLE_TO_VERIFY_LEAF_SIGNATURE OPENSSL 21
CERT_CHAIN_TOO_LONG OPENSSL 22
INVALID_CA OPENSSL 24
INVALID_PURPOSE OPENSSL 26
CERT_UNTRUSTED OPENSSL 27
CERT_REJECTED OPENSSL 28
FortiADC-VM (verify) # set cert-ignore-errors
UNABLE_TO_GET_ISSUER_CERT OPENSSL 2
UNABLE_TO_GET_CRL OPENSSL 3
CERT_NOT_YET_VALID OPENSSL 9
CERT_HAS_EXPIRED OPENSSL 10
CRL_NOT_YET_VALID OPENSSL 11
CRL_HAS_EXPIRED OPENSSL 12
DEPTH_ZERO_SELF_SIGNED_CERT OPENSSL 18
SELF_SIGNED_CERT_IN_CHAIN OPENSSL 19
UNABLE_TO_GET_ISSUER_CERT_LOCALLY OPENSSL 20
UNABLE_TO_VERIFY_LEAF_SIGNATURE OPENSSL 21
CERT_CHAIN_TOO_LONG OPENSSL 22
INVALID_CA OPENSSL 24
INVALID_PURPOSE OPENSSL 26
CERT_UNTRUSTED OPENSSL 27
CERT_REJECTED OPENSSL 28
FortiADC-VM (verify) #
Use this command to manage certificate revocation lists (CRL). You can enable CRL by importing a CRL file or
specifying a CRL URL.
A CRL is a file that contains a list of revoked certificates, their serial numbers, and their revocation dates. The file
also contains the name of the issuer of the CRL, the effective date, and the next update date. By default, the
shortest validity period of a CRL is one hour.
l You must know the URL of a CRL server or have downloaded the CRL file and be able to browse to it so that you
can upload it.
l You must have read-write permission for system settings.
FortiADC Handbook 282
Fortinet Technologies, Inc.
config system config system certificate intermediate_ca
Syntax
config system certificate crl
edit <name>
set crl <certificate-filename>
set http-url <string>
set scep-url <string>
set host-header <string>
next
end
crl Paste thename of a CRL certificate file between quotation marks as shown in the
example.
Example
FortiADC-VM # config system certificate crl
FortiADC-VM (crl) # edit "crl"
FortiADC-VM (crl) # set crl-file global_crl.cer
FortiADC-VM (crl) # end
See also
l execute certificate crl
Syntax
config system certificate intermediate_ca
edit <name>
set certificate <certificate-filename>
next
end
certificate Paste the name of an intermediate CA file between quotation marks as shown in
the example.
Example
FortiADC-VM # config system certificate intermediate_ca
FortiADC-VM (intermediate_ca) # edit "intermediate_ca"
FortiADC-VM (intermediate_ca) # set certificate-file intermediate_ca.cer
FortiADC-VM (intermediate_ca) # end
Syntax
config system certificate intermediate_ca_group
edit <name>
config group_member
edit <No.>
set ca <datasource>
next
end
next
end
Syntax
config system certificate local
edit <name>
set certificate-file <certificate-filename>
set comments <string>
set csr <csr>
set password <passwd>
set private-key-file <key-filename>
next
end
FortiADC Handbook 284
Fortinet Technologies, Inc.
config system config system certificate local_cert_group
csr Paste the contents of a CSR file between quotation marks as shown in the
example.
password Password that was used to encrypt the file. The FortiADC system uses the
password to decrypt and install the certificate.
private-key Paste the contents of a key file between quotation marks as shown in the
example.
Example
FortiADC-VM # config system certificate local
FortiADC-VM (local) # edit "csr"
FortiADC-VM (csr) # set private-key-file csr.key
FortiADC-VM (csr) # set csr-file csr.csr
FortiADC-VM (csr) # end
FortiADC-VM # config system certificate local
FortiADC-VM (local) # edit "new-local"
FortiADC-VM (new-local) # set private-key-file new-local.key
FortiADC-VM (new-local) # set certificate-file new-local.cer
FortiADC-VM (new-local) # end
See also
l execute certificate local
Create local groups to facilitate the configuration of profiles that are associated with a virtual server.
Include in the local certificate group all of the server certificates and intermediate CAs for the pool of backend
servers to be associated with a single virtual server.
l You must have already added the certificates to the local certificate store and Intermediate CA certificate store.
l You must have read-write permission for system settings.
Syntax
config system certificate local_cert_group
edit <name>
config group_member
edit <No.>
set default {enable|disable}
set intermediate-ca-group <datasource>
set local-cert <datasource>
next
end
next
end
Use this command to configure a remote certificate. You can enable OCSP by importing an OCSP CA or
specifying an OSCP URL. If you want to use the configuration in a certificate verify configuration, you must add
both an OCSP CA and URL.
OCSP enables you to validate or revoke certificates by query, rather than by importing certificate revocation list
(CRL) files. Since distributing and installing CRL files can be a considerable burden in large organizations, and
because delay between the release and install of the CRL represents a vulnerability window, this can often be
preferable.
To use OCSP queries, you must first install the certificates of trusted OCSP/CRL servers.
l You must know the URL of an OCSP server or have downloaded the certificate and key files and be able to browse
to them so that you can upload them.
l You must have read-write permission for system settings.
Syntax
config system certificate remote
edit "cert"
set certificate-file cert.cer
next
end
cert Paste the contents of a CA file between the quotation marks (" "), as shown in the
example below.
Example
FortiADC-VM # config system certificate remote
FortiADC-VM (remote) # edit new-remote-ca
FortiADC-VM (new-remote-ca) # set certificates-file new-remote-ca.cer
FortiADC-VM (new-remote-ca) # end
FortiADC Handbook 286
Fortinet Technologies, Inc.
config system config system certificate ocsp
See also
l execute certificate remote
Use this command to configure Online Certificate Status Protocol (OCSP). You can enable OCSP by importing an
OCSP CA or specifying an OSCP URL. If you want to use the configuration in a certificate verify configuration,
you must add both an OCSP CA and URL.
OCSP enables you to validate or revoke certificates by query rather than by importing certificate revocation list
(CRL) files. Because distributing and installing CRL files can be a considerable burden for large organizations,
and because delay between the release and install of the CRL represents a vulnerability window, OCSP can often
be the preferred option.
Typically, upon receiving certificates, FortiADC sends validity check requests to the OCSP server, which then
returns the result signed by its certificate. A URL is required to identify the OCSP service location.
To use OCSP queries, you must first install the certificates of trusted OCSP/CRL servers.
l You must know the URL of an OCSP server or have downloaded the certificate and key files and be able to browse
to them so that you can upload them.
l You must have read-write permission for system settings.
Syntax
config system certificate ocsp
edit "ocsp"
set verify-others <enable/disable>
set remote-certificates <remote_ca>
set ca-chain <ca_group>
set issuer-criteria-check <enable/disable>
set accept-trusted-root-ca <enable/disable>
set reject-ocsp-response-with-missing-nextupdate <enable/disable>
set url <ocsp server location>
set host-header <string>
set timeout <integer>
set leeway <integer>
set maxage <integer>
set caching enable
set caching-thisupd-extra-maxage -1
set caching-nextupd-ahead-time -1
set tunneling-status <enable/disable>
set tunneling-address <ip>
set tunneling-port <integer>
set tunneling-username <string>
set tunneling-password <string>
end
remote- Specify the remote-certificates used to sign the OCSP result. Note: This option
certificates becomes available only when verify-others is enabled.
ca-chain Specify the CA chain (i.e., CA group) used to sign the OCSP result. Note: This
option becomes available only when verify-others is disabled.
timeout The number of seconds (200 ms by default) that FortiADC waits for a response
from the OCSP responder. FortiADC will block the link once it times out.
leeway Specify the time that when the OCSP responder clock and a client clock are not
synchronized, which could cause a certificate status check to fail. (default 300s)
maxage Specify a time in seconds to compare to the notBefore field of a status response.
Used when the status response does not include the notAfter field.(default 0s)
caching Enable or disable OCSP caching. Enable this option to make OCSP response
restored as cache in FortiADC.
caching- Specify the time gap between the current time and the this-updated-time in
thisupd-extra- OCSP response that is acceptable by FortiADC.
maxage
Note: The default is -1, meaning this option does not take effect.
caching-nex- Specify how long before the next-updated-time FortiADC will flush the OCSP
tupd-ahead- response.
time
Note: The default is -1, meaning this option does not take effect.
FortiADC Handbook 288
Fortinet Technologies, Inc.
config system config system certificate ocsp
Example
FortiADC-VM (root) # config system certificate ocsp
Use this command to configure Online Certificate Status Protocol Stapling. You can enable OCSP stapling by
importing an OCSP response or quote an OCSP profile.
In a stapling scenario, the certificate holder queries the OCSP server themselves at regular intervals, obtaining a
signed time-stamped OCSP response. When the site's visitors attempt to connect to the site, this response is
included ("stapled") with the TLS/SSL Handshake via the Certificate Status Request extension response. Note
that the TLS client must explicitly include a Certificate Status Request extension in its Client Hello TLS/SSL
handshake message.
OCSP_staping could be used in a local_certificate_group, and the local certificate in OCSP stapling
must be the local certificate in the local certificate group.
Syntax
config system certificate OCSP_stapling
edit <name>
set OCSP <datasource>
set OCSP-response-file <OCSP-response-filename>
set issuer-certificate <datasource>
set local-certificate <datasource>
set response-update-ahead-time <integrate>
set response-update-interval <integrate>
end
ocsp-response A certificate containing the OCSP response from the OCSP server.
response- The default is 1h (1 hour). Valid values are Xh (hour), Xm (minute), and Xs
update- (second). For example, 5m, 30s (=5 minute and 30 seconds).
ahead-time
response- The number of seconds (200 ms by default) that FortiADC waits for a response
update- from the OCSP responder. FortiADC will block the link once it times out.
interval
FortiADC Handbook 290
Fortinet Technologies, Inc.
config system config system console
Example
config system certificate OCSP_stapling
edit "ocsp_staping"
set local-certificate cert
set issuer-certificate cacert
set OCSP-response-file ocsp_staping.cer
next
end
Syntax
config system console
set output {standard|more}
end
Example
Syntax
config system dns
set primary <class_ip>
set secondary <class_ip>
end
Example
FortiADC-VM # get system dns
primary : 8.8.8.8
secondary : 0.0.0.0
Use this command to enable basic denial of service (DoS) prevention to combat SYN floods.
When enabled, FortiADC uses the SYN cookie method to track half-open connections. The system maintains a
DoS mitigation table for each configured IPv4 virtual server. It times out half-open connections so that they do not
deplete system resources.
Note: The DoS feature is not supported for IPv6 traffic or for Layer 4 virtual servers with the Direct Routing packet
forwarding mode.
Syntax
config system dos-prevention
set syncookie <enable|disable>
set max_half_open <integer>
end
max_half_open Specify a maximum number of half open sockets. The default is 1 (10
connections). The valid range is 1 to 80,000.
FortiADC Handbook 292
Fortinet Technologies, Inc.
config system config system fortiguard
Example
FortiADC-VM # get system dos-prevention
syncookie : disable
max_half_open : 1
Use this command to configure how the FortiADC system receives scheduled updates from FortiGuard services.
FortiGuard periodically updates the WAF Signature Database, IP Reputation Database, and Geo IP Database.
Syntax
config system fortiguard
set override-server-status {enable|disable}
set override-server-address <string>
set scheduled-update-day {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday |
Saturday}
set scheduled-update-frequency {daily|weekly|every}
set scheduled-update-status {enable|disable}
set scheduled-update-time <hh:mm>
end
Example
FortiADC-VM # get system fortiguard
scheduled-update-status: enable
scheduled-update-frequency: weekly
scheduled-update-day: Sunday
scheduled-update-time: 04:00
override-server-status: disable
push-update-status : enable
push-update-override-status: disable
tunneling-status : disable
See also
l config system web-filter
FortiADC Handbook 294
Fortinet Technologies, Inc.
config system config system global
Syntax
config system global
set admin-idle-timeout <integer>
set config-sync {enable|disable}
set default-certificate <certname>
set hardware-ssl {enable|disable}
set hostname <string>
set language {english|chinese-simplified}
set port-http <integer>
set port-https <integer>
set port-ssh <integer>
set port-telnet <integer>
set ssh-cbc-cipher {enable|disable|
set ssh-hmac-md5 {enable|disable}
set vdom-admin {enable|disable>
end
port-http Specify the port for the HTTP service. Usually, HTTP uses port 80.
port-https Specify the port for the HTTPS service. Usually, HTTPS uses port
443.
port-ssh Specify the port for the SSH service. Usually, SSH uses port 22.
port-telnet Specify the port for the Telnet service. Usually, Telnet uses port 25.
Example
config system ha
Syntax
config system ha
set mode {active-active | active-passive | standalone}
set arps <integer>
set arps-interval <integer>
set auto-config-sync {enable|disable}
set datadev <datasource>
set group-id <integer>
set group-name <string>
set ha-eth-type <4 digit hex>
set hatrans-eth-type <4 digit hex>
set hb-interval <integer>
FortiADC Handbook 296
Fortinet Technologies, Inc.
config system config system ha
mode l active-active
l active-passive
l standalone
Note: If you change this setting, you are logged out of the CLI, and you can
log in again if permitted by the new configuration.
arps Number of times that the cluster member broadcasts extra address
resolution protocol (ARP) packets when it takes on the primary role. (Even
though a new NIC has not actually been connected to the network, the
member does this to notify the network that a new physical port has become
associated with the IP address and virtual MAC of the HA cluster.) This is
sometimes called “using gratuitous ARP packets to train the network,” and
can occur when the primary node is starting up, or during a failover. Also
configure ARP Packet Interval.
Increase the number of times the primary node sends gratuitous ARP
packets if an active-passive cluster takes a long time to fail over or to train
the network. Sending more gratuitous ARP packets may help the failover to
happen faster.
Decrease the number of times the primary node sends gratuitous ARP
packets if the cluster has a large number of VLAN interfaces and virtual
domains. Because gratuitous ARP packets are broadcast, sending them
might generate a large amount of network traffic. As long as the active-
passive cluster fails over successfully, you can reduce the number of times
gratuitous ARP packets are sent to reduce the amount of traffic produced by
a failover.
Increase the interval if the cluster has a large number of VLAN interfaces
and virtual domains. Because gratuitous ARP packets are broadcast,
sending them might generate a large amount of network traffic. As long as
the active-passive cluster fails over successfully, you can increase the
interval between when gratuitous ARP packets are sent to reduce the rate of
traffic produced by a failover.
FortiADC Handbook 298
Fortinet Technologies, Inc.
config system config system ha
datadev Set the network interface to be used for data synchronization among cluster
nodes. You can configure up to two data ports. If one data port fails, its
traffic fails over to the next data port. If all data ports fail, data
synchronization traffic fails over to the heartbeat port. If you do not
configure a data port, the heartbeat port is used for synchronization.
Use the same port numbers for all cluster members. For example, if you
select port3 on the primary node, select port3 as the data port interface on
the other member nodes.
If you have more than one HA cluster on the same network, each cluster
must have a different group ID.
The group ID is used in the virtual MAC address that is sent in broadcast
ARP messages.
group-name Name to identify the HA cluster if you have more than one.
ha-eth-type A Layer-3 protocol number for the HA data channel. It is used for heartbeat
packets type, and is also used for Layer-7/Layer-4 session persistence sync.
hatrans-eth-type A Layer-3 protocol number for the HA data channel. It works in active-active (AA)
mode, and is used for traffic relay between HA nodes in AA mode.
This part of the configuration is pushed from the primary node to member
nodes.
The valid range is 1 to 20 (that is, between 100 and 2,000 milliseconds).
Note: Although this setting is pushed from the primary node to member
nodes, you should initially configure all nodes with the same Detection
Interval to prevent inadvertent failover from occurring before the initial
synchronization.
hb-lost-threshold Number of times a node retries the heartbeat and waits to receive HA
heartbeat packets from the other nodes before concluding the other node is
down.
This part of the configuration is pushed from the primary node to member
nodes.
Note: Although this setting is pushed from the primary node to member
nodes, you should initially configure all nodes with the same HB Lost
Threshold to prevent inadvertent failover from occurring before the initial
synchronization.
hbdev Set the network interface to be used for heartbeat packets. You can
configure one or two heartbeat ports.
Use the same port number for all cluster members. For example, if you
select port3 on the primary node, select port3 as the heartbeat interface on
the other member nodes.
l2ep-eth-type A Layer-3 protocol number for the HA data channel. It is used for configuration
sync, HC result sync, and applications dynamic data.
FortiADC Handbook 300
Fortinet Technologies, Inc.
config system config system ha
http-persistence-pickup Enable to synchronize Layer 7 session data used for persistence to backend
servers.
When not enabled, a node that receives traffic due to failover would not
know that a session had been created already, so it will be treated as a new
session.
Synchronization of the persistence table is not possible for SSL session ID.
When the session via the first node is terminated, the client must re-
establish an SSL connection via the second node. When a client requests a
new SSL connection with an SSL server, the initial TCP connection has an
SSL Session ID of 0. This zero value tells the server that it needs to set up a
new SSL session and to generate an SSL Session ID. The server sends the
new SSL Session ID in its response to the client as part of the SSL
handshake.
l4-persistence-pickup Enable to synchronize Layer 4 session data used for persistence to backend
servers.
When not enabled, a node that receives traffic because of failover would not
know that a session had been created already, and the client will be required
to re-initialize the connection.
local-node-id A number that uniquely identifies the member within the cluster. The valid
range is 0-7. In an active-active deployment, this number is used in the
virtual MAC address that is sent in ARP responses. In an active-passive
deployment, this number is not used.
mgmt-status This setting must be enabled before other management options can be set.
mgmt-ip-allowaccess Set which methods are allowed access to the management IP.
mgmt-mac-addr Set a management MAC address. This setting is optional. If it is not set, the
system will assign a MAC address randomly.
monitor One or more network interfaces that correlate with a physical link. These
ports will be monitored for link failure.
node-list Specify the node IDs for the nodes in the cluster. An active-active cluster
can have up to eight members.
override Enable to make Device Priority a more important factor than uptime when
selecting the primary node.
priority Number indicating priority of the member node when electing the cluster
primary node.
This setting is optional. The smaller the number, the higher the priority. The
valid range is 0 to 9. The default is 5.
remote-ip-failover-hold- If failover occurs due to a remote IP monitor test, and this node's role
time changes (to master or slave), it cannot change again until the holdtime
elapses. Holdtime can be used to prevent looping.The default holdtime is
120 seconds. The valid range is 60-86400.
remote-ip-failover- Number of consecutive times that the remote IP address is unreachable that
threshold indicates failure. The default is 5. The valid range is 1-300.
config remote-ip-monitor-list
health-check-interval Seconds between each health check. Should be more than the timeout to pre-
vent overlapping health checks. The default is 10.
FortiADC Handbook 302
Fortinet Technologies, Inc.
config system config system ha
health-check-retry Number of retries to confirm up or down. The default is 3 retries. The valid range
is 1-10.
health-check-timeout Seconds to wait for a reply before assuming that the health check has failed. The
default is 5.
Example
FortiADC-VM # get system ha
mode : standalone
hbdev :
datadev :
group-id : 0
group-name :
priority : 5
config-priority : 100
override : disable
hb-interval : 2
arps : 5
hb-lost-threshold : 6
arps-interval : 6
l7-persistence-pickup : disable
l4-persistence-pickup : disable
l4-session-pickup : disable
auto-config-sync : enable
monitor :
remote-ip-monitor : disable
boot-time : 30
ha-eth-type : 8890
hatrans-eth-type : 8892
l2ep-eth-type : 8893
hb-type : multicast
hb-interval : 2
arps : 5
hb-lost-threshold : 6
arps-interval : 6
l7-persistence-pickup : disable
l4-persistence-pickup : disable
l4-session-pickup : disable
auto-config-sync : enable
monitor :
remote-ip-monitor : disable
boot-time : 30
ha-eth-type : 8890
hatrans-eth-type : 8892
l2ep-eth-type : 8893
hb-type : multicast
In server load balancing deployments, the system uses health checks to poll the members of the real server pool
to test whether an application is available. You can also configure additional health checks to poll related servers,
and you can include results for both in the health check rule. For example, you can configure an HTTP health
check test and a RADIUS health check test. In a web application that requires user authentication, the web server
is deemed available only if the web server and the related RADIUS server pass the health check.
In link load balancing deployments, the health check can poll either the ISP link group member itself or a “beacon”
server that is deployed on the other side of the ISP link. A beacon is an IP address that must be reachable in order
for the link to be deemed available. A beacon can be any IP address, such as a main office, core router, or virtual
server at another data center.
If a pool member fails a health check and retries also fail, it is deemed unavailable. The ADC does not send it
connections until it is deemed available.
If you expect a backend server is going to be unavailable for a long period, such as
when it is undergoing hardware repair, it is experiencing extended down time, or when
you have removed it from the server farm, you can improve the performance of the
FortiADC system by setting the status of the pool member to Disabled, rather than
allowing the system to continue to attempt health checks.
Table 21 describes the predefined health checks. You can get started with these or create custom objects.
Table 21: Predefined health check configuration objects
Predefined Description
LB_HLTHCK_HTTP Sends a HEAD request to the server port 80. Expects the server to return an
HTTP 200.
FortiADC Handbook 304
Fortinet Technologies, Inc.
config system config system health-check
Predefined Description
LB_HLTHCK_ Sends a HEAD request to the server port 443. Expects the server to return
HTTPS an HTTP 200.
LB_HLTHCK_TCP_ Sends a TCP echo to server port 7. Expects the server to respond with the
ECHO corresponding TCP echo.
l You must have a good understanding of TCP/IP and knowledge of the services running on your backend servers.
l You must know the IP address, port, and configuration details for the applications running on backend servers. For
some application protocol checks, you must specify user credentials.
l You must have read-write permission for load balancing settings.
After you have configured a health check, you can select it in the server load balacing real server configuration or
in the link-load-balancing gateway link configuration.
Syntax
config system health-check
edit <name>
set type {dns | ftp | http | https | icmp | imap4 | l2-detection | pop3 | radacct |
radius | sip | sip-tcp | smtp | snmp | snmp-custom | ssh | tcp | tcp-echo |
tcphalf | tcpssl | udp | mysql | oracle | script}
set connect-data-type {service_name | sid | connect_string }
set service_name <string>
set sid <string>
set script <datasource>
set connect-string <string>
set oracle-send-string <string>
set oracle-receive-string <string>
set row <integer>
set column <integer>
set dest-addr <class_ip>
set dest-addr-type {ipv4|ipv6}
set hostname <string>
set interval <integer>
set retry <integer>
set timeout <integer>
set up-retry <integer>
set addr-type {ivp4|ipv6}
set domain-name <string>
set host-addr <class_ip>
set port <integer>
set file <string>
set passive {enable|disable}
set username <string>
set password <passwd>
set method-type {http_get | http_head}
set match-type {match_all | match_status | match_string}
set send-string <string>
Settings Guidelines
General
After you initially save the configuration, you cannot edit the
name.
type Specify the health check type. After you have specified the
type, the CLI commands are constrained to the ones that are
applicable to the specified type, not all of the settings
described in this table.
FortiADC Handbook 306
Fortinet Technologies, Inc.
config system config system health-check
Settings Guidelines
hostname For HTTP or HTTPS health checks, you can specify the hostname
(FQDN) instead of the destination IP address. This is useful in VM
environments where multiple applications have the same IP
address.
interval Seconds between each health check. Should be more than the
timeout to prevent overlapping health checks. The default is
10.
timeout Seconds to wait for a reply before assuming that the health
check has failed. The default is 5.
ICMP
HTTP/HTTPS
Settings Guidelines
status-code The health check sends an HTTP request to the server. Specify
the HTTP status code in the server reply that indicates a
successful test. Typically, you use status code 200 (OK). Other
status codes indicate errors.
l Match String
l Match Status
l Match All (match both string and status)
Not applicable when using HTTP HEAD. HTTP HEAD requests
test status code only.
http-connect If the real server pool members are HTTP proxy servers,
specify an HTTP CONNECT option:
remote-host If you use HTTP CONNECT to test proxy servers, specify the
remote server IP address.
remote-port If you use HTTP CONNECT to test proxy servers, specify the
remote server port.
DNS
FortiADC Handbook 308
Fortinet Technologies, Inc.
config system config system health-check
Settings Guidelines
password-type l User—If the backend server does not use CHAP, select this
option.
l CHAP—If the backend server uses CHAP and does not require a
secret key, select this option.
SIP / SIP-TCP
sip-request-type Specify the SIP request type to be used for health checks:
l register
l options
status-code The expected response code. If not set, response code 200 is
expected. Specify 0 if any reply should indicate the server is avail-
able.
SMTP
POP3
Settings Guidelines
IMAP4
FTP
file Specify a file that exists on the backend server. Path is relative
to the initial login path. If the file does not exist or is not
accessible, the health check fails.
passive Select this option if the backend server uses passive FTP.
SNMP
community Must match the SNMP community string set on the backend
server. If this does not match, all SNMP health checks fail.
disk Maximum normal disk usage. If the disk is too full, the health
check fails.
FortiADC Handbook 310
Fortinet Technologies, Inc.
config system config system health-check
Settings Guidelines
SNMP-Custom
l ASN_COUNTER
l ASN_INTEGER
l ASN_OBJECT_ID
l ASN_OCTET_STR
l ASN_UINTEGER
compare-type l equal
l greater
l less
SSH
L2 Detection
No specific options Link Layer health checker. Sends ARP (IPv4) or NDP (IPv6)
packets to test whether a physically connected system is
available.
MySQL
Oracle
Settings Guidelines
l Service name
l SID
l Connect string
Setting these configurations depends on the configuration of
the server.
service_name When you select a Service name, use this to specify the Service
name
sid When you select an SID, use this to specify the SID
connect-string When you select a service name, use this to specify connect string
Script
FortiADC Handbook 312
Fortinet Technologies, Inc.
config system config system health-check
Example
The following is an example of an HTTP health check for HTTP proxy servers:
FortiADC-VM # config system health-check
FortiADC-VM (health-check) # edit HTTP-CONNECT-TEST
Add new entry 'HTTP-CONNECT-TEST' for node 2763
The following is an example of an SNMP health check for a server running the UCD agent:
FortiADC-VM # config system health-check
FortiADC-VM (health-check) # edit lb-health-check
Add new entry 'lb-health-check' for node 2763
FortiADC-VM (lb-health-check) # set type snmp
FortiADC-VM (lb-health-check) # get
type : snmp
interval : 10
timeout : 5
retry : 1
up-retry : 1
port : 0
dest-addr-type : ipv4
dest-addr : 0.0.0.0
cpu : 96
mem : 96
disk : 96
agent-type : UCD
community :
version : v1
The following example configures a custom SNMP health check for a server that does not support the UCD or
Windows 2000 agent type.
FortiADC-VM # config system health-check
FortiADC-VM (health-check) # edit snmp-linux
Add new entry 'snmp-linux' for node 2763
FortiADC-VM (snmp-linux) # set type snmp-custom
FortiADC-VM (snmp-linux) # get
type : snmp-custom
interval : 10
timeout : 5
FortiADC Handbook 314
Fortinet Technologies, Inc.
config system config system health-check-script
retry : 1
up-retry : 1
port : 0
dest-addr-type : ipv4
dest-addr : 0.0.0.0
community :
version : v1
oid :
value-type :
FortiADC-VM (snmp-linux) # set version v2c
FortiADC-VM (snmp-linux) # set oid ".1.3.6.1.4.1.2021.10.1.3.1"
FortiADC-VM (snmp-linux) # set value-type ASN_INTEGER
FortiADC-VM (snmp-linux) # set compare-type greater
FortiADC-VM (snmp-linux) # set counter-value 80
FortiADC-VM (snmp-linux) # end
FortiADC-VM #
This command is deprecated. You must use the web UI to upload a script file.
Syntax
config system health check script
Example
FortiADC-VM # config system health check script
Syntax
config system interface
edit port1
set floating {enable|disable}
set floating-ip <string>
set traffic-group <string>
set allowaccess {http https ping snmp ssh telnet}
set ip <ip&netmask>
set ip6 <ip&netmask>
set mac-addr <xx:xx:xx:xx:xx:xx>
set mode {static|pppoe|DHCP}
set disc-retry-timeout <integer>
set dns-server-override {enable|disable}
set idle-timeout <integer>
set lcp-echo-interval <integer>
set lcp-max-echo-fails <integer>
set pppoe-default-gateway {enable|disable}
set username <string>
set password <passwd>
set mtu <integer>
set retrieve_physical_hwaddr {enable|disable}
set speed {10full | 10half | 100full | 100half | 1000full | 1000half | auto}
set status {down | up}
set vdom <datasource>
set type {vlan|aggregate}
set retrieve_dhcp_gateway {enable | disable}
set dhcp-gateway-distance <integer>
set vlanid <integer>
set interface <datasource>
set aggregate-algorithm {layer2 | layer2-3 | layer3-4}
set aggregate-mode {802.3ad | balance-alb | balance-rr | balance-tlb | balance-xor|
broadcast}
set member <datasource>
set secondary-ip {enable|disable}
config secondary-ip-list
edit 1
set allowaccess {http https ping snmp ssh telnet}
set ip <ip&netmask>
set floating {enable|disable}
set floating-ip <string>
set traffic-group <string>
next
end
config ha-node-ip-list
edit <No.>
set ip <ip&netmask>
set node <integer>
set allowaccess {http https ping snmp ssh telnet}
next
end
set ha-node-secondary-ip {enable|disable}
config ha-node-secondary-ip-list
edit <No.>
set ip <ip&netmask>
set node <integer>
FortiADC Handbook 316
Fortinet Technologies, Inc.
config system config system interface
Note: Since the 4.7.0 release, two new interface types (i.e., loop-back and soft-switch) have been supported.
When setting the interface type to soft-switch, be sure to set the member ports, as illustrated in the commands
below:
config system interface
edit "testint"
set type loopback| aggregate| soft-switch | vlan
set member port8 port9
… …
next
end
allowaccess Allow inbound service traffic. Select from the following options:
mac-addr The MAC address is read from the interface. If necessary, you can set the
MAC address.
status This Status column is not the detected physical link status; it is the
administrative status (Up/Down) that indicates whether you permit the
network interface to receive and/or transmit packets.
vdom If applicable, select the virtual domain to which the configuration applies.
type If you are editing the configuration for a physical interface, you cannot set
the type.
If you are configuring a logical interface, you can select from the following
options:
disc-retry-timeout Seconds the system waits before it retries to discover the PPPoE server.
FortiADC Handbook 318
Fortinet Technologies, Inc.
config system config system interface
dns-server-override Use the DNS addresses retrieved from the PPPoE server instead of the one
configured in the FortiADC system settings.
idle-timeout Disconnect after idle timeout in seconds. The default is 0. The valid range
is 0 to 32,000.
lcp-echo-interval LCP echo interval in seconds. The default is 5. The valid range is 1 to 255.
lcp-max-echo-fails Maximum missed LCP echo messages before disconnect. The default is 3.
The valid range is 1 to 255.
pppoe-default- Use the default gateway retrieved from the PPPoE server instead of the
gateway one configured in the FortiADC system settings.
If one physical network port (that is, a VLAN trunk) will handle multiple
VLANs, create multiple VLAN subinterfaces on that port, one for each
VLAN ID that will be received.
If multiple different physical network ports will handle the same VLANs, on
each of the ports, create VLAN subinterfaces that have the same VLAN
IDs.
The valid range is between 1 and 4094. The value you specify must match
the VLAN ID added by the IEEE 802.1q-compliant router or switch
connected to the VLAN subinterface.
interface Physical interface associated with the VLAN; for example, port2.
aggregate-algorithm Connectivity layers that will be considered when distributing frames among
the aggregated physical ports:
l Layer 2
l Layer 2-3
l Layer 3-4
l 802.3ad
l Balance-alb
l Balance-rr
l Balance-tlb
l Balance-xor
l Broadcast
member Specify the physical interfaces that are included in the aggregation.
set type loopback Set as the loopback interface, which is used by other features, such as VS,1-1
NAT, GLB, VT, OSPF, BGP, etc.
set type soft-switch Set the interface type used for transparent mode. All interfaces that belong to
the same soft-switch will be in the same broadcast domain. Use of a soft-switch
can greatly simplify customer deployment because they do not have to change
their network topologies when adding new FortiADC devices to their envir-
onment.
config secondary-ip-list
allowaccess Allow inbound service traffic. Specify a space-separated list of the following
options:
ip Secondary IP addresses can be used when you deploy the system so that it
belongs to multiple logical subnets. If you assign multiple IP addresses to
an interface, you must assign them static addresses.
FortiADC Handbook 320
Fortinet Technologies, Inc.
config system config system interface
config ha-node-ip-list
allowaccess Enable inbound service traffic on the IP address for the specified services.
config ha-node-secondary-ip-list
allowaccess Enable inbound service traffic on the IP address for the specified services.
ip You use the HA node secondary IP list configuration if the interfaces of the
nodes in an HA active-active deployment are configured with secondary
IP addresses.
Example
The following example configures port1 (the management interface):
FortiADC-VM # get system interface port1
type : physical
mode : static
vdom : root
redundant-master :
ip : 192.168.1.99/24
ip6 : ::/0
allowaccess : https ping ssh snmp http telnet
mtu : 1500
speed : auto
status : up
mac-addr : 00:0c:29:e8:a0:86
secondary-ip : enable
mode : static
vdom : root
redundant-master :
ip : 192.0.2.5/24
ip6 : ::/0
allowaccess : https ping ssh snmp http telnet
mtu : 1500
speed : auto
status : up
mac-addr : 00:0c:29:e8:a0:86
secondary-ip : enable
== [ vlan102 ]
type: vlan
vdom: root
redundant-master: 0
ip: 10.10.100.102/32
ip6: ::/0
allowaccess:
status: up
interface: port7
== [ vlan103 ]
FortiADC Handbook 322
Fortinet Technologies, Inc.
config system config system isp-addr
type: vlan
vdom: root
redundant-master: 0
ip: 10.10.103.102/32
ip6: ::/0
allowaccess:
status: up
interface: port7
Use this command to amend the predefined and restored ISP address books, or to configure new ISP address
books.
l ISP routes
l LLB proximity routes
l LLB policies
l GLB data center configuration
ISP address books contain IP subnet addresses and associated province location settings for ISP links. The
province setting is used in GLB deployments in China to enable location awareness that is province-specific. For
example, a user can be directed to a datacenter in Beijing or Guangdong rather than simply China.
In systems with multiple VDOMs, these commands apply to the current VDOM only. In
other words, if you configure an exclusion, it is applicable to the current VDOM only; it
does not change the predefined address book.
You can use the execute isplookup command to see whether an IP address belongs to any of the address books.
If an address is can be found in more than one address book, the results are returned in the following priority:
user-defined, restored, predefined.
The text file for the Restored entries has the following format:
#this is a comment line
ISP name:ABC
Province:Beijing
1.1.1.0/24
Province:Unknown
2.2.0.0 255.255.0.0
#this is a comment line too
3.3.3.3/32
ISP name:DEF
Province:Shanghai
4.4.4.0 255.255.255.0
5.5.0.0/16
You use the execute restore command to import the file and the execute backup command to export it.
You use the execute clean command to erase entries that were imported from the text file. The clean operation
does not affect the predefined addresses or user-configured entries. If a restored entry has user-configured
elements (for example, an exclude list), the clean operation clears the addresses but preserves the configuration
and converts it to a user-defined type.
Basic Steps
FortiADC Handbook 324
Fortinet Technologies, Inc.
config system config system isp-addr
Syntax
config system isp-addr
edit china-mobile
config exclude-address
edit <No.>
set ip-netmask <ip&netmask>
next
end
config address
edit <No.>
set ip-netmask <ip&netmask>
set province <datasource>
next
end
next
edit china-telecom
config exclude-address
edit <No.>
set ip-netmask <ip&netmask>
next
end
config address
edit <No.>
set ip-netmask <ip&netmask>
set province <datasource>
next
end
next
edit china-unicom
config exclude-address
edit <No.>
set ip-netmask <ip&netmask>
next
end
config address
edit <No.>
set ip-netmask <ip&netmask>
set province <datasource>
next
end
next
edit <name>
config address
edit <No.>
set ip-netmask <ip&netmask>
set province <datasource>
next
end
next
end
province Specify the associated province location. The configuration supports the
following selections:
Example
FortiADC-VM # config system isp-addr
FortiADC-VM (isp-addr) # edit china-mobile
FortiADC-VM (china-mobile) # get
type : predef
See also
l execute isplookup
l execute backup
FortiADC Handbook 326
Fortinet Technologies, Inc.
config system config system mailserver
l execute clean
l execute restore
l config system setting
Use this command to configure an SMTP email server if you want to send notifications by email.
Syntax
config system mailserver
set address <string>
set port <integer>
set security {starttls|none}
set smtp-auth {enable|disable}
set username <string>
set password <passwd>
end
address IP address or FQDN of an SMTP server (such as FortiMail) or email server that the
appliance can connect to in order to send alerts and/or generated reports.
Example
FortiADC-VM # get system mailserver
address :
port : 25
security:
smtp-auth : enable
username :
password : *
l Virtual Extensible LAN (VXLAN) is a network virtualization technology used in large cloud-computing deployments.
It encapsulates OSI Layer-2 Ethernet frames within Layer-3 IP packets using the standard destination port 4789.
VXLAN endpoints that terminate VXLAN tunnels are known as VXLAN tunnel endpoints (VTEPs), and can be virtual
or physical switch ports. For more information, see RFC 7348.
l Network Virtualization using Generic Routing Encapsulation (NVGRE) is a network virtualization technology that
attempts to alleviate the scalability problems associated with large cloud-computing deployments. It uses Generic
Routing Encapsulation (GRE) to tunnel Layer-2 packets over Layer-3 networks.
Before you begin, make sure that you have read-write permission to configure system settings.
Syntax
config system vxlan
edit <name> <string>
set type {vxlan|nvgre}
set interface <datasource>
set vni <integer>
set vsid <integer
set ip-version {ipv4-unicast|ipv4-multicast}
set dstport <integer>
set multicast-ttl <integer>
set destination-ip-addresses <class_ip>
config remote-host
edit <No.>
set host-mac-address <xx:xx:xx:xx:xx:xx>
set vtep <class_ip>
next
end
next
end
FortiADC Handbook 328
Fortinet Technologies, Inc.
config system config system overlay-tunnel
l VXLAN (default)
l NVGRE
dstport The VXLAN destination port (number). The default is 4789. The valid
range is 1–6553.
ip-version The IP version to use for the VXLAN interface and for communication over
VXLAN.
Specify the multicast TTL. Valid values are from 0 (default) to 255.
host-mac-address Set the remote host MAC address. The format is xx:xx:xx:xx:xx:xx
Example
The following commands create a VXLAN interface with two VTEP peers:
config system overlay-tunnel
edit "vxlan1"
set type vxlan
set interface port2
set ip-version ipv4-unicast
set destination-ip-addresses 10.75.0.202 10.75.0.88
set dstport 4789
set vni 1122
config remote-host
end
next
The following commands create a VXLAN interface with a multicast IP:
config system overlay-tunnel
edit "vxlan1"
Syntax
config system password-policy
set status {enable|disable}
set apply-to admin-user
set minimum-length <integer>
set must-contain {lower-case-letter non-alphanumeric number upper-case-letter}
end
FortiADC Handbook 330
Fortinet Technologies, Inc.
config system config system schedule-group
Example
FortiADC-VM # get system password-policy
status : disable
Use this command to create schedule objects to use in link load balancing policies. A policy rule can be time-
bound: one time, daily, weekly, or monthly.
Syntax
config system schedule-group
edit <name>
config schedule-member <No.>
edit <name>
set type {daily-recurring | monthly-recurring | one-time | weekly-recurring}
set endtime-of-enddate <string>
set starttime-of-startdate <string>
set day-of-month <integer>
set enddate <string>
set startdate <string>
set day-of-week {friday | monday | saturday | thursday | tuesday | wednesday}
next
end
next
end
startime-of-startdate HH:MM.
day-of-month 1 - 31.
enddate YYYY/MM/DD.
startdate YYYY/MM/DD.
This command is deprecated. You must use the web UI to upload a script file.
Syntax
config system scripting
Example
FortiADC-VM # config system scripting
Use this command to create the service objects that you use in policies.
FortiADC Handbook 332
Fortinet Technologies, Inc.
config system config system service
Basic Steps
Syntax
config system service
edit <name>
set protocol-type {IP/ICMP/TCP/UDP/SCTP/TCP-AND-UDP}
set specify-source-port {enable|disable}
set destination-port-min <integer>
set destination-port-max <integer>
set protocol <integer>
set source-port-min <integer>
set source-port-max <integer>
next
end
destination-port-min First port number in the listening port number/range. For example, web
servers usually listen on TCP port 80 (HTTP). Valid range: 0 - 65535.
protocol Number in the IPv4 Protocol/IPv6 Next Header field that identifies the
protocol, such as 1 (ICMP), 6 (TCP) or 17 (UDP).
source-port-min First port number in the originating port number/range. For some protocols,
this is a single, predictable number, such as 162 (SNMP). For others, it is
dynamically chosen from available ports in the 1024-65535 range.Valid
range: 0 - 65535.
Example
FortiADC-docs # config system service
FortiADC-docs (service) # edit name name
FortiADC-docs (service) # edit http
Add new entry 'http' for node 3822
Use this command to create the service group objects that you use to specify matching services in policies.
Basic Steps
FortiADC Handbook 334
Fortinet Technologies, Inc.
config system config system servicegrp
Syntax
config system servicegrp
edit "servicegrp-name"
set member-list <A> <B> <C>
end
l HTTP
l HTTPS
l ICMP
l TELNET
l SSH
l FTP
l SMTP
l SMTPS
l IMAP
l IMAPS
l POP3
l POP3S
l DHCP
l DNS
l NTP
l SNMP
l SNMP_TRAP
l SYSLOG
l LDAP
l LDAPS
l RADIUS
l RADIUS_OLD
l KERBEROS
l SMB
l SAMBA
l MYSQL
l GRE
l ALL
l service1
Example
config system service
edit "http"
set protoco-type tcp
Use this command to configure log database behavior when disk utilization reaches its capacity.
Syntax
config system setting
set statistics-db-full {overwrite | nowrite}
set log-db-full {overwrite | nowrite}
set predefine-isp {enable|disable}
end
statistics-db-full Specify whether to overwrite stats or stop writing stats when the database
disk allocation (10% of total disk space) is full. The default is overwrite the
earliest stats.
FortiADC Handbook 336
Fortinet Technologies, Inc.
config system config system snmp community
log-db-full Specify whether to overwrite logs or stop writing logs when the database disk
allocation (40% of total disk space) is full. The default is overwrite the earliest
logs.
predefine-isp Enable/disable the predefined ISP address book. Enabled by default. You can use
this setting to disable if you experience address conflicts that you cannot resolve
using the ISP address book exceptions list.
Example
FortiADC-VM # get system setting
statistics-db-full : overwrite
log-db-full : overwrite
predefine-isp: enable
Syntax
config system snmp community
edit <No.>
set name <string>
set queryportv1 <integer>
set queryportv2c <integer>
set queryv1-status {enable|disable}
set queryv2c-status {enable|disable}
set status {enable|disable}
config host
edit <No.>
set host-type <query>
set ip <subnet>
next
end
next
end
name Name of the SNMP community to which the FortiADC system and at least
one SNMP manager belongs, such as management.
You must configure the FortiADC system to belong to at least one SNMP
community so that community’s SNMP managers can query system
information and receive SNMP traps.
You can add up to three SNMP communities. Each community can have a
different configuration for queries and traps, and the set of events that trigger
a trap. You can also add the IP addresses of up to eight SNMP managers to
each community to designate the destination of traps and which IP
addresses are permitted to query the FortiADC system.
queryportv1 Port number on which the system listens for SNMP queries from the SNMP
managers in this community. The default is 161.
queryportv2c Port number on which the system listens for SNMP queries from the SNMP
managers in this community. The default is 161.
config host
ip Specify a subnet address for the SNMP manager to receive traps and be
permitted to query the FortiADC system.
To allow any IP address using this SNMP username to query the FortiADC
system, enter 0.0.0.0/0. For security best practice reasons, however, this
is not recommended.
Example
FortiADC-VM # config system snmp community
FortiADC Handbook 338
Fortinet Technologies, Inc.
config system config system snmp sysinfo
Syntax
config system snmp sysinfo
set contact <string>
set description <string>
set location <string>
set status {enable|disable>
end
contact Contact information for the administrator or other person responsible for this
system, such as a phone number (555-5555) or name (jdoe). The contact
information can be up to 35 characters long, and can contain only letters (a-z, A-
Z), numbers, hyphens ( - ) and underscores ( _ ).
location Physical location of the appliance, such as floor2. The location can be up to 35
characters long, and can contain only letters (a-z, A-Z), numbers, hyphens ( - ) and
underscores ( _ ).
status Enable/disable the SNMP agent, so that the system can send traps and receive
queries.
Example
FortiADC-VM # get system snmp sysinfo
status : disable
description :
location :
contact :
Syntax
config system snmp user
edit <name>
set query-status {enable|disable}
set queryport <integer>
set security-level {authnopriv | authpriv | noauthnopriv}
set auth-proto {sha1|md5}
set auth-pwd <passwd>
set priv-proto {aes|des}
set priv-pwd <passwd>
set status {enable|disable}
config host
FortiADC Handbook 340
Fortinet Technologies, Inc.
config system config system snmp user
edit <name>
set ip <subnet>
next
end
next
end
queryport Port number on which the system listens for SNMP queries from the SNMP
managers in this community. The default is 161.
auth-proto l SHA1
l MD5
priv-proto l AES
l DES
config host
ip Specify a subnet address for the SNMP manager to receive traps and be permitted
to query the FortiADC system.
SNMP managers have read-only access. You can add up to 8 SNMP managers for
a user.
To allow any IP address using this SNMP username to query the FortiADC
system, enter 0.0.0.0/0. For security best practice reasons, however, this is
not recommended.
Caution: The system sends security-sensitive traps, which should be sent only
over a trusted network, and only to administrative equipment.
Note: If there are no other host IP entries, entering only 0.0.0.0/0 effectively
disables traps because there is no specific destination for trap packets. If you do
not want to disable traps, you must add at least one other entry that specifies the
IP address of an SNMP manager.
Example
FortiADC-VM # config system snmp user
This configuration is for the tcpdump utility in the Web UI. The configuration saves TCP dump commands and
filter expressions so that they can be re-run from the Web UI. The CLI supports its own tcpdump service. See
execute packet-capture/packet-capture6.
Before you begin:
Syntax
config system tcpdump
edit <No.>
set host <ip&netmask>
set interface <datasource>
set logtraffic {enable|disable}
set max-packet-count <integer>
set port <integer>
set protocol {arp icmp tcp udp}
set specified-protocol {enable|disable}
set status {enable|disable}
end
FortiADC Handbook 342
Fortinet Technologies, Inc.
config system config system time manual
Example
FortiADC-VM # config system tcpdump
FortiADC-VM (tcpdump) # edit 1
Add new entry '1' for node 2725
FortiADC-VM (1) # set interface port1
FortiADC-VM (1) # set status enable
FortiADC-VM (1) # set max-packet-count 5
FortiADC-VM (1) # end
Syntax
config system time manual
set daylight-saving-time {enable|disable}
set zone <0-71>
next
end
daylight-saving-time Enable if you want the system to adjust its own clock when its time zone
changes between daylight saving time (DST) and standard time.
zone Specify the code number for the time zone where the appliance is located.
Example
FortiADC-VM # get system time manual
daylight-saving-time: enable
zone : 4
See also
l execute date
Syntax
config system time ntp
set ntpsync {enable|disable}
set ntpserver <string>
set syncinterval <integer>
end
ntpserver Specify the IP address or domain name of an NTP server or pool, such as
pool.ntp.org.
syncinterval Specify how often the system synchronizes its time with the NTP server. The
default is 60 minutes. The valid range is 1-1440.
Example
FortiADC-VM # get system time ntp
ntpsync : disable
FortiADC Handbook 344
Fortinet Technologies, Inc.
config system config system traffic-group
A traffic group is similar to a VRRP group. You can create a new traffic group using the config system
traffic-group command, and then invoke using the config system interface or the config
load-balance virtual-server command. If no traffic group is specified in the "virtual-server", it belongs
to the default traffic group.
Syntax
config system traffic-group
edit traffic-group-1
set preempt {enable|disable}
set network-failover {enable|disable}
set failover-order <string>
next
end
traffic-group Specify the traffic group for this virtual server (VS).
Example
config system traffic-group
edit traffic-group-1
set preempt enable
set network-failover enable
set failover-order 1 3 5
next
Use this command to manage FortiGuard web filter category updates. FortiGuard maintains massive lists of web
sites classified into categories so that you can enforce categorical decisions in your rules, like "do not do SSL
forward proxy for sites belonging to the Personal Privacy category."
Syntax
config system web-filter
set cache-status {enable|disable}
set cache-ttl <integer>
set fds-port <integer>
end
FortiADC Handbook 346
Fortinet Technologies, Inc.
config system config system tunneling
cache-ttl Specify cache expiration. The default is 3600. The valid range is 10 to 86,400.
When the cache expires, FortiADC initiates an update from FortiGuard.
fds-port Specify the port to receive updates. The default is 53. An alternative is 8888.
Example
FortiADC-VM # config system web-filter
FortiADC-VM (web-filter) # set cache-status enable
FortiADC-VM (web-filter) # end
See also
l config system fortiguard
Use this command to configure the proxy server for FortiADC VMs that do not have access to Internet, and
therefore cannot connect to the FortiGuard Distribution Network (FDN) to validate its license. Be sure to enable
the set override-server-status when using this feature..
Before you begin, make sure you have read-write permission for system settings.
Syntax
config system tunneling
set address <proxy_address>
set password <password>
set port <proxy_port>
set status {enable | disable}
set username
end
Example
FortiADC-VM # config system fortiguard
FortiADC-VM (fortiguard) # set tunneling-status enable
FortiADC-VM (fortiguard) # set tunneling-address 1.1.1.101
FortiADC-VM (fortiguard) # set tunneling-port 808
FortiADC-VM (fortiguard) # set tunneling-username user1
FortiADC-VM (fortiguard) # set tunneling-password 123
FortiADC-VM (fortiguard) # set override-server-status enable
FortiADC-VM (fortiguard) # set override-server-address 62.209.40.78
FortiADC-VM (fortiguard) # end
Syntax
config system alert-syslog
edit "syslog_name"
set server <ipv4 address>
set port <integer>
next
end
Example
config system alert-syslog
edit "1"
set server 10.0.11.16
set port 514
next
end
config system alert-email
edit "email1"
set from [email protected]
set to [email protected]
next
end
FortiADC Handbook 348
Fortinet Technologies, Inc.
config system config system alert-email
Syntax
config system alert-email
edit "email_name"
set from <string_email_format>
set to <string_email_format>
next
end
Example
config system alert-syslog
edit "1"
set server 10.0.11.16
set port 514
next
end
config system alert-email
edit "email1"
set from [email protected]
set to [email protected]
next
end
Syntax
config system alert-snmp-trap
edit "snmp_trap_name"
set ip <ipv4 address>
set version {version1|version2c|version3}
set trapport-local <integer>
set trapport-remote <integer>
next
end
Example
config system alert-snmp-trap
edit "1"
set ip 10.0.11.16
set version version2c
set trapport-local 162
set trapport-remote 162
next
end
Syntax
config system alert-action
edit "alert_action_name"
set syslog <datasource>
set email mail1 <datasource>
set snmp-trap <datasource>
next
end
syslog The name of a syslog alert action configuration, as configured in "config system
alert-syslog".
email The name of an email alert action, as configured in "config system alert-
email".
snmp_trap The name of an SNMP trap alert action, as configured in "config system alert-
snmp-trap".
FortiADC Handbook 350
Fortinet Technologies, Inc.
config system config system alert
Example
config system alert-action
edit "all"
set syslog 1
set email mail1
set snmp-trap 1
next
end
Use this command to configure that monitor critical events and metric data of various objects in the FortiADC
appliance, and then provides reactions for cases such as email, SNMP trap, and syslog, etc..
Syntax
config system alert
edit "alert_name"
set priority {high|low|middle}
set use-rolling-window {enable|disable}
set rolling-window <integer>
set occurrence-number <integer>
set expire-time <integer>
set throttle-alert <integer>
set alert-source-type {metric|event}
set metric-object-type {interface|slb-virtual-server|system}
set metric-object-instance <string>
set duration <integer>
set comments comments
config alert-metric-expr-member
edit "member_name"
set metric <datasource>
set metric-comparator {eq|le|ge}
set value <integer>
next
end
l high
l medium
l low
occurrence- The number of times an event must have occurred to trigger an alert.
number
Note: This parameter can be configured only when use-rolling-window is
enabled.
expire-time The length of time an alert remains visible on FortiADC's web interface.
throttle--alert The interval (in seconds) at which the system sends out an alert.
Note: Valid values range from 0 to 3,600 (seconds). For example, if you set the
value to 10, the system will send out an alert every 10 seconds. A value of 0
indicates there will be no such time-based throttling — the system will send out
alerts as soon as they are triggered. The timer starts all over again once an alert
is triggered.
FortiADC Handbook 352
Fortinet Technologies, Inc.
config system config system alert
duration Metric duration. An alert is triggered if the metric's value is >=, =, or <= to the
specified value field, averaged over the period of time specified by the
duration value.
l dev_if.avg_bandwidth_rx
l dev_if.avg_bandwidth_tx
If metric-object-type is slb-virtual-server, the metric could be:
l slb.avg_new_conns
l slb.current_conns
l slb.avg_bandwidth_rx
l slb.avg_bandwidth_tx
l slb.avg_bandwidth
l slb.http.avg_client_rtt
l slb.http.avg_server_rtt
l slb.http.avg_app_resonse
l slb.http.avg_new_http_request
l slb.http.avg_cache_hit_ratio
l slb.ssl.avg_ssl_bandwidth_rx
l slb.ssl.avg_ssl_bandwidth_tx
l slb.ssl.avg_ssl_bandwidth
l slb.ssl.avg_ssl_failed_sessions
l slb.ssl.avg_ssl_new_sessions
l slb.ssl.avg_ssl_current_sessions
If metric-object-type is system, the metric could be:
l dev_stats.avg_cpu_usage
l dev_stats.avg_mem_usage
l dev_stats.avg_disk_usage
l dev_stats.avg_cpu_temperature
l dev_stats.avg_sys_temperature
l dev_stats.avg_psu_temperature
metric- Alert metric comparator. Set eq, ge, or le relative to the value (see below)
comparator
value Metric value. Specify a value pertinent to the metric specified (see above).
Note: The unit of measurement of the value you set here may vary, depending
on the metric specified (see above). For CPU, memory, and disk usage, it's a
percentage of the total capacity of the metric. For example, a value of 50 means
50% of the system's CPU, memory, or disk space.
Example
config system alert
edit "metric-sys"
set priority high
set use-rolling-window enable
set rolling-window 50
set occurrence-number 2
set expire-time 3600
set throttle-alert 0
set alert-source-type metric
set metric-object-type system
set duration 5
config alert-metric-expr-member
edit "mem-usage"
set metric dev_stats.avg_mem_usage
set metric-comparator ge
set value 90
next
end
next
edit "metric-vs"
set priority middle
set expire-time 3600
set throttle-alert 0
set alert-source-type metric
set metric-object-type slb-virtual-server
set metric-object-instance l7http
set duration 5
config alert-metric-expr-member
end
next
edit "metric-int"
set priority low
set expire-time 3600
set throttle-alert 0
set alert-source-type metric
set metric-object-type interface
set metric-object-instance port2
set duration 5
config alert-metric-expr-member
edit "avg-bw-tx"
set metric dev_if.avg_bandwidth_tx
set metric-comparator le
set value 20
next
end
next
edit "rs_enable"
set priority high
set use-rolling-window disable
set occurrence-number 300
set expire-time 86400
set throttle-alert 300
set alert-source-type event
set event SLB_Server_ENABLED
FortiADC Handbook 354
Fortinet Technologies, Inc.
config system config system alert-policy
Syntax
config system alert-policy
edit "alert_policy_name"
set status {enable|disable}
set action <datasource>
set comments comments
config alert-member
edit "alert_member_name"
set status {enable|disable}
set alert-name <datasource>
set alert-action-inherit {disable|enable}
set action <datasource>
next
end
next
end
Policy
Note: Alert actions include syslog, email, and snmp trap, which can be configured
using "config system alert-action". The action you set here affects all
members.
Member
Note: Alert actions include syslog, email, and snmp trap, which can be configured
using "config system alert-action". The action you set here affects the
policy-member only.
Example
config system alert-policy
edit "disk"
set status disable
set action all
config alert-member
edit "1"
set alert-name disk
set alert-action-inherit disable
set action all
next
end
next
end
FortiADC Handbook 356
Fortinet Technologies, Inc.
config user config user ldap
config user
The config user commands configure the authentication framework for administrator accounts and user
accounts.
Use this command to configure a connection to an LDAP server that can authenticate administrator or user
logins.
Basic steps:
l You must know the IP address and port used to access the LDAP server. You must know the CN and DN where user
credentials are stored on the LDAP server.
l You must have read-write permission for system settings.
Syntax
config user ldap
edit <name>
set cnid <string>
set dn <string>
set port <integer>
set server <string>
set vdom <datasource>
next
end
cnid Common name (cn) attribute for the LDAP record. For example: cn
dn Distinguished name (dn) attribute for the LDAP record. For example:
cn=John%20Doe,dc=example,dc=com
port Port number for the server. The commonly used port for LDAP is 389.
Use this command to configure user accounts in the local authentication server. You can add or delete accounts,
or change the password, but you cannot edit usernames.
Syntax
config user local
edit <name>
set password <password>
next
end
Do not use spaces or special characters except the ‘at’ symbol ( @ ) or dot (.).
The maximum length is 35 characters.
After you initially save the configuration, you cannot edit the name.
Use this command to configure a connection to a RADIUS server that can authenticate administrator or user
logins.
Basic steps:
l You must know the IP address, port, authentication protocol, and shared secret used to access the RADIUS server.
l You must have read-write permission for system settings.
FortiADC Handbook 358
Fortinet Technologies, Inc.
config user config user user-group
Syntax
config user radius
edit <name>
set auth-type {chap|ms_chap|ms_chapv2|pap}
set port <integer>
set secret <passwd>
set server <string>
set timeout <string>
set vdom <datasource>
next
end
port Port number for the server. The commonly used port for RADIUS is 1812.
Use this command to configure user groups. User groups are authorized by the virtual server authorization policy.
The user group configuration references the authentication servers that contain valid user credentials.
Suggested steps:
1. Configure LDAP and RADIUS servers, if applicable.
2. Configure local users.
3. Configure user groups (reference servers and local users).
4. Configure an authorization policy (reference the user group).
5. Configure the virtual server (reference the authorization policy).
Before you begin:
l You must have created configuration objects for any LDAP and RADIUS server you want to use, and you must have
created user accounts for local users.
l You must have read-write permission for system settings.
After you have created user groups, you can specify them in the load-balance auth-policy configuration.
Syntax
config user user-group
edit <name>
set auth-log {none|fail|success|all}
set auth-timeout <integer>
set user-cache {enable|disable}
set user-cache-timeout <integer>
set client-auth-method http_auth|html_form_auth
set group-type normal|SSO
config member
edit <No.>
set type {local|ldap|radius}
set local-user {<name> <name> ...}
set ldap-server <datasource>
set radius-server <datasource>
next
end
next
end
auth-log Specify one of the following logging options for authentication events:
l No logging
l Log failed attempts
l Log successful attempts
l Log all (both failed and successful attempts)
auth-timeout Timeout for query sent from FortiADC to a remote authentication server.
user-cache Enable to cache the credentials for the remote users (LDAP, RADIUS) once
they are authorized.
config member
ldap-server To add LDAP users, specify the LDAP server configuration name.
FortiADC Handbook 360
Fortinet Technologies, Inc.
config user config user user-group
Example
config user user-group
edit "normal-group"
config member
edit 1
set local-user local-user-1
next
edit 2
set type ldap
set ldap-server ldap-server
next
edit 3
set type radius
set radius-server radius-server
next
end
next
edit "SSO-Kerbros-Group"
set group-type SSO
set authentication-relay auth-relay-1
set logoff-path logoff.html
set sso-support enable
set sso-domain kfor.com
config member
edit 1
set local-user local-user-1
next
edit 2
set type ldap
set ldap-server ldap-server
next
edit 3
set type radius
set radius-server radius-server
next
end
next
edit "SSO-HTTPBasic-Group"
set group-type SSO
set authentication-relay auth-relay-2
set logoff-path logoff
set sso-support enable
set sso-domain sss.com
config member
end
next
end
Use this command to configure the authentication relay, which includes Kerberos and HTTP basic SSO
configurations.
Syntax
config user authentication-relay
edit <authentication-relay name>
set authorization HTTPError401 | always
set delegation-type Kerberos | http-basic
set kdc-ip <string> FQDN/ip of kdc
set kdc-port <integer> the port number of kdc server
set realm <string> realm (upper case)
set domain-prefix-support enable/disable
set domain-prefix <string> domain to prefix
set delegator-account <string> KCD delegator principal
set delegator-password <passwd> KCD delegator password
set delegated-spn <string> KCD delegated service principal
next
end
The following table describes parameters used for configuring authentication relay using Kerberos SSO.
Note: You MUST select Kerberos when configuring authentication relay for
Kerberos SSO.
After a client account authenticates successfully, FortiADC first sends the request
to the server and waits for the server's response before performing authentication
on its part.
When always is set, FortiADC always does the authentication no matter what
response it receives from the server. If the client requests for more information
from the web after FortiADC has gotten the Kerberos service ticket, FortiADC will
always send the request with the service ticket.
kdc-port The port on which the KDC server listens for Kerberos authentication.
FortiADC Handbook 362
Fortinet Technologies, Inc.
config user config user authentication-relay
Note: You must use uppercase letters and ‘.’ in the string.
delegated-spn The identification which shows the service running on the server.
Where
Sometimes the domain controller requires the user to log in with the user name
format "domain\username" such as ‘KFOR\user1’
When this option is enabled, the user can also successfully log in by only entering
‘user1’ because FortiADC is able to automatically add the prefix ‘KFOR\’and then
send ‘KFOR\user1’to the server.
Domain prefix:
The value will be added as the domain prefix when the switch above is enabled
and when the user inputs the username without the domain.
The value of this domain prefix MUST be a valid NetBIOS domain name.
Security Assertion Markup Language (SAML) defines an XML-based framework for describing and exchanging
security information among online business entities. It is the most popular protocol for implementing Web SSO.
The SAML protocol has two components—the Service Provider (SP) and the Identify Provider (IDP). They use
SAML-defined formatted XML to talk to each other and deliver the identity information called Authentication
Assertion.
Syntax
config user saml-idp
edit <name>
set comments <string>
set idp-file <datasource>
next
end
Example
adc-3-228 (root) # config user saml-idp
adc-3-228 (saml-idp) # edit 1
adc-3-228 (1) # set comments "hello"
adc-3-228 (1) # get
comments : hello
idp-file : fortiauth-idp-666 (available)
adc-3-228 (saml-idp) # end
FortiADC Handbook 364
Fortinet Technologies, Inc.
config user config user saml-sp
Syntax
config user saml-sp
edit <name>
set entity-id <ip address>
set local-cert <default is Factory>
set assertion-consuming-service-binding <post>
set assertion-consuming-service-path <string>
set auth-session-lifetime <integer>
set auth-session-timeout <integer>
set export-assertion <enable/disable>
set export-assertion-path <string>
set export-cookie <enable/disable>
set logoff-binding <post>
set idp-metadata <datasource>
set service-url <string>
set sso-export <enable/disable>
entity-id Specify the SAML service provider's entity ID, which is the SAML service provider's
URL.
service-url /SSO
assertion- Post.
consuming-
binding
assertion- /SAML2/Post.
consuming-
service-path
logoff-bind- Post.
ing
logoff-path /SLO/Logout
Note: You must have the IDP metadata file imported into FortiADC ahead of time.
metadata- /Metadata
path
auth-ses- 28800
sion-life-
time
auth-ses- 3600
sion-timeout
sso-export Enable(d) by default, which allows FortiADC to forward SSO information to the real
server, which in turn gets the authentication information and implements the SSO
function.
export-asser- Enable(d) by default, which allows FortiADC to send to the real server the
tion URL where the Authentication Assertion (.i.e., identity information) can be
fetched.
export-asser- /GetAssertion
tion-path
export- Enable(d) by default, which allows FortiADC to send to the real server the cookie of
cookie a site that the user last visited.
Example
FortiADC Handbook 366
Fortinet Technologies, Inc.
config user config user saml-sp
export-cookie : enable
next
end
diagnose
The diagnose commands display diagnostic information that can help you troubleshoot problems. These
commands do not have an equivalent in the web UI.
Syntax
destination The destination for quarantined files, which could be either of the following:
l NULL—Disable quarantine.
l Disk—Send quarantined files to the hard disk.
agelimit The number of hours that quarantined files are kept on the hard disk. The default
is 1 hour. Valid values range form 0 to 336 hours.
Note: If the age limit is set to 0 (zero), it means that there is no age limit and
quarantined files will remain on the hard disk forever.
maxfilesize The maximum size (in KB) of a single file that can be quarantined. The default is
1024 (KB). Valid values range from 1 to 2048 KB.
Note: Files larger than the set Max File Size will not be quarantined. In reality,
this value is subject the available quarantine quota that remains on the hard disk.
For example, when there is less than 1024 KB of quarantine quota (disk space
reserved for quarantined files) remaining, a file of 1024 KB in size still will not be
quarantined even though you've set Max File Size to 1024.
quarantine- The amount of disk space reserved for quarantining files. The default is 512 MB.
quota Valid values range from 0 to 1024 MB. If the value is set to 0, no files are
quarantined.
l HTTP
l HTTPS
l SMTP
Note: By default neither option is selected, which means that both types of files
are quarantined. If selected, files involving the specified protocol or protocols will
be dropped (not quarantined).
FortiADC Handbook 369
Fortinet Technologies, Inc.
diagnose diagnose crashlog
lowspace Specify the way in which new files are handled when the system disk space is
running low, which could be either of the following:
Example
adc-3-228 (root) # config security antivirus quarantine
adc-3-228 (quarantine) # set lowspace drop-new
adc-3-228 (quarantine) # set maxfilesize 500
diagnose crashlog
Use this command to manage crashlog files. Typically, you use these commands to gather information for
Fortinet Services & Support.
Syntax
diagnose crashlog clear
diagnose crashlog delete <filename>
diagnose crashlog interval <seconds>
diagnose crashlog list
diagnose crashlog upload {tftp|ftp} {all|<filename>} <ip>
interval Set minimum interval time for saving a coredump file of the same daemon.
Example
FortiADC-VM # diagnose debug crashlog list
6.8M Jun 12 15:17 cli-10229-1434147454.gz
6.8M Jun 19 16:45 cli-28917-1434757535.gz
3.5M Jun 4 13:25 flg_accessd-16401-1433449541.gz
3.5M Jun 4 13:25 flg_accessd-16696-1433449554.gz
3.5M Jun 4 13:26 flg_accessd-17009-1433449561.gz
3.5M Jun 4 13:26 flg_accessd-17165-1433449568.gz
3.5M Jun 4 13:26 flg_accessd-17339-1433449574.gz
3.5M Jun 4 13:26 flg_accessd-17541-1433449581.gz
3.5M Jun 4 13:26 flg_accessd-17711-1433449588.gz
3.5M Jun 4 13:26 flg_accessd-17877-1433449594.gz
3.5M Jun 4 13:26 flg_accessd-18221-1433449607.gz
3.5M Jun 4 13:26 flg_accessd-18392-1433449614.gz
3.6M Jun 10 16:42 info_centerd-1076-1433979763.gz
Use this command to set the debug level for CLI commands. The debug messages are returned when you enter
CLI commands.
Syntax
diagnose debug cmdb [<level>] <Enter>
<Enter> If you do not specify a debug level and press Enter, the command displays the
current debug level.
<level> Valid range is 0 to 8, where 0 disables debug logs and 8 generates the most verbose
logging.
Example
FortiADC-VM # diagnose debug cmdb 8
After you set the debug level, messages are written to the CLI when you enter commands:
FortiADC Handbook 371
Fortinet Technologies, Inc.
diagnose diagnose debug enable/disable
FortiADC-VM #
Debug logging can be very resource intensive. To minimize the performance impact
on your system, use debugging only during periods of minimal traffic, with a local con-
sole CLI connection rather than a Telnet or SSH CLI connection. Disable debugging
when you are finished.
By default, the most verbose logging that is available from the web UI for any log type is the Information severity
level. Due to their usually unnecessary nature, logs at the severity level of Debug are disabled and hidden. They
can only be enabled and viewed from the CLI. Typically this is done only if your configuration seems to be correct,
you cannot diagnose the problem without more information, and possibly suspect that you may have found either
a hardware failure or software bug.
Debug logs will be generated only if the application is running. To verify the application
is running, use diagnose system top .
4. The CLI displays debug logs as they occur until you disable it by entering:
diagnose debug disable
Syntax
diagnose debug {enable|disable}
debug {enable|disable} Select whether to enable or disable recording of logs at the debug
severity level.
Use this command to debug particular traffic flows. Debug messages for traffic matching the filter and mask are
displayed to the terminal screen.
Syntax
diagnose debug flow filter {addr <addr>|saddr <addr>| daddr <addr>| proto
<integer>|clear|negate <addr|saddr|daddr|proto>|show}
diagnose debug flow mask {packet|session|persist|drop|all|custom <mask>}
diagnose debug flow show
diagnose debug flow start [<count>]
diagnose debug flow stop
filter Specify filters. Issue multiple commands to add filters. Use the negate
option to define "not in" matching.
Filters determine the traffic flows for which the debug logs are written.
You can match flows based on host address, source address,
destination address, and protocol.
mask Specify a mask that sets the type of data written to the screen.
Example
FortiADC-docs # diagnose debug flow ?
filter filter
mask mask
show Stop trace.
start Start trace.
FortiADC Handbook 373
Fortinet Technologies, Inc.
diagnose diagnose debug flow
Syntax
diagnose debug info
Example
FortiADC-VM # diagnose debug info
debug output: disable
kernel debug level: 0 (0x0)
cli/cmdb debug level: 0 (0x0)
cmdb_event debug level: 0 (0x0)
gdns debug level: 0 (0x0)
kernelconfd debug level: 0 (0x0)
info_centerd debug level: 0 (0x0)
hasyncd debug level: 0 (0x0)
updated debug level: 0 (0x0)
miglogd debug level: 0 (0x0)
sshd debug level: 0 (0x0)
healthcheckd debug level: 2 (0x2)
netd debug level: 0 (0x0)
lb debug level: 0 (0x0)
udproxyd debug level: 0 (0x0)
httproxyd debug level: 0 (0x0)
dnsproxyd debug level: 0 (0x0)
alertmaild debug level: 0 (0x0)
synconf debug level: 0 (0x0)
ntpd debug level: 0 (0x0)
crlupdated debug level: 0 (0x0)
snmpd debug level: 0 (0x0)
flg_indexd debug level: 0 (0x0)
flg_reportd debug level: 0 (0x0)
flg_accessd debug level: 0 (0x0)
rtmd debug level: 0 (0x0)
ospfd debug level: 0 (0x0)
llb debug level: 0 (0x0)
FortiADC Handbook 375
Fortinet Technologies, Inc.
diagnose diagnose debug module
Use this command to set the debug level for module daemons.
Syntax
diagnose debug module {alertmaild | cmdb_event | crlupdated | dnsproxy | flg_accessd |
flg_indexd | flg_reportd | gdns | httproxy | hasyncd | healthcheckd | info_centerd |
kernelconfd | lb | llb | miglogd | netd | ntpd | opsips | ospfd | rtmd | snmpd | sshd
| synconf | udproxy | updated | av | quar} [<level>] <Enter>
<Enter> If you do not specify a debug level and press Enter, the command displays the
current debug level.
<level> <level> is a mask. Valid levels are the following values added together: 1 - error
message, 2 - main event, 4 - config event, 8 - file sync message, 16 - hb
message, 31 - start all. For example, 3 means error messages and main events.
Example
FortiADC-VM # diagnose debug module ?
alertmaild set/get debug level for alertmaild daemon
cmdb_event set/get debug level for cmdb event
crlupdated set/get debug level for crlupdated daemon
dnsproxy set/get debug level for dnsproxy daemon
flg_accessd set/get debug level for flg_accessd daemon
flg_indexd set/get debug level for flg_indexd daemon
flg_reportd set/get debug level for flg_reportd daemon
gdns set/get debug level for gdns daemon
httproxy set/get debug level for httproxy daemon
hasyncd set/get debug level for HA synchronisation events
healthcheckd set/get debug level for healthcheck daemon
info_centerd set/get debug level for info_centerd daemon
kernelconfd set/get debug level for L4 kernelconf daemon
lb set/get debug level for lb daemon
llb set/get debug level for llb daemon
miglogd set/get debug level for miglogd events
netd set/get debug level for netd events
ntpd set/get debug level for ntpd daemon
opsips set/get debug level for opsips daemon
ospfd set/get debug level for ospfd daemon
rtmd set/get debug level for rtmd daemon
snmpd set/get debug level for snmp daemon
sshd set/get debug level for sshd daemon
synconf set/get debug level for synconf daemon
udproxy set/get debug level for udproxy daemon
updated set/get debug level for updated daemonupdated feature
FortiADC Handbook 377
Fortinet Technologies, Inc.
diagnose diagnose debug module kernel
Use this command to set the debug log level for kernel debugging. When enabled, kernel errors are printed to the
screen.
Syntax
diagnose debug module kernel [<level>] <Enter>
<Enter> If you do not specify a debug level and press Enter, the command displays the
current debug level.
<level> Valid range is 0 to 8, where 0 disables debug logs and 8 generates the most verbose
logging.
Example
FortiADC-VM # diagnose debug module kernel ?
<Integer> debug level (0-8).
Syntax
diagnose debug module fnginx < rtsp/rtmp/mysql/smtpdiameter/config/stat/all> <set/unset>
Example
FortiADC-VM # diagnose debug module fnginx mysql set
profile type is mysql.
addr type 1.
make pool member conf, ip addr 20.6.2.1, port 80.
make pool member conf, ip addr 20.6.2.2, port 80.
make pool member conf, ip addr 20.6.2.3, port 80.
add vdom rlimit, vdom id: 1, ip: 1.1.1.1, port: 80, ssl: 0
test temp config success
dump configure data:
adc {
upstream mysql {
server 20.6.2.1:80 weight=1 up group_id=0 rs_name=pool1-1 id=3200;
server 20.6.2.2:80 weight=1 up group_id=0 rs_name=pool1-2 id=3201;
server 20.6.2.3:80 weight=1 up group_id=0 rs_name=pool1-3 id=3202;
mysql;
}
server mysql {
listen 1.1.1.1:80;
proxy_pass mysql;
fngx_log off;
persistence none;
source_address off;
mysql;
proxy_mode transaction;
mysql_mode 0;
}
}
Syntax
diagnose debug module httproxy ssl_major set/unset
diagnose debug module httproxy ssl_minor set/unset
diagnose debug module httproxy ssl_error set/unset
diagnose debug module httproxy ssl_ae_info set/unset
FortiADC Handbook 379
Fortinet Technologies, Inc.
diagnose diagnose debug timestamp
Example
FortiADC-VM # diagnose debug module httproxy ssl_major set
Thu Oct 5 2017 18:01:21.262797 16456 ssl_sock_init@(src/ssl_sock.c:3492) [sess id:4 vs:vs
clt:5.1.1.1:44498] fd=2:client-side:common:ssl_init: Initing SSL
Thu Oct 5 2017 18:01:21.262797 16456 ssl_sock_handshake@(src/ssl_sock.c:5191) [sess id:4
vs:vs clt:5.1.1.1:44498] fd=2:client-side:common:handshake: start calling SSL_do_
handshake
Thu Oct 5 2017 18:01:21.262797 16456 ssl_sock_handshake@(src/ssl_sock.c:5220) [sess id:4
vs:vs clt:5.1.1.1:44498] fd=2:client-side:common:handshake: Enable FD Read Poll
Thu Oct 5 2017 18:01:21.482538 16456 ssl_sock_handshake@(src/ssl_sock.c:5191) [sess id:4
vs:vs clt:5.1.1.1:44498] fd=2:client-side:common:handshake: start calling SSL_do_
handshake
Thu Oct 5 2017 18:01:21.482538 16456 ssl_sock_handshake@(src/ssl_sock.c:5220) [sess id:4
vs:vs clt:5.1.1.1:44498] fd=2:client-side:common:handshake: Enable FD Read Poll
Thu Oct 5 2017 18:01:21.487098 16456 ssl_sock_handshake@(src/ssl_sock.c:5191) [sess id:4
vs:vs clt:5.1.1.1:44498] fd=2:client-side:common:handshake: start calling SSL_do_
handshake
Thu Oct 5 2017 18:01:21.487098 16456 shctx_new_cb@(src/shctx.c:435) [sess id:4 vs:vs
clt:5.1.1.1:44498] fd=2:client-side:common:client_cache: new session
Thu Oct 5 2017 18:01:21.487098 16456 shsess_store@(src/shctx.c:357) [sess id:4 vs:vs
clt:5.1.1.1:44498] fd=2:client-side:common:client_cache: trying to store
Thu Oct 5 2017 18:01:21.487098 16456 shsess_get_next@(src/shctx.c:312) [sess id:4 vs:vs
clt:5.1.1.1:44498] fd=2:client-side:common:client_cache: trying to get vacuum space
Thu Oct 5 2017 18:01:21.487098 16456 shsess_store@(src/shctx.c:417) [sess id:4 vs:vs
clt:5.1.1.1:44498] fd=2:client-side:common:client_cache: succeed
Syntax
diagnose debug timestamp {enable|disable}
Example
FortiADC-VM (root) # diagnose debug timestamp enable
FortiADC-VM (root) # 2016-01-11 18:10:03 [trace common]Destroy conntrack:protocol 1, In if 0
3.3.3.3:24104 -> 4.4.4.4:2048 Reverse:In if 0 4.4.4.4:24104 -> 3.3.3.3:0
2016-01-11 18:10:03 [trace id:13]recv a ip packet, MAC 00:0c:29:4d:fe:84 ->
00:0c:29:b2:41:f2 3.3.3.3 -> 4.4.4.4 iif port2 proto 1dent 0 flags 0x40 length 84 ttl
64
2016-01-11 18:10:03 [trace id:13]record reverse route info into session: iif port2 mac
00:0c:29:4d:fe:84
2016-01-11 18:10:03 [trace id:13]No session matched, create new session
2016-01-11 18:10:03 [trace common]tuple src 0x3030303 sport 0, dst 0x4040404 dport 0,
proto
2016-01-11 18:10:03 [trace common]use dest address hash, len=1
2016-01-11 18:10:03 [trace common]iif 7 oif 0 tuple src 0x3030303 dst 0x4040404 proto 1
sport 0 dport 0
2016-01-11 18:10:03 [trace common]matched policy 1
2016-01-11 18:10:03 [trace common]llb route table id 4097
2016-01-11 18:10:03 [trace id:13]find input route interface port3 nexthop 1.1.1.1
2016-01-11 18:10:03 [trace id:14]Transmit packet by reverse route, dev port2 dest mac
00:0c:29:4d:fe:84
Use this command to display hardware information that might be useful in debugging.
Syntax
diagnose hardware {get|set} deviceinfo nic [<port>] <Enter>
diagnose hardware {get|set} deviceinfo nic-detail [<port>] <Enter>
nic Displays port settings. If you do not specify a port and press Enter, the command
displays output for all ports.
nic-detail Displays detailed port settings and statistics. If you do not specify a port and press
Enter, the command displays output for all ports.
Example
FortiADC-VM # diagnose hardware get deviceinfo ?
nic display network interface controller status
nic-detail display detailed network interface controller status
FortiADC Handbook 381
Fortinet Technologies, Inc.
diagnose diagnose hardware ioport
Use this command to display I/O information that might be useful in debugging.
Syntax
diagnose hardware {get|set} ioport {byte|word|long} <address_hex>
ioport Specify whether to read byte, word, or long from the port.
Example
First, use the diagnose hardware sysinfo command to find the address hex number for the port you
want to diagnose:
FortiADC-VM # diagnose hardware get sysinfo ioports
0000-0cf7 : PCI Bus 0000:00
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-0060 : keyboard
0064-0064 : keyboard
0070-0077 : rtc
Then, use the diagnose hardware ioport command to display the ioport value:
FortiADC Handbook 383
Fortinet Technologies, Inc.
diagnose diagnose hardware pciconfig
Use this command to display PCI registers that might be useful in debugging.
Syntax
diagnose hardware {get|set} pciconfig [bus <bus> | id <id> | option <option>] <Enter>
Example
FortiADC-VM # diagnose hardware get pciconfig ?
bus list devices on the specified bus
id list devices with the specified vendor and device ID
option v n t x H1
<Enter>
FortiADC Handbook 385
Fortinet Technologies, Inc.
diagnose diagnose hardware sysinfo
+-16.6-[11]--
+-16.7-[12]--
+-17.0-[13]----00.0
+-17.1-[14]----00.0
+-17.2-[15]--
+-17.3-[16]--
+-17.4-[17]--
+-17.5-[18]--
+-17.6-[19]--
+-17.7-[1a]--
+-18.0-[1b]----00.0
+-18.1-[1c]----00.0
+-18.2-[1d]--
+-18.3-[1e]--
+-18.4-[1f]--
+-18.5-[20]--
+-18.6-[21]--
`-18.7-[22]--
Use this command to display system information that might be useful in debugging.
Syntax
diagnose hardware {get|set} sysinfo {cpu | interrupts | iomen | ioports | memory | mtrr |
slab | stream | df>
Example
FortiADC-VM # diagnose hardware get sysinfo ?
cpu display detailed information for all installed CPU(s)
interrupts display system interrupts information
Use this command to display diagnostic information about link load balancing policies.
Syntax
diagnose llb policy list
Example
FortiADC-docs # diagnose llb policy list
------------------------------------------------------------
policy index 1, route table id 4097
flag (0):
ingress if(1): 7
dest(0):
service(0):
Syntax
diagnose netlink backlog [get] [<integer>]
FortiADC Handbook 387
Fortinet Technologies, Inc.
diagnose diagnose netlink device
[get] Specify the get option to display the current setting. Otherwise, the command sets
the backlog length.
Example
FortiADC-VM # diagnose netlink backlog ?
get see current backlog length
<backlog> set new backlog length
Syntax
diagnose netlink device
Example
FortiADC-VM # diagnose netlink device
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packe ts errs drop
fifo colls carrier compressed
vtb0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
vtb1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
port3: 418337774 4267852 0 168 0 0 0 363608 260 2 0 0 0 0 0 0
port10: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
port8: 418337474 4267847 0 163 0 0 0 363608 260 2 0 0 0 0 0 0
vsport-101010A: 0 0 0 0 0 0 0 0 2 60 2 0 0 0 0 0 0
port5: 418337654 4267850 0 166 0 0 0 363608 260 2 0 0 0 0 0 0
gre0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
gre1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
port2: 418334234 4267793 0 169 0 0 0 363608 2910 63 0 0 0 0 0 0
bond0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
imq0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
port7: 418337534 4267848 0 164 0 0 0 363608 260 2 0 0 0 0 0 0
lo: 123360587 775740 0 0 0 0 0 0 123360587 7 75740 0 0 0 0 0 0
port4: 418337714 4267851 0 167 0 0 0 363608 260 2 0 0 0 0 0 0
port9: 418337474 4267847 0 162 0 0 0 363609 1034285 1 2167 0 0 0 0 0 0
port1: 491225752 5104578 0 170 0 0 0 363608 174736576 15 03116 0 0 0 0 0 0
sit0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Use this command to display detailed network interface information, such as family, type, MTU, flags. It is similar
to the shell command ifconfig.
Syntax
diagnose netlink interface list [<interface>] <Enter>
Example
FortiADC-VM # diagnose netlink interface ?
list list interface
Use these commands to list interface details, or to add or delete a physical network interface.
FortiADC Handbook 389
Fortinet Technologies, Inc.
diagnose diagnose netlink neighbor/neighbor6
Syntax
diagnose netlink {ip|ipv6} add <interface_name> <ipaddress> <netmask>
diagnose netlink {ip|ipv6} delete <interface_name> <ipaddress>
diagnose netlink {ip|ipv6} flush
diagnose netlink {ip|ipv6} list
<interface_name> Name of the interface to add or delete from the network interface table.
Example
FortiADC-VM # FortiADC-VM # diagnose netlink ip ?
add add netlink ip address
delete delete netlink ip address
flush flush netlink ip address
list list netlink ip address
Use these commands to list the neighbor table (ARP cache), or to add or delete neighbors.
Syntax
diagnose netlink {neighbor|neighbor6} add <interface_name> <ipaddress> <macaddress>
<interface_name> Name of the interface to add or delete from the neighbors table.
Example
FortiADC-VM # diagnose netlink neighbor list
ifindex=1 ifname=lo 127.0.0.1 00:00:00:00:00:00 state=00000040 use=2255 confirm=8255
update=2255 ref=0
Syntax
diagnose netlink {route|route6} [list | flush]
Example
FortiADC-VM # diagnose netlink route ?
list list routing table
flush flush routing table
[...]
FortiADC Handbook 391
Fortinet Technologies, Inc.
diagnose diagnose netlink tcp
Use this command to view a list of TCP raw socket details, including:
Syntax
diagnose netlink tcp
Example
FortiADC-VM # diagnose netlink tcp
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt ui d timeout inode
0: 86A0FEA9:0015 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 2455 1
ffff88005ad16f40 100 0 0 10 0
1: 0100007F:0035 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 2852 1
ffff88005c6acd80 100 0 0 10 0
2: 64901EAC:0035 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 2855 1
ffff88005c6ad440 100 0 0 10 0
3: 64901EAC:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 38004000 1
ffff88005f4ce880 100 0 0 10 0
4: 86A0FEA9:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 38004001 1
ffff88005f4cc6c0 100 0 0 10 0
5: 0100007F:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 38004003 1
ffff88005f4ce1c0 100 0 0 10 0
6: 64901EAC:0017 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 2451 1
ffff88005ad15b00 100 0 0 10 0
7: 86A0FEA9:0017 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 2452 1
ffff88005ad161c0 100 0 0 10 0
8: 0100007F:0017 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 2453 1
ffff88005ad16880 100 0 0 10 0
9: 0100007F:03B9 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 2959 1
ffff88005c6adb00 100 0 0 10 0
[...]
Use this command to view a list of UDP raw socket details, including:
Syntax
diagnose netlink udp
Example
FortiADC-VM # diagnose netlink udp
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt ui d timeout inode
ref pointer drops
171: 0100007F:0FA0 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 1165 2
ffff88006bf90000 0
202: 00000000:87BF 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4962 2
ffff88006bf91500 0
223: 00000000:F7D4 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 38534860 2
ffff88005f319180 0
318: 00000000:3033 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 38504036 2
ffff88005f318700 0
319: 00000000:D034 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 3279 2
ffff88006bf90e00 0
320: 64901EAC:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 2854 2
ffff88006bf90a80 0
320: 0100007F:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 2851 2
ffff88006bf90700 0
475: 00000000:ECD0 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 24123242 2
ffff88005f318000 0
494: 00000000:24E3 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 38500439 2
ffff88005f318a80 0
546: 00000000:2D17 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 20533867 2
ffff88005f318380 0
FortiADC Handbook 393
Fortinet Technologies, Inc.
diagnose diagnose server-load-balance dns-clients
Syntax
diagnose server-load-balance dns-clients virtual-server
Example
FortiADC-VM (root) # diagnose server-load-balance dns-clients virtual-server
virtual-server virtual server name
L4VS load-balance.virtual-server
L7VS load-balance.virtual-server
1 load-balance.virtual-server
Use this command to filter and display the persistence table (current sessions).
Syntax
diagnose server-load-balance persistence filter {'<option>'|show|clear}
diagnose server-load-balance persistence list
diagnose server-load-balance persistence clear [l4]
Use multiple commands to add filters to the filter list. For example,
one command to add a source-ip filter and another to add a vs-name
filter.
Example
FortiADC-VM # diagnose server-load-balance persistence filter 'source-ip 10.1.1.1
10.1.1.100'
FortiADC-VM # diagnose server-load-balance persistence filter 'vs-name vs1 vs2'
FortiADC-VM # diagnose server-load-balance persistence filter show
filter=[flag:1000
source ip range: :: - :: port range: 0 - 0
dest ip range: :: - :: port range: 0 - 0
virtual server: vs1 vs2 ]
FortiADC-VM # diagnose server-load-balance persistence list
client-ip/port virtual-server-ip/port local-ip/port real-server-ip/port protocol service
state in-bytes out-bytes expire virtual-server-name real-server-name
FortiADC-VM #
Use this command to filter and display the session table (current sessions).
Syntax
diagnose server-load-balance session filter {'<option>'|show|clear}
diagnose server-load-balance session list
diagnose server-load-balance session clear [l4]
FortiADC Handbook 395
Fortinet Technologies, Inc.
diagnose diagnose server-load-balance session
Use multiple commands to add filters to the filter list. For example,
one command to add a source-ip filter and another to add a vs-name
filter.
Example
FortiADC-VM # diagnose server-load-balance session filter 'source-ip 10.1.1.1 10.1.1.100'
FortiADC-VM # diagnose server-load-balance session filter 'vs-name vs1 vs2'
FortiADC-VM # diagnose server-load-balance session filter show
filter=[flag:1000 type:0 protocol:0 service:0
source ip range: :: - :: port range: 0 - 0
dest ip range: :: - :: port range: 0 - 0
trans source ip range: :: - :: port range: 0 - 0
trans dest ip range: :: - :: port range: 0 - 0
virtual server: vs1 vs2
real server:]
Syntax
diagnose server-load-balance slb_load
Example
FortiADC-VM (root) # diagnose server-load-balance slb_load
<Enter>
Use this command to perform a packet trace on one or more network interfaces.
Packet capture, also known as sniffing or packet analysis, records some or all of the packets seen by a network
interface (that is, the network interface is used in promiscuous mode). 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.
FortiADC appliances have a built-in sniffer. Packet capture on FortiADC appliances is similar to that of FortiGate
appliances. Packet capture output appears on 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.
FortiADC Handbook 397
Fortinet Technologies, Inc.
diagnose diagnose sniffer packet
Packet capture can be very resource intensive. To minimize the performance impact
on your FortiADC appliance, use packet capture only during periods of minimal traffic,
with a local console CLI connection rather than a Telnet or SSH CLI connection, and
be sure to stop the command when you are finished.
For additional information on the packet sniffer utility, see the Fortinet Knowledge Base article Using the FortiOS
built-in packet sniffer.
Syntax
diagnose sniffer packet [{any | <interface_name>} [{none | '<filter_str>'} [{1 | 2 | 3}
[<packets_int>]]]]
{any | <interface_name>} Type 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.
If you omit this and the following parameters for the command, the
command captures all packets on all network interfaces.
{none | '<filter_ Type either none to capture all packets, or type a filter that specifies
str>'} 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
( ' ).
3 — All of the output from 2, plus the the link layer (Ethernet) header.
Example
The following example captures three packets of traffic from any port number or protocol and between any source
and destination (a filter of none), which passes through the network interface named port1. The capture uses a
low level of verbosity (indicated by 1).
FortiADC-VM # diagnose sniffer packet port1 none 1 3
interfaces=[port1]
filters=[none]
0.000000 172.30.144.20.53800 -> 172.30.144.100.22: ack 202368347
0.000000 172.30.144.100.22 -> 172.30.144.20.53800: psh 202368415 ack 2508304372
0.000000 172.30.144.100.22 -> 172.30.144.20.53800: psh 202368531 ack 2508304372
If you are familiar with the TCP protocol, you might 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.
FortiADC Handbook 399
Fortinet Technologies, Inc.
diagnose diagnose system top
Example
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 IP header (src or dst), the sniffer captures both forward and reply
traffic.
FortiADC# diagnose sniffer packet port1 'host 192.168.0.2 or host 192.168.0.1 and tcp port
80' 1
A specific number of packets to capture is not specified. As a result, the packet capture continues until the
administrator presses Ctrl+C. The sniffer then confirms that five packets were seen by that network interface.
Below is a sample output.
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
Use this command to view a list of the most system-intensive processes and to change the refresh rate.
Syntax
diagnose system top [delay <integer>]
Once you execute this command, it continues to run and display in the CLI window until you enter q (quit).
While the command is running, you can press Shift + P to sort the five columns of data by CPU usage (the
default) or Shift + M to sort by memory usage.
Example
This example displays a list of the top system processes and sets the update interval at 10 seconds.
FortiADC-VM # diagnose system top ?
delay refresh display period
The first line indicates the up time. The second line lists the processor and memory usage, where the parameters
from left to right mean:
l S — Sleeping (idle)
l R — Running
l Z — Zombie (crashed)
l < — High priority
l N — Low priority
diagnose system vm
Syntax
diagnose system vm
FortiADC Handbook 401
Fortinet Technologies, Inc.
diagnose diagnose tech-report
Example
FortiADC-VM # diagnose system vm
UUID: 564d2ec7705469089699f1852ce8a086
File: License file and resources are valid.
Resources: 1 CPU/1 allowed, 1620 MB RAM/2048 MB allowed, 23 GB Disk/1024 GB allowed
Registered: 1 (True)
Status: 1 (Valid: License has been successfully authenticated with registration servers.)
FDS code: 200
Warn count: 0
Copy count: 0
Received: 113788700
Warning: 0
Recv: 201503092104
Dup:
diagnose tech-report
Use this command to run a batch of commands that Fortinet support can use to troubleshoot issues you have
reported. You might be directed to copy and paste the screen output into an email or email attachment.
Syntax
diagnose tech-report
Example
FortiADC-VM # diagnose tech-report
execute
The execute commands have an immediate and decisive effect on your FortiADC appliance and, for that
reason, should be used with care. Unlike config commands, most execute commands do not result in any
configuration change.
execute backup
Use the following commands to manually back up system files to an SCP or TFTP server or disk, as indicated:
l execute backup config-file disk—Use this command to manually back up the full configuration file to
the disk.
l execute backup config-file scp—Create a backup that includes the configuration file (user-specified
configuration and default configuration), plus some other type of files you have imported, including error page files,
script files, isp-address files, and certificate files. This backup is a zip file and sent to a SCP server.
l execute backup config-file tftp—Create a backup that includes the configuration file (user-specified
configuration and default configuration), plus some other type of files you have imported, including error page files,
script files, isp-address files, and certificate files. This backup is a zip file and sent to a TFTP server.
l execute backup isp-address—Create a backup of the ISP address book. It is sent to a TFTP server.
l execute backup log—Create a backup of logs. It is sent to an FTP server.
TFTP is not secure, and it does not support authentication. You should run it only on
trusted administrator-only networks, and never on computers directly connected to the
Internet. Turn off tftpd off immediately after completing this procedure.
Syntax
execute backup config-file disk <filename>
execute backup config-file scp <user> <password> <dir> <filename> <ip address>[:port]
[<Password>]
execute backup config-file tftp <filename> <ip address> [<Password>]
execute backup isp-address tftp <filename> <ip address> [<Password>]
execute backup log ftp <ip address> [:port] <user> [<Password>] {event | attack | traffic
| all} [dir]
<filename> Name of the file to be used for the backup file, such as FortiADC_
backup.conf.
FortiADC Handbook 404
Fortinet Technologies, Inc.
execute execute caching
<Password> Optional. The password is used to encrypt the backup zip file. If you do not
provide a password, the backup zip file can be viewed without input
password.
[dir] Optional. Specify a directory on the FTP server to copy the file to.
Example
FortiADC-VM # execute backup config-file tftp FortiADC-backup-config1.zip 192.168.1.23
Connect to tftp server 192.168.1.23 ...
Please wait...
#
Send config file to tftp server done
This command uploads the backup file named "FortiADC-backup1.zip" to TFTP server 192.168.1.23.
This command uploads the backup file named "FortiADC-backup2.zip" to SCP server 192.168.1.24.
This command uploads the system full configuration to a file named FortiADC-backup3 on ADC disk.
execute caching
Use this command to show information about a virtual server cache or to clear the cache.
Syntax
execute caching {show|clean} <vsname>
Example
FortiADC-VM # execute caching ?
show show
clean clean
FortiADC-VM # execute caching show vs1
Warning: ram caching is not enabled on vs1
execute certificate ca
Use this command to import or export a certficate file. This command will create ca configuration automatically.
Please see details in config system certificate ca.
Syntax
execute certificate ca import tftp <filename> <ip>
execute certificate ca export tftp <cert> <filename> <ip>
Example
FortiADC-VM # execute certificate ca import tftp ca.crt 192.168.1.23
Done.
FortiADC Handbook 406
Fortinet Technologies, Inc.
execute execute certificate crl
Syntax
execute certificate config verify
Example
FortiADC-VM # execute certificate config verify
Use this command to import or export a certficate file. This command will create ca configuration automatically.
Please see details in config system certificate crl.
Syntax
execute certificate crl import tftp <filename> <ip>
Example
FortiADC-VM # execute certificate crl import tftp crl.r0 192.168.1.23
Done.
Use this command to import/export a certficate file or to generate/regenerate a CSR file. When you generate a
CSR, you can create an RSA or ECDSA private key. This command will create ca configuration automatically.
Please see details in config system certificate local.
Note: Importing a local certificate with pfx format is not supported, unless you have first used FortiADC to
generate the CSR.
Syntax
execute certificate local import tftp <filename> <ip>
execute certificate local export tftp <cert> <filename> <ip>
execute certificate local generate <cert_name> <keytype> {<curve_name>|<keysize>}
<subject> <country> <state> <city> <org> <unit> <email>
execute certificate local regenerate
Example
FortiADC-VM # execute certificate local import tftp fortiadc.crt 192.168.1.23
FortiADC-VM # execute certificate local generate csr-test ECDSA secp521r1 example null ca
sunnyvale fortinet fadc root
Generating a 512 bit ECDSA private key with curve name secp521r1 and message digest
algorithm SHA-512
Generating X.509 certificate request
Done.
Use this command to import or export a remote certficate file. This command will create ca configuration
automatically. Please see details in config system certificate remote.
Syntax
execute certificate remote import tftp <filename> <ip>
execute certificate remote export tftp <cert> <filename> <ip>
Example
FortiADC-VM # execute certificate remote import tftp ca.crt 192.168.1.23
Done.
FortiADC Handbook 408
Fortinet Technologies, Inc.
execute execute checklogdisk
Done.
execute checklogdisk
Use this command to run diagnostics on the hard disk. If the command reports issues, you can run execute
fixlogdisk to resolve them.
Note: The command name is a misnomer. The pair of commands troubleshoots all hard disk issues, not just
issues relating to the log partition.
Syntax
execute checklogdisk
Example
FortiADC-docs # execute checklogdisk
This operation will temporarily pause the system, check and autofix log disk!
Do you want to continue? (y/n)y
System is checking ...
execute clean
Use this command to restore the factory default ISP address book definitions. In systems with multiple VDOMs,
the command applies to the current VDOM only.
Syntax
execute clean isp-address
Example
FortiADC-VM # execute clean isp-address
This operation will clean the current restored ISP address-books and related ISP/proximity
routes!
Do you want to continue? (y/n)y
execute config-sync
Syntax
execute config-sync {get|put} <datasource>
Example
FortiADC-VM # execute config-sync put data-center-east
>>> synconf fails : connect fails, please check server ip
FortiADC-VM # execute config-sync get data-center-east
>>> synconf fails : connect fails, please check server ip
See Also
l config config sync-list
execute date
Use this command to display or set the system date and time.
Syntax
execute date [<mm/dd/yyyy> [hh:mm:ss]] <Enter>
<Enter> If you do not specify a date, the command returns the current system date.
<mm/dd/yyyy> Current date where the FortiADC appliance is located. MM/DD/YY format.
Example
FortiADC-VM # execute date ?
date <mm/dd/yyyy> [hh:mm:ss]
<mm/dd/yyyy> mm/dd/yyyy, mm: 1-12, dd: 1-31, yyyy: 2001-2100
FortiADC Handbook 410
Fortinet Technologies, Inc.
execute execute discovery-glb-virtual-server
execute discovery-glb-virtual-server
Use this command to populate the global load balancing server configuration virtual server list for the specified
virtual server.
Syntax
execute discovery-glb-virtual-server {server|override-server} <servername>
Example
execute dumpsystem
Use this command to generate a system dump file. System dump files can help Fortinet support engineers
analyze an issue for you.
Syntax
execute dumpsystem [console <enable|disable>]
[console <enable|disable>] Enable/disable writing debug information to the console during the
dump.
Example
FortiADC-VM # execute dumpsystem console ?
enable debug info will output to console
disable debug info will not output to console
FortiADC-VM # execute dumpsystem console enable
FortiADC-VM # execute dumpsystem
This operation will reboot the system!
Do you want to continue? (y/n)y
See also
l execute dumpsystem-file
execute dumpsystem-file
You use this command to manage system dump files. System dump files can help Fortinet support engineers
analyze an issue for you.
Syntax
execute dumpsystem-file {delete <filename>|list|upload {ftp|tftp} <filename> <ip>}
upload {ftp|tftp} Upload the specified file to the specified TFTP server.
<filename> <ip>
Example
FortiADC-VM # execute dumpsystem-file list
-rw------- 1 0 0 96719189 Mar 15 13:35 coredump-2016-03-15-13_35
-rw-r--r-- 1 0 0 16654391 Mar 15 13:34 user_coredump_2016_03_15_13_34_46.tar.bz2
FortiADC-VM # execute dumpsystem-file upload tftp coredump-2016-03-15-13_35 172.30.184.77
coredump-2016-03-15- 7% |** | 7152k 0:09:58 ETA
See also
l execute dumpsystem
FortiADC Handbook 412
Fortinet Technologies, Inc.
execute execute factoryreset
execute factoryreset
Use this command to reset the system to its default settings for the currently installed firmware version. If you
have not upgraded or downgraded the firmware, this restores factory default settings.
Back up your configuration first. This command resets all changes that you have made
to the configuration file and reverts the system to the default values for the firmware
version. Depending on the firmware version, this could include factory default settings
for the IP addresses of network interfaces.
Syntax
execute factoryreset
Example
FortiADC-VM # execute factoryreset
This operation will change all settings to factory defaults!
Do you want to continue? (y/n)y
execute fixlogdisk
Use this command to fix hard disk issues reported by the execute checklogdisk command.
Note: The command name is a misnomer. The pair of commands troubleshoots all hard disk issues, not just
issues relating to the log partition.
Syntax
execute fixlogdisk
Example
FortiADC-docs # execute fixlogdisk
This operation will temporarily pause the system, check and fix the log disk!
Do you want to continue? (y/n)
execute formatlogdisk
Use this command to clear the logs from the hard disk and reformat the disk.
Syntax
execute formatlogdisk
Example
FortiADC-VM # execute formatlogdisk
This operation will erase all data on the log disk!
Do you want to continue? (y/n)
execute geolookup
Use this command to look up the country for the specified IP address.
Syntax
execute geolookup <ip>
Example
# execute geolookup 8.8.8.8
8.8.8.8 "United States"
execute glb-dprox-lookup
Use this command to query the dynamic proximity RTT record for the specified IP address.
Syntax
execute glb-dprox-lookup <class_ip>
Example
FortiADC-docs # execute glb-dprox-lookup 192.168.0.1
Searching Address 192.168.0.1
get error sendmsg = Connection refused
Matched nothing!
FortiADC Handbook 414
Fortinet Technologies, Inc.
execute execute glb-persistence-lookup
FortiADC-docs #
execute glb-persistence-lookup
Use this command to query the GSLB persistence table to see if an IP address has an entry in it.
Syntax
execute glb-persistence-lookup <classip>
Example
Use this command to manually sync the configuration from the master to slave nodes.
Syntax
execute ha force sync-config
Example
(M) FortiADC-VM # execute ha force sync-config
This operation will overwrite slaves config!
Do you want to continue? (y/n)y
(M) FortiADC-VM #
Syntax
execute ha force standby traffic-group <traffic-group name>
Example
down2000D (global) # execute ha force standby traffic-group default
This operation will make traffic group on this device force to stanby,all traffic in this
traffic group will be taken over!
Do you want to continue? (y/n)y
down2000D (global) #
execute ha manage
Use this command to telnet to the command-line interface of a peer HA cluster node. This is useful when you
want to configure node-specific settings, like HA priority. Most settings are pushed from the primary node to
member nodes.
Syntax
execute ha manage <serialnumber>
Example
FortiADC-VM # execute ha manage FADV010000028122
execute health-check-verify
Use this command to use the specified health check to check the status of any IP address.
Syntax
execute health-check-verify <ip address> <hc name> <port>|<enter>
<port>|<enter> If you set a port value, health check traffic will use the port. If you do not set the
port value but press Enter instead, health check traffic will use the port value from
the specified health check name.
FortiADC Handbook 416
Fortinet Technologies, Inc.
execute execute isplookup
Example
FortiADC-VM # execute health-check-verify LB_HLTHCK_ICMP 10.0.0.1
recv hc state is UP
FortiADC-VM # execute health-check-verify LB_HLTHCK_HTTP 10.0.0.1 8080
recv hc state is DOWN
execute isplookup
Use this command to query whether an IP address belongs to an ISP address book.
Syntax
execute isplookup <ip>
Example
FortiADC-VM # execute isplookup 1.1.1.1
ISP: china-mobile, province Beijing, subnet 1.1.1.0/24
Syntax
execute log delete-file <filename>
Use this command to delete a log files for a specified log type.
Syntax
execute log delete-type {elog|tlog|alog|all}
Use this command to list log files for a specified log type.
Syntax
execute log list-type {elog|tlog|alog|all}
Example
FortiADC-VM # execute log list-type ?
<type|all> list all log file by <type>(elog|tlog|alog|all)
FortiADC Handbook 418
Fortinet Technologies, Inc.
execute execute nslookup
Syntax
execute log rebuild-db
Example
FortiADC-VM # execute log rebuild-db
You need to wait 2 minutes at least until log rebuild completes
execute nslookup
Syntax
execute nslookup name {<fqdn>|<ip>}
Example
FortiADC-VM # execute nslookup name example.com
Non-authoritative answer:
Name: example.com
Address: 93.184.216.34
execute packet-capture/packet-capture6
Syntax
execute {packet-capture|packet-capture6} <interface> ["Expression"] [<count>]
[pcap|text] [<filename>]
["Expression"] Specify a filter expression to determine the packets that are captured. Only
packets that match the expression are captured. If no expression is specified, all
packets received at the interface are captured. For information on filter
expressions, see the TCP dump man page:
http://www.tcpdump.org/manpages/pcap-filter.7.html
[<count>] Specify the number of packets to capture and then exit. The valid range is 1 to
10,000. If you do not specify a count, you can terminate the capture by pressing
Ctrl-C.
[pcap|text] Specify pcap or text. If you do not specify a file type, the results are printed to the
screen and not to a file.
[<filename>] Specify the filename for the saved capture. Do not specify a filename extension.
The extension .pcap or .txt is added automatically.
Example
The following examples show the tcpdump commands:
FortiADC-VM # execute packet-capture port1 "tcp port 80" 5 text test1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on port1, link-type EN10MB (Ethernet), capture size 65535 bytes
5 packets captured
5 packets received by filter
0 packets dropped by kernel
See also
execute packet-capture-file
execute packet-capture-file
Syntax
execute packet-capture-file {cat <filename>|delete <filename>|list|upload tftp <filename>
<ip>}
FortiADC Handbook 420
Fortinet Technologies, Inc.
execute execute ping-option/ping6-option
upload tftp <filename> <ip> Upload the specified file to the specfied TFTP server.
Example
FortiADC-VM # execute packet-capture-file ?
cat show one file
delete delete one file
list list all files
upload upload
execute ping-option/ping6-option
Use these commands to configure the behavior of the execute ping/ping6 command.
Syntax
execute ping-option data-size <bytes_int>
execute ping-option df-bit {yes | no}
execute ping-option pattern <bufferpattern_hex>
execute ping-option repeat-count <repeat_int>
execute ping-option source {auto | <interface_ipv4>}
execute ping-option timeout <seconds_int>
execute ping-option tos {<service_type>}
execute ping-option ttl <hops_int>
execute ping-option validate-reply {yes | no}
This option enables you to send out packets of different sizes for testing the effect
of packet size on the connection. If you want to configure the pattern that will be
used to buffer small datagrams to reach this size, also configure pattern
<bufferpattern_hex>.
df-bit Enter either yes to set the DF bit in the IP header to prevent the ICMP packet
from being fragmented, or enter no to allow the ICMP packet to be fragmented.
pattern Hexadecimal pattern, such as 00ffaabb, to fill the optional data buffer at the end
of the ICMP packet. The size of the buffer is determined by data-size <bytes_int>.
source Network interface from which the ping is sent. Enter either auto or a FortiADC
network interface IP address. The default is auto.
default — Do not indicate. (That is, set the TOS byte to 0.)
Example
FortiADC-VM # execute ping-option view-settings
Ping Options:
Repeat Count: 5
Data Size: 56
Timeout: 2
Interval: 1
TTL: 64
TOS: 0
DF bit: unset
Source Address: auto
Pattern:
Pattern Size in Bytes: 0
FortiADC Handbook 422
Fortinet Technologies, Inc.
execute execute ping/ping6
Validate Reply: no
execute ping/ping6
Use these commands to perform an ICMP ECHO request (also called a ping) to a host by specifying its fully
qualified domain name (FQDN) or IPv4 address, using the options configured by execute ping-option/ping6-
option.
Pings are often used to test IP-layer connectivity during troubleshooting.
Syntax
execute {ping|ping6} {<hostname> | <ipaddress>}
Example
This example pings a host with the IP address 172.16.1.10.
execute ping 172.16.1.10
The CLI displays the following:
Example
This example pings a host with the IP address 10.0.0.1.
execute ping 10.0.0.1
The CLI displays the following:
PING 10.0.0.1 (10.0.0.1): 56 data bytes
After several seconds, no output appears. The administrator halts the ping by pressing Ctrl+C. The CLI displays
the following:
--- 10.0.0.1 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
The results indicate the host may be down, or there is no route between the FortiADC appliance and 10.0.0.1. To
determine the point of failure along the route, further diagnostic tests are required, such as execute traceroute.
Example
This example pings a host with the IP address 2001:0db8:85a3:::8a2e:0370:7334.
execute ping6 2607:f0b0:f:420::
The CLI displays the following:
PING 2607:f0b0:f:420:: (2607:f0b0:f:420::): 56 data bytes
After several seconds, no output appears. The administrator halts the ping by pressing Ctrl+C. The CLI displays
the following:
--- 2607:f0b0:f:420:: ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
The results indicate the host may be down, or there is no route between the FortiADC appliance and
2607:f0b0:f:420::. To determine the point of failure along the route, further diagnostic tests are required, such as
execute traceroute.
execute reboot
Syntax
execute reboot
FortiADC Handbook 424
Fortinet Technologies, Inc.
execute execute reload
Example
This example shows the reboot command in action.
execute reboot
The CLI displays the following:
This operation will reboot the system !
Do you want to continue? (y/n)
After you enter y (yes), the CLI displays the following:
System is rebooting...
If you are connected to the CLI through a local console, the CLI displays messages while the reboot is occurring.
If you are connected to the CLI through the network, the CLI will not display any notification while the reboot is
occurring, as this occurs after the network interfaces have been shut down. Instead, you may notice that the
connection is terminated. Time required by the reboot varies by many factors, such as whether or not hard disk
verification is required, but may be several minutes.
execute reload
Syntax
execute reload
Example
FortiADC-VM # execute reload
This operation will reload the system!
Do you want to continue? (y/n)y
execute restore
Use the following commands to manually import system files from an FTP/TFTP server or a disk as indicated:
l execute restore config disk—Use this command to restore the configuration from the backup file on the
disk.
l execute restore config-file—Imports a zip file that includes the configuration text file, error page files,
script files, ISP address book files, and certificate files. It is imported from a TFTP server.
l execute restore image—Imports a firmware image. It is imported from an FTP or
TFTP server.
l execute restore image alternative—Boot alternate firmware. If partition1 is active and then system
boots partition2 after executing the command and vice versa.
l execute restore isp-address—Imports an ISP address book text file. When you perform the restore
operation, the imported address book takes priority over entries from the predefined address book (default for the
firmware image). In systems with multiple VDOMs, the command applies to the current VDOM only. It is imported
from a TFTP server.
l execute restore waf-signature—Imports a WAF signature database update. It is imported from an FTP
or TFTP server.
Syntax
execute restore config disk <filename>
execute restore config-file tftp <filename> <ip> <Password>
execute restore image <ftp|tftp|tftp-ha-sync> <filename> <ip>
execute restore image alternative
execute restore isp-address tftp <filename> <ip>
execute restore waf-signature <ftp|tftp> <filename> <ip>
<password> Optional. The password is used to unencrypt the backup zip file.
Example
FortiADC-VM # execute restore config-file tftp backup.zip 192.168.1.23
This operation will overwrite the current settings!
Do you want to continue? (y/n)
The FortiADC appliance then applies the configuration backup and reloads.
FortiADC-VM # execute restore config disk FortiADC-backup
This command downloads a configuration file named FortiADC-backup from the disk to the FortiADC appliance.
execute shutdown
Use this command to prepare the FortiADC appliance to be powered down by halting the software, clearing all
buffers, and writing all cached data to disk.
FortiADC Handbook 426
Fortinet Technologies, Inc.
execute execute ssh
Power off the FortiADC appliance only after issuing this command. Unplugging or
switching off the FortiADC appliance without issuing this command could result in data
loss.
Syntax
execute shutdown
Example
FortiADC-VM # execute shutdown
This operation will halt the system!
Do you want to continue? (y/n) y
If you are connected to the CLI through a local console, the CLI displays a message when the shutdown is
complete.
If you are connected to the CLI through the network, the CLI will not display any notification when the shutdown is
complete, as this occurs after the network interfaces have been shut down. Instead, you may notice that the
connection times out.
execute ssh
Use this command to open an SSH connection to a remote host using the specified username.
Syntax
execute ssh <user@host> [port]
Example
FortiADC-docs $ execute ssh [email protected]
FortiADC-QA #
execute statistics-db
Syntax
execute statistics-db {reset|restore}
Example
FortiADC-VM # execute statistics-db restore
You need to wait 2 minutes at least until statistics db restore completes
execute telnet
Syntax
execute telnet <ip> [port]
Example
FortiADC-VM # execute telnet 192.168.0.1
Entering character mode
Escape character is '^]'.
Remote Host login: admin
Password:
Welcome!
Remote Host #
execute traceroute
Use this command to use ICMP to test the connection between the FortiADC appliance and another network
device, and display information about the time required for network hops between the device and the FortiADC
FortiADC Handbook 428
Fortinet Technologies, Inc.
execute execute vm license
appliance.
Syntax
execute traceroute {<hostname> | <ipaddress>}
<hostname> Fully qualified domain name (FQDN) of the other network device.
Example
This example tests connectivity between the FortiADC appliance and docs.fortinet.com. In this example, the
trace times out after the first hop, indicating a possible connectivity problem at that point in the network.
FortiADC# execute traceroute docs.fortinet.com
traceroute to docs.fortinet.com (65.39.139.196), 30 hops max, 38 byte packets
1 172.16.1.200 (172.16.1.200) 0.324 ms 0.427 ms 0.360 ms
2 * * *
execute vm license
Use this command to upload license files for a virtual appliance deployment.
Syntax
execute vm license tftp <filename> <ip> [<password>]
Example
FortiADC-VM # execute vm license tftp license.lic 192.168.1.23
This operation will replace the current vmware license and reload the system!
Do you want to continue? (y/n)
execute web-category-test
Use this command to see the FortiGuard web category that a specified URL has been mapped to. You can also
find a lookup tool on http://fortiguard.com/webfilter.
Syntax
execute web-category-test <url>
Example
FortiADC-VM # execute web-category-test docs.fortinet.com
Use this command to see the SSL client-side session reuse statistics. You can see the statistics of session ID
reuse and session ticket reuse.
Syntax
execute ssl-client-side-session-statistics show/clean <datasource>
Example
FortiADC-VM # execute ssl-client-side-session-statistics show VS
FortiADC-VM # execute ssl-client-side-session-statistics clean VS
Use this command to see the SSL handshake record statistics. You can see the statistics of successful and failed
handshakes.
Syntax
execute ssl-handshake-n-record-statistics show/clean <datasource>
Example
FortiADC-VM # execute ssl-handshake-n-record-statistics show VS
FortiADC-VM # execute ssl-handshake-n-record-statistics clean VS
FortiADC Handbook 430
Fortinet Technologies, Inc.
execute Syntax
Syntax
get
Use get commands to display configuration settings and values. You must have read permission for the
configuration object you want to display.
show commands display user-configured setings but not default settings; get commands display all settings,
including both user-configured settings and defaults.
FortiADC-VM #
Notice that the command displays the setting for the secondary DNS server, even though it has not been
configured, or has reverted to its default value.
Also unlike show, unless used from within an object or table, get requires that you specify the object or table
whose settings you want to display.
l The configuration you have just entered but not yet saved
l The configuration as it currently exists on the flash disk
For example, immediately after configuring the secondary DNS server setting but before saving it, get displays
two different outputs. In the following example, the first output from get indicates the value that you have
configured but not yet saved; the second output from get indicates the value that was last saved to disk.
FortiADC-VM # config system dns
If you have entered settings but cannot remember how they differ from the existing
configuration, the two different forms of get, with and without the object name, can
be a useful way to remind yourself.
Most get commands, such as get system dns, are used to display configured settings. You can find
information the configuration details in the corresponding config command reference.
Other get commands, such as get router info ospf, get router info routing-table, get security waf-signature-
status, get security scan-report, "get security scan-task" on page 435get system performance, and get system
status, are used to display status, not configuration.
Syntax
FortiADC-VM # get router info ospf ?
database database
interface show ospf interfaces
neighbor show ospf neighbors
route show ospf routing table
status show ospf status
Example
FortiADC-VM # get router info ospf status
OSPF Routing Process, Router ID: 1.1.1.2
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is disabled
Initial SPF scheduling delay 200 millisec(s)
Minimum hold time between consecutive SPFs 1000 millisec(s)
Maximum hold time between consecutive SPFs 10000 millisec(s)
Hold time multiplier is currently 1
SPF algorithm has not been run
SPF timer is inactive
Refresh timer 10 secs
Number of external LSA 0. Checksum Sum 0x00000000
FortiADC Handbook 433
Fortinet Technologies, Inc.
get get router info routing-table
Syntax
FortiADC-VM # get router info routing-table ?
all show all routing table entries
kernel-all show all routing table entries
kernel-connected show connected routing table entries
kernel-llb show llb routing table entries
kernel-static show static routing table entries
Example
FortiADC-VM # get router info routing-table all
Codes: K - kernel route, C - connected, S - static, O - OSPF, P - PPPoE
> - selected route, * - FIB route
Use this command to display version information for the WAF signature updates from FortiGuard.
Syntax
get security waf-signature-status
Example
FortiADC-VM # get security waf-signature-status
Version : 1.1.0
Engine Version : 1.0
Signature Number : 1758
Release Date : 2015-07-06 11:00:00 UTC
Syntax
get security scan-report
Example
ID:0 Taskname:1 Created Time:10:08:55,10-26-18
ID:1 Taskname:1 Created Time:15:25:17,10-25-18
Syntax
get security scan-task
Example
ID:0 TaskName:task-2 Status:STOP
ID:1 TaskName:task-1 Status:STOP
ID:2 TaskName:3 Status:STOP
ID:3 TaskName:1 Status:STOP
l Mode
l State
l Sync status and sync statistics
l Serial number
l Node ID
l IP address
l Monitor status
l Peer count
FortiADC Handbook 435
Fortinet Technologies, Inc.
get get system performance
Syntax
get system ha-status
Example
(M) FADC-VM (global) # get system ha-status
Mode: active-active
State: Master
Config-sync: In sync (not sync)
Serial-number: FADV010000039883
Node-id: 1
IP address: 169.254.3.131
Last change time: Tue Mar 15 15:39:42 2016
Last change reason: Device initialization
Monitor status
System Harddisk: pass
Link Up: port1
Down: port2
Remote IP
Up:
Down:
Peer count: 1
State: Slave(working)
Serial-number: FADV010000039890
Node-id: 2
IP address: 169.254.122.212
Use this command to display CPU usage, memory usage, average system load, and up time.
Normal idle load varies by hardware platform, firmware, and configured features. To determine your specific
baseline for idle, configure your system completely, reboot, then view the system load. After at least 1 week of
uptime with typical traffic volume, view the system load again to determine the normal non-idle baseline.
System load is the average of percentages relative to the maximum possible capability of this hardware/system
platform. It includes:
Syntax
get system performance
Example
FortiADC-VM # get system performance
CPU usage: 2% used, 98% idle
Memory usage: 40% used
System Load: 0
Uptime: 12 days 23 hours 32 minutes
Syntax
get system status
Example
FortiADC-docs # get system status
Version: FortiADC-VM v4.4.0,build0468,151218 VM
Registration:
Valid: License has been successfully authenticated with registration servers.
VM License File: License file and resources are valid.
VM Resources: 1 CPU/1 allowed, 1620 MB RAM/2048 MB allowed, 59 GB Disk/1024 GB allowed
Serial-Number: FADV010000047341
WAF Signature DB: 00001.00001 IP Reputation DB: 00001.00094
Bootloader version: n/a
Log disk: Capacity 58 GB, Used 7 GB (12.78%), Free 51 GB
Hostname: FortiADC-docs
HA configured mode: standalone
HA effective mode: Standalone
Distribution: International
Uptime: 1 days 4 hours 14 minutes
Last reboot: Mon Dec 21 09:30:19 PST 2015
System time: Tue Dec 22 13:44:41 PST 2015
FortiADC Handbook 437
Fortinet Technologies, Inc.
get get system traffic-group
Syntax
get system traffic-group <traffic-group name>
Example
down2000D (global) # get system traffic-group default
failover-order : 0 1 2 3 4 5 6 7
preempt : disable
network-failover : disable
Syntax
get system traffic-group-status detail/brief
Example
Use the following command to get detailed status information about the traffic group.
down2000D (global) # get system traffic-group-status detail
Traffic group: default
Current device node: 0
Next device node: 1
Preempt: no
Floating IP addresses:
vlan1101InDris 10.76.12.110
Syntax
get router info bgp all
Example
FortiADC-VM # get router info bgp all
BGP table version is 0, local router ID is 10.0.6.217
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 2.1.0.0/16 10.0.0.1 0 32768 ?
*>i38.0.0.0/24 172.15.2.29 0 100 0 102 i
* i172.15.1.0/24 172.15.1.218 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i172.15.2.0/24 172.15.1.218 0 100 0 i
*> 192.168.11.0 0.0.0.0 0 32768 i
Total number of prefixes 5
Use this command to display BGP information related to a specified IPv4 address.
Syntax
get router info bgp ip <ipv4 address>
Example
FortiADC-VM # get router info bgp ip 38.0.0.10
BGP routing table entry for 38.0.0.0/24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
102
172.15.22.29 from 172.15.1.218 (10.0.6.238)
, metric 0, localpref 100, valid, internal, best
Last update: Mon Jan 2 22:50:53 2017
FortiADC Handbook 439
Fortinet Technologies, Inc.
get get router info bgp neighbors
Syntax
get router info bgp neighbors
Example
FortiADC-VM (root) # get router info bgp neighbors
BGP neighbor is 172.15.1.218, remote AS 101, local AS 101, internal link
BGP version 4, remote router ID 10.0.6.238
BGP state = Established, up for 03:34:16
Last read 00:00:15, hold time is 180, keepalive interval is 60 seconds
Configured hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
4 Byte AS: advertised and received
Route refresh: advertised and received(old & new)
Address family IPv4 Unicast: advertised and received
Message statistics:
Inq depth is 0
Outq depth is 0
Sent Rcvd
Opens: 2 0
Notifications: 0 0
Updates: 3 4
Keepalives: 216 215
Route Refresh: 0 0
Capability: 0 0
Total: 221 219
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
Community attribute sent to this neighbor(both)
3 accepted prefixes
Connections established 1; dropped 0
Last reset never
Local host: 172.15.1.217, Local port: 179
Foreign host: 172.15.1.218, Foreign port: 27671
Nexthop: 172.15.1.217
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
Read thread: on Write thread: off
Syntax
get router info bgp regexp <name line>
Example
FortiADC-VM (root) # get router info bgp regexp .*
BGP table version is 0, local router ID is 10.0.6.217
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 2.1.0.0/16 10.0.0.1 0 32768 ?
*>i38.0.0.0/24 172.15.2.29 0 100 0 102 i
* i172.15.1.0/24 172.15.1.218 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i172.15.2.0/24 172.15.1.218 0 100 0 i
*> 192.168.11.0 0.0.0.0 0 32768 i
Total number of prefixes 5
Syntax
get router info bgp summary
Example
FortiADC-VM (root) # get router info bgp summary
BGP router identifier 10.0.6.217, local AS number 101
RIB entries 9, using 1008 bytes of memory
Peers 1, using 4560 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.15.1.218 4 101 222 224 0 0 0 03:37:33 3
Total number of neighbors 1
Syntax
get router info6 bgp all
Example
FortiADC-VM (bgp) # get router info6 bgp all
FortiADC Handbook 441
Fortinet Technologies, Inc.
get get router info6 bgp ip
Use this command to display BGP information related to a specified IPv6 address.
Syntax
get router info6 bgp ip <ipv6 address>
Example
FortiADC-VM (bgp) # get router info6 bgp ip6 2017::0103
BGP routing table entry for 2017::/64
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
Local
2016::2 (metric 1) from 2016::2 (10.0.6.238)
, metric 0, localpref 100, valid, internal, best
Last update: Tue Jan 3 02:45:25 2017
Syntax
get router info6 bgp neighbors
Example
FortiADC-VM (bgp) # get router info6 bgp neighbors
BGP neighbor is 2016::2, remote AS 101, local AS 101, internal link
BGP version 4, remote router ID 10.0.6.238
BGP state = Established, up for 00:14:57
Last read 00:00:57, hold time is 180, keepalive interval is 60 seconds
Configured hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
4 Byte AS: advertised and received
Route refresh: advertised and received(old & new)
Syntax
get router info6 bgp regexp <name line>
Example
FortiADC-VM (bgp) # get router info6 bgp regexp .*
BGP table version is 0, local router ID is 10.0.6.217
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 2015::/64 :: 0 32768 i
* i2016::/64 2016::2 0 100 0 i
*> :: 0 32768 i
*>i2017::/64 2016::2 0 100 0 i
* i2020::/64 2017::2 0 100 0 102 i
Total number of prefixes 4
FortiADC Handbook 443
Fortinet Technologies, Inc.
get get router info6 bgp summary
Syntax
get router info6 bgp summary
Example
FortiADC-VM (bgp) # get router info6 bgp summary
BGP router identifier 10.0.6.217, local AS number 101
RIB entries 7, using 784 bytes of memory
Peers 2, using 9120 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2016::2 4 101 23 40 0 0 0 00:08:07 2
Total number of neighbors 1
show
Use show commands to display configuration settings and values. You must have read permission for the
configuration object you want to display.
show commands display user-configured setings but not default settings; get commands display all settings,
including both user-configured settings and defaults.
Like get, depending on whether or not you have specified an object, show displays one of two different outputs:
l The configuration you have just entered but not yet saved
l The configuration as it currently exists on the flash disk
For example, immediately after configuring the secondary DNS server setting but before saving it, show displays
two different outputs. In the following example, the first output from show indicates the value that you have
configured but not yet saved; the second output from show indicates the value that was last saved to disk.
FortiADC-VM # config system dns
If you have entered settings but cannot remember how they differ from the existing
configuration, the two different forms of show, with and without the object name, can
be a useful way to remind yourself.
If you were to now enter end, saving your setting to disk, show output for both syntactical forms would again
match. However, if you were to enter abort at this point and discard your recently entered secondary DNS
setting instead of saving it to disk, the FortiADC appliance’s configuration would therefore match the second
output, not the first.
When VDOMs are enabled, and if you log in as admin, the top level of the shell
changes: the two top level items are show globaland show vdom.
show global displays settings that only admin or other accounts with the
super_admin_prof access profile can change.
This menu and CLI structure change is not visible to non-global accounts; VDOM
administrators’ navigation menus continue to appear similar to when VDOMs are
disabled, except that global settings such as network interfaces, HA, and other
global settings do not appear.
FortiADC Handbook 446
Fortinet Technologies, Inc.
Appendix A: Virtual domains Overview
This appendix describes CLI commands when you use the virtual domains feature. It includes the following
topcis:
l Overview
l Enabling VDOMs
l Creating VDOMs
l Editing a VDOM
l Assigning interfaces to a VDOM
l Assigning administrators to a VDOM
l Disabling VDOMs
l Viewing VDOMs
Overview
You can use virtual domains (VDOMs) to delegate administration for tenant deployments. This can be useful for
large enterprises and multi-tenant deployments such as web hosting.
Virtual domains are not enabled by default. Enabling and configuring VDOMs can only be performed by the
admin administrator.
VDOMs alter the structure and available functions in the GUI and CLI, according to whether or not you are
logging in as the admin administrator, and, if you are not logging in as the admin administrator, the
administrator account’s assigned access profile.
Table 23: Differences between administrator accounts when VDOMs are enabled
If VDOMs are enabled and you log in as admin, the complete set of CLI commands appear, allowing
unrestricted access and VDOM configuration. The admin administrator account cannot be restricted to a VDOM.
Other administrators are restricted to their VDOM, and cannot configure VDOMs or global settings.
If VDOMs are enabled and you log in as any other administrator, you enter the VDOM assigned to your account.
By default, administrator accounts other than the admin account are assigned to the root VDOM. A subset of
the typical menus or CLI commands appear, allowing access only to only feature configuration, logs and reports
specific to your VDOM. You cannot access global configuration settings or enter other VDOMs.
Enabling VDOMs
l Save a backup of the configuration. Enabling VDOMs changes the structure of your configuration, so you want to be
able to easily revert to the system state before VDOMs were enabled.
To enable VDOMs
l config global contains settings that only admin or other accounts with the prof_admin access profile can
change.
l config vdom contains each VDOM and its respective settings.
This menu and CLI structure change is not visible to non-global accounts; VDOM administrators’ navigation
menus continue to appear similar to when VDOMs are disabled, except that global settings such as network
interfaces, HA, and other global settings do not appear.
4. Continue by defining VDOMs.
Creating VDOMs
Some settings can only be configured by the admin account — they are global. Global settings apply to the
appliance overall regardless of VDOM, such as:
l network interfaces
l system time
l backups
l administrator accounts
l access profiles
l FortiGuard connectivity settings
l HA and configuration sync
l SNMP
l X.509 certificates
l TCP SYN flood anti-DoS setting
l exec ping and other global operations that exist only in the CLI
FortiADC Handbook 448
Fortinet Technologies, Inc.
Appendix A: Virtual domains Editing a VDOM
Other settings can be configured separately for each VDOM. They essentially define each VDOM. For example,
the policies of VDOM-A are separate from VDOM-B.
Initially, only the root VDOM exists, and it contains settings such as policies that were global before VDOMs
were enabled. Typically, you will create additional VDOMs, and few if any administrators will be assigned to the
root VDOM. After VDOMs are created, the admin account usually assigns other administrator accounts to
configure their VDOM-specific settings. However, as the root account, the admin administrator does have
permission to configure all settings, including those within VDOMs.
To create a VDOM:
The new VDOM exists, but its settings are not yet configured.
Editing a VDOM
You can modify the dynamic and static parameters of each VDOM by following the instructions below. Dynamic
parameters determine how much of a dynamic resource, such as connections per second, a VDOM can use.
Static parameters determine how much of a static resource, such as real servers, a VDOM can use.
To edit a VDOM:
1. Enable vdom
2. Execute the following commands. A value of 0 means the parameter has no limit.
config global
config system vdom
edit <VDOM_name>
L4CPS : 0
L7CPS : 0
L7RPS : 0
SSLCPS : 0
SSLTHROUGHPUT : 0
CONCURRENTSESSION : 0
virtualserver : 0
realserver : 0
healthcheck : 0
sourcepool : 0
errorpage : 0
localuser : 0
usergroup : 0
INBOUND : 0
OUTBOUND : 0
Dynamic parameters
L4CPS The number of layer 4 connections created per second. When the
creation speed exceeds this value, only this number of connections
will be created per second. The rest will be dropped.
L7CPS The number of layer 7 TCP connections created by the httproxy fron-
tend per second. When the creation speed exceeds this value, only
this number of connections will be created per second. Additional
TCP syn requests will be dropped on the client side.
L7RPS The number of HTTP GET requests handled by the httproxy from
the client side per second. When the number of requests per second
exceeds this value, only this number of requests will be handled.
Additional HTTP GET requests will be dropped.
SSLCPS The number of SSL connections created by the httproxy frontend per
second. When the creation speed of new SSL connections exceeds
this value, only this number of connections will be created per
second. Additional connections will not be allowed and additional
syn packets will be dropped during that second.
SSLTHROUGHPUT The volume of SSL encrypted TCP traffic from both the incoming
and outgoing side. When the traffic throughput exceeds this value,
additional packets from the client will be dropped and new con-
nections will not be allowed.
CONCURRENTSESSION The total number of living connections for ADC traffic. Living
connections include L4, L7, and L7 SSL. When the number of
living connections exceeds this number, additional connections
will not be allowed.
Static parameters
virtualserver The maximum number of virtual servers that can be configured using
"config load-balance virtual-server" in the chosen VDOM.
realserver The maximum number of real servers that can be configured using
"config load-balance real-server" in the chosen VDOM.
FortiADC Handbook 450
Fortinet Technologies, Inc.
Appendix A: Virtual domains Assigning interfaces to a VDOM
sourcepool The maximum number of IP pools that can be configured using "con-
fig load-balance ippool" in the chosen VDOM.
errorpage The maximum number of error page files that can be configured
using "config load-balance error-page" in the chosen VDOM.
The following commands create an administrator account and assign the administrator to a vdom:
FortiADC-VM # config global
Disabling VDOMs
l Save a backup of the configuration. Disabling VDOMs changes the structure of your configuration, and deletes
most VDOM-related settings. It keeps settings from the root VDOM only.
To disable VDOMs
2. Assign admin accounts to the root VDOM or delete them. For example:
FortiADC-VM (global) # config system admin
FortiADC-VM (admin) # delete docs-vdom-admin
FortiADC-VM (admin) # end
4. Disable VDOMs:
FortiADC-VM # config global
FortiADC-VM (global) # config system global
FortiADC-VM (global) # set vdom-admin disable
FortiADC-VM (global) # end
The system disables VDOMs and terminates your administrative session.
Viewing VDOMs
Use the following command to show the usage and settings for all VDOMS on the system:
get system vdom-status
The following example shows the system with two VDOMs set.
FortiADC-300D # get system vdom-status
root:
l4cps: 4.87/-
l7cps: 90.2/-
l7rps: 0.0/-
SSLcps: 3.7/-
SSLThroughput(KB/S): 1550.0/-
ConcurrentSession: 47.0/-
Inbound(KB/S): 255.6/-
Outbound(KB/S): 104669.0/-
VirtualServer: 21/-
RealServer: 33/33
Health Check: 5/-
Source Pool: 0/-
Error-Page: 1/-
LocalUser: 0/-
UserGroup: 2/-
vdom1:
FortiADC Handbook 452
Fortinet Technologies, Inc.
Appendix A: Virtual domains Viewing VDOMs
l4cps: 0.0/-
l7cps: 0.0/-
l7rps: 0.0/-
SSLcps: 0.0/-
SSLThroughput(KB/S): 0.0/-
ConcurrentSession: 0.0/-
Inbound(KB/S): 0.0/-
Outbound(KB/S): 0.0/-
VirtualServer: 0/-
RealServer: 0/-
Health Check: 4/-
Source Pool: 0/-
Error-Page: 0/-
LocalUser: 0/-
UserGroup: 0/-
The first number represents the current usage. The second number represents the limit set. A dashed line means
no limit has been set.