Created on
09-21-2022
08:50 AM
Edited on
07-15-2025
07:25 AM
By
Debbie_FTNT
Description
This article describes the FTP suite of protocols (FTPs, sFTP, SFTP). It contains the basic mode of operation, differences, and explanations.
Scope
FortiGate.
Solution
Technical terms are explained about what firewall ports need to be open to allow the traffic.
FTP - File Transfer Protocol: uses TCP port 21 for command and TCP port 20 for data transfer.
A custom signature is needed to block SSH but allow SFTP (Technical Tip: How to block SSH but allow SFTP using the same TCP port 22).
FTPs - FTP+Authentication (FTP over TLS or SSL; extension of FTP protocol: uses :
FortiOS support for FTPs is introduced starting with FortiOS 6.4 (and not supported in versions older than 6.4, for Mantis 532698).
'Explicit FTP Proxy' does not work for FTPS prior to FortiOS 6.2.1 (for the same internal ID as above).
FTPs-implicit (outdated) -the entire FTPS session is encrypted; uses:
FTPs-explicit: uses:
The ports used for data (client<>server) are negotiated through this channel. If FortiGate has no 'deep-inspection' enabled, it can not know these ports and allow the traffic.
Deep-inspection is required in the policy, and proxy-profile must also be adjusted for scanning to find out these ports.
On FortiGate:
FTP and TFTP are functioning through their corresponding session-helpers.
Deleting these session-helpers may prevent the correct ports from being open.
SFTP - not used: it can be manually allowed by allowing port 115.
sFTP - allowed: if SSH is allowed, not specifically supported/detected.
FTPs implicit - not used/outdated: it is not supported.
FTPs explicit - adjustments needed: as above.
Related articles:
Technical Tip: How to set a policy to allow FTP over TLS
Technical Note: FortiOS support for FTPS (FTP over SSL), configuration of a firewall rule
Technical Tip: FileZilla and authentication against FTP proxy
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.