ACTIVE
(specified with the command PORT)
With active ftp, the client specifies to the server how the transfer will be done.
The client chooses a port and tells the server to send data to it. The server
initiates a connection to the client on that port and sends the data.
Many times there is a problem using ACTIVE mode. Every computer connected to the Internet has a
unique IP address assigned to it. This unique IP address is how computers are identified when sending
and receiving data across the Internet. For security and other reasons, many company networks
have only one IP address for their entire network. This one IP address is assigned to a router.
Each computer is assigned a local IP address. All Internet traffic is sent to the router. The router
forwards outgoing Internet traffic using it's IP address. The router also receives all
incoming Internet traffic and routes it to the correct computer on the network. Each individual computer
on the network only knows it's local IP address. As stated above, with ACTIVE mode,
the client chooses
the port. The client sends it's port along with it's IP address to the server to establish the
DATA connection. Because the client sends it's local IP address,
the server attempts to establish the data connection using the local IP address. This local IP
address is not accessible from the Internet so the connection attempt fails. The solution
to the problem is to use PASSIVE mode.
|