| UNIX/Linux Forum Archives · Rules and Guidelines · Disclaimer |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| fishsponge |
Posted: May 12 2003, 03:45 PM
|
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
Ever needed to know the difference between active and passive FTP?? well here is an explanation. :D
There are two types of FTP - Passive and Active. They are both related to which client decides the port to connect on for each transfer, and also who actually *initiates* the connection on that port. For example... with both types of FTP, port 21 is used to connect, but all data transfers are done on a "random" port between 1024 and 65535 (I think that's the port range, anyway). With Passive FTP, the client decides the port. With Active FTP, the server decides the port. Active FTP is ideal for people behind NAT-enabled routers because if you use passive FTP, the incoming request doesn't necessarily get forwarded to the correct machine behind the router, but with active FTP, the server opens the connection, which doesn't cause a problem. |
| fishsponge |
Posted: May 12 2003, 03:52 PM
|
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
i've just found out from a colleague here at work exactly how it works. I was correct first time anyway, but now i know in more detail. :D
Passive FTP is where the client sends a PASV command to the server, specifying a port to connect on. The server then starts listening on that port. The client then initiates the connection, and the transfer begins. Active FTP is where the client sends a PORT command to the server. The server then tells the client which port it's going to connect on, and the client then begins listening. The server then initiates the connection, and the transfer begins. Passive is "easier" for the client due to any personal firewalls you may be running, but active is easier for the server if the machine is running behind a NAT'd router due to the port-forwarding issue (reply to this post for a more details explanation of this port-forwarding problem). Just so you know... passive is the standard and the default (i think). |
![]() |
![]() ![]() ![]() |