Difference between Active and Passive FTP
FTP stands for File Transfer Protocol. It is an application layer protocol which transfers files over a network. It uses TCP based service. FTP works in two different modes:
1. Active FTP :
In the active mode, the client connects on a random port for incoming data connections from the server. Client again sends next port to FTP server which is acknowledged on command channel.
2. Passive FTP : I
n the passive mode, the client uses the control connection to send a PASV signal to the server. FTP server sends back IP address and server port number.
Here are few differences between Active and Passive FTP:
|Active FTP||Passive FTP|
|In active FTP, client establishes the command channel and the server establishes the data channel.||In passive FTP, both the command channel and the data channel are established by the client.|
|Active FTP provides security to the FTP server.||Passive FTP does not provide security to the FTP server.|
|Active FTP may cause problems because of firewalls.||Passive FTP does not have connection issues from firewalls.|
|Active mode is not used as a default mode of a browser.||Passive mode is used as a default mode of a browser.|
|FTP client acknowledges on data channel.||FTP server acknowledges on data channel.|
|Client sends random port number to the server.||Client sends PASV command to the server.|
|In Active FTP, the data connection is made and the file transfers are then done through client and server ports.||In passive FTP, the client still have to initiates the command channel (control connection) to the server.|