Port 21: FTP

Port 21 is the FTP control channel, where the client sends commands like USER, PASS, and RETR. Plain FTP is unencrypted, so prefer SFTP (port 22) or FTPS.

TCPFile transferUnencrypted by defaultIANA assigned
Port number21
ServiceFile Transfer Protocol (control)
ProtocolTCP
CategoryFile transfer
Default encryptionNo
Security note. Port 21 is not encrypted by default. Restrict it to trusted networks, or use an encrypted alternative where one exists, to avoid exposing credentials and data in transit.

Frequently asked questions

What is port 21 used for?

Port 21 is the FTP control channel, where the client sends commands like USER, PASS, and RETR. Plain FTP is unencrypted, so prefer SFTP (port 22) or FTPS.

Is port 21 TCP or UDP?

Port 21 (FTP) uses TCP.

Is port 21 secure?

Port 21 is not encrypted by default. Where possible, use an encrypted alternative or tunnel it over TLS or a VPN.

Should I open port 21 on my firewall?

Only if you specifically need FTP. Expose it to the smallest set of trusted sources, and never open database or Windows-service ports to the whole internet.