Port 21 (FTP control)
Port 21 is the control port for FTP, where a client logs in and sends commands. Its IANA registration, transports and port range.
Updated
Port 21 is registered with IANA under the service name ftp, on TCP, UDP and SCTP. It is one of the well-known (system) ports, 0 to 1023.
IANA registration
This is the assignment for port 21 exactly as the registry lists it, one row per service name and transport.
| Service name | Transport | Description | Reference |
|---|---|---|---|
ftp |
TCP | File Transfer Protocol [Control] | RFC 959 |
ftp |
UDP | File Transfer Protocol [Control] | RFC 959 |
ftp |
SCTP | FTP | RFC 9260 |
Assignment notes in the registry:
- Defined TXT keys: u=<username> p=<password> path=<path>
Source: IANA Service Name and Transport Protocol Port Number Registry, as downloaded on December 5, 2026. The registry changes over time; the linked page is the authority.
A registration records who a port number is assigned to. It does not prove that whatever is listening on the port is that service, and it does not mean the service uses every transport listed: older entries were routinely registered for both TCP and UDP.
In practice
This section is written by Network Utility. It is not part of the IANA registry.
Port 21 is the control port for FTP, where a client logs in and sends commands.
An FTP client connects to TCP port 21 to authenticate and issue commands. File contents and directory listings travel on a second connection (see port 20 for active mode).
Plain FTP sends user names, passwords and files unencrypted. Where possible use SFTP, which runs over SSH on port 22, or FTPS, which adds TLS to FTP. Explicit FTPS starts on port 21 and upgrades with the AUTH TLS command; implicit FTPS is registered on port 990. Firewalls need to allow the data connections as well as port 21.
Related ports: 20 (FTP data), 22 (SSH), 990 (FTPS control).
Port range
Port 21 falls in the well-known (system) port range, 0 to 1023. RFC 6335 calls these System Ports. IANA assigns them only through the IETF Review or IESG Approval procedures, the strictest rules of the three ranges. On Unix-like systems a program has traditionally needed root privileges to listen on a port below 1024.
The other ranges are registered (user) ports (1024 to 49151) and dynamic (private) ports (49152 to 65535). The ranges and the assignment rules are defined in RFC 6335.
Look up another port in the port table.