

Because these client-side firewalls often deny incoming connections from active mode FTP servers, passive mode was devised. With the growth of insecure networks, such as the Internet, the use of firewalls to protect client machines is now prevalent. This arrangement means that the client machine must be allowed to accept connections over any port above 1024. When an active mode data transfer is initiated by the FTP client, the server opens a connection from port 20 on the server to the IP address and a random, unprivileged port (greater than 1024) specified by the client. The following are descriptions of these two modes:Īctive mode is the original method used by the FTP protocol for transferring data to the client application. The port number for data connections and the way in which data connections are initialized vary depending upon whether the client requests the data in active or passive mode. Any data requested from the server is returned to the client via a data port. This port is used to issue all commands to the server. When an FTP client application initiates a connection to an FTP server, it opens port 21 on the server - known as the command port. Unlike most protocols used on the Internet, FTP requires multiple network ports to work properly.

That is because FTP also uses random unprivileged ports great than 1023.

It is not enough to just map ports 20 and 21 to the FTP server. If you want to run an FTP server behind an NAT router you need to put it on a DMZ or in Apple's terms make it the default host.
