What is active Ftp and how it works?

In Active mode Ftp, the client connects from a random unprivileged port (N > 1024) to the FTP server's command port, port 21. Then, the client starts listening to port N+1 and sends the FTP command PORT N+1 to the FTP server. The server will then connect back to the client's specified data port from its local data port, which is port 20.

To support Active mode Ftp the following communication channels need to be opened:

(a) FTP server's port 21 from anywhere (Client initiates connection)
(b) FTP server's port 21 to ports > 1024 (Server responds to client's control port)
(c) FTP server's port 20 to ports > 1024 (Server initiates data connection to client's data port)
(d) FTP server's port 20 from ports > 1024 (Client sends ACKs to server's data port)

In step 1, the client's command port contacts the server's command port and sends the command PORT 1027. The server then sends an ACK back to the client's command port in step 2.
In step 3 the server initiates a connection on its local data port to the data port the client specified earlier. Finally, the client sends an ACK back as shown in step 4.

The main problem with active mode FTP actually falls on the client side. The FTP client doesn't make the actual connection to the data port of the server, it simply tells the server what port it is listening on and the server connects back to the specified port on the client.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Change the password on an FTP account?

Kindly use the following steps to change a password on an FTP account:- (a) Click on the Ftp...

I have uploaded my files but my site is not coming up in my browser?

When you FTP into your account, you will see 5 folders (tmp, mail, public_html, public_ftp and...

Common FTP codes. What do they mean?

Here's a list of some of the most common FTP codes you might see:- 100 - Codes The requested...

Error: No connection could be made because the target machine actively refused it. Connection closed

The error is occurring because there is no server listening at the hostname and port you...

Error: Unable to resolve host name

This error means that the hostname you are trying to connect to cannot be resolved to an IP...