Description |
This article explains an issue where FTP passive mode using EPSV fails after upgrading to v7.2.12 due to a session helper behavior change. Disable the FTP session helper and allow high TCP port ranges explicitly in the firewall policy to restore passive mode FTP functionality. |
Scope | FortiOS v7.2.12 with Virtual IP (VIP) and FTP traffic using EPSV. |
Solution |
Problem Description: After upgrading FortiGate to v7.2.12, users may experience failures when using FTP in passive mode (EPSV). While the control channel (port 21) functions as expected, the data channel (EPSV high ports) does not open, resulting in timeouts or errors such as: curl: (28) server response timeout
Trigger Conditions:
The FTP session helper should inspect the EPSV response, extract the passive port, and open the necessary high-port connection dynamically without requiring explicit service definitions in the policy.
The EPSV response is not handled correctly by the session helper, and the high TCP port required for the passive data connection is not permitted. This results in failed transfers or server timeouts. Active mode (PORT) continues to function correctly.
Workaround: To restore passive mode FTP functionality while Fortinet investigates the issue, disable the FTP session helper and explicitly define a custom service to allow the high port range used by the FTP server.
Step 1: Create Custom Services:
config firewall service custom edit "FTP_PASV_RANGE"
Step 2: Update or Create Firewall Policy:
config firewall policy
After applying the workaround, passive FTP transfers should resume successfully. For example, a successful curl transfer will include:
< 229 Entering Extended Passive Mode (|||53444|)
|
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.