

The administrator in charge of the firewall should always require PASV connections.

However, FTP clients shouldn’t rely on the default values, as this is unsecure. If the client fails to issue a PASV command, the Data Connection defaults to port 20. Passive Mode-The client issues a PASV command to indicate that it will wait “passively” for the server to supply an IP and port number, after which the client will create a Data Connection to the server.

Ports below 1024, other than port 20, are reserved for other system services.ĭuring the address/port negotiation phase, the client should issue either the PORT command (when initiating Active Mode) or the PASV command (when initiating Passive Mode).Īctive Mode-The client issues a PORT command to the server signaling that it will “actively” provide an IP and port number to open the Data Connection back to the client. The IP address used for the original Control Connection must be combined with an unused port-usually a port numbered higher than 1024 and lower than 65535. Data will get forwarded from the firewall’s port to the server’s port to keep outside clients from accessing the server directly. This works in tandem with a firewall configured to employ port forwarding for added security. Once the client receives a port, it starts the second connection and sends data. In a passive connection, the client connects and sends the PASV command, which functions as a request for a port number to connect to. In an active mode connection, when the client makes the initial connection and sends PORT, the server initiates the second connection back. When a client and server intend to transfer data, they usually start a Control Connection first in order to negotiate the details of the Data Connection prior to opening it and transferring data. Active mode was originally the only method of FTP, and is therefore often the default mode for FTP. The simplest explanation is that active and passive are the two modes that FTP can run in.Īn FTP server can be placed in two different default modes by an administrator: Active or Passive. Active and passive modes can be a difficult idea to understand.
