Troubleshooting PDF
Troubleshooting PDF
Introduction........................................................................................................7
Before you begin....................................................................................................... 7
How this guide is organized...................................................................................... 7
Life of a Packet ..................................................................................................8
Stateful inspection .................................................................................................... 8
Connections over connectionless....................................................................... 9
What is a session? .............................................................................................. 9
Differences between connections and sessions ................................................ 9
Flow inspection....................................................................................................... 10
Proxy inspection ..................................................................................................... 11
Comparison of inspection layers ............................................................................ 11
FortiOS functions and security layers..................................................................... 12
Packet flow ............................................................................................................. 12
Packet inspection (Ingress) ............................................................................... 13
Interface ............................................................................................................ 14
DoS sensor ....................................................................................................... 14
IP integrity header checking ............................................................................. 14
IPsec ................................................................................................................. 14
Destination NAT (DNAT).................................................................................... 14
Routing.............................................................................................................. 14
Policy lookup..................................................................................................... 14
Session tracking................................................................................................ 15
User authentication........................................................................................... 15
Management traffic ........................................................................................... 15
SSL VPN traffic ................................................................................................. 15
ICAP traffic........................................................................................................ 15
Session helpers................................................................................................. 15
Flow-based inspection engine .......................................................................... 16
Proxy-based inspection engine ........................................................................ 16
IPsec ................................................................................................................. 16
Source NAT (SNAT)........................................................................................... 16
Routing.............................................................................................................. 16
Egress ............................................................................................................... 16
Example 1: client/server connection....................................................................... 16
Example 2: Routing table update ........................................................................... 18
Example 3: Dialup IPsec VPN with application control .......................................... 19
Verifying FortiGate admin access security ...................................................22
Install the FortiGate unit in a physically secure location......................................... 22
Page 3
Add new administrator accounts............................................................................ 22
Change the admin account name and limit access to this account....................... 23
Only allow administrative access to the external interface when needed .............. 23
When enabling remote access, configure Trusted Hosts and Two-factor Authentica-
tion........................................................................................................................ 24
Configuring Trusted Hosts ................................................................................ 24
Configuring Two-factor Authentication............................................................. 24
Change the default administrative port to a non-standard port ............................. 25
Enable Password Policy ......................................................................................... 25
Maintain short login timeouts ................................................................................. 25
Modify administrator account Lockout Duration and Threshold values................. 25
Administrator account Lockout Duration .......................................................... 26
Administrator account Lockout Threshold........................................................ 26
Disable auto installation via USB ............................................................................ 26
Auditing and Logging.............................................................................................. 26
Troubleshooting resources ............................................................................27
Technical Documentation ....................................................................................... 27
Fortinet Video Library.............................................................................................. 27
Release Notes......................................................................................................... 27
Knowledge Base ..................................................................................................... 27
Fortinet Technical Discussion Forums.................................................................... 27
Fortinet Training Services Online Campus ............................................................. 28
Fortinet Customer Support ..................................................................................... 28
Troubleshooting tools .....................................................................................29
FortiOS diagnostics ................................................................................................ 29
Check date and time......................................................................................... 29
Resource usage ................................................................................................ 30
Proxy operation................................................................................................. 32
Hardware NIC ................................................................................................... 35
Traffic trace ....................................................................................................... 37
Session table..................................................................................................... 37
Firewall session setup rate................................................................................ 41
Finding object dependencies............................................................................ 42
Flow trace ......................................................................................................... 43
Packet sniffing and packet capture .................................................................. 46
FA2 and NP2 based interfaces ......................................................................... 50
Debug command .............................................................................................. 51
The execute tac report command..................................................................... 53
Other commands .............................................................................................. 53
FortiOS ports .......................................................................................................... 54
FortiAnalyzer/FortiManager ports ........................................................................... 56
Fortinet Technologies Inc. Page 4 FortiOS Handbook - Troubleshooting for FortiOS 5.0
FortiGuard troubleshooting..................................................................................... 56
Troubleshooting process for FortiGuard updates............................................. 56
FortiGuard server settings ................................................................................ 57
FortiGuard URL rating....................................................................................... 57
................................................................................................................................ 57
................................................................................................................................ 57
Troubleshooting methodologies ....................................................................58
Establish a baseline ................................................................................................ 58
Define the problem ................................................................................................. 59
Gathering Facts ...................................................................................................... 60
Create a troubleshooting plan ................................................................................ 60
Providing Supporting Elements ........................................................................ 61
Obtain any required additional equipment ............................................................. 61
Ensure you have administrator level access to required equipment ...................... 61
Contact Fortinet customer support for assistance ................................................. 61
Technical Support Organization Overview ...................................................62
Fortinet Global Customer Services Organization ................................................... 62
Creating an account ............................................................................................... 63
Registering a device ............................................................................................... 63
Reporting problems ................................................................................................ 64
Logging online tickets ....................................................................................... 64
Following up on online tickets .......................................................................... 65
Telephoning a technical support center ........................................................... 66
Assisting technical support..................................................................................... 66
Support priority levels ............................................................................................. 66
Priority 1............................................................................................................ 66
Priority 2............................................................................................................ 66
Priority 3............................................................................................................ 67
Priority 4............................................................................................................ 67
Return material authorization process .................................................................... 67
Fortinet Technologies Inc. Page 5 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Common questions .........................................................................................68
How to check hardware connections ............................................................... 70
How to check FortiOS network settings ........................................................... 70
How to check CPU and memory resources ..................................................... 72
How to check modem status ............................................................................ 77
How to run ping and traceroute ........................................................................ 77
How to check the logs ...................................................................................... 82
How to verify the contents of the routing table (in NAT mode)......................... 82
How to verify the correct route is being used................................................... 83
How to verify the correct firewall policy is being used ..................................... 84
How to check the bridging information in Transparent mode .......................... 84
How to check number of sessions used by UTM proxy................................... 85
How to examine the firewall session list ........................................................... 89
How to check wireless information................................................................... 90
How to verify FortiGuard connectivity .............................................................. 90
How to perform a sniffer trace (CLI and Packet Capture)................................. 91
How to debug the packet flow.......................................................................... 94
Index .................................................................................................................95
Fortinet Technologies Inc. Page 6 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Introduction
Welcome and thank you for selecting Fortinet products for your network protection.
This guide is intended for administrators who need guidance on different network needs and
information on basic and advanced troubleshooting.
This chapter contains the following topics:
Before you begin
How this guide is organized
Before you begin using this guide, take a moment to verify the following:
You have administrative access to the web-based manager and/or CLI.
The FortiGate unit is integrated into your network.
The operation mode has been configured.
The system time, DNS settings, administrator password, and network interfaces have been
configured.
Firmware, FortiGuard Antivirus and FortiGuard Antispam updates are completed.
While using the instructions in this guide, note that:
Administrators are assumed to be super_admin administrators unless otherwise specified.
Some restrictions will apply to other administrators.
This handbook chapter describes concepts of troubleshooting and solving issues that may
occur with FortiGate units.
This guide contains the following chapters:
Life of a Packet explains the different layers and modules a packet goes through in FortiOS,
including the order of operations.
Verifying FortiGate admin access security explains how to verify and configure administrative
access.
Troubleshooting resources walks you through Fortinets resources for troubleshooting.
Troubleshooting tools describes some of the basic commands and parts of FortiOS that can
help you with troubleshooting.
Troubleshooting methodologies walks you through best practice concepts of FortiOS
troubleshooting.
Technical Support Organization Overview describes how Fortinet Support operates, what they
will need from you if you contact them, and what you can expect in general.
Common questions answers most of the common questions.
Page 7
Life of a Packet
Directed by security policies, a FortiGate unit screens network traffic from the IP layer up
through the application layer of the TCP/IP stack. This chapter provides a general, high-level
description of what happens to a packet as it travels through a FortiGate security system.
The FortiGate unit performs three types of security inspection:
stateful inspection, that provides individual packet-based security within a basic session
state
flow-based inspection, that buffers packets and uses pattern matching to identify security
threats
proxy-based inspection, that reconstructs content passing through the FortiGate unit and
inspects the content for security threats.
Each inspection component plays a role in the processing of a packet as it traverses the
FortiGate unit in route to its destination. To understand these inspections is the first step to
understanding the flow of the packet.
This section contains the following topics:
Stateful inspection
Flow inspection
Proxy inspection
Comparison of inspection layers
FortiOS functions and security layers
Packet flow
Example 1: client/server connection
Example 2: Routing table update
Example 3: Dialup IPsec VPN with application control
Stateful inspection
With stateful inspection, the FortiGate unit looks at the first packet of a session to make a
security decision. Common fields inspected include TCP SYN and FIN flags to identity the start
and end of a session, the source/destination IP, source/destination port and protocol. Other
checks are also performed on the packed payload and sequence numbers to verify it as a valid
communication and that the data is not corrupted or poorly formed.
What makes it stateful is that one or both ends must save information about the session history
in order to communicate. In stateless communication, only independent requests and
responses are used, that do not depend on previous data. For example, UDP is stateless by
nature because it has no provision for reliability, ordering, or data integrity.
The FortiGate unit makes the decision to drop, pass or log a session based on what is found in
the first packet of the session. If the FortiGate unit decides to drop or block the first packet of a
session, then all subsequent packets in the same session are also dropped or blocked without
being inspected. If the FortiGate unit accepts the first packet of a session, then all subsequent
packets in the same session are also accepted without being inspected.
Page 8
Connections over connectionless
A connection is established when two end points use a protocol to establish connection
through use of various methods such as segment numbering to ensure data delivery, and
handshaking to establish the initial connection. Connections can be stateful because they
record information about the state of the connection. Persistent connections reduce request
latency because the end points do not need to re-negotiate the connection multiple times, but
instead just send the information without the extra overhead. By contrast, connectionless
communication does not keep any information about the data being sent or the state. It is
based on an autonomous response/reply that is independent of other responses/replies that
may have gone before. One example of connectionless communication is IP.
Benefits of connections over connectionless include being able to split data up over multiple
packets, the data allows for a best-effort approach, and once the connection is established
subsequent packets are not required to contain the full addressing information which saves on
bandwidth. Connections are often reliable network services since acknowledgements can be
sent when data is recieved.
What is a session?
A session is established on an existing connection, for a defined period of time, using a
determined type of communication or protocol. Sessions can have specific bandwidth , and
time to live (TTL) parameters.
You can compare a session to a conversation. A session is established when one end point
initiates a request by establishing a TCP connection on a particular port, the receiving end is
listening on that port, and replies. You could telnet to port 80 even though telnet normally uses
port 23, because at this level, the application being used cannot be determined.
However, the strong points of sessions and stateful protocols can also be their weak points.
Denial of service (DoS) attacks involve creating so many sessions that the connection state
information tables are full and the unit will not accept additional sessions.
Fortinet Technologies Inc. Page 9 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Figure 1: Stateful inspection of packets through the FortiGate unit
1 SY
3 N,
2 IP,
1 TC
2 P
nt 3
Se et
ck
Pa
1
3
2
ed
c eiv t
Re cke
Pa
Flow inspection
With flow inspection (also called flow-based inspection), the FortiGate unit samples multiple
packets in a session and multiple sessions, and uses a pattern matching engine to determine
the kind of activity that the session is performing and to identify possible attacks or viruses. For
example, if application control is operating, flow inspection can sample network traffic and
identify the application that is generating the activity. Flow inspection using IPS samples
network traffic and determines if the traffic constitutes an attack. Flow inspection can also be
used for antivirus protection, web filtering, and data leak protection (DLP). Flow inspection
occurs as the data is passing from its source to its destination. Flow inspection identifies and
blocks security threats in real time as they are identified.
IPS
,
3 Ap Flow
p C -AV
2 ont ,
rol
2
nt
Se et
ck
Pa
1
2
ed
c eiv t
Re cke
Pa
Flow inspection typically requires less processing than proxy inspection, and therefore flow
antivirus, web filtering, and DLP inspection performance can be better than proxy inspection
performance. However, some threats can only be detected when a complete copy of the
payload (for example a complete email attachment) is obtained so, proxy inspection tends to be
more accurate and complete than flow inspection.
Fortinet Technologies Inc. Page 10 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Proxy inspection
Proxy inspection examines the content contained in content protocol sessions for security
threats. Content protocols include HTTP, FTP, and email protocols. Security threats can be
found in files and other content downloaded using these protocols. With proxy inspection, the
FortiGate unit downloads the entire payload of a content protocol session and re-constructs it.
For example, proxy inspection can reconstruct an email message and its attachments. After a
satisfactory inspection the FortiGate unit passes the content on to the client. If the proxy
inspection detects a security threat in the content, the content is removed from the
communication stream before it reaches its destination. For example, if proxy inspection
detects a virus in an email attachment, the attachment is removed from the email message
before its sent to the client. Proxy inspection is the most thorough inspection of all, although it
requires more processing power, and this may result in lower performance.
1 Em
a
3
2 filteil filter
r, D , we
LP, b
AV
nt
Se et
ck 3
Pa 2
1
1
3
2
ed
c eiv t
Re cke
Pa
The three inspection methods each have their own strengths and weaknesses. The following
table looks at all three methods side-by-side.
Table 1: Inspection methods comparison
Inspection unit per session first packet selected packets complete content
Authentication yes
Fortinet Technologies Inc. Page 11 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Table 1: Inspection methods comparison
IPS yes
Within these security inspection types, FortiOS functions map to different inspections. The table
below outlines when actions are taken as a packet progresses through its life within a FortiGate
unit.
Firewall yes
DLP yes
Packet flow
After the FortiGate units external interface receives a packet, the packet proceeds through a
number of steps on its way to the internal interface, traversing each of the inspection types,
depending on the security policy and security profile configuration. The diagram in Figure 4 on
page 13 is a high level view of the packets journey.
Fortinet Technologies Inc. Page 12 FortiOS Handbook - Troubleshooting for FortiOS 5.0
The description following is a high-level description of these steps as a packet enters the
FortiGate unit towards its destination on the internal network. Similar steps occur for outbound
traffic.
Fortinet Technologies Inc. Page 13 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Interface
Ingress packets are received by a FortiGate interface.The packet enters the system, and the
interface network device driver passes the packet to the Denial of Service (DoS) sensors, if
enabled, to determine whether this is a valid information request or not.
DoS sensor
DoS scans are handled very early in the life of the packet to determine whether the traffic is
valid or is part of a DoS attack. Unlike signature-based IPS which inspects all the packets within
a certain traffic flow, the DoS module inspects all traffic flows but only tracks packets that can
be used for DoS attacks (for example TCP SYN packets), to ensure they are within the
permitted parameters. Suspected DoS attacks are blocked, other packets are allowed.
IPsec
If the packet is an IPsec packet, the IPsec engine attempts to decrypt it. The IPsec engine
applies the correct encryption keys to the IPsec packet and sends the unencrypted packet to
the next step. IPsec is bypassed when for non-IPsec traffic and for IPsec traffic that cannot be
decrypted by the FortiGate unit.
Routing
The routing step determines the outgoing interface to be used by the packet as it leaves the
FortiGate unit. In the previous step, the FortiGate unit determined the real destination address,
so it can now refer to its routing table and decide where the packet must go next.
Routing also distinguishes between local traffic and forwarded traffic and selects the source
and destination interfaces used by the security policy engine to accept or deny the packet.
Policy lookup
The policy look up is where the FortiGate unit reviews the list of security policies which govern
the flow of network traffic, from the first entry to the last, to find a match for the source and
Fortinet Technologies Inc. Page 14 FortiOS Handbook - Troubleshooting for FortiOS 5.0
destination IP addresses and port numbers. The decision to accept or deny a packet, after
being verified as a valid request within the stateful inspection, occurs here. A denied packet is
discarded. An accepted packet will have further actions taken. If IPS is enabled, the packet will
go to Flow-based inspection engine, otherwise it will go to the Proxy-based inspection engine.
If no other security options are enabled, then the session was only subject to stateful
inspection. If the action is accept, the packet will go to Source NAT to be ready to leave the
FortiGate unit.
Session tracking
Part of the stateful inspection engine, session tracking maintains session tables that maintain
information about sessions that the stateful inspection module uses for maintaining sessions,
NAT, and other session related functions.
User authentication
User authentication added to security policies is handled by the stateful inspection engine,
which is why Firewall authentication is based on IP address. Authentication takes place after
policy lookup selects a security policy that includes authentication. This is also known as
identify-based policies. Authentication also takes place before security features are applied to
the packet.
Management traffic
This local traffic is delivered to the FortiGate unit TCP/IP stack and includes communication
with the web-based manager, the CLI, the FortiGuard network, log messages sent to
FortiAnalyzer or a remote syslog server, and so on. Management traffic is processed by
applications such as the web server which displays the FortiOS web-based manager, the SSH
server for the CLI or the FortiGuard server to handle local FortiGuard database updates or
FortiGuard Web Filtering URL lookups.
ICAP traffic
If you enable ICAP in a security policy, HTTP (and optionally HTTPS) traffic intercepted by the
policy is transferred to ICAP servers in the ICAP profile added to the policy. The FortiGate unit is
the surrogate, or middle-man, and carries the ICAP responses from the ICAP server to the
ICAP client; the ICAP client then responds back, and the FortiGate unit determines the action
that should be taken with these ICAP responses and requests.
Session helpers
Some protocols include information in the packet body (or payload) that must be analyzed to
successfully process sessions for this protocol. For example, the SIP VoIP protocol uses TCP
control packets with a standard destination port to set up SIP calls. To successfully process SIP
VoIP calls, FortiOS must be able to extract information from the body of the SIP packet and use
this information to allow the voice-carrying packets through the firewall.
FortiOS uses session helpers to analyze the data in the packet bodies of some protocols and
adjust the firewall to allow those protocols to send packets through the firewall.
Fortinet Technologies Inc. Page 15 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Flow-based inspection engine
Flow-based inspection is responsible for IPS, application control, flow-based antivirus scanning
and VoIP inspection. Packets are sent to flow-based inspection if the security policy that
accepts the packets includes one or more of these security features.
Once the packet has passed the flow-based engine, it can be sent to the proxy inspection
engine or egress.
IPsec
If the packet is transmitted through an IPsec tunnel, it is at this stage the encryption and
required encapsulation is performed. For non-IPsec traffic (TCP/UDP) this step is bypassed.
Routing
The final routing step determines the outgoing interface to be used by the packet as it leaves
the FortiGate unit.
Egress
Upon completion of the scanning at the IP level, the packet exits the FortiGate unit.
The following example illustrates the flow of a packet of a client/web server connection with
authentication and FortiGuard URL and antivirus filtering.
This example includes the following steps:
Fortinet Technologies Inc. Page 16 FortiOS Handbook - Troubleshooting for FortiOS 5.0
2. Packet intercepted by FortiGate unit interface.
2.1 Link level CRC and packet size checking. If the size is correct, the packet continues,
otherwise it is dropped.
3. DoS sensor - checks are done to ensure the sender is valid and not attempting a denial of
service attack.
4. IP integrity header checking, verifying the IP header length, version and checksums.
5. Next hop route
6. Policy lookup
7. User authentication
8. Proxy inspection
8.1 Web Filtering
8.2 FortiGuard Web Filtering URL lookup
8.3 Antivirus scanning
9. Source NAT
10.Routing
11.Interface transmission to network
12.Packet forwarded to web server
Fortinet Technologies Inc. Page 17 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Figure 5: Client/server connection
The following example illustrates the flow of a packet when there is a routing table update. As
this is low level, there is no security involved. This example includes the following steps:
1. FortiGate unit receives routing update packet
2. Packet intercepted by FortiGate unit interface
2.1 Link level CRC and packet size checking. If the size is correct, the packet continues,
otherwise it is dropped.
3. DoS sensor - checks are done to ensure the sender is valid and not attempting a denial of
service attack.
4. IP integrity header checking, verifying the IP header length, version and checksums.
5. Stateful policy engine
5.1 Management traffic (local traffic)
Fortinet Technologies Inc. Page 18 FortiOS Handbook - Troubleshooting for FortiOS 5.0
6. Routing module
6.1 Update routing table
Fortinet Technologies Inc. Page 19 FortiOS Handbook - Troubleshooting for FortiOS 5.0
11.Interface transmission to network
12.Packet forwarded to internal server
Fortinet Technologies Inc. Page 20 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Figure 7: Dialup IPsec with application control
Fortinet Technologies Inc. Page 21 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Verifying FortiGate admin access security
FortiOS provides a number of methods that help to enhance FortiGate administrative access
security. This section describes FortiGate administrative access security best practices.
Install the FortiGate unit in a physically secure location
Add new administrator accounts
Change the admin account name and limit access to this account
Only allow administrative access to the external interface when needed
When enabling remote access, configure Trusted Hosts and Two-factor Authentication
Change the default administrative port to a non-standard port
Enable Password Policy
Maintain short login timeouts
Modify administrator account Lockout Duration and Threshold values
Disable auto installation via USB
Auditing and Logging
A good place to start with is physical security. Install the FortiGate unit in a secure location,
such as a locked room or a room with restricted access. This way unauthorized users cant get
physical access to the device.
If unauthorized users have physical access they can disrupt your entire network by
disconnecting your FortiGate unit (either by accident or on purpose). They could also connect a
console cable and attempt to log into the CLI. Also, when a FortiGate unit reboots, a person
with physical access can interrupt the boot process and install different firmware.
Rather than allowing all administrators to access the FortiGate unit with the admin administrator
account you should create administrator accounts for each person that requires administrative
access. That way you can track who has made configuration changes and performed other
administrative activities. Keep the number of administrative accounts to a minimum to keep
better control on who can access the device.
To add administrators go to System > Admin > Administrators and select Create New.
If you want administrators to have access to all FortiGate configuration options, their accounts
should have the prof_admin admin profile. Administrators with this profile can do anything
except add new administrator accounts.
At least one account should always have the super_admin profile as this profile is required to
add and remove administrators. To improve security only a very few administrators (usually one)
should be able to add new administrators.
If you want some administrator accounts to have limited access to the FortiGate configuration
you can create custom admin profiles that only allow access to selected parts of the
configuration. To add custom admin profiles, go to System > Admin > Admin Profiles and select
Create New.
Page 22
For example, if you want to add an admin profile that does not allow changing firewall policies,
when you configure the admin profile set Firewall Configuration to None or Read Only.
Change the admin account name and limit access to this account
The default super_admin administrator account, admin, is a well known administrator name so if
this account is available it could be easier for attackers to access the FortiGate unit because
they know they can log in with this name, only having to determine the password. You
can improve security by changing this name to one more difficult for an attacker to guess.
To do this, create a new administrator account with the super_admin admin profile and log in as
that administrator. Then go to System > Admin > Administrators and edit the admin
administrator and change the Administrator name.
Once the account has been renamed you could delete the super_admin account that you just
added. Consider also only using the super-admin account for adding or changing
administrators. The less this account is used to less likely that it could be compromised.
You could also store the account name and password for this account in a secure location in
case for some reason the account name or password is forgotten.
When possible, dont allow administration access on the external interface and use internal
access methods such as IPsec VPN or SSL VPN.
To disable administrative access on the external interface, go to System > Network > Interfaces,
edit the external interface and disable HTTPS, PING, HTTP, SSH, and TELNET under
Administrative Access.
This can also be done with CLI using following commands:
Please note that this will disable all services on the external interface including CAPWAP,
FMG-Access, SNMP, and FCT-Access.
If you need some of these services enabled on your external interface, for example CAPWAP
and FMG-Access to ensure connectivity between FortiGate unit and respectively FortiAP and
FortiManager, then you need to use following CLI command:
Fortinet Technologies Inc. Page 23 FortiOS Handbook - Troubleshooting for FortiOS 5.0
When enabling remote access, configure Trusted Hosts and Two-factor
Authentication
If you have to have remote access and cant use IPsec or SSL VPN then you should only allow
HTTPS and SSH and use secure access methods such as trusted hosts and Two-facor
authentication.
Fortinet Technologies Inc. Page 24 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Change the default administrative port to a non-standard port
Administration Settings under System > Admin > Settings or config system global in the
CLI, enable you to change the default port configurations for administrative connections to the
FortiGate unit for added security. When connecting to the FortiGate unit when the port has
changed, the port must be included. For example, if you are connecting to the FortiGate unit
using HTTPS over port 8081, the url would be https://192.168.1.99:8081
If you make a change to the default port number for HTTP, HTTPS, Telnet, or SSH, ensure that
the port number is not used for other services.
Brute force password software can launch more than just dictionary attacks. It can discover
common passwords where a letter is replaced by a number. For example, if p4ssw0rd is used
as a password, it can be cracked.
Password policies, available by going to System > Admin > Settings > Enable Password Policy,
enable you to create a password policy that any administrator who updates their passwords,
must follow. Using the available options you can define the required length of the password,
what it must contain (numbers, upper and lower case, and so on) and an expiry time frame. The
FortiGate unit will warn of any password that is added and does not meet the criteria.
To avoid the possibility of an administrator walking away from the management computer and
leaving it exposed to unauthorized personnel, you can add an idle time-out. That is, if the
web-based manager is not used for a specified amount of time, the FortiGate unit will
automatically log the administrator out. To continue their work, they must log in again.
The time-out can be set as high as 480 minutes, or eight hours, although this is not recommend.
To set the idle time out, go to System > Admin > Settings and enter the amount of time for the
Idle Timeout. A best practice is to keep the default of 5 min.
When logging into the console using SSH, the default time of inactivity to successfully log into
the FortiGate unit is 120 seconds (2 minutes). You can configure the time to be shorter by using
the CLI to change the length of time the command prompt remains idle before the FortiGate unit
will log the administrator out. The range can be between 10 and 3600 seconds. To set the
logout time enter the following CLI commands:
config system global
set admin-ssh-grace-time <number_of_seconds>
end
Account lockout policies control how and when accounts are locked out of the FortiGate unit.
These policies are described and implemented as follows:
Fortinet Technologies Inc. Page 25 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Administrator account Lockout Duration
If someone violates the lockout controls by entering an incorrect user name and/or password,
account lockout duration sets the length of time the account is locked. the lockout duration can
be set to a specific length of time using a value between 1 and 4294967295 seconds. The
default value is 60 seconds.
When its required use the CLI to modify the lockout duration as follow:
config system global
set admin-lockout-duration <integer>
end
An attacker with a physical access to the device could load a new configuration or firmware on
the FortiGate using the USB port, reinitializing the device through a power cut. To avoid this,
execute the following CLI commands:
config system auto-install
set auto-install-config disable
set auto-install-image disable
end
Audit web facing administration interfaces. By default, FortiGate logs all deny action, you can
check these actions by going to Log & Report > Event Log > System. This default behavior
should not be changed. Also secure log files in a central location such as FortiCloud and
configure alert email which provides an efficient and direct method of notifying an administrator
of events. You can configure log settings by going to Log & Report > Log Config.
An auditing schedule should be established to routinely inspect logs for signs of intrusion and
probing.
Fortinet Technologies Inc. Page 26 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Troubleshooting resources
Before you begin troubleshooting, you need to know Fortinets troubleshooting resources.
Doing so will shorten the time to solve your issue. Indeed, an administrator can save time and
effort during the troubleshooting process by first checking if the issue has been experienced
before. Several self-help resources are available to provide valuable information about FortiOS
technical issues, including:
Technical Documentation
Installation Guides, Administration Guides, Quick Start Guides, and other technical documents
are available online at the following URL:
http://docs.fortinet.com
The Fortinet Video Library hosts a collection of video which provide valuable information about
Fortinet products.
http://video.fortinet.com
Release Notes
Issues that are uncovered after the technical documentation has been published will often be
listed in the Release Notes that accompany the device.
Knowledge Base
The Fortinet Knowledge Base provides access to a variety of articles, white papers, and other
documentation providing technical insight into a range of Fortinet products. The Knowledge
Base is available online at the following URL:
http://kb.fortinet.com
Page 27
Fortinet Training Services Online Campus
The Fortinet Training Services Online Campus hosts a collection of tutorials and training
materials which can be used to increase knowledge of the Fortinet products.
http://campus.training.fortinet.com
You have defined your problem, researched a solution, put together a plan to find the solution,
and executed that plan. At this point if the problem has not been solved, its time to contact
Fortinet Customer Support for assistance.
http://support.fortinet.com
Fortinet Technologies Inc. Page 28 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Troubleshooting tools
FortiOS provides a number of tools that help with troubleshooting both hardware and software
issues. These tools include diagnostics and ports; ports are used when you need to understand
the traffic coming in or going out on a specific port, for example, UDP 53, which is used by the
FortiGate unit for DNS lookup and RBL lookup.
This section also contains information about troubleshooting FortiGuard issues.
This section contains the following topics:
FortiOS diagnostics
FortiOS ports
FortiAnalyzer/FortiManager ports
FortiGuard troubleshooting
FortiOS diagnostics
Page 29
Use Network Time Protocol (NTP) to set the date and time if possible. This is an automatic
method that does not require manual intervention. However, you must ensure the port is
allowed through the firewalls on your network. FortiToken synchronization requires NTP in many
situations.
Resource usage
Each program running on a computer has one or more processes associated with it. For
example if you open a Telnet program, it will have an associated telnet process. The same is
true in FortiOS. All the processes have to share the system resources in FortiOS including
memory and CPU.
Use get system performance status command to show the FortiOS performance
status.
Fortinet Technologies Inc. Page 30 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Sample output:
FGT#get system performance status
CPU states: 0% user 0% system 0% nice 100% idle
CPU0 states: 0% user 0% system 0% nice 100% idle
CPU1 states: 0% user 0% system 0% nice 100% idle
CPU2 states: 0% user 0% system 0% nice 100% idle
CPU3 states: 0% user 0% system 0% nice 100% idle
Memory states: 25% used
Average network usage: 0 kbps in 1 minute, 0 kbps in 10 minutes, 0 kbps
in 30 minutes
Average sessions: 5 sessions in 1 minute, 5 sessions in 10 minutes, 4
sessions in 30 minutes
Average session setup rate: 0 sessions per second in last 1 minute, 0
sessions per second in last 10 minutes, 0 sessions per second in
last 30 minutes
Virus caught: 0 total in 1 minute
IPS attacks blocked: 0 total in 1 minute
Uptime: 0 days, 12 hours, 7 minutes
Monitor the CPU/memory usage of internal processes using the following command:
get system performance top <delay> <max_lines>
The data listed by the command includes the name of the daemon, the process ID, whether the
process is sleeping or running, the CPU percentage being used, and the memory percentage
being used.
Sample output:
FGT#get system performance top 10 100
Run Time: 0 days, 11 hours and 30 minutes
0U, 0S, 100I; 1977T, 1470F, 121KF
pyfcgid 120 S 0.0 1.3
pyfcgid 121 S 0.0 1.3
pyfcgid 122 S 0.0 1.3
pyfcgid 53 S 0.0 1.3
ipsengine 75 S < 0.0 1.3
ipsengine 66 S < 0.0 1.3
ipsengine 73 S < 0.0 1.3
ipsengine 74 S < 0.0 1.3
ipsengine 79 S < 0.0 1.3
ipsengine 80 S < 0.0 1.3
cmdbsvr 43 S 0.0 1.0
proxyworker 110 S 0.0 1.0
proxyworker 111 S 0.0 1.0
httpsd 125 S 0.0 0.8
httpsd 52 S 0.0 0.8
httpsd 124 S 0.0 0.8
newcli 141 R 0.0 0.7
newcli 128 S 0.0 0.7
fgfmd 102 S 0.0 0.7
iked 86 S 0.0 0.7
Fortinet Technologies Inc. Page 31 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Proxy operation
Monitor proxy operations using the following command:
diag test application <application> <option>
Fortinet Technologies Inc. Page 32 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
pptpcd PPTP client.
The <option> value depends from the application value used in the command. Here are some
examples:
Fortinet Technologies Inc. Page 33 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
The <option> value can be one from the following:
Fortinet Technologies Inc. Page 34 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
6 Submit attack characteristics now
15 IPSA statistics
Hardware NIC
Monitor hardware network operations using the following command:
diag hardware deviceinfo nic <interface>
The information displayed by this command is important as errors at the interface are indicative
of data link or physical layer issues which may impact the performance of the FortiGate unit.
The following is sample output when <interface> = internal:
System_Device_Name port5
Current_HWaddr 00:09:0f:68:35:60
Permanent_HWaddr 00:09:0f:68:35:60
Link up
Speed 100
Duplex full
[]
Rx_Packets=5685708
Tx_Packets=4107073
Rx_Bytes=617908014
Tx_Bytes=1269751248
Rx_Errors=0
Tx_Errors=0
Rx_Dropped=0
Tx_Dropped=0
[..]
Fortinet Technologies Inc. Page 35 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
The diag hardware deviceinfo nic command displays a list of hardware related error
names and values. The following table explains the items in the list and their meanings.
Field Definition
Rx_Errors = rx error count Bad frame was marked as error by PHY.
Rx_CRC_Errors + This error is only valid in 10/100M mode.
Rx_Length_Errors -
Rx_Align_Errors
Rx_Dropped or Running out of buffer space.
Rx_No_Buffer_Count
Rx_Missed_Errors Equals Rx_FIFO_Errors + CEXTERR (Carrier Extension Error
Count). Only valid in 1000M mode, whichis marked by PHY.
Tx_Errors = ECOL (Excessive Collisions Count). Only valid in half-duplex
Tx_Aborted_Errors mode.
Tx_Window_Errors LATECOL (Late Collisions Count). Late collisions are
collisions that occur after 64-byte time into the transmission
of the packet while working in 10 to100Mb/s data rate and
512-byte timeinto the transmission of the packet while
working in the 1000Mb/s data rate. This register only
increments if transmits are enabled and the device is in
half-duplex mode.
Rx_Dropped See Rx_Errors.
Tx_Dropped Not defined.
Collisions Total number of collisions experienced by the transmitter.
Valid in half-duplex mode.
Rx_Length_Errors Transmission length error.
Rx_Over_Errors Not defined.
Rx_CRC_Errors Frame CRC error.
Rx_Frame_Errors Same as Rx_Align_Errors. This error is only valid in 10/100M
mode.
Rx_FIFO_Errors Same as Rx_Missed_Errors - a missed packet count.
Tx_Aborted_Errors See Tx_Errors.
Tx_Carrier_Errors The PHY should assert the internal carrier sense signal
during every transmission. Failure to do so may indicate that
the link has failed or the PHY has an incorrect link
configuration. This register only increments if transmits are
enabled. This register is not valid in internal SerDes 1 mode
(TBI mode for the 82544GC/EI) and is only valid when the
Ethernet controller is operating at full duplex.
Tx_FIFO_Errors Not defined.
Tx_Heartbeat_Errors Not defined.
Tx_Window_Errors See LATECOL.
Tx_Single_Collision_Fram Counts the number of times that a successfully transmitted
es packed encountered a single collision. The value only
increments if transmits are enabled and the Ethernet
controller is in half-duplex mode.
Tx_Multiple_Collision_Fra A Multiple Collision Count which counts the number of times
mes that a transmit encountered more than one collision but less
than 16. The value only increments if transmits are enabled
and the Ethernet controller is in half-duplex mode.
Fortinet Technologies Inc. Page 36 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Table 3: Possible hardware errors and meanings
Field Definition
Tx_Deferred Counts defer events. A defer event occurs when the
transmitter cannot immediately send a packet due to the
medium being busy because another device is transmitting,
the IPG timer has not expired, half-duplex deferral events are
occurring, XOFF frames are being received, or the link is not
up. This register only increments if transmits are enabled.
This counter does not increment for streaming transmits that
are deferred due to TX IPG.
Rx_Frame_Too_Longs The Rx frame is over size.
Rx_Frame_Too_Shorts The Rx frame is too short.
Rx_Align_Errors This error is only valid in 10/100M mode.
Symbol Error Count Counts the number of symbol errors between reads -
SYMERRS. The count increases for every bad symbol
received, whether or not a packet is currently being received
and whether or not the link is up. This register only
increments in internal SerDes mode.
Traffic trace
Traffic tracing allows a specific packet stream to be followed. This is useful to confirm packets
are taking the route you expected on your network.
View the characteristics of a traffic session though specific security policies using:
diag sys session
Trace per-packet operations for flow tracing using:
diag debug flow
Trace per-Ethernet frame using:
diag sniffer packet
Session table
A session is a communication channel between two devices or applications across the network.
Sessions enable FortiOS to inspect and act on a sequential group of packets in a session all
together instead of inspecting each packet individually. Each of these sessions has an entry in
the session table that includes important information about the session.
Use as a tool
Session tables are useful troubleshooting tools because they allow you to verify connections
that you expect to see open. For example, if you have a web browser open to browse the
Fortinet website, you would expect a session entry from your computer, on port 80, to the IP for
the Fortinet website. Another troubleshooting method is if there are too many sessions for
FortiOS to process, you can examine the session table for evidence why this is happening.
The FortiGate session table can be viewed from either the CLI or the web-based manager. The
most useful troubleshooting data comes from the CLI. The session table in web-based manager
also provides some useful summary information, particularly the current policy number that the
session is using.
Fortinet Technologies Inc. Page 37 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Web-based manager session information
In the web-based manager there are actually two places to view session information the
policy session monitor, and the dashboard Top Sources, Top Destinations and Top Applications
Session monitor
The session monitor is the session table. It lists the protocol used, source and destination
addresses, source and destination ports, what policy ID was matched (if any), how long until the
session expires, and how long it has been established.
If there is no policy ID listed in the session entry, the traffic originated from the FortiGate unit.
Otherwise all sessions must match a security policy to pass through the FortiGate unit. You can
specify a filter to show Forward Traffic only. To do this, click on the Edit icon (it looks like a
pencil)
As there are potentially many sessions active at one time, there are different methods you can
use to filter unimportant sessions out of your search. The easiest filter is to display only IPv4 or
IPv6 sessions. By default both are displayed.
Fortinet Technologies Inc. Page 38 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
address. It can also tell you the security policy number it matches, so you can check what is
happening in that policy.
1. Know your connection information.
You need to be able to identify the session you want. For this you need the source IP
address (usually your computer), the destination IP address if you have it, and the port
number which is determined by the program being used. Some commons ports are:
port 80 (HTTP for web browsing),
port 22 (SSH used for secure login and file transfers)
port 23 (telnet for a text connection)
port 443 (HTTPS for secure web browsing
2. Find your session and policy ID.
Follow System > Dashboard> Top Sources to the session table monitor. Find your session by
finding your source IP address, destination IP address if you have it, and port number. The
policy ID is listed after the destination information. If the list of sessions is very long, you can
filter the list to make it easier to find your session.
3. When there are many sessions, use a filter to help you find your session.
If there are multiple pages of sessions it is difficult to find a single session. To help you in
your search you can use a filter to block out sessions that you dont want. Select the filter
icon next to Src Address. In the window that pops up, enter your source IP address and
select Apply. Now only sessions that originate from your IP address will be displayed in the
session table. If the list is still too long, you can do the same for the Src port. That will make
it easy to find your session and the security policy ID. When you are finished remember to
clear the filters.
Fortinet Technologies Inc. Page 39 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Sample Output:
FGT# diag sys session list
session info: proto=6 proto_state=05 expire=89 timeout=3600
flags=00000000 av_idx=0 use=3
bandwidth=204800/sec guaranteed_bandwidth=102400/sec
traffic=332/sec prio=0 logtype=session ha_id=0 hakey=4450
tunnel=/
state=log shape may_dirty
statistic(bytes/packets/err): org=3408/38/0 reply=3888/31/0 tuples=2
orgin->sink: org pre->post, reply pre->post oif=3/5
gwy=192.168.11.254/10.0.5.100
hook=post dir=org act=snat
10.0.5.100:1251->192.168.11.254:22(192.168.11.105:1251)
hook=pre dir=reply act=dnat
192.168.11.254:22->192.168.11.105:1251(10.0.5.100:1251)
pos/(before,after) 0/(0,0), 0/(0,0)
misc=0 domain_info=0 auth_info=0 ftgd_info=0 ids=0x0 vd=0
serial=00007c33 tos=ff/ff
Since output can be verbose, the filter option allows specific information to be displayed, for
example:
diag sys session filter <option>
The <option> values available include the following:
duration duration
expire expire
Fortinet Technologies Inc. Page 40 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Even though UDP is a sessionless protocol, the FortiGate unit still keeps track of the following
two different states:
UDP reply not seen with a value of 0
UDP reply seen with a value of 1
The following illustrates FW session states from the session table:
Table 4:
State Meaning
may_dirty Session is created by a policy. For example, the session for ftp
control channel will have this state but ftp data
channel will not. This is also seen when NAT is enabled.
Fortinet Technologies Inc. Page 41 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
To view your session setup rate method 1- CLI
FGT# get sys performance status
CPU states: 0% user 0% system 0% nice 100% idle
Memory states: 10% used
Average network usage: 0 kbps in 1 minute, 0 kbps in 10 minutes,
13 kbps in 30 minutes
Average sessions: 31 sessions in 1 minute, 30 sessions in 10
minutes, 31 sessions in 30 minutes
Average session setup rate: 0.5 sessions per second in last 1
minute, 0 sessions per second in last 10 minutes, 0 sessions per
second in last 30 minutes
Virus caught: 0 total in 1 minute
IPS attacks blocked: 0 total in 1 minute
Uptime: 44 days, 18 hours, 42 minutes
The information you are looking for is the Average sessions section, highlighted in the above
output. In this example you can see there were 31 sessions in 1 minute, or an average of 0.5
sessions per second. The values for 10 minutes and 30 minutes allow you to take a longer
average for a more reliable value if your FortiGate unit is working at maximum capacity. The
smallest FortiGate unit can have 1 000 sessions established per second across the unit.
Remember that session setup rate is a global command. If you have multiple VDOMs
configured with many sessions in each one, the session setup rate per VDOM will be slower
than if there were no VDOMs configured.
CLI method
When running multiple VDOMs, this command is run in the Global configuration only and it
searches for the named object both in the Global and VDOM configuration most recently used:
diag sys checkused <path.object.mkey>
For example, to verify which objects are referred to in a security policy with an ID of 1, enter the
command as follows:
diag sys checkused firewall.policy.policyid 1
Fortinet Technologies Inc. Page 42 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
To show all the dependencies for an interface, enter the command as follows:
diag sys checkused system.interface.name <interface name>
Sample Output:
entry used by table firewall.address:name '10.98.23.23_host
entry used by table firewall.address:name 'NAS'
entry used by table firewall.address:name 'all'
entry used by table firewall.address:name 'fortinet.com'
entry used by table firewall.vip:name 'TORRENT_10.0.0.70:6883'
entry used by table firewall.policy:policyid '21'
entry used by table firewall.policy:policyid '14'
entry used by table firewall.policy:policyid '19'
In this example, the interface has dependent objects, including four address objects, one VIP,
and three security policies.
Flow trace
To trace the flow of packets through the FortiGate unit, use the following command:
diag debug flow trace start
Fortinet Technologies Inc. Page 43 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Filtering options include the following:
addr IP address
clear clear filter
daddr destination IP address
dport destination port
negate inverse filter
port port
proto protocol number
saddr source IP address
sport source port
vd index of virtual domain, -1 matches all
Enable the output to be displayed to the CLI console using the following command:
diag debug flow show console
diag debug flow output is recorded as event log messages and are sent to a
FortiAnalyzer unit if connected. Do not let this command run longer than necessary
since it generates significant amounts of data.
Start flow monitoring with a specific number of packets using this command:
diag debug flow trace start <N>
The following is an example of the flow trace for the device at the following IP address:
203.160.224.97
diag debug enable
diag debug flow filter addr 203.160.224.97
diag debug flow show console enable
diag debug flow show function-name enable
diag debug flow trace start 100
Fortinet Technologies Inc. Page 44 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
SYN sent and a new session is allocated:
id=20085 trace_id=209 func=resolve_ip_tuple line=2799
msg="allocate a new session-00000e90"
Lookup for next-hop gateway address:
id=20085 trace_id=209 func=vf_ip4_route_input line=1543
msg="find a route: gw-192.168.11.254 via port6"
Source NAT, lookup next available port:
id=20085 trace_id=209 func=get_new_addr line=1219
msg="find SNAT: IP-192.168.11.59, port-31925"
direction
Matched security policy. Check to see which policy this session matches:
id=20085 trace_id=209 func=fw_forward_handler line=317
msg="Allowed by Policy-3: SNAT"
Apply source NAT:
id=20085 trace_id=209 func=__ip_session_run_tuple
line=1502 msg="SNAT 192.168.3.221->192.168.11.59:31925"
SYN ACK received:
id=20085 trace_id=210 func=resolve_ip_tuple_fast line=2700
msg="vd-root received a packet(proto=6, 203.160.224.97:80-
>192.168.11.59:31925) from port6."
Found existing session ID. Identified as the reply direction:
id=20085 trace_id=210 func=resolve_ip_tuple_fast line=2727
msg="Find an existing session, id-00000e90, reply
direction"
Apply destination NAT to inverse source NAT action:
id=20085 trace_id=210 func=__ip_session_run_tuple
line=1516 msg="DNAT 192.168.11.59:31925-
>192.168.3.221:1487"
Lookup for next-hop gateway address for reply traffic:
id=20085 trace_id=210 func=vf_ip4_route_input line=1543
msg="find a route: gw-192.168.3.221 via port5"
ACK received:
id=20085 trace_id=211 func=resolve_ip_tuple_fast line=2700
msg="vd-root received a packet(proto=6,
192.168.3.221:1487->203.160.224.97:80) from port5."
Match existing session in the original direction:
id=20085 trace_id=211 func=resolve_ip_tuple_fast line=2727
msg="Find an existing session, id-00000e90, original
direction"
Apply source NAT:
id=20085 trace_id=211 func=__ip_session_run_tuple
line=1502 msg="SNAT 192.168.3.221->192.168.11.59:31925"
Fortinet Technologies Inc. Page 45 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Receive data from client:
id=20085 trace_id=212 func=resolve_ip_tuple_fast
line=2700 msg="vd-root received a packet(proto=6,
192.168.3.221:1487->203.160.224.97:80) from port5."
Match existing session in the original direction:
id=20085 trace_id=212 func=resolve_ip_tuple_fast
line=2727 msg="Find an existing session, id-00000e90,
original direction"
Apply source NAT:
id=20085 trace_id=212 func=__ip_session_run_tuple
line=1502 msg="SNAT 192.168.3.221->192.168.11.59:31925"
Receive data from server:
id=20085 trace_id=213 func=resolve_ip_tuple_fast
line=2700 msg="vd-root received a packet(proto=6,
203.160.224.97:80->192.168.11.59:31925) from port6."
Match existing session in reply direction:
id=20085 trace_id=213 func=resolve_ip_tuple_fast
line=2727 msg="Find an existing session, id-00000e90,
reply direction"
Apply destination NAT to inverse source NAT action:
id=20085 trace_id=213 func=__ip_session_run_tuple
line=1516 msg="DNAT 192.168.11.59:31925-
>192.168.3.221:1487"
Fortinet Technologies Inc. Page 46 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Packet sniffing in the CLI is well suited for spot checking traffic from the CLI, but if you have
complex filters to enter it can be a lot of work to enter them each time. You can also save the
sniffing output; however, you must log to a file and then analyze the file later by hand.
Packet capture in the web-based manager makes it easy to set up multiple filters at once and
just run one or two as you need them. You also have controls to start and stop capturing as you
wish. Packet capture output is downloaded to your local computer as a *.pcap file which
requires a third party application to read the file, such as Wireshark. This method is useful to
send Fortinet support information to help resolve an issue.
Packet sniffing
Before you start sniffing packets on the CLI, you should be prepared to capture the output to a
file there can be huge amounts of data that you will not be able to see without saving it to a
file. One method is to use a terminal program like puTTY to connect to the FortiGate units CLI.
Then once the packet sniffing count is reached you can end the session and analyze the output
in the file.
Details within packets passing through particular interfaces can be displayed using the packet
sniffer with the following command:
diag sniffer packet <interface> <filter> <verbose> <count> <tsformat>
The <interface> value is required, with the rest being optional. If not included the default
values will be none.
For example the simplest valid sniffer command would be:
diag sniffer packet any
The <interface> value can be any physical or virtual interface name. Use any to sniff packets
on all interfaces.
Fortinet Technologies Inc. Page 47 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
The <filter> value limits the display of packets using filters, including Berkeley Packet
Filtering (BPF) syntax. The <filter> value must be enclosed in quotes.
'[[src|dst] host <host_name_or_IP1>] [[src|dst] host
<host_name_or_IP2>] [[arp|ip|ip6|gre|esp|udp|tcp] [port_no]]
[[arp|ip|ip6|gre|esp|udp|tcp] [port_no]]
If a second host is specified in the filter, only the traffic between the two hosts will be displayed.
Optionally, you can use logical OR to match only one of the hosts, or match one of multiple
protocols or ports. When defining a port, there are up to two parts protocol and port number.
For example, to display UDP 1812 traffic or TCP 8080 traffic, use the following:
'udp port 1812 or tcp port 8080
To display all IP traffic that has a source of 192.168.1.2 and a destination of 192.168.2.3:
'ip src host 192.168.1.2 and dst host 192.168.2.3
The <verbose> option allows different levels of information to be displayed. The verbose levels
include:
1 Print header of packets
2 Print header and data from the IP header of the packets
3 Print header and data from the Ethernet header of the packets
4 Print header of packets with interface name
5 Print header and data from ip of packets with interface name
6 Print header and data from ethernet of packets with interface name
The <count> value indicates the number of packets to sniff before stopping. If this variable is
not included, or is set to zero, the sniffer will run until you manually halt it with Ctrl-C.
The <tsformat> value define the format of timestamp. It can be:
a: absolute UTC time, yyyy-mm-dd hh:mm:ss.ms
l: absolute LOCAL time, yyyy-mm-dd hh:mm:ss.ms
otherwise: relative to the start of sniffing, ss.ms
Packet capture
FortiOS 5 includes packet capture to the web-based manager. To configure packet capture
filters, go to System > Network > Packet Capture.
Fortinet Technologies Inc. Page 48 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
When you add a packet capture filter, enter the following information and select OK.
Interface You must select one interface. You cannot change the
interface without deleting the filter and creating a new one,
unlike the other fields.
If you select a filter and go back to edit it, you have the added option of starting and stopping
packet capture in the edit window, or downloading the captured packets. You can also see the
filter status and the number of packets captured.
You can also select the filter and select Start to start capturing packets. While the filter is
running, you will see the number of captured packets increasing until it reaches the max packet
count or you select Stop. While the filter is running you cannot download the output file.
When the packet capture is complete, you can select Download to send the packet capture
filter captured packets to your local computer as a *.pcap file. To read this file format, you will
need to use Wireshark or a similar third party application. Using this tool you will have extensive
analytics available to you and the full contents of the packets that were captured.
Fortinet Technologies Inc. Page 49 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
FA2 and NP2 based interfaces
Many Fortinet products contain network processors. Some of these products contain FortiAccel
(FA2) network processors while others contain NP2 network processors. Network processor
features, and therefore offloading requirements, vary by network processor model.
When using the FA2- and NP2-based interfaces, only the initial session setup will be seen
through the diag debug flow command. If the session is correctly programmed into the
ASIC (fastpath), the debug flow command will no longer see the packets arriving at the CPU. If
the NP2 functionality is disabled, the CPU will see all the packets, however, this should only be
used for troubleshooting purposes.
First, obtain the NP2 and port numbers with the following command:
diag npu np2 list
Sample output:
ID PORTS
-- -----
0 port1
0 port2
0 port3
0 port4
ID PORTS
-- -----
1 port5
1 port6
1 port7
1 port8
ID PORTS
-- -----
2 port9
2 port10
2 port11
2 port12
ID PORTS
-- -----
3 port13
3 port14
3 port15
3 port16
Sample output:
NP2 Fast Path Sniffer on port1 enabled
Fortinet Technologies Inc. Page 50 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
This will cause all traffic on port1 of NP2 to be sent to the CPU meaning a standard sniffer trace
can be taken and other diag commands should work if it was a standard CPU driven port.
These commands are only for the newer NP2 interfaces. FA2 interfaces are more limited as the
sniffer will only capture the initial packets before the session is offloaded into HW (FA2). The
same holds true for the diag debug flow command as only the session setup will be shown,
however, this is usually enough for this command to be useful.
Debug command
Debug output provides continuous, real-time event information. Debugging output continues
until it is explicitly stopped or until the unit is rebooted. Debugging output can affect system
performance and will be continually generated even though output might not be displayed in the
CLI console.
Debug information displayed in the console will scroll in the console display and may prevent
CLI commands from being entered, for example, the command to disable the debug display. To
turn off debugging output as the display is scrolling by, press the key to recall the recent diag
debug command, press backspace, and type 0, followed by Enter.
Debug output display is enabled using the following command:
diag debug enable
When finished examining the debug output, disable it using:
diag debug disable
Once enabled, indicate the debug information that is required using this command:
diag debug <option> <level>
Debug command options include the following:
application application
console console
kernel kernel
Fortinet Technologies Inc. Page 51 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
report Report for tech support.
urlfilter urlfilter
The debug level can be set at the end of the command. Typical values are 2 and 3, for example:
diag debug application DHCPS 2
diag debug application spamfilter 2
Fortinet support will advise which debugging level to use.
Timestamps can be enabled to the debug output using the following command:
diag debug console timestamp enable
Sample Output:
FGh_FtiLog1: IPsec SA connect 0 192.168.11.2->192.168.10.201:500,
natt_mode=0 rekey=0 phase2=FGh_FtiLog1
FGh_FtiLog1: using existing connection, dpd_fail=0
FGh_FtiLog1: found phase2 FGh_FtiLog1
FGh_FtiLog1: IPsec SA connect 0 192.168.11.2 -> 192.168.10.201:500
negotiating
FGh_FtiLog1: overriding selector 225.30.5.8 with 192.168.11.2
FGh_FtiLog1: initiator quick-mode set pfs=1536...
FGh_FtiLog1: try to negotiate with 1800 life seconds.
FGh_FtiLog1: initiate an SA with selectors:
192.168.11.2/0.0.0.0->192.168.10.201, ports=0/0, protocol=0/0
Send IKE Packet(quick_outI1):192.168.11.2:500(if0) ->
192.168.10.201:500, len=348
Initiator: sent 192.168.10.201 quick mode message #1 (OK)
FGh_FtiLog1: set retransmit: st=168, timeout=6.
In this example:
Fortinet Technologies Inc. Page 52 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
dpd_fail=0 Found existing Phase 1
Other commands
ARP table
To view the ARP cache, use the following command:
get sys arp
Sample output:
index=14 ifname=internal 224.0.0.5 01:00:5e:00:00:05 state=00000040
use=72203 confirm=78203 update=72203 ref=1
index=13 ifname=dmz 192.168.3.100 state=00000020 use=1843
confirm=650179 update=644179 ref=2 ? VIP
index=13 ifname=dmz 192.168.3.109 02:09:0f:78:69:ff state=00000004
use=71743 confirm=75743 update=75743 ref=1
index=14 ifname=internal 192.168.11.56 00:1c:23:10:f8:20
state=00000004 use=10532 confirm=10532 update=12658 ref=4
To remove all entries associated with a particular interface, use this command:
diag ip arp flush <interface name>
Fortinet Technologies Inc. Page 53 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Time and date settings
Check time and date settings for log message timestamp synchronization (the Fortinet support
group may request this) and for certificates that have a time requirement to check for validity.
Use the following commands:
execute time
current time is: 12:40:48
last ntp sync:Thu Mar 16 12:00:21 2006
execute date
current date is: 2006-03-16
If all devices have the same time, it helps to correlate log entries from different devices.
IP address
There may be times when you want to verify the IP addresses assigned to the FortiGate unit
interfaces are what you expect them to be. This is easily accomplished from the CLI using the
following command.
diag ip address list
The output from this command lists the IP address and mask if available, the index of the
interface (a sort of ID number) and the devname is the name of the interface. While physical
interface names are set, virtual interface names can vary. Listing all the virtual interface names is
a good use of this command. For vsys_ha and vsys_fgfm, the IP addresses are the local host
these are internally used virtual interfaces.
# diag ip address list
IP=10.31.101.100->10.31.101.100/255.255.255.0 index=3 devname=internal
IP=172.20.120.122->172.20.120.122/255.255.255.0 index=5 devname=wan1
IP=127.0.0.1->127.0.0.1/255.0.0.0 index=8 devname=root
IP=127.0.0.1->127.0.0.1/255.0.0.0 index=11 devname=vsys_ha
IP=127.0.0.1->127.0.0.1/255.0.0.0 index=13 devname=vsys_fgfm
Other related commands include flushing the IP addresses (diag ip address flush), which
will force a reload of the IP addresses. This can be useful if you think an IP address is wrong and
dont want to reboot the unit. You can add or delete a single IP address (diag ip address
add <ipv4_addr> or diag ip address delete <ipv4_addr>).
FortiOS ports
In the TCP and UDP stacks, there are 65 535 ports available for applications to use when
communicating with each other. Many of these ports are commonly known to be associated
with specific applications or protocols. These known ports can be useful when troubleshooting
your network.
Fortinet Technologies Inc. Page 54 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Use the following ports while troubleshooting the FortiGate device:
Table 5:
Port(s) Functionality
UDP 53 FDN Server List - source and destination port numbers vary by
(default) or originating or reply traffic. See the article How do I
UDP 8888 and troubleshoot performance issues when FortiGuard Web
UDP 1027 or Filtering is enabled? in the Knowledge Base.
UDP 1031
UDP 514 SYSLOG - All FortiOS versions can use syslog to send log
messages to remote syslog servers. FortiOS v2.80 and v3.0 can
also view logs stored remotely on a FortiAnalyzer unit.
Fortinet Technologies Inc. Page 55 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
FortiAnalyzer/FortiManager ports
If you have a FortiAnalyzer unit or FortiManager unit on your network you may need to use the
following ports for troubleshooting network traffic.
Table 6:
Functionality Port(s)
User name LDAP queries for reports TCP 389 or TCP 636
FortiGuard troubleshooting
The FortiGuard service provides updates to Antivirus, IPsec, Webfiltering, and more. The
FortiGuard Distribution System (FDS) involves a number of servers across the world that
provide updates to your FortiGate unit. Problems can occur both with connection to FDS, and
its configuration on your local FortiGate unit. Some of the more common troubleshooting
methods are listed here including
Troubleshooting process for FortiGuard updates
FortiGuard server settings
FortiGuard URL rating
Fortinet Technologies Inc. Page 56 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
2. If the device is part of an HA cluster, do all members of the cluster have the same level of
support?
As with the previous step, you can verify the support contract status for all the devices in
your HA cluster at the Fortinet Support website.
3. Have services been enabled on the device?
To see the FortiGuard information and status for a device, in the web-based manager go to
System > Config > FortiGuard. On that page you can verify the status of each component,
and if required enable each service. If there are problems, see the FortiGuard section of the
FortiOS Handbook.
4. Is the device able to communicate with FortiGuard servers?
At System > Config > FortiGuard you can also attempt to update AV and IPS, or test the
availability of WF and AS default and alternate ports. If there are problems, see the
FortiGuard section of the FortiOS Handbook.
5. Is there proper routing to reach the FortiGuard servers?
Ensure there is a static or dynamic route that enables your ForitGate unit to reach the
FortiGuard servers. Usually a generic default route to the internet is enough, but you may
need to verify this if your network is complex.
6. Are there issues with DNS?
An easy way to test this is to attempt a traceroute from behind the FortiGate unit to an
external network using the FQDN for a location. If the traceroute FQDN name does not
resolve, you have general DNS problems.
7. Is there anything upstream that might be blocking FortiGuard traffic, either on the network or
ISP side?
Many firewalls block all ports by default, and often ISPs block ports that are low. There may
be a firewall between the FortiGate unit and the FortiGuard servers that is blocking the
traffic. FortiGuard uses port 53 by default, so if it is being blocked you need to either open a
hole for it, or change the port it is using.
8. Is there an issue with source ports?
It is possible that ports used to contact FortiGuard are being changed before reaching
FortiGuard or on the return trip before reaching your FortiGate unit. A possible solution for
this is to use a fixed-port at NATd firewalls to ensure the port remains the same. Packet
sniffing can be used to find more information on what is happening with ports.
9. Are there security policies that include antivirus?
If no security policies include antivirus, the antivirus databse will not be updated. If antivirus
is included, only the database type used will be updated.
Fortinet Technologies Inc. Page 57 FortiOS Handbook - Logging and Reporting for FortiOS 5.0
Troubleshooting methodologies
Before you begin troubleshooting anything but the most minor issues, you need to prepare.
Doing so will shorten the time to solve your issue. This section helps to explain how you prepare
before troubleshooting, as well as creating a troubleshooting plan and contacting support.
This section contains the following topics:
Establish a baseline
Define the problem
Gathering Facts
Create a troubleshooting plan
Obtain any required additional equipment
Ensure you have administrator level access to required equipment
Contact Fortinet customer support for assistance
Establish a baseline
FortiGate units operate at all layers of the OSI model. For this reason troubleshooting problems
can become complex. If you establish a normal operation parameters, or baseline, for your
system before the problem occurs it will help reduce the complexity when you are
troubleshooting.
Many of the guiding questions in the following sections are some form of comparing the current
problem situation to normal operation on your FortiGate unit. For this reason it is a best practice
that you know what your normal operating status is, and have a record of it you can refer to.
This can easily be accomplished by monitoring the system performance with logs, SNMP tools,
or regularly running information gathering commands and saving the output. This regular
operation data will show trends, and enable you to see when changes happen and there may be
a problem.
Back up your FortiOS configuration on a regular basis. This is a good practice for
everyday as well as when troubleshooting. You can restore the backed up configuration
when needed and save the time and effort of re-creating it from the factory default
settings.
Some fundamental CLI commands you can use to obtain normal operating data for your
system:
get system performance status Displays CPU and memory states, average
network usage, average sessions and session
setup rate, virus caught, IPS attacks blocked, and
uptime.
Page 58
get system session status Displays total number of sessions
get router info routing-table Displays all the routes in the routing table including
all their type, source, and other useful data.
get ips session Displays memory used and max available to IPS
as well and counts.
diagnose firewall statistic Displays the amount of network traffic broken down
show into categories such as email, VoIP, TCP, UDP, IM,
Gaming, P2P, and Streaming.
These commands are just a sample. Feel free to include any extra information gathering
commands that apply to your system. For example if you have active VPN connections, record
information about them using the get vpn * series of commands.
For an extensive snapshot of your system, run the CLI command used by TAC to gather
extensive information about a system exec tac report. It runs many diagnostic
commands that are for specific configurations. This means no matter what features you are
using, this command will record their current state. Then if you need to perform troubleshooting
at a later date, you can run the same command again and compare the differences to quickly
locate suspicious output you can investigate.
The following questions can help determine the scope of the problem and isolate it:
What is the problem?
Do not assume that the problem is being experienced is the actual problem. First determine
that the problem does not lie elsewhere before starting to troubleshoot the FortiGate device.
Has it ever worked before?
If the device never worked from the first day, you may not want to spend time
troubleshooting something that could well be defective. See Troubleshooting bootup
Can the problem be reproduced at will or is it intermittent?
If the problem is intermittent, it may be dependent on system load. Also an intermittent
problem can be very difficult to troubleshoot due to the difficulty reproducing the issue.
What has changed?
Do not assume that nothing has changed in the network. Use the FortiGate event log to see
if any configuration changes were made. The change could be in the operating environment,
for example, a gradual increase in load as more sites are forwarded through the firewall.
If something has changed, see what the affect is if the change is rolled back.
Determine the scope of the problem - after you have isolated the problem what applications,
users, devices, and operating systems does it effect?
Fortinet Technologies Inc. Page 59 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Before you can solve a problem, you need to understand it. Often this step can be the longest in
this process.
Ask questions such as:
What is not working? Be specific.
Is there more than one thing not working?
Is it partly working? If so, what parts are working?
Is it a connectivity issue for the whole device, or is there an application that isnt reaching the
Internet?
Be as specific as possible with your answers, even if it takes awhile to find the answers.
These questions will help you define the problem. Once the problem is defined, you can search
for a solution and then create a plan on how to solve it.
Gathering Facts
Fact gathering is an important part of defining the problem. Record the following information as
it applies to the problem:
Where did the problem occur?
When did the problem occur and to whom?
What components are involved?
What is the affected application?
Can the problem be traced using a packet sniffer?
Can the problem be traced in the session table or using system debugging?
Can log files be obtained that indicate a failure has occurred?
Answers to these questions will help you narrow down the problem, and what you have to
check during your troubleshooting. The more things you can eliminate, the fewer things you
need to check during troubleshooting. For this reason, be as specific and accurate as you can
while gathering facts.
Once you have defined the problem, and searched for a solution you can create a plan to solve
that problem. Even if your search didnt find a solution to your problem you may have found
some additional things to check to further define your problem.
The plan should list all the possible causes of the problem that you can think of, and how to test
for each possible cause.
Your troubleshooting plan will act as a checklist so that you know what you have tried and what
is left to check. This is important to have if more than one person will be doing the
troubleshooting. Without a written plan, people will become easily confused and steps will be
skipped. Also if you have to hand over the problem to someone else, providing them with a
detailed list of what data has been gathered and what solutions have been already tried
demonstrates a good level of professionalism.
Be ready to add to your plan as needed. After you are part way through, you may discover that
you forgot some tests or a test you performed discovered new information. This is normal.
Also if you contact support, they will require information about your problem as well as what you
have already tried to fix the problem. This should all be part of your plan.
Fortinet Technologies Inc. Page 60 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Providing Supporting Elements
If the Fortinet Technology Assistance Center (TAC) needs to be contacted to help you with your
issue, be prepared to provide the following information:
The firmware build version (use the get system status command)
A network topology diagram
A recent configuration file
Optionally, a recent debug log
Tell the support team what troubleshooting steps have already been performed and the
results.
Do not provide the output from exec tac report unless Support requests it. The output
from that command is very large and is not required in many cases.
For additional information about contacting Fortinet Customer Support, see Technical Support
Organization Overview on page 62.
All of this is your troubleshooting plan.
You may require additional networking equipment, computers, or other equipment to test your
solution.
Normally network administrators have additional networking equipment available either to loan
you, or a lab where you can bring the FortiGate unit to test.
If you do not have access to equipment, check for shareware applications that can perform the
same task. Often there are software solutions when hardware is too expensive.
Before troubleshooting your FortiGate unit, you will need administrator access to the
equipment. If you are a client on a FortiGate unit with virtual domains enabled, often you can
troubleshoot within your own VDOM. However, you should inform your FortiGate units super
admin that you will be doing troubleshooting.
Also, you may need access to other networking equipment such as switches, routers, and
servers to help you test. If you do not normally have access to this equipment, contact your
network administrator for assistance.
You have defined your problem, researched a solution, put together a plan to find the solution,
and executed that plan. At this point if the problem has not been solved, its time to contact
Fortinet Customer Support for assistance.
For more information, see Technical Support Organization Overview on page 62.
Fortinet Technologies Inc. Page 61 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Technical Support Organization Overview
This section explains how Fortinets technical support works, as well as how you can easily
create an account to get technical support for when issues arise that you cannot solve yourself.
This section contains the following topics:
Fortinet Global Customer Services Organization
Creating an account
Registering a device
Reporting problems
Assisting technical support
Support priority levels
Return material authorization process
The Fortinet Global Customer Services Organization is composed of three regional Technical
Assistance Centers (TAC):
The Americas (AMER)
Europe, Middle East, and Africa (EMEA)
Asia Pacific (APAC)
The regional TACs are contacted through a global call center. Incoming service requests are
then routed to the appropriate TAC. Each regional TAC delivers technical support to the
customers in its regions during its hours of operation. These TACs also combine to provide
seamless, around-the-clock support for all customers.
Page 62
Creating an account
To receive technical support and service updates, Fortinet products in the organization must be
registered. The Product Registration Form on the support website will allow the registration to
be completed online. Creating an account on the support website is the first step in registering
products.
Go to the Fortinet support site shown below:
https://support.fortinet.com/
Once the support account has been created, product details can be provided by going to the
Product Register/Renew and Manage Product buttons displayed on the home page. Alternately,
the product registration can be completed at a later time.
Registering a device
Complete the following steps when registering a device for support purposes:
1. Log in using the Username and Password defined when the account was created
2. Under the Asset section, select Register/Renew to go to the Registration Wizard.
Alternatively, use the Asset menu at the top of the page.
3. Get a serial number from the back of the FortiGate unit or from the exterior of the FortiGate
shipping box.
Fortinet Technologies Inc. Page 63 FortiOS Handbook - Troubleshooting for FortiOS 5.0
4. Enter the serial number, service contract registration code or license certificate number to
start the product registration.
Reporting problems
Problems can be reported to a Fortinet Technical Assistance Center in the following ways:
By logging an online ticket
By phoning a technical support center
Fortinet partners
Fortinet Partners are entitled to priority web-based technical support. This service is designed
for partners who provide initial support to their customers and who need to open a support
ticket with Fortinet on their behalf. We strongly encourage submission and follow up of support
tickets using this service.
The support ticket can be submitted after logging into the partner website using one of the
following links using FortiPartner account details:
http://partners.fortinet.com
This link will redirect to the general Fortinet Partner Portal extranet website. Click Support >
Online Support Ticket.
https://forticare.fortinet.com/customersupport/Login/CommonLogin.aspx
Fortinet Technologies Inc. Page 64 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Fortinet customers
There are two methods to report a technical issue on the Fortinet Support website: creating a
technical support ticket by product or creating any type of ticket with the Ticket Wizard for more
options.
Fortinet customers should complete the following steps to create a support ticket by product:
1. Log in to the support website at the following address with the account credentials used
when the account was created:
https://support.fortinet.com
2. Navigate to the top menu, click Asset and select Manage/View Products.
3. In the product list, select the product that is causing the problem.
4. On the left side bar, go to the Assistance category, and select Technical Request to create a
TA Ticket.
5. Complete the Create TA Ticket fields.
6. Click View Products.
7. In the Products List, select the product that is causing the problem.
8. Complete the Create Support Ticket fields.
9. Select Finish to complete the support ticket.
Fortinet customers who would like to submit a customer service ticket, DOA ticket, RMA ticket,
or FortiGuard service ticket should use the Ticket Wizard and complete the following steps:
1. Log in to the support website at the following address with the account credentials used
when the account was created:
https://support.fortinet.com
2. Navigate to the top menu, click Assistance and select Create a Ticket from the drop down
menu.
3. Select a ticket type and complete the remaining steps in the Ticket Wizard.
4. Select Finish to complete the ticket.
Fortinet Technologies Inc. Page 65 FortiOS Handbook - Troubleshooting for FortiOS 5.0
6. Click Submit when complete.
Every web ticket update triggers a notification to the ticket owner, or ticket queue
supervisor.
The more information that can be provided to Fortinet technical support, the better they can
assist in resolving the issue. Every new support request should contain the following
information:
A valid contact name, phone number, and email address.
A clear and accurate problem description.
A detailed network diagram with complete IP address schema.
The configuration file, software version, and build number of the Fortinet device.
Additional log files such as Antivirus log, Attack log, Event log, Debug log or similar
information to include in the ticket as an attachment. If a third-party product is involved, for
example, email server, FTP server, router, or switch, please provide the information on its
software revision version, configuration, and brand name.
Fortinet technical support assigns the following priority levels to support cases:
Priority 1
This Critical priority is assigned to support cases in which:
The network or system is down causing customers to experience a total loss of service.
There are continuous or frequent instabilities affecting traffic-handling capability on a
significant portion of the network.
There is a loss of connectivity or isolation to a significant portion of the network.
This issue has created a hazard or an emergency.
Priority 2
This Major priority is assigned to support cases in which:
The network or system event is causing intermittent impact to end customers.
There is a loss of redundancy.
There is a loss of routine administrative or diagnostic capability.
Fortinet Technologies Inc. Page 66 FortiOS Handbook - Troubleshooting for FortiOS 5.0
There is an inability to deploy a key feature or function.
There is a partial loss of service due to a failed hardware component.
Priority 3
This Medium priority is assigned to support cases in which:
The network event is causing only limited impact to end customers.
Issues seen in a test or pre-production environment exist that would normally cause adverse
impact to a production network.
The customer is making time sensitive information requests.
There is a successful workaround in place for a higher priority issue.
Priority 4
This Minor priority is assigned to support cases in which:
The customer is making information requests and asking standard questions about the
configuration or functionality of equipment.
Customers must report Priority 1 and 2 issues by phone directly to the Fortinet EMEA Support
Center.
For lower priority issues, you may submit an assistance request (ticket) via the web system.
The web ticket system also provides a global overview of all ongoing support requests.
In some cases hardware issues are experienced and a replacement unit must be sent. This is
referred to as a Return Material Authorization (RMA). In these cases or RMAs, the support
contract must be moved to the new device. Customers can move the support contract from the
failing production unit to the new device through the support web site.
Fortinet Technologies Inc. Page 67 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Common questions
The general troubleshooting tips include, and can help answer the following questions.
How to verify the contents of the routing table (in NAT mode)
Are there routes in the routing table for default and static routes?
Do all connected subnets have a route in the routing table?
Does a route wrongly have a higher priority than it should?
Page 68
How to verify the correct firewall policy is being used
Is the correct firewall policy applied to the expected traffic?
Fortinet Technologies Inc. Page 69 FortiOS Handbook - Troubleshooting for FortiOS 5.0
How to check hardware connections
If there is no traffic flowing from the FortiGate unit, it may be a hardware problem.
To check hardware connections:
Ensure the network cables are properly plugged into the interfaces.
Ensure there are connection lights for the network cables on the unit.
Change the cable if the cable or its connector are damaged or you are unsure about the
cables type or qualitysuch as straight through or crossover, or possibly exposed wires at
the connector.
Connect the FortiGate unit to different hardware.
Ensure the link status is set to Up for the interface, (see Network > Interface > Status). The
link status is based on the physical connection and cannot be set in FortiOS.
If any of these solve the problem, it was a hardware connection problem. You should still
perform some basic software connectivity tests to ensure complete connectivity. It might also
be that the interface is disabled, or has its Administrative Status set to Down.
Interface settings
If you can access the FortiGate unit with the management cable only, the first step is to display
the interface settings. To display the settings for the internal interface, use the following CLI
command:
FGT# show system interface <Interface_mane>
For a complete listing of all the possible interface settings, use the following CLI command:
config system interface
edit <Interface_name>
get
end
Fortinet Technologies Inc. Page 70 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Check the interface settings to ensure they are not preventing traffic. Specific things to check
include (only the web-based manager names are shown, CLI names may vary slightly):
Link Status Down until a valid cable is plugged into this interface, after which it will be
Up. The Link Status is shown physically by the connection LED for the interface. If it lights up
green, it is a good connection. If Link Status is Down, the interface does not work. Link
Status is also displayed on the System > Network > Interface screen by default.
Addressing mode Do not use DHCP if you dont have a DHCP server you will not be
able to logon to an interface in DHCP mode as it will not have an IP address.
IP/Netmask An interface needs an IP address to be able to connect to other devices.
Ensure there is a valid IP address in this field. The one exception is if DHCP is enabled for
this interface to get its IP address from an external DHCP server.
IPv6 address The same protocol must be used by both ends to complete the connection.
Ensure both this interface and the remote connection are both using IPv4 or both using IPv6
addressing.
Administrative access If no protocols are selected, you will have to use the local
management cable to connect to the unit. If you are using IPv6, configure the IPv6
administrative access protocols.
Administrative status Set to Up or the interface will not work.
DNS settings
While this section is not complicated, many networking problems can be traced back to DNS
problems. Things to check in this area include:
Are there values for both primary and secondary entries?
Is the local domain name correct?
Are you using IPv6 addressing? If so, are the IPv6 DNS settings correct?
Are you using Dynamic DNS (DDNS)? If so, is it using the correct server, credentials, and
interface?
Can you contact both DNS servers to verify the servers are operational?
If an interface addressing mode is set to DHCP and is set to override the internal DNS, is that
interface receiving a valid DNS entry from the DHCP server? Is it a reasonable address and
can it be contacted to verify its operational?
Are there any DENY security policies that need to allow DNS?
Can any internal device perform a successful traceroute to a location using the FQDN? See
Traceroute.
Fortinet Technologies Inc. Page 71 FortiOS Handbook - Troubleshooting for FortiOS 5.0
DHCP Server settings
DHCP Servers are common on internal and wireless networks. If the DHCP server is not
configured properly it can cause problems. Things to check in this area include:
Is the DHCP server entry set to Relay? If so, verify there is another DHCP server to which
requests can be relayed. Otherwise, it should be set to Server.
Is the DHCP server enabled?
Does this DHCP server use a valid range of IP addresses? Are those addresses in use by
other devices? If one or more devices are using IP addresses in this range, you can use the
IP reservation feature to ensure the DHCP server does not use these addresses.
Is there a gateway entry? Include a gateway entry to ensure clients of this server have a
default route.
Is the system DNS setting being used? The best practice is to avoid confusion by using the
system DNS whenever possible. However, the option to specify up to three custom DNS
servers is available, and all three entries should be used for redundancy.
There are some situations, such as a new wireless interface, or during the initial
FortiGate unit configuration, where interfaces override the system DNS entries. When
this happens, it often shows up as intermittent Internet connectivity. To fix the problem,
go to System > Network > DNS and ensure to enable Use FortiGuard Servers.
Fortinet Technologies Inc. Page 72 FortiOS Handbook - Troubleshooting for FortiOS 5.0
scanning will go into failopen mode where it will start dropping connections or bypass the
antivirus system.
The other lines of output, such as average network usage, average session setup rate, viruses
caught, and IPS attacks blocked can also help you determine why system resource usage it
high. For example, if network usage is high it will result in high traffic processing on the
FortiGate, or if the session setup rate is very low or zero the proxy may be overloaded and not
able to do its job.
Fortinet Technologies Inc. Page 73 FortiOS Handbook - Troubleshooting for FortiOS 5.0
How to troubleshoot high CPU usage
FortiOS has many features. If many of them are used at the same time, it can quickly use up all
the CPU resources. When this happens, you will experience connection related problems
stemming from the FortiOS unit trying to manage its workload by refusing new connections, or
even more aggressive methods.
Some examples of features that are CPU intensive are VPN high level encryption, having all
traffic undergo all possible scanning, logging all traffic, and packets, and dashboard widgets
that frequently update their data.
1. Determine how high the CPU usage is currently.
There are two main ways to do this. The easiest is to go to System > Dashboard > Status
and look at the resource monitor. This is a dial gauge that displays a percentage use for the
CPU. If its at the red-line, you should take action. The other method is to use the Dashboard
CLI widget to enter diag sys top.
Sample output:
Run Time: 11 days, 23 hours and 36 minutes
0U, 0S, 98I; 1977T, 758F, 180KF
newcli 286 R 0.1 0.8
ipsengine 78 S < 0.0 3.1
ipsengine 64 S < 0.0 3.0
ipsengine 77 S < 0.0 3.0
ipsengine 68 S < 0.0 2.9
ipsengine 66 S < 0.0 2.9
ipsengine 79 S < 0.0 2.9
scanunitd 133 S < 0.0 1.8
pyfcgid 267 S 0.0 1.8
pyfcgid 269 S 0.0 1.7
pyfcgid 268 S 0.0 1.6
httpsd 139 S 0.0 1.6
pyfcgid 266 S 0.0 1.5
scanunitd 131 S < 0.0 1.4
scanunitd 132 S < 0.0 1.4
proxyworker 90 S 0.0 1.3
cmdbsvr 43 S 0.0 1.1
proxyworker 91 S 0.0 1.1
miglogd 55 S 0.0 1.1
httpsd 135 S 0.0 1.0
Fortinet Technologies Inc. Page 74 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Where the codes displayed on the second output line mean the following:
U is % of user space applications using CPU. In the example, 0U means 0% of the user
space applications are using CPU.
S is % of system processes (or kernel processes) using CPU. In the example, 0S means
0% of the system processes are using the CPU.
I is % of idle CPU. In the example, 98I means the CPU is 98% idle.
T is the total FortiOS system memory in Mb. In the example, 1977T means there are
1977 Mb of system memory.
F is free memory in Mb. In the example, 758F means there is 758 Mb of free memory.
KF is the total shared memory pages used. In the example, 180KF means the system is
using 180 shared memory pages.
Each additional line of the command output displays information for each of the processes
running on the FortiGate unit. For example, the third line of the output is:
newcli 286 R 0.1 0.8
Where:
newcli is the process name. Other process names can include ipsengine, sshd,
cmdbsrv, httpsd, scanunitd, and miglogd.
286 is the process ID. The process ID can be any number.
R is the current state of the process. The process state can be:
R running
S sleep
Z zombie
D disk sleep.
0.1 is the amount of CPU that the process is using. CPU usage can range from 0.0 for a
process that is sleeping to higher values for a process that is taking a lot of CPU time.
0.8 is the amount of memory that the process is using. Memory usage can range from
0.1 to 5.5 and higher.
Enter the following single-key commands when diagnose sys top is running:
Press q to quit and return to the normal CLI prompt.
Press p to sort the processes by the amount of CPU that the processes are using.
Press m to sort the processes by the amount of memory that the processes are using.
Fortinet Technologies Inc. Page 75 FortiOS Handbook - Troubleshooting for FortiOS 5.0
2. Determine what features are using most of the CPU resources.
There is a command in the CLI to let you see the top few processes currently running that
use the most CPU resources. The CLI command get system performance top outputs
a table of information. You are interested in the second most right column, CPU usage by
percentage. If the top few entries are using most of the CPU, note which processes they are
and investigate those features to try and reduce their CPU load. Some examples of
processes you will see include:
ipsengine the IPS engine that scans traffic for intrusions
scanunitd antivirus scanner
httpsd secure HTTP
iked internet key exchange (IKE) in use with IPsec VPN tunnels
newcli active whenever you are accessing the CLI
sshd there are active secure socket connections
cmdbsrv the command database server application
Go to the features that are at the top of the list and look for evidence of them overusing the
CPU. Generally the monitor for a feature is a good place to start.
3. Check for unnecessary CPU wasters.
These are some best practises that will reduce your CPU usage, even if you are not
experiencing high CPU usage. Note that if you require a feature this section tells you to turn
off, ignore it.
Use hardware acceleration wherever possible to offload tasks from the CPU. Offloading
tasks such as encryption frees up the CPU for other tasks.
Avoid the use of GUI widgets that require computing cycles, such as the Top Sessions
widget. These widgets are constantly polling the system for their information, which uses
CPU and other resources.
Schedule antivirus, IPS, and firmware updates during off peak hours. Usually these dont
consume CPU resources but they can disrupt normal operation.
Check the log levels and which events are being logged. This is the severity of the
messages that are recorded. Consider going up one level to reduce the amount of
logging. Also if there are events you do not need to monitor, remove them from the list.
Log to FortiCloud instead of memory or Disk. Logging to memory quickly uses up
resources. Logging to local disk will impact overall performance and reduce the lifetime
of the unit. Fortinet recommends logging to FortiCloud which doesnt use much CPU.
If the disk is almost full, transfer the logs or data off the disk to free up space. When a
disk is almost full it consumes a lot of resources to find the free space and organize the
files.
If you have packet logging enabled, consider disabling it. When its enabled it records
every packet that comes through that policy.
Halt all sniffers and traces.
Ensure you are not scanning traffic twice. If traffic enters the FortiGate unit on one
interface, goes out another, and then comes back in again that traffic does not need to be
rescanned. Doing so is a waste of resources. However, ensure that traffic truly is being
scanned once.
Reduce the session timers to close unused sessions faster. To do this in the CLI enter the
following commands and values. These values reduce the values from defaults. Note that
tcp-timewait has 10 seconds added by the system by default.
config system global
set tcp-halfclose-timer 30
set tcp-halfopen-timer 30
set tcp-timewait-timer 0
Fortinet Technologies Inc. Page 76 FortiOS Handbook - Troubleshooting for FortiOS 5.0
set udp-idle-timer 60
end
Enable only features that you need under System > Config > Features.
4. When CPU usage is under control, use SNMP to monitor CPU usage. Alternately, use
logging to record CPU and memory usage every 5 minutes.
Once things are back to normal, you should set up a warning system to alert you of future
CPU overusage. A common method to do this is with SNMP. SNMP monitors many values
on the FortiOS and allows you to set high water marks that will generate events. You run an
application on your computer to watch for and record these events. Go to System > Config >
SNMP to enable and configure an SNMP community. If this method is too complicated, you
can use the System Resources widget to record CPU usage. However, this method will not
alert you to problems - it will just record them as they happen.
Fortinet Technologies Inc. Page 77 FortiOS Handbook - Troubleshooting for FortiOS 5.0
that can be useful in determining why particular services, such as email or web browsing, may
not be working properly.
If ping does not work, you likely have it disabled on at least one of the interface settings,
and security policies for that interface.
Both ping and traceroute require particular ports to be open on firewalls, or else they cannot
function. Since you typically use these tools to troubleshoot, you can allow them in the security
policies and on interfaces only when you need them, and otherwise keep the ports disabled for
added security.
Ping
The ping command sends a very small packet to the destination, and waits for a response. The
response has a timer that may expire, indicating the destination is unreachable. The behavior of
ping is very much like a sonar ping from a submarine, where the command gets its name.
Ping is part of Layer-3 on the OSI Networking Model. Ping sends Internet Control Message
Protocol (ICMP) echo request packets to the destination, and listens for echo response
packets in reply. However, many public networks block ICMP packets because ping can be
used in a denial of service (DoS) attack (such as Ping of Death or a smurf attack), or by an
attacker to find active locations on the network. By default, FortiGate units have ping enabled
while broadcast-forward is disabled on the external interface.
Fortinet Technologies Inc. Page 78 FortiOS Handbook - Troubleshooting for FortiOS 5.0
PING 10.11.101.101 (10.11.101.101): 56 data bytes
64 bytes from 10.11.101.101: icmp_seq=0 ttl=255 time=0.3 ms
64 bytes from 10.11.101.101: icmp_seq=1 ttl=255 time=0.2 ms
64 bytes from 10.11.101.101: icmp_seq=2 ttl=255 time=0.2 ms
64 bytes from 10.11.101.101: icmp_seq=3 ttl=255 time=0.2 ms
64 bytes from 10.11.101.101: icmp_seq=4 ttl=255 time=0.2 ms
Traceroute
Where ping will only tell you if it reached its destination and came back successfully, traceroute
will show each step of its journey to its destination and how long each step takes. If ping finds
an outage between two points, traceroute can be used to locate exactly where the problem is.
What is traceroute
Traceroute works by sending ICMP packets to test each hop along the route. It will send out
three packets, and then increase the time to live (TTL) setting by one each time. This effectively
allows the packets to go one hop farther along the route. This is the reason why most traceroute
commands display their maximum hop count before they start tracing the route that is the
maximum number of steps it will take before declaring the destination unreachable. Also, the
Fortinet Technologies Inc. Page 79 FortiOS Handbook - Troubleshooting for FortiOS 5.0
TTL setting may result in steps along the route timing out due to slow responses. There are
many possible reasons for this to occur.
By default, traceroute uses UDP datagrams with destination ports numbered from 33434 to
33534. The traceroute utility usually has an option to specify use of ICMP echo request (type 8)
instead, as used by the Windows tracert utility. If you have a firewall and if you want traceroute
to work from both machines (Unix-like systems and Windows) you will need to allow both
protocols inbound through your FortiGate security policies (UDP with ports from 33434 to
33534 and ICMP type 8).
You can also use the packet count column of the Policy & Objects > Policy page to track
traceroute packets. This allows you to verify the connection, but also confirm which security
policy the traceroute packets are using.
Fortinet Technologies Inc. Page 80 FortiOS Handbook - Troubleshooting for FortiOS 5.0
13 172 ms 164 ms 243 ms sl-321313-0.sprintlink.net
[144.223.243.58]
14 99 ms 94 ms 93 ms 203.78.181.18
15 108 ms 102 ms 89 ms 203.78.176.2
16 98 ms 95 ms 97 ms 208.70.202.225
Trace complete.
The first, or the left column, is the hop count, which cannot go over 30 hops. When that number
is reached, the traceroute ends.
The second, third, and fourth columns display how much time each of the three packets takes
to reach this stage of the route. These values are in milliseconds and normally vary quite a bit.
Typically a value of <1ms indicates a local connection.
The fifth, or the column farthest to the right, is the domain name of that device and its IP
address or possibly just the IP address.
Fortinet Technologies Inc. Page 81 FortiOS Handbook - Troubleshooting for FortiOS 5.0
How to check the logs
This step in troubleshooting can be forgotten, but its an important one. Logging records the
traffic passing through the FortiGate unit to your network and what action the FortiGate unit
took during its scanning process of the traffic. This recorded information is called a log
message.
When you configure FortiOS initially, log as much information as you can. If needed, logging of
unused features can be turned off or scaled back if the logs generated are too large.
As with most troubleshooting steps, before you can determine if the logs indicate a problem,
you need to know what logs result from normal operation. Without a baseline it is difficult to
properly troubleshoot.
When troubleshooting with log files:
Compare current logs to a recorded baseline of normal operation.
If needed increase the level of logging (such as from Warning to Information) to obtain more
information.
When increasing logging levels, ensure that alert email is configured and both disk usage and
log quota are selected. This ensures you will be notified if the increased logging causes
problems. You can also use Logging Monitor (located in Log&Report > Monitor > Logging
Monitor) to determine the activities that generate the most log entries.
check all logs to ensure important information is not overlooked
filter or order log entries based on different fields (such as level, service, or IP address) to
look for patterns that may indicate a specific problem (such as frequent blocked connections
on a specific port for all IP addresses)
Logs will help identify and locate any problems, but they will not solve the problems. The job of
logs is to speed up your problem solving and save you time and effort.
For more information on Logging and Log Reports, see the Logging and Reporting guide.
How to verify the contents of the routing table (in NAT mode)
When you have some connectivity, or possibly none at all a good place to look for information is
the routing table.
The routing table is where all the currently used routes are stored for both static and dynamic
protocols. If a route is in the routing table, it saves the time and resources of a lookup. If a route
is not used for a while and a new route needs to be added, the oldest least used route is
bumped if the routing table is full. This ensures the most recently used routes stay in the table. If
your FortiGate unit is in Transparent mode, you are unable to perform this step.
If the FortiGate is running in NAT mode, verify that all desired routes are in the routing table:
local subnets, default routes, specific static routes, and dynamic routing protocols.
To check the routing table in the web-based manager, use the Routing Monitor by going to
Router > Monitor > Routing Monitor.
In the CLI, use the command get router info routing-table all. Sample output:
FGT# get router info routing-table all
Fortinet Technologies Inc. Page 82 FortiOS Handbook - Troubleshooting for FortiOS 5.0
* - candidate default
Trace complete.
In this scenario, the first hop contains the IP address 10.10.1.99, which is the internal
interface of the FortiGate. The second hop contains the IP address 172.20.120.2, to which
the wan1 interface of the FortiGate is connected, so we can conclude that the route via wan1
interface is being used for this traffic.
Also debug the packet flow in the CLI shows the route taken for each session.
Sample output:
id=20085 trace_id=319 func=vf_ip4_route_input line=1597 msg="find a
route: gw-172.20.120.2 via wan1"
For more information on debuging the packet flow, see How to debug the packet flow.
Fortinet Technologies Inc. Page 83 FortiOS Handbook - Troubleshooting for FortiOS 5.0
How to verify the correct firewall policy is being used
If you have more than one firewall policy, use the count column to check which policy is being
used, the count must show traffic increasing. To do so, go to Policy & Objects > Policy page.
Also debuging the packet flow in the CLI shows the policy id allowing the traffic.
Sample output:
id=13 trace_id=1 func=fw_forward_handler line=650 msg="Allowed by
Policy-14: SNAT"
For more information on debuging the packet flow, see How to debug the packet flow.
Sample output:
#diagnose netlink brctl list
list bridge information
1. root.b fdb: size=256 used=6 num=7 depth=2 simple=no
Total 1 bridges
Fortinet Technologies Inc. Page 84 FortiOS Handbook - Troubleshooting for FortiOS 5.0
To display the information for forward domains
Use the following command:
diagnose netlink brctl domain <name> <id>
where <name> is the name of the forwarding domain to display and <id> is the domain id.
Sample output
diagnose netlink brctl domain ione 101
show bridge root.b ione forward domain.
id=101 dev=trunk_1 6
To list the existing bridge MAC table, use the following command:
diagnose netlink brctl name host <name>
Sample output
show bridge control interface root.b host.
fdb: size=256, used=6, num=7, depth=2, simple=no
Bridge root.b host table
Sample Output:
show bridge root.b data port.
trunk_1 peer_dev=0
internal peer_dev=0
dmz peer_dev=0
wan2 peer_dev=0
wan1 peer_dev=0
Fortinet Technologies Inc. Page 85 FortiOS Handbook - Troubleshooting for FortiOS 5.0
behavior when memory is running low or the proxy connection limit has been reached. There
are two related commands for this in the CLI:
config system global
set av-failopen-session {enable | disable}
set av-failopen { idledrop | off | one-shot | pass}
end
av-failopen-session must be enabled to set the behavior for these conditions. When it is
enabled, and a proxy for a protocol runs out of room in its session table that protocol goes into
failopen mode and behaves as defined in the av-failopen command.
av-failopen determines the behavior of the proxy until entries are free in the session table
again for that proxy.
idledrop This option removes idle sessions from the session table, starting with the
clients that have the most sessions currently open. This method assumes that idle sessions
are not being used and it will not cause problems to close these sessions. This is usually
true, but some applications may have problems with this and start complaining about either
not having or being able to open a session. If this occurs, try another method to check if this
is really the problem. This is a secure option as no unscanned traffic is allowed to pass.
off This option turns off accepting any new AV sessions, but will continue to process any
existing AV sessions that are currently active. All the protocols listed (HTTP, SMTP, POP3,
IMAP, FTP, and NNTP) are scanned by FortiGate Antivirus. If AV scanning is enabled,
av-failopen off is selected, and the proxy session table fills up, then no new sessions of that
type will be accepted. For example, if POP3 session table is filled and email AV scanning is
enabled, no more POP3 connections will be allowed until the session table gets some free
space. This is a secure option because no unscanned traffic is allowed to pass.
one-shot When memory is low, bypass the antivirus system. The name one-shot comes
from the fact that once you are in one-shot av-failopen mode, you must set av-failopen to
either pass or off to restart AV scanning. This is a very unsecure option because it allows all
traffic without AV scanning, and it never reverts to normal without manual assistance.
pass When memory is low, bypass the antivirus system much as one-shot. The difference
is that when memory is freed up, the system will start AV scanning automatically again. This
is an unsecure option because it allows traffic to pass without AV scanning. However, it is
better than one-shot because it automatically restarts AV scanning when possible.
If the proxy session table is full for one or more protocols and your FortiGate unit enters into
conserve or failopen mode, it will appear as if you have lost connections, network services are
intermittent or non-existent, and yet other services work normally for a while until their sessions
end and they join the queue of session-starved applications.
Due to the amount of output from this command, you should connect to the CLI with a
terminal program, such as puTTY, that logs output. Otherwise, you will likely not be able
to access all the output information from the command.
In the following output, only the HTTP entries are displayed. The other protocols have been
removed in an attempt to shorten the output. There will be separate entries for each supported
protocol (HTTP, SMTP, POP3, IMAP, FTP, and NNTP) in each section of the output.
Fortinet Technologies Inc. Page 86 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Worker[0]
HTTP Common
Current Connections 8/8032
Max Concurrent Connections 76
Worker Stat
Running time (HH:MM:SS:usec) 29:06:27:369365
Time in loop scanning 2:08:000198
Error Count (accept) 0
Error Count (read) 0
Error Count (write) 0
Error Count (poll) 0
Error Count (alloc) 0
Last Error 0
Acceptor Read 6386
Acceptor Write 19621
Acceptor Close 0
HTTP Stat
Bytes sent 667012 (kb)
Bytes received 680347 (kb)
Error Count (alloc) 0
Error Count (accept) 0
Error Count (bind) 0
Error Count (connect) 0
Error Count (socket) 0
Error Count (read) 134
Error Count (write) 0
Error Count (retry) 40
Error Count (poll) 0
Error Count (scan reset) 2
Error Count (urlfilter wait) 3
Last Error 104
Web responses clean 17950
Web responses scan errors 23
Web responses detected 16
Web responses infected with worms 0
Web responses infected with viruses 0
Web responses infected with susp 0
Web responses file blocked 0
Web responses file exempt 0
Web responses bannedword detected 0
Web requests oversize pass 16
Web requests oversize block 0
Last Server Scan errors 102
URL requests exempt 0
URL requests blocked 0
URL requests passed 0
URL requests submit error 0
URL requests rating error 0
URL requests rating block 0
URL requests rating allow 10025
URL requests infected with worms 0
Web requests detected 0
Web requests file blocked 0
Fortinet Technologies Inc. Page 87 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Web requests file exempt 0
POST requests clean 512
POST requests scan errors 0
POST requests infected with viruses 0
POST requests infected with susp 0
POST requests file blocked 0
POST requests bannedword detected 0
POST requests oversize pass 0
POST requests oversize block 0
Web request backlog drop 0
Web response backlog drop 0
Worker Accounting
poll=721392/649809/42 pollfail=0 cmdb=85 scan=19266 acceptor=25975
HTTP Accounting
setup_ok=8316 setup_fail=0 conn_ok=0 conn_inp=8316
urlfilter=16553/21491/20 uf_lookupf=0
scan=23786 clt=278876 srv=368557
SMTP Accounting
setup_ok=12 setup_fail=0 conn_ok=0 conn_inp=12
scan=12 suspend=0 resume=0 reject=0 spamadd=0 spamdel=0 clt=275
srv=279
POP3 Accounting
setup_ok=30 setup_fail=0 conn_ok=0 conn_inp=30
scan=3 clt=5690 srv=5836
IMAP Accounting
setup_ok=0 setup_fail=0 conn_ok=0 conn_inp=0
scan=0 clt=0 srv=0
FTP Accounting
setup_ok=0 setup_fail=0 conn_ok=0 conn_inp=0
scan=0 clt=0 srv=0 datalisten=0 dataclt=0 datasrv=0
NNTP Accounting
setup_ok=0 setup_fail=0 conn_ok=0 conn_inp=0
scan=0 clt=0 srv=0
The output from this command falls into the following sections:
HTTP Common current connections There is an entry for each protocol that displays
the connections currently used, and the maximum connections allowed. This maximum is for
the UTM proxy, which means all the protocols connections combined cannot be larger than
this number. To support this, note that the maximum session count for each protocol is the
same. You may also see a line titled Max Concurrent Connections for each protocol.
This number is the maximum connections of this type allowed at one time. If VDOMs are
enabled, this value is defined either on the global or per-VDOM level at VDOM > Global
Resources or in the CLI at config system resource-limits.
Worker Stat This is statistics about the UTM proxy including how long it has been
running, and how many errors it has found.
HTTP Stat This section includes statistics about the HTTP protocol proxy. This is a very
extensive list covering errors, web responses, and any UTM positive matches. There are
Fortinet Technologies Inc. Page 88 FortiOS Handbook - Troubleshooting for FortiOS 5.0
similar sections for each protocol, but the specific entries in each vary based on what UTM
scanning is looking for in each spam control for email, file transfer blocking for FTP, and
so on.
Worker Accounting Lists accounting information about the UTM proxy such as polling
statistics, how many sessions were scanned, and how many were just accepted. This
information can tell you if expect AV scanning is taking place or not. Under normal operation
there should be no errors or fails.
HTTP Accounting The accounting sections for each protocol provide information about
successful session creation, failures, how many sessions are being scanned or filtered, and
how many are client or server originated. If setup_fail is larger than zero, run the command
again to see if it is increasing quickly. If it is, your FortiGate unit may be in conserve mode.
Related commands
To dump memory usage:
# get test proxyworker 1
To display statistics per VDOM:
# get test proxyworker 4444
To restart the proxy:
# get test proxyworker 99
To examine the firewall session list - web-based manager go to System > Dashboard > Top
Sources
The following example shows filtering the session list based on a destination address of
172.20.120.222.
FGT# diag sys session filter dst 172.20.120.222
FGT# diag sys session list
Fortinet Technologies Inc. Page 89 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Check source NAT information
Remember NAT when troubleshooting connections. NAT is especially important if you are
troubleshooting from the remote end of the connection outside the FortiGate unit firewall. On
the dashboard session list, pay attention to Src address after NAT, and Src port after NAT.
These columns display the IP and port values after NAT has been applied.
The NAT values can be helpful to ensure they are the values you expect, and to ensure the
remote end of the sessions can see the expected IP address and port number.
When displaying the session list in the CLI, you can match the NATed source address (nsrc)
and port (nport). This can be useful if multiple internal IP addresses are NATed to a common
external facing source IP address.
FGT# diag sys session filter nsrc 172.20.120.122
FGT# diag sys session filter nport 8888
FGT# diag sys session list
Fortinet Technologies Inc. Page 90 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Sample output:
FG100D# execute ping service.fortiguard.net
PING guard.fortinet.net (208.91.112.196): 56 data bytes
64 bytes from 208.91.112.196: icmp_seq=0 ttl=51 time=61.0 ms
64 bytes from 208.91.112.196: icmp_seq=1 ttl=51 time=60.0 ms
64 bytes from 208.91.112.196: icmp_seq=2 ttl=51 time=59.6 ms
64 bytes from 208.91.112.196: icmp_seq=3 ttl=51 time=58.9 ms
64 bytes from 208.91.112.196: icmp_seq=4 ttl=51 time=59.2 ms
If your FortiGate unit has NP2/NP4 interfaces that are offloading traffic, this will change
the sniffer trace. Before performing a trace on any NP2/NP4 interfaces, you should
disable offloading on those interfaces.
If you configure virtual IP addresses on your FortiGate unit, it will use those addresses in
preference to the physical IP addresses. You will notice this when you are sniffing
packets because all the traffic will be using the virtual IP addresses. This is due to the
ARP update that is sent out when the VIP address is configured.
Fortinet Technologies Inc. Page 91 FortiOS Handbook - Troubleshooting for FortiOS 5.0
To stop the sniffer, type CTRL+C.
<filter> What to look for in the information the sniffer reads. none
indicates no filtering, and all packets will be displayed as the other
arguments indicate.
The filter must be inside single quotes ().
<count> The number of packets the sniffer reads before stopping. If you do
not put a number here, the sniffer will run forever unit you stop it
with <CTRL C>.
For a simple sniffing example, enter the CLI command diag sniffer packet port1 none
1 3. This will display the next three packets on the port1 interface using no filtering, and using
verbose level 1. At this verbosity level you can see the source IP and port, the destination IP and
port, action (such as ack), and sequence numbers.
In the output below, port 443 indicates these are HTTPS packets, and 172.20.120.17 is both
sending and receiving traffic.
Head_Office_620b # diag sniffer packet port1 none 1 3
interfaces=[port1]
filters=[none]
0.545306 172.20.120.17.52989 -> 172.20.120.141.443: psh 3177924955
ack 1854307757
For a more advanced example of packet sniffing, the following commands will report packets
on any interface travelling between a computer with the host name of PC1 and the computer
with the host name of PC2. With verbosity 4 and above, the sniffer trace will display the
interface names where traffic enters or leaves the FortiGate unit. Remember to stop the sniffer,
type CTRL+C.
FGT# diagnose sniffer packet any "host <PC1> or host <PC2>" 4
or
FGT# diagnose sniffer packet any "(host <PC1> or host <PC2>) and
icmp" 4
Fortinet Technologies Inc. Page 92 FortiOS Handbook - Troubleshooting for FortiOS 5.0
The following sniffer CLI command includes the ARP protocol in the filter which may be useful
to troubleshoot a failure in the ARP resolution (for instance PC2 may be down and not
responding to the FortiGate ARP requests).
FGT# diagnose sniffer packet any "host <PC1> or host <PC2> or arp" 4
Packet Capture
When troubleshooting networks, it helps to look inside the header of the packets. This helps to
determine if the packets, route, and destination are all what you expect. Packet capture can
also be called a network tap, packet sniffing, or logic analyzing.
To use the packet capture:
1. Go to System > Network > Packet Capture.
2. Select the interface to monitor and select the number of packets to keep.
3. Select Enable Filters.
4. Enter the information you want to gather from the packet capture.
5. Select OK.
To run the capture, select the play button in the progress column in the packet capture list. If
not active, Not Running will also appear in the column cell. The progress bar will indicate the
status of the capture. You can stop and restart it at any time.
When the capture is complete, click the Download icon to save the packet capture file to your
hard disk for further analysis.
Packet capture tells you what is happening on the network at a low level. This can be very
useful for troubleshooting problems, such as:
Finding missing traffic.
Seeing if sessions are setting up properly.
Locating ARP problems such as broadcast storm sources and causes.
Confirming which address a computer is using on the network if they have multiple addresses
or are on multiple networks.
Confirming routing is working as you expect.
Wireless client connection problems.
Intermittent missing PING packets.
A particular type of packet is having problems, such as UDP, which is commonly used for
streaming video.
If you are running a constant traffic application such as ping, packet capture can tell you if the
traffic is reaching the destination, how the port enters and exits the FortiGate unit, if the ARP
resolution is correct, and if the traffic is returning to the source as expected. You can also use
packet switching to verify that NAT or other configuration is translating addresses or routing
traffic the way that you want it to.
Before you start capturing packets, you need to have a good idea of what you are looking for.
Capture is used to confirm or deny your ideas about what is happening on the network. If you
try capture without a plan to narrow your search, you could end up with too much data to
effectively analyze. On the other hand, you need to capture enough packets to really
understand all of the patterns and behavior that you are looking for.
Fortinet Technologies Inc. Page 93 FortiOS Handbook - Troubleshooting for FortiOS 5.0
How to debug the packet flow
Traffic should come in and leave the FortiGate unit. If you have determined that network traffic is
not entering and leaving the FortiGate unit as expected, debug the packet flow.
Debugging can only be performed using CLI commands. Debugging the packet flow requires a
number of debug commands to be entered as each one configures part of the debug action,
with the final command starting the debug.
If your FortiGate unit has FortiASIC NP4 interface pairs that are offloading traffic, this will
change the packet flow. Before performing the debug on any NP4 interfaces, you should
disable offloading on those interfaces.
The following configuration assumes that PC1 is connected to the internal interface of the
FortiGate unit and has an IP address of 10.11.101.200. PC1 is the host name of the computer.
To debug the packet flow in the CLI, enter the following commands:
FGT# diag debug disable
FGT# diag debug flow filter add <PC1>
FGT# diag debug flow show console enable
FGT# diag debug flow show function-name enable
FGT# diag debug flow trace start 100
FGT# diag debug enable
The start 100 argument in the above list of commands will limit the output to 100 packets
from the flow. This is useful for looking at the flow without flooding your log or displaying too
much information.
The following is an example of debug flow output for traffic that has no matching security policy,
and is in turn blocked by the FortiGate unit. The denied message indicates that the traffic was
blocked.
id=20085 trace_id=319 func=resolve_ip_tuple_fast line=2825
msg="vd-root received a packet(proto=6,
192.168.129.136:2854->192.168.96.153:1863) from port3."
Fortinet Technologies Inc. Page 94 FortiOS Handbook - Troubleshooting for FortiOS 5.0
Index
A G
accelerated interfaces 94 get system performance
Administrative Status 70 status 72
anti-spoofing 91 top 72
ARP global 42
cache 53
duplicate packets 84 I
resolution 93 ICAP 15
asymmetric routing 91 identify-based policies 15
av-failopen 85 inspection
flow 10
B flow-based 10
Berkeley Packet Filtering (BPF) 48 proxy 11
brctl,netlink 85 security layers 12
bridge, Trasnparent mode 84 stateful 8
interface
C accelerated NP2 94
collision domain 84 link status 70
pairs 94
connectionless 9
Internet Control Message Protocol (ICMP) 78
conserve mode 85
IP stack validation 13
CPU usage 72
D L
layer 4 13
date 29, 54
Layer-2 84
debug flow 94
Layer-3 78
default
password 7 LDAP 55
Define the problem 58 life of a packet 8
UDP 8
Denial of Service (DoS) 14
link status 70
diagnose commands
diag debug 94 Linux 79, 81
diag netlink 85 M
domain name server (DNS) 77
MAC table 85
Duplicate ARP packet 84
memory usage 72
E middle-man 15
Establish a baseline 58 MS Windows 80
F N
firewall session setup rate 41 netlink 85
flow inspection 10 Network Time Protocol (NTP) 30, 55
flow-based NP2 interface 94
inspection 10
O
FortiASIC 94
FortiGuard Distribution System (FDS) 56 OSI
Antispam 7 Layer-2 84
Antivirus 7 Layer-3 78
servers 57 P
forward domain 84
packet
flow 12, 94
life of 8
sniffer 91
Page 95
Packet verification 13 sniffer, verbosity level 92
password ssl.root 15
administrator 7 stateful inspection 8, 91
ping 78 stateless 8
ports SYSLOG 55
port 1024 57 system resources 72
port 1025 57
port 443 92 T
port 53 57 TCP header flags 8
port 8888 57 TCP SYN packets 14
UDP ports 33434-33534 80 TCP/IP stack 15
problem scope 59 Technology Assistance Center (TAC) 61
proxy inspection 11 time 29, 54
R time to live (TTL) 79
tracert (traceroute) 79, 80
RADIUS 55
troubleshooting
Return Material Authorization (RMA) 67
debug packet flow 94
Reverse Path Forwarding (RPF) 91 firewall session list 89
Round Trip Time (RTT) 57 packet sniffing 91
routing ping 77
bridge 84 routing table 82
routing table 14 traceroute 77
S U
security layers 12 UDP 8
Session creation 13
session helper 15 V
session tables 15 VDOM 41, 42, 61, 88
signature-based IPS 14 Verifications of IP options 13
Fortinet Technologies Inc. Page 96 FortiOS Handbook - Virtual Domains for FortiOS 5.0