Fortigate Cli
Fortigate Cli
© Copyright 2009 Fortinet, Inc. All rights reserved. No part of this publication including text, examples,
diagrams or illustrations may be reproduced, transmitted, or translated in any form or by any means,
electronic, mechanical, manual, optical or otherwise, for any purpose, without prior written permission of
Fortinet, Inc.
Trademarks
Dynamic Threat Prevention System (DTPS), APSecure, FortiASIC, FortiBIOS, FortiBridge, FortiClient,
FortiGate®, FortiGate Unified Threat Management System, FortiGuard®, FortiGuard-Antispam,
FortiGuard-Antivirus, FortiGuard-Intrusion, FortiGuard-Web, FortiLog, FortiAnalyzer, FortiManager,
Fortinet®, FortiOS, FortiPartner, FortiProtect, FortiReporter, FortiResponse, FortiShield, FortiVoIP, and
FortiWiFi are trademarks of Fortinet, Inc. in the United States and/or other countries. The names of actual
companies and products mentioned herein may be the trademarks of their respective owners.
Regulatory compliance
FCC Class A Part 15 CSA/CUS
Contents
Contents
Introduction ............................................................................................ 17
About the FortiGate Unified Threat Management System ........................................ 17
Registering your Fortinet product............................................................................... 17
Customer service and technical support.................................................................... 18
Fortinet documentation ................................................................................................ 18
Fortinet Tools and Documentation CD ..................................................................... 18
Fortinet Knowledge Center ...................................................................................... 18
Comments on Fortinet technical documentation ..................................................... 18
Conventions .................................................................................................................. 18
IP addresses............................................................................................................. 18
CLI constraints.......................................................................................................... 19
Notes, Tips and Cautions ......................................................................................... 19
Typographical conventions ....................................................................................... 19
alertemail ................................................................................................ 67
setting ............................................................................................................................ 68
antivirus .................................................................................................. 73
filepattern....................................................................................................................... 74
heuristic ......................................................................................................................... 76
quarantine...................................................................................................................... 77
quarfilepattern ............................................................................................................... 80
service............................................................................................................................ 81
settings .......................................................................................................................... 83
application .............................................................................................. 85
list ................................................................................................................................... 86
name............................................................................................................................... 92
dlp............................................................................................................ 93
compound...................................................................................................................... 94
rule.................................................................................................................................. 96
sensor .......................................................................................................................... 100
endpoint-control................................................................................... 103
apps-detect rule-list .................................................................................................... 104
profile ........................................................................................................................... 105
settings ........................................................................................................................ 107
firewall................................................................................................... 109
address, address6....................................................................................................... 110
addrgrp, addrgrp6 ....................................................................................................... 112
dnstranslation ............................................................................................................. 113
interface-policy............................................................................................................ 115
interface-policy6.......................................................................................................... 117
ipmacbinding setting .................................................................................................. 119
ipmacbinding table ..................................................................................................... 121
ippool ........................................................................................................................... 123
ldb-monitor .................................................................................................................. 125
multicast-policy........................................................................................................... 127
policy, policy6 ............................................................................................................. 129
profile ........................................................................................................................... 139
config log ................................................................................................................ 166
config app-recognition ............................................................................................ 167
schedule onetime........................................................................................................ 171
schedule recurring...................................................................................................... 172
schedule group ........................................................................................................... 174
service custom ............................................................................................................ 175
service group............................................................................................................... 177
shaper per-ip-shaper .................................................................................................. 178
shaper traffic-shaper .................................................................................................. 180
sniff-interface-policy................................................................................................... 182
sniff-interface-policy6................................................................................................. 185
ssl setting .................................................................................................................... 187
vip ................................................................................................................................. 189
vipgrp ........................................................................................................................... 206
gui.......................................................................................................... 207
console......................................................................................................................... 208
topology ....................................................................................................................... 209
imp2p..................................................................................................... 211
aim-user ....................................................................................................................... 212
icq-user ........................................................................................................................ 213
msn-user ...................................................................................................................... 214
old-version................................................................................................................... 215
policy............................................................................................................................ 216
yahoo-user................................................................................................................... 217
log.......................................................................................................... 233
custom-field................................................................................................................. 234
{disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 |
syslogd3 | webtrends | fortiguard} filter ................................................................... 235
disk setting .................................................................................................................. 240
{fortianalyzer | syslogd} override-filter ..................................................................... 244
fortianalyzer override-setting..................................................................................... 245
{fortianalyzer | fortianalyzer2 | fortianalyzer3} setting ............................................ 246
fortiguard setting ........................................................................................................ 248
memory setting ........................................................................................................... 249
memory global-setting................................................................................................ 250
syslogd override-setting ............................................................................................ 251
{syslogd | syslogd2 | syslogd3} setting.................................................................... 252
webtrends setting ....................................................................................................... 254
trafficfilter .................................................................................................................... 255
report..................................................................................................... 257
chart ............................................................................................................................. 258
dataset.......................................................................................................................... 262
summary ...................................................................................................................... 263
Example SQL report configurations.......................................................................... 264
Example WAN optimization SQL report configuration ............................................ 264
Example attack SQL report configuration ............................................................... 266
router..................................................................................................... 275
access-list, access-list6 ............................................................................................. 276
aspath-list .................................................................................................................... 279
auth-path...................................................................................................................... 281
bgp................................................................................................................................ 283
config router bgp..................................................................................................... 286
config admin-distance............................................................................................. 289
config aggregate-address ....................................................................................... 289
config aggregate-address6 ..................................................................................... 289
config neighbor ....................................................................................................... 290
config network......................................................................................................... 296
config network6....................................................................................................... 296
config redistribute ................................................................................................... 297
config redistribute6 ................................................................................................. 297
community-list............................................................................................................. 299
key-chain...................................................................................................................... 302
multicast ...................................................................................................................... 304
Sparse mode .......................................................................................................... 304
Dense mode ........................................................................................................... 305
config router multicast............................................................................................. 306
config interface ....................................................................................................... 308
config pim-sm-global............................................................................................... 310
ospf............................................................................................................................... 314
config router ospf .................................................................................................... 316
config area .............................................................................................................. 318
config distribute-list ................................................................................................. 322
config neighbor ....................................................................................................... 323
config network......................................................................................................... 323
config ospf-interface ............................................................................................... 324
config redistribute ................................................................................................... 326
config summary-address ........................................................................................ 327
ospf6............................................................................................................................. 328
policy............................................................................................................................ 333
system................................................................................................... 381
accprofile ..................................................................................................................... 382
admin............................................................................................................................ 385
alertemail ..................................................................................................................... 392
amc ............................................................................................................................... 394
arp-table ....................................................................................................................... 395
auto-install ................................................................................................................... 396
autoupdate clientoverride .......................................................................................... 397
autoupdate override.................................................................................................... 398
autoupdate push-update ............................................................................................ 399
autoupdate schedule .................................................................................................. 400
autoupdate tunneling.................................................................................................. 402
user........................................................................................................ 543
Configuring users for authentication........................................................................ 544
Configuring users for password authentication....................................................... 544
Configuring peers for certificate authentication ...................................................... 544
ban................................................................................................................................ 545
fsae ............................................................................................................................... 549
group ............................................................................................................................ 551
ldap............................................................................................................................... 555
local .............................................................................................................................. 558
peer............................................................................................................................... 560
peergrp......................................................................................................................... 562
radius ........................................................................................................................... 563
setting .......................................................................................................................... 565
tacacs+ ......................................................................................................................... 567
vpn......................................................................................................... 569
certificate ca ................................................................................................................ 570
certificate crl................................................................................................................ 572
certificate local ............................................................................................................ 574
certificate ocsp............................................................................................................ 576
certificate remote ........................................................................................................ 577
ipsec concentrator ...................................................................................................... 578
ipsec forticlient............................................................................................................ 579
ipsec manualkey ......................................................................................................... 580
ipsec manualkey-interface ......................................................................................... 583
ipsec phase1................................................................................................................ 586
ipsec phase1-interface ............................................................................................... 593
ipsec phase2................................................................................................................ 605
ipsec phase2-interface ............................................................................................... 611
l2tp................................................................................................................................ 618
pptp .............................................................................................................................. 620
ssl settings .................................................................................................................. 622
ssl web host-check-software ..................................................................................... 626
ssl web portal .............................................................................................................. 628
ssl web virtual-desktop-app-list ................................................................................ 633
wanopt................................................................................................... 635
auth-group ................................................................................................................... 636
cache-storage.............................................................................................................. 638
peer............................................................................................................................... 639
rule................................................................................................................................ 640
settings ........................................................................................................................ 646
ssl-server ..................................................................................................................... 647
Example: SSL offloading for a WAN optimization tunnel........................................ 648
storage ......................................................................................................................... 651
webcache ..................................................................................................................... 653
execute.................................................................................................. 685
backup.......................................................................................................................... 686
batch............................................................................................................................. 689
central-mgmt ............................................................................................................... 690
cfg reload ..................................................................................................................... 691
cfg save........................................................................................................................ 692
clear system arp table ................................................................................................ 693
cli check-template-status ........................................................................................... 694
cli status-msg-only ..................................................................................................... 695
date............................................................................................................................... 696
dhcp lease-clear .......................................................................................................... 697
dhcp lease-list ............................................................................................................. 698
disconnect-admin-session......................................................................................... 699
enter ............................................................................................................................. 700
factoryreset.................................................................................................................. 701
firmware-list update .................................................................................................... 702
formatlogdisk .............................................................................................................. 703
fortiguard-log update.................................................................................................. 704
fsae refresh.................................................................................................................. 705
get.......................................................................................................... 767
endpoint-control app-detect predefined-category status ....................................... 768
endpoint-control app-detect predefined-group status ............................................ 769
endpoint-control app-detect predefined-signature status ...................................... 770
endpoint-control app-detect predefined-vendor status .......................................... 771
firewall service predefined ......................................................................................... 772
gui console status....................................................................................................... 773
gui topology status ..................................................................................................... 774
hardware status........................................................................................................... 775
ips decoder status ...................................................................................................... 776
ips rule status.............................................................................................................. 777
ipsec tunnel list ........................................................................................................... 778
report database schema............................................................................................. 779
router info bfd neighbor ............................................................................................. 780
router info bgp............................................................................................................. 781
router info multicast ................................................................................................... 784
router info ospf............................................................................................................ 786
router info protocols................................................................................................... 788
router info rip............................................................................................................... 789
router info routing-table ............................................................................................ 790
Index...................................................................................................... 827
Introduction
This chapter introduces you to the FortiGate Unified Threat Management System and the
following topics:
• About the FortiGate Unified Threat Management System
• Registering your Fortinet product
• Customer service and technical support
• Fortinet documentation
• Conventions
Fortinet documentation
The Fortinet Technical Documentation web site, http://docs.fortinet.com, provides the
most up-to-date versions of Fortinet publications, as well as additional technical
documentation such as technical notes.
In addition to the Fortinet Technical Documentation web site, you can find Fortinet
technical documentation on the Fortinet Tools and Documentation CD, and on the Fortinet
Knowledge Center.
Conventions
Fortinet technical documentation uses the conventions described below.
IP addresses
To avoid publication of public IP addresses that belong to Fortinet or any other
organization, the IP addresses used in Fortinet technical documentation are fictional and
follow the documentation guidelines specific to Fortinet. The addresses used are from the
private IP address ranges defined in RFC 1918: Address Allocation for Private Internets,
available at http://ietf.org/rfc/rfc1918.txt?number-1918.
CLI constraints
CLI constraints, such as <address_ipv4>, indicate which data types or string patterns
are acceptable input for a given parameter or variable value. CLI constraint conventions
are described in the CLI Reference document for each product.
Tip: Highlights useful additional information, often tailored to your workplace activity.
Note: Also presents useful information, but usually focused on an alternative, optional
method, such as a shortcut, to perform a step.
Caution: Warns you about commands or procedures that could have unexpected or
undesirable results including loss of data or damage to equipment.
Typographical conventions
Fortinet documentation uses the following typographical conventions:
Table 1: Typographical conventions in Fortinet technical documentation
Convention Example
Button, menu, text box, From Minimum log level, select Notification.
field, or check box label
CLI input config system dns
set primary <address_ipv4>
end
CLI output FGT-602803030703 # get system settings
comments : (null)
opmode : nat
Emphasis HTTP connections are not secure and can be intercepted by
a third party.
File content <HTML><HEAD><TITLE>Firewall
Authentication</TITLE></HEAD>
<BODY><H4>You must authenticate to use this
service.</H4>
Hyperlink Visit the Fortinet Technical Support web site,
https://support.fortinet.com.
Keyboard entry Type a name for the remote VPN peer or client, such as
Central_Office_1.
Navigation Go to VPN > IPSEC > Auto Key (IKE).
Publication For details, see the FortiGate Administration Guide.
What’s new
The table below lists commands that have changed since the previous release, version 4.0.
Note: There are some changes in terminology in this CLI Reference intended to make syntax descriptions
more accurate and consistent. Mainly, the term “keyword” has been replaced by the terms “field”, “option”,
and “value”. A field can be set to either an entered value, such as an IP address, or to one of several fixed
named options. For detailed information, see “Command syntax” on page 35.
Command Change
config application list
edit <app_list_str>
config entries
edit <id_integer>
set open-contact-pinhole New field to open or close SIP pinholes for non-REGISTER
SIP requests (usually INVITE requests).
set open-register-pinhole New field to open or close SIP pinholes for SIP REGISTER
requests.
set rfc2543-branch New field to support RFC 2543-complaint SIP calls involving
branch commands that are missing or that are valid for RFC
2543 but are invalid for RFC 3261.
set sccp-archive-full fields removed.
set sccp-archive-summary
set simple-archive-full
set simple-archive-summary
set sip-archive-summary
set sip-archive-full
config dlp rule
edit rule_name
set field New option always. Matches all transfers.
set protocol New option session-ctrl.
config dlp sensor
config rule
edit <rule_str>
set archive New option summary-only enables summary DLP archiving
for the rule or compound rule.
set severity New field. An integer from 1 to 5 to indicate the seriousness of
the problems that would result from the content passing
through the FortiGate unit.
config endpoint-control apps-detection Renamed to
config endpoint-control apps-detect rule-list
config endpoint-control apps-detect Renamed from
rule-list rule-list config endpoint-control apps-detection
config endpoint-control profile New command. Configures an Endpoint NAC profile.
Command Change
config endpoint-control settings
set compliance-timeout New field. Sets the authentication timeout for compliant
endpoints.
set enforce-minimum-version New field. Requires endpoints to run a defined minimum
version of FortiClient Host Security.
config firewall address, address6
edit <name_str>
set cache-ttl New field. Sets minimum time-to-live (TTL) of individual IP
addresses in FQDN cache.
config firewall interface-policy
edit <policy_id>
set application-list New field. Specifies the application black/white list the
FortiGate unit uses when examining network traffic.
set application-list-status New field. Enables use of application black/white list on
matching network traffic.
config firewall interface-policy6
edit <policy_id>
set application-list New field. Specifies the application black/white list the
FortiGate unit uses when examining network traffic.
set application-list-status New field. Enables use of application black/white list on
matching network traffic.
config firewall ippool
edit <index_int>
set interface Field removed.
config firewall policy, policy6
edit <index_int>
set endpoint-allow-collect-sysinfo Fields removed.
set endpoint-redir-portal
set endpoint-restrict-check
set endpoint-profile New field. Specifies which endpoint NAC profile to apply.
config firewall profile
edit <profile_str>
set ftp archive-full Options removed. Archiving is now part of Data Leak
set ftp archive-summary Prevention.
set ftp scanextended Option removed. Use ftp-avdb field to select normal or
extended database for AV scan.
set ftp-avdb New field. Select normal or extended AV database for FTP
traffic. Replaces scanextended option.
set http content-type check New option.
set http scanextended Option removed. Use http-avdb field to select normal or
extended database for AV scan.
set http-avdb New field. Select normal or extended AV database for HTTP
traffic. Replaces scanextended option.
set http-post-lang New field. Specifies up to five character set encodings to use
when applying spam filtering banned word checking, web
filtering or DLP content scanning.
set https-avdb New field. Select normal or extended AV database for HTTPS
traffic. Replaces scanextended option.
Command Change
config firewall profile (continued)
edit <profile_str>
set im scanextended Option removed. Use im-avdb field to select normal or
extended database for AV scan.
set im-avdb New field. Select normal or extended AV database for IM traffic.
Replaces scanextended option.
set imap archive-full Options removed. Archiving is now part of Data Leak
set imap archive-summary Prevention.
set imap scanextended Option removed. Use imap-avdb field to select normal or
extended database for AV scan.
set imap-avdb New field. Select normal or extended AV database for IMAP
traffic. Replaces scanextended option.
set imaps archive-full Options removed. Archiving is now part of Data Leak
set imaps archive-summary Prevention.
set imaps scanextended Option removed. Use imaps-avdb field to select normal or
extended database for AV scan.
set imaps-avdb New field. Select normal or extended AV database for IMAPS
traffic. Replaces scanextended option.
set nntp archive-full Options removed. Archiving is now part of Data Leak
set nntp archive-summary Prevention.
set nntp quarantine New option. Quarantines infected files.
set nntp scanextended Option removed. Use nntp-avdb field to select normal or
extended database for AV scan.
set nntp-avdb New field. Select normal or extended AV database for NNTP
traffic. Replaces scanextended option.
set per-ip-shaper New field. Specifies the per-IP traffic shaper to apply.
set pop3 scanextended Option removed. Use pop3-avdb field to select normal or
extended database for AV scan.
set pop3-avdb New field. Select normal or extended AV database for POP3
traffic. Replaces scanextended option.
set pop3s scanextended Option removed. Use pop3s-avdb field to select normal or
extended database for AV scan.
set pop3s-avdb New field. Select normal or extended AV database for POP3S
traffic. Replaces scanextended option.
set safesearch New field. Enforces use of safe search feature on Google,
Yahoo, or Bing search engines.
set smtp scanextended Option removed. Use smtp-avdb field to select normal or
extended database for AV scan.
set smtp-avdb New field. Select normal or extended AV database for SMTP
traffic. Replaces scanextended option.
set smtps scanextended Option removed. Use smtps-avdb field to select normal or
extended database for AV scan.
set smtps-avdb New field. Select normal or extended AV database for SMTPS
traffic. Replaces scanextended option.
config log
set log-im Fields removed.
set log-p2p
set log-voip
set log-violations
config firewall schedule group New command. Configures schedule groups.
Command Change
config firewall shaper per-ip-shaper New command. Configures traffic shaping that is applied per IP
address, instead of per policy or per shaper.
config firewall shaper traffic-shaper Renamed from config firewall traffic-shaper.
edit <name_str>
set action New field. Selects traffic accounting logging or blocking or
traffic exceeding the quota.
set quota New field. Sets the traffic quota.
set type New field. Selects hourly, daily, weekly or monthly period for
accounting logs or traffic quota enforcement.
config firewall sniff-interface-policy New commands. Configure FortiGate unit interface to operate
config firewall sniff-interface-policy6 as a one-arm intrusion detection system (IDS) appliance.
config firewall traffic-shaper Renamed config firewall shaper traffic-shaper.
config log disk setting
set sql-max-size New field. Sets maximum size of SQL logs.
set sql-max-size-action New field. Selects action when maximum log size is reached.
set sql-oldest-entry New field. Sets number of days to keep log entries.
config sql-logging New subcommand. Enables or disables SQL logging by log
type.
config log {fortianalyzer |
fortianalyzer2 | fortianalyzer3} setting
set wanopt-traffic New field. Enables WAN optimization traffic logging.
set webcache-traffic New field. Enables WAN optimization web caching traffic
logging.
config log {fortianalyzer | syslogd} New command. Overrides the global configuration created with
override-filter the config log {fortianalyzer | syslogd} filter
command.
config log fortianalyzer override- New command. Overrides the global configuration created with
setting the config log fortianalyzer setting command.
config log {fortianalyzer | Renamed from config system fortianalyzer.
fortianalyzer2 | fortianalyzer3} setting
set address-mode New field. Selects auto-discovery or static addressing.
set conn-timeout New field. Sets the FortiAnalyzer connection timeout.
set encrypt New field. Enables use of IPSec VPN tunnel for
communication.
set fdp-device New field. Sets serial number of the Fortianalyzer unit.
set localid New field. Sets the identifier that both FortiGate and
FortiAnalyzer units use.
set psksecret New field. Sets the pre-shared key for the IPSec VPN tunnel.
set server New field. Sets the IP address of the FortiAnalyzer unit.
set ver-1 Field removed.
config log syslogd override-setting New command. Overrides for this VDOM the global
configuration created with the config log syslogd
setting command.
config log {syslogd | syslogd2 |
syslogd3} setting
set reliable New field. Enables reliable delivery of syslog messages in
compliance with RFC 3195.
config report ... New commands. Configure log reports.
Command Change
config router access-list, access-list6 New command (access-list6).
config router bgp
config aggregate-address6 New subcommand.
IPv6 version of config aggregate-address.
config neighbor Many IPv6 fields added. All end with “6”.
config network6 New subcommand.
IPv6 version of config network.
config redistribute6 New subcommand.
IPv6 version of config redistribute.
config router prefix-list, prefix-list6 New command (prefix-list6).
IPv6 version of prefix-list.
config router ripng New command. Configures the “next generation” Routing
Information Protocol, RIPng.
config router static
edit <sequence_number>
set weight New field. Adds weights to ECMP static routes if the ECMP
route failover and load balance method is set to weighted.
config spamfilter ipbwl
config entries
set addr-type New field. Selects IPv4 or IPv6 addressing.
set ip4-subnet New field. Specifies IPv4 trusted address.
set ip6-subnet New field. Specifies IPv6 trusted address.
set ip/subnet Field replaced by ip4-subnet and ip6-subnet.
config spamfilter iptrust
config entries
set addr-type New field. Selects IPv4 or IPv6 addressing.
set ip4-subnet New field. Specifies IPv4 trusted address.
set ip6-subnet New field. Specifies IPv6 trusted address.
set ip/subnet Field replaced by ip4-subnet and ip6-subnet.
config system admin
edit <name_str>
set force-password-change New field. Requires this administrator to change password at
next login.
set ip6-trusthost1 New fields. Set IPv6 trusted hosts.
set ip6-trusthost2
set ip6-trusthost3
set moduleid Field removed.
set password-expire New field. Sets a date and time for password expiry.
config system dns
set autosvr Field removed
set fwdintf Field removed
config system dns-database New command. Configures the FortiGate DNS database.
config system fortianalyzer Commands renamed config log {fortianalyzer |
config system fortianalyzer2 fortianalyzer2 | fortianalyzer3} setting.
config system fortianalyzer3
Command Change
config system fortiguard
config serv-ovrd-list
set addr-type New field. Selects IPv4 or IPv6 addressing.
set ip6 New field. IPv6 version of ip.
config system global
set anti-replay New field. Sets level of protection against packet replay
exploits. Replaces conn-tracking.
set conn-tracking Replaced by anti-replay.
set registration-notification New field. Enables displaying the registration notification in the
web-based manager if the FortiGate unit is not registered.
set internal-switch-mode {hub | New hub option for enabling hub mode which is similar to
interface | switch} switch mode.
set log-user-in-upper New field. Enables logging of user name in upper case.
set service-expire-notification New field. Enables displaying a notification on the web-based
manager 30 days before the FortiGate unit support contract
expires.
set wireless-controller New field. Enables wireless controller feature.
set wireless-controller-port New field. Sets control and data ports for wireless controller
mode.
set wireless-terminal New field. Enables FortiWiFi unit to be managed by another
FortiGate unit’s wireless controller feature.
set wireless-terminal-port New field. Sets control and data ports for wireless terminal
mode.
config system interface
edit <interface_name>
set detectprotocol New field. Selects the protocols to use to detect interface
connection status.
set dhcp-client-identifier New field. Change the default DHCP client identifier.
set dns-query New field. Configures interface to accept DNS queries,
recursive or non-recursive.
set explicit-web-proxy New field. Enables explicit web proxy on this interface.
set spillover-threshold New field. Limits the amount of bandwidth processed by the
Interface.
config system modem
set authtype1 New fields. Sets the authentication methods to use for 3G
set authtype2 modems.
set authtype3
set wireless-port New field. Sets TTY Port for 3G modems.
config system password-policy New command. Configures higher security requirements for
administrator passwords and IPsec VPN pre-shared keys.
config system replacemsg ec Changed command. Now also configures Endpoint NAC
Recommendation Portal.
config system replacemsg traffic-quota New command. Formats traffic shaping quota replacement
messages.
config system replacemsg-group New command. Defines replacement messages for your
VDOM, overriding global replacement messages.
config system settings
set v4-ecmp-mode New field. Sets the ECMP route failover and load balance
method.
Command Change
config system snmp sysinfo
set engine-id New field. Sets optional engine-id string for snmpEngineID.
config system snmp user
edit <username>
set auth-proto New field. Selects authentication protocol.
set auth-pwd New field. Sets user’s password.
set priv-proto New field. Selects privacy (encryption) protocol.
set priv-pwd New field. Sets the privacy encryption key.
set security-level New field. Enables authentication and privacy.
config system wireless settings
set geography Default changed from World to Americas.
config user group
edit <groupname>
set ldap-memberof New field. Specifies the LDAP groups to which members of this
user group belong.
config user peer
edit <peer_name>
set password New field. Sets password for two-factor authentication.
set two-factor New field. Enables two-factor authentication.
config user setting
set auth-blackout-time New field. Sets blackout time for failed user authentication
attempts.
set auth-http-basic New field. Enables HTTP basic authentication for identify-
based firewall policies.
config auth-ports New subcommand. Configures non-standard ports for firewall
authentication.
config vpn certificate ca
edit <ca_name>
set auto-update-days New field. Sets the number of days prior to expiry that the
FortiGate unit requests an updated CA certificate.
set auto-update-days-warning New field. Sets how many days before CA certificate expiry the
FortiGate generates a warning message.
set scep-url New field. Specifies the URL of the SCEP server.
config vpn certificate crl
edit <crl_name>
set update-interval New field. Sets how frequently the FortiGate unit checks for an
updated CRL.
config vpn certificate local
edit <cert_name>
set auto-regenerate-days New field. Sets the number of days prior to expiry that the
FortiGate unit requests an updated local certificate.
set auto-regenerate-days-warning New field. Sets how many days before local certificate expiry
the FortiGate generates a warning message.
set scep-password New field. Specifies the password for the SCEP server.
set scep-url New field. Specifies the URL of the SCEP server.
Command Change
config vpn ipsec phase1-interface
edit <gateway_name>
set dhgrp New option 14 to select DH Group 14.
set ike-version New field. Selects IKEv1 or IKEv2.
set mode-cfg New field. Enables IKE Configuration Method.
The following new fields are available when mode-cfg is
enabled: add-route, assign-ip, assign-ip-from,
assign-ip-type, banner, domain, end-ip, mode-cfg-
ip-version, ipv4-dns-server1, ipv6-dns-server1,
ipv4-dns-server2, ipv6-dns-server2, ipv4-dns-
server3, ipv6-dns-server3, ipv4-end-ip, ipv6-end-
ip, ipv4-netmask, ipv4-split-include, ipv4-start-
ip, ipv6-start-ip, ipv4-wins-server1,
ipv4-wins-server2, ipv6-prefix, start-ip, unity-
support
set proposal New option sha256 for SHA256 digest.
config vpn ssl settings
set force-two-factor-auth New field. Requires PKI (peer) users to authenticate by
password in addition to certificate authentication.
set force-utf8-login New field. Causes UTF-8 encoding to be used on login page.
set deflate-compression-level New fields. These tune the HTTP compression enabled with
set deflate-min-data-size the new http-compression field.
set http-compression New field. Enables HTTP compression between the FortiGate
unit and the client browser.
set tunnel-startip Fields removed. Address ranges are now defined as firewall
set tunnel-endip addresses. See tunnel-ip-pools.
set tunnel-ip-pools New field. Replaces tunnel-startip and tunnel-endip.
Address ranges are defined as firewall addresses and selected
by name.
config vpn ssl web bookmarks Command removed. Bookmarks are now configured in the web
portal using the Bookmark widget.
config vpn ssl web host-check-software New command. Configures security applications to use in
custom host checks.
config vpn ssl web portal
edit <portal_name>
set client-check Fields removed. See host-check instead.
set client-check-type
set host-check New field. Selects type of host checking to perform.
set host-check-interval New field. Selects
set host-check-policy New field. Selects applications for custom host check.
set layout Renamed to page-layout.
set limit-user-logins New field. Limits each user to a single SSL VPN session.
set page-layout Renamed from layout.
config widget
set start-ip Fields removed. Address ranges are now defined as firewall
set end-ip addresses. See ip-pools.
set ip-pools New field. Replaces start-ip and end-ip. Address ranges
are defined as firewall addresses and selected by name.
set split-tunneling-routing- New field. Provides destination address information for client’s
address routing table.
Command Change
config vpn ssl web portal (continued)
edit <portal_name>
config bookmarks
set sso New field. Configures a Single Sign-On (SSO) bookmark.
config form-data New subcommand. Configures credentials for static SSO
bookmarks.
config wanopt iscsi Command removed.
config wanopt settings
set log-traffic {cifs ftp http mapi New field. Enable WAN optimization and WAN optimization
tcp} web caching traffic logging.
config web-proxy global
set forward-proxy-auth New field. Enable or disable configuring the explicit web proxy
to forward proxy authentication headers.
set strict-web-check New field. Enable or disable configuring the explicit web proxy
to block web sites that send incorrect headers that do not
conform to HTTP 1.1.
config webfilter block Command removed. See config webfilter content.
config webfilter content New command. Controls web content by blocking or exempting
words, phrases, or patterns. This command includes some
functionality of old config webfilter block and config
webfilter exmword commands.
config webfilter content-header New command. Filters web content according to the MIME
content header.
config webfilter exmword Command removed. See config webfilter content.
config webfilter ftgd-ovrd
edit <override_int>
set ip6 New field. Specifies the IPv6 IP address for which the override
rule applies.
set scope New option ip6 sets scope of override rule to ip6 setting.
config webfilter urlfilter
edit <list_int>
config entries
edit <url_str>
set type New URL filter type option wildcard.
config wireless-controller ... New commands for configuring the wireless controller feature.
execute log delete-filtered Command removed.
execute log filter dump Renamed from execute log filter list.
execute log filter ha-member New command. Selects logs from the specified HA cluster
member.
execute log filter lines-per-view Renamed to execute log filter view-lines.
execute log filter list Renamed to execute log filter dump.
execute log filter view-lines Renamed from execute log filter lines-per-view.
execute vpn sslvpn del-all New command. Deletes all SSL VPN connections in this
VDOM.
execute vpn sslvpn list New command. Lists current SSL VPN tunnel connections.
execute wireless-controller New command. Deletes all FortiWiFi access point firmware
delete-wtp-image images stored on the FortiGate unit.
Command Change
execute wireless-controller reset-wtp New command. Reset a physical access point (WTP).
execute wireless-controller New command. Restarts the wireless-controller.
restart-daemon
execute wireless-controller New command. Uploads a FortiWiFi firmware image to the
upload-wtp-image FortiGate unit.
get endpoint-control app-detect New command. Retrieves information about predefined
predefined-category status application detection categories.
get endpoint-control app-detect New command. Retrieves information about predefined
predefined-group status application detection groups.
get endpoint-control app-detect New command. Retrieves information about predefined
predefined-signature status application detection signatures.
get endpoint-control app-detect New command. Retrieves information about predefined
predefined-vendor status application detection vendors.
get report database schema New command. Displays the SQL report database schema.
get router info6 bgp New command. Displays information about the BGP IPv6
configuration.
get router info6 ospf New command. Displays information about the OSPF IPv6
configuration.
get router info6 protocols New command. Displays information about the configuration of
all IPv6 dynamic routing protocols.
get router info6 rip New command. Displays information about the RIPng
configuration.
get wireless-controller scan New command. Displays the list of detected access points.
get wireless-controller status New command. Lists the physical AP (WTP) firmware images
stored on the wireless-controller.
Requirements
• a computer with an available serial communications (COM) port
• the RJ-45-to-DB-9 or null modem cable included in your FortiGate package
• terminal emulation software such as HyperTerminal for Microsoft Windows
Note: If you do not want to use an SSH/Telnet client and you have access to the web-
based manager, you can alternatively access the CLI through the network using the CLI
Console widget in the web-based manager. For details, see the FortiGate Administration
Guide.
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 FortiGate unit with a static route to a router that can forward packets from
the FortiGate unit to your computer.
You can do this using either:
• a local console connection (see the following procedure)
• the web-based manager (see the FortiGate Install Guide or the FortiGate
Administration Guide)
Requirements
• a computer with an available serial communications (COM) port and RJ-45 port
• terminal emulation software such as HyperTerminal for Microsoft Windows
• the RJ-45-to-DB-9 or null modem cable included in your FortiGate package
• a crossover or straight-through network cable
• prior configuration of the operating mode, network interface, and static route (for
details, see the FortiGate Install Guide)
To enable SSH or Telnet access to the CLI using a local console connection
1 Using the network cable, connect the FortiGate unit’s network port either directly to
your computer’s network port, or to a network through which your computer can reach
the FortiGate unit.
2 Note the number of the physical network port.
3 Using a local console connection, connect and log into the CLI. For details, see
“Connecting to the CLI using a local console” on page 32.
4 Enter the following command:
config system interface
edit <interface_str>
set allowaccess <protocols_list>
next
end
where:
• <interface_str> is the name of the network interface associated with the
physical network port and containing its number, such as port1
• <protocols_list> is the complete, space-delimited list of permitted
administrative access protocols, such as https ssh telnet
For example, to exclude HTTP, HTTPS, SNMP, and PING, and allow only SSH and
Telnet administrative access on port1:
set system interface port1 config allowaccess ssh telnet
Caution: 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 display the network interface’s
settings.
get system interface <interface_str>
The CLI displays the settings, including the allowed administrative access protocols,
for the network interfaces.
To connect to the CLI through the network interface, see “Connecting to the CLI using
SSH” on page 34 or “Connecting to the CLI using Telnet” on page 35.
Note: FortiGate units support 3DES and Blowfish encryption algorithms for SSH.
Before you can connect to the CLI using SSH, you must first configure a network interface
to accept SSH connections. For details, see “Enabling access to the CLI through the
network (SSH or Telnet)” on page 32.
Note: The following procedure uses PuTTY. Steps may vary with other SSH clients.
Note: You can alternatively log in using an SSH key. For details, see “system admin” on
page 385.
8 Type the password for this administrator account and press Enter.
Note: 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 FortiGate unit displays a command prompt (its host name followed by a #).
You can now enter CLI commands.
Caution: Telnet is not a secure access method. SSH should be used to access the CLI
from the Internet or any other untrusted network.
Before you can connect to the CLI using Telnet, you must first configure a network
interface to accept SSH connections. For details, see “Enabling access to the CLI through
the network (SSH or Telnet)” on page 32.
Note: 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 FortiGate unit displays a command prompt (its host name followed by a #).
You can now enter CLI commands.
Command syntax
When entering a command, the command line interface (CLI) requires that you use valid
syntax, and conform to expected input constraints. It will reject invalid commands.
Fortinet documentation uses the following conventions to describe valid command syntax
Terminology
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:
get system admin
To describe the function of each word in the command line, especially if that nature has
changed between firmware versions, Fortinet uses terms with the following definitions.
• command — A word that begins the command line and indicates an action that the
FortiGate unit 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
end when you press the Enter key, it forms a command line. Exceptions include multi-
line command lines, which can be entered using an escape sequence. (See “Shortcuts
and key commands” on page 45.)
Valid command lines must be unambiguous if abbreviated. (See “Command
abbreviation” on page 45.) Optional words or other command line permutations are
indicated by syntax notation. (See “Notation” on page 37.)
Note: This CLI Reference is organized alphabetically by object for the config command,
and by the name of the command for remaining top-level commands.
• sub-command — A kind of command that is available only when nested within the
scope of another command. After entering a command, its applicable sub-commands
are available to you until you exit the scope of the command, or until you descend an
additional level into another sub-command. Indentation is used to indicate levels of
nested commands. (See “Indentation” on page 37.)
Not all top-level commands have sub-commands. Available sub-commands vary by
their containing scope. (See “Sub-commands” on page 39.)
• object — A part of the configuration that contains tables and/or fields. Valid command
lines must be specific enough to indicate an individual object.
• table — A set of fields that is one of possibly multiple similar sets which 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. (See “Notation” on page 37.)
• 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 FortiGate unit will discard the invalid table.
• value — A number, letter, IP address, or other type of input that is usually your
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. (See “Notation”
on page 37.)
• option — A kind of value that must be one or more words from of a fixed set of options.
(See “Notation” on page 37.)
Indentation
Indentation indicates levels of nested commands, which indicate what other sub-
commands are available from within the scope.
For example, the edit sub-command is available only within a command that affects
tables, and the next sub-command is available only from within the edit sub-command:
config system interface
edit port1
set status up
next
end
For information about available sub-commands, see “Sub-commands” on page 39.
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.
Table 2: Command syntax notation
Convention Description
Square brackets [ ] A non-required word or series of words. For example:
[verbose {1 | 2 | 3}]
indicates that you may either omit or type both the verbose word and
its accompanying option, such as:
verbose 3
Sub-commands
Once you have connected to the CLI, you can enter commands.
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:
get system admin
Sub-commands are available from within the scope of some commands.When you enter a
sub-command 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 sub-commands are available to you until you exit the scope of the command,
or until you descend an additional level into another sub-command.
For example, the edit sub-command is available only within a command that affects
tables; the next sub-command is available only from within the edit sub-command:
config system interface
edit port1
set status up
next
end
Note: Syntax examples for each top-level command in this CLI Reference do not show all
available sub-commands. However, when nested scope is demonstrated, you should
assume that sub-commands applicable for that level of scope are available.
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.)
get List the configuration of the current object or table.
• In objects, get lists the table names (if present), or fields and their
values.
• In a table, get lists the 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.
next is only available from a table prompt; it is not available from an
object prompt.
set <field> Set a field’s value.
<value> For example, in config system admin, after typing edit admin,
you could type set password newpass to change the password of
the admin administrator to newpass.
Note: When using set to change a field containing a space-delimited
list, type the whole new list. For example, set <field>
<new-value> will replace the list with the <new-value> rather than
appending <new-value> to the list.
show Display changes to the default configuration. Changes are listed in the
form of configuration commands.
unset Reset the table or object’s fields to default values.
<field> For example, in config system admin, after typing edit admin,
typing unset password resets the password of the admin
administrator account to the default (in this case, no password).
Permissions
Depending on the account that you use to log in to the FortiGate unit, you may not have
complete access to all CLI commands.
Access profiles control which CLI commands an administrator account can access.
Access profiles assign either read, write, or no access to each area of the FortiGate
software. To view configurations, you must have read access. To make changes, you must
have write access. For more information on configuring an access profile that
administrator accounts can use, see “system accprofile” on page 382.
Unlike other administrator accounts, the administrator account named admin exists by
default and cannot be deleted. The admin administrator account is similar to a root
administrator account. This administrator account always has full permission to view and
change all FortiGate configuration options, including viewing and changing all other
administrator accounts. Its name and permissions cannot be changed. It is the only
administrator account that can reset another administrator’s password without being
required to enter that administrator’s existing password.
Caution: Set a strong password for the admin administrator account, and change the
password regularly. By default, this administrator account has no password. Failure to
maintain the password of the admin administrator account could compromise the security
of your FortiGate unit.
For complete access to all commands, you must log in with the administrator account
named admin.
Help
To display brief help during command entry, press the question mark (?) key.
• Press the question mark (?) key at the command prompt to display a list of the
commands available and a description of each command.
• 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
List valid word completions or subsequent words. ?
If multiple words could complete your entry, display all possible
completions with helpful descriptions of each.
Complete the word with the next available match. Tab
Press the key multiple times to cycle through available matches.
Recall the previous command. Up arrow, or
Command memory is limited to the current session. Ctrl + P
Recall the next command. Down arrow, or
Ctrl + N
Move the cursor left or right within the command line. Left or Right
arrow
Move the cursor to the beginning of the command line. Ctrl + A
Move the cursor to the end of the command line. Ctrl + E
Move the cursor backwards one word. Ctrl + B
Move the cursor forwards one word. Ctrl + F
Delete the current character. Ctrl + D
Abort current interactive commands, such as when entering multiple Ctrl + C
lines.
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.
Environment variables
The CLI supports the following environment variables. Variable names are case-sensitive.
$USERFROM The management access type (ssh, telnet, jsconsole for the CLI Console
widget in the web-based manager, and so on) and the IP address of the
administrator that configured the item.
$USERNAME The account name of the administrator that configured the item.
$SerialNum The serial number of the FortiGate unit.
For example, the FortiGate unit’s host name can be set to its serial number.
config system global
set hostname $SerialNum
end
As another example, you could log in as admin1, then configure a restricted secondary
administrator account for yourself named admin2, whose first-name is admin1 to
indicate that it is another of your accounts:
config system admin
edit admin2
set first-name $USERNAME
Special characters
The characters <, >, (,), #, ', and “ are not permitted in most CLI fields. These characters
are special characters, sometimes also called reserved characters.
You may be able to enter a special character as part of a string’s value by using a special
command, enclosing it in quotes, or preceding it with an escape sequence — in this case,
a backslash ( \ ) character.
Character Keys
? Ctrl + V then ?
Tab Ctrl + V then Tab
Space Enclose the string in quotation marks: "Security Administrator".
(to be Enclose the string in single quotes: 'Security Administrator'.
interpreted as Precede the space with a backslash: Security\ Administrator.
part of a string
value, not to end
the string)
' \'
(to be
interpreted as
part of a string
value, not to end
the string)
" \"
(to be
interpreted as
part of a string
value, not to end
the string)
\ \\
Input is stored using Unicode UTF-8 encoding, but is not normalized from other encodings
into UTF-8 before it is stored. If your input method encodes some characters differently
than in UTF-8, 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.
For best results, you should:
• use UTF-8 encoding, or
• 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
• for regular expressions that must match HTTP requests, use the same encoding as
your HTTP clients
Note: 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 client’s
encoding, you may only be able to match any parts of the request that are in English,
because regardless of the encoding, the values for English characters tend to be encoded
identically. For example, English words may be legible regardless of interpreting 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.
In order to configure your FortiGate unit using other encodings, you may need to switch
language settings on your management computer, including for your web browser or
Telnet/SSH client. For instructions on how to configure your management computer’s
operating system language, locale, or input method, see its documentation.
Note: If you choose to configure parts of the FortiGate unit using non-ASCII characters,
verify that all systems interacting with the FortiGate unit 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 the web-based manager and your web
browser or Telnet/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-based manager 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 FortiGate unit receives.
9 Press Enter.
In the display area, the CLI Console widget displays your previous command
interpreted into its character code equivalent, such as:
edit \743\601\613\743\601\652
and the command’s output.
You may need to surround words that use encoded characters with single quotes ( ' ).
Depending on your Telnet/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.
For example, you might need to enter:
edit '\743\601\613\743\601\652'
Screen paging
You can configure the CLI to, when displaying multiple pages’ worth of output, pause after
displaying each page’s worth of text. When the display pauses, the last line displays
--More--. You can then either:
• Press the spacebar to display the next page.
• Type Q to truncate the output and return to the command prompt.
This may be useful when displaying lengthy output, such as the list of possible matching
commands for command completion, or a long list of settings. Rather than scrolling
through or possibly exceeding the buffer of your terminal emulator, you can simply display
one page at a time.
To configure the CLI display to pause when the screen is full:
config system console
set output more
end
For more information, see “system console” on page 408.
Baud rate
You can change the default baud rate of the local console connection. For more
information, see “system console” on page 408.
Caution: Do not edit the first line. The first line(s) of the configuration file (preceded by a #
character) contains information about the firmware version and FortiGate model. If you
change the model number, the FortiGate unit will reject the configuration file when you
attempt to restore it.
3 Use execute restore to upload the modified configuration file back to the FortiGate unit.
The FortiGate unit downloads the configuration file and checks that the model
information is correct. If it is, the FortiGate unit loads the configuration file and checks
each command for errors.If a command is invalid, the FortiGate unit ignores the
command. If the configuration file is valid, the FortiGate unit restarts and loads the new
configuration.
Word boundary
In Perl regular expressions, the pattern does not have an implicit word boundary. For
example, the regular expression “test” not only matches the word “test” but also matches
any word that contains the word “test” such as “atest”, “mytest”, “testimony”, “atestb”. The
notation “\b” specifies the word boundary. To match exactly the word “test”, the expression
should be \btest\b.
Case sensitivity
Regular expression pattern matching is case sensitive in the Web and Spam filters. To
make a word or phrase case insensitive, use the regular expression /i. For example,
/bad language/i will block all instances of “bad language” regardless of case.
Expression Matches
abc abc (that exact character sequence, but anywhere in the string)
^abc abc at the beginning of the string
abc$ abc at the end of the string
a|b either of a and b
^abc|abc$ the string abc at the beginning or at the end of the string
ab{2,4}c an a followed by two, three or four b's followed by a c
ab{2,}c an a followed by at least two b's followed by a c
ab*c an a followed by any number (zero or more) of b's followed by a c
ab+c an a followed by one or more b's followed by a c
ab?c an a followed by an optional b followed by a c; that is, either abc or ac
a.c an a followed by any single character (not newline) followed by a c
a\.c a.c exactly
[abc] any one of a, b and c
[Aa]bc either of Abc and abc
[abc]+ any (nonempty) string of a's, b's and c's (such as a, abba, acbabcacaa)
[^abc]+ any (nonempty) string which does not contain any of a, b and c (such as
defg)
\d\d any two decimal digits, such as 42; same as \d{2}
/i makes the pattern case insensitive. For example, /bad language/i
blocks any instance of “bad language” regardless of case.
\w+ a "word": a nonempty sequence of alphanumeric characters and low lines
(underscores), such as foo and 12bar8 and foo_1
100\s*mk the strings 100 and mk optionally separated by any amount of white space
(spaces, tabs, newlines)
abc\b abc when followed by a word boundary (e.g. in abc! but not in abcd)
perl\B perl when not followed by a word boundary (e.g. in perlert but not in perl
stuff)
\x tells the regular expression parser to ignore white space that is neither
backslashed nor within a character class. You can use this to break up your
regular expression into (slightly) more readable parts.
Creating a VDOM
You create a new VDOM using the config vdom command. For example, to create a new VDOM called
vdomain2, you enter the following:
config vdom
edit vdomain2
end
This creates a new VDOM operating in NAT/Route mode. You can have up to 10 VDOMs on your
FortiGate unit by default.
For this VDOM to be useful, you need to assign interfaces or VLAN subinterfaces to it.
To remove the vdom-link, delete the vdom-link. You will not be able to delete the ends of the vdom-link by
themselves. To delete the above set up, enter:
config global
config system vdom-link
delete v12_link
end
Note: In an HA setup with virtual clusters, inter-VDOM routing must be entirely within one cluster. You
cannot create links between virtual clusters, and you cannot move a VDOM that is linked into another
virtual cluster. In HA mode, with multiple vclusters when you create the vdom-link in system vdom-link
there is an option to set which vcluster the link will be in.
Before inter-VDOM routing, VDOMs were completely separate entities. Now, many new configurations are
available such as a service provider configuration (a number of VDOMS that go through one main VDOM
to access the internet) or a mesh configuration (where some or all VDOMs are connected to some or all
other VDOMs). These configurations are discussed in-depth in the FortiGate VLANs and VDOMs Guide.
Forward-domain solution
You may run into problems using the multiple VDOMs solution. It is possible that you have more VLANs
than licensed VDOMs, not enough physical interfaces or your configuration may work better by grouping
some VLANs together. In these situations the separate VDOMs solution may not work for you.
In these cases, the solution is to use the forward-domain <collision_group_number> command. This
command tags VLAN traffic as belonging to a particular forward-domain collision group, and only VLANs
tagged as part of that collision group receive that traffic. By default ports and VLANs are part of forward-
domain collision group 0. For more information, see the FortiGate VLANs and VDOMs Guide.
There are many benefits for this solution from reduced administration, to using fewer physical interfaces to
being able to allowing you more flexible network solutions.
In the following example, forward-domain collision group 340 includes VLAN 340 traffic on Port1 and
untagged traffic on Port2. Forward-domain collision group 341 includes VLAN 341 traffic on Port1 and
untagged traffic on Port3. All other ports are part of forward-domain collision group 0 by default.
These are the CLI commands to accomplish this setup.
config system interface
edit “port1”
next
edit "port2"
set forward_domain 340
next
edit “port3”
set forward_domain 341
next
edit "port1-340"
set forward_domain 340
set interface "port1"
set vlanid 340
next
edit "port1-341"
set forward_domain 341
set interface "port1"
set vlanid 341
next
end
There is a more detailed discussion of this issue in the Asymmetric Routing and Other FortiGate Layer-2
Installation Issues technical note.
global
From a super_admin profile account, use this command to configure features that apply to the complete
FortiGate unit including all virtual domains. Virtual domain configuration (vdom-admin) must be enabled
first. For more information, see “system global” on page 423.
Syntax
This command syntax shows how you access the commands within config global. For information on these
commands, refer to the relevant sections in this Reference. If there are multiple versions of the same
command with a “2” or “3” added, the additional commands are not listed but fall under the unnumbered
command of the same name.
config global
config antivirus ...
config application
config firewall service
config firewall ssl
config gui console
config ips ...
config log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
config log fortiguard setting
config log memory setting
config log memory global-setting
config log {syslogd | syslogd2 | syslogd3} setting
config log webtrends setting
config spamfilter ...
config system accprofile
config system admin
config system alertemail
config system auto-install
config system amc
config system autoupdate clientoverride
config system autoupdate override
config system autoupdate push-update
config system autoupdate schedule
config system autoupdate tunneling
config system bug-report
config system central-management
config system console
config system dns
config system fips-cc
config system fortiguard
conifg system fortiguard-log
config system global
config system ha
config system interface
config system npu
config system ntp
config system replacemsg admin
config system replacemsg alertmail
config system replacemsg auth
config system replacemsg ec
config system replacemsg fortiguard-wf
config system replacemsg ftp
execute update-now
execute usb-disk
execute vpn certificate ...
get firewall vip ...
end
History
Related topics
• vdom
vdom
From the super admin account, use this command to add and configure virtual domains. The number of
virtual domains you can add is dependent on the FortiGate model. Virtual domain configuration (vdom-
admin) must be enabled. See “system global” on page 423.
Once you add a virtual domain you can configure it by adding zones, firewall policies, routing settings, and
VPN settings. You can also move physical interfaces from the root virtual domain to other virtual domains
and move VLAN subinterfaces from one virtual domain to another.
By default all physical interfaces are in the root virtual domain. You cannot remove an interface from a
virtual domain if the interface is part of any of the following configurations:
• routing
• proxy arp
• DHCP server
• zone
• firewall policy
• redundant pair
• link aggregate (802.3ad) group
Delete these objects, or modify them, to be able to remove the interface.
Note: You cannot delete the default root virtual domain, and you cannot delete a virtual domain that is
used for system management.
Syntax
This command syntax shows how you access the commands within a VDOM. Refer to the relevant
sections in this Reference for information on these commands.
config vdom
edit <vdom_name>
config antivirus
config application
config dlp
config endpoint-control
config firewall address, address6
config firewall addrgrp, addrgrp6
config firewall dnstranslation
config interface-policy
config interface-policy6
config firewall ipmacbinding setting
config firewall ipmacbinding table
config firewall ippool
config firewall ldb-monitor
config firewall multicast-policy
config firewall policy, policy6
config firewall profile
config firewall schedule onetime
config firewall schedule recurring
config firewall service custom
config firewall service group
config firewall shaper per-ip-shaper
config firewall vip
Note: The VDOM names vsys_ha and vsys_fgfm are in use by the FortiGate unit. If you attempt to
name a new VDOM vsys_ha or vsys_fgfm it will generate an error.
Note: Use config system settings set opmode {nat | transparent} to set the operation
mode for this VDOM to nat (NAT/Route) or transparent.
Example
This example shows how to add a virtual domain called Test1.
config system vdom
edit Test1
end
History
Related topics
• global
alertemail
Use alertemail commands to configure the FortiGate unit to monitor logs for log messages with certain
severity levels. If the message appears in the logs, the FortiGate unit sends an email to a predefined
recipient(s) of the log message encountered. Alert emails provide immediate notification of issues
occurring on the FortiGate unit, such as system failures or network attacks.
Note: You must configure the server setting under config system alertemail before the
commands under config alertemail become accessible. If vdoms are enabled, config system
alertemail is a global command, and config alertemail is per VDOM. For more information, see
“system alertemail” on page 392.
When configuring an alert email, you must configure at least one DNS server. The FortiGate unit uses the
SMTP server name to connect to the mail server and must look up this name on your DNS server. See
“dns” on page 413 for more information about configuring DNS servers.
This chapter contains the following section:
setting
setting
Use this command to configure the FortiGate unit to send an alert email to up to three recipients. This
command can also be configured to send an alert email a certain number of days before the FDS license
expires and/or when the disk usage exceeds a certain threshold amount. You need to configure an SMTP
server before configuring alert email settings. See “system alertemail” on page 392 for more information.
Note: The FortiGate unit must be able to look up the SMTP server name on your DNS server because the
FortiGate unit uses the SMTP server to connect to the mail server. See “system dns” on page 413 for more
information.
Syntax
config alertemail setting
set username <user-name_str>
set mailto1 <email-address_str>
set mailto2 <email-address_str>
set mailto3 <email-address_str>
set filter-mode {category | threshold}
set email-interval <minutes_int>
set emergency-interval <minutes_int>
set alert-interval <minutes_int>
set critical-interval <minutes_int>
set error-interval <minutes_int>
set warning-interval <minutes_int>
set notification-interval <minutes_int>
set information-interval <minutes_int>
set debug-interval <minutes_int>
set severity {alert | critical | debug | emergency | error | information
| notification | warning}
set IPS-logs {disable | enable}
set firewall-authentication-failure-logs {disable | enable}
set HA-logs {enable | disable}
set IPsec-error-logs {disable | enable}
set FDS-update-logs {disable | enable}
set PPP-errors-logs {disable | enable}
set sslvpn-authentication-errors-logs {disable | enable}
set antivirus-logs {disable | enable}
set webfilter-logs {disable | enable}
set configuration-changes-logs {disable | enable}
set violation-traffic-logs {disable | enable}
set admin-login-logs {disable | enable}
set local-disk-usage-warning {disable | enable}
set FDS-license-expiring-warning {disable | enable}
set FDS-license-expiring-days <days_int>
set local-disk-usage <percentage>
set fortiguard-log-quota-warning {disable | enable}
end
Examples
This example shows how to configure the user name, add three email addresses for sending alerts to, and
what type of emails will contain which log messages, such as HA and antivirus.
config alertemail setting
set username [email protected]
set mail1 [email protected]
set mail2 [email protected]
set mail3 [email protected]
set filter-mode category
set HA-logs enable
set FDS-update-logs enable
set antivirus-logs enable
set webfilter-logs enable
set admin-login-logs enable
set violation-traffic-logs enable
end
History
Related topics
• system alertemail
• system dns
antivirus
Use antivirus commands to configure antivirus scanning for services, quarantine options, and to enable or
disable grayware and heuristic scanning.
This chapter contains the following sections:
filepattern
heuristic
quarantine
quarfilepattern
service
settings
filepattern
Use this command to add, edit or delete the file patterns used for virus blocking and to set which protocols
to check for files to block.
If you need to add configuration via CLI that requires ? as part of config, you need to input CTRL-V first. If
you enter the question mark (?) without first using CTRL-V, the question mark has a different meaning in
CLI: it will show available command options in that section.
For example, if you enter ? without CTRL-V:
edit "*.xe
token line: Unmatched double quote.
If you enter ? with CTRL-V:
edit "*.xe?"
new entry '*.xe?' added
Syntax
config antivirus filepattern
edit <filepattern_list_int>
set name <filepattern_list_name>
set comment <comment_str>
config entries
edit <filepattern_string>
set action {allow | block}
set active {ftp http im imap nntp pop3 smtp}
set file-type {unknown | ignored | activemime | arj | aspack
| base64 | bat | binhex | bzip | bzip2 | cab | jad | elf | exe
| fsg | gzip | hlp | hta | html | javascript | lzh | msc
| msoffice | mime | petite | prc | rar | class | sis | tar | upx
| uue | cod | zip}
set filter-type {pattern | type}
end
History
Related topics
• antivirus heuristic
• antivirus quarantine
• antivirus quarfilepattern
• antivirus service
heuristic
Use this command to configure heuristic scanning for viruses in binary files.
Syntax
config antivirus heuristic
set mode {pass | block | disable}
end
Example
This example shows how to enable heuristic scanning.
config antivirus heuristic
set mode pass
end
History
Related topics
• antivirus filepattern
• antivirus quarantine
• antivirus quarfilepattern
• antivirus service
quarantine
Use this command to set file quarantine options.
FortiGate units with a local disk can quarantine blocked and infected files. The quarantined files are
removed from the content stream and stored on the FortiGate local disk. Users receive a message
informing them that the removed files have been quarantined.
FortiGate units that do not have a local disk can quarantine blocked and infected files to a FortiAnalyzer
unit.
View the file names and status information about the file in the quarantined file list. Submit specific files
and add file patterns to the autoupload list so they are automatically uploaded to Fortinet for analysis.
Syntax
config antivirus quarantine
set agelimit <hours_int>
set destination {disk | FortiAnalyzer | NULL}
set drop-blocked {ftp http imap nntp pop3 smtp}
set drop-heuristic {ftp http im imap nntp pop3 smtp}
set drop-infected {ftp http im imap nntp pop3 smtp}
set enable-auto-submit {disable | enable}
set lowspace {drop-new | ovrw-old}
set maxfilesize <MB_int>
set sel-status {fileblocked heuristic}
set store-blocked {ftp http imap nntp pop3 smtp}
set store-heuristic {ftp http im imap nntp pop3 smtp}
set store-infected {ftp http im imap nntp pop3 smtp}
set use-fpat {enable | disable}
set use-status {enable | disable}
end
Example
This example shows how to set the quarantine age limit to 100 hours, not quarantine blocked files from
SMTP and POP3 traffic, not quarantine heuristic tagged files from SMTP and POP3 traffic, enable auto
submit to the quarantine, set the quarantine to drop new files if the memory is full, set the maximum file
size to quarantine at 2 MB, quarantine files from IMAP traffic with blocked status, quarantine files with
heuristic status in IMAP, HTTP, and FTP traffic., use both file patterns and status to determine which files to
quarantine.
config antivirus quarantine
set agelimit 100
set drop-blocked smtp pop3
set drop-heuristic smtp pop3
set enable-auto-submit enable
set lowspace drop-new
set maxfilesize 2
set sel-status fileblocked
set store-blocked imap
set store-heuristic imap http ftp
set use-fpat enable
set use-status enable
end
History
Related topics
• antivirus filepattern
• antivirus heuristic
• antivirus quarfilepattern
• antivirus service
quarfilepattern
Use this command to configure the file patterns used by automatic file uploading. This command is only
available on FortiGate units with a hard drive.
Configure the FortiGate unit to upload suspicious files automatically to Fortinet for analysis. Add file
patterns to be uploaded to the autoupload list using the * wildcard character. File patterns are applied for
autoupload regardless of file blocking settings.
Also upload files to Fortinet based on status (blocked or heuristics) or submit individual files directly from
the quarantined files list. For more information, see antivirus quarantine.
Syntax
config antivirus quarfilepattern
edit <pattern_str>
set status {enable | disable}
end
Example
Use the following commands to enable automatic upload of *.bat files.
config antivirus quarfilepattern
edit *.bat
set status enable
end
History
Related topics
• antivirus filepattern
• antivirus heuristic
• antivirus quarantine
• antivirus service
service
Use this command to configure how the FortiGate unit handles antivirus scanning of large files in HTTP,
HTTPS, FTP, POP3, IMAP, and SMTP traffic and what ports the FortiGate unit scans for these services.
For HTTPS, you can only configure the ports.
Syntax
config antivirus service <service_str>
set block-page-status-code <integer>
set scan-bzip2 {enable | disable}
set uncompnestlimit <depth_int>
set uncompsizelimit <MB_int>
end
Note: If the file in uncompnestlimit has more levels than the limit you set, or if the file in
uncompsizelimit is larger than the limit you set, the file will pass through without being virus scanned.
Example
This example shows how to set the maximum uncompressed file size that can be buffered to memory for
scanning HTTP traffic at 15 MB.
config antivirus service http
set uncompsizelimit 15
end
History
Related topics
• antivirus filepattern
• antivirus heuristic
• antivirus quarantine
• antivirus quarfilepattern
settings
Use this command to configure grayware detection as part of antivirus scanning.
Grayware programs are unsolicited commercial software programs that get installed on computers, often
without the user’s consent or knowledge. Grayware programs are generally considered an annoyance, but
these programs can cause system performance problems or be used for malicious purposes.
Since grayware detection is part of antivirus scanning, antivirus scanning must be enabled for this setting
to have any effect.
Syntax
config antivirus settings
set grayware {enable | disable}
end
Example
Use the following commands to enable grayware detection.
config antivirus setttings
set grayware enable
end
History
Related topics
• antivirus heuristic
• antivirus quarantine
• antivirus service
application
Use these commands to configure application control.
Application control is a UTM feature that allows your FortiGate unit to detect and take action against
network traffic depending on the application generating the traffic. Based on FortiGate Intrusion Protection
protocol decoders, application control is a more user-friendly and powerful way to use Intrusion Protection
features to log and manage the behavior of application traffic passing through the FortiGate unit.
Application control uses IPS protocol decoders that can analyze network traffic to detect application traffic
even if the traffic uses non-standard ports or protocols.
The FortiGate unit can recognize the network traffic generated by more than 70 applications. You can
create application control lists that specify what action will be taken with the traffic of the applications you
need to manage. Specify the application control list in the protection profile applied to the network traffic
you need to monitor. Create multiple application control lists, each tailored to a particular network, for
example.
list
name
list
Use this command to create application control lists and configure the application options.
Syntax
config application list
edit <app_list_str>
config entries
edit <id_integer>
set action {block | pass}
set application {<app_int> | All}
set block-ack {enable | disable}
set block-audio {enable | disable}
set block-bye {enable | disable}
set block-cancel {enable | disable}
set block-encrypt {enable | disable}
set block-file {enable | disable}
set block-im {enable | disable}
set block-info {enable | disable}
set block-invite {enable | disable}
set block-long-chat {enable | disable}
set block-long-lines {enable | disable}
set block-mcast {enable | disable}
set block-message {enable | disable}
set block-notify {enable | disable}
set block-options {enable | disable}
set block-photo {enable | disable}
set block-prack {enable | disable}
set block-publish {enable | disable}
set block-refer {enable | disable}
set block-register {enable | disable}
set block-subscribe {enable | disable}
set block-unknown {enable | disable}
set block-update {enable | disable}
set call-keepalive <minutes_int>
set category {<cat_int> | All}
set comment <comment_string>
set im-no-content-summary {enable | disable}
set imoversizechat <bytes_int>
set inspect-anyport {enable | disable}
set invite-rate <rate_int>
set log {disable | enable}
set max-calls <calls_int>
set max-dialogs <calls_int>
set max-line-length <length_int>
set message-rate <rate_int>
set open-contact-pinhole {disable | enable}
set open-register-pinhole {disable | enable}
set other-application-action {block | pass}
set other-application-log {enable | disable}
set reg-diff-port {enable | disable}
set register-rate <rate_int>
set rfc2543-branch {enable | disable}
History
Related commands
• application name
name
Use this command to view the settings of each application. The application category and ID are displayed.
This command is ‘read only’ and cannot be used to change application settings.
Syntax
config application name <app_str>
get
end
Variable Description Default
name <app_str> Enter the name of the application you want to view. Enter No default
config application name ? to list all the applications.
History
Related commands
• application list
dlp
The FortiGate data leak prevention (DLP) system allows you to prevent sensitive data from leaving your
network. You can define sensitive data patterns, and data matching these patterns will be blocked and/or
logged when passing through the FortiGate unit. The DLP system is configured by creating individual
rules, combining the rules into DLP sensors, and then assigning a sensor to a protection profile.
For more information about DLP see the FortiGate UTM User Guide.
Use these commands to configure Data Leak Prevention (DLP).
compound
rule
sensor
compound
Use this command to add or edit DLP compound rules. DLP compound rules are groupings of DLP rules
that also change the way they behave when added to a DLP sensor. Individual rules can be configured
with only a single attribute. When this attribute is discovered in network traffic, the rule is activated.
Compound rules allow you to group individual rules to specify far more detailed activation conditions. Each
included rule is configured with a single attribute, but every attribute must be present before the rule is
activated.
For example, create two rules and add them to a sensor:
• Rule 1 checks SMTP traffic for a sender address of [email protected]
• Rule 2 checks SMTP traffic for the word “sale” in the message body
When the sensor is used, either rule could be activated if its configured condition is true. If only one
condition is true, only the corresponding rule would be activated. Depending on the contents of the SMTP
traffic, neither, either, or both could be activated.
If you remove these rules from the sensor, add them to a compound rule, and add the compound rule to
the sensor, the conditions in both rules have to be present in network traffic to activate the compound rule.
If only one condition is present, the message passes without any rule or compound rule being activated.
By combining the individually configurable attributes of multiple rules, compound rules allow you to specify
far more detailed and specific conditions to trigger an action.
Syntax
config dlp compound
edit <compound_rule_str>
set comment <comment_str>
set member <rule1> [<rule2> ...]
set protocol {email | ftp | http | im | nntp}
set sub-protocol <sub_protocol_1> [<sub_protocol_2> ...]
end
Example
Use the following command to add a compound rule called pop3_comp that includes three rules named
pop3_rule_1, pop3_rule_2, and pop3_rule_3.
config dlp compound
edit pop3_comp
set protocol email
set sub-protocol pop3
set member pop3_rule_1 pop3_rule_2 pop3_rule_3
set comment "Compound rule for POP3"
end
History
Related commands
• dlp rule
• dlp sensor
rule
Use this command to add or edit DLP rules. DLP rules are the core element of the data leak prevention
feature. These rules define the data to be protected so the FortiGate unit can recognize it. For example, an
included rule uses regular expressions to describe Social Security number:
([0-6]\d{2}|7([0-6]\d|7[0-2]))[ \-]?\d{2}[ \-]\d{4}
Rather than having to list every possible Social Security number, this regular expression describes the
structure of a Social Security number. The pattern is easily recognizable by the FortiGate unit.
DLP rules can be combined into compound rules and they can be included in sensors. If rules are specified
directly in a sensor, traffic matching any single rule will trigger the configured action. If the rules are first
combined into a compound rule and then specified in a sensor, every rule in the compound rule must
match the traffic to trigger the configured action.
Individual rules in a sensor are linked with an implicit OR condition while rules within a compound rule are
linked with an implicit AND condition.
Syntax
config dlp rule
edit rule_name <rule_str>
set description <desc_str>
set field {always | attachment-size | attachment-text | attachment-type
| body | cgi-parameters | cookie-content | encrypted | file-pattern
| file-text | file-type | header | hostname | receiver | sender
| server | subject | transfer-size | url | user | user-group}
set file-pattern <pattern_str>
set file-pattern-negated {enable | disable}
set file-scan {archive-content archive-whole ms-word-content
ms-word-whole pdf-content pdf-whole}
set file-type <type_int>
set file-type-negated {enable | disable}
set negated {enable | disable}
set operator {equal | greater-equal | less-equal | not-equal}
set protocol {email | http | ftp | nntp | im | session-ctrl}
set regexp <regex_str>
set regexp-negated {enable | disable}
set regexp-wildcard {enable | disable}
set regexp-utf8 {enable | disable}
set rule_name <rule_str>
set string <str>
set string-negated {enable | disable}
set sub-protocol <sub_protocol_1> [<sub_protocol_2> ...]
set value <value_int>
end
regexp <regex_str> Enter the regular expression or wildcard to test. Use the No default
regexp-wildcard field to choose between regular expression
syntax and wildcards.
regexp-negated {enable By default, DLP rules are triggered when the FortiGate unit discovers disable
| disable} network traffic that matches the regular expressions or wildcards
specified in DLP rules. Enable regexp-negated to have the DLP
rule triggered when traffic does not match the regular expression or
wildcard specified in the rule.
Example
Use the following command to add a rule called pop3_rule_1 for the email protocol and the POP3 sub-
protocol that scans the send field of all POP3 email messages for the email address: [email protected].
config dlp rule
edit pop3_rule_1
set protocol email
set sub-protocol pop3
set field sender
set set regexp [email protected]
set description “Search POP3 for [email protected]”
end
History
Related commands
• dlp compound
• dlp sensor
sensor
Use this command to create a DLP sensor. DLP sensors are simply collections of DLP rules and DLP
compound rules. The DLP sensor also includes settings such as action, archive, and severity for each rule
or compound rule. Once a DLP sensor is configured, it can be specified in a protection profile. Any traffic
handled by the policy in which the protection profile is specified will enforce the DLP sensor configuration.
Syntax
config dlp sensor
edit <sensor_str>
set comment <comment_str>
config rule
edit <rule_str>
set action {ban | ban-sender | block | exempt | log-only
| quarantine-ip | quarantine-port}
set archive {disable | enable | summary-only}
set expiry {<int>d | <int>h | <int>m | indefinite}
set severity <severity_int>
set status {enable | disable}
next
config compound-rule
edit <compound-rule_str>
set action {ban | ban-sender | block | exempt | log-only
| quarantine-ip | quarantine-port}
set archive {disable | enable | summary-only}
set expiry {<int>d | <int>h | <int>m | indefinite}
set severity <severity_int>
set status {enable | disable}
next
end
end
Variable Description Default
<sensor_str> Enter the name of a sensor to edit. Enter a new name to No default
create a new DLP sensor.
comment <comment_str> Enter an optional description of the DLP sensor. Enclose the No default
description in quotes if you want to include spaces.
edit <rule_str> Add a rule to a sensor by specifying the name of a DLP rule
that has already been added.
edit <compound-rule_str> Add a compound rule to a sensor by specifying the name of
a DLP compound rule that has already been added.
Example
Use the following command to add a DLP sensor named New_sensor and add two rules and two
compound rules to the sensor.
config dlp sensor
set comment "A useful DLP Sensor"
config rule
edit All_Email
set action log-only
set archive summary-only
next
edit FTP-action
set action block
set severity 3
set archive enable
end
config compound-rule
edit Email-SIN
set action log-only
set archive summary-only
next
edit Email-action
set action block
set severity 4
set archive disable
end
end
History
Related commands
• dlp compound
• dlp rule
endpoint-control
Use endpoint-control commands to configure the following parts of the Endpoint NAC feature:
• application detection rules
• Endpoint NAC profiles
• the required minimum version of FortiClient Endpoint Security
• the FortiClient installer download location
Endpoint NAC is enabled in firewall policies.
This chapter contains the following sections:
apps-detect rule-list
profile
settings
apps-detect rule-list
Use this command to configure the application detection part of the Endpoint NAC feature. Endpoint NAC
must be enabled in the firewall policy.
Syntax
config endpoint-control apps-detect rule-list
edit <rule_list_name>
set comment <comment_str>
set other-application-action {allow | deny | monitor}
config entries
edit <rule_id>
set category <category_id>
set vendor <vendor_id>
set application <application_id>
set action {allow | deny | monitor}
set status {installed | running}
end
end
History
Related commands
• endpoint-control settings
• firewall policy, policy6
profile
Use this command to configure an Endpoint NAC profile.
Syntax
config endpoint-control profile
edit <profile_name>
set application-detection {enable | disable}
set application-detection-rule-list <rulelist_name>
set feature-enforcement {enable | disable}
set recommendation-disclaimer {enable | disable}
set require-av {enable | disable}
set require-avuptodate {enable | disable}
set require-firewall {enable | disable}
set require-license {enable | disable}
set require-webfilter {enable | disable}
end
Variable Description Default
<profile_name> Enter a name for this Endpoint NAC profile. No default.
application-detection Enable application detection. disable
{enable | disable}
application-detection-rule-list Enter the name of the application rule list to use. See No default.
<rulelist_name> “endpoint-control apps-detect rule-list” on page 104. This is
available if application-detection is enabled.
feature-enforcement Enable to deny access to endpoints that do not have disable
{enable | disable} FortiClient Endpoint Security installed.
recommendation-disclaimer Enable to use Endpoint NAC Recommendation Portal enable
{enable | disable} replacement message, which allows user to continue
without installing FortiClient Endpoint Security.
Disable to use Endpoint NAC Download Portal replacement
message, which only allows user to download FortiClient
Endpoint Security installer.
require-av {enable | disable} Enable to deny access to endpoints that do not have the disable
FortiClient antivirus feature enabled. This is available if
feature-enforcement is enabled.
require-avuptodate Enable to deny access to endpoints with out-of-date disable
{enable | disable} FortiClient antivirus signatures. This is available if
feature-enforcement and require-av are enabled.
require-firewall Enable to deny access to endpoints that do not have the disable
{enable | disable} FortiClient firewall enabled.
This is available if feature-enforcement is enabled.
require-license Enable to deny access to endpoints on which FortiClient is disable
{enable | disable} not licensed.
This is available if feature-enforcement is enabled.
require-webfilter Enable to deny access to endpoints that do not have the disable
{enable | disable} FortiClient web filter feature enabled.
This is available if feature-enforcement is enabled.
History
Related commands
• endpoint-control apps-detect rule-list
• endpoint-control settings
• firewall policy, policy6
settings
Use this command to configure the required minimum version of FortiClient Endpoint Security and the
installer download location. This is part of the Endpoint Control feature.
Syntax
config endpoint-control settings
set compliance-timeout <minutes>
set download-location {custom | fortigate | fortiguard}
set download-custom-link <url>
set enforce-minimum-version {enable | disable}
set version <major.minor.patch>
set version-check {latest | minimum}
end
If download-location is fortiguard and FortiGuard Services is not available, the download portal
directs the user to contact the administrator.
History
Related commands
• endpoint-control apps-detect rule-list
firewall
Use firewall commands to configure firewall policies and the data they use, including protection profiles, IP
addresses and virtual IP addresses, schedules, and services. You can also configure DNS translation,
IP/MAC binding, and multicast policies.
This chapter contains the following sections:
address, address6 schedule onetime
addrgrp, addrgrp6 schedule recurring
dnstranslation schedule group
interface-policy service custom
interface-policy6 service group
ipmacbinding setting shaper per-ip-shaper
ipmacbinding table shaper traffic-shaper
ippool sniff-interface-policy
ldb-monitor sniff-interface-policy6
multicast-policy ssl setting
policy, policy6 vip
profile vipgrp
address, address6
Use this command to configure firewall addresses used in firewall policies. An IPv4 firewall address is a set
of one or more IP addresses, represented as a domain name, an IP address and a subnet mask, or an IP
address range. An IPv6 firewall address is an IPv6 6-to-4 address prefix.
By default, FortiGate units have the firewall address All, which represents any IP address.
Addresses, address groups, and virtual IPs must have unique names to avoid confusion in firewall policies.
If an address is selected in a policy, it cannot be deleted until it is deselected from the policy.
Syntax
config firewall address
edit <name_str>
set associated-interface <interface_str>
set cache-ttl <ttl_int>
set comment <comment_string>
set end-ip <address_ipv4>
set fqdn <domainname_str>
set start-ip <address_ipv4>
set subnet <address_ipv4mask>
set type {ipmask | iprange | fqdn | wildcard}
set wildcard <address_ip4mask>
end
config firewall address6
edit <name_str>
set ip6 <address_ipv6prefix>
end
Example
This example shows how to add one IPv4 address of each type: ipmask, iprange, and fqdn. It also
shows how to configure an IPv6 address prefix.
config firewall address
edit Example_Subnet
set type ipmask
set subnet 192.168.1.0 255.255.255.0
next
edit Example_Range
set type iprange
set start-ip 10.10.1.10
set end-ip 10.10.1.30
next
edit Example_Domain
set type fqdn
set fqdn www.example.com
end
History
FortiOS v2.80 Substantially revised. IP address range option added. Requiring that an address be added to
an interface removed.
FortiOS v3.0 Added fqdn.
FortiOS v3.0 MR4 Added associated-interface field.
FortiOS v3.0 MR7 Added wildcard option to type. Allows for firewall address with a wildcard netmask.
FortiOS v4.0 Added comment field.
FortiOS v4.0 MR1 Added cache-ttl field.
Related topics
• firewall addrgrp, addrgrp6
• firewall policy, policy6
addrgrp, addrgrp6
Use this command to configure firewall address groups used in firewall policies.
You can organize related firewall addresses into firewall address groups to simplify firewall policy
configuration. For example, rather than creating three separate firewall policies for three firewall
addresses, you could create a firewall address group consisting of the three firewall addresses, then
create one firewall policy using that firewall address group.
Addresses, address groups, and virtual IPs must all have unique names to avoid confusion in firewall
policies. If an address group is selected in a policy, it cannot be deleted unless it is first deselected in the
policy.
Syntax
config firewall addrgrp, addrgrp6
edit <name_str>
set comment <comment_string>
set member <name_str>
end
Example
This example shows how to add two firewall addresses to a firewall address group.
config firewall addrgrp
edit Group1
set member Example_Subnet Example_Range
end
History
Related topics
• firewall address, address6
• firewall policy, policy6
dnstranslation
Use this command to add, edit or delete a DNS translation entry.
If DNS translation is configured, the FortiGate unit rewrites the payload of outbound DNS query replies
from internal DNS servers, replacing the resolved names’ internal network IP addresses with external
network IP address equivalents, such as a virtual IP address on a FortiGate unit’s external network
interface. This allows external network hosts to use an internal network DNS server for domain name
resolution of hosts located on the internal network.
For example, if a virtual IP provided network address translation (NAT) between a public network, such as
the Internet, and a private network containing a web server, hosts on the public network could access the
web server by using its virtual IP address. However, if hosts attempted to access the web server by domain
name, and the DNS server performing name resolution for that domain name was also located on the
private network, the DNS query reply would contain a private network IP address, which is not routable
from the external network. To solve this, you might configure DNS translation, and substitute the web
server’s private network IP address with the virtual IP address in DNS query replies to the public network.
DNS translation mappings between src and dst must be one-to-one; you cannot create one-to-many or
many-to-one mappings. For example, if src is a single IP address, it cannot be DNS translated into a dst
subnet; dst must be a single IP address, like src. If src is a subnet, dst must also be a subnet.
Syntax
config firewall dnstranslation
edit <index_int>
set dst <destination_ipv4>
set netmask <address_ipv4mask>
set src <source_ipv4>
end
Example
This example shows how to translate the resolved addresses in DNS query replies, from an internal
(source) subnet to an external (destination) subnet.
config firewall dnstranslation
edit 1
set src 192.168.100.12
set dst 172.16.200.190
set netmask 255.255.255.0
end
History
Related topics
• firewall vip
interface-policy
DoS policies, called interface policies in the CLI, are primarily used to apply DoS sensors to network traffic
based on the FortiGate interface it is leaving or entering as well as the source and destination addresses.
DoS sensors are a traffic anomaly detection feature to identify network traffic that does not fit known or
common traffic patterns and behavior. A common example of anomalous traffic is the denial of service
attack. A denial of service occurs when an attacking system starts an abnormally large number of sessions
with a target system. The large number of sessions slows down or disables the target system so legitimate
users can no longer use it. You can also use the Interface-policy command to invoke an IPS sensor
as part of a DoS policy.
The interface-policy command is used for DoS policies applied to IPv4 addresses. For IPv6
addresses, use interface-policy6 instead.
Syntax
config firewall interface-policy
edit <policy_id>
set application-list-status {enable | disable}
set application_list <app_list_str>
set dstaddr <dstaddr_ipv4>
set interface <int_str>
set ips-DoS-status {enable | disable}
set ips-DoS <DoS_str>
set ips-sensor-status {enable | disable}
set ips-sensor <sensor_str>
set service <service_str>
set srcaddr <srcaddr_ipv4>
set status {enable | disable}
end
Example
This example shows how to add a DoS policy that examines all traffic received by port10 with source and
destination addresses matching Subnet_1 and Subnet_2 and for any service. The policy applies an IPS
sensor to the traffic.
config firewall interface-policy
edit 1
set interface port10
set srcaddr Subnet_1
set dstaddr Subnet_2
set ips-sensor-status enable
set ips-sensor mySensor
end
History
Related commands
• firewall interface-policy6
• firewall sniff-interface-policy
• firewall sniff-interface-policy6
• firewall policy, policy6
• firewall profile
interface-policy6
DoS policies (called interface policies in the CLI) for IPv6 addresses, are used to apply IPS sensors to
network traffic based on the FortiGate interface it is leaving or entering as well as the source and
destination addresses.
The interface-policy6 command is used for DoS policies applied to IPv6 addresses. For IPv4
addresses, use interface-policy instead.
Syntax
config firewall interface-policy6
edit <policy_id>
set application-list-status {enable | disable}
set application_list <app_list_str>
set dstaddr6 <dstaddr_ipv6>
set interface
set ips-sensor-status {enable | disable}
set ips-sensor <sensor_str>
set service6 <service_str>
set srcaddr6 <srcaddr_ipv6>
set status {enable | disable}
end
Example
This example shows how to add an IPv6 sniffer policy that examines all IPv6 traffic received by port10 with
source and destination addresses matching Subnet_1 and Subnet_2 and for any service. The policy
applies an application control list and an IPS sensor to the traffic.
config firewall interface-policy6
edit 1
History
Related commands
• firewall interface-policy
• firewall sniff-interface-policy
• firewall sniff-interface-policy6
• firewall policy, policy6
• firewall profile
ipmacbinding setting
Use this command to configure IP to MAC address binding settings.
IP/MAC binding protects the FortiGate unit and/or the network from IP address spoofing attacks. IP
spoofing attacks attempt to use the IP address of a trusted computer to connect to, or through, the
FortiGate unit from a different computer. It is simple to change a computer’s IP address to mimic that of a
trusted host, but MAC addresses are often added to Ethernet cards at the factory, and are more difficult to
change. By requiring that traffic from trusted hosts reflect both the IP address and MAC address known for
that host, fraudulent connections are more difficult to construct.
To configure the table of IP addresses and the MAC addresses bound to them, see “ipmacbinding table” on
page 121. To enable or disable IP/MAC binding for an individual FortiGate unit network interface, see
ipmac in “system interface” on page 448.
Note: If IP/MAC binding is enabled, and the IP address of a host with an IP or MAC address in the IP/MAC
table is changed, or a new computer is added to the network, update the IP/MAC table. If you do not update
the IP/MAC binding list, the new or changed hosts will not have access to or through the FortiGate unit. For
details on updating the IP/MAC binding table, see “ipmacbinding table” on page 121.
Caution: If a client receives an IP address from the FortiGate unit’s DHCP server, the client’s MAC address
is automatically registered in the IP/MAC binding table. This can simplify IP/MAC binding configuration, but
can also neutralize protection offered by IP/MAC binding if untrusted hosts are allowed to access the DHCP
server. Use caution when enabling and providing access to the DHCP server.
Syntax
config firewall ipmacbinding setting
set bindthroughfw {enable | disable}
set bindtofw {enable | disable}
set undefinedhost {allow | block}
end
Example
This example shows how to enable IP/MAC binding for traffic both going to and through the FortiGate unit,
and block undefined hosts (IP/MAC address pairs).
config firewall ipmacbinding setting
set bindthroughfw enable
set bindtofw enable
set undefinedhost block
end
History
Related topics
• firewall ipmacbinding table
ipmacbinding table
Use this command to configure IP and MAC address pairs in the IP/MAC binding table. You can bind
multiple IP addresses to the same MAC address, but you cannot bind multiple MAC addresses to the same
IP address.
To configure the IP/MAC binding settings, see “ipmacbinding setting” on page 119. To enable or disable
IP/MAC binding for an individual FortiGate unit network interface, see ipmac in “system interface” on
page 448.
Note: If IP/MAC binding is enabled, and the IP address of a host with an IP or MAC address in the IP/MAC
table is changed, or a new computer is added to the network, update the IP/MAC table. If you do not update
the IP/MAC binding list, the new or changed hosts will not have access to or through the FortiGate unit.
Caution: If a client receives an IP address from the FortiGate unit’s DHCP server, the client’s MAC address
is automatically registered in the IP/MAC binding table. This can simplify IP/MAC binding configuration, but
can also neutralize protection offered by IP/MAC binding if untrusted hosts are allowed to access the DHCP
server. Use caution when enabling and providing access to the DHCP server.
Syntax
config firewall ipmacbinding table
edit <index_int>
set ip <address_ipv4>
set mac <address_hex>
set name <name_str>
set status {enable | disable}
end
Example
This example shows how to add and enable an IP/MAC entry to the IP/MAC binding table.
config firewall ipmacbinding table
edit 1
set ip 172.16.44.55
set mac 00:10:F3:04:7A:4C
set name RemoteAdmin
set status enable
end
History
Related topics
• firewall ipmacbinding setting
ippool
Use this command to configure IP address pools.
Use IP pools to add NAT policies that translate source addresses to addresses randomly selected from the
IP pool, rather than the IP address assigned to that FortiGate unit interface. In Transparent mode, IP pools
are available only from the FortiGate CLI.
An IP pool defines a single IP address or a range of IP addresses. A single IP address in an IP pool
becomes a range of one IP address. For example, if you enter an IP pool as 1.1.1.1 the IP pool is actually
the address range 1.1.1.1 to 1.1.1.1.
If a FortiGate interface IP address overlaps with one or more IP pool address ranges, the interface
responds to ARP requests for all of the IP addresses in the overlapping IP pools.
For example, consider a FortiGate unit with the following IP addresses for the port1 and port2 interfaces:
• port1 IP address: 1.1.1.1/255.255.255.0 (range is 1.1.1.0-1.1.1.255)
• port2 IP address: 2.2.2.2/255.255.255.0 (range is 2.2.2.0-2.2.2.255)
And the following IP pools:
• IP_pool_1: 1.1.1.10-1.1.1.20
• IP_pool_2: 2.2.2.10-2.2.2.20
• IP_pool_3: 2.2.2.30-2.2.2.40
The port1 interface overlap IP range with IP_pool_1 is:
• (1.1.1.0-1.1.1.255) and (1.1.1.10-1.1.1.20) = 1.1.1.10-1.1.1.20
The port2 interface overlap IP range with IP_pool_2 is:
• (2.2.2.0-2.2.2.255) & (2.2.2.10-2.2.2.20) = 2.2.2.10-2.2.2.20
The port2 interface overlap IP range with IP_pool_3 is:
• (2.2.2.0-2.2.2.255) & (2.2.2.30-2.2.2.40) = 2.2.2.30-2.2.2.40
And the result is:
• The port1 interface answers ARP requests for 1.1.1.10-1.1.1.20
• The port2 interface answers ARP requests for 2.2.2.10-2.2.2.20 and for 2.2.2.30-2.2.2.40
Select NAT in a firewall policy and then select Dynamic IP Pool and select an IP pool to translate the
source address of packets leaving the FortiGate unit to an address randomly selected from the IP pool.
Syntax
config firewall ippool
edit <index_int>
set endip <address_ipv4>
set startip <address_ipv4>
end
Example
You can use the following commands to add an IP pool.
config firewall ippool
edit 1
set startip 192.168.1.100
set endip 192.168.1.200
end
History
Related topics
• firewall policy, policy6
ldb-monitor
Use this command to configure health check settings.
Health check settings can be used by load balancing VIPs to determine if a real server is currently
responsive before forwarding traffic. One health check is sent per interval using the specified protocol, port
and HTTP-GET, where applicable to the protocol. If the server does not respond during the timeout period,
the health check fails and, if retries are configured, another health check is performed. If all health checks
fail, the server is deemed unavailable, and another real server is selected to receive the traffic according to
the selected load balancing algorithm.
Health check settings can be re-used by multiple real servers. For details on enabling health checking and
using configured health check settings, see “firewall vip” on page 189.
Syntax
config firewall ldb-monitor
edit <name_str>
set http-get <httprequest_str>
set http-match <contentmatch_str>
set interval <seconds_int>
set port <port_int>
set retry <retries_int>
set timeout <seconds_int>
set type {http | ping | tcp}
end
Example
You might configure a health check for a server using the HTTP protocol to retrieve a web page. To ensure
that a web page reply containing an error message, such as an HTTP 404 page, does not inadvertently
cause the health check to succeed, you might search the reply for text that does not occur in any web
server error page, such as unique text on a main page.
config firewall ldp-monitor
edit httphealthchecksettings
set type http
set port 8080
set http-get “/index.php”
set http-match “Welcome to Example, Inc.”
set interval 5
set timeout 2
set retry 2
end
History
FortiOS v3.0 MR6 New command. Configures health check settings which can be used when enabling health
checks for load balanced real servers associated with a virtual IP. This extends and
replaces deprecated commands in config realserver for health check by ICMP ECHO
(ping).
Related topics
• firewall vip
multicast-policy
Use this command to configure a source NAT IP. This command can also be used in Transparent mode to
enable multicast forwarding by adding a multicast policy.
The matched forwarded (outgoing) IP multicast source IP address is translated to the configured IP
address. For additional options related to multicast, see multicast-forward {enable | disable} in “system
settings” on page 517 and tp-mc-skip-policy {enable | disable} in “system global” on page 423.
Syntax
config firewall multicast-policy
edit <index_int>
set action {accept | deny}
set dnat <address_ipv4>
set dstaddr <address_ipv4mask>
set dstintf <name_str>
set nat <address_ipv4>
set srcaddr <address_ipv4mask>
set srcintf <name_str>
set protocol <multicastlimit_int>
set start-port <port_int>
set end-port <port_int>
end
Example
This example shows how to configure a multicast NAT policy.
config firewall multicast-policy
edit 1
set dstaddr 10.0.0.1 255.255.255.0
set dstintf dmz
History
Related topics
• system global
policy, policy6
Use this command to add, edit, or delete firewall policies.
Firewall policies control all traffic passing through the FortiGate unit. Firewall policies are instructions used
by the FortiGate unit to decide what to do with a connection request. The policy directs the firewall to allow
the connection, deny the connection, require authentication before the connection is allowed, or apply
IPSec or SSL VPN processing.
Note: If you are creating an IPv6 policy, some of the IPv4 options, such as NAT and VPN settings, are not
applicable.
Syntax
config firewall policy, policy6
edit <index_int>
set action {accept | deny | ipsec | ssl-vpn}
set auth-cert <certificate_str>
set auth-path {enable | disable}
set auth-redirect-addr <domainname_str>
set comments <comment_str>
set custom-log-fields <fieldid_int>
set diffserv-forward {enable | disable}
set diffserv-reverse {enable | disable}
set diffservcode-forward <dscp_bin>
set diffservcode-rev <dscp_bin>
set disclaimer {enable | disable}
set dstaddr <name_str>
set dstintf <name_str>
set fixedport {enable | disable}
set endpoint-check {enable | disable}
set endpoint-profile <ep_profile_name>
set fsae {enable | disable}
set fsae-guest-profile <profile_str>
set fsae-server-for-ntlm <server_str>
set identity-based {enable | disable}
set inbound {enable | disable}
set ippool {enable | disable}
set logtraffic {enable | disable}
set match-vip {enable | disable}
set nat {enable | disable}
set natinbound {enable | disable}
set natip <address_ipv4mask>
set natoutbound {enable | disable}
set ntlm {enable | disable}
set outbound {enable | disable}
set per-ip-shaper <shaper_name>
set poolname <name_str>
set profile <name_str>
set profile-status {enable | disable}
set redirect-url <name_str>
set schedule <name_str>
set service <name_str>
set session-ttl <session_time_integer>
Internet
Internal network
Transparent mode 192.168.1.0/24
Management IPs:
Router 10.1.1.99
192.168.1.99
DMZ
DMZ network
10.1.1.0/24
Note: You can add the firewall policy from the web-based manager and then use the CLI to enable NAT
and add the IP Pool.
History
Related topics
• firewall policy, policy6
• firewall profile
• firewall schedule onetime firewall schedule recurring
• firewall service custom, firewall service group
• endpoint-control
• firewall interface-policy, firewall interface-policy6
• firewall sniff-interface-policy, firewall sniff-interface-policy6
profile
Use this command to configure protection profiles which can be applied to traffic by selecting the
protection profile in one or more firewall policies, or by associating a protection profile with a firewall user
group. The firewall policy will apply the subset of the protection profile that is relevant to the service or
service group.
Syntax
config firewall profile
edit <profile_str>
set application-list-status {enable | disable}
set application-list <name_string>
set comment <comment_str>
set dlp-sensor-table <name_string>
set filepattable <index_int>
set ftgd-wf-allow {all | <category_str>}
set ftgd-wf-deny {all | <category_str>}
set ftgd-wf-enable {all | <category_str>}
set ftgd-wf-disable {all | <category_str>}
set ftgd-wf-https-options {allow-ovrd error-allow rate-server-ip
strict-blocking}
set ftgd-wf-log {all | <category_str>}
set ftgd-wf-options {allow-ovrd error-allow http-err-detail rate-image-
urls rate-server-ip redir-block strict-blocking}
set ftgd-wf-ovrd {all | <category_str>}
set ftp {avmonitor avquery block clientcomfort no-content-summary
oversize quarantine scan splice}
set ftp-avdb {default | normal | extended}
set ftpcomfortamount <size_int>
set ftpcomfortinterval <seconds_int>
set ftpoversizelimit <size_int>
set http {activexfilter avmonitor avquery bannedword block block-
invalid-url chunkedbypass clientcomfort cookiefilter fortiguard-wf
javafilter no-content-summary oversize quarantine rangeblock scan
strict-file urlfilter}
set http-avdb {default | normal | extended}
set httpcomfortamount <size_int>
set httpcomfortinterval <seconds_int>
set httpoversizelimit <size_int>
set httppostaction {normal | comfort | block}
set http-post-lang <charset1> [<charset2>... <charset5>]
set http-retry-count <retry_int>
set httpsoversizelimit <size_int>
set https-retry-count <retry_int>
set https {activexfilter allow-invalid-server-cert avmonitor avquery
bannedword block block-invalid-url block-ssl-unknown-sess-id
chunkedbypass clientcomfort cookiefilter fortiguard-wf javafilter
log-invalid-server-cert no-content-summary oversize quarantine
rangeblock scan strict-file urlfilter}
set https-avdb {default | normal | extended}
set https-deep-scan {enable | disable}
set im {avmonitor avquery block oversize quarantine scan}
set im-avdb {default | normal | extended}
Example
This example shows how to create a profile called spammail, using:
• filtering of email according to the email banned word list, the MIME header list, and the return DNS
check, enable spam to be logged and tagged with the tag “Spam” in the subject for POP3 traffic
• filtering of email based on the DNSBL server, and discard messages identified as spam for SMTP traffic
config firewall profile
edit spammail
set pop3 spamemailbwl spamhdrcheck spamraddrdns
set pop3-spamaction log tag
set pop3-spamtagmsg Spam
set pop3-spamtagtype subject
set smtp spamrbl
set smtp-spamaction discard
end
This example shows how to add HTTP category blocking to the spammail profile created above, using:
• category blocking to deny access to web pages categorized as Games (20), Personals and Dating (37),
Shopping and Auction (42) and the category group Objectionable or Controversial (g02)
• category monitoring to log access to web pages categorized as Computer Security (50) and the
category group Potentially Bandwidth Consuming (g04)
config firewall profile
edit spammail
set ftgd-wf-deny 20 37 42 g02
set ftgd-wf-log 50 g04
end
config log
Use this command to write event log messages when the options that you have enabled in this protection
profile perform an action. For example, if you enable antivirus protection you could also use the config
log command to enable log-av-block so that the FortiGate unit writes an event log message every
time a virus is detected.
Example
This example shows how to enable writing event log messages when the following happens because of
settings in the protection profile being configured:
• a virus is detected
• an MMS message is intercepted.
config firewall profile
edit example
config log
set log-av-virus enable
set log-intercept enable
end
end
config app-recognition
Use this subcommand to configure protocol recognition options to set the HTTPS content filtering mode
and to
select the TCP port numbers that the protection profile monitors for the content protocols HTTP, HTTPS,
SMTP, POP3, IMAP, NNTP, FTP, SMTPS, POP3S, and IMAPS.
By default the protection profile monitors the default content protocol port numbers (for example, port 80
for HTTP and so on). You can edit the settings for each content protocol and select to inspect all port
numbers for that protocol or select one or more port numbers to monitor for that protocol.
Syntax
config firewall profile
config app-recognition
edit <ftp>
set inspect-all {enable | disable}
set port <port_number>
edit <http>
set inspect-all {enable | disable}
set port <port_number>
edit <https>
set inspect-all {enable | disable}
set port <port_number>
edit <imap>
set inspect-all {enable | disable}
set port <port_number>
edit <imaps>
set inspect-all {enable | disable}
set port <port_number>
edit <nntp>
set inspect-all {enable | disable}
set port <port_number>
edit <pop3>
set inspect-all {enable | disable}
set port <port_number>
edit <pop3s>
set inspect-all {enable | disable}
set port <port_number>
edit <smtp>
set inspect-all {enable | disable}
Example
Use the following example to monitor all ports for SMTPS protocol.
config firewall profile
edit <profile_name>
config app-recognition
edit smtps
set inspect-all enable
end
end
History
FortiOS v3.0 MR4 Added VoIP config commands for SCCP, Simple, and SIP protocols.
Added associated-interface, nntpoversizelimit, imoversizechat,
log-voip, log-voip-violations, and HTTPS commands.
Removed the following options and commands: nntp-spamaction,
nntp-spamtagtype, nntp-spamtagmsg.
Added set smtp-spam-localoverride command.
FortiOS v3.0 MR6 New option redir-block for variable ftgd-wf-options. Blocks HTTP redirects.
FortiOS v3.0 MR6 Removed variables ips-signature and ips-anomaly. IPS sensors, formerly
signatures, are now configured by selecting a sensor name. Denial of service (DoS)
sensors, formerly anomalies, are no longer configured in protection profiles.
FortiOS v3.0 MR6 New variables ips-sensor-status and ips-sensor. Enables IPS sensors, and
selects the IPS sensor name.
FortiOS v3.0 MR6 Renamed variable ips-log to log-ips.
FortiOS v3.0 MR6 New option block-long-chat for variable aim. Blocks oversize chat messages.
FortiOS v3.0 MR6 Renamed options content-full and content-meta to archive-full and
archive-summary, respectively, for the msn, icq, and yahoo variables.
FortiOS v3.0 MR6 Removed variable ftgd-wf-ovrd-group. Authorizing a group to perform web filtering
overrides now occurs within group configuration.
FortiOS v3.0 MR6 New option scanextended for the ftp and http variables. Scans for viruses and
worms using the extended database of virus definitions.
FortiOS v3.0 MR7 Renamed variable allow-ssl-unknown-sess-id to block-ssl-unknown-sess-
id. Blocking of unknown session ID is now disabled by default.
FortiOS v3.0 MR7 Removed variables IMAP spamhdrcheck, imap-spamaction, imap-spamtagmsg,
and imap-spamtagtype.
FortiOS v3.0 MR7 Added the new config sip subcommand field reg-diff-port.
FortiOS v3.0 MR7 Moved config dupe, config flood, config log, config notification,
config sccp, config simple, and config sip into subcommand sections.
FortiOS 4.0 Moved fields aim, bittorrent, bittorrent-limit, edonkey,
edonkey-limit, gnutella, gnutella-limit, icq, imoversizechat,
kazaa, kazaa-limit, msn, p2p, skype, winny, winny-limit, yahoo,
log-antispam-mass-mms, log-av-endpoint-filter, log-im, log-p2p,
log-voip, log-voip-violations
Added fields application-list, application-list-status, dlp-sensor-
table, httppostaction, httpsoversizelimet, https-deep-scan,
https-retry-count, httpscomfortinterval, httpscomfortamount,
imaps, imapsoversizelimit, nac-quar-expiry, nac-quar-infected,
pop3s, pop3soversizelimit, smtps, smtpsoversizelimit.
Added syntax config app-recognition
FortiOS 4.0 MR1 Added fields http-post-lang, log-web-invalid-domain.
Related topics
• firewall policy, policy6
• alertemail
• antivirus
• ips
• webfilter
schedule onetime
Use this command to add, edit, or delete one-time schedules.
Use scheduling to control when policies are active or inactive. Use one-time schedules for policies that are
effective once for the period of time specified in the schedule.
Note: To edit a schedule, define the entire schedule, including the changes. This means entering all of the
schedule parameters, both those that are changing and those that are not.
Syntax
config firewall schedule onetime
edit <name_str>
set end <hh:mm> <yyyy/mm/dd>
set start <hh:mm> <yyyy/mm/dd>
end
Example
Use the following example to add a one-time schedule named Holiday that is valid from 5:00 pm on 3
September 2004 until 8:45 am on 7 September 2004.
config firewall schedule onetime
edit Holiday
set start 17:00 2004/09/03
set end 08:45 2004/09/07
end
History
Related topics
• firewall policy, policy6
• firewall schedule recurring
schedule recurring
Use this command to add, edit, and delete recurring schedules used in firewall policies.
Use scheduling to control when policies are active or inactive. Use recurring schedules to create policies
that repeat weekly. Use recurring schedules to create policies that are effective only at specified times of
the day or on specified days of the week.
Note: If a recurring schedule is created with a stop time that occurs before the start time, the schedule starts
at the start time and finishes at the stop time on the next day. You can use this technique to create recurring
schedules that run from one day to the next. To create a recurring schedule that runs for 24 hours, set the
start and stop times to the same time.
Syntax
config firewall schedule recurring
edit <name_str>
set day <name_str>
set end <hh:mm>
set start <hh:mm>
end
Example
This example shows how to add a recurring schedule named access so that it is valid Monday to Friday
from 7:45 am to 5:30 pm.
config firewall schedule recurring
edit access
set day monday tuesday wednesday thursday friday
set start 07:45
set end 17:30
end
Edit the recurring schedule named access so that it is no longer valid on Fridays.
config firewall schedule recurring
edit access
set day monday tuesday wednesday thursday
set start 07:45
set end 17:30
end
History
Related topics
• firewall policy, policy6
• firewall schedule onetime
schedule group
Use this command to configure schedule groups.
Syntax
config firewall schedule group
edit <group-name_str>
set member {<schedule1_name> [schedule2_name ...]}
end
History
Related topics
• firewall schedule onetime
• firewall schedule recurring
service custom
Use this command to configure a firewall service that is not in the predefined service list.
Note: To display a list of all predefined service names, enter the command get firewall service
predefined ?. To display a predefined service’s details, enter the command get firewall
service predefined <service_str>. For details, see “get firewall service predefined” on
page 772.
Syntax
config firewall service custom
edit <name_str>
set comment <string>
set icmpcode <code_int>
set icmptype <type_int>
set protocol {ICMP | IP | TCP/UDP}
set protocol-number <protocol_int>
set tcp-portrange <dstportlow_int>[-<dstporthigh_int>: <srcportlow_int>-
<srcporthigh_int>]
set udp-portrange <dstportlow_int>[-<dstporthigh_int>: <srcportlow_int>-
<srcporthigh_int>]
end
Example
This example shows how to add a custom service called Custom_1. The service destination port range is
TCP 4501 to 4503. The service can use any source port.
config firewall service custom
edit Custom_1
set protocol TCP/UDP
set tcp-portrange 4501-4503
end
A second example shows how to add a custom service called Custom_2. The service destination port
range is TCP 4545 to 4550. The service uses source port 9620.
config firewall service custom
edit Custom_1
set protocol TCP/UDP
set tcp-portrange 4545-4550:9620
end
History
Related topics
• firewall policy, policy6
service group
Use this command to configure firewall service groups.
To simplify policy creation, you can create groups of services and then add one policy to provide or block
access for all the services in the group. A service group can contain predefined services and custom
services in any combination. A service group cannot contain another service group.
Note: To edit a service group, enter all of the members of the service group, both those changing and those
staying the same.
Syntax
config firewall service group
edit <group-name_str>
set comment
set member <service_str>
end
Example
This example shows how to add a service group called web_Services that includes the FTP, HTTP,
HTTPS, and Real Audio services.
config firewall service group
edit web_Services
set member FTP HTTP HTTPS RAUDIO
end
This example shows how to add the TELNET service to the web_Services service group.
config firewall service group
edit web_Services
set member FTP HTTP HTTPS RAUDIO TELNET
end
History
Related topics
• firewall policy, policy6
shaper per-ip-shaper
Use this command to configure traffic shaping that is applied per IP address, instead of per policy or per
shaper. As with the shared traffic shaper, you select per-IP traffic shapers in firewall policies.
Syntax
config firewall shaper per-ip-shaper
edit <name_str>
set action {none | log | block}
set bps <bandwidth>
set quota <Mbytes>
set type {hour | day | week | month}
config iplist
edit <index_int>
end <address_ipv4>
start <address_ipv4>
end
end
config iplist Add one or more IP address ranges to the shaper to specify the IP
addresses that the shaper shapes traffic for.
<index_int> Enter the unique ID number of this IP list. No default.
end <address_ipv4> Enter the ending IP address for the IP address range that this per-IP 0.0.0.0
shaper shapes. To enter a single IP address, enter the address as
both start and end.
start <address_ipv4> Enter the starting IP address for the IP address range that this per-IP 0.0.0.0
shaper shapes. To enter a single IP address, enter the address as
both start and end.
Example
This example shows how to configure per-ip traffic shaping for traffic from IP address 172.20.120.2 and IP
address range 192.168.20.10 to 192.168.20.20. The command sets the maximum allowed bandwidth that
these address can consume to 10000 Kbps. The command also sets the quota for traffic from these IP
addresses to 1000 Mbytes per day. Any traffic from these IP addresses that exceeds this quota is blocked.
config firewall shaper per-ip-shaper
edit per-ip-shaper1
set bps 10000
set action block
set quota 1000
set type day
config iplist
edit 1
set start 172.20.120.2
set end 172.20.120.2
next
edit 2
set start 192.168.20.10
set end 192.168.20.20
end
end
History
FortiOS v4.00 New config firewall traffic-shaper command. Functionality moved out of the
config firewall policy command.
FortiOS 4.0 MR1 New command.
Related topics
• firewall shaper traffic-shaper
• firewall policy, policy6
• firewall profile
shaper traffic-shaper
Use this command to configure shared traffic shaping that is applied to and shared by all traffic accepted
by a firewall policy. As with the per-IP traffic shaper, you select shared traffic shapers in firewall policies.
Syntax
config firewall traffic-shaper
edit <name_str>
set action {none | log | block}
set guaranteed-bandwidth <bandwidth_value>
set maximum-bandwidth <bandwidth_value>
set per-policy {enable | disable}
set priority {high | low | medium}
set quota <Mbytes>
set type {hour | day | week | month}
end
end
Example
This example shows how to set traffic_shaper1’s guaranteed bandwidth to 100000.
config firewall shaper traffic-shaper
edit traffic_shaper1
set guaranteed-bandwidth 100000
end
History
FortiOS v4.00 New config firewall traffic-shaper command. Functionality moved out of the
config firewall policy command.
FortiOS 4.0 MR1 The config firewall traffic-shaper command renamed config firewall
shaper traffic-shaper. Added the action, quota, and type fields.
Related topics
• firewall shaper per-ip-shaper
• firewall policy, policy6
• firewall profile
sniff-interface-policy
Using this command you can add sniffer policies you can configure a FortiGate unit interface to operate as
a one-arm intrusion detection system (IDS) appliance by sniffing packets for attacks without actually
receiving and otherwise processing the packets.
To configure one-arm IDS, you need to configure one or more FortiGate interfaces to operated in one-arm
sniffer mode using the ips-sniffer-mode field of the config system interface command to
configure an interface to operate in one-arm sniffer mode. See “system ips-sniffer-mode {enable | disable}”
on page 455 When you configure an interface to operate in one-arm sniffer mode it cannot be used for any
other purpose. For example, you cannot add firewall policies for the interface and you cannot add the
interface to a zone.
Note: If you add VLAN interfaces to an interface configured for one-arm sniffer operation this VLAN interface
also operates in one-arm sniffer mode and you can add sniffer policies for this VLAN interface.
After you have configured the interface for one-arm sniffer mode, connect the interface to a hub or to the
SPAN port of a switch that is processing network traffic.
Then use the config firewall sniff-interface-policy command to add Sniffer policies for that FortiGate
interface that include a DoS sensor, an IPS sensors, and an Application black/white list to detect attacks
and other activity in the traffic that the FortiGate interface receives from the hub or switch SPAN port.
In one-arm sniffer mode, the interface receives packets accepted by sniffer mode policies only. All packets
not received by sniffer model policies are dropped. All packets received by sniffer mode policies go through
IPS inspection and are dropped after then are analyzed by IPS.
One-arm IDS cannot block traffic. However, if you enable logging in the DoS and IPS sensors and the
application black/white lists, the FortiGate unit records log messages for all detected attacks and
applications.
The sniff-interface-policy command is applied to IPv4 addresses. For IPv6 addresses, use
sniff-interface-policy6 instead.
Syntax
config firewall sniff-interface-policy
edit <policy_id>
set application-list-status {enable | disable}
set application_list <app_list_str>
set interface <int_str>
set ips-DoS-status {enable | disable}
set ips-DoS <DoS_str>
set ips-sensor-status {enable | disable}
set ips-sensor <sensor_str>
set service <service_str>
set srcaddr <srcaddr_ipv4>
set status {enable | disable}
end
Example
This example shows how to add a sniffer policy that examines all traffic received by port10 with source and
destination addresses matching Subnet_1 and Subnet_2 and for any service. The policy applies an
application control list and an IPS sensor to the traffic.
config firewall sniff-interface-policy
edit 1
set interface port10
set srcaddr Subnet_1
set dstaddr Subnet_2
set service ANY
set application-list-status enable
set application-list App_list_1
set ips-sensor-status enable
set ips-sensor mySensor
end
History
Related commands
• firewall sniff-interface-policy6
• firewall interface-policy
• firewall interface-policy6
• firewall policy, policy6
• firewall profile
sniff-interface-policy6
Using this command you can add sniffer policies you can configure a FortiGate unit interface to operate as
a one-arm intrusion detection system (IDS) appliance for IPv6 traffic by sniffing packets for attacks without
actually receiving and otherwise processing the packets.
To configure one-arm IDS, you need to configure one or more FortiGate interfaces to operated in one-arm
sniffer mode using the ips-sniffer-mode field of the config system interface command to
configure an interface to operate in one-arm sniffer mode. See “system ips-sniffer-mode {enable | disable}”
on page 455 When you configure an interface to operate in one-arm sniffer mode it cannot be used for any
other purpose. For example, you cannot add firewall policies for the interface and you cannot add the
interface to a zone.
Note: If you add VLAN interfaces to an interface configured for one-arm sniffer operation this VLAN interface
also operates in one-arm sniffer mode and you can add sniffer policies for this VLAN interface.
After you have configured the interface for one-arm sniffer mode, connect the interface to a hub or to the
SPAN port of a switch that is processing network traffic.
Then use the config firewall sniff-interface-policy command to add Sniffer policies for that FortiGate
interface that include a DoS sensor, an IPS sensors, and an Application black/white list to detect attacks
and other activity in the traffic that the FortiGate interface receives from the hub or switch SPAN port.
In one-arm sniffer mode, the interface receives packets accepted by sniffer mode policies only. All packets
not received by sniffer model policies are dropped. All packets received by sniffer mode policies go through
IPS inspection and are dropped after then are analyzed by IPS.
One-arm IDS cannot block traffic. However, if you enable logging in the IPS sensors and the application
black/white lists, the FortiGate unit records log messages for all detected attacks and applications.
The interface-policy6 command is used for DoS policies applied to IPv6 addresses. For IPv4
addresses, use interface-policy instead.
Syntax
config firewall interface-policy
edit <policy_id>
set application_list <app_list_str>
set application_list <app_list_str>
set dstaddr6 <dstaddr_ipv6>
set interface
set ips-sensor-status {enable | disable}
set ips-sensor <sensor_str>
set service6 <service_str>
set srcaddr6 <srcaddr_ipv6>
set status {enable | disable}
end
Example
This example shows how to add an IPv6 sniffer policy that examines all IPv6 traffic received by port10 with
source and destination addresses matching Subnet_1 and Subnet_2 and for any service. The policy
applies an application control list and an IPS sensor to the traffic.
config firewall sniff-interface-policy6
edit 1
set interface port10
set srcaddr Subnet_1
set dstaddr Subnet_2
set service ANY
set application-list-status enable
set application-list App_list_1
set ips-sensor-status enable
set ips-sensor mySensor
end
History
FortiOS v4.0 MR1 New.
Related commands
• firewall sniff-interface-policy
• firewall interface-policy
• firewall interface-policy6
• firewall policy, policy6
• firewall profile
ssl setting
Use this command to configure SSL proxy settings so that you can apply antivirus scanning, web filtering,
FortiGuard web filtering, spam filtering, data leak prevention (DLP), and content archiving to HTTPS,
IMAPS, POP3S, and SMTPS traffic by using the config firewall profile command.
To perform SSL content scanning and inspection, the FortiGate unit does the following:
• intercepts and decrypts HTTPS, IMAPS, POP3S, and SMTPS sessions between clients and servers
(FortiGate SSL acceleration speeds up decryption)
• applies content inspection to decrypted content, including:
• HTTPS, IMAPS, POP3S, and SMTPS Antivirus, DLP., and content archiving
• HTTPS web filtering and FortiGuard web filtering
• IMAPS, POP3S, and SMTPS spam filtering
• re-encrypts the sessions and forwards them to their destinations.
Syntax
config firewall ssl setting
set caname <certificate_str>
set cert-cache-capacity <capacity_integer>
set cert-cache-timeout <timeout_integer>
set proxy-connect-timeout <timeout_integer>
set session-cache-capacity <capacity_integer>
set session-cache-timeout <port_int>
set ssl-dh-bits {1024 | 1536 | 2048 | 768}
set ssl-max-version {ssl-3.0 | tls-1.0}
set ssl-min-version {ssl-3.0 | tls-1.0}
set ssl-send-empty-frags {enable | disable}
end
Example
This example shows how to add a signing CA certificate to the SSL content scanning and inspection
configuration. Use the following CLI command if the certificate name is Example_CA.
config firewall ssl setting
set caname Example_CA
end
The Example_CA signing CA certificate will now be used by SSL content scanning and inspection for
establishing encrypted SSL sessions.
History
Related topics
• firewall policy, policy6
• firewall profile
vip
Use this command to configure virtual IPs and their associated address and port mappings (NAT).
Virtual IPs can be used to allow connections through a FortiGate unit using network address translation
(NAT) firewall policies. Virtual IPs can use proxy ARP so that the FortiGate unit can respond to ARP
requests on a network for a server that is actually installed on another network. Proxy ARP is defined in
RFC 1027.
For example, you can add a virtual IP to an external FortiGate unit interface so that the external interface
can respond to connection requests for users who are actually connecting to a server on the DMZ or
internal network.
Depending on your configuration of the virtual IP, its mapping may involve port address translation (PAT),
also known as port forwarding or network address port translation (NAPT), and/or network address
translation (NAT) of IP addresses.
If you configure NAT in the virtual IP and firewall policy, the NAT behavior varies by your selection of:
• static vs. dynamic NAT mapping
• the dynamic NAT’s load balancing style, if using dynamic NAT mapping
• full NAT vs. destination NAT (DNAT)
The following table describes combinations of PAT and/or NAT that are possible when configuring a firewall
policy with a virtual IP.
Static NAT Static, one-to-one NAT mapping: an external IP address is always translated to the same
mapped IP address.
If using IP address ranges, the external IP address range corresponds to a mapped IP
address range containing an equal number of IP addresses, and each IP address in the
external range is always translated to the same IP address in the mapped range.
Static NAT with Port Static, one-to-one NAT mapping with port forwarding: an external IP address is always
Forwarding translated to the same mapped IP address, and an external port number is always
translated to the same mapped port number.
If using IP address ranges, the external IP address range corresponds to a mapped IP
address range containing an equal number of IP addresses, and each IP address in the
external range is always translated to the same IP address in the mapped range. If using
port number ranges, the external port number range corresponds to a mapped port number
range containing an equal number of port numbers, and each port number in the external
range is always translated to the same port number in the mapped range.
Load Balancing Dynamic, one-to-many NAT mapping: an external IP address is translated to one of the
mapped IP addresses. For each session, a load balancing algorithm dynamically selects
an IP address from the mapped IP address range to provide more even traffic distribution.
The external IP address is not always translated to the same mapped IP address.
Load Balancing with Dynamic, one-to-many NAT mapping with port forwarding: an external IP address is
Port Forwarding translated to one of the mapped IP addresses. For each session, a load balancing
algorithm dynamically selects an IP address from the mapped IP address range to provide
more even traffic distribution. The external IP address is not always translated to the same
mapped IP address.
Dynamic Virtual IPs Dynamic, many-to-few or many-to-one NAT mapping: if you set the external IP address of a
virtual IP to 0.0.0.0, the interface maps traffic destined for any IP address, and is
dynamically translated to a mapped IP address or address range.
Server Load Balancing Dynamic, one-to-many NAT mapping: an external IP address is translated to one of the
mapped IP addresses, as determined by the selected load balancing algorithm for more
even traffic distribution. The external IP address is not always translated to the same
mapped IP address.
Server load balancing requires that you configure at least one “real” server, but can use up
to eight (8) real servers per virtual IP (VIP). Real servers can be configured with health
check monitors. Health check monitors can be used to gauge server responsiveness
before forwarding packets.
Server Load Balancing Dynamic, one-to-many NAT mapping with port forwarding: an external IP address is
with Port Forwarding translated to one of the mapped IP addresses, as determined by the selected load
balancing algorithm for more even traffic distribution.The external IP address is not always
translated to the same mapped IP address.
Server load balancing requires that you configure at least one “real” server, but can use up
to eight (8) real servers per virtual IP (VIP). Real servers can be configured with health
check monitors. Health check monitors can be used to gauge server responsiveness
before forwarding packets.
Note: If the NAT check box is not selected when building the firewall policy, the resulting policy does not
perform full (source and destination) NAT; instead, it performs destination network address translation
(DNAT).
For inbound traffic, DNAT translates packets’ destination address to the mapped private IP address, but does
not translate the source address. The private network is aware of the source’s public IP address. For reply
traffic, the FortiGate unit translates packets’ private network source IP address to match the destination
address of the originating packets, which is maintained in the session table.
The following limitations apply when adding virtual IPs, Load balancing virtual servers, and load balancing
real servers. Load balancing virtual servers are actually server load balancing virtual IPs. You can add
server load balance virtual IPs from the CLI.
• Virtual IP extip entries or ranges cannot overlap with each other.
• A virtual IP mappedip cannot be 0.0.0.0 or 255.255.255.255.
• A real server IP cannot be 0.0.0.0 or 255.255.255.255.
• If a static NAT virtual IP extip is 0.0.0.0, the mappedip must be a single IP address.
• If a load balance virtual IP extip is 0.0.0.0, the mappedip can be an address range.
• When port forwarding, the count of mappedport and extport numbers must be the same. The
web-based manager does this automatically but the CLI does not.
• Virtual IP names must be different from firewall address or address group names.
Syntax
config firewall vip
edit <name_str>
set arp-reply {enable | disable}
set comment <comment_str>
set extintf <name_str>
set extip <address_ipv4>
set extport <port_int>
set gratuitous-arp-interval <interval_seconds>
set http-cookie-age <age_int>
set http-cookie-domain <domain_str>
set http-cookie-generation <generation_int>
set http-cookie-path <path_str>
set http-cookie-share {disable | same-ip}
set http-ip-header {enable | disable}
set http-multiplex {enable | disable}
set https-cookie-secure {disable | enable}
set id <id_num_str>
set ldb-method {first-alive | least-rtt | least-session | round-robin |
static | weighted}
set mappedip [<start_ipv4>-<end_ipv4>]
set mappedport <port_int>
set max-embryonic-connections <initiated_int>
set monitor <name_str>
set nat-source-vip {enable | disable}
set outlook-web-access {disable | enable}
set persistence {none | ssl-session-id | http-cookie(http)
set portforward {enable | disable}
set protocol {tcp | udp}
set server-type {http | https | ip | ssl | tcp | udp}
set ssl-mode {full | half}
set ssl-certificate <certificate_str>
set ssl-client-session-state-max <sessionstates_int>
set ssl-client-session-state-timeout <timeout_int>
set ssl-client-session-state-type {both | client | disable | time}
set ssl-dh-bits <bits_int>
set ssl-http-location-conversion {enable | disable}
set ssl-http-match-host {enable | disable}?
set ssl-max-version {ssl-3.0 | tls-1.0}
set ssl-min-version {ssl-3.0 | tls-1.0}
set ssl-send-empty-frags {enable | disable}
set ssl-server-session-state-max <sessionstates_int>
set ssl-server-session-state-timeout <timeout_int>
set ssl-server-session-state-type {both | count | disable | time}
set type {load-balance | server-load-balance | static-nat}
config realservers
edit <table_id>
set client-ip <ip_range_str>
set healthcheck {enable | disable}
set holddown-interval <seconds_int>
set ip <server_ip>
set max-connections <connection_integer>
set monitor <healthcheck_str>
set port <port_ip>
set status {active | disable | standby}
set weight <loadbalanceweight_int>
end
end
The value of the FGTServer cookie encodes the server that traffic should be directed to. The value is
encoded so as to not leak information about the internal network.
Use http-cookie-domain to restrict the domain that the cookie should apply to. For example, to restrict
the cookie to.server.com, enter:
set http-cookie-domain .server.com
Now all generated cookies will have the following form:
Set-Cookie: FGTServer=E7D01637C4B08E89A6714213A9D85D9C7E4D8158; Version=1;
Domain=.server.com; Max-Age=3600
Use http-cookie-path to limit the cookies to a particular path. For example, to limit cookies to the path
/sales, enter:
set http-cookie-path /sales
Now all generated cookies will have the following form:
Set-Cookie: FGTServer=E7D01637C4B08E89A6714213A9D85D9C7E4D8158; Version=1;
Domain=.server.com; Path=/sales; Max-Age=3600
Use http-cookie-age to change how long the browser caches the cookie. You can enter an age in
minutes or set the age to 0 to make the browser keep the cookie indefinitely:
set http-cookie-age 0
Now all generated cookies will have the following form:
Set-Cookie: FGTServer=E7D01637C4B08E89A6714213A9D85D9C7E4D8158; Version=1;
Domain=.server.com; Path=/sales
Use http-cookie-generation to invalidate all cookies that have already been generated. The exact
value of the generation is not important, only that it is different from any generation that has already been
used for cookies in this domain. The simplest approach is to increment the generation by one each time
invalidation is required. Since the default is 0, enter the following to invalidate all existing cookies:
set http-cookie-generation 1
Use http-cookie-share {disable | same-ip} to control the sharing of cookies across virtual
servers in the same virtual domain. The default setting same-ip means that any FGTServer cookie
generated by one virtual server can be used by another virtual server in the same virtual domain. For
example, if you have an application that starts on HTTP and then changes to HTTPS and you want to
make sure that the same server is used for the HTTP and HTTPS traffic then you can create two virtual
servers, one for port 80 (for HTTP) and one for port 443 (for HTTPS). As long as you add the same real
servers to both of these virtual servers (and as long as both virtual servers have the same number of real
servers with the same IP addresses), then cookies generated by accessing the HTTP server are reused
when the application changes to the HTTPS server.
If for any reason you do not want this sharing to occur then select disable to make sure that a cookie
generated for a virtual server cannot be used by other virtual servers.
Use https-cookie-secure to enable or disable using secure cookies. Secure cookies are disabled by
default because secure cookies can interfere with cookie sharing across HTTP and HTTPS virtual servers.
If enabled, then the Secure tag is added to the cookie inserted by the FortiGate unit:
Set-Cookie: FGTServer=E7D01637C4B08E89A6714213A9D85D9C7E4D8158; Version=1;
Max-Age=3600; Secure
set ip 10.10.10.3
end
end
Second, the configuration for the HTTPS virtual IP. In this configuration you don’t have to set extport to
443 because extport is automatically set to 443 when server-type is set to https.
config firewall vip
edit Https_Load_Balance
set type server-load-balance
set server-type https
set extport 443
set extintf port2
set extip 192.168.20.20
set persistence http-cookie
set http-cookie-domain .example.org
config realservers
edit 1
set ip 10.10.10.1
next
edit 2
set ip 10.10.10.2
next
edit 3
set ip 10.10.10.3
end
end
History
FortiOS v3.0 MR6 New variable max-embryonic-connections. Specifies the maximum number of
partially established SSL or HTTP connections when the virtual IP is performing HTTP
multiplexing or SSL offloading.
FortiOS v3.0 MR6 New variable http. Enables multiplexing of port forwarded HTTP connections into a few
connections to the destination.
FortiOS v3.0 MR6 New variable http-ip-header. Preserves the original client’s IP address in the X-
Forwarded-For HTTP header line when using HTTP multiplexing.
FortiOS v3.0 MR6 New variable status in config realservers subcommand. Designates each server
as an active or standby member of the server load balanced cluster, or disables the
cluster member.
FortiOS v3.0 MR6 New variable holddown-interval in config realservers subcommand.
Configures the amount of time during which a previously unresponsive server must
remain responsive in order for the FortiGate unit to resume forwarding traffic to the server.
If the server is unresponsive during this interval, the FortiGate unit continues to use a
standby server.
FortiOS v3.0 MR7 New variables comment and id, Customer requirement for unique identifier and
descriptive information relevant to virtual IP. Removed ssl-max-version/ssl-min-
version tls-1.1 option. TLS 1.1 is not supported. Added new variable nat-
source-vip.
FortiOS v4.0 New variables added: server-type, persistence, gratuitous-arp-
interval, monitor.
New variables client-ip and max-connections in config realservers
subcommand.
New variables added: http-cookie-age, http-cookie-domain, http-cookie-
generation, http-cookie-path, http-cookie-share, https-cookie-secure,
and outlook-web-access.
Renamed variable ssl to ssl-mode.
Renamed variable http to http-multiplex.
Removed variables dead-interval, ping-detect, and wake-interval in config
realservers subcommand.
FortiOS v4.0 MR1 Added more information to the definition of the first-alive option.
Related topics
• firewall policy, policy6
• firewall ldb-monitor
• firewall vipgrp
vipgrp
You can create virtual IP groups to facilitate firewall policy traffic control. For example, on the DMZ
interface, if you have two email servers that use Virtual IP mapping, you can put these two VIPs into one
VIP group and create one external-to-DMZ policy, instead of two policies, to control the traffic.
Firewall policies using VIP Groups are matched by comparing both the member VIP IP address(es) and
port number(s).
Syntax
config firewall vipgrp
edit <name_str>
set interface <name_str>
set member <virtualip_str>
end
Example
config firewall vipgrp
edit group_one
set interface internal
set member vipone viptwo vipthree
end
History
Related topics
• firewall policy, policy6
• vip
gui
This chapter covers the commands to restore web-based manager CLI console and topology viewer.
This chapter contains the following sections:
console
topology
console
Use this command to configure the web-based manager CLI console. When VDOMs are enabled, this
command is part of the global commands.
Syntax
config gui console
set preferences <filedata>
end
To obtain base-64 encoded data from a configured CLI console, use:
show gui console
Example
This example shows how to upload the data file pref-file containing commands to set up the
web-based manager CLI console on the FortiGate unit.
config gui console
set preferences pref-file
end
History
topology
Use this command to configure the web-based manager topology viewer. This command is not available
when virtual domains are enabled.
Syntax
config gui topology
set background-image <filedatabackground>
set database <filedatabase>
set preferences <filedatapref>
end
To obtain base-64 encoded data from a configured topology viewer, use:
show gui topology
Example
This example shows how to upload the data file (topguifile) containing commands to set up the topology
GUI on the FortiGate unit and the background image (backgroundfile).
config gui topology
set preferences topguifile
set background-image backgroundfile
end
History
imp2p
Use imp2p commands to configure user access to Instant Messaging and Peer-to-Peer applications, and
to configure a global policy for unknown users who might use these applications.
This chapter contains the following sections:
aim-user
icq-user
msn-user
old-version
policy
yahoo-user
aim-user
Use this command to permit or deny a specific user the use of AOL Instant Messenger.
Syntax
config imp2p aim-user
edit <name_str>
set action {deny | permit}
end
Example
This example shows how to add user_1 and permit the user to use the AIM protocol if the policy is set to
allow AOL Instant Messenger.
config imp2p aim-user
edit user_1
set action permit
end
History
Related topics
• imp2p icq-user
• imp2p msn-user
• imp2p old-version
• imp2p policy
• imp2p yahoo-user
icq-user
Use this command to permit or deny a specific user the use of ICQ Instant Messenger.
Syntax
config imp2p icq-user
edit <name_str>
set action {deny | permit}
end
Example
This example shows how to add user_1 and permit the user to use the ICQ protocol if the policy is set to
allow ICQ Instant Messenger.
config imp2p icq-user
edit user_1
set action permit
end
History
Related topics
• imp2p aim-user
• imp2p msn-user
• imp2p old-version
• imp2p policy
• imp2p yahoo-user
msn-user
Use this command to permit or deny a specific user the use of MSN Messenger.
Syntax
config imp2p msn-user
edit <name_str>
set action {deny | permit}
end
Example
This example shows how to add user_1 and permit the user to use the MSN protocol if the policy is set to
allow MSN Messenger.
config imp2p msn-user
edit user_1
set action permit
end
History
Related topics
• imp2p aim-user
• imp2p icq-user
• imp2p old-version
• imp2p policy
• imp2p yahoo-user
old-version
Some older versions of IM protocols are able to bypass file blocking because the message types are not
recognized. The following command provides the option to disable these older IM protocol versions.
Supported IM protocols include:
• MSN 6.0 and above
• ICQ 4.0 and above
• AIM 5.0 and above
• Yahoo 6.0 and above
Syntax
config imp2p old-version
set aim {best-effort | block}
set icq {best-effort | block}
set msn {best-effort | block}
set yahoo {best-effort | block}
end
Example
This example shows how to block older versions of MSN Messenger and inspect older versions of Yahoo
Messenger.
config imp2p old-version
set msn block
set yahoo best-effort
end
History
Related topics
• imp2p aim-user
• imp2p icq-user
• imp2p msn-user
• imp2p policy
• imp2p yahoo-user
policy
Use this command to create a global policy for instant messenger applications. If an unknown user
attempts to use one of the applications, the user can either be permitted use and added to a white list, or
be denied use and added to a black list.
Note: In FortiOS 4.0, the imp2p settings are now part of Application Control. When creating
a new VDOM, the default imp2p policy settings are set to allow, thereby permitting the
settings in Application Control to drive the configuration.
Syntax
config imp2p policy
set aim {allow | deny}
set icq {allow | deny}
set msn {allow | deny}
set yahoo {allow | deny}
end
Example
This example shows how to configure the IM/P2P policy to allow AOL Instant Messenger, MSN
Messenger, and Yahoo Messenger but deny ICQ Instant Messenger.
config imp2p policy
set aim allow
set msn allow
set icq deny
set yahoo allow
end
History
Related topics
• imp2p aim-user
• imp2p icq-user
• imp2p msn-user
• imp2p old-version
• imp2p yahoo-user
yahoo-user
Use this command to permit or deny a specific user the use of Yahoo Messenger.
Syntax
config imp2p yahoo-user
edit <name_str>
set action {deny | permit}
end
Example
This example shows how to add user_1 and permit the user to use the Yahoo protocol if the policy is set to
allow Yahoo Messenger.
config imp2p yahoo-user
edit user_1
set action permit
end
History
Related topics
• imp2p aim-user
• imp2p icq-user
• imp2p msn-user
• imp2p old-version
• imp2p policy
ips
Use ips commands to configure IPS sensors to define which signatures are used to examine traffic and
what actions are taken when matches are discovered. DoS sensors can also be defined to examine traffic
for anomalies
For more information about IPS see the FortiGate UTM User Guide.
This chapter contains the following sections:
DoS
custom
decoder
global
rule
sensor
Note: If the IPS test can’t find the destination MAC address, the peer interface will be used. To ensure
packets get IPS inspection, there must be a Peer Interface. Both interfaces must be in the same VDOM,
and one interface cannot be both the peer and original interface. For information on how to set the Peer
Interface see “interface” on page 448.
DoS
FortiGate Intrusion Protection uses Denial of Service (DoS) sensors to identify network traffic anomalies
that do not fit known or preset traffic patterns. Four statistical anomaly types for the TCP, UDP, and ICMP
protocols can be identified.
Flooding If the number of sessions targeting a single destination in one second is over a threshold, the
destination is experiencing flooding.
Scan If the number of sessions from a single source in one second is over a threshold, the source is
scanning.
Source session If the number of concurrent sessions from a single source is over a threshold, the source
limit session limit is reached.
Destination If the number of concurrent sessions to a single destination is over a threshold, the destination
session limit session limit is reached.
Enable or disable logging for each anomaly, and select the action taken in response to detecting an
anomaly. Configure the anomaly thresholds to detect traffic patterns that could represent an attack.
Note: It is important to estimate the normal and expected traffic on the network before changing the default
anomaly thresholds. Setting the thresholds too low could cause false positives, and setting the thresholds too
high could allow some attacks.
The list of anomalies can be updated only when the FortiGate firmware image is upgraded.
config limit
Access the config limit subcommand using the config ips anomaly <name_str> command.
Use this command for session control based on source and destination network address. This command is
available for tcp_src_session, tcp_dst_session, icmp_src_session, icmp_dst_session,
udp_src_session, udp_dst_session.
The default entry cannot be edited. Addresses are matched from more specific to more general. For
example, if thresholds are defined for 192.168.100.0/24 and 192.168.0.0/16, the address with the 24 bit
netmask is matched before the entry with the 16 bit netmask.
Syntax
config ips DoS
edit <sensor_str>
set comment <comment_str>
config anomaly
edit <anomaly_str>
set status {enable | disable}
set log {enable | disable}
set action {block | pass}
set quarantine {attacker | both | interface | none}
set threshold <threshold_int>
end
end
Examples
This example shows how to create a DoS sensor and enable blocking of the udp_flood anomaly with the
default threshold.
config ips DoS
edit test
set comment "This is for test"
config anomaly
edit udp_flood
set action block
set status enable
end
end
History
Related topics
• ips custom
• ips global
• ips fail-open {enable | disable}
custom
Create custom IPS signatures and add them to IPS sensors.
Custom signatures provide the power and flexibility to customize FortiGate Intrusion Protection for diverse
network environments. The FortiGate predefined signatures cover common attacks. If an unusual or
specialized application or an uncommon platform is being used, add custom signatures based on the
security alerts released by the application and platform vendors.
Use custom signatures to block or allow specific traffic.
The custom signature settings are configured when it is defined as a signature override in an IPS sensor.
This way, a single custom signature can be used in multiple sensors with different settings in each. See
“ips sensor” on page 228 for details.
For more information on custom signature syntax see the FortiGate IPS Custom Signatures Technical
Bulletin.
Note: Custom signatures are an advanced feature. This document assumes the user has previous experience
writing intrusion detection signatures.
Syntax
config ips custom
edit <sig_str>
set signature <signature_str>
end
Example
This example shows how to add a custom signature.
config ips custom
edit bad_things
set signature 'F-SBID (--protocol tcp; --flow bi_direction;
--pattern "bad things"; --no_case)'
end
History
Related topics
• ips global
• execute backup
• execute restore
• ips fail-open {enable | disable}
decoder
The Intrusion Protection system looks for certain types of traffic on specific ports. Using the decoders
command, you can change ports if your configuration uses non-standard ports.
Syntax
config ips decoder <decoder_str>
set port_list <port_int>
end
Example
This example shows how to modify the dns_decoder to examine ports 1, 2, and 3 instead of the default 53.
config ips decoder dns_decoder
set port_list "1,2,3"
end
global
Use this command to ignore sessions after a set amount of traffic has passed.
Syntax
config ips global
set algorithm {engine-pick | high | low}
set anomaly-mode {continuous | periodical}
set engine-count <integer>
set fail-open {enable | disable}
set ignore-session-bytes <byte_integer>
set session-limit-mode {accurate | heuristic}
set socket-size <ips_buffer_size>
set traffic-submit {enable | disable}
end
Examples
This example shows how to set intrusion protection to ignore sessions after 204800 bytes.
config ips global
set ignore-session-bytes 204800
end
This example shows how to see the current configuration of ips global.
# get ips global
anomaly-mode : continuous
engine-count : 0
fail-open : enable
ignore-session-bytes: 204800
session-limit-mode : heuristic
socket-size : 8 (MB)
traffic-submit : disable
History
Related topics
• execute backup
• execute restore
• ips fail-open {enable | disable}
rule
The IPS sensors use signatures to detect attacks. These signatures can be listed with the rules command.
Details about the default settings of each signature can also be displayed.
Syntax
config ips rule <rule_str>
get
Example
This example shows how to display the current configuration of the Apache.Long.Header.DoS signature.
# config ips rule Apache.Long.Header.DoS
(Apache.Long.He~d) # get
name : Apache.Long.Header.DoS
status : enable
log : enable
log-packet : disable
action : pass
group : web_server
severity : medium
location : server
os : Windows, Linux, BSD, Solaris
application : Apache
service : TCP, HTTP
rule-id : 11206
rev : 2.335
sensor
The IPS sensors use signatures to detect attacks. IPS sensors are made up of filters and override rules.
Each filter specifies a number of signature attributes and all signatures matching all the specified attributes
are included in the filter. Override rules allow you to override the settings of individual signatures.
Syntax
config ips sensor
edit <sensor_str>
get
config filter
edit <filter_str>
set location {all | client | server}
set severity {all | info low medium high critical}
set protocol <protocol_str>
set os {all | other windows linux bsd solaris macos}
set application <app_str>
set status {default | enable | disable}
set log {default | enable | disable}
set action {block | default | pass | reject}
set quarantine {attacker | both | interface | none}
get
end
config override
edit <override_int>
config exempt-ip
edit <exempt_int>
set dst-ip <dest_ipv4mask>
set src-ip <source_ipv4mask>
end
set action {block | pass | reset}
set log {disable | enable}
set log-packet {disable | enable}
set quarantine {attacker | both | interface | none}
set status {disable | enable}
end
set comment <comment_str>
end
Example
This example shows how to create an IPS sensor containing a filter that includes all signatures to protect
against Windows server attacks.
config ips sensor
edit dept_srv
set comment "Department file servers"
config filter
edit win_srv
set location server
set os windows
set action block
end
end
History
FortiOS v3.0 MR6 New.
FortiOS v4.0 Added the quarantine option.
log
Use the config log commands to set the logging type, the logging severity level, and the logging
location for the FortiGate unit.
Note: In Transparent mode, certain log settings and options may not be available because certain features do
not support logging or are not available in this mode. For example, SSL VPN events are not available in
Transparent mode.
custom-field
Use the following command to customize the log fields with a name and/or value. The custom name and/or
value will appear in the log message.
Syntax
config log custom-field
edit id <integer>
set name <name>
set value <integer>
end
Example
This example shows how to configure a customized field for logs for branch offices in a company and are
associated with specific firewall policies.
config log custom-field
edit 1
set name company_branch1
set value 2
next
edit 2
set name company_branch2
set value 4
next
edit 3
set name company_branch3
set value 5
end
History
Related topics
• {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 | webtrends
| fortiguard} filter
Syntax
config log {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 |memory |
syslogd | syslogd2 | syslogd3 | webtrends | fortiguard} filter
set admin {disable | enable}
set allowed {disable | enable}
set anomaly {disable | enable}
set app-crtl {disable | enable}
set app-crtl-all {disable | enable}
set attack {disable | enable}
set auth {disable | enable}
set amc-intf-bypass {disable | enable}
set blocked {disable | enable}
set dlp {disable | enable}
set dlp-all {disable | enable}
set cpu-memory-usage {disable | enable}
set dhcp {disable | enable}
set email {disable | enable}
set email-log-imap {disable | enable}
set email-log-pop3 {disable | enable}
set email-log-smtp {disable | enable}
set event {disable | enable}
set ftgd-wf-block {disable | enable}
set ftgd-wf-errors {disable | enable}
set ha {disable | enable}
set infected {disable | enable}
set ipsec {disable | enable}
set ldb-monitor {disable | enable}
set other-traffic {disable | enable}
set oversized {disable | enable}
set pattern {disable | enable}
set ppp {disable | enable}
set scanerror {disable | enable}
set severity {alert | critical | debug | emergency | error | information |
notification | warning}
set signature {disable | enable}
set sslvpn-log-adm {disable | enable}
set sslvpn-log-auth {disable | enable}
set sslvpn-log-session {disable | enable}
set system {disable | enable}
set traffic {disable | enable}
set url-filter {disable | enable}
set violation {disable | enable}
set virus {disable | enable}
Example
This example shows how to set the logging severity level to warning, enable virus logging for infected files,
and enable event logging for anomaly and IPSec events.
config log disk filter
set severity warning
set virus enable
set infected enable
set event enable
set anomaly enable
set ipsec enable
end
History
Related topics
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• log memory setting
• log {syslogd | syslogd2 | syslogd3} setting
• log webtrends setting
• log trafficfilter
• firewall
disk setting
Use this command to configure log settings for logging to the local disk. Disk logging is only available for
FortiGate units with an internal hard disk. You can also use this command to configure the FortiGate unit to
upload current log files to an FTP server every time the log files are rolled.
If you have an AMC disk installed on your FortiGate unit, you can use disk setting to configure logging
of traffic to the AMC disk. The AMC disk behaves as a local disk after being inserted into the FortiGate unit
and the FortiGate unit rebooted. You can view logs from Log&Report > Log Access > Disk when logging to
an AMC disk.
You can also use this command to enable SQL logs for different log types. SQL logs are stored in an
SQLlite database format. The main advantage of SQL log format is that it supports enhanced reports. For
information about the report commands, see “report” on page 257:
Note: AMC disk is supported on all FortiGate units that have single-width AMC slots.
Syntax
config log disk setting
set status {enable | disable}
set max-log-file-size <integer max>
set roll-schedule {daily | weekly}
set roll-time <hh:mm>
set diskfull {nolog | overwrite}
set sql-max-size <lsize>
set sql-max-size-action {overwrite | nolog}
set sql-oldest-entry <days>
set upload {enable | disable}
set upload-destination {fortianalyzer | ftp-server}
set uploadip <class_ip>
set uploadport <port_integer>
set uploaduser <user_str>
set uploadpass <passwd>
set uploaddir <dir_name_str>
set uploadtype {attack event im spamfilter traffic virus voip webfilter}
set uploadzip {disable | enable}
set uploadsched {disable | enable}
set uploadtime <time_integer>
set upload-delete-files {enable | disable}
set full-first-warning threshold
set full-second-warning threshold
set full-final-warning threshold
set drive-standby-time <0-19800>
config sql-logging
set app-ctr {disable | enable}
set attack {disable | enable}
set dlp {disable | enable}
set event {disable | enable}
set spam {disable | enable}
set traffic {disable | enable}
set virus {disable | enable}
set webfilter {disable | enable}
end
end
Example
This example shows how to enable logging to the local disk, set the action to stop logging when the disk is
full, log files have a maximum size of 300MB, roll log files daily and start a new one at 1:30pm every day.
config log disk setting
set status enable
set diskfull nolog
set max-log-file-size 300
History
Related topics
• log {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 |
webtrends | fortiguard} filter
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• log memory setting
• log {syslogd | syslogd2 | syslogd3} setting
• log trafficfilter
• log webtrends setting
History
Related topics
• {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 | webtrends
| fortiguard} filter
fortianalyzer override-setting
Use this command within a VDOM to override the global configuration created with the config log
fortianalyzer setting command. These settings configure the connection to the FortiAnalyzer unit.
For syntax and descriptions, see “{fortianalyzer | fortianalyzer2 | fortianalyzer3} setting” on page 246.
History
Related topics
• {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
Syntax
config log {fortianalyzer |fortianalyzer2 | fortianalyzer3} setting
set address-mode {auto-discovery | static}
set conn-timeout <seconds>
set encrypt {enable | disable}
set fdp-device <serial_number>
set localid <identifier>
set max-buffer-size <size_int>
set psksecret <pre-shared_key>
set server <fortianalyzer_ipv4>
set status {enable | disable}
end
Example
This example shows how to enable logging to a second FortiAnalyzer unit with IP address 192.168.20.10.
config log fortianalyzer2 setting
set status enable
set server 192.168.20.10
end
History
Related topics
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• log {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 |
webtrends | fortiguard} filter
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• log memory setting
• log {syslogd | syslogd2 | syslogd3} setting
• log webtrends setting
• log trafficfilter
fortiguard setting
Use this command for configuring FortiGuard Analysis Service settings. For more information about
logging to a FortiGuard Analysis server, (including the subscription-based service), FortiGuard Analysis
and Management Service, see the FortiGate Administration Guide Service, including enabling logging to a
FortiGuard Analysis server.
Note: The fortiguard setting command is only available when FortiGuard Analysis and
Management Service subscription-based services are enabled. The storage space is a specified amount,
and varies, depending on the services requested.
Syntax
config log fortiguard setting
set quotafull {nolog | overwrite}
set status {disable | enable}
end
Example
In this example, the FortiGate unit is logging to a FortiGuard Analysis server, and will stop logging when
the maximum storage space on the server is reached.
config log fortiguard setting
set quotafull nolog
set status enable
end
History
FortiOS v3.0 MR4 New.
Related topics
• {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 | webtrends
| fortiguard} filter
memory setting
Use this command to configure log settings for logging to the FortiGate system memory.
The FortiGate system memory has a limited capacity and only displays the most recent log entries. Traffic
logs are not stored in the memory buffer, due to the high volume of traffic information. After all available
memory is used, by default, the FortiGate unit begins to overwrite the oldest messages. All log entries are
deleted when the FortiGate unit restarts.
Syntax
config log memory setting
set diskfull {overwrite}
set status {disable | enable}
end
Example
This example shows how to enable logging to the FortiGate system memory.
config log memory setting
set status enable
set diskfull overwrite
end
History
Related topics
• log {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 |
webtrends | fortiguard} filter
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• log {syslogd | syslogd2 | syslogd3} setting
• log webtrends setting
• log trafficfilter
• memory global-setting
memory global-setting
Use this command to configure log threshold warnings, as well as the maximum buffer lines, for the
FortiGate system memory.
The FortiGate system memory has a limited capacity and displays only the most recent log entries. Traffic
logs are not stored in the memory buffer, due to the high volume of traffic information. After all available
memory is used, by default, the FortiGate unit begins to overwrite the oldest log messages. All log entries
are deleted when the FortiGate unit restarts.
Syntax
config log memory global-setting
set full-final-warning-threshold
set full-first-warning-threshold
set full-second-warning-threshold
set max-size <int>
end
Example
This example shows how to configure the first, second, and final threshold warnings as well as the
maximum lines for the memory buffer log.
config log memory global setting
set first-full-warning-threshold 40
set second-full-warning-threshold 60
set final-full-warning-threshold 80
set max-size 98304
end
History
Related topics
• log {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 |
webtrends | fortiguard} filter
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• log {syslogd | syslogd2 | syslogd3} setting
• log webtrends setting
• log trafficfilter
• memory setting
syslogd override-setting
Use this command within a VDOM to override the global configuration created with the config log
syslogd setting command. These settings configure the connection to a syslog server. For syntax
and descriptions, see “{syslogd | syslogd2 | syslogd3} setting” on page 252.
History
Related topics
• {syslogd | syslogd2 | syslogd3} setting
Note: Syslog CLI commands are not cumulative. Using a syntax similar to the following is not valid:
config log syslogd syslogd2 syslogd3 setting
Syntax
config log {syslogd | syslogd2 | syslogd3} setting
set csv {disable | enable}
set facility {alert | audit | auth | authpriv | clock | cron | daemon | ftp
| kernel | local0 | local1 | local2 | local3 | local4 | local5 | local6
| local7 | lpr | mail | news | ntp | syslog | user | uucp}
set port <port_integer>
set reliable {disable | enable}
set server <address_ipv4>
set status {disable | enable}
end
Example
This example shows how to enable logging to a remote syslog server, configure an IP address and port for
the server, and enable logging in CSV format.
config log syslogd setting
set status enable
set server 192.168.201.199
set port 601
set csv enable
end
History
Related topics
• log {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 |
webtrends | fortiguard} filter
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• log memory setting
• log webtrends setting
• log trafficfilter
webtrends setting
Use this command to configure log settings for logging to a remote computer running a NetIQ WebTrends
firewall reporting server.
FortiGate log formats comply with WebTrends Enhanced Log Format (WELF) and are compatible with
NetIQ WebTrends Security Reporting Center and Firewall Suite 4.1.
Syntax
config log webtrends setting
set server <address_ipv4>
set status {disable | enable}
end
Example
This example shows how to enable logging to and set an IP address for a remote WebTrends server.
config log webtrends setting
set status enable
set server 192.168.21.155
end
History
Related topics
• log {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 |
webtrends | fortiguard} filter
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• log memory setting
• log {syslogd | syslogd2 | syslogd3} setting
• log trafficfilter
trafficfilter
Use this command to configure the following global settings for traffic logging:
• resolve IP addresses to host names
• display the port number or service (protocol) in the log message
Syntax
config log trafficfilter
set display {name | port}
set resolve {disable | enable}
end
Example
This example shows how to display the service name and enable resolving IP addresses to host names in
log messages.
config log trafficfilter
set display name
set resolve enable
end
History
Related topics
• log {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 |
webtrends | fortiguard} filter
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• log memory setting
• log {syslogd | syslogd2 | syslogd3} setting
• log webtrends setting
report
Use the config report commands to configure executive summary SQL widgets. Using these
commands you can edit existing widgets and create new widgets.
All of these widgets are available from the FortiGate web-based manager by going to Log&Report > Report
Access > Executive Summary. Select Add Widget to add widgets to the Executive Summary. Three report
commands are available:
• Use the config report dataset command to configure datasets. A dataset consists of SQL
statements that query the SQL log database and gather data. The SQL statement must include
references to the SQL database containing the log message data. For information about the SQL
database format, see “SQL reports database schema” on page 268.
• Use the config report chart command to configure charts that can be added to the Executive
Summary. A chart, called a Widget when you add it to the Executive Summary page, includes a dataset
that queries the SQL database and settings that configure l how the data gathered by the dataset is
displayed by the widget. For example, you can use the config report chart command to set the
title, the graph type, and the scale and appearance of the x and y axis of the widget.
• Use the config report summary command to add widgets to the Executive Summary and to
configure the schedule for how often the data displayed by the widget is refreshed. This data is
refreshed by running the SQL query in the widget.
chart Example SQL report configurations
dataset SQL reports database schema
summary
chart
Use the following command to configure a chart or widget. You can edit the settings of existing widgets or
you can add new widgets. To add a new widget you need to have a dataset for it as well as a title. You can
also configure the widget to be a graph in various formats or a table and you can also optionally configure
details about the appearance of the graph or table.
As you change chart format settings you can go to the Executive Summary page of the web-based
manager and view the chart. Refresh your browser to see format changes. You must use the end
command to exit from the config report chart command to view your changes in the widget.
Tip: Charts are called widgets in the Executive Summary on the web-based manager. In the web-based
manager each widget has a name which is set using the comments field of the config report chart
command. When you edit a chart you specify a chart name that is only used in the CLI. To determine the
widget name of a chart you must edit it and view the comments setting.
Syntax
Note: Due to the complexity and duplication in the chart command, the set commands
are listed in simple alphabetical order.
History
FortiOS v4.0 MR1 New.
Related topics
• dataset
• summary
dataset
Use the following command to configure report data sets. You can configure existing data sets or add new
ones.
Note: Expert knowledge of SQL is required to write and edit data set queries.
Syntax
config report dataset
edit <report_dataset>
set query <SQL_statement>
config field
edit <field-id>
set displayname <string>
set type {text | integer | date | ip}
next
end
end
History
Related topics
• chart
• summary
summary
Use this command to add widgets (also called charts) to the Executive Summary and to configure the
schedule for updating the data displayed by the widget. The data is updated by executing the SQL query in
the widget and refreshing the information displayed in the widget.
Syntax
config report summary
edit id <integer>
set column {1 | 2}
set day {sunday | monday | tuesday | wednesday | thursday | friday |
saturday}
set schedule {daily | weekly}
set time <hh:mm>
set widget <widget_name>
end
History
Related topics
• chart
• summary
end
next
end
end
config report chart
edit "attackcount-per-hour-last24h"
set comments "stacked bar"
set dataset "attackcount-per-hour-last24h"
set graph-type bar
config x-series
set databind "field(1)"
set is-category no
set scale-format HH:MM
set scale-number-of-step 24
set scale-step 1
set scale-unit hour
end
config y-series
set databind "field(3)"
set group "field(2)"
end
set title "Per Hour Attack Summary"
next
edit "top-app-last24h"
set dataset "top-app-last24h"
set graph-type bar
config x-series
set databind "field(1)"
end
config y-series
set databind "field(2)"
end
set title "Top 20 Application"
next
edit "latest-attack-last24h"
set type table
set dataset "latest-attack-last24h"
config column
edit 1
set detail-value "attack_id2name(field(1))"
set header-value "Attack ID"
next
edit 2
set detail-value "ctime(\'YYYY/MM/DD HH:MM\', field(2))"
set header-value "Timestamp"
next
edit 3
set detail-value "field(4)"
set header-value "Source"
next
edit 4
set detail-value "field(5)"
set header-value "Destination"
next
edit 5
set detail-value "field(3)"
set header-value "Severity"
next
end
end
Event Log
CREATE TABLE event_log
(
"oid" INTEGER PRIMARY KEY AUTOINCREMENT,
"timestamp" INTEGER,
"log_id" INTEGER,
"subtype" TEXT,
"pri" TEXT,
"extra" TEXT,
"user" TEXT,
"ui" TEXT,
"action" TEXT,
"status" TEXT,
"reason" TEXT,
"cpu" INTEGER,
"mem" INTEGER,
"total_session" INTEGER,
"obj" TEXT,
"entry" TEXT,
"field" TEXT,
"old_value" TEXT,
"new_value" TEXT,
"acct_stat" TEXT,
"count" INTEGER,
"duration" TEXT,
"carrier_ep" TEXT,
"from" TEXT,
"ip" TEXT,
"nf_type" TEXT,
"profile" TEXT,
"proto" INTEGER,
"service" TEXT,
"to" TEXT,
"tunnel_id" INTEGER,
"tunnel" TEXT,
"tunnel_type" TEXT,
"tunnel_action" TEXT,
"remote_ip" TEXT,
"tunnel_ip" TEXT,
"vpn_user" TEXT,
"vpn_usergroup" TEXT,
"xauth_user" TEXT,
"xauth_group" TEXT,
"dst_host" TEXT,
"next_stats" INTEGER,
"vpn_duration" INTEGER,
"sent" INTEGER,
"rcvd" INTEGER,
"vpn_reason" TEXT,
"alert" TEXT,
"desc" TEXT,
"app_type" TEXT,
"msg" TEXT,
"ha_role" TEXT,
"vcluster_state" TEXT,
"hbdn_reason" TEXT,
"ha_group" INTEGER,
"vcluster" INTEGER,
"from_vcluster" INTEGER,
"to_vcluster" INTEGER,
"vcluster_member" INTEGER,
"vdname" TEXT,
"devintfname" TEXT,
"hostname" TEXT,
"sn" TEXT
)
Traffic log
CREATE TABLE traffic_log
(
"oid" INTEGER PRIMARY KEY AUTOINCREMENT,
"timestamp" INTEGER,
"log_id" INTEGER,
"subtype" TEXT,
"pri" TEXT,
"dir_disp" TEXT,
"tran_disp" TEXT,
"src" TEXT,
"srcname" TEXT,
"src_port" INTEGER,
"dst" TEXT,
"dstname" TEXT,
"dst_port" INTEGER,
"tran_ip" TEXT,
"tran_port" INTEGER,
"service" TEXT,
"proto" INTEGER,
"app_type" TEXT,
"duration" INTEGER,
"rule" INTEGER,
"policyid" INTEGER,
"sent" INTEGER,
"rcvd" INTEGER,
"sent_pkt" INTEGER,
"rcvd_pkt" INTEGER,
"vpn" TEXT,
"src_int" TEXT,
"dst_int" TEXT,
"SN" INTEGER,
"status" TEXT,
"user" TEXT,
"group" TEXT,
"carrier_ep" TEXT,
"wanopt_app_type" TEXT,
"wan_in" INTEGER,
"wan_out" INTEGER,
"lan_in" INTEGER,
"lan_out" INTEGER
)
Attack log
CREATE TABLE attack_log
(
"oid" INTEGER PRIMARY KEY AUTOINCREMENT,
"timestamp" INTEGER,
"log_id" INTEGER,
"subtype" TEXT,
"pri" TEXT,
"policyid" INTEGER,
"serial" INTEGER,
"attack_id" INTEGER,
"severity" TEXT,
"carrier_ep" TEXT,
"profile" TEXT,
"sensor" TEXT,
"src" TEXT,
"dst" TEXT,
"src_port" INTEGER,
"icmp_id" TEXT,
"dst_port" INTEGER,
"icmp_type" TEXT,
"icmp_code" TEXT,
"src_int" TEXT,
"dst_int" TEXT,
"status" TEXT,
"proto" INTEGER,
"service" TEXT,
"user" TEXT,
"group" TEXT,
"ref" TEXT,
"count" INTEGER,
"incident_serialno" INTEGER,
"msg" TEXT
)
Antivirus log
CREATE TABLE antivirus_log
(
"oid" INTEGER PRIMARY KEY AUTOINCREMENT,
"timestamp" INTEGER,
"log_id" INTEGER,
"subtype" TEXT,
"pri" TEXT,
"msg" TEXT,
"status" TEXT,
"service" TEXT,
"src" TEXT,
"dst" TEXT,
"sport" INTEGER,
"dport" INTEGER,
"src_int" TEXT,
"dst_int" TEXT,
"policyid" INTEGER,
"serial" INTEGER,
"dir" TEXT,
"filefilter" TEXT,
"filetype" TEXT,
"file" TEXT,
"checksum" TEXT,
"quarskip" TEXT,
"virus" TEXT,
"ref" TEXT,
"url" TEXT,
"endpoint" TEXT,
"profile" TEXT,
"user" TEXT,
"group" TEXT,
"agent" TEXT,
"from" TEXT,
"to" TEXT,
"command" TEXT,
"dtype" TEXT
)
"src_int" TEXT,
"dst" TEXT,
"dport" INTEGER,
"dst_int" TEXT,
"service" TEXT,
"hostname" TEXT,
"carrier_ep" TEXT,
"profile" TEXT,
"status" TEXT,
"req_type" TEXT,
"url" TEXT,
"msg" TEXT,
"dir" TEXT,
"agent" TEXT,
"from" TEXT,
"to" TEXT,
"banword" TEXT,
"error" TEXT,
"method" TEXT,
"class" INTEGER,
"class_desc" TEXT,
"cat" INTEGER,
"cat_desc" TEXT,
"mode" TEXT,
"rule_type" TEXT,
"rule_data" TEXT,
"ovrd_tbl" TEXT,
"ovrd_id" INTEGER,
"count" INTEGER,
"url_type" TEXT
)
"status" TEXT,
"from" TEXT,
"to" TEXT,
"banword" TEXT,
"tracker" TEXT,
"dir" TEXT,
"agent" TEXT,
"msg" TEXT
)
DLP log
CREATE TABLE dlp_log
(
"oid" INTEGER PRIMARY KEY AUTOINCREMENT,
"timestamp" INTEGER,
"log_id" INTEGER,
"subtype" TEXT,
"pri" TEXT,
"policyid" INTEGER,
"serial" INTEGER,
"user" TEXT,
"group" TEXT,
"src" TEXT,
"sport" INTEGER,
"src_int" TEXT,
"dst" TEXT,
"dport" INTEGER,
"dst_int" TEXT,
"service" TEXT,
"status" TEXT,
"hostname" TEXT,
"url" TEXT,
"from" TEXT,
"to" TEXT,
"msg" TEXT,
"rulename" TEXT,
"compoundname" TEXT,
"action" TEXT,
"severity" INTEGER
)
"profile" TEXT,
"dir" TEXT,
"src" TEXT,
"src_port" INTEGER,
"src_int" TEXT,
"dst" TEXT,
"dst_port" INTEGER,
"dst_int" TEXT,
"src_name" TEXT,
"dst_name" TEXT,
"proto" INTEGER,
"service" TEXT,
"policyid" INTEGER,
"serial" INTEGER,
"app_list" TEXT,
"app_type" TEXT,
"app" TEXT,
"action" TEXT,
"status" TEXT,
"count" INTEGER,
"filename" TEXT,
"filesize" INTEGER,
"message" TEXT,
"content" TEXT,
"reason" TEXT,
"req" TEXT,
"phone" TEXT,
"msg" TEXT
)
router
Routers move packets from one network segment to another towards a network destination. When a
packet reaches a router, the router uses data in the packet header to look up a suitable route on which to
forward the packet to the next segment. The information that a router uses to make routing decisions is
stored in a routing table. Other factors related to the availability of routes and the status of the network may
influence the route selection that a router makes when forwarding a packet to the next segment.
The FortiGate unit supports many advanced routing functions and is compatible with industry standard
Internet routers. The FortiGate unit can communicate with other routers to determine the best route for a
packet.
The following router commands are available to configure options related to FortiGate unit router
communications and packet forwarding:
access-list, access-list6 key-chain rip
aspath-list multicast ripng
auth-path ospf route-map
bgp ospf6 setting
community-list policy static
prefix-list, prefix-list6 static6
access-list, access-list6
Use this command to add, edit, or delete access lists. Access lists are filters used by FortiGate unit routing
processes. For an access list to take effect, it must be called by a FortiGate unit routing process (for
example, a process that supports RIP or OSPF). Use access-list6 for IPv6 routing.
Each rule in an access list consists of a prefix (IP address and netmask), the action to take for this prefix
(permit or deny), and whether to match the prefix exactly or to match the prefix and any more specific
prefix.
Note: If you are setting a prefix of 128.0.0.0, use the format 128.0.0.0/1. The default route, 0.0.0.0/0 can
not be exactly matched with an access-list. A prefix-list must be used for this purpose. For more
information, see “prefix-list, prefix-list6” on page 337.
The FortiGate unit attempts to match a packet against the rules in an access list starting at the top of the
list. If it finds a match for the prefix, it takes the action specified for that prefix. If no match is found the
default action is deny.
Syntax
config router access-list, access-list6
edit <access_list_name>
set comments <string>
config rule
edit <access_list_id>
set action {deny | permit}
set exact-match {enable | disable}
set prefix { <prefix_ipv4mask> | any }
set prefix6 { <prefix_ipv6mask> | any }
set wildcard <address_ipv4> <wildcard_mask>
end
end
Note: The action and prefix fields are required. The exact-match field is optional.
Example
This example shows how to add an access list named acc_list1 with two rules. The first rule denies the
subnet that exactly matches the prefix 192.168.50.0 255.255.255.0 and permits all other subnets
that match the prefix 192.168.0.0 255.255.0.0.
config router access-list
edit acc_list1
config rule
edit 1
set prefix 192.168.50.0 255.255.255.0
set action deny
set exact-match enable
next
edit 2
set prefix 192.168.0.0 255.255.0.0
set action permit
set exact-match disable
end
end
When using IPv6 addresses, there is no space between the address and the netmask. The same example
using IPv6 addresses would be:
config router access-list6
edit acc_list_ip6_1
config rule
edit 1
set prefix6 2002:C0A8:3200:0:0:0:0:0/28
set action deny
set exact-match enable
next
edit 2
set prefix6 2002:C0A8:0:0:0:0:0:0/28
set action permit
set exact-match disable
end
end
The next example shows how to add an access list that permits all subnets matching network address
10.20.4.1 through 10.20.4.255 (addresses 10.20.4.x are processed):
config router access-list
edit acc_list2
config rule
edit 1
set action permit
set wildcard 10.20.4.0 0.0.0.255
end
end
The next example shows how to add an access list that permits “odd” subnets according to the third-octet
of network address 172.16.x.0 (networks 172.16.1.0, 172.16.3.0, 172.16.5.0, and so on are processed):
config router access-list
edit acc_list3
config rule
edit 1
set action permit
set wildcard 172.16.1.0 0.0.254.0
end
end
History
Related topics
• router ospf
• router prefix-list, prefix-list6
• router rip
aspath-list
Use this command to set or unset BGP AS-path list parameters. By default, BGP uses an ordered list of
Autonomous System (AS) numbers to describe the route that a packet takes to reach its destination. A list
of these AS numbers is called the AS path. You can filter BGP routes using AS path lists.
When the FortiGate unit receives routing updates from other autonomous systems, it can perform
operations on updates from neighbors and choose the shortest path to a destination. The shortest path is
determined by counting the AS numbers in the AS path. The path that has the least AS numbers is
considered the shortest AS path.
Use the config router aspath-list command to define an access list that examines the AS_PATH
attributes of BGP routes to match routes. Each entry in the AS-path list defines a rule for matching and
selecting routes based on the setting of the AS_PATH attribute. The default rule in an AS path list (which
the FortiGate unit applies last) denies the matching of all routes.
Syntax
config router aspath-list
edit <aspath_list_name>
config rule
edit <as_rule_id>
set action {deny | permit}
set regexp <regexp_str>
end
end
Example
This example shows how to create an AS-path list named ebgp_in that allows AS_PATHs from a
group of 4 systems. The list contains a single rule that permits operations on BGP routes whose
AS_PATH attribute references an AS number of 333, 334, 338, or 71. The AS path list will match routes
that originate in AS 333, AS 334, AS 338, or AS 71.
config router aspath-list
edit ebgp_in
config rule
edit 1
set action permit
set regexp _(333|334|338|71)$
end
end
History
Related topics
• router bgp
• router community-list
• Using route maps with BGP
• router key-chain
auth-path
Authentication based routing allows firewall policies to direct network traffic flows.
This command configures a RADIUS object on your FortiGate unit. The same object is required to be
configured on the RADIUS server.
Note: The auth-path command is not available when the FortiGate unit is in Transparent mode.
Syntax
config router auth-path
edit <aspath_list_name>
set device <interface>
set gateway <gway_ipv4>
end
Example
This example shows how to configure an auth-path object called auth_route that routes traffic over the
dmz interface using 172.20.120.4. These settings also need to be configured on the RADIUS server used
to authenticate.
config router auth-path
edit auth_route
set device dmz
set gateway 172.20.120.4
next
end
History
Related topics
• user local
• user radius
• firewall policy, policy6
bgp
Use this command to set or unset BGP-4 routing parameters. BGP can be used to perform Classless
Interdomain Routing (CIDR) and to route traffic between different autonomous systems or domains using
an alternative route if a link between a FortiGate unit and a BGP peer (such as an ISP router) fails. FortiOS
BGP4 complies with RFC 1771 and supports IPv4 addressing.
FortiOS supports IPv6 over BGP4 via the BGP4+ protocol defined in RFC 2545, and RFC 2858. IPv6
configuration for BGP is accomplished with the aggregate-address6, network6, and
redistribute6 variables. Also almost every variable in config neighbour has an IPv4 and IPv6
version such as activate and activate6. Any variable ending with a “6” is an IPv6 variable.
When BGP is enabled, the FortiGate unit sends routing table updates to the upstream ISP router
whenever any part of the routing table changes. The update advertises which routes can be used to reach
the FortiGate unit. In this way, routes are made known from the border of the internal network outwards
(routes are pushed forward) instead of relying on upstream routers to propagate alternative paths to the
FortiGate unit.
FortiGate unit BGP supports the following extensions to help manage large numbers of BGP peers:
• Communities — The FortiGate unit can set the COMMUNITY attribute of a route to assign the route to
predefined paths (see RFC 1997). The FortiGate unit can examine the COMMUNITY attribute of
learned routes to perform local filtering and/or redistribution.
• Internal BGP (IBGP) route reflectors — The FortiGate unit can operate as a route reflector or participate
as a client in a cluster of IBGP peers (see RFC 1966).
• External BGP (EBGP) confederations — The FortiGate unit can operate as a confederation member,
using its AS confederation identifier in all transactions with peers that are not members of its
confederation (see RFC 3065).
Bi-directional Forwarding Detection (BFD) is a protocol used by BGP, and OSPF. It is used to quickly locate
hardware failures in the network. Routers running BFD send unicast messages to each other, and if a timer
runs out, meaning no messages have been received, on a connection then that unresponsive router is
declared down. BFD then communicates this information to the routing protocol and the routing information
is updated. BFD support can only be configured through the CLI.
Syntax
config router bgp
set always-compare-med {enable | disable}
set as <local_as_id>
set bestpath-as-path-ignore {enable | disable}
set bestpath-cmp-confed-aspath {enable | disable}
set bestpath-cmp-routerid {enable | disable}
set bestpath-med-confed {enable | disable}
set bestpath-med-missing-as-worst {enable | disable}
set client-to-client-reflection {enable | disable}
set cluster-id <address_ipv4>
set confederation-identifier <peerid_integer>
set dampening {enable | disable}
set dampening-max-suppress-time <minutes_integer>
set dampening-reachability-half-life <minutes_integer>
set dampening-reuse <reuse_integer>
set dampening-route-map <routemap-name_str>
set dampening-suppress <limit_integer>
set dampening-unreachability-half-life <minutes_integer>
set default-local-preference <preference_integer>
set deterministic-med {enable | disable}
Note: In the following table, the as and router-id fields are required. All other fields are optional.
cluster-id <address_ipv4> Set the identifier of the route-reflector in the cluster ID to which 0.0.0.0
the FortiGate unit belongs. If 0 is specified, the FortiGate unit
operates as the route reflector and its router-id value is used
as the cluster-id value. If the FortiGate unit identifies its own
cluster ID in the CLUSTER_LIST attribute of a received route,
the route is ignored to prevent looping.
confederation-identifier Set the identifier of the confederation to which the FortiGate unit 0
<peerid_integer> belongs. The range is from 1 to 65 535.
dampening {enable | Enable or disable route-flap dampening on all BGP routes. See disable
disable} RFC 2439. (A flapping route is unstable and continually
transitions down and up.) If you set dampening, you may
optionally set dampening-route-map or define the associated
values individually using the dampening-* fields.
dampening-max-suppress- This field is available when dampening is set to enable. 60
time <minutes_integer> Set the maximum time (in minutes) that a route can be
suppressed. The range is from 1 to 255. A route may continue to
accumulate penalties while it is suppressed. However, the route
cannot be suppressed longer than minutes_integer.
dampening-reachability- This field is available when dampening is set to enable. 15
half-life Set the time (in minutes) after which any penalty assigned to a
<minutes_integer> reachable (but flapping) route is decreased by half. The range is
from 1 to 45.
dampening-reuse This field is available when dampening is set to enable. 750
<reuse_integer> Set a dampening-reuse limit based on accumulated penalties.
The range is from 1 to 20 000. If the penalty assigned to a
flapping route decreases enough to fall below the specified
reuse_integer, the route is not suppressed.
dampening-route-map This field is available when dampening is set to enable. Null.
<routemap-name_str> Specify the route-map that contains criteria for dampening. You
must create the route-map before it can be selected here. See
“route-map” on page 354 and “Using route maps with BGP” on
page 356.
dampening-suppress This field is available when dampening is set to enable. 2 000
<limit_integer> Set a dampening-suppression limit. The range is from 1 to
20 000. A route is suppressed (not advertised) when its penalty
exceeds the specified limit.
dampening-unreachability- This field is available when dampening is set to enable. 15
half-life Set the time (in minutes) after which the penalty on a route that is
<minutes_integer> considered unreachable is decreased by half. The range is from
1 to 45.
default-local-preference Set the default local preference value. A higher value signifies a 100
<preference_integer> preferred route. The range is from 0 to 4 294 967 295.
deterministic-med Enable or disable deterministic comparison of the MED attributes disable
{enable | disable} of routes advertised by peers in the same AS.
Example
The following example defines the number of the AS of which the FortiGate unit is a member. It also
defines an EBGP neighbor at IP address 10.0.1.2.
config router bgp
set as 65001
set router-id 172.16.120.20
config neighbor
edit 10.0.1.2
set remote-as 65100
end
end
config admin-distance
Use this subcommand to set administrative distance modifications for bgp routes.
Example
This example shows how to manually adjust the distance associated with a route. It shows adding 25 to
the weight of the route, that it will apply to neighbor routes with an IP address of 192.168.0.0 and a
netmask of 255.255.0.0, that are also permitted by the access-list “downtown_office”.
config router bgp
config admin-distance
edit 1
set distance 25
set neighbour-prefix 192.168.0.0 255.255.0.0
set route-list downtown_office
next
end
end
config aggregate-address
config aggregate-address6
Use this subcommand to set or unset BGP aggregate-address table parameters. The subcommand
creates a BGP aggregate entry in the FortiGate unit routing table. Use config aggregate-address6
for IPv6 routing.
When you aggregate routes, routing becomes less precise because path details are not readily available
for routing purposes. The aggregate address represents addresses in several autonomous systems.
Aggregation reduces the length of the network mask until it masks only the bits that are common to all of
the addresses being summarized.
Note: The prefix field is required. All other fields are optional.
Example
This example shows how to define an aggregate prefix of 192.168.0.0/16. The as-set command
enables the generation of an unordered list of AS numbers to include in the path information.
config router bgp
config aggregate-address
edit 1
set prefix 192.168.0.0/16
set as-set enable
end
end
config neighbor
Use this subcommand to set or unset BGP neighbor configuration settings. The subcommand adds a BGP
neighbor configuration to the FortiGate unit.
You can add up to 1000 BGP neighbors, and optionally use MD5 authentication to password protect BGP
sessions with those neighbors. (see RFC 2385)
You can clear all or some BGP neighbor connections (sessions) using the exec router clear bgp
command (see “router clear bgp” on page 732).
Note: The remote-as field is required. All other fields are optional.
Example
This example shows how to set the AS number of a BGP neighbor at IP address 10.10.10.167 and enter a
descriptive name for the configuration.
config router bgp
config neighbor
edit 10.10.10.167
set remote-as 2879
set description BGP_neighbor_Site1
end
end
config network
config network6
Use this subcommand to set or unset BGP network configuration parameters. The subcommand is used to
advertise a BGP network (that is, an IP prefix) — you specify the IP addresses making up the local BGP
network. Use config network6 for IPv6 routing.
When you enable the network-import-check attribute on the FortiGate unit (see “network-import-
check {enable | disable}” on page 288) and you specify a BGP network prefix through the config
network command, the FortiGate unit searches its routing table for a matching entry. If an exact match is
found, the prefix is advertised. A route-map can optionally be used to modify the attributes of routes before
they are advertised.
Note: The prefix field is required. All other fields are optional.
Example
This example defines a BGP network at IP address 10.0.0.0/8. A route map named BGP_rmap1 is
used to modify the attributes of the local BGP routes before they are advertised.
config router bgp
config network
edit 1
set prefix 10.0.0.0/8
set route-map BGP_rmap1
end
end
config redistribute
config redistribute6
Use this subcommand to set or unset BGP redistribution table parameters. Use
config redistribute6 for IPv6 routing. You can enable BGP to provide connectivity between
connected, static, RIP, and/or OSPF routes. BGP redistributes the routes from one protocol to another.
When a large internetwork is divided into multiple routing domains, use the subcommand to redistribute
routes to the various domains. As an alternative, you can use the config network subcommand to
advertise a prefix to the BGP network (see “config network” on page 296).
The BGP redistribution table contains four static entries. You cannot add entries to the table. The entries
are defined as follows:
• connected — Redistribute routes learned from a direct connection to the destination network.
• static — Redistribute the static routes defined in the FortiGate unit routing table.
• rip — Redistribute routes learned from RIP.
• ospf — Redistribute routes learned from OSPF.
When you enter the subcommand, end the command with one of the four static entry names (that is,
config redistribute {connected | static | rip | ospf}).
Example
The following example changes the status and route-map fields of the connected entry.
config router bgp
config redistribute connected
set status enable
set route-map rmap1
end
end
History
Related topics
• router aspath-list
• router community-list
• router route-map
• Using route maps with BGP
• router key-chain
community-list
Use this command to identify BGP routes according to their COMMUNITY attributes (see RFC 1997).
Each entry in the community list defines a rule for matching and selecting routes based on the setting of
the COMMUNITY attribute. The default rule in a community list (which the FortiGate unit applies last)
denies the matching of all routes.
You add a route to a community by setting its COMMUNITY attribute. A route can belong to more than one
community. A route may be added to a community because it has something in common with the other
routes in the group (for example, the attribute could identify all routes to satellite offices).
When the COMMUNITY attribute is set, the FortiGate unit can select routes based on their COMMUNITY
attribute values.
Syntax
config router community-list
edit <community_name>
set type {standard | expanded}
config rule
edit <community_rule_id>
set action {deny | permit}
set match <criteria>
set regexp <regular_expression>
end
end
Note: The action field is required. All other fields are optional.
Example
This example creates a community list named Satellite_offices. The list permits operations on BGP
routes whose COMMUNITY attribute is set to no-advertise.
config router community-list
edit Satellite_offices
set type standard
config rule
edit 1
set action permit
set match no-advertise
end
end
The next example creates a community list named ext_community. The list permits operations on BGP
routes whose COMMUNITY attribute has the number 3 in the second part of the first instance and the
number 86 in the second part of the second instance. For example, the community list could match routes
having the following COMMUNITY attribute values: “100:3 500:86 300:800”, “1:3 4:86”, or “69:3 69:86
69:69 70:800 600:333”).
config router community-list
edit ext_community
set type expanded
config rule
edit 1
set action permit
set regexp “.*:3 .*:86”
end
end
History
Related topics
• router aspath-list
• router bgp
• router Using route maps with BGP
• router key-chain
key-chain
Use this command to manage RIP version 2 authentication keys. You can add, edit or delete keys
identified by the specified key number.
RIP version 2 uses authentication keys to ensure that the routing information exchanged between routers
is reliable. For authentication to work, both the sending and receiving routers must be set to use
authentication, and must be configured with the same keys.
A key chain is a list of one or more keys and the send and receive lifetimes for each key. Keys are used for
authenticating routing packets only during the specified lifetimes. The FortiGate unit migrates from one key
to the next according to the scheduled send and receive lifetimes. The sending and receiving routers
should have their system dates and times synchronized, but overlapping the key lifetimes ensures that a
key is always available even if there is some difference in the system times. For how to to ensure that the
FortiGate unit system date and time are correct, see “config system global” on page 243 .
Syntax
config router key-chain
edit <key_chain_name>
config key
edit <key_id>
set accept-lifetime <start> <end>
set key-string <password>
set send-lifetime <start> <end>
end
end
Example
This example shows how to add a key chain named test1 with three keys. The first two keys each have
send and receive lifetimes of 13 hours, and the 3rd key has send and receive lifetimes that never expire.
config router key-chain
edit test1
config key
edit 1
set accept-lifetime 10:00:00 1 6 2004 46800
set send-lifetime 10:00:00 1 6 2004 46800
set key-string 1a2b2c4d5e6f7g8h
next
edit 2
set accept-lifetime 22:00:00 1 6 2004 46800
set send-lifetime 22:00:00 1 6 2004 46800
set key-string 9i1j2k3l4m5n6o7p
next
edit 3
set accept-lifetime 10:00:00 2 6 2004 infinite
set send-lifetime 10:00:00 2 6 2004 infinite
set key-string 123abc456def789g
end
end
History
Related topics
• router rip
• system global
multicast
A FortiGate unit can operate as a Protocol Independent Multicast (PIM) version 2 router. FortiGate units
support PIM sparse mode (RFC 4601) and PIM dense mode (RFC 3973) and can service multicast
servers or receivers on the network segment to which a FortiGate unit interface is connected. Multicast
routing is not supported in Transparent mode (TP mode).
Note: To support PIM communications, the sending/receiving applications and all connecting PIM routers in
between must be enabled with PIM version 2. PIM can use static routes, RIP, OSPF, or BGP to forward multicast
packets to their destinations. To enable source-to-destination packet delivery, either sparse mode or dense mode
must be enabled on the PIM-router interfaces. Sparse mode routers cannot send multicast messages to dense
mode routers. In addition, if a FortiGate unit is located between a source and a PIM router, two PIM routers, or is
connected directly to a receiver, you must create a firewall policy manually to pass encapsulated (multicast)
packets or decapsulated data (IP traffic) between the source and destination.
A PIM domain is a logical area comprising a number of contiguous networks. The domain contains at least
one Boot Strap Router (BSR), and if sparse mode is enabled, a number of Rendezvous Points (RPs) and
Designated Routers (DRs). When PIM is enabled on a FortiGate unit, the FortiGate unit can perform any of
these functions at any time as configured.
Sparse mode
Initially, all candidate BSRs in a PIM domain exchange bootstrap messages to select one BSR to which
each RP sends the multicast address or addresses of the multicast group(s) that it can service. The
selected BSR chooses one RP per multicast group and makes this information available to all of the PIM
routers in the domain through bootstrap messages. PIM routers use the information to build packet
distribution trees, which map each multicast group to a specific RP. Packet distribution trees may also
contain information about the sources and receivers associated with particular multicast groups.
Note: When a FortiGate unit interface is configured as a multicast interface, sparse mode is enabled on it by
default to ensure that distribution trees are not built unless at least one downstream receiver requests multicast
traffic from a specific source. If the sources of multicast traffic and their receivers are close to each other and the
PIM domain contains a dense population of active receivers, you may choose to enable dense mode throughout
the PIM domain instead.
An RP represents the root of a non-source-specific distribution tree to a multicast group. By joining and
pruning the information contained in distribution trees, a single stream of multicast packets (for example, a
video feed) originating from the source can be forwarded to a certain RP to reach a multicast destination.
Each PIM router maintains a Multicast Routing Information Base (MRIB) that determines to which
neighboring PIM router join and prune messages are sent. An MRIB contains reverse-path information that
reveals the path of a multicast packet from its source to the PIM router that maintains the MRIB.
To send multicast traffic, a server application sends IP traffic to a multicast group address. The locally
elected DR registers the sender with the RP that is associated with the target multicast group. The RP
uses its MRIB to forward a single stream of IP packets from the source to the members of the multicast
group. The IP packets are replicated only when necessary to distribute the data to branches of the RP’s
distribution tree.
To receive multicast traffic, a client application can use Internet Group Management Protocol (IGMP)
version 1 (RFC 1112), 2 (RFC 2236), or 3 (RFC 3376) control messages to request the traffic for a
particular multicast group. The locally elected DR receives the request and adds the host to the multicast
group that is associated with the connected network segment by sending a join message towards the RP
for the group. Afterward, the DR queries the hosts on the connected network segment continually to
determine whether the hosts are active. When the DR no longer receives confirmation that at least one
member of the multicast group is still active, the DR sends a prune message towards the RP for the group.
Dense mode
The packet organization used in sparse mode is also used in dense mode. When a multicast source
begins to send IP traffic and dense mode is enabled, the closest PIM router registers the IP traffic from the
multicast source (S) and forwards multicast packets to the multicast group address (G). All PIM routers
initially broadcast the multicast packets throughout the PIM domain to ensure that all receivers that have
requested traffic for multicast group address G can access the information if needed.
To forward multicast packets to specific destinations afterward, the PIM routers build distribution trees
based on the information in multicast packets. Upstream PIM routers depend on prune/graft messages
from downstream PIM routers to determine if receivers are actually present on directly connected network
segments. The PIM routers exchange state refresh messages to update their distribution trees. FortiGate
units store this state information in a Tree Information Base (TIB), which is used to build a multicast
forwarding table. The information in the multicast forwarding table determines whether packets are
forwarded downstream. The forwarding table is updated whenever the TIB is modified.
PIM routers receive data streams every few minutes and update their forwarding tables using the source
(S) and multicast group (G) information in the data stream. Superfluous multicast traffic is stopped by PIM
routers that do not have downstream receivers—PIM routers that do not manage multicast groups send
prune messages to the upstream PIM routers. When a receiver requests traffic for multicast address G, the
closest PIM router sends a graft message upstream to begin receiving multicast packets.
For more information on Multicast routing, see the FortiGate Multicast Technical Note.
Syntax
config router multicast
set igmp-state-limit <limit_integer>
set multicast-routing {enable | disable}
set route-limit <limit_integer>
set route-threshold <threshold_integer>
config interface
edit <interface_name>
set cisco-exclude-genid {enable | disable}
set dr-priority <priority_integer>
set hello-holdtime <holdtime_integer>
set hello-interval <hello_integer>
set neighbour-filter <access_list_name>
set passive {enable | disable}
set pim-mode {sparse-mode | dense-mode}
set propagation-delay <delay_integer>
set rp-candidate {enable | disable}
set rp-candidate-group <access_list_name>
set rp-candidate-interval <interval_integer>
set rp-candidate-priority <priority_integer>
set state-refresh-interval <refresh_integer>
set ttl-threshold <ttl_integer>
end
config join-group
edit address <address_ipv4>
end
config igmp
set access-group <access_list_name>
set immediate-leave-group <access_list_name>
set last-member-query-count <count_integer>
set last-member-query-interval <interval_integer>
set query-interval <interval_integer>
Note: The end-user multicast client-server applications must be installed and configured to initiate
Internet connections and handle broadband content such as audio/video information.
Client applications send multicast data by registering IP traffic with a PIM-enabled router. An end-user
could type in a class D multicast group address, an alias for the multicast group address, or a call-
conference number to initiate the session.
Rather than sending multiple copies of generated IP traffic to more than one specific IP destination
address, PIM-enabled routers encapsulate the data and use the one multicast group address to forward
multicast packets to multiple destinations. Because one destination address is used, a single stream of
data can be sent. Client applications receive multicast data by requesting that the traffic destined for a
certain multicast group address be delivered to them— end-users may use phone books, a menu of
ongoing or future sessions, or some other method through a user interface to select the address of
interest.
A class D address in the 224.0.0.0 to 239.255.255.255 range may be used as a multicast group address,
subject to the rules assigned by the Internet Assigned Numbers Authority (IANA). All class D addresses
must be assigned in advance. Because there is no way to determine in advance if a certain multicast group
address is in use, collisions may occur (to resolve this problem, end-users may switch to a different
multicast address).
config interface
Use this subcommand to change interface-related PIM settings, including the mode of operation (sparse or
dense). Global settings do not override interface-specific settings.
config pim-sm-global
These global settings apply only to sparse mode PIM-enabled interfaces. Global PIM settings do not
override interface-specific PIM settings.
If sparse mode is enabled, you can configure a DR to send multicast packets to a particular RP by
specifying the IP address of the RP through the config rp-address variable. The IP address must be
directly accessible to the DR. If multicast packets from more than one multicast group can pass through
the same RP, you can use an access list to specify the associated multicast group addresses.
Note: To send multicast packets to a particular RP using the config rp-address subcommand, the
ip-address field is required. All other fields are optional.
Examples
This example shows how to enable a FortiGate unit to support PIM routing in sparse mode and enable
BSR candidacy on the dmz interface:
config router multicast
set multicast-routing enable
config interface
edit dmz
set pim-mode sparse-mode
end
end
config pim-sm-global
set bsr-candidate enable
set bsr-priority 1
set bsr-interface dmz
set bsr-hash 24
end
This example shows how to enable RP candidacy on the port1 interface for the multicast group
addresses given through an access list named multicast_port1:
config router multicast
set multicast-routing enable
config interface
edit port1
set pim-mode sparse-mode
set rp-candidate enable
set rp-candidate-group multicast_port1
set rp-candidate-priority 15
end
end
History
Related topics
• router access-list, access-list6
• get router info multicast
• execute modem trigger
ospf
Use this command to configure Open Shortest Path First (OSPF) protocol settings on the FortiGate unit.
More information on OSPF can be found in RFC 2328.
OSPF is a link state protocol capable of routing larger networks than the simpler distance vector RIP
protocol. An OSPF autonomous system (AS) or routing domain is a group of areas connected to a
backbone area. A router connected to more than one area is an area border router (ABR). Routing
information is contained in a link state database. Routing information is communicated between routers
using link state advertisements (LSAs).
Bi-directional Forwarding Detection (BFD) is a protocol used by BGP and OSPF. It is used to quickly locate
hardware failures in the network. Routers running BFD communicate with each other, and if a timer runs
out on a connection then that router is declared down. BFD then communicates this information to the
routing protocol and the routing information is updated. BFD support can only be configured through the
CLI.
Syntax
config router ospf
set abr-type {cisco | ibm | shortcut | standard}
set auto-cost-ref-bandwidth <mbps_integer>
set bfd {enable | disable | global}
set database-overflow {enable | disable}
set database-overflow-max-lsas <lsas_integer>
set database-overflow-time-to-recover <seconds_integer>
set default-information-metric <metric_integer>
set default-information-metric-type {1 | 2}
set default-information-originate {always | disable | enable}
set default-information-route-map <name_str>
set default-metric <metric_integer>
set distance <distance_integer>
set distance-external <distance_integer>
set distance-inter-area <distance_integer>
set distance-intra-area <distance_integer>
set distribute-list-in <access_list_name>
set passive-interface <name_str>
set restart-mode {graceful-restart | lls | none}
set restart-period
set rfc1583-compatible {enable | disable}
set router-id <address_ipv4>
set spf-timers <delay_integer> <hold_integer>
config area
edit <area_address_ipv4>
set authentication {md5 | none | text}
set default-cost <cost_integer>
set nssa-default-information-originate {enable | disable}
set nssa-default-information-originate-metric <metric>
set nssa-default-information-originate-metric-type {1 | 2}
set nssa-redistribution {enable | disable}
set nssa-translator-role {always | candidate | never}
set shortcut {default | disable | enable}
set stub-type {no-summary | summary}
set type {nssa | regular | stub}
config filter-list
edit <filter-list_id>
set direction {in | out}
set list <name_str>
end
config range
edit <range_id>
set advertise {enable | disable}
set prefix <address_ipv4mask>
set substitute <address_ipv4mask>
set substitute-status {enable | disable}
end
config virtual-link
edit <vlink_name>
set authentication {md5 | none | text}
set authentication-key <password_str>
set dead-interval <seconds_integer>
set hello-interval <seconds_integer>
set md5-key <id_integer><key_str>
set peer <address_ipv4>
set retransmit-interval <seconds_integer>
set transmit-delay <seconds_integer>
end
end
config distribute-list
edit <distribute-list_id>
set access-list <name_str>
set protocol {connected | rip | static}
end
end
config neighbor
edit <neighbor_id>
set cost <cost_integer>
set ip <address_ipv4>
set poll-interval <seconds_integer>
set priority <priority_integer>
end
end
config network
edit <network_id>
set area <id-address_ipv4>
set prefix <address_ipv4mask>
end
end
config ospf-interface
edit <ospf_interface_name>
set authentication {md5 | none | text}
set authentication-key <password_str>
set
set cost <cost_integer>
set database-filter-out {enable | disable}
set dead-interval <seconds_integer>
set hello-interval <seconds_integer>
set interface <name_str>
set ip <address_ipv4>
Note: The router-id field is required. All other fields are optional.
Example
This example shows how to set the OSPF router ID to 1.1.1.1 for a standard area border router:
config router ospf
set abr-type standard
set router-id 1.1.1.1
end
config area
Use this subcommand to set OSPF area related parameters. Routers in an OSPF autonomous system
(AS) or routing domain are organized into logical groupings called areas. Areas are linked together by area
border routers (ABRs). There must be a backbone area that all areas can connect to. You can use a virtual
link to connect areas that do not have a physical connection to the backbone. Routers within an OSPF
area maintain link state databases for their own areas.
FortiGate units support the three main types of areas—stub areas, Not So Stubby areas (NSSA), and
regular areas. A stub area only has a default route to the rest of the OSPF routing domain. NSSA is a type
of stub area that can import AS external routes and send them to the backbone, but cannot receive AS
external routes from the backbone or other areas. All other areas are considered regular areas.
You can use the config filter-list subcommand to control the import and export of LSAs into and
out of an area. For more information, see “config filter-list variables” on page 320.
You can use access or prefix lists for OSPF area filter lists. For more information, see “access-list, access-
list6” on page 276 and “prefix-list, prefix-list6” on page 337.
You can use the config range subcommand to summarize routes at an area boundary. If the network
numbers in an area are contiguous, the ABR advertises a summary route that includes all the networks
within the area that are within the specified range. See “config range variables” on page 320.
You can configure a virtual link using the config virtual-link subcommand to connect an area to the
backbone when the area has no direct connection to the backbone (see “config virtual-link variables” on
page 320). A virtual link allows traffic from the area to transit a directly connected area to reach the
backbone. The transit area cannot be a stub area. Virtual links can only be set up between two ABRs.
Note: If you define a filter list, the direction and list fields are required. If you define a range, the
prefix field is required. If you define a virtual link, the peer field is required. All other fields are optional.
Note: If you configure authentication for interfaces, the authentication configured for the area is overridden.
nssa-default-information- Specify the metric (an integer) for the default route set by the 10
originate-metric <metric> nssa-default-information-originate field.
nssa-default-information- Specify the OSPF external metric type for the default route set by 2
originate-metric-type the nssa-default-information-originate field.
{1 | 2}
nssa-redistribution Enable or disable redistributing routes into a NSSA area. enable
{enable | disable}
Example
This example shows how to configure a stub area with the id 15.1.1.1, a stub type of summary, a default
cost of 20, and MD5 authentication.
config router ospf
config area
edit 15.1.1.1
set type stub
set stub-type summary
set default-cost 20
set authentication md5
end
end
This example shows how to use a filter list named acc_list1 to filter packets entering area 15.1.1.1.
config router ospf
config area
edit 15.1.1.1
config filter-list
edit 1
set direction in
set list acc_list1
end
end
This example shows how to set the prefix for range 1 of area 15.1.1.1.
config router ospf
config area
edit 15.1.1.1
config range
edit 1
set prefix 1.1.0.0 255.255.0.0
end
end
This example shows how to configure a virtual link.
config router ospf
config area
edit 15.1.1.1
config virtual-link
edit vlnk1
set peer 1.1.1.1
end
end
config distribute-list
Use this subcommand to filter the networks for routing updates using an access list. Routes not matched
by any of the distribution lists will not be advertised.
You must configure the access list that you want the distribution list to use before you configure the
distribution list. To configure an access list, see “access-list, access-list6” on page 276.
Example
This example shows how to configure distribution list 2 to use an access list named acc_list1 for all
static routes.
config router ospf
config distribute-list
edit 2
set access-list acc_list1
set protocol static
end
end
config neighbor
Use this subcommand to manually configure an OSPF neighbor on non-broadcast networks. OSPF
packets are unicast to the specified neighbor address. You can configure multiple neighbors.
Example
This example shows how to manually add a neighbor.
config router ospf
config neighbor
edit 1
set ip 192.168.21.63
end
end
config network
Use this subcommand to identify the interfaces to include in the specified OSPF area. The prefix field
can define one or multiple interfaces.
Example
Use the following command to enable OSPF for the interfaces attached to networks specified by the IP
address 10.0.0.0 and the netmask 255.255.255.0 and to add these interfaces to area 10.1.1.1.
config router ospf
config network
edit 2
set area 10.1.1.1
set prefix 10.0.0.0 255.255.255.0
end
end
config ospf-interface
Use this subcommand to configure interface related OSPF settings.
Note: The interface field is required. All other fields are optional.
Note: If you configure authentication for the interface, authentication for areas is not used.
Example
This example shows how to assign an OSPF interface configuration named test to the interface named
internal and how to configure text authentication for this interface.
config router ospf
config ospf-interface
edit test
set interface internal
set ip 192.168.20.3
set authentication text
set authentication-key a2b3c4d5e
end
end
config redistribute
Use this subcommand to redistribute routes learned from BGP, RIP, static routes, or a direct connection to
the destination network.
The OSPF redistribution table contains four static entries. You cannot add entries to the table. The entries
are defined as follows:
• bgp — Redistribute routes learned from BGP.
• connected — Redistribute routes learned from a direct connection to the destination network.
• static — Redistribute the static routes defined in the FortiGate unit routing table.
• rip — Redistribute routes learned from RIP.
When you enter the subcommand, end the command with one of the four static entry names (that is,
config redistribute {bgp | connected | static | rip}).
Example
This example shows how to enable route redistribution from RIP, using a metric of 3 and a route map
named rtmp2.
config router ospf
config redistribute rip
set metric 3
set routemap rtmp2
set status enable
end
config summary-address
Use this subcommand to summarize external routes for redistribution into OSPF. This command works
only for summarizing external routes on an Autonomous System Boundary Router (ASBR). For information
on summarization between areas, see “config range variables” on page 320. By replacing the LSAs for
each route with one aggregate route, you reduce the size of the OSPF link-state database.
Note: The prefix field is required. All other fields are optional.
Example
This example shows how to summarize routes using the prefix 10.0.0.0 255.0.0.0.
config router ospf
config summary-address
edit 5
set prefix 10.0.0.0 255.0.0.0
end
end
History
Related topics
• router access-list, access-list6
• get router info ospf, get router info protocols, get router info routing-table
• router prefix-list, prefix-list6, router route-map
ospf6
Use this command to configure OSPF routing for IPv6 traffic.
IP version 6 for OSPF is supported through Open Shortest Path First version 3 (OSPFv3) defined in RFC
2740. This includes the Authentication/Confidentiality for OSPFv3.
For more information on OSPF features in general, see “config router ospf” on page 316.
Syntax
config router ospf6
set abr-type {cisco | ibm | standard}
set auto-cost-ref-bandwidth <mbps_integer>
set default-metric <metric_integer>
set passive-interface <name_str>
set router-id <address_ipv4>
set spf-timers <delay_integer> <hold_integer>
config area
edit <area_address_ipv4>
set default-cost <cost_integer>
set stub-type {no-summary | summary}
set type {nssa | regular | stub}
end
config ospf-interface
edit <ospf_interface_name>
set authentication {md5 | none | text}
set cost <cost_integer>
set dead-interval <seconds_integer>
set hello-interval <seconds_integer>
set interface <name_str>
set priority <priority_integer>
set retransmit-interval <seconds_integer>
set status {enable | disable}
set transmit-delay <seconds_integer>
end
end
config redistribute {bgp | connected | rip | static}
set metric <metric_integer>
set metric-type {1 | 2}
set routemap <name_str>
set status {enable | disable}
end
end
config area
Use this subcommand to set OSPF area related parameters. Routers in an OSPF autonomous system
(AS) or routing domain are organized into logical groupings called areas. Areas are linked together by area
border routers (ABRs). There must be a backbone area that all areas can connect to. You can use a virtual
link to connect areas that do not have a physical connection to the backbone. Routers within an OSPF
area maintain link state databases for their own areas.
You can use the config range subcommand to summarize routes at an area boundary. If the network
numbers in an area are contiguous, the ABR advertises a summary route that includes all the networks
within the area that are within the specified range. See “config range variables” on page 320.
You can configure a virtual link using the config virtual-link subcommand to connect an area to the
backbone when the area has no direct connection to the backbone (see “config virtual-link variables” on
page 320). A virtual link allows traffic from the area to transit a directly connected area to reach the
backbone. The transit area cannot be a stub area. Virtual links can only be set up between two ABRs.
config ospf6-interface
Use this subcommand to change interface related OSPF settings.
Note: The interface field is required. All other fields are optional.
config redistribute
Use this subcommand to redistribute routes learned from BGP, RIP, static routes, or a direct connection to
the destination network.
The OSPF redistribution table contains four static entries. You cannot add entries to the table. The entries
are defined as follows:
• bgp — Redistribute routes learned from BGP.
• connected — Redistribute routes learned from a direct connection to the destination network.
• static — Redistribute the static routes defined in the FortiGate unit routing table.
• rip — Redistribute routes learned from RIP.
When you enter the subcommand, end the command with one of the four static entry names (that is,
config redistribute {bgp | connected | rip | static}).
History
policy
Use this command to add, move, edit or delete a route policy. When you create a policy route, any packets
that match the policy are forwarded to the IP address of the next-hop gateway through the specified
outbound interface.
You can configure the FortiGate unit to route packets based on:
• a source address
• a protocol, service type, or port range
• the inbound interface
• type of service (TOS)
When the FortiGate unit receives a packet, it starts at the top of the policy routing list and attempts to
match the packet with a policy in ascending order. If no packets match the policy route, the FortiGate unit
routes the packet using the routing table. Route policies are processed before static routing. You can
change the order of policy routes using the move command.
Note: For static routing, any number of static routes can be defined for the same destination. When multiple
routes for the same destination exist, the FortiGate unit chooses the route having the lowest administrative
distance. Route redundancy is not available for policy routing: any packets that match a route policy are
forwarded according to the route specified in the policy.
Type of service (TOS) is an 8-bit field in the IP header that enables you to determine how the IP datagram
should be delivered, with such criteria as delay, priority, reliability, and minimum cost. Each quality helps
gateways determine the best way to route datagrams. A router maintains a ToS value for each route in its
routing table. The lowest priority TOS is 0, the highest is 7 - when bits 3, 4, and 5 are all set to 1. The router
tries to match the TOS of the datagram to the TOS on one of the possible routes to the destination. If there
is no match, the datagram is sent over a zero TOS route. Using increased quality may increase the cost of
delivery because better performance may consume limited network resources. For more information see
RFC 791 and RFC 1349.
Table 9: The role of each bit in the IP header TOS 8-bit field
bits 0, 1, 2 Precedence Some networks treat high precedence traffic as more important traffic.
Precedence should only be used within a network, and can be used
differently in each network. Typically you do not care about these bits.
bit 3 Delay When set to 1, this bit indicates low delay is a priority. This is useful for
such services as VoIP where delays degrade the quality of the sound.
bit 4 Throughput When set to 1, this bit indicates high throughput is a priority. This is
useful for services that require lots of bandwidth such as video
conferencing.
bit 5 Reliability When set to 1, this bit indicates high reliability is a priority. This is useful
when a service must always be available such as with DNS servers.
bit 6 Cost When set to 1, this bit indicates low cost is a priority. Generally there is
a higher delivery cost associated with enabling bits 3,4, or 5, and bit 6
indicates to use the lowest cost route.
bit 7 Reserved for Not used at this time.
future use
The two fields tos and tos-mask enable you to configure type of service support on your FortiGate unit.
tos-mask enables you to only look at select bits of the 8-bit TOS field in the IP header. This is useful as
you may only care about reliability for some traffic, and not about the other TOS criteria.
The value in tos is used to match the pattern from tos-mask. If it matches, then the rest of the policy is
applied. If the mask doesn’t match, the next policy tries to match if its configured, and eventually default
routing is applied if there are no other matches.
Note: You need to use tos-mask to remove bits from the pattern you don’t care about, or those bits will
prevent a match with your tos pattern.
Syntax
config router policy
move <seq-num1> {before | after} <seq-num2>
edit <policy_integer>
set dst <dest-address_ipv4mask>
set end-port <port_integer>
set gateway <address_ipv4>
set input-device <interface-name_str>
set output-device <interface-name_str>
set protocol <protocol_integer>
set src <source-address_ipv4mask>
set start-port <port_integer>
set tos <hex_mask>
set tos-mask <hex_mask>
end
Note: The input-device field is required. All other fields are optional.
Example
If a FortiGate unit provides Internet access for multiple internal subnets, you can use policy routing to
control the route that traffic from each network takes to the Internet. For example, if the internal network
includes the subnets 192.168.10.0 and 192.168.20.0 you can enter the following route policies:
• Enter the following command to route traffic from the 192.168.10.0 subnet to the 100.100.100.0
subnet. Force the packets to the next hop gateway at IP address 1.1.1.1 through the interface
named external.
config router policy
edit 1
set input-device internal
set src 192.168.10.0 255.255.255.0
set dst 100.100.100.0 255.255.255.0
set output-device external
set gateway 1.1.1.1
end
• Enter the following command to route traffic from the 192.168.20.0 subnet to the 200.200.200.0
subnet. Force the packets to the next hop gateway at IP address 2.2.2.1 through the interface
named external.
History
FortiOS v2.80 Revised.
FortiOS v3.0 Replaced all underscore characters in fields with hyphens. Changed default start-point
number to 1. Changed default end-point number to 65 535.
FortiOS v3.0 MR7 Added tos, and tos-mask.
Related topics
• router static
prefix-list, prefix-list6
Use this command to add, edit, or delete prefix lists. A prefix list is an enhanced version of an access list
that allows you to control the length of the prefix netmask. Prefix lists are called by routing protocols such
as RIP or OSPF.
Each rule in a prefix list consists of a prefix (IP address and netmask), the action to take for this prefix
(permit or deny), and maximum and minimum prefix length settings.
The FortiGate unit attempts to match a packet against the rules in a prefix list starting at the top of the list.
If it finds a match for the prefix it takes the action specified for that prefix. If no match is found the default
action is deny. A prefix-list should be used to match the default route 0.0.0.0/0.
config router setting uses prefix-list to filter the displayed routes. For more information, see
“setting” on page 360.
Syntax
config router prefix-list, prefix-list6
edit <prefix_list_name>
set comments <string>
config rule
edit <prefix_rule_id>
set action {deny | permit}
set ge <length_integer>
set le <length_integer>
set prefix {<address_ipv4mask> | any}
set prefix6 {<address_ipv6mask> | any}
end
end
Note: The action and prefix fields are required. All other fields are optional.
Examples
This example shows how to add a prefix list named prf_list1 with three rules. The first rule permits
subnets that match prefix lengths between 26 and 30 for the prefix 192.168.100.0 255.255.255.0.
The second rule denies subnets that match the prefix lengths between 20 and 25 for the prefix 10.1.0.0
255.255.0.0. The third rule denies all other traffic.
config router prefix-list
edit prf_list1
config rule
edit 1
set prefix 192.168.100.0 255.255.255.0
set action permit
set ge 26
set le 30
next
edit 2
set prefix 10.1.0.0 255.255.0.0
set action deny
set ge 20
set le 25
next
edit 3
set prefix any
set action deny
end
end
The following example shows how to create a prefix-list that will drop the default route but allow all other
prefixes to be passed. The first rule matches the default route only and is set to deny, the second rule will
match all other prefixes and allow them to be passed.
config router prefix-list
edit "drop_default"
config rule
edit 1
set action deny
set prefix 0.0.0.0 0.0.0.0
unset ge
unset le
next
edit 2
set prefix any
unset ge
unset le
next
end
next
end
History
Related topics
• router access-list, access-list6
• router ospf
• router ospf6
• router rip
• router ripng
• router setting
rip
Use this command to configure the Routing Information Protocol (RIP) on the FortiGate unit. RIP is a
distance-vector routing protocol intended for small, relatively homogeneous networks. RIP uses hop count
as its routing metric. Each network is usually counted as one hop. The network diameter is limited to 15
hops with 16 hops.
The FortiOS implementation of RIP supports RIP version 1 (see RFC 1058) and RIP version 2 (see RFC
2453). RIP version 2 enables RIP messages to carry more information, and to support simple
authentication and subnet masks.
Syntax
config router rip
set default-information-originate {enable | disable}
set default-metric <metric_integer>
set garbage-timer <timer_integer>
set passive-interface <name_str>
set timeout-timer <timer_integer>
set update-timer <timer_integer>
set version {1 2}
config distance
edit <distance_id>
set access-list <name_str>
set distance <distance_integer>
set prefix <address_ipv4mask>
end
config distribute-list
edit <distribute_list_id>
set direction {in | out}
set interface <name_str>
set listname <access/prefix-listname_str>
set status {enable | disable}
end
config interface
edit <interface_name>
set auth-keychain <name_str>
set auth-mode {none | text | md5}
set auth-string <password_str>
set receive-version {1 2}
set send-version {1 2}
set send-version2-broadcast {enable | disable}
set split-horizon {poisoned | regular}
set split-horizon-status {enable | disable}
end
config neighbor
edit <neighbor_id>
set ip <address_ipv4>
end
config network
edit <network_id>
Example
This example shows how to enable the advertising of a default static route into RIP, enable the sending
and receiving of RIP version 1 packets, and raise the preference of local routes in the static routing table
(the default metric) from the default of 1 to 5 - those routes well be less preferred.
config router rip
set default-information-originate enable
set version 1
set default-metric 5
end
config distance
Use this subcommand to specify an administrative distance. When different routing protocols provide
multiple routes to the same destination, the administrative distance sets the priority of those routes. The
lowest administrative distance indicates the preferred route.
If you specify a prefix, RIP uses the specified distance when the source IP address of a packet matches
the prefix.
Note: The distance field is required. All other fields are optional.
Example
This example shows how to change the administrative distance to 10 for all IP addresses that match the
internal_example access-list.
config router rip
config distance
edit 1
set distance 10
set access-list internal_example
end
end
config distribute-list
Use this subcommand to filter incoming or outgoing updates using an access list or a prefix list. If you do
not specify an interface, the filter will be applied to all interfaces. You must configure the access list or
prefix list that you want the distribution list to use before you configure the distribution list. For more
information on configuring access lists and prefix lists, see “access-list, access-list6” on page 276 and
“prefix-list, prefix-list6” on page 337.
Note: The direction and listname fields are required. All other fields are optional.
Example
This example shows how to configure and enable a distribution list to use an access list named
allowed_routers for incoming updates on the external interface.
config router rip
config distribute-list
edit 1
set direction in
config interface
Use this subcommand to configure RIP version 2 authentication, RIP version send and receive for the
specified interface, and to configure and enable split horizon.
Authentication is only available for RIP version 2 packets sent and received by an interface. You must set
auth-mode to none when receive-version or send-version are set to 1 or 1 2 (both are set to 1
by default).
A split horizon occurs when a router advertises a route it learns over the same interface it learned it on. In
this case the router that gave the learned route to the last router now has two entries to get to another
location. However, if the primary route fails that router tries the second route to find itself as part of the
route and an infinite loop is created. A poisoned split horizon will still advertise the route on the interface it
received it on, but it will mark the route as unreachable. Any unreachable routes are automatically
removed from the routing table. This is also called split horizon with poison reverse.
Example
This example shows how to configure the external interface to send and receive RIP version 2, to use MD5
authentication, and to use a key chain called test1.
config router rip
config interface
edit external
set receive-version 2
set send-version 2
set auth-mode md5
set auth-keychain test1
end
end
config neighbor
Use this subcommand to enable RIP to send unicast routing updates to the router at the specified address.
You can use the neighbor subcommand and “passive-interface <name_str>” on page 341 to allow RIP to
send unicast updates to the specified neighbor while blocking broadcast updates on the specified
interface. You can configure multiple neighbors.
Example
This example shows how to specify that the router at 192.168.21.20 is a neighbor.
config router rip
config neighbor
edit 1
set ip 192.168.21.20
end
end
config network
Use this subcommand to identify the networks for which to send and receive RIP updates. If a network is
not specified, interfaces in that network will not be advertised in RIP updates.
Example
Use the following command to enable RIP for the interfaces attached to networks specified by the IP
address 10.0.0.0 and the netmask 255.255.255.0.
config router rip
config network
edit 2
set prefix 10.0.0.0 255.255.255.0
end
end
config offset-list
Use this subcommand to add the specified offset to the metric (hop count) of a route from the offset list.
Note: The access-list, direction, and offset fields are required. All other fields are optional.
Example
This example shows how to configure and enable offset list ID number 5. This offset list entry adds a metric
of 3 to incoming routes that match the access list named acc_list1 on the external interface.
config router rip
config offset-list
edit 5
set access-list acc_list1
set direction in
set interface external
set offset 3
set status enable
end
end
config redistribute
Use this subcommand to advertise routes learned from OSPF, BGP, static routes, or a direct connection to
the destination network.
The RIP redistribution table contains four static entries. You cannot add entries to the table. The entries are
defined as follows:
• bgp — Redistribute routes learned from BGP.
• connected — Redistribute routes learned from a direct connection to the destination network.
• ospf — Redistribute routes learned from OSPF.
• static — Redistribute the static routes defined in the FortiGate unit routing table.
When you enter the subcommand, end the command with one of the four static entry names (that is,
config redistribute {bgp | connected | ospf | static}).
Example
This example shows how to enable route redistribution from OSPF, using a metric of 3 and a route map
named rtmp2.
config router rip
History
Related topics
• router access-list, access-list6
• router key-chain
• router prefix-list, prefix-list6
• router route-map
• get router info protocols
• get router info rip
• get router info routing-table
ripng
Use this command to configure the “next generation” Routing Information Protocol (RIPng) on the
FortiGate unit. RIPng is a distance-vector routing protocol intended for small, relatively homogeneous,
IPv6 networks. RIPng uses hop count as its routing metric. Each network is usually counted as one hop.
The network diameter is limited to 15 hops. RIPng is defined in RFC 2080.
Syntax
config router ripng
set default-information-originate {enable | disable}
set default-metric <metric_integer>
set garbage-timer <timer_integer>
set passive-interface <name_str>
set timeout-timer <timer_integer>
set update-timer <timer_integer>
config aggregate-address
edit <entry-id>
set prefix6 <aggregate_prefix>
end
config distribute-list
edit <distribute_list_id>
set direction {in | out}
set interface <name_str>
set listname <access/prefix-listname_str>
set status {enable | disable}
end
config interface
edit <interface_name>
set split-horizon {poisoned | regular}
set split-horizon-status {enable | disable}
end
config neighbor
edit <neighbor_id>
set ip <address_ipv4>
end
config offset-list
edit <offset_list_id>
set access-list <name_str>
set direction {in | out}
set interface <name_str>
set offset <metric_integer>
set status {enable | disable}
end
config redistribute {connected | static | ospf | bgp}
set metric <metric_integer>
set routemap <name_str>
set status {enable | disable}
end
config aggregate-address
Use this subcommand to configure aggregate address prefixes.
config distribute-list
Use this subcommand to filter incoming or outgoing updates using an access list or a prefix list. If you do
not specify an interface, the filter will be applied to all interfaces. You must configure the access list or
prefix list that you want the distribution list to use before you configure the distribution list. For more
information on configuring access lists and prefix lists, see “router access-list, access-list6” on page 276
and “router prefix-list, prefix-list6” on page 337.
Note: The direction and listname fields are required. All other fields are optional.
config interface
Use this subcommand to configure and enable split horizon.
A split horizon occurs when a router advertises a route it learns over the same interface it learned it on. In
this case the router that gave the learned route to the last router now has two entries to get to another
location. However, if the primary route fails that router tries the second route to find itself as part of the
route and an infinite loop is created. A poisoned split horizon will still advertise the route on the interface it
received it on, but it will mark the route as unreachable. Any unreachable routes are automatically
removed from the routing table. This is also called split horizon with poison reverse.
config neighbor
Use this subcommand to enable RIPng to send unicast routing updates to the router at the specified
address. You can use the neighbor subcommand and “passive-interface <name_str>” on page 341 to
allow RIPng to send unicast updates to the specified neighbor while blocking broadcast updates on the
specified interface. You can configure multiple neighbors.
config offset-list
Use this subcommand to add the specified offset to the metric (hop count) of a route from the offset list.
Note: The access-list6, direction, and offset fields are required. All other fields are optional.
config redistribute
Use this subcommand to redistribute routes learned from OSPF, BGP, static routes, or a direct connection
to the destination network.
The RIPng redistribution table contains four static entries. You cannot add entries to the table. The entries
are defined as follows:
• bgp — Redistribute routes learned from BGP.
• connected — Redistribute routes learned from a direct connection to the destination network.
• ospf — Redistribute routes learned from OSPF.
• static — Redistribute the static routes defined in the FortiGate unit routing table.
When you enter the subcommand, end the command with one of the four static entry names (that is,
config redistribute {bgp | connected | ospf | static}).
History
Related topics
• router access-list, access-list6
• router prefix-list, prefix-list6
• router rip
• router route-map
route-map
Use this command to add, edit, or delete route maps. To use the command to limit the number of received
or advertised BGP and RIP routes and routing updates using route maps, see “Using route maps with
BGP” on page 356, and RIP “config redistribute” on page 326.
Route maps provide a way for the FortiGate unit to evaluate optimum routes for forwarding packets or
suppressing the routing of packets to particular destinations. Compared to access lists, route maps support
enhanced packet-matching criteria. In addition, route maps can be configured to permit or deny the
addition of routes to the FortiGate unit routing table and make changes to routing information dynamically
as defined through route-map rules.
The FortiGate unit compares the rules in a route map to the attributes of a route. The rules are examined in
ascending order until one or more of the rules in the route map are found to match one or more of the route
attributes:
• When a single matching match-* rule is found, changes to the routing information are made as
defined through the rule’s set-ip-nexthop, set-metric, set-metric-type, and/or set-tag
settings.
• If no matching rule is found, no changes are made to the routing information.
• When more than one match-* rule is defined, all of the defined match-* rules must evaluate to TRUE
or the routing information is not changed.
• If no match-* rules are defined, the FortiGate unit makes changes to the routing information only
when all of the default match-* rules happen to match the attributes of the route.
The default rule in the route map (which the FortiGate unit applies last) denies all routes. For a route map
to take effect, it must be called by a FortiGate unit routing process.
Note: Any fields and rules that to not appear here can be found in the BGP route-map section. See
“Using route maps with BGP” on page 356.
Syntax
config router route-map
edit <route_map_name>
set comments <string>
config rule
edit <route_map_rule_id>
set action {deny | permit}
set match-interface <name_str>
set match-ip-address <access/prefix-listname_str>
set match-ip-nexthop <access/prefix-listname_str>
set match-metric <metric_integer>
set match-route-type {1 | 2}
set match-tag <tag_integer>
set set-ip-nexthop <address_ipv4>
set set-metric <metric_integer>
set set-metric-type {1 | 2}
set set-tag <tag_integer>
end
end
Example
This example shows how to add a route map list named rtmp2 with two rules. The first rule denies routes
that match the IP addresses in an access list named acc_list2. The second rule permits routes that
match a metric of 2 and changes the metric to 4.
config router route-map
edit rtmp2
config rule
edit 1
set match-ip-address acc_list2
set action deny
next
edit 2
set match-metric 2
set action permit
set set-metric 4
end
end
Syntax
config router route-map
edit <route_map_name>
set comments <string>
config rule
edit <route_map_rule_id>
set match-as-path <aspath-list-name_str>
set match-community <community-list-name_str>
set match-community-exact {enable | disable}
set match-origin {egp | igp | incomplete | none}
set set-aggregator-as <id_integer>
set set-aggregator-ip <address_ipv4>
set set-aspath <id_integer> <id_integer> <id_integer> ...
set set-atomic-aggregate {enable | disable}
set set-community-delete <community-list-name_str>
set set-community <criteria>
set set-community-additive {enable | disable}
set set-dampening-reachability-half-life <minutes>
set set-dampening-reuse <reuse_integer>
set set-dampening-suppress <suppress_integer>
set set-dampening-max-suppress <minutes>
set set-dampening-unreachability-half-life <minutes>
set set-extcommunity-rt <AA:NN> <AA:NN> <AA:NN> ...
set set-extcommunity-soo <AA:NN> <AA:NN> <AA:NN> ...
set set-local-preference <preference_integer>
set set-originator-id <address_ipv4>
set set-origin {egp | igp | incomplete | none}
set set-weight <weight_integer>
end
Example
This example shows how to create a route map named BGP_rtmp2. The route map contains two rules.
The first rule permits operations on routes that match the IP addresses in an access list named
acc_list2. The second rule permits operations on routes according to a community list named
com_list3.
config router route-map
edit BGP_rtmp2
set comments “example BGP route map”
config rule
edit 1
set match-ip-address acc_list2
set action permit
next
edit 2
set match-community com_list3
set action permit
end
end
History
Related topics
• router access-list, access-list6
• router prefix-list, prefix-list6
• router rip
• router aspath-list
• router bgp
• router community-list
• router key-chain
setting
Use this command to define a prefix list as a filter to show routes.
Command
config router setting
set show-filter <prefix_list>
end
History
Related topics
• router prefix-list, prefix-list6
static
Use this command to add, edit, or delete static routes for IPv4 traffic. For IPv6 traffic, use the static6
command at “static6” on page 364.
You add static routes to manually control traffic exiting the FortiGate unit. You configure routes by
specifying destination IP addresses and network masks and adding gateways for these destination
addresses. Gateways are the next-hop routers to which traffic that matches the destination addresses in
the route are forwarded.
You can adjust the administrative distance of a route to indicate preference when more than one route to
the same destination is available. The lower the administrative distance, the greater the preferability of the
route. If the routing table contains several entries that point to the same destination (the entries may have
different gateways or interface associations), the FortiGate unit compares the administrative distances of
those entries, selects the entries having the lowest distances, and installs them as routes in the FortiGate
unit forwarding table. Any ties are resolved by comparing the routes’ priority, with lowest priority being
preferred. As a result, the FortiGate unit forwarding table only contains routes having the lowest distances
to every possible destination.If both administrative distance and priority are tied for two or more routes, an
equal cost multi-path (ECMP) situation occurs. In this case, the egress index for the routes will be used to
determine the selected route.
Syntax
config router static
edit <sequence_number>
set blackhole {enable | disable}
set device <interface_name>
set distance <distance>
set dst <destination-address_ipv4mask>
set dynamic-gateway {enable | disable}
set gateway <gateway-address_ipv4>
set priority <integer>
set weight <integer>
end
Note: The dst and gateway fields are required when blackhole is disabled. When blackhole is enabled,
the dst field is required. All other fields are optional.
Example
This example shows how to add a static route that has the sequence number 2.
config router static
edit 2
set dev internal
set dst 192.168.22.0 255.255.255.0
set gateway 192.168.22.44
end
This example shows how to add a static route for a dynamic modem interface with a administrative
distance of 1 and a priority of 1. These settings makes this the preferred route.
config route static
edit 3
set dev modem
set dynamic-gateway enable
set dst 10.0.0.7 255.255.255.0
set distance 1
set priority 1
end
History
Related topics
• system interface
• system settings
• get router info routing-table
static6
Use this command to add, edit, or delete static routes for IPv6 traffic. For IPv4 static routes, see “static” on
page 361.
You add static routes to specify the destination of traffic exiting the FortiGate unit. You configure routes by
adding destination IP addresses and network masks and adding gateways for these destination
addresses. The gateways are the next-hop routers to which traffic that matches the destination addresses
in the route are forwarded.
Note: You can configure static routes for IPv6 traffic on FortiGate units that run in NAT/Route mode.
Syntax
config router static6
edit <sequence_number>
set device <interface_name>
set dst <destination-address_ipv6mask>
set gateway <gateway-address_ipv6>
end
Note: The device, dst, and gateway fields are all required.
Example
This example shows how to add an IPv6 static route that has the sequence number 2.
config router static6
edit 2
set dev internal
set dst 2001:DB8::/32
set gateway 2001:DB8:0:CD30:123:4567:89AB:CDEF
end
History
Related topics
• system interface
• get router info routing-table
spamfilter
Use email filter commands to create a banned word list, configure filters based on email addresses,
ip addresses, and MIME headers, and to configure the FortiGuard-Antispam service.
For more information about email filtering see the FortiGate UTM User Guide.
This chapter contains the following sections:
bword
dnsbl
emailbwl
fortishield
ipbwl
iptrust
mheader
options
bword
Use this command to add or edit and configure options for the email filter banned word list.
The FortiGate email filters are applied in the following order:
For SMTP
1 IP address BWL check - Last hop IP
2 DNSBL & ORDBL check, IP address FortiGuard check, HELO DNS lookup
3 E-mail address BWL check
4 MIME headers check
5 IP address BWL check (for IPs extracted from “Received” headers)
6 Return e-mail DNS check, FortiGuard Antispam check (for IPs extracted from “Received” headers, and
URLs in email content)
7 Banned word check
Note: Perl regular expression patterns are case sensitive for email filter banned words. To make a word or phrase
case insensitive, use the regular expression /i. For example, /bad language/i blocks all instances of bad
language regardless of case. Wildcard patterns are not case sensitive.
Syntax
config spamfilter bword
edit <list_int>
set name <list_str>
set comment <comment_str>
config entries
edit <banned_word_int>
set action {clear | spam}
set language {french | japanese | korean | simch | spanish | thai |
trach | western}
set pattern <banned_word_str>
History
Related topics
• spamfilter emailbwl
• spamfilter fortishield
• spamfilter ipbwl
• spamfilter iptrust
• spamfilter mheader
• spamfilter options
• spamfilter dnsbl
dnsbl
Use this command to configure email filtering using DNS-based Blackhole List (DNSBL) or Open Relay
Database List (ORDBL) servers. DSNBL and ORDBL settings are configured with this command but
DSNBL and ORDBL filtering is enabled within each protection profile.
The FortiGate email filters are generally applied in the following order:
For SMTP
1 IP address BWL check - Last hop IP
2 DNSBL & ORDBL check, IP address FortiGuard check, HELO DNS lookup
3 E-mail address BWL check
4 MIME headers check
5 IP address BWL check (for IPs extracted from “Received” headers)
6 Return e-mail DNS check, FortiGuard Antispam check (for IPs extracted from “Received” headers, and
URLs in email content)
7 Banned word check
Note: Because the FortiGate unit uses the server domain name to connect to the DNSBL or ORDBL server, it
must be able to look up this name on the DNS server. For information on configuring DNS, see “system dns” on
page 413.
Syntax
config spamfilter dnsbl
edit <list_int>
set name <list_str>
set comment <comment_str>
config entries
edit <server_int>
set action {reject | spam}
set server <fqdn>
History
Related topics
• spamfilter bword
• spamfilter emailbwl
• spamfilter fortishield
• spamfilter ipbwl
• spamfilter iptrust
• spamfilter mheader
• spamfilter options
• system dns
emailbwl
Use this command to filter email based on the sender’s email address or address pattern.
The FortiGate email filters are applied in the following order:
For SMTP
1 IP address BWL check - Last hop IP
2 DNSBL & ORDBL check, IP address FortiGuard check, HELO DNS lookup
3 E-mail address BWL check
4 MIME headers check
5 IP address BWL check (for IPs extracted from “Received” headers)
6 Return e-mail DNS check, FortiGuard Antispam check (for IPs extracted from “Received” headers, and
URLs in email content)
7 Banned word check
Syntax
config spamfilter emailbwl
edit <list_int>
set name <list_str>
set comment <comment_str>
config entries
edit <email_int>
set action {clear | spam}
set email-pattern <email_str>
set pattern-type {regexp | wildcard}
set status {enable | disable}
end
History
Related topics
• spamfilter bword
• spamfilter fortishield
• spamfilter ipbwl
• spamfilter iptrust
• spamfilter mheader
• spamfilter options
• spamfilter dnsbl
fortishield
Use this command to configure the settings for the FortiGuard-Antispam Service.
The FortiGate email filters are applied in the following order:
For SMTP
1 IP address BWL check - Last hop IP
2 DNSBL & ORDBL check, IP address FortiGuard check, HELO DNS lookup
3 E-mail address BWL check
4 MIME headers check
5 IP address BWL check (for IPs extracted from “Received” headers)
6 Return e-mail DNS check, FortiGuard Antispam check (for IPs extracted from “Received” headers, and
URLs in email content)
7 Banned word check
Syntax
config spamfilter fortishield
set reports-status {enable | disable}
set spam-submit-force {enable | disable}
set spam-submit-srv <url_str>
set spam-submit-txt2htm {enable | disable}
end
History
Related topics
• spamfilter bword
• spamfilter emailbwl
• spamfilter ipbwl
• spamfilter iptrust
• spamfilter mheader
• spamfilter options
• spamfilter dnsbl
ipbwl
Use this command to filter email based on the IP or subnet address.
The FortiGate email filters are generally applied in the following order:
For SMTP
1 IP address BWL check - Last hop IP
2 DNSBL & ORDBL check, IP address FortiGuard check, HELO DNS lookup
3 E-mail address BWL check
4 MIME headers check
5 IP address BWL check (for IPs extracted from “Received” headers)
6 Return e-mail DNS check, FortiGuard Antispam check (for IPs extracted from “Received” headers, and
URLs in email content)
7 Banned word check
Syntax
config spamfilter ipbwl
edit <list_int>
set name <list_str>
set comment <comment_str>
config entries
edit <address_int>
set action {clear | reject | spam}
set addr-type {ipv4 | ipv6}
set ip4-subnet {<address_ipv4mask>}
set ip6-subnet {<address_ipv6mask>}
set status {enable | disable}
end
History
Related topics
• spamfilter bword
• spamfilter emailbwl
• spamfilter fortishield
• spamfilter iptrust
• spamfilter mheader
• spamfilter options
• spamfilter dnsbl
iptrust
Use this command to add an entry to a list of trusted IP addresses.
If the FortiGate unit sits behind a company’s Mail Transfer Units, it may be unnecessary to check email IP
addresses because they are internal and trusted. The only IP addresses that need to be checked are
those from outside of the company. In some cases, external IP addresses may be added to the list if it is
known that they are not sources of spam.
Syntax
config spamfilter iptrust
edit <list_int>
set name <list_str>
set comment <comment_str>
config entries
edit <address_int>
set addr-type {ipv4 | ipv6}
set ip4-subnet {<address_ipv4mask>}
set ip6-subnet {<address_ipv6mask>}
set status {enable | disable}
end
History
FortiOS v3.0 New.
FortiOS v3.0 MR4 All models have the same CLI syntax now.
FortiOS v4.0 MR1 ip/subnet replaced by ip4-subnet and ip6-subnet. Added addr-type.
Related topics
• spamfilter bword, spamfilter emailbwl
• spamfilter fortishield
• spamfilter ipbwl
• spamfilter mheader
• spamfilter options
• spamfilter dnsbl
mheader
Use this command to configure email filtering based on the MIME header. MIME header settings are
configured with this command but MIME header filtering is enabled within each protection profile.
The FortiGate email filters are applied in the following order:
For SMTP
1 IP address BWL check - Last hop IP
2 DNSBL & ORDBL check, IP address FortiGuard check, HELO DNS lookup
3 E-mail address BWL check
4 MIME headers check
5 IP address BWL check (for IPs extracted from “Received” headers)
6 Return e-mail DNS check, FortiGuard Antispam check (for IPs extracted from “Received” headers, and
URLs in email content)
7 Banned word check
Syntax
config spamfilter mheader
edit <list_int>
set name <list_str>
set comment <comment_str>
config entries
edit <mime_int>
set action {clear | spam}
set fieldbody <mime_str>
set fieldname <mime_str>
set pattern-type {regexp | wildcard}
set status {enable | disable}
end
end
History
Related topics
• spamfilter bword
• spamfilter fortishield
• spamfilter fortishield
• spamfilter ipbwl
• spamfilter iptrust
• spamfilter options
• spamfilter dnsbl
options
Use this command to set the spamfilter DNS query timeout.
Syntax
config spamfilter options
set dns-timeout <timeout_int>
end
Example
This example shows how to set the dns timeout.
config spamfilter options
set dns-timeout 15
end
History
Related topics
• spamfilter bword
• spamfilter emailbwl
• spamfilter fortishield
• spamfilter ipbwl
• spamfilter iptrust
• spamfilter mheader
• spamfilter dnsbl
system
Use system commands to configure options related to the overall operation of the FortiGate unit,
including:
• Administrative access
• Automatic updating of antivirus and attack definitions
• High availability (HA)
• Network interfaces
• Replacement messages
• VLANs and virtual domains
This chapter contains the following sections:
accprofile fortiguard replacemsg-group
admin fortiguard-log replacemsg nac-quar
alertemail global replacemsg nntp
amc gre-tunnel replacemsg spam
arp-table ha replacemsg sslvpn
auto-install interface replacemsg traffic-quota
autoupdate clientoverride ipv6-tunnel resource-limits
autoupdate override mac-address-table session-helper
autoupdate push-update modem session-sync
autoupdate schedule npu session-ttl
autoupdate tunneling ntp settings
aux password-policy sit-tunnel
bug-report proxy-arp snmp community
central-management replacemsg admin snmp sysinfo
console replacemsg alertmail snmp user
dhcp reserved-address replacemsg auth switch-interface
dhcp server replacemsg ec tos-based-priority
dns replacemsg fortiguard-wf vdom-link
dns-database replacemsg ftp vdom-property
fips-cc replacemsg http wccp
replacemsg im wireless ap-status
replacemsg mail wireless settings
zone
accprofile
Use this command to add access profiles that control administrator access to FortiGate features. Each
FortiGate administrator account must include an access profile. You can create access profiles that deny
access, allow read only, or allow both read and write access to FortiGate features.
You cannot delete or modify the super_admin access profile, but you can use the super_admin profile with
more than one administrator account.
Syntax
config system accprofile
edit <profile-name>
set <access-group> <access-level>
set menu-file <filedata>
set radius-vdom-override {disable | enable}
set radius-accprofile-override {disable | enable}
config fwgrp-permission
set address {none | read | read-write}
set others {none | read | read-write}
set policy {none | read | read-write}
set profile {none | read | read-write}
set schedule {none | read | read-write}
set service {none | read | read-write}
end
config loggrp-permission
set config {none | read | read-write}
set data-access {none | read | read-write}
end
config utmgrp-permission
set antivirus {none | read | read-write}
set application-control {none | read | read-write}
set data-loss-prevention {none | read | read-write}
set ips {none | read | read-write}
set spamfilter {none | read | read-write}
set webfilter {none | read | read-write}
end
Examples
Use the following commands to add a new access profile named policy_profile that allows read and
write access to firewall policies and that denies access to all other FortiGate features. An administrator
account with this access profile can view and edit firewall policies, but cannot view or change any other
FortiGate settings or features.
config system accprofile
edit policy_profile
set fwgrp read-write
end
Use the following commands to add a new access profile named policy_profile_cu that allows
customized read and write access to firewall policies and that denies access to all other FortiGate features.
An administrator account with this access profile can view and edit the selected custom firewall
permissions (address, policy, and schedule), but cannot view or change any other FortiGate
settings or features.
config system accprofile
edit policy_profile_cu
set fwgrp custom
config fwgrp-permission
set address read-write
set policy read-write
set schedule read-write
end
end
end
History
FortiOS v2.80 New
FortiOS v3.0 MR1 Removed secgrp feature group.
FortiOS v3.0 MR2 Modifications for super_admin profile and read-write access-level changes (no write only).
FortiOS v3.0 MR4 Modifications for custom fwgrp firewall permissions, execute batch command control
assigned to mntgrp (Maintenance) access control group.
FortiOS v3.0 MR6 Added imp2pgrp access profile. Added config fwgrp-permission and config
loggrp-permission subcommands.
FortiOS v4.0 Removed avgrp, imp2pgrp and spamgrp from access profiles. Added endpoint-control-
grp, utmgrp, and wanoptgrp.
FortiOS v4.0 MR1 Removed ipsgrp and webgrp.
Related topics
• system admin
admin
Use this command to add, edit, and delete administrator accounts. Administrators can control what data
modules appear in the FortiGate unit system dashboard by using the config system admin command.
Administrators must have read and write privileges to make dashboard GUI modifications.
Use the default admin account or an account with system configuration read and write privileges to add
new administrator accounts and control their permission levels. Each administrator account except the
default admin must include an access profile. You cannot delete the default super admin account or
change the access profile (super_admin). In addition, there is also an access profile that allows read-only
super admin privileges, super_admin_readonly. The super_admin_readonly profile cannot be deleted or
changed, similar to the super_admin profile. This read-only super-admin may be used in a situation where
it is necessary to troubleshoot a customer configuration without making changes.
You can authenticate administrators using a password stored on the FortiGate unit or you can use a
RADIUS server to perform authentication. When you use RADIUS authentication, you can authenticate
specific administrators or you can allow any account on the RADIUS server to access the FortiGate unit as
an administrator.
Note: For users with super_admin access profile, you can reset the password in the CLI.
For a user ITAdmin with the access profile super_admin, to set the password to 123456:
config sys admin
edit ITAdmin
set password 123456
end
For a user ITAdmin with the access profile super_admin, to reset the password from 123456 to the
default ‘empty’ or ‘null’:
config sys admin
edit ITAdmin
unset password 123456
end
If you type ‘set password ?’ in the CLI, you will have to enter the new password and the old password in
order for the change to be effective. In this case, you will NOT be able to reset the password to ‘empty’ or
‘null’.
You can configure an administrator to only be allowed to log in at certain times. The default setting allows
administrators to log in any time.
A vdom/access profile override feature supports authentication of administrators via RADIUS. The admin
user will be have access depending on which vdom they are restricted to and their associated access
profile. This feature is only available to wildcard admins. There can only be one vdom-override user per
system.
For detailed information about configuring administrators, see the System Administration chapter of the
FortiGate Administration Guide for your model.
Note: You cannot change the management VDOM if any administrators are using RADIUS authentication.
Syntax
config system admin
edit <name_str>
set accprofile <profile-name>
set comments <comments_string>
set force-password-change {enable | disable}
set ip6-trusthost1 <address_ipv6mask>
set ip6-trusthost2 <address_ipv6mask>
Example
Use the following commands to add a new administrator account named new_admin with the password
set to p8ssw0rd and that includes an access profile named policy_profile. It is accessible on the
main_office VDOM. Administrators that log in to this account will have administrator access to the
FortiGate unit from any IP address. The dashboard setting alert > show-system-restart is enabled
and displays in column 2 of the FortiOS GUI.
History
Related topics
• system accprofile
alertemail
Use this command to configure the FortiGate unit to access an SMTP server to send alert emails. This
command is global in scope.
To configure alertemail settings you must first configure the server, and enable authenticate. Then you will
be able to see all the fields.
Note: You must configure the server setting under config system alertemail before the
commands under config alertemail become accessible. If vdoms are enabled, config system
alertemail is a global command, and config alertemail is per vdom. For more information on
config alertemail, see “alertemail” on page 67.
Syntax
config system alertemail
set authenticate {disable | enable}
set password <password_str>
set port <port_integer>
set server {<name-str> | <address_ipv4>}
set username <username_str>
end
Examples
This example shows how to configure the FortiGate unit to send alert emails using the SMTP server
smtp.example.com. The order of the fields is important. The server must be defined first. Then
authentication needs to be next. The FortiGate unit uses the user name admin2 and the password
h8rdt0g3uss to connect to the SMTP server.
config system alertemail
set server smtp.example.com
set authenticate enable
set password h8rdt0g3uss
History
amc
Use this command to configure AMC ports on your FortiGate unit. The number of AMC ports on your
FortiGate unit will vary by model.
When you first get your FortiGate unit with AMC ports, the AMC ports must be configured before the ports
can be used. The settings are different for single width and double width ports.
The auto setting will recognize any card used in the AMC port, but when you remove the card it will not
retain any configuration settings.
The asm-cx4, asm-disk, asm-fb4, asm-cx4, adm-xb2, and adm-fb8 settings will retain any
configurations related to that card until a different type of card is inserted. For example if the port is set to
asm-disk with configurations for that disk, and if the disk needs to be replaced it can be removed and it or
one of the same type can be re-inserted with the FortiGate unit retaining all the related configurations.
To use an AMC slot that is configured for one type of card with a different type of card, you must first set
the slot to none, and then reconfigure the slot for the new type of card. This will remove all configuration
that was associated with the previous AMC card.
Syntax
config system amc
set {sw1 | sw2} {asm-cx4 | asm-disk | asm-fb4 | asm-fx2 | auto | none}
set {dw1 | dw2} {adm-fb8 | adm-xb2 | auto | none}
end
History
arp-table
Use this command to manually configure add ARP table entries to the FortiGate unit. ARP table entries
consist of a interface name, an IP address, and a MAC address.
Limits for the number of ARP table entries are software limits set by the FortiGate configuration as
documented in the FortiGate Maximum Values Matrix document.
This command is available per VDOMs.
Syntax
config system arp-table
edit <table_value>
set interface <port>
set ip <address_ipv4>
set mac <mac_address>
end
Examples
This example adds an entry to the arp table with a MAC address of 00-09-0f-69-00-7c and an IP address of
172.20.120.161 on the port2 interface.
config system arp-table
edit 3
set interface port2
set ip 172.20.120.161
set mac 00:09:0f:69:00:7c
end
History
Related topics
• get system arp
auto-install
Use this command to configure automatic installation of firmware and system configuration from a USB
disk when the FortiGate unit restarts. This command is available only on units that have a USB disk
connection.
If you set both configuration and firmware image update, both occur on the same reboot. The FortiGate
unit will not reload a firmware or configuration file that is already loaded.
Third-party USB disks are supported; however, the USB disk must be formatted as a FAT16 drive. No other
partition type is supported.
To format your USB Disk when its connected to your FortiGate unit, at the CLI prompt type
“exe usb-disk format”.
To format your USB disk when it is connected to a Windows system, at the command prompt type
“format <drive_letter>: /FS:FAT /V:<drive_label>” where <drive_letter> is the letter of
the connected USB drive you want to format, and <drive_label> is the name you want to give the USB
disk volume for identification.
Note: This command is available only when a USB key is installed on the FortiGate unit. Formatting your
USB disk will delete all information on your USB disk.
Syntax
config system auto-install
set auto-install-config {disable | enable}
set auto-install-image {disable | enable}
set default-config-file
set default-image-file
end
History
autoupdate clientoverride
Use this command to receive updates on a different interface than the interface connected to the
FortiGuard Distribution Network (FDN). This command changes the source IP address of update requests
to the FortiGuard server, causing it to send the update to the modified source address.
This is useful if your company uses an internal updates server instead of FDN.
Syntax
config system autoupdate clientoverride
set status {enable | disable}
set address <address_ipv4>
end
Example
This example shows how to add a push update client IP address 192.168.21.145 which is on the port 4
interface.
config system autoupdate clientoverride
set address 192.168.21.145
set status enable
end
History
Related topics
• system autoupdate override
• system autoupdate push-update
• system autoupdate schedule
• system autoupdate tunneling
• execute update-ase
autoupdate override
Use this command to specify an override FDS server.
If you cannot connect to the FortiGuard Distribution Network (FDN) or if your organization provides
updates using their own FortiGuard server, you can specify an override FDS server so that the FortiGate
unit connects to this server instead of the FDN.
Note: If you are unable to connect to the FDS server, even after specifying an override server, it is
possible your ISP is blocking the lower TCP and UDP ports for security reasons. Contact your ISP to
make sure they unblock TCP and UDP ports 1025 to 1035 to enable FDS server traffic. Another option is
to use config global set ip-src-port-range to move the ports used to a higher range and avoid any
possible problems. For more information, see “global” on page 423.
Syntax
config system autoupdate override
set status {enable | disable}
set address <FDS_address>
set failover {enable | disable}
end
Example
This example shows how to add and enable your company’s own FDS override server with an IP address
of 192.168.87.145.
config system autoupdate override
set address 192.168.87.145
set status enable
end
History
Related topics
• system autoupdate push-update
• system autoupdate schedule
• system autoupdate tunneling
• execute update-ase
• execute update-ips
autoupdate push-update
Use this command to configure push updates. The FortiGuard Distribution Network (FDN) can push
updates to FortiGate units to provide the fastest possible response to critical situations such as software
exploits or viruses. You must register the FortiGate unit before it can receive push updates.
When you configure a FortiGate unit to allow push updates, the FortiGate unit sends a SETUP message to
the FDN. The next time an update is released, the FDN notifies all FortiGate units that are configured for
push updates that a new update is available. Within 60 seconds of receiving a push notification, the
FortiGate unit requests an update from the FDN.
By using this command, you can enable or disable push updates. You can also configure push IP address
and port overrides. If the FDN must connect to the FortiGate unit through a NAT device, you must
configure port forwarding on the NAT device and add the port forwarding information to the push update
override configuration.
Note: You cannot receive push updates through a NAT device if the external IP address of
the NAT device is dynamic (for example, set using PPPoE or DHCP).
Syntax
config system autoupdate push-update
set system status {enable | disable}
set system override {enable | disable}
set system address <push_ipv4>
set system port <FDN_port>
end
Example
This example shows how to enable push updates on port 9993.
config system autoupdate push-update
set status enable
set port 9993
end
History
Related topics
• system autoupdate override, system autoupdate schedule, system autoupdate tunneling
• execute update-ase, execute update-ips
autoupdate schedule
Use this command to enable or disable scheduled FDN updates at regular intervals throughout the day,
once a day, or once a week.
To have your FortiGate unit to update at a random time during a particular hour, select a time that includes
60 minutes as this will choose a random time during that hour for the scheduled update.
Syntax
config system autoupdate schedule
setsystem status {enable | disable}
setsystem frequency {every | daily | weekly}
setsystem time <hh:mm>
setsystem day <day_of_week>
end
Example
This example shows how to configure the FortiGate unit to check the FortiGuard Distribution Network
(FDN) for updates once a day at 3:00 in the morning.
config system autoupdate schedule
set frequency daily
set time 03:00
set status enable
end
This example is the same as the above example but it will check for updates once a day at sometime
between 3:00 and 4:00 in the morning.
config system autoupdate schedule
set frequency daily
set time 03:60
set status enable
end
History
Related topics
• system autoupdate override
• system autoupdate push-update
• system autoupdate tunneling
• system global
autoupdate tunneling
Use this command to configure the FortiGate unit to use a proxy server to connect to the FortiGuard
Distribution Network (FDN). You must enable tunneling so that you can use the proxy server, and also add
the IP address and port required to connect to the proxy server. If the proxy server requires authentication,
add the user name and password required to connect to the proxy server.
The FortiGate unit connects to the proxy server using the HTTP CONNECT method, as described in RFC
2616. The FortiGate unit sends a HTTP CONNECT request to the proxy server (optionally with
authentication information) specifying the IP address and port required to connect to the FDN. The proxy
server establishes the connection to the FDN and passes information between the FortiGate unit and the
FDN.
The CONNECT method is used mostly for tunneling SSL traffic. Some proxy servers do not allow
CONNECT to connect to any port; proxy servers restrict the allowed ports to the well known ports for
HTTPS and perhaps some other similar services. FortiGate autoupdates use HTTPS on port 8890 to
connect to the FDN, so your proxy server may need to be configured to allow connections on this port.
Syntax
config system autoupdate tunneling
set address <proxy_address>
set password <password>
set port <proxy_port>
set status {enable | disable}
set username <name>
end
Example
This example shows how to enable tunneling where the FortiGate unit must connect to a proxy server with
IP address 192.168.50.134 that uses port 8080, requires the user id proxy_user and the password
proxy_pwd.
config system autoupdate tunneling
set address 192.168.50.134
set port 8080
set username proxy_user
set password proxy_pwd
set status enable
end
History
Related topics
• system autoupdate override
• system autoupdate push-update
• system autoupdate schedule
aux
Use this command to configure the AUX port. You can use a modem connected to the AUX port to
remotely connect to a console session on the FortiGate unit. The AUX port is located near the console
port, but not all FortiGate models have an AUX port.
The main difference between the standard console port and the AUX port is that the standard console port
is for local serial console connections only. An AUX port cannot accept a modem connection to establish a
remote console connection. The AUX console port allows you to establish a local connection, but it has
some limitations the standard console port does not have.
• The AUX port will not display the booting messages that the standard console connection displays.
• The AUX port will send out modem initializing strings (AT strings) that will appear on an AUX console
session at the start.
Syntax
config system aux
set baudrate <baudrate>
end
<baudrate> is the speed of the connection. It can be set to one of the following: 9600, 19200, 38400,
57600, or 115200. The default is 9600.
Ensure devices on both ends of the connection are set to the same baudrate.
History
Related topics
• system console
bug-report
Use this command to configure a custom email relay for sending problem reports to Fortinet customer
support.
Syntax
config system bug-report
set auth {no | yes}
set mailto <email_address>
set password <password>
set server <servername>
set username <name>
set username-smtp <account_name>
end
Example
This example shows how to configure the FortiGate unit to send bug report email from the
ourmailserver.com email server to [email protected] using the User1 account. The email
server requires authentication.
config system bug-report
set auth yes
set mailto [email protected]
set password 123456
set server ourmailserver.com
set username OurAdmin
end
History
Related topics
• system dns
central-management
Use this command to configure a central management server for this FortiGate unit. Central management
uses a remote server to backup, restore configuration, and monitor the FortiGate unit. The remote server
can be either a FortiManager or a FortiGuard server.
This command replaces the config system fortimanager command from earlier versions.
Syntax
config system central-management
set allow-monitor {enable | disable}
set allow-push-configuration {enable | disable}
set allow-pushd-firmware {enable | disable}
set allow-remote-firmware-upgrade {enable | disable}
set authorized-manager-only {enable | disable}
set auto-backup {enable | disable}
set fmg <fmg_ipv4>
set schedule-config-restore {enable | disable}
set schedule-script-restore {enable | disable}
set serial-number <fmg_serial_number>
set status {enable | disable}
set type { fortiguard | fortimanager }
set vdom <name_string>
end
Example
This example shows how to configure remote service between a FortiGate unit and a FortiManager unit
that has an IP address of 172.16.55.121 and a serial number of FMG40A3906500505. The connection
between the FortiGate and FortiManager units is over vdom_1 VDOM.
config system central-management
set status enable
set type fortimanager
set fmg 172.16.55.121
set serial-number FMG40A3906500505
set auto-backup enable
set vdom vdom_1
end
History
FortiOS v4.0 New. Replaces the older config system fortimanager command.
Related topics
• system dns
console
Use this command to set the console command mode, the number of lines displayed by the console, and
the baud rate.
Fortigate-1000A, 1000AFA2, and 3000A models have an AUX port that can be used for remote console
connections using a modem. This port on these models is configured with the system aux command, see
“aux” on page 404.
Note: If this FortiGate unit is connected to a FortiManager unit running scripts, output must be set to
standard for scripts to execute properly.
If this FortiGate unit is connected to a FortiManager unit running scripts, output must be set to standard
for scripts to execute properly.
Syntax
config system console
set baudrate <speed>
set mode {batch | line}
set output {standard | more}
end
Example
This example shows how to set the baudrate to 38400 and set the output style to more so it will pause after
each screen full of information.
config system console
set baudrate 38400
set output more
end
History
Related topics
• system aux
dhcp reserved-address
Use this command to reserve an IP address for a particular client identified by its device MAC address and
type of connection. The DHCP server then always assigns the reserved IP address to the client. You can
define up to 200 reserved addresses.
Note: For this configuration to take effect, you must configure at least one DHCP server using the
config system dhcp server command, see “dhcp server” on page 410.
Syntax
config system dhcp reserved-address
edit <name_str>
set ip <address_ipv4>
set mac <address_hex>
set type {regular | ipsec}
end
Example
Use the following command to add a reserved address named client_1 consisting of IP address
192.168.110.3 and MAC address 00:09:0F:0A:01:BC for a regular ethernet connection.
config system dhcp reserved-address
edit client_1
set ip 192.168.110.3
set mac 00:09:0F:0A:01:BC
set type regular
end
History
Related topics
• system dhcp server
• system interface
dhcp server
Use this command to add one or more DHCP servers for any FortiGate interface. As a DHCP server, the
interface dynamically assigns IP addresses to hosts on a network connected to the interface.
You can use the config system dhcp reserved command to reserve an address for a specific MAC
address. For more information see “system dhcp reserved-address” on page 409.
You can add more than one DHCP server to a single interface to be able to provide DHCP services to
multiple networks. For more information on configuring your network and FortiGate unit to use multiple
DHCP servers on one interface, see the System DHCP chapter in the Administration Guide for your
FortiGate unit.
This command is available in NAT/Route mode only.
Syntax
config system dhcp server
edit <dhcpservername>
set conflicted-ip-timeout <timeout_int>
set default-gateway <address_ipv4>
set dns-server1 <address_ipv4>
set dns-server2 <address_ipv4>
set dns-server3 <address_ipv4>
set domain <domain_name_str>
set enable {enable | disable}
set end-ip <address_ipv4>
set interface <interface_name>
set ipsec-lease-hold <release_seconds>
set lease-time <seconds>
set netmask <mask>
set option1 <option_code> [<option_hex>]
set option2 <option_code> [<option_hex>]
set option3 <option_code> [<option_hex>]
set server-type <type>
set start-ip <address_ipv4>
set wins-server1 <wins_ipv4>
set wins-server2 <wins_ipv4>
config exclude-range
edit <excl_range_num>
set end-ip <excl_ipv4>
set start-ip <excl_ipv4>
end
end
Example
Use the following command to add a DHCP server named new_dhcp. This DHCP server assigns IP
addresses to computers connected to the same network as the internal interface. The IP addresses
assigned are in the range 192.168.33.100 to 192.168.33.200. The example DHCP configuration also sets
the netmask, default gateway, two DNS server IP addresses, the lease time, and one WINS server.
config system dhcp server
edit new_dhcp
set interface internal
set start-ip 192.168.33.100
set end-ip 192.168.33.200
set netmask 255.255.255.0
set default-gateway 192.168.33.1
set dns-server1 56.34.56.96
set dns-server2 56.34.56.99
set lease-time 4000
set wins-server1 192.168.33.45
end
The following command shows how to add an exclusion range from 192.168.20.22 to 192.168.20.25.
config system dhcp server
edit new_dhcp
config exclude-range
edit 1
set start-ip 192.168.20.22
set end-ip 192.168.20.25
end
end
History
Related topics
• system dhcp reserved-address
• system interface
dns
Use this command to set the DNS server addresses. Several FortiGate functions, including sending email
alerts and URL blocking, use DNS.
Syntax
config system dns
set cache-notfound-responses {enable | disable}
set dns-cache-limit <integer>
set dns-cache-ttl <int>
set domain <domain_name>
set ip6-primary <dns_ipv6>
set ip6-secondary <dns_ip6>
set primary <dns_ipv4>
set secondary <dns_ip4>
end
Example
This example shows how to set the primary FortiGate DNS server IP address to 45.37.121.76 and the
secondary FortiGate DNS server IP address to 45.37.121.77.
config system dns
set primary 45.37.121.76
set secondary 45.37.121.77
end
History
dns-database
Use this command to configure the FortiGate DNS database so that DNS lookups from an internal network
are resolved by the FortiGate DNS database. To configure the DNS database you add zones. Each zone
has its own domain name.
You then add entries to each zone. An entry is an host name and the IP address it resolves to. You can
also specify if the entry is an IPv4 address (A), an IPv6 address (AAAA), a name server (NS), a canonical
name (CNAME), or a mail exchange (MX) name.
Syntax
conf system dns-database
edit <zone-string>
set domain <domain>
set ttl <int>
config dns-entry
edit <entry-id>
set canonical-name <canonical_name_string>
set hostname <hostname_string>
set ip <ip_address>
set ipv6 <ipv6_address>
set preference <preference_value>
set status {enable | disable}
set ttl <entry_ttl_value>
set type {A|AAAA|MX|NS|CNAME}
end
end
Example
This example shows how to add a DNS zone named Zone_1 and add an IPv4 address entry to the zone.
config system dns-database
edit Zone_1
set domain example.net
config dns-entry
edit 1
set type A
set hostname myhost
set ip 10.10.10.1
end
end
History
fips-cc
Use this command to set the FortiGate unit into FIPS-CC mode.
Enable Federal Information Processing Standards-Common Criteria (FIPS-CC) mode. This is an
enhanced security mode that is valid only on FIPS-CC-certified versions of the FortiGate firmware.
When switching to FIPS-CC mode, you will be prompted to confirm, and you will have to login.
Note: When you enable FIPS-CC mode, all of the existing configuration is lost.
For more information on FIPS-CC mode, see the FIPS-CC technote on the Knowledge Center website.
Syntax
config system fips-cc
set status <enable | disable>
end
History
FortiOS v3.0 MR6 Command moved from config system global set CC-mode.
fortiguard
Use this command to configure communications with the FortiGuard Distribution Network (FDN) for
FortiGuard subscription services such as:
• FortiGuard Antivirus and IPS
• FortiGuard Web Filtering and Antispam
• FortiGuard Analysis and Management Service
For FortiGuard Antivirus and IPS, Web Filtering and Antispam, you can alternatively use this command to
configure the FortiGate unit to communicate with a FortiManager system, which can act as a private
FortiGuard Distribution Server (FDS) for those services.
By default, FortiGate units connect to the FDN using a set of default connection settings. You can override
these settings to use IP addresses and port numbers other than the defaults. For example, if you have a
FortiManager unit, you might download a local copy of FortiGuard service updates to the FortiManager
unit, then redistribute those updates by configuring each FortiGate unit’s server override feature to connect
to the FortiManager unit’s private FDS IP address. For more information about configuring the
FortiManager system to act as a private FDS, see the FortiManager Administration Guide.
IP address and port number overrides for FortiGuard Analysis and Management Service are configured
separately from other FortiGuard services. For more information, see “system fortiguard-log” on page 422.
For additional information on the FortiGuard Analysis and Management Service, see the FortiGuard
Analysis and Management Service Administration Guide.
Note: If the FortiGate unit is unable to connect to the FDN, verify connectivity on required ports. For a list
of required ports, see the Fortinet Knowledge Center article Traffic Types and TCP/UDP Ports Used by
Fortinet Products.
Syntax
config system fortiguard
set hostname <url_str>
set port {53 | 8888}
set srv-ovrd {enable | disable}
set client-override-ip <ovrd_ipv4>
set client-override-status {enable | disable}
set service-account-id <id_str>
set load-balance-servers <number>
set analysis-service {enable | disable}
set antispam-status {enable | disable}
set antispam-cache {enable | disable}
set antispam-cache-ttl <ttl_int>
set antispam-cache-mpercent <ram_int>
set antispam-timeout <timeout_int>
set avquery-status {enable | disable}
set avquery-cache {enable | disable}
set avquery-cache-ttl <ttl_int>
set avquery-cache-mpercent <max_int>
set avquery-timeout <timeout_int>
set central-mgmt-auto-backup {enable | disable}
set central-mgmt-scheduled-config-restore {enable | disable}
set central-mgmt-scheduled-upgrade {enable | disable}
Example
This example shows how to configure the FortiGate unit for remote administration by FortiGuard Analysis
and Management Service.
config system fortiguard
set central-mgmt-status enable
set service-account-id ExampleCo
set central-mgmt-auto-backup enable
set central-mgmt-config-restore enable
set central-mgmt-scheduled-upgrade enable
end
config system management-tunnel
end
History
FortiOS v3.0 New.
FortiOS v3.0 MR2 Added get system fortiguard-service status command reference.
FortiOS v3.0 MR5 Added service-account id, central-mgmt-status, central-mgmt-
schedule-upgrade, central-mgmt-auto-backup, and central-mgmt-
scheduled-config-restore for FortiGuard Analysis and Management Service
and future FortiManager system features.
FortiOS v3.0 MR7 Added load-balance-servers field and the analysis-service field.
FortiOS v4.0 MR1 Added addr-type, ip6.
Related topics
• get system dashboard
• system fortiguard-log
• system central-management
• fortiguard setting
fortiguard-log
Use this command to override default ports and IP addresses that the FortiGate unit connects to for
FortiGuard Analysis and Management Service.
Syntax
config system fortiguard-log
set controller-ip <address_ipv4>
set controller-port <port_int>
set override-controller {enable | disable}
end
Example
This example shows how to override the default IP address and port number to which the FortiGate unit
connects when communicating with the FortiGuard Analysis and Management Service for features such as
remote logging and reporting.
config system fortiguard-log
set override-controller enable
set controller-ip 172.16.21.155
set controller-port 1234
end
History
Related topics
• system fortiguard
• fortiguard setting
global
Use this command to configure global settings that affect various FortiGate systems and configurations.
Runtime-only config mode was introduced in FortiOS v3.0 MR2. This mode allows you to try out
commands that may put your FortiGate unit into an unrecoverable state normally requiring a physical
reboot. In runtime-only config mode you can set a timeout so after a period of no input activity the
FortiGate unit will reboot with the last saved configuration. Another option in runtime-only configuration
mode is to manually save your configuration periodically to preserve your changes. For more information
see set cfg-save {automatic | manual | revert}, set cfg-revert-timeout <seconds>,
and execute cfg reload.
Switch mode is available on FortiWiFi 60B, FortiGate 60B, FortiGate 100A (Rev2.0 and higher), and
FortiGate 200A (Rev2.0 and higher) models where the internal interface is a four or six port switch.
Normally the internal interface is configured as one interface shared by all four ports. Switch mode allows
you to configure each interface on the switch separately with their own interfaces. A VLAN can not be
configured on a switch interface. Consult your release notes for the most current list of supported models
for this feature. The fields internal-switch-mode {hub | interface | switch} and
internal-switch-speed {100full | 100half | 10full | 10half | auto} apply only to
switch mode enabled FortiGate models.
Syntax
config system global
set access-banner {enable | disable}
set admin-https-pki-required {enable | disable}
set admin-lockout-duration <time_int>
set admin-lockout-threshold <failed_int>
set admin-maintainer {enable | disable}
set admin-port <port_number>
set admin-scp {enable | disable}
set admin-server-cert { self-sign | <certificate> }
set admin-sport <port_number>
set admin-ssh-port <port_number>
set admin-ssh-v1 {enable | disable}
set admin-telnet-port <port_number>
set admintimeout <admin_timeout_minutes>
set anti-replay {disable | loose | strict}
set auth-cert <cert-name>
set auth-http-port <http_port>
set auth-https-port <https_port>
set auth-keepalive {enable | disable}
set auth-policy-exact-match {enable | disable}
set av-failopen {idledrop | off | one-shot | pass}
set av-failopen-session {enable | disable}
set batch-cmdb {enable | disable}
set cfg-save {automatic | manual | revert}
set cfg-revert-timeout <seconds>
set check-protocol-header {loose | strict}
set check-reset-range {enable | disable}
set clt-cert-req {enable | disable}
set daily-restart {enable | disable}
set detection-summary {enable | disable}
set dst {enable | disable}
set endpoint-control-portal-port <endpoint_port>
Example
This example shows how to change to enable daylight savings time.
config system global
set dst enable
end
History
Related topics
• execute cfg reload
• execute cfg save
gre-tunnel
Use this command to configure the tunnel for a GRE interface. A new interface of type “tunnel” with the
same name is created automatically as the local end of the tunnel. This command is available only in
NAT/Route mode.
To complete the configuration of a GRE tunnel, you need to:
• configure a firewall policy to pass traffic from the local private network to the tunnel interface
• configure a static route to the private network at the remote end of the tunnel using the GRE tunnel
“device”
• optionally, define the IP addresses for each end of the tunnel to enable dynamic routing through the
tunnel or to enable pinging of each end of the tunnel for testing
Syntax
config system gre-tunnel
edit <tunnel_name>
set interface <interface_name>
set local-gw <localgw_IP>
set remote-gw <remotegw_IP>
end
Example
In this example, a GRE tunnel is needed between two sites using FortiGate units. Users on the
192.168.2.0/24 network at Site A need to communicate with users on the 192.168.3.0/24 network at Site
B. At both sites the private network is connected to Port 2 of the FortiGate unit and the connection to the
Internet is through Port 1. At Site A, the public IP address is 172.16.67.199 and at Site B it is
172.16.68.198.
(Optional) (Optional)
config system interface config system interface
edit toSiteB edit toSiteA
set ip 10.0.0.1/32 set ip 10.0.0.2/32
set remote-ip 10.0.0.2 set remote-ip 10.0.0.1
set allowaccess ping set allowaccess ping
end end
History
Related topics
• system interface
• firewall policy, policy6
• router static
ha
Use this command to enable and configure FortiGate high availability (HA) and virtual clustering. HA is
supported on FortiGate and FortiWiFi models numbered 60 and higher. Using the config system ha
command you must configure all cluster members with the same group name, mode, and password before
the FortiGate units can form a cluster.
Group name, mode, password, as well as priority and group ID are not synchronized between cluster units.
The primary unit synchronizes all other configuration settings, including the other HA configuration
settings.
When virtual domains are enabled for the FortiGate units to be operating in HA mode you are configuring
virtual clustering. Using virtual clustering you create two virtual clusters and add virtual domains to each
cluster. Configuring virtual clustering is very similar to configuring normal HA except that in a virtual cluster,
the HA mode can only be set to active-passive. As well additional options are available for adding virtual
domains to each virtual cluster and for setting the device priority for each device in each virtual cluster.
Note: You cannot enable HA mode if one of the FortiGate unit interfaces uses DHCP or PPPoE to acquire an IP
address. If DHCP or PPPoE is configured, the config ha mode keyword is not available. You also cannot enable
HA mode if you have configured standalone session synchronization. See “system session-sync” on page 509.
Note: You cannot enable HA mode if you have configured standalone session synchronization. See “system
session-sync” on page 509.
For complete information about how to configure and operate FortiGate HA clusters and more detail about
the config system ha CLI command, see the FortiGate HA Overview, the FortiGate HA Guide, and the
Fortinet Knowledge Center.
Syntax
config system ha
set arps <arp_integer>
set arps-interval <interval_integer>
set authentication {disable | enable}
set encryption {disable | enable}
set group-id <id_integer>
set group-name <name_str>
set hb-interval <interval_integer>
set hb-lost-threshold <threshold_integer>
set hbdev <interface_name> <priority_integer> [<interface_name>
<priority_integer>]...
set helo-holddown <holddown_integer>
set link-failed-signal {disable | enable}
set load-balance-all {disable | enable}
set mode {a-a | a-p | standalone}
set monitor <interface_names>
set override {disable | enable}
set password <password_str>
set pingserver-failover-threshold <threshold_integer>
set pingserver-flip-timeout <timeout_integer>
set pingserver-monitor-interface <interface_names>
set priority <priority_integer>
set route-hold <hold_integer>
set route-ttl <ttl_integer>
set route-wait <wait_integer>
Examples
This example shows how to configure a FortiGate unit for active-active HA operation. The example shows
how to set up a basic HA configuration by setting the HA mode, changing the group-name, and entering a
password. You would enter the exact same commands on every FortiGate unit in the cluster. In the
example virtual domains are not enabled.
config system ha
set mode a-a
set group-name myname
set password HApass
end
The following example shows how to configure a FortiGate unit with virtual domains enabled for active-
passive HA operation. In the example, the FortiGate unit is configured with three virtual domains
(domain_1, domain_2, and domain_3) in addition to the root virtual domain. The example shows how to
set up a basic HA configuration similar to the previous example; except that the HA mode can only be set
to a-p. In addition, the example shows how to enable vcluster2 and how to add the virtual domains
domain_2 and domain_3 to vcluster2.
config global
config system ha
set mode a-p
set group-name myname
set password HApass
set vcluster2 enable
config secondary-vcluster
set vdom domain_2 domain_3
end
end
end
The following example shows how to change the device priority of the primary unit to 200 so that this
cluster unit always becomes the primary unit. When you log into the cluster you are actually connecting to
the primary unit. When you change the device priority of the primary unit this change only affects the
primary unit because the device priority is not synchronized to all cluster units. After you enter the following
commands the cluster renegotiates and may select a new primary unit.
config system ha
set priority 200
end
The following example shows how to change the device priority of a subordinate unit to 255 so that this
subordinate unit becomes the primary unit. This example involves connecting to the cluster CLI and using
the execute ha manage 0 command to connect to the highest priority subordinate unit. After you enter
the following commands the cluster renegotiates and selects a new primary unit.
execute ha manage 0
config system ha
set priority 255
end
The following example shows how to change the device priority of the primary unit in virtual cluster 2. The
example involves connecting to the virtual cluster CLI and changing the global configuration. In the
example virtual cluster 2 has already been enabled so all you have to do is use the config secondary-
vcluster command to configure virtual cluster 2.
config global
config system ha
config secondary-vcluster
set priority 50
end
end
end
The following example shows how to change the default heartbeat interface configuration so that the port4
and port1 interfaces can be used for HA heartbeat communication and to give the port4 interface the
highest heartbeat priority so that port4 is the preferred HA heartbeat interface.
config system ha
set hbdev port4 100 port1 50
end
The following example shows how to enable monitoring for the external, internal, and DMZ interfaces.
config system ha
set monitor external internal dmz
end
The following example shows how to configure weighted round robin weights for a cluster of three
FortiGate units. You can enter the following commands to configure the weight values for each unit:
Table 10: Example weights for three cluster units
Using remote IP monitoring to select a new primary unit can be useful in a number of ways depending on
your network configuration. For example, in a full mesh HA configuration, with remote IP monitoring the
cluster can detect failures in network equipment that is not directly connected to the cluster but that would
interrupt traffic processed by the cluster if the equipment failed. In the example topology shown in Figure 5,
the switch connected directly to the primary unit is operating normally but the link on the other side of the
switches fails. As a result traffic can no longer flow between the primary unit and the Internet.
To detect this failure you can create a remote IP monitoring configuration consisting of a ping server on
port2 of the cluster. The primary unit tests connectivity to 192.168.20.20. If the ping server cannot connect
to 192.268.20.20 the cluster to fails over and the subordinate unit becomes the new primary unit. The
remote HA monitoring ping server on the new primary unit can connect to 192.168.20.20 so the failover
maintains connectivity between the internal network and the Internet through the cluster.
Internet
port1
Switch Switch
Router
Internal Network
Note: If you add two IP addresses to the detectserver field the ping will be sent to both at the same time, and
only when neither server responds will the ping server fail.
• Add secondary IPs to any interface and enter detectserver and ha-priority for each of the
secondary IPs. You can do this to monitor multiple IP addresses on any interface and set a different
HA priority for each one. By adding multiple ping servers to the remote HA monitoring configuration
and setting the HA priorities for each you can fine tune remote IP monitoring. For example, if its more
important to maintain connections to some remote IPs you can set the HA priorities higher for these
IPs. And if its less important to maintain connections to other remote IPs you can set the HA priorities
lower for these IPs. You can also adjust the pingserver-failover-threshold so that if the
cluster cannot connect to one or two high priority IPs a failover occurs. But a failover will not occur if
the cluster cannot connect to one or two low priority IPs.
Command History
interface
Use this command to edit the configuration of a FortiGate physical interface, VLAN subinterface, IEEE
802.3ad aggregate interface, redundant interface, or IPSec tunnel interface.
In the following table, VLAN subinterface can be substituted for interface in most places except that you
can only configure VLAN subinterfaces with static IP addresses. Use the edit command to add a VLAN
subinterface.
Note: VLAN communication over the backplane interfaces is available for FortiGate-5000 modules
installed in a FortiGate-5020 chassis. The FortiSwitch-5003 does not support VLAN-tagged packets so
VLAN communication is not available over the FortiGate-5050 and FortiGate-5140 chassis backplanes.
Some fields are specific to aggregate interfaces. These appear at the end of the list of commands under
“variables for aggregate and redundant interfaces (models 300A, 310B, 400A, 500A, 620B, and 800 or
higher)” on page 464.
Some FortiGate models support switch mode for the internal interfaces. Switch mode allows you to
configure each interface on the switch separately with their own interfaces. A VLAN can not be configured
on a switch interface. For more information, see “global” on page 423.
Using the one-arm intrusion detection system (IDS), you can now configure a FortiGate unit to operate as
an IDS appliance by sniffing packets for attacks without actually receiving and otherwise processing the
packets. For more information, see the ips-sniffer-mode {enable | disable} field.
An interface’s IPv6 address can be included in a Multi Listener Discovery (MLD) report. By default the
FortiGate unit includes no addresses in the MLD report. For more information, see the ip6-send-adv
{enable | disable} field.
Syntax
Entering a name string for the edit field that is not the name of a physical interface adds a VLAN
subinterface.
config system interface
edit <interface_name>
set allowaccess <access_types>
set alias <name_string>
set arpforward {enable | disable}
set auth-type <ppp_auth_method>
set bfd {enable | disable | global}
set bfd-desired-min-tx <interval_msec>
set bfd-detect-mult <multiplier>
set bfd-required-min-rx <interval_msec>
set broadcast-forward {enable | disable}
set ddns {enable | disable}
set ddns-domain <ddns_domain_name>
set ddns-password <ddns_password>
set ddns-profile-id <dnsart_profile_id>
set ddns-server <ddns_service>
set ddns-sn <ddns_sn>
set ddns-username <ddns_username>
set defaultgw {enable | disable}
set description <text>
set detectprotocol <detection-protocols>
set detectserver <pingserver_ipv4> [pingserver2_ipv4]
set dhcp-client-identifier <client_name_str>
set dhcp-relay-ip <dhcp_relay1_ipv4> {... <dhcp_relay8_ipv4>}
end
config secondaryip
edit <secondary_ip_id>
set allowaccess <access_types>
set detectserver <pingserver_ipv4> [pingserver2_ipv4]
set gwdetect {enable | disable}
set ha-priority <priority_integer>
set ip <interface_ipv4mask>
end
end
config wifi-mac_list
edit <entry_number>
set mac <mac_address>
end
Note: A VLAN cannot have the same name as a zone or a virtual domain.
ip6-default-life Enter the number, in seconds, to add to the Router Lifetime 1800
<ipv6_life_seconds> field of router advertisements sent from the interface. The valid
range is 0 to 9000.
This is available in NAT/Route mode only.
ip6-hop-limit Enter the number to be added to the Cur Hop Limit field in the 0
<ipv6_hops_limit> router advertisements sent out this interface. Entering 0 means
no hop limit is specified. This is available in NAT/Route mode
only.
This is available in NAT/Route mode only.
ip6-link-mtu <ipv6_mtu> Enter the MTU number to add to the router advertisements 0
options field. Entering 0 means that no MTU options are sent.
This is available in NAT/Route mode only.
ip6-manage-flag Enable or disable the managed address configuration flag in disable
{disable | enable} router advertisements.
This is available in NAT/Route mode only.
Example
This example shows how to set the internal interface IP address and netmask to 192.168.100.159
255.255.255.0, and the management access to ping, https, and ssh.
config system interface
edit internal
set allowaccess ping https ssh
set ip 192.168.110.26 255.255.255.0
end
This example shows how to add a loopback interface with a name of loop1. The IP address is set to
10.0.0.10 255.255.255.0 and bfd is set to global. Any traffic sent to this interface will be dropped, as it is a
blackhole route.
config system interface
edit loop1
set type loopback
set ip 10.0.0.10 255.255.255.0
set bfd global
end
This example shows how to configure DHCP on the external interface. The addressing mode is DHCP, the
default gateway retrieved from the DHCP server, and the client identifier is changed to “myClientID”. This
interface is configured as a DHCP relay agent using non-ipsec with two relay servers configured on this
network at 192.168.11.12 and 192.168.11.14.
This example shows how to add a secondary IP address and netmask of 192.176.23.180
255.255.255.0 to the internal interface. Also configure ping and https management access to this
secondary IP address. You can not add a secondary IP that is part of the subnet of the original interface IP
address.
config system interface
edit internal
config secondaryip
edit 1
set allowaccess ping https
set ip 192.176.23.180 255.255.255.0
end
end
History
ipv6-tunnel
Use this command to tunnel IPv4 traffic over an IPv6 network. The IPv6 interface is configured under
config system interface. All subnets between the source and destination addresses must support
IPv6.
Syntax
config system ipv6-tunnel
edit <tunnel_name>
set destination <remote_IPv6_address>
set interface <name>
set source <local_IPv6_address>
end
Example
Use the following commands to set up an IPv6 tunnel.
config system ipv6-tunnel
edit test_tunnel
set destination 2002:A0A:A01::
set interface internal
set source 2002:C0A8:3201::
end
History
Related topics
• system interface
• system sit-tunnel
mac-address-table
Use this command to create a static MAC table. The table can hold up to 200 entries.
This command is available in Transparent mode only.
Syntax
config system mac-address-table
edit <mac-address_hex>
set interface <if_name>
end
Example
Use the following commands to add a static MAC entry for the internal interface.
config system mac-address-table
edit 11:22:33:00:ff:aa
set interface internal
end
History
modem
Use this command to configure FortiGate models with dedicated modem interfaces or to configure a serial
modem interface connected using a serial converter to the USB port.
This command is only available in NAT/Route mode.
You can add the information to connect to up to three dialup accounts. Variables specific to a dialup
account end in the number of that dialup account such as authtype2, or passwd3. A dedicated modem
interface can act as a backup interface for one of the FortiGate ethernet interfaces or as a standalone
dialup interface.
Modem status is initially set to disabled. Disabled modems will not be displayed in the web-manager
interface list. CLI interface lists will always display the modem, no matter what the modem status is.
Changing the status to enabled will display the modem in the web-based manager.
Some FortiGate and FortiWifi models have a PCMCIA slot for a 3G wireless modem card. Such a modem
can be used as a backup connection in case the land line goes down. The mode-dev field allows you to
select the 3G modem when its installed, and the wireless-custom- fields allow you to configure it.
Syntax
config system modem
set account-relation {equal | fallback}
set altmode {enable | disable}
set authtype1 {pap chap mschap mschapv2}
set authtype2 {pap chap mschap mschapv2}
set authtype3 {pap chap mschap mschapv2}
set auto-dial {enable | disable}
set connect_timeout <seconds>
set dial-on-demand {enable | disable}
set distance <distance>
set extra-init1, extra-init2, extra-init3 <init_str>
set holddown-timer <seconds>
set idle-timer <minutes>
set interface <name>
set mode {redudant | standalone}
set modem-dev1, modem-dev2, modem-dev3 {internal | pcmcia-wireless}
set passwd1, passwd2, passwd3 <password_str>
set peer_modem1 {actiontec | ascendTNT | generic}
set peer_modem2 {actiontec | ascendTNT | generic}
set peer_modem3 {actiontec | ascendTNT | generic}
set phone1 <phone-number>
set phone2 <phone-number>
set phone3 <phone-number>
set pin-init <init_str>
set ppp-echo-request1 {disable | enable}
set ppp-echo-request2 {disable | enable}
set ppp-echo-request3 {disable | enable}
set priority <integer> {disable | enable}
set redial <tries_integer>
set status {disable | enable}
set username1 <name_str>
set username2 <name_str>
set username3 <name_str>
set wireless-custom-product-id <pid_hex>
set wireless-custom-vendor-id <vid_hex>
Example
This example shows how to enable the modem and configure the modem to act as a backup for the WAN1
interface. Only one dialup account is configured. The FortiGate unit and modem will attempt to dial this
account 10 times. The FortiGate unit will wait 5 seconds after the WAN1 interface recovers before
switching back to the WAN1 interface.
config system modem
set action dial
set status enable
set holddown-timer 5
set interface wan1
set passwd1 acct1passwd
set phone1 1234567891
set redial 10
set username1 acct1user
end
This example shows how to configure a 3G PCMCIA modem on modem-dev1. There is no authentication
used, and this modem device is the Internet connection for the FortiGate unit.
config system modem
set status enable
set modem-dev1 pcmcia-wireless
set mode standalone
set redial 1
set phone1 " *99***1#"
end
History
Related topics
• system interface
npu
Use this command to configure the Network Processing Unit (NPU) for FortiGate units that support FB4.
The NPU can take over encryption processing for its interfaces that would normally be performed by the
main FortiGate unit CPU.
Note: If you use the traffic-shaping-mode command, the bidirection option counts twice as much
traffic. You need to allow twice the bandwidth as with unidirection.
Syntax
config system npu
set dec-offload-antireplay {enable | disable}
set enc-offload-antireplay {enable | disable}
set offload-ipsec-host {enable | disable}
next
end
History
ntp
Use this command to configure Network Time Protocol (NTP) servers.
Syntax
config system ntp
set ntpsync en/dis
set syncinterval
config ntpserver
edit <serverid>
set server <IP_address>[/<name_string>]
next
end
History
password-policy
Use this command to configure higher security requirements for administrator passwords and IPsec VPN
pre-shared keys.
Syntax
config system password-policy
set status {enable | disable}
set apply-to [admin-password ipsec-preshared-key]
set change-4-characters {enable | disable}
set expire <days>
set minimum-length <chars>
set must-contain [lower-case-letter upper-case-letter non-alphanumeric
number]
end
History
Related topics
• system admin
• vpn ipsec phase1
• vpn ipsec phase1-interface
proxy-arp
Use this command to add IP addresses to MAC address translation entries to the proxy ARP table.
Syntax
config system proxy-arp
edit <table_entry>
set interface <port>
set ip <ipv4_address>
next
end
History
Related topics
• system arp-table
• get router info bgp
replacemsg admin
Use this command to change the administration disclaimer page.
If you enter the following CLI command the FortiGate unit displays the Administration Login disclaimer
whenever an administrator logs into the FortiGate unit web-based manager or CLI.
config system global
set access-banner enable
end
The web-based manager administrator login disclaimer contains the text of the Login Disclaimer
replacement message as well as Accept and Decline buttons. The administrator must select accept to
login.
These are HTML messages with HTTP headers.
Syntax
config system replacemsg admin admin_disclaimer_text
set buffer <message>
set format <format>
set header <header_type>
end
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message. Generally there
is not a large call for these tags in disclaimer pages.
Table 11: Replacement message tags
Tag Description
%%AUTH_REDIR_URL%% Link to open a new window. (optional).
%%AUTH_LOGOUT%% Immediately close the connection policy.
%%KEEPALIVEURL%% URL the keep alive page connects to that keeps the connection policy alive. Connects
every %%TIMEOUT%% seconds.
%%TIMEOUT%% Configured number of seconds between %%KEEPALIVEURL%% connections.
History
FortiOS v3.0 MR4 New command.
Related Commands
• system global
replacemsg alertmail
The FortiGate unit adds the alert mail replacement messages listed to alert email messages sent to
administrators. For more information about alert email, see “system alertemail” on page 392.
Alert mail replacement messages are text messages.
These are HTML messages with HTTP headers.
Syntax
config system replacemsg alertmail alert_msg_type
set buffer <message>
set format <format>
set header <header_type>
end
Note: If you enable Send alert email for logs based on severity for alert email, whether or not
replacement messages are sent by alert email depends on how you set the alert email Minimum log
level.
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
Tag Description
%%FILE%% The name of a file that has been removed from a content stream. This could be a file
that contained a virus or was blocked by antivirus file blocking. %%FILE%% can be
used in virus and file block messages.
%%VIRUS%% The name of a virus that was found in a file by the antivirus system. %%VIRUS%% can
be used in virus messages
%%URL%% The URL of a web page. This can be a web page that is blocked by web filter content
or URL blocking. %%URL%% can also be used in http virus and file block messages to
be the URL of the web page from which a user attempted to download a file that is
blocked.
%%CRITICAL_EVENT%% Added to alert email critical event email messages. %%CRITICAL_EVENT%% is
replaced with the critical event message that triggered the alert email.
%%PROTOCOL%% The protocol (HTTP, FTP, POP3, IMAP, SMTP) in which a virus was detected.
%%PROTOCOL%% is added to alert email virus messages.
%%SOURCE_IP%% IP address of the email server that sent the email containing the virus.
%%DEST_IP%% IP address of the user’s computer that attempted to download the message from
which the file was removed.
%%EMAIL_FROM%% The email address of the sender of the message from which the file was removed.
%%EMAIL_TO%% The email address of the intended receiver of the message from which the file was
removed.
%%NIDS_EVENT%% The IPS attack message. %%NIDS_EVENT%% is added to alert email intrusion
messages.
Example
The default message for a detected virus is:
Virus/Worm detected: %%VIRUS%% Protocol: %%PROTOCOL%% Source IP: %%SOURCE_IP%%
Destination IP: %DST_IP%% Email Address From: %%EMAIL_FROM%% Email Address To:
%%EMAIL_TO%%
History
Related Commands
• firewall interface-policy
• system alertemail
replacemsg auth
The FortiGate unit uses the text of the authentication replacement messages listed in Table 15 for various
user authentication HTML pages that are displayed when a user is required to authenticate because a
firewall policy includes at least one identity-based policy that requires firewall users to authenticate. For
more information about identity-based policies, see firewall policies in the FortiOS Administration Guide.
These pages are used for authentication using HTTP and HTTPS. Authentication replacement messages
are HTML messages. You cannot customize the firewall authentication messages for FTP and Telnet.
The authentication login page and the authentication disclaimer include replacement tags and controls not
found on other replacement messages.
Users see the authentication login page when they use a VPN or a firewall policy that requires
authentication. You can customize this page in the same way as you modify other replacement messages,
Administrators see the authentication disclaimer page when logging into the FortiGate web-based
manager or CLI. The disclaimer page makes a statement about usage policy to which the user must agree
before the FortiGate unit permits access. You should change only the disclaimer text itself, not the HTML
form code.
There are some unique requirements for these replacement messages:
• The login page must be an HTML page containing a form with ACTION="/" and METHOD="POST"
• The form must contain the following hidden controls:
• <INPUT TYPE="hidden" NAME="%%MAGICID%%" VALUE="%%MAGICVAL%%">
• <INPUT TYPE="hidden" NAME="%%STATEID%%" VALUE="%%STATEVAL%%">
• <INPUT TYPE="hidden" NAME="%%REDIRID%%" VALUE="%%PROTURI%%">
• The form must contain the following visible controls:
• <INPUT TYPE="text" NAME="%%USERNAMEID%%" size=25>
• <INPUT TYPE="password" NAME="%%PASSWORDID%%" size=25>
These are HTML messages with HTTP headers.
Syntax
config system replacemsg auth auth_msg_type
set buffer <message>
set format <format>
set header <header_type>
end
auth-disclaimer[1|2|3] Prompts user to accept the displayed disclaimer when leaving protected network.
The web-based manager refers to this as User Authentication Disclaimer, and it is
enabled with a firewall policy that also includes at least one identity-based policy.
When a firewall user attempts to browse a network through the FortiGate unit
using HTTP or HTTPS this disclaimer page is displayed.
The extra pages seamlessly extend the size of the page from 8 192 characters to
16 384 and 24 576 characters respectively.
auth-keepalive-page The HTML page displayed with firewall authentication keepalive is enabled using
the following CLI command:
config system global
set auth-keepalive enable
end
Authentication keepalive keeps authenticated firewall sessions from ending when
the authentication timeout ends. In the web-based manager, go to User > Options
to set the Authentication Timeout.
This page includes %%TIMEOUT%%.
auth-login-failed-page The HTML page displayed if firewall users enter an incorrect user name and
password combination.
This page includes %%FAILED_MESSAGE%%, %%USERNAMEID%%, and
%%PASSWORDID%% tags.
auth-login-page The authentication HTML page displayed when firewall users who are required to
authenticate connect through the FortiGate unit using HTTP or HTTPS.
Prompts the user for their username and password to login.
This page includes %%USERNAMEID%% and %%PASSWORDID%% tags.
auth-reject-page The Disclaimer page replacement message does not re-direct the user to a
redirect URL or the firewall policy does not include a redirect URL. When a firewall
user selects the button on the disclaimer page to decline access through the
FortiGate unit, the Declined disclaimer page is displayed.
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
Table 15: Replacement message tags
Tag Description
%%AUTH_REDIR_URL%% Link to open a new window. (optional).
%%AUTH_LOGOUT%% Immediately close the connection policy.
%%FAILED_MESSAGE%% Message displayed on failed login page after user login fails.
%%KEEPALIVEURL%% URL the keep alive page connects to that keeps the connection policy alive.
Connects every %%TIMEOUT%% seconds.
%%QUESTION%% The default login and rejected login pages use this text immediately preceding the
username and password fields. The default challenge page uses this as the
challenge question. These are treated as two different variables by the server.
If you want to use different text, replace %%QUESTION%% with the text that you prefer.
%%TIMEOUT%% Configured number of seconds between %%KEEPALIVEURL%% connections.
%%USERNAMEID%% Username of the user logging in. This tag is used on the login and failed login pages.
%%PASSWORDID%% Password of the user logging in. This tag is used on the challenge, login and failed
login pages.
Example
This example shows how to change the authentication login page. You enter the web page content as one
long quoted string, using the backslash (“\”) character at the end of each line to continue the text on the
next line.
config system replacemsg auth auth-login-page
set buffer "<html><head> \
<title>Firewall Authentication</title> \
</head> \
<body><h4>You must authenticate to use this service.</h4> \
<form action="/" method="post"> \
<input name="%%MAGICID%%" value="%%MAGICVAL%%" type="hidden"> \
<table align="center" bgcolor="#00cccc" border="0" \
cellpadding="15" cellspacing="0" width="320"><tbody> \
<tr><th>Username:</th> \
<td><input name="%%USERNAMEID%%" size="25" type="text"></td></tr> \
<tr><th>Password:</th> \
<td><input name="%%PASSWORDID%%" size="25" type="password"></td> \
</tr><tr><td colspan="2" align="center" bgcolor="#00cccc"> \
History
Related Commands
• system global
replacemsg ec
The endpoint control (ec) replacement messages format the portal pages that the FortiGate unit sends to
non-compliant users who attempt to use a firewall policy in which Endpoint NAC (endpoint-check) is
enabled.
There are two Endpoint NAC portals:
• Endpoint NAC Download Portal — The FortiGate unit sends this page if the Endpoint NAC profile has
recommendation-disclaimer disabled. In the web-based manager, this is the Quarantine Hosts to
User Portal (Enforce compliance) option. The user can download the FortiClient Endpoint Security
application installer. If you modify this replacement message, be sure to retain the %%LINK%% tag which
provides the download URL for the FortiClient installer.
• Endpoint NAC Recommendation Portal — The FortiGate unit sends this page if the Endpoint NAC
profile has recommendation-disclaimer enabled. In the web-based manager, this is the Notify
Hosts to Install FortiClient (Warn only) option. The user can either download the FortiClient Endpoint
Security application installer or select the Continue to link to access their desired destination. If you
modify this replacement message, be sure to retain both the %%LINK%% tag which provides the
download URL for the FortiClient installer and the %%DST_ADDR%% link that contains the URL that the
user requested.
Message format is HTML by default.
Syntax
config system replacemsg ec endpt-download-portal
set buffer <message>
set format <format>
set header <header_type>
end
config system replacemsg ec endpt-recommendation-portal
set buffer <message>
set format <format>
set header <header_type>
end
The endpoint control replacement messages include the following replacement message tags. When users
receive the replacement message, the replacement message tag is replaced with the appropriate content.
Table 16: Replacement message tags
Tag Description
%%LINK%% The download URL for the FortiClient installer.
%%DST_ADDR%% The destination URL that the user entered.
This is used in the endpt-recommendation-portal message only.
History
Related topics
• endpoint-control profile
• firewall policy, policy6
replacemsg fortiguard-wf
Use this command to change the default messages that replace a web pages that FortiGuard web filtering
has blocked.
The FortiGate unit sends the FortiGuard Web Filtering replacement messages listed in Table 17 to web
browsers using the HTTP protocol when FortiGuard web filtering blocks a URL, provides details about
blocked HTTP 4xx and 5xx errors, and for FortiGuard overrides. FortiGuard Web Filtering replacement
messages are HTTP pages.
If the FortiGate unit supports SSL content scanning and inspection and if Protocol Recognition > HTTPS
Content Filtering Mode is set to Deep Scan in the protection profile, these replacement messages can also
replace web pages downloaded using the HTTPS protocol.
Syntax
config system replacemsg fortiguard-wf <fortiguard_msg_type>
set buffer <message>
set format <format>
set header <header_type>
end
History
Related Commands
• webfilter
replacemsg ftp
The FortiGate unit sends the FTP replacement messages to FTP clients when an event occurs such as
antivirus blocking a file that contains a virus in an FTP session.
By default, these are text-format messages with no header.
Syntax
config system replacemsg ftp <message-type>
set buffer <message>
set format <format>
set header <header_type>
end
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
Table 19: Replacement message tags
Tag Description
%%FILE%% The name of a file that has been removed from a content stream. This could be a file
that contained a virus or was blocked by antivirus file blocking. %%FILE%% can be
used in virus and file block messages.
%%VIRUS%% The name of a virus that was found in a file by the antivirus system. %%VIRUS%% can
be used in virus messages
%%QUARFILENAME%% The name of a file that has been removed from a content stream and added to the
quarantine. This could be a file that contained a virus or was blocked by antivirus file
blocking. %%QUARFILENAME%% can be used in virus and file block messages.
Quarantining is only available on FortiGate units with a local disk.
%%URL%% The URL of a web page. This can be a web page that is blocked by web filter content
or URL blocking. %%URL%% can also be used in http virus and file block messages to
be the URL of the web page from which a user attempted to download a file that is
blocked.
%%PROTOCOL%% The protocol (HTTP, FTP, POP3, IMAP, SMTP) in which a virus was detected.
%%PROTOCOL%% is added to alert email virus messages.
%%SOURCE_IP%% The IP address from which a virus was received. For email this is the IP address of the
email server that sent the email containing the virus. For HTTP this is the IP address
of the web page that sent the virus.
%%DEST_IP%% The IP address of the computer that would have received the blocked file. For email
this is the IP address of the user’s computer that attempted to download the message
from which the file was removed.
Example
This example shows how to change the message sent when an FTP download is oversize.
config system replacemsg ftp ftp-dl-filesize
set buffer "The downloaded file was blocked because it is > 10MB."
end
History
replacemsg http
Use this command to change default replacement messages added to web pages when the antivirus engine
blocks a file in an HTTP session because of a matching file pattern or because a virus is detected; or when web filter
blocks a web page.
The FortiGate unit sends the HTTP replacement messages listed to web browsers using the HTTP
protocol when an event occurs such as antivirus blocking a file that contains a virus in an HTTP session.
HTTP replacement messages are HTML pages.
If the FortiGate unit supports SSL content scanning and inspection and if Protocol Recognition > HTTPS
Content Filtering Mode in the web-manager is set to Deep Scan in the protection profile, these
replacement messages can also replace web pages downloaded using the HTTPS protocol.
Syntax
config system replacemsg http <message-type>
set buffer <message>
set format <format>
set header <header_type>
end
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
Table 21: Replacement message tags
Tag Description
%%FILE%% The name of a file that has been removed from a content stream. This could be a file
that contained a virus or was blocked by antivirus file blocking. %%FILE%% can be
used in virus and file block messages.
%%VIRUS%% The name of a virus that was found in a file by the antivirus system. %%VIRUS%% can
be used in virus messages
%%QUARFILENAME%% The name of a file that has been removed from a content stream and added to the
quarantine. This could be a file that contained a virus or was blocked by antivirus file
blocking. %%QUARFILENAME%% can be used in virus and file block messages.
Quarantining is only available on FortiGate units with a local disk.
%%URL%% The URL of a web page. This can be a web page that is blocked by web filter content
or URL blocking. %%URL%% can also be used in http virus and file block messages to
be the URL of the web page from which a user attempted to download a file that is
blocked.
%%PROTOCOL%% The protocol (HTTP, FTP, POP3, IMAP, SMTP) in which a virus was detected.
%%PROTOCOL%% is added to alert email virus messages.
%%SOURCE_IP%% The IP address of the web page from which a virus was received.
%%DEST_IP%% The IP address of the computer that would have received the blocked file. For email
this is the IP address of the user’s computer that attempted to download the message
from which the file was removed.
Example
This example shows how to change the message that replaces a web page blocked for banned words.
config system replacemsg http http-client-bannedword
set buffer "This web page was blocked. It contains banned words."
end
History
replacemsg im
Use this command to change default replacement messages added to instant messaging and peer-to-peer
sessions when either file-transfer or voice-chat is blocked.
By default, these are text messages with an 8-bit header.
Syntax
config system replacemsg im <message-type>
set buffer <message>
set format <format>
set header <header_type>
end
Table 22: Instant messaging (IM) and peer to peer (P2P) message types
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
Table 23: Replacement message tags
Tag Description
%%FILE%% The name of a file that has been removed from a content stream. This could be a file that
contained a virus or was blocked by antivirus file blocking. %%FILE%% can be used in virus
and file block messages.
%%VIRUS%% The name of a virus that was found in a file by the antivirus system. %%VIRUS%% can be
used in virus messages
%%QUARFILENAME%% The name of a file that has been removed from a content stream and added to the
quarantine. This could be a file that contained a virus or was blocked by antivirus file
blocking. %%QUARFILENAME%% can be used in virus and file block messages.
Quarantining is only available on FortiGate units with a local disk.
%%PROTOCOL%% The protocol (HTTP, FTP, POP3, IMAP, SMTP) in which a virus was detected.
%%PROTOCOL%% is added to alert email virus messages.
%%SOURCE_IP%% The IP address from which a virus was received. For email this is the IP address of the
email server that sent the email containing the virus. For HTTP this is the IP address of
the web page that sent the virus.
%%DEST_IP%% The IP address of the computer that would have received the blocked file. For email this is
the IP address of the user’s computer that attempted to download the message from
which the file was removed.
Example
This example shows how to change the message added to instant messaging sessions when voice chat is
blocked.
config system replacemsg im im-voice-chat-block
set buffer "Use of chat applications is not permitted."
end
History
replacemsg mail
Use this command to change default replacement messages added to email messages when the antivirus
engine blocks a file either because of a matching file pattern or because a virus is detected; or when spam
filter blocks an email.
By default, these are text messages with an 8-bit header.
Syntax
config system replacemsg mail <message-type>
set buffer <message>
set format <format>
set header <header_type>
end
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
Table 25: Replacement message tags
Tag Description
%%FILE%% The name of a file that has been removed from a content stream. This could be a file
that contained a virus or was blocked by antivirus file blocking. %%FILE%% can be
used in virus and file block messages.
%%VIRUS%% The name of a virus that was found in a file by the antivirus system. %%VIRUS%% can
be used in virus messages
%%QUARFILENAME%% The name of a file that has been removed from a content stream and added to the
quarantine. This could be a file that contained a virus or was blocked by antivirus file
blocking. %%QUARFILENAME%% can be used in virus and file block messages.
Quarantining is only available on FortiGate units with a local disk.
%%PROTOCOL%% The protocol (HTTP, FTP, POP3, IMAP, SMTP) in which a virus was detected.
%%PROTOCOL%% is added to alert email virus messages.
%%SOURCE_IP%% IP address of the email server that sent the email containing the virus.
%%DEST_IP%% IP address of the user’s computer that attempted to download the message from
which the file was removed.
%%EMAIL_FROM%% The email address of the sender of the message from which the file was removed.
%%EMAIL_TO%% The email address of the intended receiver of the message from which the file was
removed.
Example
This example shows how to change the email message that is sent to test the alert email system.
config system replacemsg mail email-virus
set buffer "The attachment was blocked because it contains a virus."
end
History
replacemsg-group
Use this command to define replacement messages for your VDOM, overriding the corresponding global
replacement messages.
Syntax
To create a VDOM-specific replacement message:
config system replacemsg-group
edit default
config <msg_category>
edit <msg_type>
set buffer <message>
set format <format>
set header <header_type>
end
end
To remove a VDOM-specific replacement message, restoring the global replacement message:
config system replacemsg-group
edit default
config <msg_category>
delete <msg_type>
end
History
replacemsg nac-quar
Use this command to change the NAC quarantine pages for data leak (DLP), denial of service (DoS), IPS,
and virus detected.
These are HTML messages with HTTP headers.
Syntax
config system replacemsg auth auth_msg_type
set buffer <message>
set format <format>
set header <header_type>
end
History
replacemsg nntp
Use this command to change the net news transfer protocol (NNTP) download pages.
These are HTML messages with HTTP headers.
Syntax
config system replacemsg nntp auth_msg_type
set buffer <message>
set format <format>
set header <header_type>
end
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
Tag Description
%%FILE%% The name of a file that has been removed from a content stream. This could be a file
that contained a virus or was blocked by antivirus file blocking. The file may have been
quarantined if a virus was detected. %%FILE%% can be used in virus and file block
messages.
%%QUARFILENAME%% The name of a file that has been removed from a content stream and added to the
quarantine. This could be a file that contained a virus or was blocked by antivirus file
blocking. %%QUARFILENAME%% can be used in virus and file block messages.
Quarantining is only available on FortiGate units with a local disk.
%%VIRUS%% The name of a virus that was found in a file by the antivirus system. %%VIRUS%% can
be used in virus messages
Example
The default message for a detected virus is:
Virus/Worm detected: %%VIRUS%% Protocol: %%PROTOCOL%% Source IP: %%SOURCE_IP%%
Destination IP: %DST_IP%% Email Address From: %%EMAIL_FROM%% Email Address To:
%%EMAIL_TO%%
History
replacemsg spam
The FortiGate unit adds the Spam replacement messages listed in Table 29 to SMTP server responses if
the email message is identified as spam and the spam action is discard. If the FortiGate unit supports SSL
content scanning and inspection these replacement messages can also be added to SMTPS server
responses.
By default, these are text messages with an 8-bit header.
Syntax
config system replacemsg spam <message-type>
set buffer <message>
set format <format>
set header <header_type>
end
smtp-spam-bannedword Spam Filtering Banned word check enabled for an email protocol in a protection
profile identifies an email message as spam and adds this replacement message.
smtp-spam-dnsbl From the CLI, spamrbl enabled for an email protocol in a protection profile identifies
an email message as spam and adds this replacement message.
smtp-spam-emailblack The spam filter email address blacklist marked an email as spam. The smtp-spam-
emailblack replaces the email.
smtp-spam-feip FortiGuard Antispam IP address checking identifies an email message as spam and
adds this replacement message to the server response.
smtp-spam-helo Spam Filtering HELO DNS lookup enabled for SMTP in a protection profile identifies
an email message as spam and adds this replacement message. HELO DNS lookup
is not available for SMTPS.
smtp-spam-mimeheader From the CLI, spamhdrcheck enabled for an email protocol in a protection profile
identifies an email message as spam and adds this replacement message.
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
Table 30: Replacement message tags
Tag Description
%%QUARFILENAME%% The name of a file that has been removed from a content stream and added to the
quarantine. This could be a file that contained a virus or was blocked by antivirus file
blocking. %%QUARFILENAME%% can be used in virus and file block messages.
Quarantining is only available on FortiGate units with a local disk.
%%SOURCE_IP%% The IP address from which a virus was received. For email this is the IP address of the
email server that sent the email containing the virus. For HTTP this is the IP address
of the web page that sent the virus.
%%DEST_IP%% The IP address of the computer that would have received the blocked file. For email
this is the IP address of the user’s computer that attempted to download the message
from which the file was removed.
%%EMAIL_FROM%% The email address of the sender of the message from which the file was removed.
%%EMAIL_TO%% The email address of the intended receiver of the message from which the file was
removed.
Example
This example shows how to change the message added to SMTP mail that the spam filter has blocked.
config system replacemsg spam ipblocklist
set buffer "This email was blocked as spam."
end
History
FortiOS v2.80 New
FortiOS v3.0 MR2 Added smtp-spam-fschksum replacement message.
FortiOS v3.0 MR3 Replacement messages increased in size from 4 096 to 8 192 bytes per message.
FortiOS v4.0 Added smtp-spam-ase and smtp-spam-dnsbl replacement messages.
replacemsg sslvpn
The SSL VPN login replacement messages are HTML replacement messages.
The sslvpn-logon message formats the FortiGate SSL VPN portal login page.
The sslvpn-limit message formats the web page that appears if a user attempts to log into SSL VPN
more than once.
You can customize these replacement messages according to your organization’s needs. The pages are
linked to FortiGate functionality and you must construct them according to the following guidelines to
ensure that it will work.
These are HTML messages with HTTP headers.
Syntax
config system replacemsg sslvpn {sslvpn-limit | sslvpn-logon}
set buffer <message>
set format <format>
set header <header_type>
end
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
History
replacemsg traffic-quota
When user traffic through the FortiGate unit is blocked by traffic shaper quota controls, users see the
Traffic shaper block message or the Per IP traffic shaper block message when they attempt to connect
through the FortiGate unit using HTTP.
This is an HTML message with an HTTP header.
Syntax
config system replacemsg traffic-quota {per-ip-shaper-block | traffic-
shaper-block}
set buffer <message>
set format <format>
set header <header_type>
end
Replacement messages can include replacement message tags. When users receive the replacement
message, the replacement message tag is replaced with content relevant to the message.
History
FortiOS v4.0 MR1 New
resource-limits
Use this command to configure resource limits that will apply to all VDOMs. When you set a global
resource limit, you cannot exceed that resource limit in any VDOM. For example, enter the following
command to limit all VDOMS to 100 VPN IPSec Phase 1 Tunnels:
config global
config system resource-limits
set ipsec-phase1 100
end
end
With this global limit set you can only add a maximum of 100 VPN IPSec Phase 1 Tunnels to any VDOM.
You can also edit the resource limits for individual VDOMs to further limit the number of resources that you
can add to individual VDOMs. See “system vdom-property” on page 535.
A resource limit of 0 means no limit. No limit means the resource is not being limited by the resource limit
configuration. Instead the resource is being limited by other factors. The FortiGate unit limits dynamic
resources by the capacity of the FortiGate unit and can vary depending on how busy the system is. Limits
for static resources are set by limitations in the FortiGate configuration as documented in the FortiGate
Maximum Values Matrix document.
The default maximum value for each resource depends on the FortiGate model. Dynamic resources
(Sessions, Dial-up Tunnels, and SSL VPN) do not have default maximums so the default maximum for
dynamic resources is always 0 (meaning unlimited). Static resources may have a limit set or many be set
to 0 meaning they are limited by the resource limit configuration.
Note: If you set the maximum resource usage for a VDOM you cannot reduce the default maximum global
limit for all VDOMs below this maximum.
Syntax
config global
config system resource-limits
set custom-service <max_int>
set dialup-tunnel <max_int>
set firewall-address <max_int>
set firewall-addrgrp <max_int>
set firewall-policy <max_int>
set firewall-profile <max_int>
set ipsec-phase1 <max_int>
set ipsec-phase2 <max_int>
set onetime-schedule <max_int>
set recurring-schedule <max_int>
set service-group <max_int>
set session <max_int>
set sslvpn <max_int>
set user <max_int>
set user-group <max_int>
end
end
History
Related Commands
• system vdom-property
session-helper
A session helper binds a service to a TCP or UDP port. By default, there are session helpers that bind
services to standard ports. Use this command to configure a new session helper or to edit an existing one.
Syntax
config system session-helper
edit <helper-number>
set name <helper-name>
set port <port_number>
set protocol <protocol_number>
end
Table 31: Services, ports, and protocols
Example
Use the following commands to edit the file transfer protocol (FTP) and change it to port 111, but remain as
protocol 6:
config system session-helper
edit 8
set name ftp
set port 111
set protocol 6
end
History
session-sync
Use this command to configure TCP session synchronization between two standalone FortiGate units. You
can use this feature with external routers or load balancers configured to distribute or load balance TCP
sessions between two peer FortiGate units. If one of the peers fails, session failover occurs and active
TCP sessions fail over to the peer that is still operating. This failover occurs without any loss of data. As
well the external routers or load balancers will detect the failover and re-distribute all sessions to the peer
that is still operating.
Note: TCP session synchronization between two standalone FortiGate units is also sometimes called standalone
session synchronization or session synchronization between non-HA FortiGate units.
Standalone session synchronization can be used instead of HA to provide TCP session synchronization
between two peer FortiGate units. If the external load balances direct all sessions to one peer the affect is
similar to active-passive HA. If external load balancers or routers load balance traffic to both peers, the
affect is similar to active-active HA. The load balancers should be configured so that all of the packets for
any given session are processed by the same peer. This includes return packets.
Internet
Router or
Load Balancer
Session
Syncronization
Link
Router or
Load Balancer
Internal Network
By default, standalone session synchronization synchronizes all TCP sessions. You can optionally add
filters to a configuration control which TCP sessions are synchronized. You can add filters to only
synchronize packets from specified source and destination addresses, specified source and destination
interfaces, and specified predefined firewall TCP services.
Unlike HA, standalone session synchronization does not include configuration synchronization. In fact, the
configuration of the two peers is not identical because in most cases the peers would have different IP
addresses. Also unlike HA, load balancing is done by external routers or load balancers. The FortiGate
units only perform session synchronization and session failover.
On each peer, configuring session synchronization consists of selecting the virtual domains to be
synchronized using the syncvd field, selecting the virtual domain on the other peer that receives the
synchronization packets using the peervd field, and setting IP address of the interface in the peer unit that
receives the synchronization packets using the peerip field. The interface with the peerip must be in the
peervd virtual domain.
The syncvd and peervd settings must be the same on both peers. However, the peerip settings will be
different because the peerip setting on the first peer includes the IP address of an interface on the
second peer. And the peerip setting on the second peer includes the IP address of an interface on the
first peer.
Because session synchronization does not synchronize FortiGate configuration settings you must
configure both peers separately. For session synchronization to work properly all session synchronized
virtual domains must be added to both peers. The names of the matching interfaces in each virtual domain
must also be the same; this includes the names of matching VLAN interfaces. Note that the index numbers
of the matching interfaces and VLAN interfaces can be different. Also the VLAN IDs of the matching VLAN
interfaces can be different.
As well, the session synchronized virtual domains should have the same firewall policies so that sessions
can be resumed after a failover using the same firewall policies.
For a configuration example, see “Basic example configuration” on page 513.
Syntax
config system session-sync
edit <sync_id>
set peerip <peer_ipv4>
set peervd <vd_name>
set syncvd <vd_name>
config filter
set dstaddr <dist_ip_ipv4> <dist_mask_ipv4>
set dstintf <interface_name>
set service <string>
set srcaddr <string>
set srcintf <interface_name>
end
end
Internet
Router or
Load Balancer
Router or
Load Balancer
Internal Network
Configuration steps
1 Configure the load balancer or router to send all sessions to peer_1.
2 Configure the load balancer or router to send all traffic to peer_2 if peer_1 fails.
3 Use normal FortiGate configuration steps on peer_1:
• Enable virtual domain configuration.
• Add the vdom_1 virtual domain.
• Add port1 and port2 to the vdom_1 virtual domain and configure these interfaces.
• Set the IP address of port1 to 192.168.20.1.
• Set the IP address of port2 to 172.110.20.1.
• Set the IP address of port3 to 10.10.10.1.
• Add route mode firewall policies between port1 and port2 to vdom_1.
Adding a filter
You can add a filter to this basic configuration if you only want to synchronize some TCP sessions. For
example you can enter the following commands on both FortiGate units to edit the standalone sessions
configurations and add a filter so that only HTTP sessions are synchronized
config system session-sync
edit 1
config filter
set service HTTP
end
end
History
FortiOS v3.0 MR6 The command config system session-sync is new for FortiOS v3.0 MR6.
FortiOS v3.0 MR7 The config filter command and associated fields (dstaddr, dstintf, service,
srcaddr, and srcintf) are now available for MR7.
session-ttl
Use this command to configure port-range based session timeouts by setting the session time to live (ttl)
for multiple TCP or UDP port number ranges. The session ttl is the length of time a TCP or UDP session
can be idle before being dropped by the FortiGate unit. You can add multiple port number ranges. For each
range you can configure the protocol (TCP or UDP) and start and end numbers of the port number range.
Syntax
config system session-ttl
set default <seconds>
config port
edit <port_range_index>
set end-port <port_number_int>
set protocol <protocol_int>
set start-port <port_number_int>
set timeout {<timeout_int> | never}
end
end
Examples
The following command increases the default session timeout:
config system session-ttl
set default 62000
end
Use the following command to change the session timeout for TCP protocol SSH on port 22 to 3600
seconds.
History
settings
Use this command to change settings that are per VDOM settings such as the operating mode and default
gateway.
When changing the opmode of the VDOM, there are fields that are visible depending on which opmode
you are changing to. They are only visible after you set the opmode ab before you commit the changes
with either ‘end or ‘next’. If you do not set these fields, the opmode change will fail.
Table 32: Fields associated with each opmode
Change from NAT to Transparent mode Change from Transparent to NAT mode
set gateway <gw_ipv4> set device <interface_name>
set manageip <manage_ipv4> set gateway <gw_ipv4>
set ip <address_ipv4>
system settings differs from system global in that system global fields apply to the entire
FortiGate unit, where system settings fields apply only to the current VDOM, or the entire FortiGate
unit if VDOMs are not enabled.
Bi-directional Forwarding Detection (BFD) is a protocol used by BGP and OSPF. It is used to quickly locate
hardware failures in the network. Routers running BFD communicate with each other, and if a timer runs
out on a connection then that router is declared down. BFD then communicates this information to the
routing protocol and the routing information is updated. BFD support was added in FortiOS v3.0 MR4, and
can only be configured through the CLI.
Syntax
config system settings
set allow-subnet-overlap {enable | disable}
set asymroute {enable | disable}
set asymroute6 {enable | disable}
set bfd {enable | disable}
set bfd-desired-min-tx <interval_msec>
set bfd-required-min-rx <interval_msec>
set bfd-detect-mult <multiplier
set bfd-dont-enforce-src-port {enable | disable}
set comments <string>
set device <interface_name>
set ecmp-max-paths <max_entries>
set gateway <gw_ipv4>
set ip <address_ipv4>
set manageip <manage_ipv4>
set multicast-forward {enable | disable}
set multicast-ttl-notchange {enable | disable}
set opmode {nat | transparent}
set sccp-port <port_number>
set sip-helper {enable | disable}
set sip-nat-trace {enable | disable}
set sip-tcp-port <port_number>
set sip-udp-port <port_number>
set status {enable | disable}
set strict-src-check {enable | disable}
set utf8-spam-tagging {enable | disable}
set vpn-stats-log {ipsec | l2tp | pptp | ssl}
set vpn-stats-period <period_int>
end
Example
Changing the opmode from Transparent to NAT involves a number of steps. For example, before you
change the opmode, the other required fields ip, device, and gateway are not visible.
This example changes to NAT opmode in a VDOM called vdom2. The management interface is set to
internal, and the management IP is set to 192.168.10.8 with a gateway of 192.168.10.255.
config vdom
edit vdom2
config system settings
set opmode nat
set device internal
set ip 192.168.10.8
set gateway internal
end
end
History
FortiOS v3.0 New.
opmode moved from system global.
manageip moved from system manageip.
FortiOS v3.0 MR3 Added multicast-forward and multicast-ttl-notchange.
Related Commands
• vdom
sit-tunnel
Use this command to tunnel IPv6 traffic over an IPv4 network. The IPv6 interface is configured under
config system interface. The command to do the reverse is system ipv6-tunnel.
Syntax
config system sit-tunnel
edit <tunnel_name>
set destination <tunnel_address>
set interface <name>
set ip6 <address_ipv6>
set source <address_ipv4>
end
Example
Use the following commands to set up an IPv6 tunnel.
config system sit-tunnel
edit test_tunnel
set destination 10.10.10.1
set interface internal
set ip6 12AB:0:0:CD30::/60
set source 192.168.50.1
end
History
Related topics
• system interface
• system ipv6-tunnel
snmp community
Use this command to configure SNMP communities on your FortiGate unit. You add SNMP communities
so that SNMP managers can connect to the FortiGate unit to view system information and receive SNMP
traps. SNMP traps are triggered when system events happen such as when antivirus checking is
bypassed, or when the log disk is almost full.
You can add up to three SNMP communities. Each community can have a different configuration for SNMP
queries and traps. Each community can be configured to monitor the FortiGate unit for a different set of
events. You can also the add IP addresses of up to 8 SNMP managers to each community.
For more information on SNMP traps and variables see the FortiGate Administration Guide, or the Fortinet
Knowledge Center online.
Note: Part of configuring an SNMP manager is to list it as a host in a community on the FortiGate unit it
will be monitoring. Otherwise the SNMP monitor will not receive any traps from that FortiGate unit, or be
able to query it.
Syntax
config system snmp community
edit <index_number>
set events <events_list>
set name <community_name>
set query-v1-port <port_number>
set query-v1-status {enable | disable}
set query-v2c-port <port_number>
set query-v2c-status {enable | disable}
set status {enable | disable}
set trap-v1-lport <port_number>
set trap-v1-rport <port_number>
set trap-v1-status {enable | disable}
set trap-v2c-lport <port_number>
set trap-v2c-rport <port_number>
set trap-v2c-status {enable | disable}
config hosts
edit <host_number>
set interface <if_name>
set ip <address_ipv4>
end
end
Example
This example shows how to add a new SNMP community named SNMP_Com1. The default configuration
can be used in most cases with only a few modifications. In the example below the community is added,
given a name, and then because this community is for an SNMP manager that is SNMP v1 compatible, all
v2c functionality is disabled. After the community is configured the SNMP manager is added. The SNMP
manager IP address is 192.168.20.34 and it connects to the FortiGate unit internal interface.
config system snmp community
edit 1
set name SNMP_Com1
set query-v2c-status disable
set trap-v2c-status disable
config hosts
edit 1
set interface internal
set ip 192.168.10.34
end
end
History
Related topics
• system snmp sysinfo
snmp sysinfo
Use this command to enable the FortiGate SNMP agent and to enter basic system information used by the
SNMP agent. Enter information about the FortiGate unit to identify it. When your SNMP manager receives
traps from the FortiGate unit, you will know which unit sent the information. Some SNMP traps indicate
high CPU usage, log full, or low memory.
For more information on SNMP traps and variables see the FortiGate Administration Guide, or the Fortinet
Knowledge Center online.
Syntax
config system snmp sysinfo
set contact-info <info_str>
set description <description>
set engine-id <engine-id_str>
set location <location>
set status {enable | disable}
set trap-high-cpu-threshold <percentage>
set trap-log-full-threshold <percentage>
set trap-low-memory-threshold <percentage>
end
Example
This example shows how to enable the FortiGate SNMP agent and add basic SNMP information.
config system snmp sysinfo
set status enable
set contact-info 'System Admin ext 245'
History
FortiOS v3.0 Changed contact_info to contact-info.
FortiOS v3.0 MR2 Added trap-high-cpu-threshold, trap-log-full-threshold,
and trap-low-memory-threshold commands.
FortiOS v4.0 Revised.
FortiOS v4.0 MR1 Added engine-id.
Related topics
• system snmp community
snmp user
Use this command to configure an SNMP user including which SNMP events the user wants to be notified
about, which hosts will be notified, and if queries are enabled which port to listen on for them.
FortiOS implements the user security model of RFC 3414. You can require the user to authenticate with a
password and you can use encryption to protect the communication with the user.
For more information on SNMP traps and variables see the FortiGate Administration Guide, or the Fortinet
Knowledge Center online.
Syntax
config system snmp user
edit <username>
set auth-proto {md5 | sha}
set auth-pwd <password>
set events <event_string>
set notify-hosts <hosts_string>
set priv-proto {aes | des}
set priv-pwd <key>
set queries {enable | disable}
set query-port <port_int>
set security-level <slevel>
end
notify-hosts Enter IP address to send SNMP notifications (SNMP traps) to when events No default
<hosts_string> occur. Separate multiple addresses with a space.
priv-proto Select privacy (encryption) protocol: aes
{aes | des} aes — use CFB128-AES-128 symmetric encryption.
des — use CBC-DES symmetric encryption.
This is available if security-level is auth-priv.
priv-pwd <key> Enter the privacy encryption key. Maximum 32 characters. This is available No default.
if security-level is auth-priv.
queries Enable or disable SNMP v3 queries for this user. Queries are used to enable
{enable | disable} determine the status of SNMP variables.
query-port Enter the number of the port used for SNMP v3 queries. If multiple 161
<port_int> versions of SNMP are being supported, each version should listen on a
different port.
security-level Set security level to one of: no-auth-
<slevel> no-auth-no-priv — no authentication or privacy no-priv
auth-no-priv — authentication but no privacy
auth-priv — authentication and privacy
History
Related topics
• system snmp community, system snmp sysinfo
switch-interface
Use this command to group interfaces into a ‘soft-switch’ - a switch that is implemented in software instead
of hardware. A group of switched interfaces have one IP address between them to connect to the
FortiGate unit. This feature is available on all FortiGate models. For more information on switch-mode, see
“global” on page 423.
Interfaces that may be members of a ‘soft-switch’ are physical and wlan interfaces that are not used
anywhere else. Member interfaces cannot be monitored by HA or used as heart beat devices.
Syntax
config system switch-interface
edit <group_name>
set member <iflist>
set span {enable | disable}
set span-dest-port <portnum>
set span-direction {rx | tx | both}
set span-source-port <portlist>
set type {hub | switch | hardware-switch}
set vdom <vdom_name>
end
Example
This example shows how to create a group of 3 interfaces called low_speed ideally that are all at 10m
speed. It assumes these interfaces are not referred to in FortiOS by anything else.
config system switch-interface
edit low_speed
set member port1 wlan dmz
end
History
tos-based-priority
Use this command to prioritize your network traffic based on its type-of-service (TOS).
IP datagrams have a TOS byte in the header (as described in RFC 791). Four bits within this field
determine the delay, the throughput, the reliability, and cost (as described in RFC 1349) associated with
that service. There are 4 other bits that are seldom used or reserved that are not included here. Together
these bits are the tos variable of the tos-based-priority command.
The TOS information can be used to manage network traffic and its quality based on the needs of the
application or service. TOS application routing (RFC 1583) is supported by OSPF routing.
For more information on TOS in routing, see “policy” on page 333.
Syntax
config system tos-based-priority
edit <name>
set tos <ip_tos_value>
set priority [high | medium | low]
end
Examples
It is a good idea to have your entry names in the tos-based-priority table and their TOS values be the
same. Otherwise it can become confusing.
config tos-based-priority
edit 1
set tos 1
set priority low
next
edit 4
set tos 4
set priority medium
next
edit 6
set tos 6
set priority high
next
end
History
FortiOS v3.0 MR2 New command.
Related topics
• system global, router ospf, router policy, execute ping-options, ping6-options
vdom-link
Use this command to create an internal point-to-point interface object. This object is a link used to join
virtual domains. Inter-VDOM links support BGP routing, and DHCP.
Creating the interface object also creates 2 new interface objects by the name of <name>0 and <name>1.
For example if your object was named v_link, the 2 interface objects would be named v_link0 and
v_link1. You can then configure these new interfaces as you would any other virtual interface using
config system interface.
When using vdom-links in HA, you can only have vdom-links in one vcluster. If you have vclusters defined,
you must use the vcluster field to determine which vcluster will be allowed to contain the vdom-links.
Vdom-links support IPSec DHCP, but not regular DHCP.
A packet can pass through an inter-VDOM link a maximum of three times. This is to prevent a loop. When
traffic is encrypted or decrypted it changes the content of the packets and this resets the inter-VDOM
counter. However using IPIP or GRE tunnels do not reset the counter.
For more information on the vdom-link command see “Configuring inter-VDOM routing” on page 55 and
the FortiGate VLANs and VDOMs Guide.
Syntax
config system vdom-link
edit <name>
end
Examples
In this example you have already created two virtual domains called v1 and v2. You want to set up a link
between them. The following command creates the VDOM link called v12_link. Once you have the link you
need to bind its two ends to the VDOMs it will be working with.
config system vdom-link
edit v12_link
end
History
Related topics
• router bgp
• system interface
• system dhcp server
vdom-property
Use this command to enter a description of a VDOM and to configure resource usage for the VDOM that
overrides global limits and specifies guaranteed resource usage for the VDOM. When configuring resource
usage for a VDOM you can set the Maximum and Guaranteed value for each resource.
• The Maximum value limits the amount of the resource that can be used by the VDOM. When you add a
VDOM, all maximum resource usage settings are 0 indicating that resource limits for this VDOM are
controlled by the global resource limits. You do not have to override the maximum settings unless you
need to override global limits to further limit the resources available for the VDOM. You cannot set
maximum resource usage higher in a VDOM than the corresponding global resource limit. For each
resource you can override the global limit to reduce the amount of each resource available for this
VDOM. The maximum must the same as or lower than the global limit. The default value is 0, which
means the maximum is the same as the global limit.
Note: Use the command “system resource-limits” on page 506 to set global resource limits.
• The Guaranteed value represents the minimum amount of the resource available for that VDOM.
Setting the guaranteed value makes sure that other VDOMs do not use all of a resource. A guaranteed
value of 0 means that an amount of this resource is not guaranteed for this VDOM. You only have to
change guaranteed settings if your FortiGate may become low on resources and you want to guarantee
that a minimum level is available for this VDOM. For each resource you can enter the minimum amount
of the resource available to this VDOM regardless of usage by other VDOMs. The default value is 0,
which means that an amount of this resource is not guaranteed for this VDOM.
Syntax
config global
config system vdom-property
edit <vdom_name>
set custom-service <max_int> [<guaranteed_int>]
set description <description_str>
set dialup-tunnel <max_int> [<guaranteed_int>]
set firewall-policy <max_int> [<guaranteed_int>]
set firewall-profile <max_int> [<guaranteed_int>]
set firewall-address <max_int> [<guaranteed_int>]
set firewall-addrgrp <max_int> [<guaranteed_int>]
set ipsec-phase1 <max_int> [<guaranteed_int>]
set ipsec-phase2 <max_int> [<guaranteed_int>]
set onetime-schedule <max_int> [<guaranteed_int>]
set recurring-schedule <max_int> [<guaranteed_int>]
set service-group <max_int> [<guaranteed_int>]
set session <max_int> [<guaranteed_int>]
set user <max_int> [<guaranteed_int>]
set user-group <max_int> [<guaranteed_int>]
end
end
Example
Use the following commands set a maximum of 500 sessions on the root VDOM with a guaranteed
minimum level of 100 sessions. For this examples VDOMs are enabled.
config global
config system vdom-property
edit root
set sesssion 500 100
end
end
History
Related topics
• system resource-limits
wccp
Configure settings for Web Cache Communication Protocol (WCCP) version 2 to optimize web traffic, thus
reducing transmission costs and downloading time.
When a web client (on a computer) makes a request for web content, WCCP allows the routers on the
local network to redirect the web content requests to the appropriate web cache server on the local
network. If the web cache server contains the information in the web content request, the web cache
server sends the content directly to the local client. If the web cache does not contain the requested
information, the web cache server will download the HTTP information, cache it, and send it to the local
client. The local client is not aware this caching is taking place.
For web caching to function, local network traffic must be directed through one or more routers that are
able to forward the HTTP requests to the web cache servers. The FortiGate unit can act as a WCCP
version 2 enabled router and direct web content requests to configured web cache servers.
The web caching will speed up downloads by not accessing remote websites for each HTTP request. It will
also reduce the amount of data a company network sends and receives over the Internet, reducing costs.
config system wccp
edit <service-id>
set assignment-method {HASH | MASK | any}
set authentication {disable | enable}
set forward-method {GRE | L2 | any}
set group-address <multicast_ipv4>
set password <password_str>
set return-method {GRE | L2 | any}
set router-id <interface_ipv4>
set server-list <server_ipv4mask>
next
end
Variable Description Default
<service-id> Valid ID range is from 0 to 255. 0 for HTTP. 1
assignment-method Specifies which assignment method the FortiGate unit prefers. If HASH
{HASH | MASK | any} assignment-method is any the cache server determines the
assignment method.
authentication Enable or disable using use MD5 authentication for the WCCP disable
{disable | enable} configuration.
forward-method Specifies how the FortiGate unit forwards traffic to cache servers. If GRE
{GRE | L2 | any} forward-method is any the cache server determines the forward
method.
group-address The IP multicast address used by the cache servers. 0.0.0.0 means the 0.0.0.0
<multicast_ipv4> FortiGate unit ignores multicast WCCP traffic. Otherwise, group-
address must be from 224.0.0.0 to 239.255.255.255.
password The authentication password. Maximum length is 8 characters. No default.
<password_str>
return-method {GRE Specifies how a cache server declines a redirected packet and returns it to GRE
| L2 | any} the FortiGate unit. If return-method is any the cache server determines
the return method.
History
wireless ap-status
On models that support Rogue Access Point Detection, you can use this command to designate access
points as “accepted” or “rogue”. This designation affects the web-based manager Rogue AP listing.
You can use the get system wireless detected-ap command to obtain the required information.
The FortiWiFi unit must be in SCAN mode or have bg-scan set to enable. For more information see
“system wireless settings” on page 540.
Syntax
config system wireless ap-status
edit <ap_id>
set bssid <macaddr>
set ssid <ssid>
set status {accepted | rogue}
end
Variable Description Default
edit <ap_id> Enter a numeric identifier for this entry. No default.
bssid <macaddr> Enter MAC address of the access point. No default.
ssid <ssid> Enter the SSID of the access point. No default.
status {accepted | rogue} Set the designation of this access point: rogue
accepted — a known access point
rogue — an unknown, possibly unsafe access point
History
Related topics
• get system wireless detected-ap
• system wireless settings
wireless settings
Use this command to configure the WLAN interface wireless settings on a FortiWiFi unit.
Syntax
config system wireless settings
set band {802.11a | 802.11b | 802.11g}
set bgscan {enable | disable}
set bgscan-idle <msec>
set bgscan-interval <msec>
set beacon_interval <integer>
set channel <channel_number>
set geography <Americas | EMEA | Israel | Japan | World>
set mode <opmode>
set power_level <dBm>
end
Except for mode, these fields are available in Access Point (AP) mode only.
Example
This example shows how to configure the wireless interface.
config system wireless settings
set mode AP
set channel 4
set geography Americas
end
config system interface
edit wlan
set ip 10.10.80.1 255.255.255.0
set wifi-ssid myssid
set wifi-security WEP128
set wifi-key ....
...
end
end
History
Related topics
• system interface
• system vdom-link
zone
Use this command to add or edit zones.
In NAT/Route mode, you can group related interfaces or VLAN subinterfaces into zones. Grouping
interfaces and subinterfaces into zones simplifies policy creation. For example, if you have two interfaces
connected to the Internet, you can add both of these interfaces to the same zone. Then you can configure
policies for connections to and from this zone, rather than to and from each interface.
In Transparent mode you can group related VLAN subinterfaces into zones and add these zones to virtual
domains.
Syntax
config system zone
edit <zone_name>
set interface <name_str>
set intrazone {allow | deny}
end
Example
This example shows how to add a zone named Zone1, add the internal interface to it, and to deny routing
between different zones.
config system zone
edit Zone1
set interface internal
set intrazone deny
end
History
Related topics
• system interface
user
This chapter covers:
• configuration of the FortiGate unit to use external authentication servers, including
Windows Active Directory or other Directory Service servers
• configuration of user accounts and user groups for firewall policy authentication, administrator
authentication and some types of VPN authentication
• configuration of peers and peer groups for IPSec VPN authentication and PKI user authentication
This chapter contains the following sections:
Configuring users for authentication peer
ban peergrp
fsae radius
group setting
ldap tacacs+
local
ban
The FortiGate unit compiles a list of all users, IP addresses, or interfaces that have a quarantine/ban rule
applied to them. The Banned User list in the FortiGate web-based interface shows all IP addresses and
interfaces blocked by NAC (Network Access Control) quarantine, and all IP addresses, authenticated
users, senders and interfaces blocked by DLP (Data Leak Prevention). All users or IP addresses on the
Banned User list are blocked until they are removed from the list, and all sessions to an interface on the list
are blocked until the interface is removed from the list. Each banned user configuration can have an expiry
time/date to automatically remove it from the Banned User list, or the user must be removed from the list
manually by the system administrator.
Caution: You cannot configure items in the Banned user list with the CLI, you must use the web-based
manager. In the CLI, you can display the list items in the Banned User list using get user ban, and remove
items from the list using the following command:
config user ban
delete banid <ban_int>
end
History
FortiOS v4.0 New. Banned User list items cannot be configured using the CLI.
Related topics
• user group
• firewall policy, policy6
fsae
Use this command to configure the FortiGate unit to receive user group information from a Directory
Service server equipped with the Fortinet Server Authentication Extensions (FSAE). You can specify up to
five computers on which a FSAE collector agent is installed. The FortiGate unit uses these collector agents
in a redundant configuration. If the first agent fails, the FortiGate unit attempts to connect to the next agent
in the list.
You can add user groups to Directory Service type user groups for authentication in firewall policies.
Syntax
config user fsae
edit <server_name>
set ldap_server <ldap-server-name>
set password <password>
set password2 <password2>
set password3 <password3>
set password4 <password4>
set password5 <password5>
set port <port_number>
set port2 <port2_number>
set port3 <por3_number>
set port4 <port4_number>
set port5 <port5_number>
set server <domain>
set server2 <domain2>
set server3 <domain3>
set server4 <domain4>
set server5 <domain5>
end
History
Related topics
• user group
• execute fsae refresh
• firewall policy, policy6
group
Use this command to add or edit user groups.
There are three types of user groups:
Firewall user group Provides access to firewall policies that require authentication. A firewall policy
specifies the user groups that are allowed to use the policy. Members of a firewall
user group can be local users defined in user local, peer members
defined in user peer, or accounts on RADIUS or LDAP servers configured in
user radius or user ldap. Users must provide a user name and password to
use the firewall policy.
SSL-VPN user group Provides access to the FortiGate SSL-VPN tunnel and SSL-VPN web applications.
Members of an SSL-VPN user group can be local users defined in user local or
accounts on RADIUS or LDAP servers configured in user radius or user
ldap. Users authenticate using their VPN client or through the SSL-VPN web portal
login page.
Directory Service user group Provides access to firewall policies that require authentication. Members of an
Directory Service user group are members of selected Directory Service user
groups on Directory Service servers configured in user fsae. Users are
authenticated when they log on to their Windows domain and are not required to
authenticate again to use FortiGate firewall policies.
To enable authentication, you must add user names, RADIUS servers and LDAP servers to one or more
user groups. You can then select a user group when you require authentication. You can select a user
group to configure authentication for:
• Firewall policies that require authentication
Only users in the selected user group or users that can authenticate with the RADIUS or LDAP servers
added to the user group can authenticate with these policies.
• SSL-VPN configurations
• IPSec VPN Phase 1 configurations for dialup users
Only users in the selected user group can authenticate to use the VPN tunnel.
• XAuth for IPSec VPN Phase 1 configurations
Only users in the selected user group can be authenticated using XAuth.
• FortiGate PPTP and L2TP configurations
Only users in the selected user group can use the PPTP or L2TP configuration.
• Administrator login with RADIUS authentication
If you use a user group for administrator authentication, it must contain only RADIUS servers.
• FortiGuard Web Filtering override groups
When FortiGuard Web Filtering blocks a web page, authorized users can authenticate to access the
web page or to allow members of another group to access it.
Note: User groups can utilize defined peer members as part of a group.
When you add user names, RADIUS servers, and LDAP servers to a user group, the order in which they
are added determines the order in which the FortiGate unit checks for authentication. If user names are
first, then the FortiGate unit checks first for a match with the local user names. If a match is not found, the
FortiGate unit checks the RADIUS or LDAP server. If a RADIUS or LDAP server is added first, the
FortiGate unit checks the server and then the local user names.
Syntax
config user group
edit <groupname>
set authtimeout <timeout>
set group-type <grp_type>
set ldap-memberof <LDAPgroup_str>
set member <names>
set profile <profilename>
set sslvpn-portal <web_portal_name>
set ftgd-wf-ovrd {allow | deny}
set ftgd-wf-ovrd-dur <###d##h##m>
set ftgd-wf-ovrd-dur-mode <mode>
set ftgd-wf-ovrd-ext <option>
set ftgd-wf-ovrd-profile <profile1 ... profilen>
set ftgd-wf-ovrd-scope <scope>
set ftgd-wf-ovrd-type <o_type>
end
Example
This example shows how to add a group named User_Grp_1, and add User_2, User_3, Radius_2 and
LDAP_1 as members of the group, and set the protection profile to strict:
config user group
edit User_Grp_1
set member User_2 User_3 Radius_2 LDAP_1
set profile strict
end
History
Related topics
• user ldap, user local, user radius, user tacacs+
• ssl web portal
ldap
Use this command to add or edit the definition of an LDAP server for user authentication.
To authenticate with the FortiGate unit, the user enters a user name and password. The FortiGate unit
sends this user name and password to the LDAP server. If the LDAP server can authenticate the user, the
user is successfully authenticated with the FortiGate unit. If the LDAP server cannot authenticate the user,
the connection is refused by the FortiGate unit. The maximum number of remote LDAP servers that can be
configured for authentication is 10.
The FortiGate unit supports LDAP protocol functionality defined in RFC2251 for looking up and validating
user names and passwords. FortiGate LDAP supports all LDAP servers compliant with LDAP v3.
FortiGate LDAP support does not extend to proprietary functionality, such as notification of password
expiration, that is available from some LDAP servers. FortiGate LDAP support does not supply information
to the user about why authentication failed.
LDAP user authentication is supported for PPTP, L2TP, IPSec VPN, and firewall authentication. With
PPTP, L2TP, and IPSec VPN, PAP (Packet Authentication Protocol) is supported and CHAP (Challenge
Handshake Authentication Protocol) is not.
Syntax
config user ldap
edit <server_name>
set cnid <id>
set dn <dname>
set port <number>
set server <domain>
set type <auth_type>
set username <ldap_username>
set password <ldap_passwd>
set group <group>
set filter <group_filter>
set secure <auth_port>
set ca-cert <cert_name>
end
Example
This example shows how to add an LDAP server called LDAP1 using the IP address 23.64.67.44, the
default port, the common name cn, and the distinguished names
ou=marketing,dc=fortinet,dc=com for simple authentication.
config user ldap
edit LDAP1
set server 23.64.67.44
set cnid cn
set dn ou=marketing,dc=fortinet,dc=com
end
This example shows how to change the distinguished name in the example above to
ou=accounts,ou=marketing,dc=fortinet,dc=com.
config user ldap
edit LDAP1
set dn ou=accounts,ou=marketing,dc=fortinet,dc=com
end
History
Related topics
• user group
• user local
• user radius
• user tacacs+
local
Use this command to add local user names and configure user authentication for the FortiGate unit. To add
authentication by LDAP or RADIUS server you must first add servers using the config user ldap and
config user radius commands.
Syntax
config user local
edit <username>
set ldap-server <servername>
set passwd <password_str>
set radius-server <servername>
set status {enable | disable}
set tacacs+-server <servername>
set type <auth-type>
end
Example
This example shows how to add and enable a local user called Admin7 for authentication using the
RADIUS server RAD1.
config user local
edit Admin7
set status enable
set type radius
set radius-server RAD1
end
This example shows how to change the authentication method for the user Admin7 to password and enter
the password.
config user local
edit Admin7
set type password
set passwd abc123
end
History
Related topics
• user group
• user ldap
• user radius
• user tacacs+
peer
Use this command to add or edit peer (digital certificate holder) information. You use the peers you define
here in the config vpn ipsec phase1 command if you specify peertype as peer. Also, you can add
these peers to peer groups you define in the config user peergrp command.
For PKI user authentication, you can add or edit peer information and configure use of LDAP server to
check access rights for client certificates.
This command refers to certificates imported into the FortiGate unit. You import CA certificates using the
vpn certificate ca command. You import local certificates using the vpn certificate local
command.
You can configure a peer user with no values in subject or ca. This user behaves like a user account or
policy that is disabled.
Note: If you create a PKI user in the CLI with no values in subject or ca, you cannot open the user
record in the GUI, or you will be prompted to add a value in Subject (subject) or CA (ca).
Syntax
config user peer
edit <peer_name>
set ca <ca_name>
set cn <cn_name>
set cn-type <type>
set ldap-password <ldap_password>
set ldap-server <ldap_server>
set ldap-username <ldap_user>
set mandatory-ca-verify {enable | disable}
set passwd <password_str>
set subject <constraints>
set two-factor {enable | disable}
end
Variable Description Default
ca <ca_name> Enter the CA certificate name, as returned by execute vpn No default.
certificate ca list.
cn <cn_name> Enter the peer certificate common name. No default.
cn-type <type> Enter the peer certificate common name type: string
FQDN — Fully-qualified domain name.
email — The user’s email address.
ipv4 — The user’s IP address (IPv4).
ipv6 — The user’s IP address (IPv6).
string — Any other piece of information.
edit <peer_name> Enter the peer name. Enter a new name to create a new peer or
enter an existing peer name to edit that peer’s information.
ldap-password Enter the login password for the LDAP server used to perform client No default.
<ldap_password> access rights check for the defined peer.
ldap-server <ldap_server> Enter the name of one of the LDAP servers defined under ‘config null
user ldap’ used to perform client access rights check for the defined
peer.
ldap-username <ldap_user> Enter the login name for the LDAP server used to perform client null
access rights check for the defined peer.
Example
This example shows how to add the branch_office peer.
Configure the peer using the CA certificate name and peer information:
config user peer
edit branch_office
set ca CA_Cert_1
set cn [email protected]
set cn-type email
end
Configure the peer with empty subject and ca fields.
config user peer
edit peer2
end
History
Related topics
• user peergrp
• vpn ipsec phase1
• vpn certificate ca
• vpn certificate local
peergrp
Use this command to add or edit a peer group. Peers are digital certificate holders defined using the
config user peer command. You use the peer groups you define here in the config vpn ipsec
phase1 command if you specify peertype as peergrp.
For PKI user authentication, you can add or edit peer group member information. User groups that use PKI
authentication can also be configured using config user group.
Syntax
config user peergrp
edit <groupname>
set member <peer_names>
end
Example
This example shows how to add peers to the peergrp EU_branches.
config user peergrp
edit EU_branches
set member Sophia_branch Valencia_branch Cardiff_branch
end
History
Related topics
• user peer
• vpn ipsec phase1
• vpn l2tp
• vpn pptp
radius
Use this command to add or edit the information used for RADIUS authentication.
The default port for RADIUS traffic is 1812. If your RADIUS server is using a different port you can change
the default RADIUS port. You may set a different port for each of your RADIUS servers. The maximum
number of remote RADIUS servers that can be configured for authentication is 10.
The RADIUS server is now provided with more information to make authentication decisions, based on
values in server, use-management-vdom, use-group-for-profile, and nas-ip. Attributes
include:
• NAS-IP-Address - RADIUS setting or IP address of FortiGate interface used to talk to RADIUS
server, if not configured
• NAS-Port - physical interface number of the traffic that triggered the authentication
• Called-Station-ID - same value as NAS-IP Address but in text format
• Fortinet-Vdom-Name - name of VDOM of the traffic that triggered the authentication
• NAS-Identifier - configured hostname in non-HA mode; HA cluster group name in HA mode
• Acct-Session-ID - unique ID identifying the authentication session
• Connect-Info - identifies the service for which the authentication is being performed (web-auth, vpn-
ipsec, vpn-pptp, vpn-l2tp, vpn-ssl, admin-login, test)
You may select an alternative authentication method for each server. These include CHAP, PAP, MS-
CHAP, and MS-CHAP-v2.
Syntax
config user radius
edit <server_name>
set all-usergroup {enable | disable}
set auth-type {auto | chap | ms_chap | ms_chap_v2 | pap}
set nas-ip <use_ip>
set radius-port <radius_port_num>
set secondary-secret <sec_server_password>
set secondary-server <sec_server_domain>
set secret <server_password>
set server <domain>
set use-group-for-profile {enable | disable}
set use-management-vdom {enable | disable}
end
Example
This example shows how to add the radius server RAD1 at the IP address 206.205.204.203 and set the
shared secret as R1a2D3i4U5s.
config user radius
edit RAD1
set secret R1a2D3i4U5s
set server 206.205.204.203
end
History
Related topics
• user group
• user ldap
• user local
• user tacacs+
setting
Use this command to change per VDOM user settings such as the firewall user authentication time out and
protocol support for firewall policy authentication.
user settings differ from system global settings in that system global settings fields
apply to the entire FortiGate unit, where user settings fields apply only to the user VDOM.
Syntax
config user setting
set auth-blackout-time <blackout_time_int>
set auth-cert <cert_name>
set auth-http-basic {disable | enable}
set auth-secure-http {enable | disable}
set auth-type {ftp | http | https | telnet}
set auth-timeout <auth_timeout_minutes>
config auth-ports
edit <auth-table-entry-id>
set port <port_int>
set type {ftp | http | https | telnet}
end
end
Example
This example shows how to enable https user authentication, and set the firewall user authentication
timeout to 15 minutes.
config user setting
set auth-type https
set auth-timeout 15
end
History
tacacs+
Use this command to add or edit the information used for TACACS+ authentication.
Terminal Access Controller Access-Control System (TACACS+) is a remote authentication protocol used
to communicate with an authentication server. TACACS+ allows a client to accept a user name and
password and send a query to a TACACS+ authentication server. The server host determines whether to
accept or deny the request and sends a response back that allows or denies network access to the user.
The default port for a TACACS+ server is 49. The maximum number of remote TACACS+ servers that can
be configured for authentication is 10.
You may select an alternative authentication method for each server. These include CHAP, PAP, MS-
CHAP, and ASCII.
Syntax
config user tacacs+
edit <server_name>
set authen-type {ascii | auto | chap | ms_chap | pap}
set key <server_key>
set port <tacacs+_port_num>
set server <domain>
end
Example
This example shows how to add the TACACS+ server TACACS1 at the IP address 206.205.204.203,
set the server key as R1a2D3i4U5s, and authenticate using PAP.
config user tacacs+
edit TACACS1
set authen-type pap
set key R1a2D3i4U5s
set server 206.205.204.203
end
History
Related topics
• user group, user local
• user ldap, user radius
vpn
Use vpn commands to configure options related to virtual private networking through the FortiGate unit,
including:
• IPSec operating parameters
• a local address range for PPTP or L2TP clients
• SSL VPN configuration settings
This chapter contains the following sections:
certificate ca l2tp
certificate crl pptp
certificate local ssl settings
certificate ocsp ssl web host-check-software
certificate remote ssl web portal
ipsec concentrator ssl web virtual-desktop-app-list
ipsec forticlient
ipsec manualkey
ipsec manualkey-interface
ipsec phase1
ipsec phase1-interface
ipsec phase2
ipsec phase2-interface
certificate ca
Use this command to install Certificate Authority (CA) root certificates.
When a CA processes your Certificate Signing Request (CSR), it sends you the CA certificate, the signed
local certificate and the Certificate Revocation List (CRL).
The process for obtaining and installing certificates is as follows:
1 Use the execute vpn certificate local command to generate a CSR.
2 Send the CSR to a CA.
The CA sends you the CA certificate, the signed local certificate and the CRL.
3 Use the vpn certificate local command to install the signed local certificate.
4 Use the vpn certificate ca command to install the CA certificate.
5 Use the vpn certificate crl command to install the CRL.
Depending on your terminal software, you can copy the certificate and paste it into the command.
The CA certificate can update automatically from a Simple Certificate Enrollment Protocol (SCEP) server.
Syntax
config vpn certificate ca
edit <ca_name>
set ca <cert>
set auto-update-days <days_int>
set auto-update-days-warning <days_int>
set scep-url <URL_str>
end
To view all of the information about the certificate, use the get command:
get vpn certificate ca <ca_name>
History
Related topics
• vpn certificate crl
• vpn certificate local
• vpn certificate ocsp
• vpn certificate remote
• execute vpn certificate ca
certificate crl
Use this command to install a Certificate Revocation List (CRL).
When a CA processes your Certificate Signing Request (CSR), it sends you the CA certificate, the signed
local certificate and the Certificate Revocation List (CRL).
The process for obtaining and installing certificates is as follows:
1 Use the execute vpn certificate local command to generate a CSR.
2 Send the CSR to a CA.
The CA sends you the CA certificate, the signed local certificate and the CRL.
3 Use the vpn certificate local command to install the signed local certificate.
4 Use the vpn certificate ca command to install the CA certificate.
5 Use the vpn certificate crl command to install the CRL.
Depending on your terminal software, you can copy the certificate and paste it into the command.
The CRL can update automatically from a Simple Certificate Enrollment Protocol (SCEP) server.
Syntax
config vpn certificate crl
edit <crl_name>
set crl <crl_PEM>
set ldap-server <ldap_server_name>
set ldap-username <ldap_username>
set ldap-password <ldap_password>
set scep-cert <scep_certificate>
set scep-url <scep_url>
set update-vdom <update_vdom>
set http-url <http_url>
set update-interval <seconds>
end
Variable Description
edit <crl_name> Enter a name for the Certificate Revocation List (CRL).
crl <crl_PEM> Enter the CRL in PEM format.
ldap-server Name of the LDAP server defined in config user ldap table for CRL auto-update.
<ldap_server_name>
ldap-username LDAP login name.
<ldap_username>
ldap-password LDAP login password.
<ldap_password>
scep-cert Local certificate used for SCEP communication for CRL auto-update.
<scep_certificate>
scep-url URL of the SCEP server used for automatic CRL certificate updates. Start with http://.
<scep_url>
update-vdom VDOM used to communicate with remote SCEP server for CRL auto-update.
<update_vdom>
Variable Description
http-url URL of an http server used for automatic CRL certificate updates. Start with http://.
<http_url>
update-interval Enter how frequently, in seconds, the FortiGate unit checks for an updated CRL. Enter 0 to
<seconds> update the CRL only when it expires.
History
Related topics
• vpn certificate ca
• vpn certificate local
• vpn certificate ocsp
• vpn certificate remote
• execute vpn certificate crl
certificate local
Use this command to install local certificates.
When a CA processes your Certificate Signing Request (CSR), it sends you the CA certificate, the signed
local certificate and the Certificate Revocation List (CRL).
The process for obtaining and installing certificates is as follows:
1 Use the execute vpn certificate local command to generate a CSR.
2 Send the CSR to a CA.
The CA sends you the CA certificate, the signed local certificate and the CRL.
3 Use the vpn certificate local command to install the signed local certificate.
4 Use the vpn certificate ca command to install the CA certificate.
5 Use the vpn certificate crl command to install the CRL.
Depending on your terminal software, you can copy the certificate and paste it into the command.
The local certificate can update automatically from a Simple Certificate Enrollment Protocol (SCEP) server.
Syntax
config vpn certificate local
edit <cert_name>
set password <pwd>
set comments <comment_text>
set private-key <prkey>
set certificate <cert_PEM>
set csr <csr_PEM>
set scep-url <URL_str>
set scep-password <password_str>
set auto-regenerate-days <days_int>
set auto-regenerate-days-warning <days_int>
end
To view all of the information about the certificate, use the get command:
get vpn certificate local [cert_name]
History
Related topics
• vpn certificate ca
• vpn certificate crl
• vpn certificate ocsp
• vpn certificate remote
• execute vpn certificate local
certificate ocsp
Use this command to install remote certificates. The remote certificates are public certificates without a
private key. They are used as OCSP (Online Certificate Status Protocol) server certificates.
Syntax
config vpn certificate ocsp
edit cert <cert_name>
set url <ocsp_url>
set unavail-action <unavailable_action>
end
To view all of the information about the certificate, use the get command:
get vpn certificate ocsp [cert_name]
Variable Description
cert <cert_name> Enter the OCSP server public certificate (one of the remote certificates).
url <ocsp_url> Enter the URL of the OCSP server.
unavail-action Action taken on client certification when the OCSP server is unreachable. revoke
<unavailable_action> or ignore. Default is revoke.
History
Related topics
• vpn certificate local
• vpn certificate ca
• vpn certificate crl
• vpn certificate remote
• execute vpn certificate remote
certificate remote
Use this command to install remote certificates. The remote certificates are public certificates without a
private key. They are used as OCSP (Online Certificate Status Protocol) server certificates.
Syntax
config vpn certificate remote
edit cert <cert_name>
set remote <remote_cert_detail>
end
To view all of the information about the certificate, use the get command:
get vpn certificate remote [cert_name]
Variable Description
cert <cert_name> Enter the name of the public certificate.
remote Details/description of the remote certificate.
<remote_cert_detail>
History
Related topics
• vpn certificate local
• vpn certificate ca
• vpn certificate crl
• vpn certificate ocsp
• execute vpn certificate remote
ipsec concentrator
Use this command to add IPSec policy-based VPN tunnels to a VPN concentrator. The VPN concentrator
collects hub-and-spoke tunnels into a group.
The concentrator allows VPN traffic to pass from one tunnel to the other through the FortiGate unit. The
FortiGate unit functions as a concentrator, or hub, in a hub-and-spoke network.
Syntax
config vpn ipsec concentrator
edit <concentrator_name>
set member <member_name> [member_name] [member_name]
set src-check {enable | disable}
end
Example
Use the following commands to add an IPSec VPN concentrator named Concen_1 and add three tunnels
to the concentrator.
config vpn ipsec concentrator
edit Concen_1
set member Tunnel_1 Tunnel_2 Tunnel_3
end
History
Related topics
• vpn ipsec phase1, vpn ipsec manualkey
ipsec forticlient
Use this command to configure automatic VPN configuration for FortiClient Host Security application
users.
The FortiClient users who will use automatic configuration must be members of a user group. The config
vpn ipsec forticlient command creates a “realm” that associates the user group with the phase 2
VPN configuration. You can create multiple realms to associate different user groups with different phase 2
configurations.
The user group identifies the user name and password settings that the dialup client’s credentials must
match in order for authentication to be successful. The phase 2 tunnel definition and its associated firewall
encryption policy provides the configuration parameters to download to the FortiClient Host Security
application.
Syntax
Set or unset VPN policy distribution parameters.
config vpn ipsec forticlient
edit <realm_name>
set phase2name <tunnel_name>
set status {disable | enable}
set usergroupname <group_name>
end
Example
The following example enables VPN policy distribution for a user group called Dialup_users. The phase
2 tunnel configuration named FG1toDialup_tunnel provides the FortiGate unit with the information it
needs to find and apply the associated firewall encryption policy:
config vpn ipsec forticlient
edit Standard_VPN_policy
set phase2name FG1toDialup_tunnel
set usergroupname Dialup_users
set status enable
end
History
Related topics
• vpn ipsec phase2
• user group
ipsec manualkey
Use this command to configure manual keys for IPSec tunnel-mode VPN tunnels. You configure a manual
key tunnel to create an IPSec tunnel-mode VPN tunnel between the FortiGate unit and a remote IPSec
VPN client or gateway that is also using manual key.
A manual key VPN tunnel consists of a name for the tunnel, the IP address of the VPN gateway or client at
the opposite end of the tunnel, and the encryption and authentication algorithms to use for the tunnel.
Because the keys are created when you configure the tunnel, no negotiation is required for the VPN tunnel
to start. However, the VPN gateway or client that connects to this tunnel must use the same encryption and
authentication algorithms and must have the same encryption and authentication keys.
Syntax
config vpn ipsec manualkey
edit <tunnel_name>
set authentication <authentication_algorithm>
set authkey <authentication_key>
set encryption <method>
set enckey <encryption_key>
set interface <interface_name>
set localspi <local_spi_number>
set local-gw <address_ipv4>
set remote-gw <address_ipv4>
set remotespi <remote_spi_number>
end
Note: The authentication, encryption, interface, remote-gw, localspi, and remotespi fields are
required. All other fields are optional.
Example
Use the following command to add an IPSec VPN manual key tunnel with the following characteristics:
• Tunnel name: Manual_Tunnel
• Local SPI: 1000ff
• Remote SPI: 2000ff
• Remote gateway IP address: 206.37.33.45
• Encryption algorithm: 3DES
• Encryption keys: 003f2b01a9002f3b 004f4b0209003f01 3b00f23bff003eff
History
Related topics
• vpn ipsec phase2
ipsec manualkey-interface
Use this command to configure manual keys for a route-based (interface mode) IPSec VPN tunnel. When
you create a route-based tunnel, the FortiGate unit creates a virtual IPSec interface automatically. The
interface can be modified afterward using the system network interface CLI command. This
command is available only in NAT/Route mode.
Syntax
config vpn ipsec manualkey-interface
edit <tunnel_name>
set auth-alg <authentication_algorithm>
set auth-key <authentication_key>
set enc-alg <method>
set enc-key <encryption_key>
set interface <interface_name>
set ip-version <4 | 6>
set local-gw <address_ipv4>
set local-gw6 <address_ipv6>
set local-spi <local_spi_number>
set remote-gw <address_ipv4>
set remote-gw6 <address_ipv6>
set remote-spi <remote_spi_number>
end
Note: The auth-alg, enc-alg, interface, remote-gw, local-spi, and remote-spi fields are required.
All other fields are optional.
Example
Use the following command to add a route-based (interface-mode) IPSec VPN tunnel having the following
characteristics:
• Tunnel name: Manual-inf_tunnel
• Local SPI: 1000ff
• Remote SPI: 2000ff
• VLAN interface name: vlan_1
History
Related topics
• vpn ipsec phase2-interface
ipsec phase1
Use this command to add or edit IPSec tunnel-mode phase 1 configurations. When you add a tunnel-mode
phase 1 configuration, you define how the FortiGate unit and a remote VPN peer (gateway or client)
authenticate themselves to each other as part of establishing an IPSec VPN tunnel.
The phase 1 configuration specifies the name of a remote VPN peer, the nature of the connection (static
IP, dialup, or dynamic DNS), the encryption and authentication keys for the phase 1 proposal, and the
authentication method (preshared key or certificate). For authentication to be successful, the FortiGate unit
and the remote VPN peer must be configured with compatible phase 1 settings.
You can change all settings except the type setting after you define the configuration: if the address type
of a remote peer changes, you must delete the original phase 1 configuration and define a new one. As a
general rule, create only one phase 1 configuration per remote VPN peer.
Syntax
config vpn ipsec phase1
edit <gateway_name>
set add-gw-route {enable | disable}
set authmethod <authentication_method>
set authpasswd <password>
set authusr <user_name>
set authusrgrp <group_name>
set dhgrp {1 2 5 14}
set distance <int>
set dpd {disable | enable}
set dpd-retrycount <retry_integer>
set dpd-retryinterval <seconds> [<milliseconds>]
set interface <interface_name>
set keepalive <seconds>
set keylife <seconds>
set local-gw <address_ipv4>
set localid <local_id>
set mode {aggressive | main}
set nattraversal {disable | enable}
set peer <CA_certificate_name>
set peerid <peer_id>
set peergrp <certificate_group_name>
set peertype <authentication_method>
set priority <prio>
set proposal <encryption_combination>
set psksecret <preshared_key>
set remote-gw <address_ipv4>
set remotegw-ddns <domain_name>
set rsa-certificate <server_certificate>
set type <remote_gw_type>
set usrgrp <group_name>
set xauthtype <XAuth_type>
end
Note: A proposal value is required. In NAT/Route mode, you must specify interface. A remote-gw value
may be required depending on the value of the type attribute. You must also enter a preshared key or a
certificate name depending on the value of authmethod. All other fields are optional.
Example
Use the following command to add a tunnel-mode IPSec VPN phase 1 configuration with the following
characteristics:
• Phase 1 configuration name: Simple_GW
• Physical interface name: port6
• Remote peer address type: Dynamic
• Encryption and authentication proposal: des-md5
• Authentication method: psk
• Pre-shared key: Qf2p3O93jIj2bz7E
• Mode: aggressive
• Dead Peer Detection: disable
config vpn ipsec phase1
edit Simple_GW
set interface port6
set type dynamic
set proposal des-md5
set authmethod psk
set psksecret Qf2p3O93jIj2bz7E
set mode aggressive
set dpd disable
end
History
FortiOS v3.0 Renamed mixed option of xauthtype field to auto. Renamed remotegw to remote-gw.
Added interface and local-gw attributes. Name of phase 1 definition is now limited to 15
characters.
Added priority field.
FortiOS v4.0 Changed default value of proposal to aes128-sha1 3des-sha1.
Changed default value of dpd and nattraversal to enable.
Related topics
• vpn ipsec phase2
• user group
• user local
• user peer
• user peergrp
• user radius
• execute vpn certificate local
• vpn certificate ca
ipsec phase1-interface
Use this command to define a phase 1 definition for a route-based (interface mode) IPSec VPN tunnel that
generates authentication and encryption keys automatically. A new interface of type “tunnel” with the same
name is created automatically as the local end of the tunnel.
Optionally, you can create a route-based phase 1 definition to act as a backup for another IPSec interface.
See the monitor-phase1 <phase1> field.
To complete the configuration of an IPSec tunnel, you need to:
• configure phase 2 settings (see “ipsec phase2-interface” on page 611)
• configure a firewall policy to pass traffic from the local private network to the tunnel interface
• configure a static route via the IPSec interface to the private network at the remote end of the tunnel
• optionally, define the IP addresses for each end of the tunnel to enable dynamic routing through the
tunnel or to enable pinging of each end of the tunnel for testing
Syntax
config vpn ipsec phase1-interface
edit <gateway_name>
set add-gw-route {enable | disable}
set add-route {enable | disable}
set assign-ip {enable | disable}
set assign-ip-from {range | usrgrp}
set assign-ip-type {ip | subnet}
set authmethod <authentication_method>
set authpasswd <password>
set authusr <user_name>
set authusrgrp <group_name>
set banner <string>
set default-gw <gw_ip>
set default-gw-priority <int>
set dhgrp {1 2 5 14}
set distance <int>
set domain <string>
set dpd {disable | enable}
set dpd-retrycount <retry_integer>
set dpd-retryinterval <seconds> [<milliseconds]
set ike-version {1 | 2}
set interface <interface_name>
set ip-version <4 | 6>
set ipv4-dns-server1
set ipv6-dns-server1
set ipv4-dns-server2
set ipv6-dns-server2
set ipv4-dns-server3
set ipv6-dns-server3
set ipv4-end-ip <ip4addr>
set ipv6-end-ip <ip6addr>
set ipv4-netmask <ip4mask>
set ipv4-split-include <address_name>
set ipv4-start-ip <ip4addr>
set ipv6-start-ip <ip6addr>
set ipv4-wins-server1
set ipv4-wins-server2
set ipv6-prefix <ip6prefix>
set keepalive <seconds>
set keylife <seconds>
set local-gw <address_ipv4>
set local-gw6 <address_ipv6>
set localid <local_id>
set mode {aggressive | main}
set mode-cfg {enable | disable}
set mode-cfg-ip-version {4|6}
set monitor-phase1 <phase1>
set nattraversal {disable | enable}
set peer <CA_certificate_name>
set peerid <peer_id>
set peergrp <certificate_group_name>
set peertype <authentication_method>
set priority <prio>
set proposal <encryption_combination>
set psksecret <preshared_key>
set remote-gw <address_ipv4>
set remote-gw6 <address_ipv6>
set remotegw-ddns <domain_name>
set rsa-certificate <server_certificate>
set type <remote_gw_type>
set unity-support {enable | disable}
set usrgrp <group_name>
set xauthtype <XAuth_type>
config ipv4-exclude-range
edit <entry_id>
set start-ip <ipaddr>
set end-ip <ipaddr>
end
config ipv6-exclude-range
edit <entry_id>
set start-ip <ipaddr>
set end-ip <ipaddr>
end
end
Note: You must specify values for proposal and interface. A remote-gw value may be required depending
on the value of the type attribute. You must also enter a preshared key or a certificate name depending on the
value of authmethod. All other fields are optional.
In this example, the user defines IP addresses for each end of the tunnel to enable dynamic routing
through the tunnel or to enable pinging of each end of the tunnel for testing. The Site A end has the IP
address 10.0.0.1 and the SiteB end is 10.0.0.2.
Site A configuration Site B configuration
(Optional) (Optional)
config system interface config system interface
edit toSiteB edit toSiteA
set ip 10.0.0.1/32 set ip 10.0.0.2/32
set remote-ip 10.0.0.2 set remote-ip 10.0.0.1
set allowaccess ping set allowaccess ping
end end
The backupToHeadquarters interface is a backup interface because its monitor-phase1 option is not
null; it is set to monitor the toHeadquarters interface. If the monitored interface goes down, as determined
by Dead Peer Detection, the backup interface becomes active.
The backup interface uses a different physical interface, which could be connected to a different Internet
service provider. The remote gateway can be the same, or it can specify an alternative gateway, if one
exists. Otherwise, the two IPSec interfaces are identically configured.
config vpn ipsec phase1-interface
edit "toHeadquarters"
set interface "wan1"
set remote-gw 172.16.1.10
set dpd enable
... [other phase1 settings as needed]
next
edit "backupToHeadquarters"
set interface "wan2"
set monitor-phase1 "toHeadquarters"
set remote-gw 172.16.1.10
... [other phase1 settings as needed]
end
end
History
Related topics
• vpn ipsec phase2-interface
• user group
• user local
• user peer
• user peergrp
• user radius
• vpn certificate local
• vpn certificate ca
ipsec phase2
Use this command to add or edit an IPSec tunnel-mode phase 2 configuration. The FortiGate unit uses the
tunnel-mode phase 2 configuration to create and maintain an IPSec VPN tunnel with a remote VPN peer
(the VPN gateway or client).
The phase 2 configuration consists of a name for the VPN tunnel, the name of an existing phase 1
configuration, the proposal settings (encryption and authentication algorithms) and DH group used for
phase 2. For phase 2 to be successful, the FortiGate unit and the remote VPN peer must be configured
with compatible proposal settings.
Syntax
config vpn ipsec phase2
edit <tunnel_name>
set add-route {enable | disable}
set auto-negotiate {enable | disable}
set dhcp-ipsec {disable | enable}
set dhgrp {1 | 2 | 5 | 14}
set dst-addr-type <type>
set dst-end-ip <address_ipv4>
set dst-name <address_name>
set dst-port <destination_port_number>
set dst-start-ip <address_ipv4>
set dst-subnet <address_ipv4mask>
set keepalive {disable | enable}
set keylife-type <keylife_type>
set keylifekbs <kb_integer>
set keylifeseconds <seconds>
set pfs {disable | enable}
set phase1name <gateway_name>
set proposal <encryption_combination>
set protocol <protocol_integer>
set replay {disable | enable}
set route-overlap {overlap_option}
set selector-match <match_type>
set single-source {disable | enable}
set src-addr-type <ip_source_name>
set src-end-ip <address_ipv4>
set src-name <address_name>
set src-port <source_port_number>
set src-start-ip <address_ipv4>
set src-subnet <address_ipv4mask>
set use-natip {enable | disable}
end
Note: The phase1name field is required. All other fields are optional.
Example
Use the following command to add a tunnel-mode phase 2 configuration with the following characteristics:
• Name: New_Tunnel
• Phase 1 name: Simple_GW
• Encryption and authentication proposal: 3des-sha1 aes256-sha1 des-md5
• Keylife type: seconds
• Keylife seconds: 18001
• Diffie-Hellman group: 2
History
Related topics
• vpn ipsec phase1
• alertemail setting
• alertemail setting
• firewall policy, policy6
ipsec phase2-interface
Use this command to add a phase 2 configuration for a route-based (interface mode) IPSec tunnel or edit
an existing interface-mode phase 2 configuration. This command is available only in NAT/Route mode.
Syntax
config vpn ipsec phase2-interface
edit <tunnel_name>
set auto-negotiate {enable | disable}
set dhcp-ipsec {disable | enable}
set dhgrp {1 | 2 | 5 | 14}
set dst-addr-type <type>
set dst-end-ip <address_ipv4>
set dst-end-ip6 <address_ipv6>
set dst-name <address_name>
set dst-port <destination_port_number>
set dst-start-ip <address_ipv4>
set dst-start-ip6 <address_ipv6>
set dst-subnet <address_ipv4mask>
set dst-subnet6 <address_ipv6mask>
set keepalive {disable | enable}
set keylife-type <keylife_type>
set keylifekbs <kb_integer>
set keylifeseconds <seconds>
set pfs {disable | enable}
set phase1name <gateway_name>
set proposal <encryption_combination>
set protocol <protocol_integer>
set replay {disable | enable}
set route-overlap {overlap_option}
set single-source {disable | enable}
set src-addr-type <ip_source_name>
set src-end-ip <address_ipv4>
set src-end-ip6 <address_ipv6>
set src-name <address_name>
set src-port <source_port_number>
set src-start-ip <address_ipv4>
set src-start-ip6 <address_ipv6>
set src-subnet <address_ipv4mask>
set src-subnet6 <address_ipv6mask>
end
Note: The phase1name field is required. All other fields are optional.
Example
Use the following command to add a route-based (interface mode) phase 2 configuration with the following
characteristics:
• Name: Interface_Tunnel
• Phase 1 name: Interface_GW
• Encryption and authentication proposal: 3des-sha1 aes256-sha1 des-md5
• Keylife type: seconds
• Keylife seconds: 18001
• Diffie-Hellman group: 2
• Replay detection: enable
• Perfect forward secrecy: enable
• Keepalive: enable
config vpn ipsec phase2-interface
edit Interface_Tunnel
set phase1name Interface_GW
set proposal 3des-sha1 aes256-sha1 des-md5
set keylife-type seconds
set keylifeseconds 18001
set dhgrp 2
set replay enable
set pfs enable
set keepalive enable
end
History
Related topics
• vpn ipsec phase1-interface
• alertemail setting
• alertemail setting
• firewall policy, policy6
l2tp
Use this command to enable L2TP and specify a local address range to reserve for remote L2TP clients.
When a remote L2TP client connects to the internal network through a L2TP VPN, the client is assigned an
IP address from the specified range.
L2TP clients must authenticate with the FortiGate unit when a L2TP session starts. To support L2TP
authentication on the FortiGate unit, you must define the L2TP users who need access and then add them
to a user group. For more information, see “user group” on page 551, “user ldap” on page 555, “user local”
on page 558, and “user radius” on page 563.
You need to define a firewall policy to control services inside the L2TP tunnel. For more information, see
“firewall” on page 109. When you define the firewall policy:
• Create an “external -> internal” policy.
• Set the source address to match the L2TP address range.
• Set the destination address to reflect the private address range of the internal network behind the local
FortiGate unit.
• Set the policy service(s) to match the type(s) of traffic that L2TP users may generate.
• Set the policy action to accept.
• Enable NAT if required.
Caution: FortiGate units support L2TP with Microsoft Point-to-Point Encryption (MPPE) encryption only. Later
implementations of Microsoft L2TP for Windows use IPSec and require certificates for authentication and
encryption. If you want to use Microsoft L2TP with IPSec to connect to a FortiGate unit, the IPSec and certificate
elements must be disabled on the remote client. For more information, see the Disabling Microsoft L2TP for
IPSec article in the Fortinet Knowledge Center.
Syntax
config vpn l2tp
set eip <address_ipv4>
set sip <address_ipv4>
set status {disable | enable}
set usrgrp <group_name>
end
Note: You can configure L2TP VPNs on FortiGate units that run in NAT/Route mode. The commands are
available in NAT/Route mode only. When you configure an L2TP address range for the first time, you must enter
a starting IP address, an ending IP address, and a user group.
Example
This example shows how to enable L2TP and set the L2TP address range for the first time using a starting
address of 192.168.1.150, an ending address of 192.168.1.160 and an existing group of L2TP users
named L2TP_users:
config vpn l2tp
set sip 192.168.1.150
set eip 192.168.1.160
set status enable
set usrgrp L2TP_users
end
History
Related topics
• user group
• firewall policy, policy6
pptp
Use this command to enable PPTP and specify a local address range to reserve for remote PPTP clients.
When a remote PPTP client connects to the internal network through a PPTP VPN, the client is assigned
an IP address from the specified range or from the server defined in the PPTP user group.
PPTP clients must authenticate with the FortiGate unit when a PPTP session starts. To support PPTP
authentication on the FortiGate unit, you must define the PPTP users who need access and then add them
to a user group. For more information, see “user group” on page 551, “user ldap” on page 555, “user local”
on page 558, “user radius” on page 563, “user peer” on page 560, and “user peergrp” on page 562.
You need to define a firewall policy to control services inside the PPTP tunnel. For more information, see
“firewall” on page 109. When you define the firewall policy:
• Create an “external -> internal” policy.
• Set the source address to match the PPTP address range.
• Set the destination address to reflect the private address range of the internal network behind the local
FortiGate unit.
• Set the policy service(s) to match the type(s) of traffic that PPTP users may generate.
• Set the policy action to accept.
• Enable NAT if required.
When you intend to use the FortiGate unit as a PPTP gateway, you can select a PPTP client IP from a
local address range or use the server defined in the PPTP user group. You select which method to use for
IP address retrieval and, in the case of the user group server, provide the IP address and the user group.
The FortiGate unit retrieves the Framed-IP-Address (the actual IP address of the client) from the
RADIUS accounting start/stop message when ip-mode is set to usrgrp.
Syntax
config vpn pptp
set eip <address_ipv4>
set ip-mode {range | usrgrp}
set local-ip {address_localip}
set sip <address_ipv4>
set status {disable | enable}
set usrgrp <group_name>
end
Note: You can configure PPTP VPNs on FortiGate units that run in NAT/Route mode. The commands are
available in NAT/Route mode only. When you configure a PPTP address range for the first time, you must enter
a starting IP address, an ending IP address, and a user group.
Example
This example shows how to enable PPTP and set the PPTP address range for the first time using a
starting address of 192.168.1.100, an ending address of 192.168.1.130 and an existing group of
PPTP users named PPTP_users:
config vpn pptp
set sip 192.168.1.100
set eip 192.168.1.130
set status enable
set usrgrp PPTP_users
end
This example shows how to enable PPTP and set the IP address from the PPTP user group server.
config vpn pptp
set ip-mode usrgrp
set local-ip 172.14.12.14
set status enable
set usrgrp PPTP_users
end
History
Related topics
• user group
• firewall policy, policy6
ssl settings
Use this command to configure basic SSL VPN settings including interface idle-timeout values and SSL
encryption preferences. If required, you can also enable the use of digital certificates for authenticating
remote clients.
You can optionally specify the IP address of any Domain Name Service (DNS) server and/or Windows
Internet Name Service (WINS) server that resides on the private network behind the FortiGate unit. The
DNS and/or WINS server will find the IP addresses of other computers whenever a connected SSL VPN
user sends an email message or browses the Internet.
Note: You can configure SSL VPNs on FortiGate units that run in NAT/Route mode. The commands are
available in NAT/Route mode only.
Syntax
config vpn ssl settings
set algorithm <cipher_suite>
set auth-timeout <auth_seconds>
set deflate-compression-level <int>
set deflate-min-data-size <int>
set dns-server1 <address_ipv4>
set dns-server2 <address_ipv4>
set force-two-factor-auth {enable | disable}
set force-utf8-login {enable | disable}
set http-compression {enable | disable}
set idle-timeout <idle_seconds>
set portal-heading <caption>
set reqclientcert {disable | enable}
set route-source-interface {disable | enable}
set servercert <server_cert_name>
set sslv2 {disable | enable}
set sslv3 {disable | enable}
set sslvpn-enable {disable | enable}
set tunnel-ip-pools <pool1_name...pooln_name>
set url-obscuration {disable | enable}
set wins-server1 <address_ipv4>
set wins-server2 <address_ipv4>
end
Note: Set the sslvpn-enable attribute to enable to view all possible settings. The tunnel-ip-pools field is
required for tunnel-mode access only. All other fields are optional.
When you configure the timeout settings, if you set the authentication timeout (auth-timeout) to 0, then
the remote client does not have to re-authenticate again unless they log out of the system. In order to fully
take advantage of this setting, the value for idle-timeout has to be set to 0 also, so the client does not
timeout if the maximum idle time is reached. If the idle-timeout is not set to the infinite value, the
system will log out if it reaches the limit set, regardless of the auth-timeout setting.
Example
The following command enables the FortiGate unit to assign virtual IP addresses in the 10.10.10.100 to
10.10.10.105 range to authenticated clients (an IP address range is needed to support tunnel-mode
access). The command also sets timeout values for authenticated connections and connection inactivity
respectively.
config firewall address
edit SSLVPN_client_range
set type iprange
set start-ip 10.10.10.100
set end-ip 10.10.10.105
end
config vpn ssl settings
set sslvpn-enable enable
set tunnel-ip-pools SSLVPN_client_range
set auth-timeout 600
set idle-timeout 1500
end
History
FortiOS v3.0 MR6 Changed values in auth-timeout and idle-timeout to include infinity setting.
FortiOS v3.0 MR7 If url-obscuration is enabled, bookmark details are not visible.
FortiOS v4.0 MR1 Added force-two-factor-auth, force-utf8-login, deflate-compression-
level, deflate-min-data-size, http-compression.
Added tunnel-ip-pools, removed tunnel-startip and tunnel-endip.
Related topics
• system replacemsg sslvpn
• execute vpn sslvpn del-tunnel
• get vpn ssl monitor
• user group
• user peer
• firewall policy, policy6
Syntax
config vpn ssl web host-check-software
edit <software_name>
set guid <guid>
set type {av | fw}}
set version <version_str>
config check-item-list
edit <id_int>
set action {deny | require}
set md5s <md5_str>
set target {file | process | registry}
set type {file | process | registry}
set version <version-str>
end
end
History
Related topics
• vpn ssl web portal
Syntax
config vpn ssl web portal
edit <portal_name>
set allow-access <allow_access>
set allow-user-bookmark {enable | disable}
set cache-cleaner {disable | enable}
set heading <str_heading>
set host-check {av | av-fw | custom | fw | none}
set host-check-interval <seconds>
set host-check-policy <hcpolicy_name>
set limit-user-logins {enable | disable}
set os-check {disable | enable}
set page-layout <double-column | single-column>
set redir-url <redir_url>
set theme <blue | gray | orange>
set virtual-desktop {disable | enable}
config os-check-list {windows-2000 | windows-vista | windows-xp}
set action {allow | check-up-to-date | deny}
set latest-patch-level {disable | 0 - 255}
set tolerance {tolerance_num}
end
config widget
edit id <widget_id>
set name <name_str>
set type <widget_type>
set column <column_number>
set collapse {disable | enable}
set allow-apps <service_type_access>
set tunnel-status {disable | enable}
set split-tunneling {disable | enable}
set split-tunneling-routing-address <address_name>
set ip-mode {range | usrgrp}
set ip-pools {<pool1_name> .. <pooln_name>}
config bookmarks
edit name <bookmark_name>
set apptype <service_type>
set url <target_ip>
History
Related topics
• vpn ssl settings
• vpn ssl web host-check-software
Syntax
config vpn ssl web virtual-desktop-app-list
edit <applist_name>
set set action {allow | block}
config apps
edit <app_name>
set md5s <md5_str>
end
end
end
History
Related topics
• vpn ssl web portal
wanopt
Use these commands to configure FortiGate WAN optimization.
For more information about WAN optimization, see the FortiGate WAN Optimization, Web Cache, and
Web Proxy User Guide.
auth-group settings
cache-storage ssl-server
peer storage
rule webcache
auth-group
Use this command to configure WAN optimization authentication groups. Add authentication groups to
support authentication and secure tunneling between WAN optimization peers.
Syntax
config wanopt auth-group
edit <auth_group_name>
set auth-method {cert | psk}
set cert <certificate_name>
set peer <peer_host_id>
set peer-accept {any | defined | one}
set psk <preshared_key>
end
Example
This example shows how to add an authentication group named auth_grp_1 that uses a certificate
named Example_Cert and can be used to authenticate all peers added to the FortiGate unit
configuration
config wanopt auth-group
edit auth_grp_1
set auth-method cert
set cert Example_Cert
set peer-accept defined
end
History
FortiOS v4.0 New.
Related commands
• wanopt cache-storage
• wanopt peer
• wanopt rule
• wanopt settings
• wanopt ssl-server
• wanopt storage
• wanopt webcache
cache-storage
Using the execute scsi-dev storage command you can add multiple WAN optimization storages
and then use the config wanopt cache-storage command to configure the storages to use for byte
caching and web caching. A storage defines the maximum size of the byte caching or web caching
database added to the storage.
Unless you have special requirements, you do not need to change cache-storage settings unless you
use more than one SCSI device for WAN optimization.
You can use the show wanopt storage command to view the WAN optimization storages that you have
added using the execute scsi-dev storage command. You can also use the config wanopt
storage command to change the storage sizes.
For more information about the execute scsi-dev command, see “execute scsi-dev” on page 735.
Syntax
config wanopt cache-storage
set byte-cache-storage <storage_name_str>
set web-cache-storage <storage_name_str>
end
Example
Enter the following commands to configure web caching to use a storage called web_cache_sto and
byte caching to use a storage called byte_cache_sto.
config wanopt cache-storage
set web-cache-storage web_cache_sto
set byte-cache-storage byte_cache_sto
end
History
FortiOS v4.0 New.
Related commands
• execute scsi-dev
• wanopt auth-group
• wanopt peer
• wanopt rule
• wanopt settings
• wanopt ssl-server
• wanopt storage
• wanopt webcache
peer
Add WAN optimization peers to a FortiGate unit to identify the FortiGate units that the local FortiGate unit
can form WAN optimization tunnels with. A peer consists of a peer name, which is the local host ID of the
remote FortiGate unit and an IP address, which is the IP address of the interface that the remote FortiGate
unit uses to connect to the local FortiGate unit.
Use the command config wanopt settings to add the local host ID to a FortiGate unit.
Syntax
config wanopt peer
edit <peer_name>
set ip <peer_ip_ipv4>
end
Example
Use the following commands to add three peers.
config wanopt peer
edit Wan_opt_peer_1
set ip 172.20.120.100
next
edit Wan_opt_peer_2
set ip 172.30.120.100
next
edit Wan_opt_peer_3
set ip 172.40.120.100
end
History
Related commands
• wanopt auth-group
• wanopt cache-storage
• wanopt rule
• wanopt settings
• wanopt ssl-server
• wanopt storage, wanopt webcache
rule
WAN optimization uses rules to select traffic to be optimized. But, before WAN optimization rules can
accept traffic, the traffic must be accepted by a FortiGate firewall policy. All sessions accepted by a firewall
policy that also match a WAN optimization rule are processed by WAN optimization.
To configure WAN optimization you add WAN optimization rules to the FortiGate units at each end of the
tunnel. Similar to firewall policies, when the FortiGate unit receives a connection packet, it analyzes the
packet’s source address, destination address, and service (by destination port number), and attempts to
locate a matching WAN optimization rule that decides how to optimize the traffic over WAN.
The FortiGate unit applies firewall policies to packets before WAN optimization rules. A WAN optimization
rule is applied to a packet only after the packet is accepted by a firewall policy.
Syntax
config wanopt rule
edit <index_int>
set auth-group <auth_group_name>
set auto-detect {active | off | passive}
set byte-caching {disable | enable}
set dst-ip <address_ipv4>[-<address-ipv4>]
set mode {full | webcache-only}
set peer <peer_name>
set port <port_int>[-<port-int>]
set proto {cifs | ftp | http | mapi | tcp}
set secure-tunnel {disable | enable}
set src-ip <address_ipv4>[-<address-ipv4>]
set ssl {disable | enable}
set status {disable | enable}
set transparent {disable | enable}
set tunnel-non-http {disable | enable}
set tunnel-sharing {express-shared | private | shared}
set unknown-http-version {best-effort | reject | tunnel}
set webcache {disable | enable}
end
WAN
IP address IP address
172.20.120.1 192.168.10.1
end
3 Add the following passive rule to the server side FortiGate unit:
config wanopt rule
edit 5
set auto-detect passive
set src-ip 172.20.120.0
set dst-ip 192.168.10.0
set port 80
set webcache enable
end
Accept default settings for status (enable) and mode (full).
History
Related commands
• wanopt auth-group
• wanopt cache-storage
• wanopt peer
• wanopt settings
• wanopt ssl-server
• wanopt storage
• wanopt webcache
settings
Use this command to add or change the FortiGate WAN optimization local host ID and to enable traffic
loging for WAN optimization and WAN optimization web caching sessions. The local host ID identifies the
FortiGate unit to other FortiGate units for WAN optimization. All WAN optimization tunnel startup requests
to other FortiGate units include the local host id. The FortiGate unit can only perform WAN optimization
with other FortiGate units that have this local host id in their peer list.
Syntax
config wanopt settings
set host-id <host-id-name_str>
set log-traffic {cifs ftp http mapi tcp}
end
Example
This example shows how to set the local host ID to HQ_Peer and enable traffic logging for WAN
optimization CIFS and HTTP sessions.
config wanopt settings
set host-id HQ_peer
set log-traffic cifs http
end
History
Related commands
• wanopt auth-group
• wanopt cache-storage
• wanopt peer
• wanopt rule
• wanopt ssl-server
• wanopt storage
• wanopt webcache
ssl-server
Use this command to add one or more SSL servers to support WAN optimization SSL offloading. You
enable WAN optimization SSL offloading by enabling the ssl field in a WAN optimization rule. WAN
optimization supports SSL encryption/decryption offloading for HTTP servers.
SSL offloading uses the FortiGate unit to encrypt and decrypt SSL sessions.The FortiGate unit intercepts
HTTPS traffic from clients and decrypts it before sending it as clear text to the HTTP server. The clear text
response from the HTTP server is encrypted by the FortiGate unit and returned to the client. The result
should be a performance improvement because SSL encryption is offloaded from the server to the
FortiGate unit FortiASIC SSL encryption/decryption engine.
You must add one WAN optimization SSL server configuration to the FortiGate unit for each HTTP server
that you are configuring SSL offloading for. This SSL server configuration must also include the HTTP
server CA. You load this certificated into the FortiGate unit as a local certificate using the config vpn
certification local command and then add the certificate to the SSL server configuration using the
ssl-cert field. The certificate key size must be 1024 or 2048 bits. 4096-bit keys are not supported.
You can configure one WAN optimization rule to offload SSL encryption/decryption for multiple HTTP
servers. To do this, the WAN optimization rule source and destination addresses must be configured so
that the rule accepts packets destined for all of the HTTP servers that you want offloading for. Then you
must add one SSL server configuration for each of the HTTP servers.
Syntax
config wanopt ssl-server
edit <ssl-server-name>
set ip <ssl_server_ip_ipv4>
set port <port_int>
set ssl-mode {full | half}
set ssl-cert <certificate_name>
set ssl-dh-bits {1024 | 1536 | 2048 | 768}
set ssl-min-version {ssl-3.0 | tls-1.0}
set ssl-max-version {ssl-3.0 | tls-1.0}
set ssl-send-empty-frags {disable | enable}
end
Client Network
172.20.120.0 Client side Server side Web Server
Rule: autodetect: off SSL server and Web server CA (port 80)
Local Host ID:User_net Local Host ID:Web_servers IP:192.168.10.20
WAN
IP address IP address
172.20.120.1 192.168.10.1
3 1
2
When the client side FortiGate unit accepts an HTTPS connection for 192.168.10.20 the SSL server
configuration provides the information that the client side FortiGate unit needs to decrypt the traffic and
send it in clear text across a WAN optimization tunnel to the server side FortiGate unit. The server side
FortiGate unit then forwards the clear text packets to the HTTP server.
The HTTP server CA is not downloaded from the server side to the client side FortiGate unit. Instead the
client side FortiGate unit proxies the SSL parameters from the client side to the server side which returns
an SSL key and other required information to the client side FortiGate unit so that the client FortiGate unit
can decrypt and encrypt HTTPS traffic.
Note: You do not need to add a WAN optimization rule to the server side FortiGate unit as long as the server
side FortiGate unit includes the local host ID of the client FortiGate unit in its peer list. However, you could set
auto-detect to active on the client side FortiGate and add then a rule to the server side FortiGate unit
with auto-detect set to passive.
Note: In this example the secure tunnel and the authentication group configurations are not required, but are
added to enhance security. Adding the peers and the WAN optimization rules are required for WAN
optimization SSL offloading.
You can configure other rule settings as required. By default transparent is enabled, proto is http
(proto should not be changed), mode is full, auto-detect is off, byte-caching is enabled, and
tunnel-sharing is private.
History
Related commands
• wanopt auth-group
• wanopt cache-storage
• wanopt peer
• wanopt rule
• wanopt settings
• wanopt storage, wanopt webcache
storage
Use the show wanopt storage command to view WAN optimization storages. Use the config
wanopt storage command to change the size of WAN optimization storages. A storage defines the
maximum size of the byte caching or web caching database added to the storage.
You use the execute scsi-dev storage command to add WAN optimization storages. For more
information about the execute scsi-dev command, see “execute scsi-dev” on page 735.
Syntax
config wanopt storage
edit <storage_name_str>
set partition-label <partition-label>
set partition-size <partition_size_int>
set storage-size <storage_size_int>
end
Examples
Use the following command to display all of the storages added to a FortiGate unit. The two storages
shown in the output were added to the same partition.
show wanopt storage
config wanopt storage
edit "storage_1"
set partition-label "742FD71029DB5130"
set partition-size 76316
set storage-size 30000
next
edit "storage_2"
set partition-label "742FD71029DB5130"
set partition-size 76316
set storage-size 30000
next
end
Use the following command to change the size of storage_2 from 30000 to 40000 Mbytes:
config wanopt storage
edit "storage_2"
set storage-size 40000
next
end
History
Related commands
• wanopt auth-group
• wanopt cache-storage
• wanopt peer
• wanopt rule
• wanopt settings
• wanopt ssl-server
• wanopt webcache
webcache
Use this command to change how the WAN optimization web cache operates. In most cases the default
settings are acceptable. However you may want to change these settings to improve performance or
optimize the cache for your configuration.
Syntax
config wanopt storage
set always-revalidate {disable | enable}
set cache-expired {disable | enable}
set default-ttl <expiry_time>
set explicit {disable | enable}
set fresh-factor <fresh_percent>
set ignore-conditional {disable | enable}
set ignore-ie-reload {disable | enable}
set ignore-ims {disable | enable}
set ignore-pnc {disable | enable}
set max-object-size <object_size>
set max-ttl <expiry_time>
set min-ttl <expiry_time>
set neg-resp-time <response_time>
set reval-pnc {disable | enable}
end
History
Related commands
• wanopt auth-group, wanopt cache-storage
• wanopt peer, wanopt rule
• wanopt settings, wanopt ssl-server, wanopt storage
web-proxy
Use these commands to configure the FortiGate web proxy. You can use the FortiGate web proxy and
interface settings to enable explicit HTTP and HTTPS proxying on one or more interfaces. When enabled,
the FortiGate unit becomes a web proxy server. All HTTP and HTTPS session received by interfaces with
explicit web proxy enabled are intercepted by the explicit web proxy relayed to their destinations.
To use the explicit proxy, users must add the IP address of a FortiGate interface and the explicit proxy port
number to the proxy configuration settings of their web browsers.
On FortiGate units that support WAN optimization, you can also enable web caching for the explicit proxy.
explicit
global
explicit
Use this command to enable the explicit web proxy, and configure the TCP port used by the explicit proxy..
Syntax
config web-proxy explicit
set http-incoming-port <port_num>
set status {enable | disable}
set unknown-http-version {best-effort | reject}
end
Example
Use the following command to enable the explicit web proxy on the FortiGate port1 interface so that
users can use this interface and its IP address as an explicit proxy server for their web browsers.
config system interface
edit port1
set explicit-web-proxy enable
end
Use the following command to enable the explicit proxy and set the TCP port that proxy accepts
connections on to 8080. The result of this configuration is that TCP sessions received by the FortiGate unit
at port1 with a destination port number of 8888 are processed by the explicit web proxy.
config web-proxy explicit
set status enable
set http-incoming-port 8888
end
Use the following command to enable web caching for the explicit web proxy on FortiGate units that
support WAN optimization and web caching.
config wanopt webcache
set explicit enable
end
History
Related commands
• web-proxy global
global
Configure global web-proxy settings that control how the web proxy functions and handles web traffic. In
most cases you should not have to change the default settings of this command. If your FortiGate unit is
operating with multiple VDOMS these settings affect all VDOMs.
Syntax
config web-proxy global
set add-header-client-ip {disable | enable}
set add-header-front-end-https {disable | enable}
set add-header-via {disable | enable}
set add-header-x-forwarded-for {disable | enable}
set forward-proxy-auth {disable | enable}
set max-message-length <kBytes>
set max-request-length <kBytes>
set proxy-fqdn <fqdn>
set strict-web-check {disable | enable}
end
Example
Use the following command to configure the explicit proxy to block web sites that send incorrect headers
that do not conform with HTTP 1.1
config web-proxy global
set strict-web-check enable
end
History
Related commands
• web-proxy explicit
webfilter
Use webfilter commands to add banned words to the banned word list, filter URLs, and configure
FortiGuard-Web category filtering.
For more information about web filtering see the FortiGate UTM User Guide.
This chapter contains the following sections:
content
content-header
fortiguard
ftgd-local-cat
ftgd-local-rating
ftgd-ovrd
ftgd-ovrd-user
urlfilter
content
Control web content by blocking or exempting words, phrases, or patterns. If enabled in the protection
profile, the FortiGate unit searches for words or patterns on requested web pages.
For each pattern you can select Block or Exempt. Block, blocks access to a web page that matches with
the pattern. Exempt allows access to the web page even if other entries in the list that would block access
to the page.
For a page, each time a block match is found values assigned to the pattern are totalled. If a user-defined
threshold value is exceeded, the web page is blocked.
Use this command to add or edit and configure options for the Web content filter list. Patterns words can
be one word or a text string up to 80 characters long. The maximum number of patterns in the list is 5000.
When a single word is entered, the FortiGate unit checks Web pages for that word. Add phrases by
enclosing the phrase in ‘single quotes’. When a phrase is entered, the FortiGate unit checks Web pages
for any word in the phrase. Add exact phrases by enclosing the phrases in “quotation marks”. If the phrase
is enclosed in quotation marks, the FortiGate checks Web pages for the exact phrase.
Create patterns using wildcards or Perl regular expressions. See “Using Perl regular expressions” on
page 50.
You can add multiple web content filter lists, and then select the list for each protection profile.
Note: Perl regular expression patterns are case sensitive for Web Content Filtering. To make a word or phrase case
insensitive, use the regular expression /i. For example, /bad language/i blocks all instances of bad language
regardless of case. Wildcard patterns are not case sensitive.
Syntax
config webfilter content
edit <entry_number>
set name <list_str>
set comment <comment_str>
config entries
edit <content_str>
set action {block | exempt}
set lang {french | japanese | korean | simch | spanish |thai | trach
| western}
set pattern-type {regexp | wildcard}
set score <score_int>
set status {enable | disable}
end
end
History
FortiOS 4.0 MR1 New, Replaces config webfilter block and config webfilter exmword.
Related topics
• webfilter fortiguard
• webfilter ftgd-local-cat
• webfilter ftgd-local-rating
• webfilter ftgd-ovrd
• webfilter ftgd-ovrd-user
• webfilter urlfilter
content-header
Use this example to filter web content according to the MIME content header. You can use this feature to
broadly block content by type. But it is also useful to exempt audio and video streaming files from antivirus
scanning. Scanning these file types can be problematic.
The content header list is available in the CLI only.
Syntax
config webfilter content-header
edit <entry_number>
set name <list_name>
set comment <comment_str>
config entries
edit <regex>
set action {block | exempt}
end
end
C
After you have created content header lists, you need to select the content header list in the protection
profile as follows:
config firewall profile
edit <profile_name>
...
set content-header-list <list_name>
...
end
History
Related topics
• webfilter fortiguard, webfilter ftgd-local-cat, webfilter ftgd-local-rating
• webfilter ftgd-ovrd, webfilter ftgd-ovrd-user
• webfilter urlfilter
fortiguard
Use this command to enable Web filtering by specific categories using FortiGuard-Web URL filtering.
FortiGuard-Web licensing
Every FortiGate unit comes with a free 30 day FortiGuard-Web trial license. FortiGuard-Web license
management is done by the FortiGuard-Web server, so there is no need to enter a license number. The
FortiGate unit automatically contacts the FortiGuard-Web servers when FortiGuard-Web category blocking
is enabled.
To renew the FortiGuard-Web license after the free trial, contact Fortinet Technical Support.
FortiGuard-Web configuration
Once enabled, FortiGuard-Web category block settings apply globally. After enabling FortiGuard-Web,
configure different categories for each firewall protection profile create.
See “firewall profile” on page 139 to configure FortiGuard-Web category blocking in a protection profile.
See “FortiGuard-Web categories” in the FortiGate Administration Guide for a complete list and description
of the FortiGuard-Web web filter categories.
HTTP WF HTTP ovrd HTTPS WF ovrd via HTTPS HTTP Port HTTPS Port
0 0 0 0 closed closed
0 0 0 1 closed closed
0 0 1 0 closed open
0 0 1 1 closed open
0 1 0 0 closed closed
0 1 0 1 closed closed
0 1 1 0 closed open
0 1 1 1 closed open
1 0 0 0 open closed
1 0 0 1 open closed
1 0 1 0 open open
1 0 1 1 open open
1 1 0 0 open closed
1 1 0 1 open open
1 1 1 0 open open
1 1 1 1 open open
There are two separate ports for HTTP and HTTPS override traffic which can be configured independently.
In addition, HTTPS uses the HTTPS override form regardless of the ovrd-auth-https status. If ovrd-
auth-https is enabled, any attempts to use the HTTP version of the override form will transparently be
re-directed to the HTTPS version.
Syntax
config webfilter fortiguard
set cache-mode {ttl | db-ver}
set cache-mem-percent <percent_integer>
set cache-prefix-match <enable | disable>
set ovrd-auth-port-http <port_integer>
set ovrd-auth-https <enable | disable>
set ovrd-auth-port-https <port_integer>
set reports-status <enable | disable>
end
History
Related topics
• webfilter content
• webfilter ftgd-local-cat
• webfilter ftgd-local-rating
• webfilter ftgd-ovrd
• webfilter ftgd-ovrd-user
• webfilter urlfilter
ftgd-local-cat
Use this command to add local categories to the global URL category list. The categories defined here
appear in the global URL category list when configuring a protection profile. Users can rate URLs based on
the local categories.
Syntax
config webfilter ftgd-local-cat
edit <local_cat_str>
set id <id_int>
end
Example
This example shows how to add the category local_block with an ID of 155.
config webfilter ftgd-local-cat
edit local_block
set id 155
end
History
Related topics
• webfilter content
• webfilter fortiguard
• webfilter ftgd-local-rating
• webfilter ftgd-ovrd
• webfilter ftgd-ovrd-user
• webfilter urlfilter
ftgd-local-rating
Use this command to rate URLs using local categories.
Users can create user-defined categories then specify the URLs that belong to the category. This allows
users to block groups of web sites on a per profile basis. The ratings are included in the global URL list with
associated categories and compared in the same way the URL block list is processed.
The user can also specify whether the local rating is used in conjunction with the FortiGuard rating or is
used as an override.
Syntax
config webfilter ftgd-local-rating
edit <url_str>
set rating [[<category_int>] [group_str] [class_str]...]
set status {enable | disable}
end
Example
This example shows how to configure a local rating for the web site www.example.com. with a rating
including category 12, all categories in group 4, and classification 1.
config webfilter ftgd-local-rating
edit www.example.com
set rating 12 g4 c1
end
History
FortiOS v3.0 New
Related topics
• webfilter content
• webfilter fortiguard
• webfilter ftgd-local-cat
• webfilter ftgd-ovrd
• webfilter ftgd-ovrd-user
• webfilter urlfilter
ftgd-ovrd
Use this command to configure FortiGuard-Web filter administrative overrides.
The administrative overrides are backed up with the main configuration and managed by the FortiManager
system. The administrative overrides are not cleaned up when they expire and you can reuse these
override entries by extending their expiry dates.
Users may require access to web sites that are blocked by a policy. In this case, an administrator can give
the user the ability to override the block for a specified period of time.
When a user attempts to access a blocked site, if override is enabled, a link appears on the block page
directing the user to an authentication form. The user must provide a correct user name and password or
the web site remains blocked. Authentication is based on user groups and can be performed for local,
RADIUS, and LDAP users.
Syntax
config webfilter ftgd-ovrd
edit <override_int>
set expires <yyyy/mm/dd hh:mm:ss>
set ext-ref <allow | deny>
set initiator
set ip <ipv4>
set ip6 <ipv6>
set profile <profile_str>
set rating [[<category_int>] [group_str] [class_str]...]
set scope {user | user-group | ip | ip6 | profile}
set status {enable | disable}
set type {dir | domain | rating}
set url <url_str>
set user <user_str>
set user-group <user_group_str>
end
get webfilter ftgd-ovrd <override_int>
Example
This example shows how to set an override (13).
config webfilter ftgd-ovrd
edit 13
set rating 12 g4 c1
end
Use the following command to get information about an override.
#get webfilter ftgd-ovrd 1
id : 1
expires : Wed Jul 6 07:00:30 2009
ext_ref : allow
initiator : admin
scope : user
status : enable
type : dir
url : 192.168.220.23
user : user_1
History
FortiOS v3.0 New
FortiOS v4.0 MR1 Added ip6 option to scope. Added ip6 field.
Related topics
• webfilter content
• webfilter fortiguard
• webfilter ftgd-local-cat
• webfilter ftgd-local-rating
• webfilter ftgd-ovrd-user
• webfilter urlfilter
ftgd-ovrd-user
Use this command to configure FortiGuard-Web filter user overrides.
When a user attempts to access a blocked site, if override is enabled, a link appears on the block page
directing the user to an authentication form. The user must provide a correct user name and password or
the web site remains blocked. Authentication is based on user groups and can be performed for local,
RADIUS, and LDAP users.
Administrators can only view and delete the user overrides entries.
Syntax
config webfilter ftgd-ovrd-user
edit <override_int>
set expires <yyyy/mm/dd hh:mm:ss>
set ext-ref <allow | deny>
set initiator
set ip <ipv4>
set ip6 <ipv6>
set profile <profile_str>
set rating [[<category_int>] [group_str] [class_str]...]
set scope {user | user-group | ip | profile}
set status {enable | disable}
set type {dir | domain | rating}
set url <url_str>
set user <user_str>
set user-group <user_group_str>
end
get webfilter ftgd-ovrd-user <override_int>
Example
This example shows how to set an override (12).
config webfilter ftgd-ovrd-user
edit 12
set scope ip
set ip 192.168.220.23
end
Use the following command to get information about an override.
#get webfilter ftgd-ovrd-user 1
id : 1
expires : Wed Jul 6 07:00:30 2005
ext_ref : allow
initiator : user
scope : user
status : enable
type : dir
url : 192.168.220.23
user : user_1
History
FortiOS v3.0 MR7 New
Related topics
• webfilter content
• webfilter fortiguard
• webfilter ftgd-local-cat
• webfilter ftgd-local-rating
• webfilter ftgd-ovrd
• webfilter urlfilter
urlfilter
Use this command to control access to specific URLs by adding them to the URL filter list. The FortiGate
unit exempts or blocks Web pages matching any specified URLs and displays a replacement message
instead.
Configure the FortiGate unit to allow, block, or exempt all pages on a website by adding the top-level URL
or IP address and setting the action to allow, block, or exempt.
Block individual pages on a website by including the full path and filename of the web page to block. Type
a top-level URL or IP address to block access to all pages on a website. For example, www.example.com
or 172.16.144.155 blocks access to all pages at this website.
Type a top-level URL followed by the path and filename to block access to a single page on a website. For
example, www.example.com/news.html or 172.16.144.155/news.html blocks the news page on
this website.
To block all pages with a URL that ends with example.com, add example.com to the block list. For
example, adding example.com blocks access to www.example.com, mail.example.com,
www.finance.example.com, and so on.
Use this command to exempt or block all URLs matching patterns created using text and regular
expressions (or wildcard characters). For example, example.* matches example.com, example.org,
example.net and so on. The FortiGate unit exempts or blocks Web pages that match any configured
pattern and displays a replacement message instead.
The maximum number of entries in the list is 5000.
Syntax
config webfilter urlfilter
edit <list_int>
set name <list_srt>
set comment <comment_str>
config entries
edit <url_str>
set action {allow | block | exempt}
set status {enable | disable}
set type {simple | regex | wildcard}
end
end
History
Related topics
• webfilter content
• webfilter fortiguard
• webfilter ftgd-local-cat
• webfilter ftgd-local-rating
• webfilter ftgd-ovrd
• webfilter ftgd-ovrd-user
wireless-controller
These commands configure the wireless controller feature. They do not apply to wireless features of
FortiWiFi models.
Any FortiGate unit except model 30B or the FortiWiFi models can act as a wireless network controller,
managing the wireless Access Point (AP) functionality of FortiWiFi units. All units must run FortiOS 4.0
MR1.
You create virtual access points that can be associated with multiple physical access points. Clients can
roam amongst the physical access points, extending the range of the wireless network.
To use the wireless controller feature, you must enable it as follows:
config system global
set wireless-controller enable
end
This chapter describes the following commands:
ap-status
global
timers
vap
vap-group
wtp
ap-status
Use this command to designate detected access points as accepted or rogue.
To get information about detected access points, use the get wireless-controller scan
command.
Syntax
config wireless-controller ap-status
edit <ap_id>
set bssid <bssid>
set ssid <ssid>
set status {accepted | rogue}
end
History
Related commands
• get wireless-controller scan
global
Use this command to configure global settings for physical access points, also known as WLAN
Termination Points (WTPs) configured using Control And Provisioning of Wireless Access Points
(CAPWAP) protocol.
Syntax
config wireless-controller global
set ac-radio-type {802.11a 802.11b 802.11g}
set discovery-mc-addr <ipv4addr>
set image-update {disable | join}
set location <string>
set max-clients <int>
set max-retransmit <int>
set name <string>
set plain-control-message {enable | disable}
end
History
timers
Use this command to alter timers for physical access points, also known as WLAN Termination Points
(WTPs) configured using Control And Provisioning of Wireless Access Points (CAPWAP) protocol.
Syntax
config wireless-controller timers
set client-idle-timeout <seconds>
set discovery-interval <seconds>
set echo-interval <seconds>
end
History
vap
Use this command to configure Virtual Access Points.
Syntax
config wireless-controller vap
edit <vap_name>
set auth {PSK | RADIUS}
set broadcast-ssid {enable | disable}
set encrypt {AES | TKIP}
set fast-roaming {enable | disable}
set key <key_str>
set keyindex {1 | 2 | 3 | 4}
set max-clients <int>
set radius-server <server_name>
set security {None | WEP128 | WEP64 | WPA | WPA2 | WPA2_AUTO}
set ssid <string>
set vdom <vdom_name>
end
To retrieve information about a VAP:
config wireless-controller vap
edit <vap_name>
get
end
The client-count is returned, along with the current configuration settings.
History
vap-group
Use this command to configure VAP groups.
Syntax
config wireless-controller vap-group
edit <vap_group_name>
set member {vap1 ... vapn}
end
History
Related commands
• wireless-controller vap
wtp
Use this command to configure physical access points (APs) for management by the wireless controller,
also known as an access controller (AC).
Syntax
config wireless-controller wtp
edit <fw_sn>
set admin <admin_status>
set ap-scan <scan_mode>
set band {802.11a | 802.11b | 802.11g}
set beacon-interval <integer>
set channel <chan_int>
set dtim <int>
set frag-threshold <int>
set location <string>
set geography <Americas | EMEA | Israel | Japan | World>
set max-clients <int>
set name <string>
set power-level <dBm>
set rts-threshold <int>
set vaps {vap1 ... vapn>
config deny-mac-list
edit <mac_id>
set mac <mac>
end
end
end
To retrieve information about a physical access point:
config wireless-controller wtp
edit <fw_sn>
get
end
Information such as the current number of clients, is returned, along with the current configuration settings.
History
Related commands
• wireless-controller vap
execute
The execute commands perform immediate operations on the FortiGate unit, including:
• Back up and restore the system configuration, or reset the unit to factory settings.
• Execute the run but not save feature
• Set the unit date and time.
• View and clear DHCP leases.
• Clear arp table entries.
• View and delete log messages. Delete old log files.
• Use ping or traceroute to diagnose network problems.
• Restart the router or the entire FortiGate unit.
• Update the antivirus and attack definitions on demand.
• Generate certificate requests and install certificates for VPN authentication.
This chapter contains the following sections:
backup log delete-rolled shutdown
batch log display ssh
central-mgmt log filter telnet
cfg reload log fortianalyzer test-connectivity time
cfg save log list traceroute
clear system arp table log roll update-ase
cli check-template-status modem dial update-av
cli status-msg-only modem hangup update-ips
date modem trigger update-now
dhcp lease-clear mrouter clear upd-vd-license
dhcp lease-list ping usb-disk
disconnect-admin-session ping-options, ping6-options vpn certificate ca
enter ping6 vpn certificate crl
factoryreset reboot vpn certificate local
firmware-list update restore vpn certificate remote
formatlogdisk router clear bfd session vpn sslvpn del-all
fortiguard-log update router clear bgp vpn sslvpn del-tunnel
fsae refresh router clear ospf process vpn sslvpn del-web
ha disconnect router restart vpn sslvpn list
ha manage scsi-dev wireless-controller delete-wtp-image
ha synchronize send-fds-statistics wireless-controller reset-wtp
interface dhcpclient-renew set-next-reboot wireless-controller restart-daemon
interface pppoe-reconnect sfp-mode-sgmii wireless-controller upload-wtp-image
log delete-all
backup
Back up the FortiGate configuration files, logs, or IPS user-defined signatures file to a TFTP or FTP server,
USB disk, or a management station. Management stations can either be a FortiManager unit, or
FortiGuard Analysis and Management Service. For more information, see “system fortiguard” on page 417
or “system central-management” on page 406.
When virtual domain configuration is enabled (in system global, vdom-admin is enabled), the content
of the backup file depends on the administrator account that created it.
• A backup of the system configuration from the super admin account contains the global settings and
the settings for all of the VDOMs. Only the super admin can restore the configuration from this file.
• When you back up the system configuration from a regular administrator account, the backup file
contains the global settings and the settings for the VDOM to which the administrator belongs. Only a
regular administrator account can restore the configuration from this file.
Syntax
execute backup config ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> [<password_str>]]
[<backup_password_str>]
execute backup config management-station <comment_str>
execute backup config tftp <filename_str> <server_ipv4>
[<backup_password_str>]
execute backup config usb <filename_str> [<backup_password_str>]
execute backup full-config ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> [<password_str>]]
[<backup_password_str>]
execute backup full-config tftp <filename_str> <server_ipv4>
[<backup_password_str>]
execute backup full-config usb <filename_str> [<backup_password_str>]
execute backup ipsuserdefsig ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> [<password_str>]]
execute backup ipsuserdefsig tftp tftp <filename_str> <server_ipv4>
execute backup {disk | memory} alllogs ftp <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> <password_str>]
execute backup {disk | memory} alllogs tftp <server_ipv4>
execute backup {disk | memory} log ftp <server_ipv4[:port_int] |
server_fqdn[:port_int]> <username_str> <password_str> {app-ctrl | event
| ids | im | spam | virus | voip | webfilter}
execute backup {disk | memory} log tftp <server_ipv4> {app-ctrl | event |
ids | im | spam | virus | voip | webfilter}
Variable Description
config ftp <filename_str> Back up the system configuration to an FTP server.
<server_ipv4[:port_int] | Optionally, you can specify a password to protect the
server_fqdn[:port_int]> [<username_str> saved data.
[<password_str>]] [<backup_password_str>]
config management-station <comment_str> Back up the system configuration to a configured
management station. If you are adding a comment, do
not add spaces, underscore characters (_), or quotation
marks (“ “) or any other punctuation marks.
For example,
uploadedthetransparentmodeconfigfortheaccountingde
partmentwilluploadonadailybasis.
The comment you enter displays in both the portal
website and FortiGate web-based manager (System >
Maintenance > Revision).
config tftp <filename_str> <server_ipv4> Back up the system configuration to a file on a TFTP
[<backup_password_str>] server. Optionally, you can specify a password to
protect the saved data.
config usb <filename_str> Back up the system configuration to a file on a USB
[<backup_password_str>] disk. Optionally, you can specify a password to protect
the saved data.
full-config ftp <filename_str> Back up the full system configuration to a file on an FTP
<server_ipv4[:port_int] | server. You can optionally specify a password to protect
server_fqdn[:port_int]> [<username_str> the saved data.
[<password_str>]] [<backup_password_str>]
full-config tftp <filename_str> Back up the full system configuration to a file on a TFTP
<server_ipv4> [<backup_password_str>] server. You can optionally specify a password to protect
the saved data.
full-config usb <filename_str> Back up the full system configuration to a file on a USB
[<backup_password_str>] disk. You can optionally specify a password to protect
the saved data.
ipsuserdefsig ftp <filename_str> Backup IPS user-defined signatures to a file on an FTP
<server_ipv4[:port_int] | server.
server_fqdn[:port_int]> [<username_str>
[<password_str>]]
ipsuserdefsig tftp tftp <filename_str> Back up IPS user-defined signatures to a file on a TFTP
<server_ipv4> server.
{disk | memory} alllogs ftp Back up either all memory or all hard disk log files for
<server_ipv4[:port_int] | this VDOM to an FTP server. The disk option will only
server_fqdn[:port_int]> [<username_str> be available on FortiGate models that log to a hard disk.
<password_str>] The file name has the form:
<log_file_name>_<VDOM>_<date>_<time>
{disk | memory} alllogs tftp <server_ipv4> Back up either all memory or all hard disk log files for
this VDOM to a TFTP server. The disk option will only
be available on FortiGate models that log to a hard disk.
The file name has the form:
<log_file_name>_<VDOM>_<date>_<time>
{disk | memory} log ftp Back up the specified type of log file from either hard
<server_ipv4[:port_int] | disk or memory to an FTP server.
server_fqdn[:port_int]> <username_str> The disk option will only be available on FortiGate
<password_str> {app-ctrl | event | ids | models that log to a hard disk.
im | spam | virus | voip | webfilter}
{disk | memory} log tftp <server_ipv4> Back up the specified type of log file from either hard
{app-ctrl | event | ids | im | spam | disk or memory to an FTP server.
virus | voip | webfilter} The disk option will only be available on FortiGate
models that log to a hard disk.
Example
This example shows how to backup the FortiGate unit system configuration to a file named fgt.cfg on a
TFTP server at IP address 192.168.1.23.
execute backup config tftp fgt.cfg 192.168.1.23
History
Related topics
• execute restore
• ips custom
batch
Execute a series of CLI commands.
Note: execute batch commands are controlled by the Maintenance (mntgrp) access control group.
Syntax
execute batch [<cmd_cue>]
where <cmd_cue> is one of:
• end - exit session and run the batch commands
• lastlog - read the result of the last batch commands
• start - start batch mode
• status - batch mode status reporting if batch mode is running or stopped
Example
To start batch mode:
execute batch start
Enter batch mode...
History
central-mgmt
Update Central Management Service account information. Also used receive configuration file updates
from an attached FortiManager unit.
Syntax
execute central-mgmt set-mgmt-id <management_id>
execute central-mgmt update
set-mgmt-id is used to change or initially set the management ID, or your account number for Central
Management Services. This account ID must be set for the service to be enabled.
update is used to update your Central Management Service contract with your new management account
ID. This command is to be used if there are any changes to your management service account.
update is also one of the steps in your FortiGate unit receiving a configuration file from an attached
FortiManager unit. For more information, see “system central-management” on page 406.
Example
If you are registering with the Central Management Service for the first time, and your account number is
123456, you would enter the following:
execute central-mgmt set-mgmt-id 123456
execute central-mgmt update
History
Related topics
• system central-management
cfg reload
Use this command to restore the saved configuration when the configuration change mode is manual or
revert. This command has no effect if the mode is automatic, the default. The set cfg-save
command in system global sets the configuration change mode.
When you reload the saved system configuration, the your session ends and the FortiGate unit restarts.
In the default configuration change mode, automatic, CLI commands become part of the saved unit
configuration when you execute them by entering either next or end.
In manual mode, commands take effect but do not become part of the saved configuration unless you
execute the execute cfg save command. When the FortiGate unit restarts, the saved configuration is
loaded. Configuration changes that were not saved are lost.
The revert mode is similar to manual mode, except that configuration changes are saved automatically
if the administrative session is idle for more than a specified timeout period. This provides a way to recover
from an erroneous configuration change, such as changing the IP address of the interface you are using
for administration. You set the timeout in system global using the set cfg-revert-timeout
command.
Syntax
execute cfg reload
Example
This is sample output from the command when successful:
# exec cfg reload
configs reloaded. system will reboot.This is sample output from the command
when not in runtime-only configuration mode:
# exec cfg reload
no config to be reloaded.
History
Related topics
• execute cfg save
• system global
cfg save
Use this command to save configuration changes when the configuration change mode is manual or
revert. If the mode is automatic, the default, all changes are added to the saved configuration as you
make them and this command has no effect. The set cfg-save command in system global sets the
configuration change mode.
In manual mode, commands take effect but do not become part of the saved configuration unless you
execute the execute cfg save command. When the FortiGate unit restarts, the saved configuration is
loaded. Configuration changes that were not saved are lost.
The revert mode is similar to manual mode, except that configuration changes are saved automatically
if the administrative session is idle for more than a specified timeout period. This provides a way to recover
from an erroneous configuration change, such as changing the IP address of the interface you are using
for administration. To change the timeout from the default of 600 seconds, go to system global and use
the set cfg-revert-timeout command.
Syntax
execute cfg save
Example
This is sample output from the command:
# exec cfg save
config saved.
This is sample output when not in runtime-only configuration mode. It also occurs when in runtime-only
configuration mode and no changes have been made:
# exec cfg save
no config to be saved.
History
Related topics
• execute cfg reload
• system global
Syntax
exec clear system arp table
History
Related topics
• execute router restart
• get router info routing-table
• get system arp
cli check-template-status
Reports the status of the secure copy protocol (SCP) script template.
Syntax
exec cli check-template-status
History
cli status-msg-only
Enable standardized CLI error output messages. If executed, this command stops other debug messages
from displaying in the current CLI session.
Syntax
exec cli status-msg-only <enable | disable>
The message format is:
[error code]: text message
There are two error categories: Keyword Error, and Data Error. The error code provides details about the
type of error.
An ERROR message indicates that the command generated an error. A Keyword Error [1000x] indicates
that the field or option is not supported, or the attempted command is not recognized. A Data Error
[2000x] indicates that the data source is already in use.
Variable Description
status-msg-only <enable | Enables standardized CLI error output messages.
disable>
History
date
Get or set the system date.
Syntax
execute date [<date_str>]
date_str has the form yyyy-mm-dd, where
• yyyy is the year and can be 2001 to 2037
• mm is the month and can be 01 to 12
• dd is the day of the month and can be 01 to 31
If you do not specify a date, the command returns the current system date. Shortened values, such as ‘06’
instead of ‘2006’ for the year or ‘1’ instead of ‘01’ for month or day, are not valid.
Example
This example sets the date to 17 September 2004:
execute date 2004-09-17
History
Related topics
• execute time
dhcp lease-clear
Clear all DHCP address leases.
Syntax
execute dhcp lease-clear
History
Related topics
• execute dhcp lease-list
• system dhcp server
• system dhcp reserved-address
dhcp lease-list
Display DHCP leases on a given interface
Syntax
execute dhcp lease-list [interface_name]
If you specify an interface, the command lists only the leases issued on that interface. Otherwise, the list
includes all leases issued by DHCP servers on the FortiGate unit.
If there are no DHCP leases in user on the FortiGate unit, an error will be returned.
History
Related topics
• system dhcp server
• system dhcp reserved-address
disconnect-admin-session
Disconnect an administrator who is logged in.
Syntax
execute disconnect-admin-session <index_number>
To determine the index of the administrator that you want to disconnect, view the list of logged-in
administrators by using the following command:
execute disconnect-admin-session ?
The list of logged-in administrators looks like this:
Connected:
INDEX USERNAME TYPE FROM TIME
0 admin WEB 172.20.120.51 Mon Aug 14 12:57:23 2006
1 admin2 CLI ssh(172.20.120.54) Mon Aug 14 12:57:23 2006
Example
This example shows how to disconnect a logged in administrator.
execute disconnect-admin-session 1
History
Related topics
• system mac-address-table
• get system info admin status
enter
Use this command to go from global commands to a specific virtual domain (VDOM).
Only available when virtual domains are enabled and you are in config global.
After you enter the VDOM, the prompt will not change from “(global)”. However you will be in the VDOM
with all the commands that are normally available in VDOMs.
Syntax
execute enter <vdom>
Use “?” to see a list of available VDOMs.
History
factoryreset
Reset the FortiGate configuration to factory default settings.
Syntax
execute factoryreset
Caution: This procedure deletes all changes that you have made to the FortiGate configuration and reverts the
system to its original configuration, including resetting interface addresses.
History
Related topics
• execute backup
• execute reboot
firmware-list update
Use this command to update the list of firmware.
Syntax
execute firmware-list update
When the update is complete, the command reports:
Updating Image List. Done.
History
formatlogdisk
Format the FortiGate hard disk to enhance performance for logging.
Syntax
execute formatlogdisk
Caution: This operation will erase all quarantine files and logging data on the hard disk.
History
fortiguard-log update
Update the FortiGuard Analysis and Management Service contract.
Syntax
execute fortiguard-log update
History
Related topics
• system fortiguard
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• {disk | fortianalyzer | fortianalyzer2 | fortianalyzer3 | memory | syslogd | syslogd2 | syslogd3 | webtrends
| fortiguard} filter
fsae refresh
Use this command to manually refresh user group information from Directory Service servers connected to
the FortiGate unit using the Fortinet Server Authentication Extensions (FSAE).
Syntax
execute fsae refresh
History
Related topics
• user fsae
ha disconnect
Use this command to disconnect a FortiGate unit from a functioning cluster. You must specify the serial
number of the unit to be disconnected. You must also specify an interface name and assign an IP address
and netmask to this interface of the disconnected unit. You can disconnect any unit from the cluster even
the primary unit. After the unit is disconnected the cluster responds as if the disconnected unit has failed.
The cluster may renegotiate and may select a new primary unit.
To disconnect the unit from the cluster, the execute ha disconnect command sets the HA mode of the
disconnected unit to standalone. In addition, all interface IP addresses of the disconnected unit are set to
0.0.0.0. The interface specified in the command is set to the IP address and netmask that you specify in
the command. In addition all management access to this interface is enabled. Once the FortiGate unit is
disconnected you can use SSH, telnet, HTTPS, or HTTP to connect to and manage the FortiGate unit.
Syntax
execute ha disconnect <cluster-member-serial_str> <interface_str>
<address_ipv4> <address_ipv4mask>
Variable Description
cluster-member-serial_str The serial number of the cluster unit to be disconnected.
interface_str The name of the interface to configure. The command configures the IP
address and netmask for this interface and also enables all management
access for this interface.
Example
This example shows how to disconnect a cluster unit with serial number FGT5002803033050. The internal
interface of the disconnected unit is set to IP address 1.1.1.1 and netmask 255.255.255.0.
execute ha disconnect FGT5002803033050 internal 1.1.1.1 255.255.255.0
History
Related topics
• execute ha manage
• execute ha synchronize
• system ha
ha manage
Use this command from the CLI of a FortiGate unit in an HA cluster to log into the CLI of another unit in the
cluster. Usually you would use this command from the CLI of the primary unit to log into the CLI of a
subordinate unit. However, if you have logged into a subordinate unit CLI, you can use this command to
log into the primary unit CLI, or the CLI of another subordinate unit.
You can use CLI commands to manage the cluster unit that you have logged into. If you make changes
to the configuration of any cluster unit (primary or subordinate unit) these changes are synchronized to
all cluster units.
Syntax
execute ha manage <cluster-index>
Variable Description
cluster-index The cluster index is assigned by the FortiGate Clustering Protocol according to
cluster unit serial number. The cluster unit with the highest serial number has a
cluster index of 0. The cluster unit with the second highest serial number has a
cluster index of 1 and so on.
Enter ? to list the cluster indexes of the cluster units that you can log into. The
list does not show the unit that you are already logged into.
Example
This example shows how to log into a subordinate unit in a cluster of three FortiGate units. In this example
you have already logged into the primary unit. The primary unit has serial number FGT3082103000056.
The subordinate units have serial numbers FGT3012803021709 and FGT3082103021989.
execute ha manage ?
<id> please input slave cluster index.
<0> Subsidary unit FGT3012803021709
<1> Subsidary unit FGT3082103021989
Type 0 and press enter to connect to the subordinate unit with serial number FGT3012803021709. The
CLI prompt changes to the host name of this unit. To return to the primary unit, type exit.
From the subordinate unit you can also use the execute ha manage command to log into the primary
unit or into another subordinate unit. Enter the following command:
execute ha manage ?
<id> please input slave cluster index.
<1> Subsidary unit FGT3082103021989
<2> Subsidary unit FGT3082103000056
Type 2 and press enter to log into the primary unit or type 1 and press enter to log into the other
subordinate unit. The CLI prompt changes to the host name of this unit.
History
Related topics
• execute ha disconnect, execute ha synchronize
• system ha
ha synchronize
Use this command from a subordinate unit in an HA cluster to manually synchronize its configuration with
the primary unit. Using this command you can synchronize the following:
• Configuration changes made to the primary unit (normal system configuration, firewall configuration,
VPN configuration and so on stored in the FortiGate configuration file),
• Antivirus engine and antivirus definition updates received by the primary unit from the FortiGuard
Distribution Network (FDN),
• IPS attack definition updates received by the primary unit from the FDN,
• Web filter lists added to or changed on the primary unit,
• Email filter lists added to or changed on the primary unit,
• Certification Authority (CA) certificates added to the primary unit,
• Local certificates added to the primary unit.
You can also use the start and stop fields to force the cluster to synchronize its configuration or to stop
a synchronization process that is in progress.
Syntax
execute ha synchronize {config| avupd| attackdef| weblists| emaillists|
ca| localcert| ase | all | start | stop}
Variable Description
config Synchronize the FortiGate configuration.
avupd Synchronize the antivirus engine and antivirus definitions.
attackdef Synchronize attack definitions.
weblists Synchronize web filter lists.
emaillists Synchronize email filter lists.
ca Synchronize CA certificates.
localcert Synchronize local certificates.
ase Synchronize the antispam engine and antispam rule sets.
all Synchronize all of the above.
start Start synchronizing the cluster configuration.
stop Stop the cluster from completing synchronizing its configuration.
Example
From the CLI of a subordinate unit, use the following commands to synchronize the antivirus and attack
definitions on the subordinate FortiGate unit with the primary unit after the FDN has pushed new definitions
to the primary unit.
execute ha synchronize avupd
execute ha synchronize attackdef
History
Related topics
• execute ha disconnect
• execute ha manage
• system ha
interface dhcpclient-renew
Renew the DHCP client for the specified DHCP interface and close the CLI session. If there is no DHCP
connection on the specified port, there is no output.
Syntax
execute interface dhcpclient-renew <port>
Example
This is the output for renewing the DHCP client on port1 before the session closes:
# exec interface dhcpclient-renew port1
renewing dhcp lease on port1
History
Related topics
• execute dhcp lease-list
interface pppoe-reconnect
Reconnect to the PPPoE service on the specified PPPoE interface and close the CLI session. If there is no
PPPoE connection on the specified port, there is no output.
Syntax
execute interface pppoe-reconnect <port>
History
Related topics
• execute modem dial
• execute modem hangup
log delete-all
Use this command to clear all log entries in memory and current log files on hard disk. If your FortiGate unit
has no hard disk, only log entries in system memory will be cleared. You will be prompted to confirm the
command.
Syntax
execute log delete-all
History
Related topics
• execute log delete-rolled
• execute log display
• execute log filter
• execute log list
log delete-rolled
Use this command to delete rolled log files.
Syntax
execute log delete-rolled <category> <start> <end>
Variable Description
<category> Enter the category of rolled log files that you want to delete:
• traffic
• event
• virus
• webfilter
• attack
• spam
• content
• im
• voip
• dlp
• app-crtl
The <category> must be one of the above categories. The FortiGate unit can only delete
one category at a time.
<start> Enter the number of the first log to delete. If you are deleting multiple rolled log files, you
must also enter a number for end.
The <start> and <end> values represent the range of rolled log files to delete. If <end> is
not specified, only the <start> log number is deleted.
<end> Enter the number of the last log to delete, if you are deleting multiple rolled log files.
The <start> and <end> values represent the range of rolled log files to delete. If <end> is
not specified, only the <start> log number is deleted.
Example
The following deletes all event rolled logs from 1 to 50.
execute log delete-rolled event 1 50
History
FortiOS v3.0 MR2 No change.
FortiOS v4.0 Added dlp and app-crtl fields.
Related topics
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
• execute log filter
• execute log delete-all
log display
Use this command to display log messages that you have selected with the execute log filter
command.
Syntax
execute log display
The console displays the first 10 log messages. To view more messages, run the command again. You can
do this until you have seen all of the selected log messages. To restart viewing the list from the beginning,
use the commands
execute log filter start-line 1
execute log display
You can restore the log filters to their default values using the command
execute log filter reset
History
Related topics
• execute log filter
log filter
Use this command to select log messages for viewing or deletion. You can view one log category on one
device at a time. Optionally, you can filter the messages to select only specified date ranges or severities
of log messages. For traffic logs, you can filter log messages by source or destination IP address.
Commands are cumulative. If you omit a required variable, the command displays the current setting.
Use as many execute log filter commands as you need to define the log messages that you want
to view.
execute log filter category <category_name>
execute log filter device {disk | memory}
execute log filter dump
execute log filter field <name>
execute log filter ha-member <unitsn_str>
execute log filter reset
execute log filter rolled_number <number>
execute log filter start-line <line_number>
execute log filter view-lines <count>
History
Related topics
• execute log display
Syntax
execute log fortianalyzer test-connectivity
Example
When FortiAnalyzer is connected, the output looks like this:
FortiAnalyzer Host Name: FortiAnalyzer-800B
FortiGate Device ID: FG50B3G06500085
Registration: registered
Connection: allow
Disk Space (Used/Allocated): 468/1003 MB
Total Free Space: 467088 MB
Log: Tx & Rx
Report: Tx & Rx
Content Archive: Tx & Rx
Quarantine: Tx & Rx
When FortiAnalyzer is not connected, the output is: Connect Error
History
Related topics
• log {fortianalyzer | fortianalyzer2 | fortianalyzer3} setting
log list
You can view the list of current and rolled log files on the console. The list shows the file name, size and
timestamp.
Syntax
execute log list <category>
<category> must be one of: traffic, event, virus, webfilter, attack, spam, content,
im, voip, dlp and app-ctrl.
Example
The output looks like this:
elog 8704 Fri March 6 14:24:35 2009
elog.1 1536 Thu March 5 18:02:51 2009
elog.2 35840 Wed March 4 22:22:47 2009
At the end of the list, the total number of files in the category is displayed. For example:
501 event log file(s) found.
History
Related topics
• execute log delete-rolled
log roll
Use this command to roll all log files.
Syntax
execute log roll
History
Related topics
• execute log delete-rolled
modem dial
Dial the modem.
The dial command dials the accounts configured in config system modem until it makes a connection
or it has made the maximum configured number of redial attempts.
This command applies only to models 50A, 60, 60M and 60-WiFi and is effective only if the modem is in
Standalone mode.
Syntax
execute modem dial
History
Related topics
• system modem
• execute modem hangup
modem hangup
Hang up the modem.
This command applies only to models 50A, 60, 60M and 60-WiFi and is effective only if the modem is in
Standalone mode.
Syntax
execute modem hangup
History
Related topics
• system modem
• execute modem dial
modem trigger
This command sends a signal to the modem daemon, which causes the state machine to re-evaluate its
current state. If for some reason the modem should be connected but isn't, then it will trigger a redial. If the
modem should not be connected but is, this command will cause the modem to disconnect.
Syntax
execute modem trigger
History
Related topics
• execute modem dial
• execute modem hangup
mrouter clear
Clear multicast routes, RP-sets, IGMP membership records or routing statistics.
Syntax
Clear IGMP memberships:
execute mrouter clear igmp-group {{<group-address>} <interface-name>}
execute mrouter clear igmp-interface <interface-name>
Clear statistics:
execute mrouter clear statistics {<group-address> {<source-address>}}
Variable Description
<interface-name> Enter the name of the interface on which you want to clear IGMP memberships.
<group-address> Optionally enter a group address to limit the command to a particular group.
<route-type> Enter one of:
• dense-routes - clear only PIM dense routes
• multicast-routes - clear all types of multicast routes
• sparse-routes - clear only sparse routes
<source-address> Optionally, enter a source address to limit the command to a particular source address.
You must also specify group-address.
History
Related topics
• router multicast
• get router info bgp
ping
Send an ICMP echo request (ping) to test the network connection between the FortiGate unit and another
network device.
Syntax
execute ping {<address_ipv4> | <host-name_str>}
<host-name_str> should be an IP address, or a fully qualified domain name.
Example
This example shows how to ping a host with the IP address 172.20.120.16.
#execute ping 172.20.120.16
History
Related topics
• execute ping-options, ping6-options
• execute ping6
• execute traceroute
ping-options, ping6-options
Set ICMP echo request (ping) options to control the way ping tests the network connection between the
FortiGate unit and another network device.
Syntax
execute ping-options data-size <bytes>
execute ping-options df-bit {yes | no}
execute ping-options pattern <2-byte_hex>
execute ping-options repeat-count <repeats>
execute ping-options source {auto | <source-intf_ip>}
execute ping-options timeout <seconds>
execute ping-options tos <service_type>
execute ping-options ttl <hops>
execute ping-options validate-reply {yes | no}
execute ping-options view-settings
Example
Use the following command to increase the number of pings sent.
execute ping-options repeat-count 10
Use the following command to send all pings from the FortiGate interface with IP address 192.168.10.23.
execute ping-options source 192.168.10.23
History
Related topics
• execute ping
• execute ping6
• execute traceroute
• system tos-based-priority
ping6
Send an ICMP echo request (ping) to test the network connection between the FortiGate unit and an IPv6
capable network device.
Syntax
execute ping6 {<address_ipv6> | <host-name_str>}
Example
This example shows how to ping a host with the IPv6 address 12AB:0:0:CD30:123:4567:89AB:CDEF.
execute ping6 12AB:0:0:CD30:123:4567:89AB:CDEF
History
Related topics
• execute ping
• execute ping-options, ping6-options
• router static6
reboot
Restart the FortiGate unit.
Caution: Abruptly powering off your FortiGate unit may corrupt its configuration. Using the
reboot and shutdown options here or in the web-based manager ensure proper shutdown
procedures are followed to prevent any loss of configuration.
Syntax
execute reboot <comment “comment_string”>
<comment “comment_string”> allows you to optionally add a message that will appear in the hard disk log
indicating the reason for the reboot. If the message is more than one word it must be enclosed in quotes.
Example
This example shows the reboot command with a message included.
execute reboot comment “December monthly maintenance”
History
FortiOS v2.80 Unchanged.
FortiOS v3.0 MR4 Added comment field.
Related topics
• execute backup
• execute factoryreset
• execute shutdown
restore
Use this command to
• restore the configuration from a file
• change the FortiGate firmware
• change the FortiGate backup firmware
• restore an IPS custom signature file
When virtual domain configuration is enabled (in system global, vdom-admin is enabled), the content
of the backup file depends on the administrator account that created it.
• A backup of the system configuration from the super admin account contains the global settings and
the settings for all of the VDOMs. Only the super admin account can restore the configuration from this
file.
• A backup file from a regular administrator account contains the global settings and the settings for the
VDOM to which the administrator belongs. Only a regular administrator account can restore the
configuration from this file.
Syntax
execute restore ase ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> <password_str>]
execute restore ase tftp <filename_str> <server_ipv4[:port_int]>
execute restore av ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> <password_str>]
execute restore av tftp <filename_str> <server_ipv4[:port_int]>
execute restore config ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> <password_str>]
[<backup_password_str>]
execute restore config management-station {normal | template | script}
<rev_int>
execute restore config tftp <filename_str> <server_ipv4>
[<backup_password_str>]
execute restore config usb <filename_str> [<backup_password_str>]
execute restore image ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> <password_str>]
execute restore image management-station <version_int>
execute restore image tftp <filename_str> <server_ipv4>
execute restore image usb <filename_str>
execute restore ips ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> <password_str>]
execute restore ips tftp <filename_str> <server_ipv4>
execute restore ipsuserdefsig ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> <password_str>]
execute restore ipsuserdefsig tftp <filename_str> <server_ipv4>
execute restore secondary-image ftp <filename_str> <server_ipv4[:port_int] |
server_fqdn[:port_int]> [<username_str> <password_str>]
execute restore secondary-image tftp <filename_str> <server_ipv4>
execute restore secondary-image usb <filename_str>
execute restore forticlient tftp <filename_str> <server_ipv4>
Variable Description
ase ftp <filename_str> Restore the antispam engine. Download the restore file from an FTP
<server_ipv4[:port_int] | server. The user and password to access the FTP server are only
server_fqdn[:port_int]> necessary if the server requires them
[<username_str> <password_str>]
ase tftp <filename_str> Restore the antispam engine. Download the restore file from a TFTP
<server_ipv4[:port_int]> server.
av ftp <filename_str> Download the antivirus database file from an FTP server to the
<server_ipv4[:port_int] | FortiGate unit.
server_fqdn[:port_int]>
[<username_str> <password_str>]
av tftp <filename_str> Download the antivirus database file from a TFTP server to the
<server_ipv4[:port_int]> FortiGate unit.
config ftp <filename_str> Restore the system configuration from an FTP server. The new
<server_ipv4[:port_int] | configuration replaces the existing configuration, including
server_fqdn[:port_int]> administrator accounts and passwords.
[<username_str> <password_str>] If the backup file was created with a password, you must specify the
password.
[<backup_password_str>]
config management-station {normal Restore the system configuration from the central management
| template | script} <rev_int> server. The new configuration replaces the existing configuration,
including administrator accounts and passwords.
rev_int is the revision number of the saved configuration to restore.
Enter 0 for the most recent revision.
config tftp <filename_str> Restore the system configuration from a file on a TFTP server. The
<server_ipv4> new configuration replaces the existing configuration, including
[<backup_password_str>] administrator accounts and passwords.
If the backup file was created with a password, you must specify the
password.
config usb <filename_str> Restore the system configuration from a file on a USB disk. The new
[<backup_password_str>] configuration replaces the existing configuration, including
administrator accounts and passwords.
If the backup file was created with a password, you must specify the
password.
image ftp <filename_str> Download a firmware image from an FTP server to the FortiGate unit.
<server_ipv4[:port_int] | The FortiGate unit reboots, loading the new firmware.
server_fqdn[:port_int]> This command is not available in multiple VDOM mode.
[<username_str> <password_str>]
image management-station Download a firmware image from the central management station.
<version_int> This is available if you have configured a FortiManager unit as a
central management server. This is also available if your account with
FortiGuard Analysis and Management Service allows you to upload
firmware images.
image tftp <filename_str> Download a firmware image from a TFTP server to the FortiGate unit.
<server_ipv4> The FortiGate unit reboots, loading the new firmware.
This command is not available in multiple VDOM mode.
image usb <filename_str> Download a firmware image from a USB disk to the FortiGate unit.
The FortiGate unit reboots, loading the new firmware.
ips ftp <filename_str> Download the IPS database file from an FTP server to the FortiGate
<server_ipv4[:port_int] | unit.
server_fqdn[:port_int]>
[<username_str> <password_str>]
ips tftp <filename_str> Download the IPS database file from a TFTP server to the FortiGate
<server_ipv4> unit.
Variable Description
ipsuserdefsig ftp <filename_str> Restore IPS custom signature file from an FTP server. The file will
<server_ipv4[:port_int] | overwrite the existing IPS custom signature file.
server_fqdn[:port_int]>
[<username_str> <password_str>]
ipsuserdefsig tftp <filename_str> Restore an IPS custom signature file from a TFTP server. The file will
<server_ipv4> overwrite the existing IPS custom signature file.
secondary-image ftp Download a firmware image from an FTP server as the backup
<filename_str> firmware of the FortiGate unit. This is available only on models that
<server_ipv4[:port_int] | support backup firmware images.
server_fqdn[:port_int]>
[<username_str> <password_str>]
secondary-image tftp Download a firmware image from a TFTP server as the backup
<filename_str> <server_ipv4> firmware of the FortiGate unit. This is available only on models that
support backup firmware images.
secondary-image usb Download a firmware image from a USB disk as the backup firmware
<filename_str> of the FortiGate unit. The unit restarts when the upload is complete.
This is available only on models that support backup firmware images.
forticlient tftp <filename_str> Download the FortiClient image from a TFTP server to the FortiGate
<server_ipv4> unit. The filename must have the format:
FortiClientSetup_versionmajor.versionminor.build.exe.
For example, FortiClientSetup.4.0.377.exe.
Example
This example shows how to upload a configuration file from a TFTP server to the FortiGate unit and restart
the FortiGate unit with this configuration. The name of the configuration file on the TFTP server is
backupconfig. The IP address of the TFTP server is 192.168.1.23.
execute restore config tftp backupconfig 192.168.1.23
History
Related topics
• execute backup
• ips custom
Syntax
execute router clear bfd session <src_ip> <dst_ip> <interface>
Variable Description
<src_ip> Select the source IP address of the session.
<dst_ip> Select the destination IP address of the session.
<interface> Select the interface for the session.
History
Related topics
• router bgp
Syntax
execute router clear bgp all [soft] [in | out]
execute router clear bgp as <as_number> [soft] [in | out]
execute router clear bgp dampening {ip_address | ip/netmask}
execute router clear bgp external {in prefix-filter} [soft] [in | out]
execute router clear bgp flap-statistics {ip_address | ip/netmask}
execute router clear bgp ip <ip_address> [soft] [in | out]
Variable Description
all Clear all BGP peer connections.
as <as_number> Clear BGP peer connections by AS number.
dampening {ip_address | ip/netmask} Clear route flap dampening information for peer or network.
external {in prefix-filter} Clear all external peers.
ip <ip_address> Clear BGP peer connections by IP address.
peer-group Clear all members of a BGP peer-group.
[in | out] Optionally limit clear operation to inbound only or outbound only.
flap-statistics {ip_address | Clear flap statistics for peer or network.
ip/netmask}
soft Do a soft reset that changes the configuration but does not
disturb existing sessions.
History
Related topics
• router bgp
Syntax
IPv4:
execute router clear ospf process
IPv6:
execute router clear ospf6 process
History
Related topics
• router ospf
router restart
Use this command to restart the routing software.
Syntax
execute router restart
History
Related topics
• router
scsi-dev
Use this command as part of a WAN optimization configuration to edit FortiGate SCSI devices that can
include internal high-capacity hard drives, AMC module hard drives, and SAS devices. Unless you have
special requirements, you do not need to change the SCSI device configuration unless you want to use
more than one SCSI device for WAN optimization.
To configure SCSI devices for WAN optimization you:
1 Use the execute scsi-dev partition command to create and edit partitions.
2 Use the execute scsi-dev storage command to create WAN optimization storages. WAN
optimization storages are logical parts of a partition used by WAN optimization to store the byte cache
and web cache databases. You can create multiple storages but only two of then are used at a time;
one for byte caching and one for web caching. You cannot use the same storage for both byte caching
and web caching. You can add more than one storage to a partition.
3 Use the config wanopt cache-storage command to configure the storages to use for byte
caching and web caching.
You can use the show wanopt storage command to view the storages that you have added. You can
also use the config wanopt storage command to change the storage sizes. See “wanopt storage” on
page 651.
See WAN Optimization, Web Cache, and Web Proxy User Guide for example of using the execute
scsi-dev command.
Syntax
execute scsi-dev list
execute scsi-dev partition create <device_ref_int> <partition_size_int>
execute scsi-dev partition delete <partition_ref_int>
execute scsi-dev partition resize <partition_ref_int> <partition_size_int>
execute scsi-dev storage <partition_ref_int> <storage_size_int>
<storage_name_str>
Variable Description
list List the SCSI devices and partitions. The list displays device reference numbers
<device_ref_int>, partition reference numbers <partition_ref_int>, and
partition sizes <partition_size_int>.
partition create Create new SCSI device partitions.
partition delete Delete SCSI device partitions.
partition resize Expand or shrink a SCSI device partition. Only the last partition on a device can be
resized.
<device_ref_int> SCSI device reference number displayed by the execute scsi-dev list command.
These numbers uniquely identify each SCSI device.
<partition_size_int> The size of a partition in Mbytes.
<partition_ref_int> Partition reference number displayed by the execute scsi-dev list command. These
numbers uniquely identify each SCSI device partition.
storage Add WAN optimization storages. The first time you add a storage to a partition using the
execute scsi-dev storage command the partition is labelled with a random string
(for example, 77A2A1AB1D0EF8B7). This label is used for all storages added to a given
partition. A different label is created for each partition. The labels appear when you use
the execute scsi-dev list command to list the partitions.
<storage_size_int> The size of a WAN optimization storage in Mbytes. The storage can be from 16 Mbytes
up to the size of the partition.
<storage_name_str> The name of the WAN optimization storage.
Examples
Use the following command to list the SCSI devices for a FortiGate unit that includes a FortiGate-ASM-S08
module.
#execute scsi-dev list
History
send-fds-statistics
Use this command to send an FDS statistics report now, without waiting for the FDS statistics report
interval to expire.
Syntax
execute send-fds-statistics
History
set-next-reboot
Use this command to start the FortiGate unit with primary or secondary firmware after the next reboot. This
command is useful only on models numbered 100 and higher which are able to store two firmware images.
By default, the FortiGate unit loads the firmware from the primary partition.
VDOM administrators do not have permission to run this command. It must be executed by a super
administrator.
Syntax
execute set-next-reboot {primary | secondary}
History
Related topics
• execute reboot
• execute shutdown
sfp-mode-sgmii
Change the SFP mode for an NP2 card to SGMII. By default when an AMC card is inserted the SFP mode
is set to SERDES mode by default.
If a configured NP2 card is removed and re-inserted, the SFP mode goes back to the default.
In these situations, the sfpmode-sgmii command will change the SFP mode from SERDES to SGMII for
the interface specified.
Syntax
execute sfpmode-sgmii <interface>
<interface> is the NP2 interface where you are changing the SFP mode.
History
shutdown
Shut down the FortiGate unit now. You will be prompted to confirm this command.
Caution: Abruptly powering off your FortiGate unit may corrupt its configuration. Using the reboot and
shutdown options here or in the web-based manager ensure proper shutdown procedures are followed to
prevent any loss of configuration.
Syntax
execute shutdown [comment <comment_string>]
comment is optional but you can use it to add a message that will appear in the event log message that
records the shutdown. The comment message of the does not appear on the Alert Message console. If the
message is more than one word it must be enclosed in quotes.
Example
This example shows the reboot command with a message included.
execute shutdown comment “emergency facility shutdown”
An event log message similar to the following is recorded:
2009-09-08 11:12:31 critical admin 41986 ssh(172.20.120.11) shutdown User
admin shutdown the device from ssh(172.20.120.11). The reason is 'emergency
facility shutdown'
History
FortiOS v2.80 MR8 New.
FortiOS v3.0 MR4 Added comment.
Related topics
• execute factoryreset
• execute reboot
ssh
Use this command to establish an ssh session with another system.
Syntax
execute ssh <destination>
<destination> - the destination in the form user@ip or user@host.
Example
execute ssh [email protected]
To end an ssh session, type exit:
FGT-6028030112 # exit
Connection to 172.20.120.122 closed.
FGT-8002805000 #
History
Related topics
• execute ping
• execute traceroute
• system interface
telnet
Use telnet client. You can use this tool to test network connectivity.
Syntax
execute telnet <telnet_ipv4>
<telnet_ipv4> is the address to connect with.
Type exit to close the telnet session.
History
Related topics
• execute ping
• execute traceroute
• system interface
time
Get or set the system time.
Syntax
execute time [<time_str>]
time_str has the form hh:mm:ss, where
• hh is the hour and can be 00 to 23
• mm is the minutes and can be 00 to 59
• ss is the seconds and can be 00 to 59
If you do not specify a time, the command returns the current system time.
You are allowed to shorten numbers to only one digit when setting the time. For example both 01:01:01
and 1:1:1 are allowed.
Example
This example sets the system time to 15:31:03:
execute time 15:31:03
History
Related topics
• execute date
traceroute
Test the connection between the FortiGate unit and another network device, and display information about
the network hops between the device and the FortiGate unit.
Syntax
execute traceroute {<ip_address> | <host-name>}
Example
This example shows how to test the connection with http://docs.forticare.com. In this example the
traceroute command times out after the first hop indicating a possible problem.
#execute traceoute docs.forticare.com
traceroute to docs.forticare.com (65.39.139.196), 30 hops max, 38 byte packets
1 172.20.120.2 (172.20.120.2) 0.324 ms 0.427 ms 0.360 ms
2 * * *
If your FortiGate unit is not connected to a working DNS server, you will not be able to connect to remote
host-named locations with traceroute.
History
Related topics
• execute ping
• execute ping-options, ping6-options
update-ase
Use this command to manually initiate the antispam engine and rules update..
Syntax
execute update-ase
History
Related topics
• execute update-now
update-av
Use this command to manually initiate the virus definitions and engines update. To update both virus and
attack definitions, use the execute update-now command.
Syntax
execute update-av
History
Related topics
• execute update-now
• system autoupdate override
• system autoupdate push-update
• system autoupdate schedule
update-ips
Use this command to manually initiate the Intrusion Prevention System (IPS) attack definitions and engine
update. To update both virus and attack definitions, use the execute update-now command.
Syntax
execute update-ips
History
Related topics
• execute update-now
• system autoupdate override
• system autoupdate override
• system autoupdate push-update
• system autoupdate schedule
update-now
Use this command to manually initiate both virus and attack definitions and engine updates. To initiate only
virus or attack definitions, use the execute update-av or execute update-ids command
respectively.
Syntax
execute update-now
History
Related topics
• execute update-ase
• execute update-ips
• system autoupdate override
• system autoupdate push-update
• system autoupdate schedule
upd-vd-license
Use this command to enter a Virtual Domain (VDOM) license key.
If you have a FortiGate-3016A/B unit or higher, you can purchase a license key from Fortinet to increase
the maximum number of VDOMs to 25, 50, 100 or 500. By default, FortiGate units support a maximum of
10 VDOMs.
This command is available only on FortiGate-3016A/B units and higher.
Syntax
execute upd-vd-license <license_key>
Variable Description
<license_key> The license key is a 32-character string supplied by Fortinet. Fortinet requires your unit
serial number to generate the license key.
History
usb-disk
Use these commands to manage your USB disks.
Syntax
execute usb-disk delete <filename>
execute usb-disk format
execute usb-disk list
execute usb-disk rename <old_name> <new_name>
Variable Description
delete <filename> Delete the named file from the USB disk.
format Format the USB disk.
list List the files on the USB disk.
rename <old_name> <new_name> Rename a file on the USB disk.
History
Related topics
• execute backup
• execute restore
vpn certificate ca
Use this command to import a CA certificate from a TFTP or SCEP server to the FortiGate unit, or to export
a CA certificate from the FortiGate unit to a TFTP server.
Before using this command you must obtain a CA certificate issued by a CA.
Digital certificates are used to ensure that both participants in an IPSec communications session are
trustworthy, prior to an encrypted VPN tunnel being set up between the participants. The CA certificate is
the certificate that the FortiGate unit uses to authenticate itself to other devices.
Note: VPN peers must use digital certificates that adhere to the X.509 standard.
Note: Digital certificates are not required for configuring FortiGate VPNs. Digital certificates are an advanced
feature provided for the convenience of system administrators. This manual assumes the user has prior
knowledge of how to configure digital certificates for their implementation.
Syntax
execute vpn certificate ca export tftp <certificate-name_str>
<file-name_str> <tftp_ip>
execute vpn certificate ca import auto <ca_server_url> <ca_identifier_str>
execute vpn certificate ca import tftp <file-name_str> <tftp_ip>
Variable Description
import Import the CA certificate from a TFTP server to the FortiGate unit.
export Export or copy the CA certificate from the FortiGate unit to a file on the TFTP
server. Type ? for a list of certificates.
<certificate-name_str> Enter the name of the CA certificate.
<file-name_str> Enter the file name on the TFTP server.
<tftp_ip> Enter the TFTP server address.
auto Retrieve a CA certificate from a SCEP server.
tftp Import the CA certificate to the FortiGate unit from a file on a TFTP server (local
administrator PC).
<ca_server_url> Enter the URL of the CA certificate server.
<ca_identifier_str> CA identifier on CA certificate server (optional).
Examples
Use the following command to import the CA certificate named trust_ca to the FortiGate unit from a
TFTP server with the address 192.168.21.54.
execute vpn certificate ca import trust_ca 192.168.21.54
History
Related topics
• execute vpn certificate local
• execute vpn certificate remote
• execute vpn certificate crl
• execute vpn sslvpn del-tunnel
• execute vpn sslvpn del-web
• vpn certificate ca
• vpn certificate local
• vpn certificate crl
• vpn certificate remote
Note: VPN peers must use digital certificates that adhere to the X.509 standard.
Note: Digital certificates are not required for configuring FortiGate VPNs. Digital certificates are an advanced
feature provided for the convenience of system administrators. This manual assumes the user has prior
knowledge of how to configure digital certificates for their implementation.
Syntax
execute vpn certificate crl import auto <crl-name>
Variable Description
import Import the CRL from the configured LDAP, HTTP, or SCEP authentication server to the
FortiGate unit.
<crl-name> Enter the name of the CRL.
auto Trigger an auto-update of the CRL from the configured LDAP, HTTP, or SCEP authentication
server.
History
Related topics
• execute vpn certificate ca
• execute vpn certificate local
• execute vpn certificate remote
• execute vpn sslvpn del-tunnel
• execute vpn sslvpn del-web
• vpn certificate ca
• vpn certificate local
• vpn certificate crl
• vpn certificate remote
Note: VPN peers must use digital certificates that adhere to the X.509 standard.
Note: Digital certificates are not required for configuring FortiGate VPNs. Digital certificates are an advanced
feature provided for the convenience of system administrators. This manual assumes the user has prior
knowledge of how to configure digital certificates for their implementation.
Syntax - generate
execute vpn certificate local generate <certificate-name_str> <key-length>
{<host_ip> | <domain-name_str> | email-addr_str>}
[<optional_information>]
Variable Description
<certificate-name_str> Enter a name for the certificate. The name can contain numbers (0-9),
uppercase and lowercase letters (A-Z, a-z), and the special characters - and
_. Other special characters and spaces are not allowed.
<host_ip>
{<host_ip> | Enter the host IP address (host_ip), the domain name
<domain-name_str> | (domain-name_str), or an email address (email-addr_str) to identify
email-addr_str>} the FortiGate unit being certified. Preferably use an IP address or domain
name. If this is impossible (such as with a dialup client), use an e-mail
address.
For host_ip, enter the IP address of the FortiGate unit.
For domain-name_str, enter the fully qualified domain name of the
FortiGate unit.
For email-addr_str, enter an email address that identifies the FortiGate
unit.
If you specify a host IP or domain name, use the IP address or domain name
associated with the interface on which IKE negotiations will take place
(usually the external interface of the local FortiGate unit). If the IP address in
the certificate does not match the IP address of this interface (or if the
domain name in the certificate does not match a DNS query of the FortiGate
unit’s IP), then some implementations of IKE may reject the connection.
Enforcement of this rule varies for different IPSec products.
<key-length> Enter 1024, 1536 or 2048 for the size in bits of the encryption key.
[<optional_information>] Enter optional_information as required to further identify the
certificate. See “Optional information variables” on page 755 for the list of
optional information variables. You must enter the optional variables in order
that they are listed in the table. To enter any optional variable you must enter
all of the variables that come before it in the list. For example, to enter the
organization_name_str, you must first enter the country_code_str,
state_name_str, and city_name_str. While entering optional
variables, you can type ? for help on the next required variable.
Variable Description
<country_code_str> Enter the two-character country code. Enter execute vpn
certificates local generate <name_str> country followed by
a ? for a list of country codes. The country code is case sensitive. Enter
null if you do not want to specify a country.
<state_name_str> Enter the name of the state or province where the FortiGate unit is located.
<city_name_str> Enter the name of the city, or town, where the person or organization
certifying the FortiGate unit resides.
<organization-name_str> Enter the name of the organization that is requesting the certificate for the
FortiGate unit.
<organization-unit_name_str> Enter a name that identifies the department or unit within the organization
that is requesting the certificate for the FortiGate unit.
<email_address_str> Enter a contact e-mail address for the FortiGate unit.
<ca_server_url> Enter the URL of the CA (SCEP) certificate server that allows auto-signing
of the request.
<challenge_password> Enter the challenge password for the SCEP certificate server.
Example - generate
Use the following command to generate a local certificate request with the name branch_cert, the
domain name www.example.com and a key size of 1536.
execute vpn certificate local generate branch_cert 1536 www.example.com
Syntax - import/export
execute vpn certificate local import tftp <file-name_str> <tftp_ip>
execute vpn certificate local export tftp <certificate-name_str>
<file-name_str> <tftp_ip>
Variable Description
import Import the local certificate from a TFTP server to the FortiGate unit.
export Export or copy the local certificate from the FortiGate unit to a file on the
TFTP server. Type ? for a list of certificates.
<certificate-name_str> Enter the name of the local certificate.
<tftp_ip> Enter the TFTP server address.
<file-name_str> Enter the file name on the TFTP server.
list List local certificates.
Examples - import/export
Use the following command to export the local certificate request generated in the above example from the
FortiGate unit to a TFTP server. The example uses the file name testcert for the downloaded file and
the TFTP server address 192.168.21.54.
exec vpn certificate local export branch_cert testcert 192.168.21.54
Use the following command to import the signed local certificate named branch_cert to the FortiGate
unit from a TFTP server with the address 192.168.21.54.
exec vpn certificate local import branch_cert 192.168.21.54
History
Related topics
• execute vpn certificate ca
• execute vpn certificate remote
• execute vpn certificate crl
• execute vpn sslvpn del-tunnel
• execute vpn sslvpn del-web
• vpn certificate ca
• vpn certificate local
• vpn certificate crl
• vpn certificate remote
Syntax
execute vpn certificate remote import tftp <file-name_str> <tftp_ip>
execute vpn certificate remote export tftp <certificate-name_str>
<file-name_str> <tftp_ip>
Field/variable Description
import Import the remote certificate from the TFTP server to the FortiGate unit.
export Export or copy the remote certificate from the FortiGate unit to a file on
the TFTP server. Type ? for a list of certificates.
<certificate-name_str> Enter the name of the public certificate.
<file-name_str> Enter the file name on the TFTP server.
<tftp_ip> Enter the TFTP server address.
tftp Import/export the remote certificate via a TFTP server.
History
Related topics
• execute vpn certificate ca
• execute vpn certificate local
• execute vpn certificate crl
• execute vpn sslvpn del-tunnel
• execute vpn sslvpn del-web
• vpn certificate ca
• vpn certificate local
• vpn certificate crl
• vpn certificate remote
Syntax
execute vpn sslvpn del-all
History
Related topics
• execute vpn sslvpn del-tunnel
• execute vpn sslvpn del-web
Syntax
execute vpn sslvpn del-tunnel <tunnel_index>
<tunnel_index> identifies which tunnel to delete if there is more than one active tunnel.
History
Related topics
• vpn ssl settings
Syntax
execute vpn sslvpn del-web <web_index>
<web_index> identifies which web connection to delete if there is more than one active connection.
History
Related topics
• vpn ssl settings
Syntax
execute vpn sslvpn list {web | tunnel}
History
Related topics
• execute vpn sslvpn del-tunnel
• execute vpn sslvpn del-web
• execute vpn sslvpn del-all
wireless-controller delete-wtp-image
Use this command to delete all firmware images for WLAN Termination Points (WTPs), also known as
physical access points.
Syntax
execute wireless-controller delete-wtp-image
History
Related topics
• execute wireless-controller upload-wtp-image
wireless-controller reset-wtp
Use this command to reset a physical access point (WTP).
Syntax
execute wireless-controller reset-wtp {<serialNumber_str> | all}
where <serialNumber_str> is the FortiWiFi unit serial number.
Use the all option to reset all APs.
History
Related topics
• wireless-controller wtp
wireless-controller restart-daemon
Use this command to restart the wireless-controller feature.
Syntax
execute wireless-controller restart-daemon
History
Related topics
• execute wireless-controller reset-wtp
wireless-controller upload-wtp-image
Use this command to upload a FortiWiFi firmware image to the FortiGate unit. Wireless APs controlled by
this wireless controller can download the image as needed.
Syntax
FTP:
execute wireless-controller upload-wtp-image ftp <filename_str>
<server_ipv4[:port_int]> [<username_str> <password_str>]
TFTP:
execute wireless-controller upload-wtp-image tftp <filename_str>
<server_ipv4>
History
Related topics
• execute wireless-controller delete-wtp-image
get
The get commands retrieve information about the operation and performance of your FortiGate unit.
This chapter contains the following sections:
endpoint-control app-detect router info6 bgp system fortiguard-log-service status
predefined-category status router info6 interface system fortiguard-service status
endpoint-control app-detect router info6 ospf system ha status
predefined-group status
router info6 protocols system info admin ssh
endpoint-control app-detect
predefined-signature status router info6 rip system info admin status
Syntax
get endpoint-control app-detect predefined-category status
name: "Firewalls"
id: 4
group: 1
Related topics
• config endpoint-control apps-detect rule-list rule-list
History
Syntax
get endpoint-control app-detect predefined-group status
name: "Multimedia"
id: 2
name: "Communication"
id: 3
Related topics
• config endpoint-control apps-detect rule-list
History
Syntax
get endpoint-control app-detect predefined-signature status
name: "QQ2009"
id: 2
category: 14
vendor: 78
Related topics
• config endpoint-control apps-detect rule-list rule-list
History
Syntax
get endpoint-control app-detect predefined-vendor status
Related topics
• config endpoint-control apps-detect rule-list rule-list
History
Syntax
get firewall service predefined <service_name>
Example output
Fortigate-200A # get firewall service predefined FTP
name : FTP
icmpcode :
icmptype :
protocol : TCP/UDP
protocol-number : 6
tcpport-range : 21-21:0-65535
udpport-range :
Syntax
get gui console status
Example
The output looks like this:
Preferences:
User: admin
Colour scheme (RGB): text=FFFFFF, background=000000
Font: style=monospace, size=10pt
History buffer=50 lines, external input=disabled
Related topics
• get gui topology status
History
Syntax
get gui topology status
Example
The output looks like this:
Preferences:
Canvas dimensions (pixels): width=780, height=800
Colour scheme (RGB): canvas=12ff08, lines=bf0f00, exterior=ddeeee
Background image: type=none, placement: x=0, y=0
Line style: thickness=2
Related topics
• get gui console status
History
hardware status
Report information about the FortiGate unit hardware.
Syntax
get hardware status
Example
The output looks like this:
FG600B3908600705 # get hardware status
Model name: Fortigate-620B
ASIC version: CP6
ASIC SRAM: 64M
CPU: Intel(R) Core(TM)2 Duo CPU E4300 @ 1.80GHz
RAM: 2020 MB
Compact Flash: 493 MB /dev/sda
Hard disk: 76618 MB /dev/sdb
USB Flash: not available
Network Card chipset: Broadcom 570x Tigon3 Ethernet Adapter (rev.0x5784100)
History
Related topics
• get system status
Syntax
get ips decoder status
decoder-name: "dns_decoder"
port_list: 53
decoder-name: "ftp_decoder"
port_list: 21
decoder-name: "http_decoder"
decoder-name: "im_decoder"
decoder-name: "imap_decoder"
port_list: 143
Ports are shown only for decoders with configurable port settings.
History
Related topics
• ips decoder
• get ips rule status
Syntax
get ips rule status
The output looks like this (partial output):
# get ips rule status
rule-name: "IP.Land"
rule-id: 12588
rev: 2.464
action: pass
status: disable
log: enable
log-packet: disable
severity: 3.high
service: All
location: server, client
os: All
application: All
rule-name: "IP.Loose.Src.Record.Route.Option"
rule-id: 12805
rev: 2.464
action: pass
status: disable
log: enable
log-packet: disable
severity: 2.medium
service: All
location: server, client
os: All
application: All
History
Related topics
• ips decoder
• get ips decoder status
• ips rule
Syntax
get ipsec tunnel list
Example
The output looks like this:
NAME REMOTE-GW PROXY-ID-SOURCE PROXY-ID-DESTINATION STATUS
TIMEOUT
VPN1 172.20.120.5:500 0.0.0.0/255.255.255.255 172.20.120.5/172.20.120.5 up
1786
History
Related topics
• vpn ipsec phase1
• vpn ipsec phase1-interface
• vpn ipsec manualkey
• vpn ipsec manualkey-interface
Syntax
get report database schema
History
Syntax
get router info bfd neighbour
History
Syntax
get router info bgp <keyword>
<keyword> Description
cidr-only Show all BGP routes having non-natural network masks.
community Show all BGP routes having their COMMUNITY attribute
set.
community-info Show general information about the configured BGP
communities, including the routes in each community and
their associated network addresses.
community-list Show all routes belonging to configured BGP community
lists.
dampening {dampened-paths | flap- Display information about dampening:
statistics | parameters} • Type dampened-paths to show all paths that have
been suppressed due to flapping.
• Type flap-statistics to show flap statistics related
to BGP routes.
• Type parameters to show the current dampening
settings.
filter-list Show all routes matching configured AS-path lists.
inconsistent-as Show all routes associated with inconsistent autonomous
systems of origin.
memory Show the BGP memory table.
neighbors [<address_ipv4> | Show information about connections to TCP and BGP
<address_ipv4> advertised-routes | neighbors.
<address_ipv4> received prefix-filter |
<address_ipv4> received-routes |
<address_ipv4> routes]
network [<address_ipv4mask>] Show general information about the configured BGP
networks, including their network addresses and
associated prefixes.
network-longer-prefixes Show general information about the BGP route that you
<address_ipv4mask> specify (for example, 12.0.0.0/14) and any specific
routes associated with the prefix.
paths Show general information about BGP AS paths, including
their associated network addresses.
prefix-list <name> Show all routes matching configured prefix list <name>.
quote-regexp <regexp_str> Enter the regular expression to compare to the AS_PATH
attribute of BGP routes (for example, ^730$) and enable
the use of output modifiers (for example, include,
exclude, and begin) to search the results.
regexp <regexp_str> Enter the regular expression to compare to the AS_PATH
attribute of BGP routes (for example, ^730$).
route-map Show all routes matching configured route maps.
scan Show information about next-hop route scanning,
including the scan interval setting.
summary Show information about BGP neighbor status.
Example
For the command get router info bgp memory, the output looks like:
Memory type Alloc count Alloc bytes
=================================== ============= ===============
BGP structure : 2 1408
BGP VR structure : 2 104
BGP global structure : 1 56
BGP peer : 2 3440
BGP as list master : 1 24
Community list handler : 1 32
BGP Damp Reuse List Array : 2 4096
BGP table : 62 248
----------------------------------- ------------- ---------------
Temporary memory : 4223 96095
Hash : 7 140
Hash index : 7 28672
Hash bucket : 11 132
Thread master : 1 564
Thread : 4 144
Link list : 32 636
Link list node : 24 288
Show : 1 396
Show page : 1 4108
Show server : 1 36
Prefix IPv4 : 10 80
Route table : 4 32
Route node : 63 2772
Vector : 2180 26160
Vector index : 2180 18284
Host config : 1 2
Message of The Day : 1 100
IMI Client : 1 708
VTY master : 1 20
VTY if : 11 2640
VTY connected : 5 140
Message handler : 2 120
NSM Client Handler : 1 12428
NSM Client : 1 1268
Host : 1 64
Log information : 2 72
Context : 1 232
----------------------------------- ------------- ---------------
bgp proto specifc allocations : 9408 B
bgp generic allocations : 196333 B
bgp total allocations : 205741 B
History
FortiOS v3.0 New.
FortiOS v3.0 MR2 Command moved from ‘router’ to ‘get’ chapter.
Related topics
• router aspath-list
• router bgp
• router community-list
Syntax
get router info multicast <keywords>
<keywords> Description
igmp Show Internet Group Management Protocol (IGMP) membership information
according to one of these qualifiers:
• Type groups [{<interface-name> | <group-address>}] to show
IGMP information for the multicast group(s) associated with the specified
interface or multicast group address.
• Type groups-detail [{<interface-name> | <group-
address>}] to show detailed IGMP information for the multicast group(s)
associated with the specified interface or multicast group address.
• Type interface [<interface-name>] to show IGMP information for
all multicast groups associated with the specified interface.
pim dense-mode Show information related to dense mode operation according to one of these
qualifiers:
• Type interface to show information about PIM-enabled interfaces.
• Type interface-detail to show detailed information about PIM-
enabled interfaces.
• Type neighbor to show the current status of PIM neighbors.
• Type neighbor-detail to show detailed information about PIM
neighbors.
• Type next-hop to show information about next-hop PIM routers.
• Type table [<group-address>][<source-address>] to show the
multicast routing table entries associated with the specified multicast group
address and/or multicast source address.
pim sparse-mode Show information related to sparse mode operation according to one of these
qualifiers:
• Type bsr-info to show Boot Strap Router (BSR) information.
• Type interface to show information about PIM-enabled interfaces.
• Type interface-detail to show detailed information about PIM-
enabled interfaces.
• Type neighbor to show the current status of PIM neighbors.
• Type neighbor-detail to show detailed information about PIM
neighbors.
• Type next-hop to show information about next-hop PIM routers.
• Type rp-mapping to show Rendezvous Point (RP) information.
• Type table [<group-address>][<source-address>] to show the
multicast routing table entries associated with the specified multicast group
address and/or multicast source address.
table [<group-address>] Show the multicast routing table entries associated with the specified
[<source-address>] multicast group address and/or multicast source address.
table-count Show statistics related to the specified multicast group address and/or
[<group-address>] multicast source address.
[<source-address>]
Examples
This example displays all of the PIM entries in the multicast routing table:
get router info multicast table
This example displays IGMP information for the multicast group associated with multicast group address
239.254.2.0:
get router info multicast igmp groups 239.254.2.0
History
Related topics
• router multicast
• execute modem trigger
Syntax
get router info ospf <keyword>
<keyword> Description
border-routers Show OSPF routing table entries that have an Area Border Router (ABR) or
Autonomous System Boundary Router (ASBR) as a destination.
database <qualifier> Show information from the OSPF routing database according to one of these
qualifiers.
target can be one of the following values:
• Type adv_router <address_ipv4> to limit the information to LSAs
originating from the router at the specified IP address.
• Type self-originate <address_ipv4> to limit the information to LSAs
originating from the FortiGate unit.
adv-router Type adv-router <address_ipv4> to show ospf Advertising Router link
<address_ipv4> states for the router at the given IP address.
asbr-summary Type asbr-summary to show information about ASBR summary LSAs.
<target>
brief Type brief to show the number and type of LSAs associated with each
OSPF area.
external <target> Type external to show information about external LSAs.
max-age Type max-age to show all LSAs in the MaxAge list.
network <target> Type network to show information about network LSAs.
nssa-external Type nssa-external to show information about not-so-stubby external
<target> LSAs.
opaque-area Type opaque-area <address_ipv4> to show information about opaque
<address_ipv4> Type 10 (area-local) LSAs (see RFC 2370).
opaque-as Type opaque-as <address_ipv4> to show information about opaque
<address_ipv4> Type 11 LSAs (see RFC 2370), which are flooded throughout the AS.
opaque-link Type opaque-link <address_ipv4> to show information about opaque
<address_ipv4> Type 9 (link-local) LSAs (see RFC 2370).
router <target> Type router to show information about router LSAs.
self-originate Type self-originate to show self-originated LSAs.
summary <target> Type summary to show information about summary LSAs.
interface Show the status of one or all FortiGate interfaces and whether OSPF is
[<interface_name>] enabled on those interfaces.
<keyword> Description
neighbor [all | Show general information about OSPF neighbors, excluding down-status
<neighbor_id> | detail | neighbors:
detail all | interface • Type all to show information about all neighbors, including down-status
<address_ipv4>] neighbors.
• Type <neighbor_id> to show detailed information about the specified
neighbor only.
• Type detail to show detailed information about all neighbors, excluding
down-status neighbors.
• Type detail all to show detailed information about all neighbors,
including down-status neighbors.
• Type interface <address_ipv4> to show neighbor information based
on the FortiGate interface IP address that was used to establish the
neighbor’s relationship.
route Show the OSPF routing table.
status Show general information about the OSPF routing processes.
virtual-links Show information about OSPF virtual links.
Examples
The following example shows how to display information from LSAs originating from a neighboring router
at IP address 10.2.4.1:
get router info ospf database router adv_router 10.2.4.1
The following example shows how to display the number and type of LSAs associated with each OSPF
area to which the FortiGate unit is linked:
get router info ospf database brief
The following command shows the status of all FortiGate interfaces and whether OSPF is enabled on
those interfaces.
get router info ospf interface
History
Related topics
• execute router restart
• get router info protocols
• get router info routing-table
• system interface
• router ospf
Syntax
get router info protocols
History
Related topics
• execute router restart
• get router info rip, get router info routing-table
• router rip, router ospf
Syntax
get router info rip <keyword>
<keyword> Description
database Show the entries in the RIP routing database.
interface [<interface_name>] Show the status of the specified FortiGate unit interface
<interface_name> and whether RIP is enabled.
If interface is used alone it lists all the FortiGate unit interfaces and
whether RIP is enabled on each.
Example
The following command displays the RIP configuration information for the port1 interface:
get router info rip interface port1
History
Related topics
• get router info protocols
• get router info routing-table
• router rip
• system interface
Syntax
get router info routing-table <keyword>
<keyword> Description
all Show all entries in the routing table.
bgp Show the BGP routes in the routing table.
connected Show the connected routes in the routing table.
database Show the routing information database.
details [<address_ipv4mask>] Show detailed information about a route in the routing table, including
the next-hop routers, metrics, outgoing interfaces, and protocol-specific
information.
ospf Show the OSPF routes in the routing table.
rip Show the RIP routes in the routing table.
static Show the static routes in the routing table.
Example
The following command displays the entire routing table:
get router info routing-table all
History
Related topics
• execute router restart
• get router info ospf
• get router info protocols
• get router info rip
• router policy
• router rip
• router static
• router static6
• system interface
Syntax
get router info6 bgp <keyword>
<keyword> Description
community Show all BGP routes having their COMMUNITY attribute
set.
community-list Show all routes belonging to configured BGP community
lists.
dampening {dampened-paths | flap- Display information about dampening:
statistics | parameters} • Type dampened-paths to show all paths that have
been suppressed due to flapping.
• Type flap-statistics to show flap statistics related
to BGP routes.
• Type parameters to show the current dampening
settings.
filter-list Show all routes matching configured AS-path lists.
inconsistent-as Show all routes associated with inconsistent autonomous
systems of origin.
neighbors [<address_ipv6mask> Show information about connections to TCP and BGP
neighbors.
network [<address_ipv6mask>] Show general information about the configured BGP
networks, including their network addresses and
associated prefixes.
network-longer-prefixes Show general information about the BGP route that you
<address_ipv6mask> specify (for example, 12.0.0.0/14) and any specific
routes associated with the prefix.
paths Show general information about BGP AS paths, including
their associated network addresses.
prefix-list <name> Show all routes matching configured prefix list <name>.
quote-regexp <regexp_str> Enter the regular expression to compare to the AS_PATH
attribute of BGP routes (for example, ^730$) and enable
the use of output modifiers (for example, include,
exclude, and begin) to search the results.
regexp <regexp_str> Enter the regular expression to compare to the AS_PATH
attribute of BGP routes (for example, ^730$).
route-map Show all routes matching configured route maps.
summary Show information about BGP neighbor status.
History
Syntax
get router info6 interface <interface_name>
The command returns the status of the interface and the assigned IPv6 address.
dmz2 [administratively down/down]
2001:db8:85a3:8d3:1319:8a2e:370:7348
fe80::209:fff:fe04:4cfd
History
Syntax
get router info6 ospf
History
Syntax
get router info6 protocols
History
Syntax
get router info6 rip
History
Syntax
get router info6 routing-table <item>
where <item> is one of the following:
Variable Description
<ipv6_ip> Destination IPv6 address or prefix.
bgp Show BGP routing table entries.
connected Show connected routing table entries.
database Show routing information base.
ospf Show OSPF routing table entries.
rip Show RIP routing table entries.
static Show static routing table entries.
History
Syntax
get system admin list
Example
The output looks like this:
# get system admin list
username local device remote started
admin sshv2 port1:172.20.120.148:22 172.20.120.16:4167 2006-08-09 12:24:20
admin https port1:172.20.120.148:443 172.20.120.161:56365 2006-08-09 12:24:20
admin https port1:172.20.120.148:443 172.20.120.16:4214 2006-08-09 12:25:29
History
Syntax
get system admin status
Example
The output looks like this:
# get system admin status
username: admin
login local: sshv2
login device: port1:172.20.120.148:22
login remote: 172.20.120.16:4167
login vdom: root
login started: 2006-08-09 12:24:20
current time: 2006-08-09 12:32:12
History
system arp
View the ARP table entries on the FortiGate unit.
This command is not available in multiple VDOM mode.
Syntax
get system arp
Example
The output looks like this:
# get system arp
Address Age(min) Hardware Addr Interface
172.20.120.16 0 00:0d:87:5c:ab:65 internal
172.20.120.138 0 00:08:9b:09:bb:01 internal
History
Related topics
• system arp-table
• system proxy-arp
system central-management
View information about the Central Management System configuration.
Syntax
get system central-management
Example
The output looks like this:
FG600B3908600705 # get system central-management
status : enable
type : fortimanager
auto-backup : disable
schedule-config-restore: enable
schedule-script-restore: enable
allow-push-configuration: enable
allow-pushd-firmware: enable
allow-remote-firmware-upgrade: enable
allow-monitor : enable
fmg : 172.20.120.161
vdom : root
authorized-manager-only: enable
serial-number : "FMG-3K2404400063"
History
system checksum
View the checksums for global, root, and all.
Syntax
get system checksum status
Example
The output looks like this:
# get system checksum status
global: 7a 87 3c 14 93 bc 98 92 b0 58 16 f2 eb bf a4 15
root: bb a4 80 07 42 33 c2 ff f1 b5 6e fe e4 bb 45 fb
all: 1c 28 f1 06 fa 2e bc 1f ed bd 6b 21 f9 4b 12 88
History
Syntax
get system cmdb status
Example
The output looks like this:
# get system cmdb status
version: 1
owner id: 18
update index: 6070
config checksum: 12879299049430971535
last request pid: 68
last request type: 29
last request: 78
History
system dashboard
List the available dashboard widgets. The help: field explains widget purpose.
FortiManager uses this information.
Syntax
get system dashboard [<widget_name>]
Example
The output looks like this:
# get system dashboard
== [ sysinfo ]
name: sysinfo help: system information
== [ licinfo ]
name: licinfo help: license information
== [ sysop ]
name: sysop help: system operation
== [ sysres ]
name: sysres help: system resource
== [ alert ]
name: alert help: alert console
== [ statistics ]
name: statistics help: statistics
== [ jsconsole ]
name: jsconsole help: CLI console
== [ sessions ]
name: sessions help: top sessions
== [ top-viruses ]
name: top-viruses help: top detected viruses
== [ top-attacks ]
name: top-attacks help: top detected attacks
== [ tr-history ]
name: tr-history help: traffic history
If you specify a specific widget, the output looks like this:
# get system dashboard sysinfo
name : sysinfo
help : system information
History
system fdp-fortianalyzer
Use this command to display the serial number of the FortiAnalyzer unit you use for logging.
Syntax
get system fdp-fortianalyzer
The result looks like this:
# get system fdp-fortianalyzer
SERIAL NUMBER
-------------
FL800B3908000420
History
system fortianalyzer-connectivity
Display connection and remote disk usage information about a connected FortiAnalyzer unit.
Syntax
get fortianalyzer-connectivity status
Example
The output looks like this:
# get system fortianalyzer-connectivity status
Status: connected
Disk Usage: 0%
History
Syntax
get system fortiguard-log-service status
Example
This shows a sample output.
# get system fortiguard-log-service status
FortiGuard Log & Analysis Service
Expire on: 20071231
Total disk quota: 1111 MB
Max daily volume: 111 MB
Current disk quota usage: n/a
History
Syntax
get system fortiguard-service status
Example
This shows a sample output.
NAME VERSION LAST UPDATE METHOD EXPIRE
AV Engine 2.002 2006-01-26 19:45:00 manual 2006-06-12 08:00:00
Virus Definitions 6.513 2006-06-02 22:01:00 manual 2006-06-12 08:00:00
Attack Definitions 2.299 2006-06-09 19:19:00 manual 2006-06-12 08:00:00
IPS Attack Engine 1.015 2006-05-09 23:29:00 manual 2006-06-12 08:00:00
History
system ha status
Use this command to display information about an HA cluster. The command displays general HA
configuration settings. The command also displays information about how the cluster unit that you have
logged into is operating in the cluster.
Usually you would log into the primary unit CLI using SSH or telnet. In this case the get system ha
status command displays information about the primary unit first, and also displays the HA state of the
primary unit (the primary unit operates in the work state). However, if you log into the primary unit and then
use the execute ha manage command to log into a subordinate unit, (or if you use a console connection
to log into a subordinate unit) the get system status command displays information about this
subordinate unit first, and also displays the HA state of this subordinate unit. The state of a subordinate
unit is work for an active-active cluster and standby for an active-passive cluster.
For a virtual cluster configuration, the get system ha status command displays information about
how the cluster unit that you have logged into is operating in virtual cluster 1 and virtual cluster 2. For
example, if you connect to the cluster unit that is the primary unit for virtual cluster 1 and the subordinate
unit for virtual cluster 2, the output of the get system ha status command shows virtual cluster 1 in
the work state and virtual cluster 2 in the standby state. The get system ha status command also
displays additional information about virtual cluster 1 and virtual cluster 2.
Syntax
get system ha status
The command display includes the following fields. For more information see the examples that follow.
vcluster 1 The HA state (hello, work, or standby) and HA heartbeat IP address of the cluster unit that
you have logged into in virtual cluster 1. If virtual domains are not enabled, vcluster 1
displays information for the cluster. If virtual domains are enabled, vcluster 1 displays
information for virtual cluster 1.
The HA heartbeat IP address is 10.0.0.1 if you are logged into a the primary unit of virtual
cluster 1 and 10.0.0.2 if you are logged into a subordinate unit of virtual cluster 1.
vcluster 1 also lists the primary unit (master) and subordinate units (slave) in virtual
cluster 1. The list includes the operating cluster index and serial number of each cluster unit
in virtual cluster 1. The cluster unit that you have logged into is at the top of the list.
If virtual domains are not enabled and you connect to the primary unit CLI, the HA state of the
cluster unit in virtual cluster 1 is work. The display lists the cluster units starting with the
primary unit.
If virtual domains are not enabled and you connect to a subordinate unit CLI, the HA state of
the cluster unit in virtual cluster 1 is standby. The display lists the cluster units starting with
the subordinate unit that you have logged into.
If virtual domains are enabled and you connect to the virtual cluster 1 primary unit CLI, the
HA state of the cluster unit in virtual cluster 1 is work. The display lists the cluster units
starting with the virtual cluster 1 primary unit.
If virtual domains are enabled and you connect to the virtual cluster 1 subordinate unit CLI,
the HA state of the cluster unit in virtual cluster 1 is standby. The display lists the cluster units
starting with the subordinate unit that you are logged into.
In a cluster consisting of two cluster units operating without virtual domains enabled all
clustering actually takes place in virtual cluster 1. HA is designed to work this way to support
virtual clustering. If this cluster was operating with virtual domains enabled, adding virtual
cluster 2 is similar to adding a new copy of virtual cluster 1. Virtual cluster 2 is visible in the
get system ha status command output when you add virtual domains to virtual cluster
2.
vcluster 2 vcluster 2 only appears if virtual domains are enabled. vcluster 2 displays the HA
state (hello, work, or standby) and HA heartbeat IP address of the cluster unit that you have
logged into in virtual cluster 2. The HA heartbeat IP address is 10.0.0.2 if you are logged into
the primary unit of virtual cluster 2 and 10.0.0.1 if you are logged into a subordinate unit of
virtual cluster 2.
vcluster 2 also lists the primary unit (master) and subordinate units (slave) in virtual
cluster 2. The list includes the cluster index and serial number of each cluster unit in virtual
cluster 2. The cluster unit that you have logged into is at the top of the list.
If you connect to the virtual cluster 2 primary unit CLI, the HA state of the cluster unit in virtual
cluster 2 is work. The display lists the cluster units starting with the virtual cluster 2 primary
unit.
If you connect to the virtual cluster 2 subordinate unit CLI, the HA state of the cluster unit in
virtual cluster 2 is standby. The display lists the cluster units starting with the subordinate
unit that you are logged into.
Examples
The following example shows get system ha status output for a cluster of two FortiGate-5001SX
units operating in active-active mode. The cluster group ID, session pickup, load balance all, and the load
balancing schedule are all set to the default values. The device priority of the primary unit is also set to the
default value. The device priority of the subordinate unit has been reduced to 100. The host name of the
primary unit is 5001_Slot_4. The host name of the subordinate unit in is 5001_Slot_3.
The command output was produced by connecting to the primary unit CLI (host name 5001_Slot_4).
Model: 5000
Mode: a-a
Group: 0
Debug: 0
ses_pickup: disable
load_balance: disable
schedule: round robin
Master:128 5001_Slot_4 FG50012204400045 1
Slave :100 5001_Slot_3 FG50012205400050 0
number of vcluster: 1
vcluster 1: work 10.0.0.2
Master:0 FG50012204400045
Slave :1 FG50012205400050
The following command output was produced by using execute HA manage 0 to log into the
subordinate unit CLI of the cluster shown in the previous example. The host name of the subordinate unit
is 5001_Slot_3.
Model: 5000
Mode: a-a
Group: 0
Debug: 0
ses_pickup: disable
load_balance: disable
schedule: round robin
Slave :100 5001_Slot_3 FG50012205400050 0
Master:128 5001_Slot_4 FG50012204400045 1
number of vcluster: 1
vcluster 1: work 10.0.0.2
Slave :1 FG50012205400050
Master:0 FG50012204400045
Note: Even though there are two cluster indexes there is only one HA heartbeat IP address and the HA
heartbeat address is not affected by a change in the operating cluster index.
History
Related topics
• system ha
• execute ha disconnect
• execute ha manage
• execute ha synchronize
Syntax
get system info admin ssh
Example
This shows sample output.
# get system info admin ssh
SSH v2 is enabled on port 22
SSH is enabled on the following 1 interfaces:
internal
SSH hostkey DSA fingerprint = cd:e1:87:70:bb:f0:9c:7d:e3:7b:73:f7:44:23:a5:99
SSH hostkey RSA fingerprint = c9:5b:49:1d:7c:ba:be:f3:9d:39:33:4d:48:9d:b8:49
History
Related topics
• system accprofile
• execute disconnect-admin-session
Syntax
get system info admin status
Example
This shows sample output.
Index User name Login type From
0 admin CLI ssh(172.20.120.16)
1 admin WEB 172.20.120.16
History
Related topics
• get system info admin ssh
Syntax
get system interface physical
The output looks like this:
# get system interface physical
== [onboard]
==[dmz1]
mode: static
ip: 0.0.0.0 0.0.0.0
status: down
speed: n/a
==[dmz2]
mode: static
ip: 0.0.0.0 0.0.0.0
status: down
speed: n/a
==[internal]
mode: static
ip: 172.20.120.146 255.255.255.0
status: up
speed: 100
==[wan1]
mode: pppoe
ip: 0.0.0.0 0.0.0.0
status: down
speed: n/a
==[wan2]
mode: static
ip: 0.0.0.0 0.0.0.0
status: down
speed: n/a
==[modem]
mode: static
ip: 0.0.0.0 0.0.0.0
status: down
speed: n/a
History
Syntax
get system performance status
Example
The output looks like this:
# get system performance status
CPU states: 0% user 0% system 0% nice 100% idle
Memory states: 18% used
Average network usage: 0 kbps in 1 minute, 0 kbps in 10 minutes, 1 kbps in 30
minutes
Average sessions: 5 sessions in 1 minute, 6 sessions in 10 minutes, 5 sessions
in 30 minutes
Virus caught: 0 total in 1 minute
IPS attacks blocked: 0 total in 1 minute
Uptime: 9days, 22 hours, 0 minutes
History
Syntax
get system session list
Example
The output looks like this:
PROTO EXPIRE SOURCE SOURCE-NAT DESTINATION DESTINATION-NAT
tcp 0 127.0.0.1:1083 - 127.0.0.1:514 -
tcp 0 127.0.0.1:1085 - 127.0.0.1:514 -
tcp 10 127.0.0.1:1087 - 127.0.0.1:514 -
tcp 20 127.0.0.1:1089 - 127.0.0.1:514 -
tcp 30 127.0.0.1:1091 - 127.0.0.1:514 -
tcp 40 127.0.0.1:1093 - 127.0.0.1:514 -
tcp 60 127.0.0.1:1097 - 127.0.0.1:514 -
tcp 70 127.0.0.1:1099 - 127.0.0.1:514 -
tcp 80 127.0.0.1:1101 - 127.0.0.1:514 -
tcp 90 127.0.0.1:1103 - 127.0.0.1:514 -
tcp 100 127.0.0.1:1105 - 127.0.0.1:514 -
tcp 110 127.0.0.1:1107 - 127.0.0.1:514 -
tcp 103 172.20.120.16:3548 - 172.20.120.133:22 -
tcp 3600 172.20.120.16:3550 - 172.20.120.133:22 -
udp 175 127.0.0.1:1026 - 127.0.0.1:53 -
tcp 5 127.0.0.1:1084 - 127.0.0.1:514 -
tcp 5 127.0.0.1:1086 - 127.0.0.1:514 -
tcp 15 127.0.0.1:1088 - 127.0.0.1:514 -
tcp 25 127.0.0.1:1090 - 127.0.0.1:514 -
tcp 45 127.0.0.1:1094 - 127.0.0.1:514 -
tcp 59 127.0.0.1:1098 - 127.0.0.1:514 -
tcp 69 127.0.0.1:1100 - 127.0.0.1:514 -
tcp 79 127.0.0.1:1102 - 127.0.0.1:514 -
tcp 99 127.0.0.1:1106 - 127.0.0.1:514 -
tcp 109 127.0.0.1:1108 - 127.0.0.1:514 -
tcp 119 127.0.0.1:1110 - 127.0.0.1:514 -
History
Syntax
get system session status
Example
The output looks like this:
The total number of sessions for the current VDOM: 31
History
system status
Use this command to display system status information including:
• FortiGate firmware version, build number and branch point
• virus and attack definitions version
• FortiGate unit serial number and BIOS version
• log hard disk availability
• host name
• operation mode
• virtual domains status: current VDOM, max number of VDOMs, number of NAT and TP mode VDOMs
and VDOM status
• current HA status
• system time
Syntax
get system status
Example output
Version: Fortigate-800 v4.0.1,build0056,081107
Virus-DB: 8.00631(2008-01-15 14:27)
IPS-DB: 2.00542(2008-09-04 23:08)
Serial-Number: FGT8002805030003
BIOS version: 03000300
Log hard disk: Available
Hostname: FGT8002805030003
Operation Mode: NAT
Current virtual domain: root
Max number of virtual domains: 10
Virtual domains status: 4 in NAT mode, 0 in TP mode
Virtual domain configuration: enable
FIPS-CC mode: disable
Current HA mode: standalone
Distribution: International
Branch point: 056
Release Version Information: Beta 1
System time: Mon Nov 24 16:25:56 2008
History
Related topics
• hardware status
Syntax
get system wireless detected-ap
Example output
SSID BSSID CHAN RATE S:N INT CAPS ACT LIVE AGE
Distil_G 00:1b:2f:9f:6a:0b 1 54M 19:0 100 EPSs Y 10 0 WPA
VLAN2Z 00:1d:70:59:a6:40 6 54M 6:0 100 EPSs Y 10 0 RSN
0... 00:16:46:9b:ba:d0 11 54M 3:0 100 ES Y 10 0 WME
HCS-users 00:17:c5:00:f0:31 7 54M 2:0 100 EPs Y 10 10 WPA
training 00:12:bf:14:fa:82 2 54M 43:0 100 EPSs Y 7 7 WPA WME
0... 00:16:46:9b:ba:b0 9 54M 17:0 100 ESs Y 6 6 WME
dixon 00:11:50:d5:d6:c2 11 54M 7:0 100 EPs Y 0 0
History
Related topics
• system wireless ap-status
• system wireless settings
user adgrp
Use this command to list Directory Service user groups.
Syntax
get user adgrp [<dsgroupname>]
If you do not specify a group name, the command returns information for all Directory Service groups. For
example:
== [ DOCTEST/Cert Publishers ]
name: DOCTEST/Cert Publishers server-name: DSserv1
== [ DOCTEST/Developers ]
name: DOCTEST/Developers server-name: DSserv1
== [ DOCTEST/Domain Admins ]
name: DOCTEST/Domain Admins server-name: DSserv1
== [ DOCTEST/Domain Computers ]
name: DOCTEST/Domain Computers server-name: DSserv1
== [ DOCTEST/Domain Controllers ]
name: DOCTEST/Domain Controllers server-name: DSserv1
== [ DOCTEST/Domain Guests ]
name: DOCTEST/Domain Guests server-name: DSserv1
== [ DOCTEST/Domain Users ]
name: DOCTEST/Domain Users server-name: DSserv1
== [ DOCTEST/Enterprise Admins ]
name: DOCTEST/Enterprise Admins server-name: DSserv1
== [ DOCTEST/Group Policy Creator Owners ]
name: DOCTEST/Group Policy Creator Owners server-name: DSserv1
== [ DOCTEST/Schema Admins ]
name: DOCTEST/Schema Admins server-name: DSserv1
If you specify a Directory Service group name, the command returns information for only that group. For
example:
name : DOCTEST/Developers
server-name : ADserv1
The server-name is the name you assigned to the Directory Service server when you configured it in the
user fsae command.
History
Related topics
• user fsae
• execute fsae refresh
Syntax
get vpn ssl monitor
Output
History
Related topics
• vpn ssl settings
wireless-controller scan
Use this command to view the list of access points detected when ap-scan is set to bgscan or fgscan.
For more information see wireless-controller wtp.
Syntax
get wireless-controller scan
Example output
SSID BSSID CHAN RATE S:N INT CAPS ACT LIVE AGE
Distil_G 00:1b:2f:9f:6a:0b 1 54M 19:0 100 EPSs Y 10 0 WPA
VLAN2Z 00:1d:70:59:a6:40 6 54M 6:0 100 EPSs Y 10 0 RSN
0... 00:16:46:9b:ba:d0 11 54M 3:0 100 ES Y 10 0 WME
HCS-users 00:17:c5:00:f0:31 7 54M 2:0 100 EPs Y 10 10 WPA
training 00:12:bf:14:fa:82 2 54M 43:0 100 EPSs Y 7 7 WPA WME
0... 00:16:46:9b:ba:b0 9 54M 17:0 100 ESs Y 6 6 WME
dixon 00:11:50:d5:d6:c2 11 54M 7:0 100 EPs Y 0 0
History
Related topics
• wireless-controller wtp
wireless-controller status
Use this command to list the physical AP (WTP) firmware images stored on the wireless-controller.
Syntax
get wireless-controller status
History
Index
Symbols Actiontec modem, 471
activate
_email, 38
router bgp neighbor, 290
_fqdn, 38
active
_index, 38 antivirus filepattern, 74
_int, 38 address
_ipv4, 38 firewall, 110
_ipv4/mask, 38 system autoupdate clientoverride, 397
_ipv4mask, 38 system autoupdate override, 398
_ipv4range, 38 system autoupdate push-update, 399
_ipv6, 38 system autoupdate tunneling, 402
_ipv6mask, 38 address overlap, 518
_name, 38 address-mode
_pattern, 38 system fortianalyzer, 246
_str, 38 addrgrp
_v4mask, 38 firewall, 112
_v6mask, 38 admin, 32
“next generation” Routing Information Protocol (RIPng), 349 log filter, 236
system, 385
admingrp
Numerics access group for system accprofile, 382
3DES, 34 Administration Login disclaimer, 477
administrative distance, 361
A administrator access
abort, 41 system accprofile command, 382
abr-type administrators
router ospf, 316, 328 info, 815
accelerate SSL, 197 list, 797
accept-lifetime admin-port
router key-chain, 302 system global, 425
access controls, 41, 43 admin-sport
system global, 425
access-group
router multicast interface igmp, 309 admintimeout
system global, 425
access-list, 289
router, 276 ADSL
router ospf, 322 bridged mode, 456
router rip distance, 342 ipoa, 456
router rip offset-list, 346, 352 Advanced Encryption Standard (AES), 461
accprofile advertise
system, 382 router ospf area filter-list, 320, 330
system admin, 386 router ospf summary-address, 327
ACK, 426 advertisement-interval
action router bgp neighbor, 290
antivirus filepattern, 74 agelimit
firewall multicast-policy, 127 antivirus quarantine, 77
firewall policy, 130 aggregate interface, 464
imp2p aim-user, 212 algorithm, 464
imp2p icq-user, 213 lacp-ha-slave, 464
imp2p msn-user, 214 lacp-mode, 464
router access-list, 276 lacp-speed, 465
router aspath-list, 279, 281 member, 465
router prefix-list, 337 aggregate route, 286
router route-map, 355 aim
spamfilter bword, 367 imp2p old-version, 215
spamfilter DNSBL, 369 imp2p policy, 216
spamfilter emailbwl, 371 aim-user
spamfilter ipbwl, 375 imp2p, 212
spamfilter mheader, 378
webfilter urlfilter, 672
alertemail ase
system, 392 execute ha synchronize, 708
algorithm AS-path list, 279
system interface, 464 aspath-list
vpn ssl settings, 623 router, 279
all as-set
execute ha synchronize, 708 router bgp aggregate-address, 289
router info routing-table, 790 attack
allowaccess log filter, 236
system interface, 451, 462 attackdef
allowas-in execute ha synchronize, 708
router bgp neighbor, 290 attribute-unchanged
allowas-in-enable router bgp neighbor, 291
router bgp neighbor, 291 auth
allowed log filter, 236
log filter, 236 system bug-report, 405, 406
altmode auth-alg
system modem, 470 vpn ipsec manualkey-interface, 583
always-compare-med authenticate
router bgp, 286 system alertemail, 392, 395
ambiguous command, 36, 45 authentication
anomaly router ospf area, 319
ips, 220 router ospf area virtual-link, 320
log filter, 236 router ospf ospf-interface, 324, 330
anti-replay system ha, 437
system global, 425 vpn ipsec manualkey, 580
antispam, 365 authentication based routing, 281
antispam-cache authentication keepalive, 481
system fortiguard, 418 authentication keys, RIP v2, 302
antispam-cache-ttl authentication timeout, 481
system fortiguard, 419 authentication-key
antispam-timeout router ospf area virtual-link, 321
system fortiguard, 419 router ospf ospf-interface, 324
antivirus, 73 authgrp
AP mode access group for system accprofile, 382
system wireless settings, 541 auth-key
Application Control list, 493 vpn ipsec manualkey-interface, 583
area authkey
router ospf network, 323 vpn ipsec manualkey, 580
area border router (ABR), 314, 316, 318, 329 auth-keychain
ARP router rip interface, 344
proxy ARP, 189 authmethod
arp vpn ipsec phase1, 587
system, 799 vpn ipsec phase1-interface, 595
ARP packets, 431, 451 auth-mode
ARP table router rip interface, 344
adding entries, 476 authpasswd
display, 799 vpn ipsec phase1, 587
arpforward vpn ipsec phase1-interface, 595
system interface, 451 auth-string
arps router rip interface, 344
system ha, 437 auth-timeout
arps-interval vpn ssl settings, 623
system ha, 437 auth-type
arp-table system interface, 451
system, 394, 395 authusr
as vpn ipsec phase1, 587
router bgp, 286 vpn ipsec phase1-interface, 595
AscendTNT modem, 471 authusrgrp
ASCII, 46, 47 vpn ipsec phase1, 587
vpn ipsec phase1-interface, 595
auto baudrate
execute vpn certificate ca, 751 system console, 408
execute vpn certificate crl, 753 beacon_interval
auto-dial system wireless settings, 540, 683
system modem, 470 bestpath-as-path-ignore
auto-install router bgp, 286
system, 396 bestpath-cmp-confed-aspath
Automatic Refresh Interval, 429 router bgp, 286
Autonomous System (AS), 279 bestpath-cmp-routerid
Autonomous System, bgp, 286 router bgp, 287
autonomous-flag bestpath-med-confed
system interface config ipv6-prefix, 463 router bgp, 287
autoupdate clientoverride bestpath-med-missing-as-worst
system, 397 router bgp, 287
autoupdate ips BGP, 533
system, 398 AS-path list, 279
autoupdate override attributes, 299
system, 398 BGP-4, 283
autoupdate push-update External, 286
system, 399 Internal, 286
autoupdate schedule logging neighbor changes, 288
system, 400 memory table, 781
RFC 1771, 283
autoupdate tunneling
RFC 1997, 283
system, 402
storing updates from neighbor, 295
aux
bgp
system, 404
router, 283
AUX port configuration, 404 router info routing-table, 790
AV/IPS signature reporting, 427 bi-directional forwarding detection (BFD), 518
av-failopen bindthroughfw
system global, 426 firewall ipmacbinding setting, 119
av-failopen-session bindtofw
system global, 426 firewall ipmacbinding setting, 119
avquery-cache bits per second (bps), 32
system fortiguard, 419
blackhole, 361
avquery-cache-ttl router static, 361
system fortiguard, 419
blackhole route, 460, 465
avquery-status
blocked
system fortiguard, 419
log filter, 236
avupd
block-page-status-code
execute ha synchronize, 708
antivirus service, 81
Blowfish, 34
B boot interrupt, 31
backdoor Boot Strap Router (BSR), 304, 310
router bgp network, 296 BOOTP Vendor Extensions, 411
backplane interfaces, 429 border-routers
backup ipsec interface router info ospf, 786
example, 602 BPDU, 427
monitor-phase1, 598 bridge protocol data unit, 427
backup, execute, 686 bridged mode, 456
bandwidth limiting for interfaces, 455 bsr-allow-quick-refresh
banned word router multicast interface pim-smglobal, 310
character set, 147 buffer, 49
batch system replacemsg auth, 477, 478, 480, 484, 498, 500
execute, 689, 691 system replacemsg fortiguard-wf, 486
batch changes, 31, 49 system replacemsg ftp, 488
batch mode, 426 system replacemsg http, 490
batch_cmdb system replacemsg im, 493
system global, 426 system replacemsg mail, 495
baud rate, 49 system replacemsg spam, 502
system replacemsg sslvpn, 504, 505
bug-report CLI
system, 405, 406 connecting, 31
bword connecting to the, 31
spamfilter, 366 CLI Console widget, 33
webfilter, 660 client certificate
for SSL-VPN, 623
C require for logon, 426
client-to-client-reflection
ca router bgp, 287
execute ha synchronize, 708
clt-cert-req
cache system global, 426
spamfilter fortishield, 373
cluster, 435
cache-mem-percent virtual, 435
webfilter fortiguard, 664
cluster-id
cache-mode router bgp, 287
webfilter fortiguard, 664
cmdb, 802
cache-notfound-responses
cnid
system dns, 413
user ldap, 555
capability-default-originate
collision domain, 454
router bgp neighbor, 291
command, 36
capability-dynamic
abbreviation, 45
router bgp neighbor, 291
ambiguous, 36, 45
capability-graceful-restart completion, 44, 45
router bgp neighbor, 291 help, 44
capability-orf incomplete, 36
router bgp neighbor, 291 interactive, 45
capability-route-refresh multi-line, 36, 45
router bgp neighbor, 291 prompt, 39, 44, 49
case sensitivity scope, 36, 37
Perl regular expressions, 50 command line interface (CLI), 35
Central Management Service, 690 comment
certificate firewall profile, 142
vpn ca, 570 comments
vpn crl, 572 firewall policy, 131
vpn local, 574 comments, documentation, 18
cfg reload Common Criteria (CC), 416
execute, 691 COMMUNITY, 299
cfg save community
execute, 692 router info bgp, 781, 791
channel COMMUNITY attribute, 295, 299
system wireless settings, 540
community-info
CHAP, 451 router info bgp, 781
character set community-list
converting, 147 router, 299
DLP, 147 router info bgp, 781, 791
spam filter, 147
confederation-identifier
web filtering, 147
router bgp, 287
characters, special, 46
config
check-reset-range execute backup, 687
system global, 426 ha synchronize, 708
China, PPP option, 470 restore, 729
Chinese, for web-based manager config checksum
Simplified, 428 system cmdb status, 802
Traditional, 428 config limit
CIDR, 38, 283 ips anomaly, 220
cidr-only config router, 21, 85, 93, 103, 635, 655, 675
router info bgp, 781 config srv-ovrd-list
cisco-exclude-genid system fortiguard, 420
router multicast interface, 308 configuration script, 31
Classless Interdomain Routing (CIDR), 283 connected
clear system arp table router info routing-table, 790
execute, 693 connecting to the FortiMail CLI using SSH, 34
documentation dst-subnet6
commenting on, 18 vpn ipsec phase2-interface, 613
Fortinet, 18 duplicate MAC addresses, 454
domain Dynamic DNS service (DDNS), 452
system dhcp server, 411 dynamic resources
domain name, 452 VDOM resource limits, 506
dont-capability-negotiate dynamic routing, 458
router bgp neighbor, 292
dotted decimal, 38 E
downstream router, prune state, 309
dpd EBGP, 286
vpn ipsec phase1, 587 RFC 3065, 283
vpn ipsec phase1-interface, 596 ebgp-enforce-multihop
dpd-retrycount, 596 router bgp neighbor, 292
vpn ipsec phase1, 587 ebgp-multihop-ttl
dpd-retryinterval, 596 router bgp neighbor, 292
vpn ipsec phase1, 588 ECMP route failover and load balance, 459
drive-standby-time edit
log disk setting, 242 shell command, 40
drop-blocked system accprofile, 382
antivirus quarantine, 77 system gre-tunnel, 433
system mac-address-table, 468
drop-heuristic
antivirus quarantine, 77 eip
vpn l2tp, 618
drop-infected
vpn pptp, 620
antivirus quarantine, 78
email
dr-priority
log filter, 236
router multicast interface, 308
email when virus or spam detected, 495
dst
firewall dnstranslation, 113 emailbwl
router policy, 334 spamfilter, 370
router static, 362 emaillists
router static6, 364 execute ha synchronize, 708
system global, 427 email-log-imap
dstaddr log filter, 236
firewall multicast-policy, 127 email-log-pop3
firewall policy, 132 log filter, 236
dst-addr-type email-log-smtp
vpn ipsec phase2, 606 log filter, 237
vpn ipsec phase2-interface, 612 email-pattern
dst-end-ip spamfilter emailbwl, 371
vpn ipsec phase2, 606 enable
vpn ipsec phase2-interface, 612 system dhcp server, 411
dst-end-ip6 enable-auto-submit
vpn ipsec phase2-interface, 613 antivirus quarantine, 78
dstintf enc-alg
firewall multicast-policy, 127 vpn ipsec manualkey-interface, 584
firewall policy, 132 enc-key
dst-name vpn ipsec manualkey-interface, 584
vpn ipsec phase2, 606 enckey
vpn ipsec phase2-interface, 613 vpn ipsec manualkey, 581
dst-port encoding, 46
vpn ipsec phase2, 607 encryption, 430
vpn ipsec phase2-interface, 613 ipsec manualkey, 581
dst-start-ip system ha, 437
vpn ipsec phase2, 607 end
vpn ipsec phase2-interface, 613 command in an edit shell, 41
dst-start-ip6 firewall schedule onetime, 171
vpn ipsec phase2-interface, 613 firewall schedule recurring, 172
dst-subnet shell command, 40
vpn ipsec phase2, 607
vpn ipsec phase2-interface, 613
keep-alive-timer lines_per_view
router bgp, 288 execute logfilter, 715
router bgp neighbor, 293 Link Aggregation Control Protocol (LACP), 464
key, 34 Link State Advertisement (LSA), 314
key-chain link-failed-signal
router, 302 system ha, 439
keylife, 597 list
vpn ipsec phase1, 588 router ospf area filter-list, 320
keylifekbs, 607 listname
vpn ipsec phase2-interface, 613 router rip distribute-list, 343, 351
keylifeseconds, 607 load-balance-all
vpn ipsec phase2-interface, 613 system ha, 439
keylife-type, 607 local
vpn ipsec phase2-interface, 613 user, 558
key-string local console access, 31
router key-chain, 303 LOCAL_AS community, 300
localcert
L execute ha synchronize, 708
l2forward locale, 47
system interface, 455 local-gw
l2tp system gre-tunnel, 433
vpn, 618 vpn ipsec manualkey, 581
vpn ipsec manualkey-interface, 584
lacp-ha-slave
vpn ipsec phase1, 588
system interface, 464
localid, 597
lacp-mode
vpn ipsec phase1, 588
system interface, 464
local-spi
lacp-speed
vpn ipsec manualkey-interface, 584
system interface, 465
localspi
language, 46, 47
vpn ipsec manualkey, 581
spamfilter bword, 367
system global, 428 location
system snmp sysinfo, 526, 529
last request
system cmdb status, 802 log, 233
display SQL database, 779
last request pid
system interface, 456
system cmdb status, 802
user name in upper case, 428
last requst type
log delete-all, execute, 712
system cmdb status, 802
log delete-rolled, execute, 713
lcdpin
system global, 428 log display, execute, 714
lcdprotection log filter, execute, 715
system global, 428 log fortianalyzer test-connectivity
lcp-echo-interval execute, 716
system interface, 456 log list, execute, 717
lcp-max-echo-failures log roll, execute, 718
system interface, 456 log settings, 382
LDAP, 428 log-av-block
ldap firewall profile, 166
user, 555 log-av-oversize
ldapconntimeout firewall profile, 166
system global, 428 log-av-virus
ldap-server firewall profile, 166
user local, 558 loggrp
le access group for system accprofile, 382
router prefix-list, 337 system accprofile, 382
lease-time login prompt, 32
system dhcp server, 411 loglocaldeny
license system global, 428
spamfilter fortishield, 373 log-neighbor-changes
license key entry, 749 router bgp, 288
line endings, 49 log-spam, 166
logtraffic match-ip-address
firewall policy, 132 router route-map, 355
log-web-content match-ip-nexthop
firewall profile, 166 router route-map, 355
log-web-filter-activex match-metric
firewall profile, 166 router route-map, 355
log-web-filter-applet match-origin, 357
firewall profile, 166 match-route-type
log-web-filter-cookie router route-map, 355
firewall profile, 166 match-tag
log-web-ftgd-err router route-map, 355
firewall profile, 166 maxfilesize
log-web-url antivirus quarantine, 78
firewall profile, 166 maximum transmission unit (MTU), 457
loopback interface, 460, 465 maximum-prefix
lowspace router bgp neighbor, 293
antivirus quarantine, 78 maximum-prefix-threshold
router bgp neighbor, 293
M maximum-prefix-warning-only
router bgp neighbor, 293
mac
max-log-file-size
firewall ipmacbinding table, 121
log disk setting, 241
system arp-table, 395
system dhcp reserved-address, 409 mc-ttl-notchange
system interface, config wifi-mac_list, 461 system global, 519
MAC address, 459 md5-key
arp-table, 395 router ospf area virtual-link, 321
router ospf ospf-interface, 325
MAC address translation, 476
member
macaddr
firewall addrgrp, 112
system interface, 456
firewall service group, 174, 177
mac-address-table system interface, 465
system, 468 user group, 552
mail-sig user peergrp, 562
firewall profile, 154 vpn ipsec concentrator, 578
mailsig-status memory
firewall profile, 154 router info bgp, 781
mailto memory filter
system bug-report, 405 log, 235, 244, 245, 251
mailto1, mailto2, mailto3 memory global setting
alertemail setting, 69 log, 250
maintenance commands, 383 memory setting
manageip log, 249
system settings, 519 metric
management traffic, 56 router ospf redistribute, 326, 332
management VDOM, 56, 385 router rip redistribute, 347, 353
management-vdom metric-type
system global, 428 router ospf redistribute, 326, 332
mappedip mheader
firewall vip, 194 spamfilter, 377
mappedport mntgrp
firewall vip, 194 access group for system accprofile, 383
match-as-path system accprofile, 383
router route-map rule, 357 mode
match-community antivirus heuristic, 76
router route-map rule, 357 config system ha, 439
match-community-exact system console, 408
router route-map rule, 357 system interface, 456
match-interface system modem, 470
router route-map, 355 system wireless settings, 541
vpn ipsec phase1, 588
vpn ipsec phase1-interface, 597
object, 36 passive-interface
offset router ospf, 317, 329
router rip offset-list, 347, 352 router rip, 341, 350
old-version passwd
imp2p, 215 system modem, 471
onlink-flag user local, 558
system interface config ipv6-prefix, 463 password, 32
operating mode lost, 43
system settings, 517 reset, 43
opmode system alertemail, 392
system settings, 519 system autoupdate tunneling, 402
optimize system bug-report, 405
system global, 429 system ha, 440
system interface, 457
option, 36
user ldap, 556
system dhcp server, 411
PAT
options
virtual IPs, 189
spamfilter, 379
path maximum transmission unit (PMTU), 429
ORIGIN attribute, 359
paths
OSPF, 314, 532
router info bgp, 781, 791
RFC 2328, 314
TOS application routing, 532 pattern, 38
execute ping-options, 724
ospf
log filter, 237
ABR, 314
spamfilter bword, 367
LSA, 314
NSSA, 318 pattern-type
RFC 3509, 316, 328 spamfilter bword, 367
router, 314 spamfilter emailbwl, 371
router info routing-table, 790 spamfilter mheader, 378
OSPF, clear router, 733 peer
router ospf area virtual-link, 321, 330
other-traffic
vpn ipsec phase1, 589
log filter, 237
vpn ipsec phase1-interface, 598
outbound
peer connection, 32
firewall policy, 133
peergrp, 598
Outbound Routing Filter (ORF), 291
vpn ipsec phase1, 589
output-device
peerid, 598
router policy, 334
vpn ipsec phase1, 589
override
Peer-to-Peer, message if blocked, 493
system autoupdate push-update, 399
system ha, 439 peertype, 599
vpn ipsec phase1, 589
override-capability
router bgp neighbor, 293 performance info, 817
oversized Perl regular expressions, using, 50
log filter, 237 permissions, 41, 43
ovrd-auth-https persistance
webfilter fortiguard, 664 HTTP cookie, 200
ovrd-auth-port pfs
webfilter fortiguard, 664 vpn ipsec phase2, 607
owner id vpn ipsec phase2-interface, 614
system cmdb status, 802 phase1name
vpn ipsec phase2, 607
vpn ipsec phase2-interface, 614
P phone
padt-retry-timeout system modem, 471
system interface, 457 PIM, dense-mode, 308
paging, 49 PIM, sparse-mode, 308
PAP, 451 pim-mode
parity, 32 router multicast interface, 308
passive ping, execute, 723
router bgp neighbor, 294 ping6, execute, 726
router multicast interface, 308 ping-options, execute, 724
plain text editor, 49
poisoned split horizon, 344, 351
policy prefix
firewall, 129 router access-list, 276, 277
imp2p, 216 router bgp aggregate-address, 289, 290
router, 333 router bgp network, 296
policy check, 430 router ospf area range, 320, 330
policy check, skipping, 430 router ospf network, 323
poll-interval router ospf summary-address, 327
router ospf neighbor, 323 router prefix-list, 338
poolname router rip distance, 343
firewall policy, 133 router rip network, 346
pop3 prefix-list
firewall profile, 155, 157 router info bgp, 781, 791
router prefix-list, 337
pop3oversizelimit
firewall profile, 156 prefix-list-in
router bgp neighbor, 294
pop3soversizelimit
firewall profile, 158 prefix-list-out
router bgp neighbor, 294
pop3-spamaction
firewall profile, 156 preserve source port number, 132
pop3-spamtagmsg Pre-shared Key (PSK), 461
firewall profile, 156 primary
pop3-spamtagtype system dns, 413
firewall profile, 156 priority
port, 252 router ospf neighbor, 323
log syslogd setting, 252 router ospf ospf-interface, 325, 331
system autoupdate push-update, 399 system ha, 440
system autoupdate tunneling, 402 system interface, 458
system fortiguard, 418 system modem, 471
system session-helper, 508 profile
user fsae, 549 firewall, 139
user ldap, 555 firewall policy, 133
port 520, 344 webfilter ftgd-ovrd, 668, 670
port 8890, 402 profile-status
firewall policy, 133
port address translation
virtual IPs, 189 propagation-delay
router multicast interface, 308
port forwarding, 189
proposal
port range, 428
vpn ipsec phase1, 590, 600
portal-heading vpn ipsec phase2, 608
vpn ssl settings, 623 vpn ipsec phase2-interface, 614
portforward protection profile
firewall vip, 195 DoS sensor, 154
power_level protocol
system wireless settings, 541, 683 firewall service custom, 175
ppp firewall vip, 195
log filter, 237 router ospf distribute-list, 322
PPPoE, 399 router policy, 335
PPPoE Active Discovery Terminate (PADT), 457 system session-helper, 508
PPPoE auth, 451 vpn ipsec phase2, 608
pptp vpn ipsec phase2-interface, 614
vpn, 620 Protocol Independent Multicast (PIM), 304
preferences protocol-number
GUI console, 208 firewall service custom, 175
GUI topology viewer, 209 proxy ARP, 189
preferred-life-time FortiGate interface, 189
system interface config ipv6-prefix, 463 IP pool, 189
virtual IP, 189
proxy ARP table, 476
Proxy ID Destination
IPSec interface mode, 778
Proxy ID Source
IPSec interface mode, 778
proxy-arp remoteauthtimeout
system, 476 system global, 429
psksecret, 600 remote-gw
vpn ipsec phase1, 590 system gre-tunnel, 433
purge, shell command, 40 vpn ipsec manualkey, 581
vpn ipsec manualkey-interface, 584
Q vpn ipsec phase1, 590
vpn ipsec phase1-interface, 600
quarantine remotegw-ddns
antivirus, 77 vpn ipsec phase1, 590
quarfilepattern vpn ipsec phase1-interface, 600
antivirus, 80 remote-ip
quar-to-fortianalyzer system interface, 458
antivirus quarantine, 77 remote-spi
query-v1-port vpn ipsec manualkey-interface, 584
system snmp community, 524 remotespi
query-v1-status vpn ipsec manualkey, 581
system snmp community, 524 remove-private-as
query-v2c-port router bgp neighbor, 294
system snmp community, 524 rename, shell command, 40
query-v2c-status Rendezvous Point (RP), 308, 309
system snmp community, 524 Rendezvous Points (RPs), 304
quotafull repeat-count
log fortiguard setting, 248 execute ping-options, 724
quote-regexp replacemsg auth, 478, 480, 486, 498
router info bgp, 781, 791 replacemsg fortiguard-wf
system, 486
R replacemsg ftp
RADIUS, 429, 461, 481 system, 488
radius replacemsg http
user, 563 system, 490
RADIUS authentication, 56 replacemsg im
radius-auth sytem, 493
system admin, 387 replacemsg mail
radius-group system, 495
system admin, 387 replacemsg spam
radius-port system, 502
system global, 429 replacemsg sslvpn
radius-server system, 504, 505
user local, 558 replay
rating vpn ipsec phase2, 608
webfilter ftgd-local-rating, 667 vpn ipsec phase2-interface, 614
webfilter ftgd-ovrd, 668, 670 report, 257
reboot, execute, 727 display SQL database, 779
received route, looping, 287 report settings, 382
receive-version reqclientcert
router rip interface, 344 vpn ssl settings, 623
redial request to send (RTS), 462
system modem, 471 reserved characters, 46
refresh reset
system global, 429 password, 43
regexp reset-sessionless-tcp
router aspath-list, 279, 281 system global, 429
router info bgp, 781, 791 resolve
regular expression, 38 log trafficfilter, 255
Remote Gateway resource limits
VPN IPSec monitor field, 778 dynamic resources, 506
remote IP monitoring static resources, 506
HA, 444 restart-time
remote-as system global, 429
router bgp neighbor, 294 restore, execute, 728
set-ip-nexthop SNMP
router route-map, 355 v1, 524
set-metric v2c, 524
router route-map, 355 snmp community
set-metric-type system, 523
router route-map, 355 snmp sysinfo
set-next-reboot, execute, 738 system, 526, 528
set-tag socket-size, 225
router route-map, 355 soft-reconfiguration
setting router bgp neighbor, 295
alertemail, 68 source
setting a default gateway for an IPSec interface, 596 execute ping-options, 724
setting a default gateway priority, 596 system ipv6-tunnel, 467, 522
setting administrative access for SSH or Telnet, 32 Source Specific Multicast (SSM), 312
settings spamfilter, 365
system, 517 spamwordthreshold, 165
severity span
log filter, 237 system switch-interface, port spanning, 530
SFP interfaces, 456 Spanning Tree Protocol (STP), 459
SGMII (Serial Gigabit Media Independent Interface), 456 special characters, 46
shell command speed
delete, 40 system interface, 458
edit, 40 spf-timers
end, 40 router ospf, 318, 329
get, 40 Splice mode, 496
purge, 40 split horizon, 345, 351
rename, 40 split-horizon
show, 40 router rip interface, 345, 351
Shift-JIS, 47 split-horizon-status
shortcut router rip interface, 345, 351
router ospf area, 320 spoofing
shortest path first (SPF), 318, 329 IP address, 119
Shortest Path Tree (SPT), 312 SQL report
show, 41 display SQL database, 779
show, shell command, 40 src
shutdown firewall dnstranslation, 113
router bgp neighbor, 295 router policy, 335
signature srcaddr
ips custom, 223, 224 firewall multicast-policy, 127
log filter, 237 firewall policy, 134
signature reporting, 427 src-addr-type
single-source vpn ipsec phase2, 609
vpn ipsec phase2, 608 vpn ipsec phase2-interface, 615
vpn ipsec phase2-interface, 614 src-end-ip
sip vpn ipsec phase2, 609
vpn l2tp, 618 vpn ipsec phase2-interface, 615
vpn pptp, 620 srcintf
sit-tunnel firewall multicast-policy, 127
system, 522 firewall policy, 134
Skinny Client Call protocol (SCCP), 519 src-name
smtp, 160, 163 vpn ipsec phase2, 609
SMTP server, 405, 406 src-port
SMTP, blocked email, 502 vpn ipsec phase2, 609
smtpoversizelimit, 161 vpn ipsec phase2-interface, 615
smtpsoversizelimit, 161 src-start-ip
vpn ipsec phase2, 609
smtp-spamaction, 161
vpn ipsec phase2-interface, 615
smtp-spamhdrip, 161
src-subnet
smtp-spamtagmsg, 162 vpn ipsec phase2, 609
smtp-spamtagtype, 162 vpn ipsec phase2-interface, 616
srv-ovrd
system fortiguard, 418
sync-config timeout
system ha, 441 execute ping-options, 724
synchronization IPSec interface mode, 778
router bgp, 288 system session-ttl, 515
sessions between standalone FortiGate units, 509 timeout-timer
TCP sessions between standalone FortiGate units, 509 router rip, 342, 350
syncinterval timestamp, 430
system global, 430 time-to-live (TTL), 519
syntax, 35 timezone
sysgrp system global, 430
access group for system accprofile, 383 tips and tricks, 44
system accprofile, 383 topology status
syslogd filter get, 774
log, 235, 244, 245, 251 topology viewer status, 774
syslogd setting topology, gui, 209
log, 252 tos
syslogd2 setting execute ping-options, 724
log, 252 tos-based-priority
syslogd3 setting system, 532
log, 252 tp-mc-skip-policy
system admin list, 797 system global, 430
system admin status, 798 traceroute, execute, 744
system checksum, 801 traffic
system cmdb status, 802 log filter, 238
system dashboard, 803 Traffic Indication Messages (TIM)
system fortianalyzer-connectivity, 805 system wireless settings, 540, 683
system fortiguard-log-service status, 806 traffic shaping, 455, 457
system fortiguard-service status, 807 trafficfilter
system ha status, 808 log, 255
system info admin ssh, 814 transmit-delay
system info admin status, 815 router ospf area virtual-link, 321, 330
system performance status, 817 router ospf interface, 326, 331
Transparent mode
T collision domain, 454
transparent mode
T1/E1 connections, 460 IP pools, 136
table, 36 NAT, 136
tag VIP, 136
router ospf redistribute, 326 virtual IP, 136
router ospf summary-address, 327 transparent mode, changing, 519
TCP port, session helpers, 508 trap-v1-lport
TCP session synchronization system snmp community, 524
between two standalone FortiGate units, 509 trap-v1-rport
filters, 510 system snmp community, 524
tcp-halfclose-timer trap-v1-status
system global, 430 system snmp community, 525
tcp-option trap-v2c-lport
system global, 430 system snmp community, 525
tcp-portrange trap-v2c-rport
firewall service custom, 175 system snmp community, 525
technical support, 18 trap-v2c-status
Telnet, 31, 32, 33, 35 system snmp community, 525
telnet, execute, 742 troubleshooting
Temporal Key Integrity Protocol (TKIP), 461 memory low, 307
time trusthost1, trusthost2, trusthost3
execute, 743 system admin, 387
system autoupdate schedule, 400 ttl
time synchronization, 430 execute ping-options, 724
time zone, 430 ttl-threshold
router multicast interface, 309
VDOM W
dynamic resource limits, 506
management, 385 web
static resource limits, 506 log filter, 238
vdom, 428 web browser support, 430
configure VDOMs, 62 Web Cache Communication Protocol (WCCP), 537
system admin, 388 Web Cache Control Protocol (WCCP), 461
system ha, 442 web filter
system interface, 460 character set, 147
vdom-link web filtering, blocked pages, 486
system, 533 web-content
version log filter, 238
IGMP, 310 webfilter, 659
router multicast interface igmp, 310 web-filter-activex
router rip, 342 log filter, 238
system cmdb status, 802 web-filter-applet
view-settings log filter, 238
execute ping-options, 724 webfilter-cache
violation system fortiguard, 420
log filter, 238 webfilter-cache-ttl
VIP system fortiguard, 420
transparent mode, 136 web-filter-cookie
vip log filter, 238
firewall, 189 webfilter-status
vip group, grouping vip, vipgrp, 206 system fortiguard, 420
VIP range, 431 webfilter-timeout
vip-arp-range system fortiguard, 420
system global, 431 weblists
virtual access point (VAP), 460 execute ha synchronize, 708
virtual clustering, 435 webtrends filter
Virtual Domain (VDOM), 749 log, 235, 244, 245, 251
Virtual IP webtrends setting
transparent mode, 136 log, 254
virtual IP, 189 weight
NAT, 189 router bgp neighbor, 296
PAT, 189 system ha, 442
port address translation, 189 WEP key, 461
virtual-links where
router info ospf, 787 spamfilter bword, 367
virus wifi-acl
log filter, 238 system interface, 461
VLAN wifi-broadcast_ssid
collision domain, 454 system interface, 461
vlanforward wifi-fragment_threshold
system interface, 461 system interface, 461
vlanid wifi-key
system interface, 461 system interface, 461
vpn, 569 wifi-mac-filter
vpn certificate ca system interface, 461
execute, 751 wifi-passphrase
vpn certificate crl system interface, 462
execute, 753 wifi-radius-server
vpn certificate local, execute, 754 system interface, 462
VPN configuration, 383 wifi-rts_threshold
vpn sslvpn del-tunnel, execute, 759 system interface, 462
vpngrp wifi-security
access group for system accprofile, 383 system interface, 462
system accprofile, 383 wifi-ssid
vpntunnel system interface, 462
firewall policy, 135 wild cards, 38
wildcard X
router access-list, 277
system admin, 388 xauthtype
wildcard pattern matching, 50 vpn ipsec phase1, 591
Windows Active Directory vpn ipsec phase1-interface, 601
refresh user group info via FSAE, 705
Windows Internet Name Service (WINS), 457 Y
wins-ip yahoo
system interface, 461 imp2p old-version, 215
wins-server imp2p policy, 216
system dhcp server, 411 yahoo-user
wireless interface access control, 461 imp2p, 217
wireless settings
system, 540 Z
wireless, synchronize, 540, 683
word boundary zone, system, 542
Perl regular expressions, 50