Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regarding Active and Passive FTP

Status
Not open for further replies.

nsmaddict

Technical User
Sep 6, 2004
10
IN
Hi All,

This is a query related to Active FTP and Passive FTP.I would like to know that why is it defined in the FTP connection that for the data connection in ACTIVE FTP server will initiate the session whereas for PASSIVE FTP it is the client who initiate the connection?

Secondly how is it identified whether it is a active or passive ftp? I know that there are command PASSV (Passive) and Port (Active), plz tell me if any flag is set which signifies that the connection is going to be Active or Passive
 
passive is used when you are behind a firewall and activate an ftp session.

beyond that, can't remember the details because i have forgotten more than i have learned.
[bigcheeks]
 
It all comes down to who is talking to who.

Passive means that the client does all the opening of connections (hence goes through firewalls nice) active on the other hand means that the server will try to open connections to the client (and firewalls gen dont like that much).

So a passive ftp connection would go like this... (basically)

Client opens connection to FTP server on port 21
Server opens a new port (TCP <1024) for data and tells client
Client sends data to this new opened port

Active is like this

Client opens connection to FTP server on port 21
Server then makes a connection from port 20 to client (TCP <1024) on a random port

Thats basically it, I think active is always the standard way to transmit, but the command "PASV" changes to passive mode. I think many standard ftp client software generially will always send the "PASV" command when to start a connection.

Does that help???

Simon
 
passive is also required for DSL connections
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top