A guide for the Fortinet CLI commands, grouped by categories for easy referencing.
admin / no password
- Default login.
192.168.1.99
- Default mgmt webinterface IP on port1 (Software Switch port1-portX), or
management port.
Baud rate:
9600 (transmission speed of 9600 bits per second)Data bits:
8 (each packet of data contains 8 bits)Parity:
N (No parity, meaning no parity bit is used for error checking)
Stop bits:
1 (one stop bit signals the end of a data packet)Hardware flow control:
Disabled (no RTS/CTS control)Baud rate:
115200 (transmission speed of 115200 bits per second)Data bits:
8 (each packet of data contains 8 bits)Parity:
N (No parity)Stop bits:
1 (one stop bit)Hardware flow control:
Disabled (no RTS/CTS control)
set, unset, append, unselect
- Configuration commands.
set
- Assigns a value to a configuration parameter. Used to specify settings across
the device.unset
- Reverts a configuration parameter to its default value, removing specific
settings.append
- Adds a value to a multi-value parameter without overwriting existing
entries.unselect
- Deselects an item from a selection within the configuration, often used
in multi-select scenarios.<command> ?
or tab - Use ? or tab in CLI for help.
<command> | grep [-f]
- Grep command to filter outputs.
diagnose debug cli 7
- Shows webGUI changes in CLI.
get system status
- General system information.
execute tac report
- Generates report for support.
get system performance status
- General performance infos.
diagnose system top [sec] [number] Control + C to stop command
- Process list,
Sort
with P (CPU) / M (Memory).
diagnose debug crashlog read
- Crash log.
execute factoryreset
- Reset whole configuration.
execute factoryreset-shutdown
- Reset config and shutdown.
execute factoryreset2
- Reset with retaining admin, interfaces
and static routing.
execute factoryreset keepvmlicense
- Reset whole config but
retain VM license.
diagnose ip address list
- List of IPs on FGT interfaces.
diagnose firewall iplist list
- List of IPs on VIP.
diagnose firewall ippool list
- List of IP on pools.
diagnose netlink interface list
- List IF with MTU & device ID.
get hardware nic <interface>
- Interface Information.
diagnose ip arp list / get system arp
- ARP table.
execute clear system arp table
- Clears ARP table.
execute ping x.x.x.x
execute ping-options <option>
- Ping utility.
execute traceroute x.x.x.x
execute traceroute-options <option>
- Traceroute utility.
execute telnet x.x.x.x <port>
execute telnet-options <option>
- Telnet utility.
diagnose traffictest server-intf
diagnose traffictest client-intf
diagnose traffictest port [port]
diagnose traffictest run -c [iperf_server_ip]
- Iperf
test directly run from FortiGate.
ref: Basic site-to-site VPN with pre-shared key
HA Generalexecute ha manage [index] [admin]
- Jump to cluster member.
get system ha status
- Information about HA status.
diagnose system ha history read
- Details about past HA events.
diagnose system ha dump-by vcluster
- Show cluster member uptime.
diagnose system ha reset-uptime
- Reset cluster member uptime.
diagnose debug appl hatalk -1
diagnose debug appl hasync -1
- Debugging of HA-Talk/-Sync
protocol.
execute ha ignore-hardware-revision status / enable / disable
-
Set ignore
status
for different HW revisions.
execute ha failover status
- View failover status.
execute ha failover set <cluster_id>
- Device stays in
failover state
regardless of condition. Triggers a HA failover on master device.
diagnose sys ha checksum cluster
- Show config checksums of all
cluster members.
diagnose sys ha checksum show [vdom]
- Detailed config checksum
for a VDOM.
diagnose sys ha checksum recalculate
- Recalculation of config
checksums when Master and Slave are out of sync.
FortiOS allows setting thresholds to control system responses to memory usage levels:
Behavior under conserve mode is adjustable:
antivirus failopen
command, it determines how the antivirus proxy operates in conserve mode, with options
to pass, off, or one-shot.IPS failopen
command,
controlling the IPS engine's behavior towards new sessions requiring flow-based
inspection.
FortiOS generates logs and SNMP traps in conserve mode, with tools to view current memory
conservation status and check via CLI diagnose hardware sysinfo conserve
.
FGT01 # diagnose hardware sysinfo conserve memory conserve mode: off total RAM: 2043 MB memory used: 666 MB 32% of total RAM memory freeable: 317 MB 15% of total RAM memory used + freeable threshold extreme: 1940 MB 95% of total RAM memory used threshold red: 1797 MB 88% of total RAM memory used threshold green: 1675 MB 82% of total RAMSecurity Fabric
diagnose system csf upstream / downstream
- List of up/downstream
devices.
diagnose system csf neighbor list
- MAC/IP list of connected FGT
devices.
diagnose test appl csfd 1
- Display security fabric statistics.
diagnose debug appl csfd -1
- Real-time debugger.
diagnose automation test <stitch_name>
- Test stitches in
the CLI.
diagnose endpoint record list
- Endpoint records on FortiGate.
diagnose report-runner trigger security-rating-reports
-
Manually run security
rating reports.
diagnose system modem detect
- Detect attached modem.
diagnose debug appl modemd 3
- Debugger for modem commands.
diagnose debug config-error-log read
- Show config errors after
firmware
upgrades.
sudo global/ vdom-name diagnose / execute / show / get
-
Sudo-command to access
global
/ VDOM settings directly.
diagnose netlink brctl name host <name>
- Bridge MAC
table.
execute config-transaction start/abort/commit
-
Start/abort/commit of Workspace
Mode.
diagnose system config-transaction status
- State of Workspace Mode
(enabled/disabled).
diagnose system config-transaction show txn-info
- Shows all active
Workspace
Modes.
diagnose system config-transaction show txn-cli-commands
- Pending
CLI commands of
Workspace Mode.
diagnose endpoint fctems test connectivity <EMS name>
-
Verify FortiGate
to
FortiClient EMS connectivity.
diagnose test app fcnacd 2
- Dump the EMS connectivity
information.
diagnose debug application fcnacd -1 diagnose debug enable
- Run
real-time FortiClient
NAC
daemon debugs.
diagnose endpoint record list <ip>
- Show endpoint record
list, filter by
the
endpoint IP address.
diagnose wad dev query-by ipv4 <ip>
- Query from WAD
diagnose command IP
address.
diagnose firewall dynamic list
- List EMS ZTNA tags and all
dynamic IP and MAC
addresses.
executeute fctems verify <EMS name>
- Verify the
FortiClient EMS
certificate.
diagnose debug appl [appl] [level]
- Realtime debugger for different
applications.
diagnose debug application dnsproxy
- Useful for diagnosing DNS proxy issues and
ensuring proper DNS operations.
diagnose debug application sslvpn
- Critical for troubleshooting SSL-VPN
connection
problems.
diagnose debug application dhcp
- Helps in diagnosing DHCP server or client
issues
within the network.
diagnose debug application ike
- Essential for debugging VPN IKE phase
negotiations,
crucial for VPN tunnel establishment.
diagnose debug application ipsengine
- Debugs IPS sensor operations, key for
intrusion
prevention efforts.
diagnose debug application httpsd
- Crucial for diagnosing issues with the HTTPS
daemon, impacting web management access.
diagnose debug application sshd
- Essential for troubleshooting SSH daemon
issues,
affecting remote management.
diagnose debug application radiusd
- Helps in diagnosing RADIUS authentication
issues,
crucial for network access control.
diagnose debug application ntpd
- Diagnoses NTP daemon for time synchronization
issues,
crucial for log accuracy and scheduling.
FortiGate devices offer extensive diagnostic capabilities through the
diagnose debug application
command, allowing detailed debugging of various
system processes and daemons. Below is a comprehensive list of applications that can be
debugged, ranging from network services to security daemons and system management processes.
To debug a specific application, use the syntax:
diagnose debug application <app_name> -1
, where
<app_name>
is the name of the daemon or process you wish to debug, and
-1
sets the debug level to the most verbose output. Remember to enable
debugging with diagnose debug enable
before starting and to disable it
afterwards to conserve system resources.
When using the diagnose debug application
command on FortiGate devices,
different debug levels can be specified to control the verbosity of the output. Here's a
list of these levels and their typical use cases:
To set a debug level, use the syntax:
diagnose debug application <app_name> <level>
, where
<app_name>
is the name of the process or daemon you wish to debug, and
<level>
is the desired verbosity level. Remember to enable system-wide
debugging with diagnose debug enable
before setting application-specific debug
levels, and to disable it with diagnose debug disable
when you're finished to
conserve system resources and avoid unnecessary logging.
To debug SMTP proxy: diagnose debug application smtp -1
To investigate issues with the IKE daemon: diagnose debug application ike -1
For debugging the SSL-VPN process: diagnose debug application sslvpn -1
diagnose test appl [appl] [test_level]
- Monitor proxy operations.
diagnose debug console timestamp enable
- Enables timestamp in console.
diagnose debug [enable/disable]
- Enables/disables output for "diagnose debug"
command.
diagnose debug reset
- Reset debug levels.
diagnose debug application smtp
- Debug SMTP proxy for email
services.
diagnose debug application pop3
- Troubleshoot POP3 proxy for
email
retrieval.
diagnose debug application imap
- Analyze IMAP proxy for email
operations.
diagnose debug application nntp
- Examine NNTP proxy for Usenet
news.
diagnose debug application proxy
- General proxy debugging for
web
traffic.
diagnose debug application radvd
- Router advertisement daemon
for IPv6.
diagnose debug application miglogd
- Log daemon for system
logging.
diagnose debug application kmiglogd
- Kernel log daemon for
deeper
system events.
diagnose debug application forticldd
- FortiCloud daemon for
cloud
integration.
diagnose debug application alertmail
- Alert mail daemon for
email
notifications.
diagnose debug application ppp
- PPP daemon for point-to-point
protocol
networks.
diagnose debug application l2tp
- L2TP daemon for VPN
connections.
diagnose debug application pptp
- PPTP daemon for VPN services.
diagnose debug application pptpc
- PPTP client for client VPN
connections.
diagnose debug application authd
- Authentication daemon for
user
verification.
diagnose debug application foauthd
- FortiGuard Override
authentication
daemon.
diagnose debug application fcnacd
- FortiClient NAC daemon for
network
access control.
diagnose debug application fcld
- Fclicense daemon for licensing
operations.
diagnose debug application fssod
- FSSO daemon for single
sign-on.
diagnose debug application clearpass
- ClearPass daemon for
network
access control.
diagnose debug application dhcps
- DHCP server for dynamic host
configuration.
diagnose debug application dhcp6s
- DHCPv6 server for IPv6
dynamic
configuration.
diagnose debug application update
- Update daemon for system
updates.
diagnose debug application vpd
- VPN policy daemon for VPN
policies.
diagnose debug application fnbamd
- Non-blocking auth daemon for
authentication.
diagnose debug application eap_proxy
- EAP proxy for external
authentication protocol support.
diagnose debug application ipsmonitor
- IPS monitor for
intrusion
prevention system logs.
diagnose debug application ipsengine
- IPS engine for real-time
intrusion prevention.
diagnose debug application urlfilter
- URL filter daemon for web
filtering.
diagnose debug application wf_monitor
- Web filtering monitor,
parent of
URL filter daemon.
diagnose debug application ddnscd
- Dynamic DNS client for DNS
updates.
diagnose debug application dhcprelay
- DHCP relay for forwarding
DHCP
requests.
diagnose debug application dhcp6r
- DHCPv6 relay for IPv6 DHCP
requests
forwarding.
diagnose debug application snmpd
- SNMP daemon for Simple
Network
Management Protocol.
diagnose debug application chassis
- Chassis daemon for hardware
status
on chassis-based models.
diagnose debug application ipmc
- IP multicast sensor daemon for
multicast monitoring.
diagnose debug application wpad
- Wired and wireless access
daemon for
network access control.
diagnose debug application wpad-crash-hexdump
- Diagnostic tool
for WPAD
crashes.
diagnose debug application wpa-show-keys
- Displays keys in WPAD
or WPAS
logs for troubleshooting.
diagnose debug application wpa-timestamp
- Adds timestamps in
WPAD or
WPAS logs for event tracking.
diagnose debug application wifi
- WiFi settings and operations
debugging.
diagnose debug application dnp
- DNP3 proxy daemon for
industrial
protocol operations.
diagnose debug application dnsproxy
- DNS proxy module for DNS
requests
handling.
diagnose debug application sflowd
- sFlow protocol module for
traffic
sampling.
diagnose debug application hatalk
- High Availability protocol
module
for HA operations.
diagnose debug application hasync
- HA synchronization for
config sync
in HA setups.
diagnose debug application harelay
- HA relay for packet relay
in HA
configurations.
diagnose debug application hamonitord
- HA monitor module for HA
health
checks.
diagnose debug application quarantine
- Quarantine daemon for
isolating
suspect hosts.
diagnose debug application dhcpc
- DHCP client module for
obtaining IP
configuration.
diagnose debug application zebos-launcher
- ZebOS launcher
daemon for
routing operations.
diagnose debug application zebos
- ZebOS for advanced routing
and
switching protocols.
diagnose debug application modemd
- MODEM daemon for external
modem
management.
diagnose debug application radiusd
- RADIUS daemon for RADIUS
authentication operations.
diagnose debug application sshd
- SSH daemon for secure shell
access
troubleshooting.
diagnose debug application sslvpn
- SSL-VPN proxy daemon for SSL
VPN
troubleshooting.
diagnose debug application sessionsync
- Session sync daemon for
session
synchronization in HA.
diagnose debug application l2tpcd
- L2TP client daemon for L2TP
VPN
client operations.
diagnose debug application ipldbd
- IP blacklist daemon for
managing
IP-based block lists.
diagnose debug application crl-update
- Certificate Revocation
List
update operations.
diagnose debug application cert-update
- Certificate update
operations
for managing digital certificates.
diagnose debug application alarmd
- Alarm daemon for managing
system
alarms and notifications.
diagnose debug application forticron
- FortiCron daemon for
scheduled
operations.
diagnose debug application uploadd
- Upload daemon for managing
file
uploads.
diagnose debug application smbcd
- SMB client daemon for
SMB/CIFS
operations.
diagnose debug application samld
- SAML SSO daemon for
SAML-based single
sign-on operations.
diagnose debug application acd
- Aggregate Controller for
managing
aggregated interfaces.
diagnose debug application alicloud-sdn
- AliCloud SDN
controller for
Alibaba Cloud integration.
diagnose debug application alicloud-ha
- AliCloud HA controller
for
Alibaba Cloud High Availability.
diagnose debug application sip
- SIP ALG for Voice over IP
Session
Initiation Protocol traffic.
diagnose debug application sccp
- SCCP ALG for Skinny Client
Control
Protocol VoIP traffic.
diagnose debug application ike
- IKE daemon for Internet Key
Exchange in
VPN connections.
diagnose debug application fgfmd
- FortiGate/FortiManager
communication
daemon for device management.
diagnose debug application wccpd
- WCCP daemon for Web Cache
Communication Protocol.
diagnose debug application garpd
- VIP gratuitous ARP daemon for
managing ARP for Virtual IPs.
diagnose debug application scep
- SCEP for Simple Certificate
Enrollment
Protocol operations.
diagnose debug application ipsufd
- IPS URL filter resolver
daemon for
dynamic URL filtering in IPS.
diagnose debug application cw_acd
- Capwap AC daemon for
wireless
controller functions.
diagnose debug application cw_acd_helper
- Capwap AC helper
daemon for
supporting AC operations.
diagnose debug application cw_acd_wpad
- CAPWAP AC and WPA
daemon for
Wi-Fi Protected Access.
diagnose debug application cw_acd_wlev
- CAPWAP AC daemon
wireless event
notification for Wi-Fi events.
diagnose debug application cu_acd
- Caputp AC daemon for CAPWAP
tunneling protocol AC operations.
diagnose debug application fortilinkd
- FortiLink daemon for
managing
FortiLink interfaces.
diagnose debug application flcfgd
- FortiLink configuration
daemon for
FortiLink setup and config.
diagnose debug application flpold
- FortiLink policy daemon for
policy
management over FortiLink.
diagnose debug application syslogd
- syslog daemon for system
logging to
a syslog server.
diagnose debug application locallogd
- Local logging daemon for
managing
local device logs.
diagnose debug application fgtlogd
- FortiGate logging daemon
for
centralized log management.
diagnose debug application vrrpd
- VRRP daemon for Virtual
Router
Redundancy Protocol.
diagnose debug application fgd_alert
- FortiGuard alert daemon
for
FortiGuard service alerts.
diagnose debug application ntpd
- NTP daemon for network time
protocol
synchronization.
diagnose debug application fsd
- Forti-sandbox daemon for
sandboxing
operations.
diagnose debug application dlpfingerprint
- DLP fingerprint
daemon for
data loss prevention fingerprinting.
diagnose debug application nodejs
- Node.js daemon for
JavaScript
runtime for network applications.
diagnose debug application httpsd
- HTTPS daemon for secure web
server
functionality.
diagnose debug application stp
- Spanning Tree Protocol daemon
for
network loop prevention.
diagnose debug application spareblock
- Manages spare block
count for
storage operations.
diagnose debug application lted
- USB LTE daemon for USB modem
management.
diagnose debug application lldptx
- Link Layer Discovery
Protocol
Transmitter for network discovery.
diagnose debug application tvc
- SSL-VPN client for tunneling
VPN client
operations.
diagnose debug application wiredap
- Wired AP daemon for 802.1X
port-based network access control.
diagnose debug application dhcp6c
- DHCPv6 client for IPv6
dynamic host
configuration.
diagnose debug application server-probe
- Server probe daemon
for
monitoring server health.
diagnose debug application link-monitor
- Link monitor daemon
for
checking link status and performance.
diagnose debug application link-monitor-passive
- Passive link
monitor
for less intrusive link checking.
diagnose debug application pppoed
- PPPoE client Daemon for PPP
over
Ethernet client operations.
diagnose debug application ovrd
- Override daemon for managing
manual
override operations.
diagnose debug application iotd
- IoT device info daemon for
Internet of
Things device management.
diagnose debug application extenderd
- Extender Wan daemon for
WAN
extender operations.
diagnose debug application awsd
- Amazon Web Services daemon for
AWS
cloud integration.
diagnose debug application netxd
- NetX REST API daemon for
API-based
network operations.
diagnose debug application gcpd
- Google Cloud Platform daemon
for GCP
integration.
diagnose debug application azd
- Microsoft Azure daemon for
Azure cloud
integration.
diagnose debug application ocid
- Oracle Cloud Infrastructure
daemon for
OCI integration.
diagnose debug application openstackd
- OpenStack SDN connector
daemon
for OpenStack integration.
diagnose debug application kubed
- Kubernetes daemon for
Kubernetes
container orchestration.
diagnose debug application vmwd
- VMware vSphere daemon for
VMware
integration.
diagnose debug application init
- System init process for
initial system
startup and configuration.
diagnose debug application mrd
- Mobile router daemon for mobile
routing
functionality.
diagnose debug application radius-das
- RADIUS DAS daemon for
Dynamic
Authorization Extensions.
diagnose debug application csfd
- Security Fabric daemon for
Fortinet
Security Fabric operations.
diagnose debug application fsvrd
- FortiService daemon for
FortiGuard
service operations.
diagnose debug application sdwan
- SD-WAN daemon for
software-defined
wide area network management.
diagnose debug application route-tag
- Route tag daemon for
managing
routing tags.
diagnose debug application ftm-push
- FTM-Push daemon for
FortiToken
Mobile push services.
diagnose debug application npd
- NP daemon for network processor
operations.
diagnose debug application cmp
- CMPv2 for Certificate
Management
Protocol operations.
diagnose debug application sdncd
- SDN Connector daemon for
software-defined networking in a wide area network.
diagnose debug application ptpd
- Precision Time Protocol daemon
for
accurate time synchronization.
diagnose debug application autod
- Automation daemon for
automated
system tasks and operations.
diagnose debug application bfdd
- BFD daemon for Bidirectional
Forwarding Detection.
diagnose debug application evpnd
- EVPN daemon for Ethernet VPN
operations.
diagnose debug application fsso_ldap
- FSSO LDAP daemon for
LDAP-based
single sign-on.
diagnose debug application sepmd
- Symantec EPM daemon for
Symantec
Endpoint Protection integration.
diagnose debug application acid
- Cisco ACI daemon for direct
connection
to Cisco Application Centric Infrastructure.
diagnose debug application ipamd
- IP Address Management daemon
for IP
address management operations.
diagnose debug application ibmd
- IBM Cloud Infrastructure
daemon for
IBM cloud integration.
diagnose debug application vned
- Virtual network enabler daemon
for
virtual network operations.
diagnose debug application sfupgraded
- Security Fabric Upgrade
daemon
for Security Fabric upgrades.
diagnose debug application ikecrypt
- Multi-process IKE crypto
daemon
for IKE encryption processes.
diagnose debug application fds_notify
- Update notification
daemon for
FortiGuard service updates.
diagnose debug application ntnxd
- Nutanix Prism Central daemon
for
Nutanix integration.
diagnose debug application sapd
- SAP Control daemon for SAP
application
control.
diagnose debug application speedtest
- Speed test execution
daemon for
network speed tests.
diagnose debug application speedtestd
- Speed test server daemon
for
hosting speed tests.
diagnose debug application ipamsd
- IPAM server daemon for IP
address
management server operations.
diagnose debug application eap_supp
- EAP supplicant daemon for
EAP
authentication.
diagnose debug application lpmd
- LPM daemon for Longest Prefix
Match
routing.
diagnose debug application pcpd
- PCP server daemon
ref: Basic site-to-site VPN with pre-shared key
IPsec VPNdiagnose debug appl ike 63
- Debugging of IKE negotiation.
diagnose vpn ike log filter …
- Filter for IKE negotiation
output.
diagnose vpn ike gateway list
- Phase 1 state.
diagnose vpn ike gateway flush
- Delete Phase 1.
diagnose vpn tunnel list
- Phase 2 state.
diagnose vpn tunnel flush
- Delete Phase 2.
get vpn ike gateway
- Detailed gateway information.
get vpn ipsec tunnel details
- Detailed tunnel information.
get vpn ipsec stats tunnel
- Detailed tunnel statistics.
diagnose vpn ipsec status
- Shows IPSEC crypto status.
# diagnose vpn ike gateway vd: root/0 name: to_HQ2 version: 1 interface: port1 11 addr: 172.16.200.1:500 -> 172.16.202.1:500 created: 5s ago IKE SA: created 1/1 established 1/1 time 0/0/0 ms IPsec SA: created 2/2 established 2/2 time 0/0/0 ms id/spi: 12 6e8d0532e7fe8d84/3694ac323138a024 direction: responder status: established 5-5s ago = 0ms proposal: aes128-sha256 key: b3efb46d0d385aff-7bb9ee241362ee8d lifetime/rekey: 86400/86124 DPD sent/recv: 00000000/00000000 # diagnose vpn tunnel list list all ipsec tunnel in vd 0 name=to_HQ2 ver=1 serial=1 172.16.200.1:0->172.16.202.1:0 tun_id=172.16.202.1 bound_if=11 lgwy=static/1 tun=intf/0 mode=auto/1 encap=none/528 options[0210]=create_dev frag-rfcaccept_traffic=1 proxyid_num=1 child_num=0 refcnt=11 ilast=7 olast=87 ad=/0 stat: rxp=0 txp=0 rxb=0 txb=0 dpd: mode=on-demand on=1 idle=20000ms retry=3 count=0 seqno=0 natt: mode=none draft=0 interval=0 remote_port=0 proxyid=to_HQ2 proto=0 sa=1 ref=2 serial=1 auto-negotiate src: 0:0.0.0.0/0.0.0.0:0 dst: 0:0.0.0.0/0.0.0.0:0 SA: ref=3 options=18227 type=00 soft=0 mtu=1438 expire=42927/0B replaywin=2048 seqno=1 esn=0 replaywin_lastseq=00000000 itn=0 life: type=01 bytes=0/0 timeout=42930/43200 dec: spi=ef9ca700 esp=aes key=16 a2c6584bf654d4f956497b3436f1cfc7 ah=sha1 key=20 82c5e734bce81e6f18418328e2a11aeb7baa021b enc: spi=791e898e esp=aes key=16 0dbb4588ba2665c6962491e85a4a8d5a ah=sha1 key=20 2054b318d2568a8b12119120f20ecac97ab730b3 dec:pkts/bytes=0/0, enc:pkts/bytes=0/0FortiGate S2S IPsec VPN Diagnostic Overview
Running diagnostic commands on a FortiGate device provides crucial data about IPsec VPN tunnels. This example details the output from commands run on a device named HQ1 for a tunnel to HQ2.
Diagnostic Command: diagnose vpn ike gateway listThis command provides information about IKE gateways. For the gateway named "to_HQ2" in the virtual domain "root" (ID 0), we observe the following:
Running this command on HQ1 provides a list of all IPsec tunnels in virtual domain 0. For the tunnel "to_HQ2", the details are as follows:
This diagnostic output meticulously details the setup, status, and security settings of the IPsec VPN tunnel "to_HQ2", enabling comprehensive insight for effective management and troubleshooting.
ref: Troubleshooting Tip: Using the FortiOS built-in packet sniffer for capturing packets
ref: Troubleshooting Tip: Enable Policy Trace in Debug Flow
The packet sniffer 'sits' in the FortiGate and can display the traffic on a specific interface or on all interfaces.
The diagnose sniffer packet
command supports a variety of filter
options to help
narrow down the packet capture to exactly what you're interested in. Below
are some of the
key filtering options:
diagnose sniffer packet <interface> '<filter>' <verbose> <count> a
These filter options can be combined using logical operators like
and
,
or
, and not
to create more complex filters. This
allows for highly
specific and targeted packet captures for troubleshooting and analysis.
There are three different levels of information, also known as Verbose Levels 1 to 3, where verbose 1 shows less information and verbose 3 shows the most. Verbose Levels 4, 5, and 6 additionally provide the interface details. 6 can be used to convert captured packages with a perl script to a .pcap
Verbose levels in detail:This article walks through some examples to show the different possibilities for debugging with the packet sniffer.
Basic sniffing command components:diagnose sniffer packet any 'host x.x.x.x'
- Captures all packets from or to IP address x.x.x.x.
GUI: Network > Diagnostics > Packet Capture - Packet Capture in WebUI.
diagnose sniffer packet any 'net x.x.x.x/24'
- Captures all packets within the x.x.x.x/24 subnet.
diagnose sniffer packet any 'tcp'
- Captures all TCP packets regardless of source or destination.
diagnose sniffer packet any 'tcp port xx'
- Captures all packets for TCP port xx.
diagnose sniffer packet any 'udp'
- Captures all UDP packets regardless of source or destination.
diagnose sniffer packet any 'udp port xx'
- Captures all packets for UDP port xx.
diagnose sniffer packet any 'icmp'
- Captures all ICMP packets (used for ping).
diagnose sniffer packet any 'host x.x.x.x and host y.y.y.y'
- Captures all traffic between IP addresses x.x.x.x and y.y.y.y.
diagnose sniffer packet any 'not icmp'
- Captures all packets except ICMP.
diagnose sniffer packet any 'src x.x.x.x and tcp port xx'
- Captures all packets from source IP x.x.x.x to TCP port xx.
diagnose sniffer packet any 'dst host y.y.y.y'
- Captures all packets destined for IP address y.y.y.y, regardless of the
source.
diagnose sniffer packet any 'src host x.x.x.x and dst host y.y.y.y'
- Captures all packets originating from IP address x.x.x.x and destined for
IP address
y.y.y.y.
Flow trace commands allow for detailed inspection of how packets are processed within the FortiGate, offering insights into traffic handling and routing decisions.
Setting up a Flow Tracediagnose debug enable
- Crucial for initiating detailed flow
analysis, enabling execution debugging offers deep insight into packet
processing.
diagnose debug flow filter <filter>
- Apply filters to pinpoint trace
outcomes. Utilize source IP (saddr), destination IP (daddr), port, among others, to refine
results.
diagnose debug flow show iprop en
- Activates IP routing info display for packet
tracing, essential for understanding packet paths.
diagnose debug flow show func en
- Shows function names in packet processing,
aiding in pinpointing processing stages.
diagnose debug flow trace start [count]
- Begins tracing for a defined packet
count, offering real-time flow insights.
GUI: Network > Diagnostics > Debug Flow - Leverage WebUI for a more intuitive flow trace experience, featuring visual aids.
Examples:diagnose debug flow filter addr x.x.x.x
- Isolates traffic to/from a specific
IP, simplifying flow analysis.
diagnose debug flow filter net x.x.x.x/24
- Focuses on a subnet's traffic,
useful for network segment troubleshooting.
diagnose debug flow filter port xx
- Narrows down traffic by TCP/UDP port,
facilitating service-level inspection.
diagnose debug flow filter protocol tcp|udp|icmp
- Filters by protocol type,
crucial for protocol-specific debugging.
Advanced Filtering: Combine conditions like source IP and destination port for tailored
analysis. Example:
diagnose debug flow filter saddr x.x.x.x daddr y.y.y.y port xx
for targeted
tracing.
Understanding and managing firewall sessions are critical for diagnosing network issues and ensuring optimal performance of your FortiGate firewall.
Key Commands for Session Managementdiagnose system session filter
- Sets a filter for session listing,
allowing for
targeted troubleshooting. Filters can be applied based on source or
destination IP, ports,
and more.
To use the command, you specify one or more filter criteria, which then apply to subsequent session list or clear commands. For example, to filter by source IP, you would use:
diagnose system session filter src x.x.x.x
This sets the session filter to only include sessions with the specified source IP address. You can clear the filter with:
diagnose system session filter clear
Using these filters effectively can greatly simplify the process of diagnosing and resolving network flow issues through your FortiGate device.
diagnose system session list
- Displays a list of all current
sessions that match
the filter criteria. Adding "expect" shows only sessions that are expected
based on the
filter, helping in isolating specific flows.
diagnose system session clear
- Clears all current sessions or
those matching a
previously set filter. Useful for resetting session states during
troubleshooting or after
configuration changes.
diagnose system session stat
- Provides statistics about sessions
and memory usage,
including dropped sessions and clashes. This command offers insights into
the health and
performance of the firewall's session handling capabilities.
diagnose firewall iprope clear 100004 [<id>]
- Resets
counters for
specific firewall policy IDs or all policies if no ID is specified. This can
be helpful in
monitoring the effects of policy changes or in resetting counters for
troubleshooting or for
hardening firewall policies by removing the unsued onces and purposes.
These commands are powerful tools for diagnosing and troubleshooting issues related to firewall sessions, offering insights into how sessions are initiated, processed, and terminated through the FortiGate device.
execute wireless-controller restart-acd
- Restart wireless
controller daemon.
execute wireless-controller reset-wtp
- Restart FortiAPs.
diagnose wireless-controller wlac -c ap-rogue
- List rogue APs.
execute wireless-controller spectral-scan <wtp-id> <radio-id> <on | off> <duration> <channel> <report-interval>
- Start or stop spectrum analysis.
diagnose wireless-controller wlac -c rf-sa <wtp-id> <radio-id> <channel>
get wireless-controller spectral-info <wtp-id> <radio-id>
- Show
spectrum analysis results.
diagnose switch-controller switch-info mac-table
- Managed
FortiSwitch MAC
address
list.
diagnose switch-controller switch-info port-stats
- Managed
FortiSwitch port
statistics.
diagnose switch-controller switch-info trunk
- Trunk
information.
diagnose switch-controller switch-info mclag
- Dumps MCLAG
related information
from
FortiSwitch.
execute switch-controller get-conn-status
- Get FortiSwitch
connection status.
execute switch-controller diagnose-connection <switch>
-
Get FortiSwitch
connection diagnostics.
get extender sys-info <ext-sn>
- Check the FortiExtender
status.
get extender modem-status <ext-sn>
- Get the detailed
modem status of the
FortiExtender.
diagnose debug appl extenderd -1
- FortiExtender debugging,
collect information
for
about 5 minutes.
execute extender reset-fortiextender
- Restart managed
FortiExtender.
execute extender restart-fortiextender-daemon
- Restart
FortiExtender daemon.
ref: Technical Tip: How to identify Inactive Routes in the Routing Table
General Routing Troubleshootingget router info routing-table all
- Routing table.
# get router info routing-table all Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area V - BGP VPNv4 * - candidate default
get router info routing-table details x.x.x.x
- Shows Routing
decision for
specified Destination-IP.
get router info routing-table database
- Routing table with
inactive routes.
get router info kernel
- Forwarding information base.
diagnose firewall proute list
- List of policy-based routes.
diagnose ip rtcache list
- List of route cache.
get router info protocols
- Overview of dynamic routing protocol
configuration.
execute router restart
- Restart of routing process.
diagnose system link-monitor status/interface/launch
- Shows link
monitor status /
per
interface / for WAN LLB.
get router info bgp summary
- BGP summary of BGP status.
get router info bgp neighbors
- Information on BGP neighbors.
diagnose ip router bgp all enable
diagnose ip router bgp level info
- Real-time debugging for BGP
protocol.
execute router clear bgp all
- Restart of BGP session.
get router info ospf status
- OSPF status.
get router info ospf interface
- Information on OSPF interfaces.
get router info ospf neighbor
- Information on OSPF neighbors.
get router info ospf database brief / router lsa
- Summary /
Details of all LSDB
entries.
get router info ospf database self-originate
- Information on
LSAs originating
from FortiGate.
diagnose ip router ospf all enable
diagnose ip router ospf level info
- Real-time debugging of OSPF
protocol.
execute router clear ospf process
- Restart of OSPF session.
diagnose system sdwan member
- Provide Interface details.
diagnose system sdwan health-check status | filter <name/member>
- State of SLAs.
diagnose system sdwan service <rule-id>
- SD-WAN-Rule-State.
diagnose system sdwan intf-sla-log <intf-name>
- Link Traffic
History.
diagnose system sdwan sla-log <sla> <link_id>
- SLA-Log
on specific
interface.
diagnose test appl lnkmtd 0/1/2
- Statistics of link-monitor.
diagnose debug appl link-mon -1
- Real-time debugger of
link-monitor.
Imagine you have a big fortress (FortiGate) guarding your home (network). Inside your home, you have two doors leading outside, one in the front (WAN1) and one in the back (WAN2). Beyond those doors are two paths (ISP1 and ISP2) leading to different places. Now, let's talk about how your fortress decides which door to use when sending messages (traffic) out.
Imagine both WAN connections are equally good, and they have the same priority. So, if you want to send a message, you can choose either WAN connection. Your fortress will send out messages through both connections equally.
Now, let's say one WAN connection (WAN2) is a bit closer to some places than the other WAN connection (WAN1), but they still have the same priority. Your fortress will prefer the closer WAN connection, even though both connections are equally important.
Imagine both WAN connections are equally close to everywhere, but you've labeled one WAN connection (WAN1) as slightly more important (priority 2) than the other WAN connection (WAN2, priority 5). So, even though both connections are available, your fortress will mostly use the more important WAN connection for messages. The less important one is used only for certain special tasks.
Now, let's switch it around. The less important WAN connection (WAN2, priority 1) is labeled as more important than the other WAN connection (WAN1, priority 2). Your fortress will now mainly use the previously less important WAN connection for
Suppose you have a rule saying that all letters (HTTP traffic) should go out through WAN2, regardless of how important the WAN connections are. So, even if WAN1 is closer or more important, all letters will still go out through WAN2 because of this special rule.
Now, imagine WAN2 is less important, but you still want all letters to go out through it. Your fortress will mostly use the more important WAN1 for messages, but all letters will still go out through the less important WAN2 because of the special rule.
Equal cost multi-pathImagine you have a big fortress (FortiGate) guarding your home (network). Inside your home, you have two doors leading outside, one in the front (WAN1) and one in the back (WAN2). Beyond those doors are two paths (ISP1 and ISP2) leading to the same place. ECMP is like having multiple paths to the same forest, and you want to use them all equally to avoid congestion.
ECMP and SD-WAN are like two different ways of managing traffic. They have similar rules, but they work in slightly different situations.
ECMP | SD-WAN | Description |
---|---|---|
Source IP-Based | Source IP | Traffic is divided equally between the paths (Doors). Sessions that start at the same source IP address use the same path. This is the default selection. |
Weight-Based | Sessions | The workload is distributed based on the number of sessions that are connected through the path (Door). |
Usage-Based | Spillover | The path (Door) is used until the traffic bandwidth exceeds the ingress and egress thresholds that you set for that path. Additional traffic is then sent through the next path (Door). |
Source-Destination IP-Based | Source-Destination IP | Traffic is divided equally between the paths (Doors). Sessions that start at the same source IP address and go to the same destination IP address use the same path. |
Your Fortress can be set to use different ECMP modes. You can do this through the settings. If you're using SD-WAN, it's a bit different but still easy to set up.
Gaining insight into your FortiGate device's hardware is crucial for understanding its capabilities and monitoring its health. Below are commands that provide information on CPU, memory, and hardware acceleration, among others.
diagnose hardware sysinfo cpu
- Retrieves information about
the CPU,
including its type, usage, and performance statistics. For example, you
might see CPU
model, core count, and current utilization percentage.diagnose hardware sysinfo conserve
- Provides details about
the conserve
mode, which is triggered when the system is under resource pressure. It
shows the cause,
such as "Mem" for Memory or "FD" for File Descriptor limitations.diagnose hardware sysinfo memory
- Displays memory size and
utilization,
including total memory, used memory, and available memory. This command
helps in
monitoring the overall memory health of the device.diagnose hardware sysinfo shm
- Shows shared memory (SHM)
size and
utilization, which is important for processes that require inter-process
communication.
diagnose hardware test suite all
- Runs a comprehensive
hardware test,
available only on newer models. This can help identify potential
hardware issues or
failures.get hardware status
- Provides information about ASICs
(Application-Specific Integrated Circuits) and NP (Network Processors),
offering
insights into the hardware acceleration capabilities of the device.get vpn status ssl hw-acceleration-status
- Displays the
hardware
acceleration status for SSL VPN, indicating whether SSL VPN traffic is
being accelerated
by dedicated hardware.get hardware nic <interface>
- Shows physical
interface information,
including status, speed, and other physical layer details. Replace
<interface>
with the specific interface name, like "port1".get system interface physical / transceiver
- Retrieves
signal information
for copper or SFP/SFP+ interfaces, useful for diagnosing physical
connectivity issues.
Examples:
diagnose hardware sysinfo cpu
- Retrieves CPU information, such
as type and
usage statistics, essential for assessing the processing capacity and
performance of the
device.
diagnose hardware sysinfo conserve
- Shows details about
Conserve Mode, which
indicates the device is under resource strain, typically due to memory or
file descriptor
limitations. Useful for identifying when and why the device enters a
resource conservation
state.
diagnose hardware sysinfo memory
- Displays memory size and
utilization stats.
This command is crucial for monitoring the device's memory health, showing
total, used, and
available memory.
get vpn status ssl hw-acceleration-status
- Shows the hardware
acceleration
status for SSL VPN, indicating whether SSL encryption and decryption are
being offloaded to
dedicated hardware, thus enhancing VPN performance.
get hardware nic port1
- Provides physical interface information
for "port1",
including status, speed, duplex, and other relevant physical layer details.
This is useful
for troubleshooting connectivity issues or assessing link status.
FortiGate provides several commands for disk operations, allowing administrators to check usage, list disks and partitions, perform disk checks, and format disks or partitions.
Detailed Command Explanationsdiagnose system logdisk usage
- Provides information on log
disk usage. This
command is essential for monitoring the amount of space logs are
consuming on the disk,
helping to manage storage capacity effectively.diagnose hardware deviceinfo disk
- Lists all disks along
with their
partitions. It's useful for getting a detailed overview of the disk
layout and
understanding how storage is allocated on the device.execute disk list
- Similar to the previous command, it
lists the disks and
their partitions. This command is handy for quickly checking disk and
partition
information.execute disk scan [ref_int]
- Initiates a disk check
operation that scans
for and attempts to repair any disk errors. The optional [ref_int]
parameter allows
specifying a particular disk or partition for the scan. This command is
crucial for
maintaining disk integrity and preventing data corruption.execute disk format [ref_int]
- Formats the specified disk
or partition
([ref_int] refers to the disk or partition reference identifier) and
reboots the system.
This operation is used for cleaning a disk or partition, effectively
removing all data
and resetting it to its initial state. Due to the data loss involved, it
should be used
with caution.execute formatlogdisk
- Specifically formats the log disk
and includes a
system reboot. This command is particularly useful when needing to clear
all logs from
the device, such as during troubleshooting or when preparing the device
for a fresh
configuration. As with any format operation, it results in data loss and
should be
performed carefully.These commands are integral to the disk management and maintenance processes within a FortiGate environment. Proper use can help ensure optimal performance, prevent disk space issues, and maintain the integrity of stored data. However, commands that alter disk data, such as format operations, should be used judiciously to avoid unintended data loss.
Hardware Accelerationconfig firewall policy
- Disable session
offloading per firewall policy.
set auto-asic-offload disable
config vpn ipsec phase-1-int
- Disable VPN offloading
per Phase 1.
sset npu-offload disable
cfg –a ADDR_MODE=DHCP|STATIC
- Change IP from DHCP to static on
FortiAP.
cfg –a AP_IPADDR=”xxx.xxx.xxx.xx”
- Set static IP on FortiAP.
cfg –a AP_NETMASK=”255.255.255.0”
- Set subnet mask on FortiAP.
cfg –a IPGW=”yyy.yyy.yyy.yyy”
- Set gateway on FortiAP.
cfg –a AC_IPADDR_1=”zzz.zzz.zzz.zzz”
- Specify IP of Wireless
Controller on
FortiAP.
cfg –s / -c
- List / Save config on FortiAP.
cfg -x
- Reset to factory default.
ref: Technical Tip: How to check the stats for the LTE modem
Description: Most LTE modems come with a preset APN in the SIM card, making it unnecessary to set the APN in FortiOS configuration most of the time. However, if internet access issues occur, consulting the carrier about the APN and configuring it in the LTE modem can be essential.
Solution: To configure the APN in the LTE modem, use the following commands:
config system lte-modem
set status enable
set apn "xxx.xxxxx.xxx"
end
INFO: Also make use to disable the PIN is any set on the SIM card to make life much easier
Commands to Check the LTE-Modem StatsFor Signal Strength
diagnose system lte-modem signal-info
- Retrieves LTE modem signal
information,
providing details like RSSI, ECIO for WCDMA, and RSSI, RSRQ, RSRP, SNR for
LTE, crucial for
diagnosing signal quality and strength.
LTE Modem signal information example:
# diagnose system lte-modem signal-info WCDMA: RSSI: -57 ECIO: 12 LTE: RSSI: -67 RSRQ: -13 RSRP: -98 SNR: 44
For Traffic Status
diagnose system lte-modem traffic-status
- Shows LTE modem traffic
status, including
counts of transmitted and received packets (both OK and error), overflows,
bytes (OK), and
dropped packets. This information is valuable for monitoring the data flow
and identifying
potential transmission issues.
LTE Modem traffic status example:
# diagnose system lte-modem traffic-status TX packets OK: 8513 RX packets OK: 10842 TX packets error: 0 RX packets error: 0 TX overflows: 0 RX overflows: 0 TX bytes OK: 748973 RX bytes OK: 8770104 TX packets dropped: 0 RX packets dropped: 0
Some Other Commands:
diagnose system lte-modem traffic-status
- LTE Modem traffic
status.diagnose system lte-modem modem-details
- LTE Modem detailed
information.diagnose system lte-modem sim-info
- LTE Modem SIM card
information.diagnose system lte-modem signal-info
- LTE Modem signal
information.diagnose system lte-modem data-session-info
- LTE Modem data
session information.
diagnose system lte-modem gps-info
- LTE Modem GPS information.
diagnose system lte-modem data-usage
- LTE Modem data usage.
For detailed hardware troubleshooting steps, including using built-in diagnostics tools, refer to the Fortinet Community guide on RMA Note: Hardware Troubleshooting with Built-in Diagnostics Tools. This guide provides essential information on identifying and addressing hardware issues that may require RMA (Return Merchandise Authorization).
Download Hardware Quick Inspection Package (HQIP) Images to scan hardware for possible faults from the Fortinet support site.