Amazon Interview Question
Technical Support EngineersTeam: AWS
Country: United States
Interview Type: In-Person
In active mode, the client sends the server the IP address and port number on which the client will listen so the server has to initiate the data connection. Here port 21 is control and port 20 is data on the server side.
In Passive mode, the client sends a PASV command to the server and receives an IP address and port number in return for data transfer. Here port 21 is control and a random port >1024 is used for data on the server side. This is useful when the client is behind firewall and not accepting incoming connections.
You can find your answer here:
- mahdi.oraei March 04, 2014slacksite.com/other/ftp.html