Home Net Guide

Home / Port numbers / Port 21

Port 21: FTP

File transfer commands, unencrypted. Port 21 uses TCP.

Port
21
Commonly used for
FTP
Transport
TCP
Encrypted
No
Range
System (well-known) port, 0 to 1023
Our advice
Keep it closed to the internet
IANA registration
ftp File Transfer Protocol [Control] (TCP, UDP, SCTP)

Registration: IANA Service Name and Transport Protocol Port Number Registry, retrieved 15 November 2026. The registered name can differ from the everyday use, because popular software often adopts a port without registering it. The description and advice are written by Home Net Guide and describe common practice: any program can be set to use any port.

What port 21 is used for

Port 21 is the control channel of FTP, one of the oldest file transfer protocols. The client signs in and sends commands here, and each file or directory listing then travels over a second connection on another port.

Should port 21 be open?

Plain FTP sends the username, password and files unencrypted, so anyone on the path can read them. Servers that allow anonymous uploads get used to store other people's files. Use SFTP over port 22 instead, or FTPS if you must keep FTP. Close 21 unless you have an old device that offers nothing else.

Related ports

  • Port 22 (SSH): secure remote login and file transfer (SFTP)
  • Port 990 (FTPS): FTP inside TLS encryption
  • Port 20 (FTP data): the data channel of active-mode FTP
  • Port 69 (TFTP): simple file transfer for network booting and firmware

See all port numbers for the full list and how ports, TCP and UDP work.

Previous: Port 20 (FTP data) · Next: Port 22 (SSH)