Skip to main content
kpanchal
Staff
Staff
Nov 18, 2024 2:24 PM UTC

Technical Tip: Error "502 Command REST not allowed by policy”

  • Apr 16, 2026 12:04 PM UTC
  • 0 replies
  • 1187 views
  • Translate All
Description

 

This article describes a possible error that may occur when accessing an FTP server over TLS.

When an Antivirus profile is used and deep-inspection is enabled, the following error is displayed in the FTP program: '502 Command REST not allowed by policy'.

 

Scope

 

FortiGate.

 

Solution

 

The FTP server is published to the WAN network through a VIP.

The firewall policy includes the following:

  • SSL deep inspection.
  • Antivirus.
  • FTP service allowed (21 ports).
  • Proxy-based policy.

 

FTP connects, except for the FTP command to resume downloading a file after pausing the download.

 

To resolve this issue configure the protocol option as below while keeping the Antivirus and DPI unchanged.

 

Configure protocol options as follows:

 

config firewall profile-protocol-options
    edit <name>
        config ftp
            set ports 21
            set options bypass-rest-command
end


After doing this, if the issue persists, open a ticket with Fortinet support.

Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024