If an FTP server needs to allowlist FTP connector applications in PASSIVE mode, not only port 21 but also certain data ports have to be allowed to in order for the application to work properly. This knowledge article explains what ports should be allowed.
In passive mode FTP, when opening an FTP connection, the client opens two random unprivileged ports locally (N > 1023 and N+1). The first port contacts the server on port 21, then the client will issue the PASV command. The result of this is that the server then opens a random unprivileged port (P > 1023) and sends P back to the client in response to the PASV command. The client then initiates the connection from port N+1 to port P on the server to transfer data.
Firstly, decide what's the PASV port range of the FTP server. For example, the port range is specified by pasv_min_port and pasv_max_port as below in the vsftp.conf for vsftpd backed FTP server
pasv_min_port=1024 pasv_max_port=1048
Secondly, allow TCP access from allowlisted IPs to port 21 and the PASV ports, 1024 to 1048 as in the example above.
001114929

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.