???????? ??????? ?????????
???????? ??????? ?????????
???????? ??????? ?????????
objectives:
FortiGuard Labs: FortiGate with a valid antivirus license can update antivirus
signature databases from FortiGuard servers.
FortiGate Antivirus Scanning:
FortiGate uses many techniques to detect viruses. These detection techniques include:
Packet Flow
* Note that:
Flow-based inspection mode doesn’t allow the profile to
inspect the MAPI and SSH protocols traffic.
Configuration
Flow-based inspection mode is the default mode, and its configuration consists of two
steps:
• Creating an AntiVirus Profile with the selection of the inspected protocols, and the
action taken when the FortiGate detects a virus infected file: Block, Monitor.
FortiOS includes two preloaded antivirus profiles:
• default
• wifi-default
You can customize these profiles, or you can create your own to inspect certain protocols.
Packet Flow
With a proxy inspection mode scan, the client sends a request and FortiGate starts
buffering the whole file, then sends it to the antivirus engine for scanning. If the file is
clean (without any viruses), FortiGate starts transmitting the file to the end client. If a
virus is found, no packets are delivered to the end client and the proxy sends the
replacement block message to the end client. Because FortiGate has to buffer the whole
file and then do the scanning, it takes a long time to scan. Also, from the client point of
view, it has to wait for the scanning to finish and might terminate the connection because
of lack of data.
Client Comforting:
This feature is supported just in Proxy-Mode.
You can configure client comforting for HTTP and FTP from the config firewall profile-
protocol-options command tree. This allows the proxy to slowly transmit some data until
it can complete the buffer and finish the scan. This prevents a connection or session
timeout. No block replacement message appears in the first attempt because FortiGate is
transmitting the packets to the end client.
stream-based scanning:
Using proxy inspection antivirus allows you to use stream-based scanning, which is
enabled by default. Stream-based scanning scans large archive files by decompressing the
files and then scanning and extracting them at the same time. This process optimizes
memory use to conserve resources on FortiGate. Viruses are detected even if they are in
the middle or toward the end of these large files.
In FortiOS 7.0, stream-based scan is supported in HTTP(S), FTP(S), and SCP/SFTP.
1. Creating an AntiVirus Profile with the selection of the inspected protocols, and the
action taken when the FortiGate detects a virus infected file: Block, Monitor.
Proxy-based inspection mode is applied when you set Feature set to Proxy-based.
For lowend platforms, this feature is available on the GUI when you enable the CLI command:
config system settings
set gui-proxy-inspection enable
end
The gui-proxy-inspection setting under config system settings is enabled on most models
except for entry-level platforms with 2 GB of RAM or less. When this setting is disabled, Firewall
policy pages do not have option to select a Flow-based or Proxy-based inspection mode.
Go to Security Profiles > AntiVirus and click Create New.
Configure the following settings:
2. Applying the Proxy-based Antivirus Profile to a firewall policy.
The next step is to apply the proxy-based antivirus profile to a firewall policy. You must set
Inspection Mode to Proxy-based.
How can you then choose between the inspection modes? If security is your priority,
proxy inspection mode —with client comforting disabled—is more appropriate. If
performance is your top priority, then flow inspection mode is more appropriate.
Flow inspection mode: Proxy inspection mode:
Priority on Traffic Throughput Priority on Network Security
Antivirus Logs
Logging is an important part of managing a secure network. When you enable logging, you
can find details on Two ways:
1. Log & Report > Security Events. When the antivirus scan detects a virus, by default, it
creates a log about what virus was detected, as well as the action, policy ID, antivirus profile
name, and detection type. It also provides a link to more information on the FortiGuard
website.
When you enable oversized files logging, a log entry is also created with the details including
the message “Size limit is exceeded”.
2. Log & Report > Forward Traffic. You can also view log details on the Forward Traffic log
page, where firewall policies record traffic activity. You’ll find a summary of the traffic on
which FortiGate applied an antivirus action in the corresponding security details.
3. Dashboard > Security. You can also use the Security dashboard to view relevant
information regarding threats to your network. The security dashboard organizes
information into source and destination and allows you to drill down with session logs
details. For the Advanced Threat Protection Statistics, you can add the corresponding widget
on the dashboard for monitoring purposes.
Troubleshooting Common Antivirus Issues
Viruses are constantly evolving and you must have the latest antivirus definitions version to
ensure correct protection.
With a valid license, FortiGate checks regularly for updates. If an antivirus profile is applied
on at least one firewall policy, you can also force an update of the antivirus definitions
database with the CLI command execute av-update.
FGT # execute update-av
1. If you are having issues with the antivirus license or FortiGuard updates, start
troubleshooting with basic connectivity tests. Most of the time, issues related to updates
are caused by connectivity problems with FortiGuard servers. You can do the following to
handle common antivirus issues:
• Make sure that FortiGate has a stable internet connection and can resolve DNS
(update.fortinet.net).
• If there is another firewall between FortiGate and the internet, make sure TCP port 443 is
open and traffic is allowed from and to the FortiGate device.
• If you continue to see issues with the update, run the real-time debug command to
identify the problem.
• Make sure that you are using the correct antivirus profile and SSL/SSH inspection on all
firewall policies. (For encrypted protocols, you must select deep inspection)
3. To troubleshoot further common antivirus issues, you can check information provided
by the following commands:
• get system performance status:
Displays statistics for the last one minute.
• diagnose antivirus database-info:
Displays current antivirus database information.
• diagnose autoupdate versions:
Displays current antivirus engine and signature versions.
• diagnose antivirus test "get scantime":
Displays scan times for infected files.