What is Passive Ftp and how it works ?

In Passive mode Ftp, the client initiates both connections to the server, solving the problem of firewalls filtering the incoming data port connection to the client from the server. When opening an Ftp connection, the client opens two random unprivileged ports locally (N > 1024 and N+1). The first port contacts the server on port 21, but instead of then issuing a PORT command and allowing the server to connect back to its data port, the client will issue the PASV command. The result of this is that the server then opens a random unprivileged port (P > 1024) and sends the PORT P command back to the client. The client then initiates the connection from port N+1 to port P on the server to transfer data.

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

FTP server's port 21 from anywhere (Client initiates connection)

FTP server's port 21 to ports > 1024 (Server responds to client's control port)

FTP server's ports > 1024 from anywhere (Client initiates data connection to random port specified by server)

FTP server's ports > 1024 to remote ports > 1024 (Server sends ACKs (and data) to client's data port)

In step 1, the client contacts the server on the command port and issues the PASV command. The server then replies in step 2 with PORT 2024, telling the client which port it is listening to for the data connection. In step 3 the client then initiates the data connection from its data port to the specified server data port. Finally, the server sends back an ACK in step 4 to the client's data port.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

What do I need to do to put Flash on my website?

Flash is a client side feature - it runs on the user's computer, not on your web host. As long as...

How do I track how many hits my website gets?

Tracking on your site can be either done server-side or remotely. With server-side statistics,...

What are PHP, ASP, perl, etc?

These are all programming languages which are referred to by their acronyms.PHP - PHP: Hypertext...

How do I login to my domain's cPanel?

you can login to your cPanel by going to www.yourdomain.com/cpanel (yourdomain is...

Do I have to change my domain if I get a new host?

No. Provided that the domain is registered in your name (as it should be), you can simply update...

Powered by WHMCompleteSolution