Port 21 — TCP
FTP command and control connections.
What is port 21 used for?
FTP command exchange, with a separate data connection.
Transport protocol
TCP
Security precautions
FTP is unencrypted by default. Restrict access or use SFTP where appropriate.
Should we open this port in the firewall?
Allow this port only when a required service uses it. Apply least privilege: restrict authorized sources, destinations and interfaces, and log connections where appropriate.
How do I check this port?
Test-NetConnection SERVER -Port 21
On Linux, nc -vz SERVER 21 checks TCP connectivity only. A successful TCP connection does not validate the application, authentication or TLS configuration.
Port-to-service mappings are common conventions. Applications can use a different configured port; confirm the actual service and transport.