Network services
FTP
File transfer over two kinds of connection: commands on port 21, and a separate data connection per transfer.
FTP copies files over two TCP connections. The control channel (port 21) carries
commands (USER, PASS, RETR, STOR) and replies; each file or listing travels on its own data connection. In
active mode (PORT) the server connects back, from port 20; in passive mode (PASV, EPSV) the client connects
to a port the server names. Behind NAT only passive works. Plain FTP sends the password in the clear.
Read next
- NAT A router rewriting addresses as packets pass, usually to hide many private devices behind one address.
- Stateful firewall A firewall that remembers connections, so it can allow replies while refusing new connections in.
- Port A 16-bit number that picks the program on a device: web 80 and 443, DNS 53, SSH 22.
- TCP Reliable, ordered byte streams between programs: handshake, acknowledgements, retransmission.
- TFTP The simplest file transfer: UDP port 69, no login, no listing, no encryption. Network devices load images and configs with it.