FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
vhitnal
Staff
Staff
Description
This article explains about how to use stream-based antivirus scan in proxy mode for FTP, SFTP, and SCP.

Solution
Stream-based antivirus scanning in proxy mode is supported for FTP, SFTP, and SCP protocols.
- Stream-based antivirus scanning optimizes memory utilization for large archive files by decompressing the files on the fly and scanning the files as they are extracted.
- File types can be determined after scanning a few KB, without buffering the entire file.
- Viruses can be detected even if they are hiding in the middle or end of a large archive.
- When scanning smaller files, traffic throughput is improved by scanning the files directly on the proxy based WAD daemon, without invoking scan unit.

Stream-based scanning is the default scan mode when an antivirus is in proxy mode.
To disable steam-based scanning, the scan mode can be set to legacy mode, and archive will only be scanned after the entire file has been received.


To configure stream-based scan.

# config antivirus profile
    edit <string>
        ...
        set feature-set proxy
        set scan-mode {default* | legacy}
        ...
    next
end
TCP windows.

Some file transfer applications can negotiate large TCP windows. For example, WinSCP can negotiate an initial TCP window size of about 2GB.
The TCP window options can be used to prevent overly large initial TCP window sizes, helping avoid channel flow control issues. It allows stream based scan's flow control to limit peers from sending data that exceeds a policy's configured oversize limit.

To configure TCP window size options.

# config firewall profile-protocol-options
    edit <string>
        config {ftp | ssh}
            ...
            set stream-based-uncompressed-limit <integer>
            set tcp-window-type {system | static | dynamic}
            set tcp-window-size <integer>
            set tcp-window-minimum <integer>
            set tcp-window-maximum <integer>
            ...
        end
    next
end



Contributors