Network services
FTP
File transfer over two kinds of connection: commands on port 21, and a separate data connection per transfer.
The control channel (TCP 21) carries commands (USER, PASS, RETR, STOR, LIST) and three-digit
replies. Each file or listing travels on its own data connection. In active mode (PORT) the client names its
address and port and the server connects back, from port 20; in passive mode (PASV, EPSV) the server names a
port and the client connects. Behind NAT only passive works, unless the router runs an FTP helper that rewrites
PORT. Plain FTP sends the password and the files in the clear.