What are Passive and Active FTPs?Active FTP: A Client connects from a random unprivileged port to the FTP server port 21, using Active FTP. Later the client listens to the port N+1 and sends the FTP command port N+1 to the FTP server. Then the server connects back to the client’s specified data port from its local data port, 20.
Passive FTP: The client initiates the connections to the server and solving the problem of firewalls filtering the incoming data port connection to the client from the server is done in passive FTP mode. The client opens two random unprivileged ports locally on opening an FTP connection. The server is contacted on the first port, 21. Instead issuing a PORT command and allowing the server for connecting back to its data port, the command PASV is issued by the client. The server opens a random unprivileged port and sends the PORT P command back to the client. The connection from port N+1 to port P on server to transfer data is initiated by the client.
|