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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's the difference between active and passive FTP

FTP

What's the difference between active and passive FTP

by  Knutern  Posted    (Edited  )
Active/Passive FTP describes the role of the FTP Server, i.e. if you maintain a active FTP server, the FTP Server is the active part during the whole session. When a client starts an active FTP Session, the server will initiate data transfer.

Passive FTP on the other hand, requires the client to be the active part, i.e. once control session is established it will ask for a port with which data connection will take place, and finally initiate data connection with the port received.

PS:passive FTP is considered more secure than active FTP.

Traffic Flow
Active FTP (all ports are TCP):
[tt]FTP Client <-> FTP Server
--------------------------
>=1024 -> 21 (Control, SYN)
>=1024 <- 21 (Control)
>=1024 -> 21 (Control, Use Port 3197 for example)
>=1024 <- 21 (Control)
3197 <- 20 (Data, SYN)
3197 -> 20 (Data)
[/tt]

Passive FTP (more secure):
[tt]FTP Client <-> FTP Server
--------------------------
>=1024 -> 21 (Control, SYN)
>=1024 <- 21 (Control)
>=1024 -> 21 (Control, PASV request)
>=1024 <- 21 (Control, OK, use port 45333 for example)
>=1024 -> 45333 (Data, SYN)
>=1024 <- 45333 (Data)
[/tt]
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top