Port 21FTP Control

Port 21 is primarily used for FTP (File Transfer Protocol) command and control communications, facilitating file transfer sessions between a client and server. It manages authentication and commands that initiate data transfers on a separate data port..

transport
tcp

single transport

in transit
cleartext

payload readable on path

assignment
official

registered with iana

risk
3/10

caution

lookups
14,302

rank 245 of 993 · top 25%

Technical Details

what runs on :21
  • FTP Overview: The File Transfer Protocol (FTP) is a standard network protocol used for transferring files between a client and server over a TCP/IP network. Port 21 specifically handles the command channel, where session negotiation, user authentication, and instructions like PUT, GET, or LIST are exchanged.

  • Communication Process: When an FTP connection is established, port 21 manages the control commands which coordinate the transfer process. Actual file data is transmitted over a separate data port, typically port 20 in active mode or a dynamically allocated port in passive mode. The separation ensures command integrity while allowing flexible data conversations.

  • Operational Modes: FTP operates in two modes: active and passive. In active mode, the server initiates the data connection back to the client, which requires specific firewall configurations. Passive mode, more firewall-friendly, has the client initiating both connections, improving compatibility with NAT environments but potentially exposing dynamic high-number ports.

Security Information

exposure of :21

risk score

3/ 10caution

worth attention. how exposed you are depends on configuration — don't leave it reachable from the internet without a reason.

file transfer averages 4.1 across 114 ports — this one sits 1.1 below.

in transit

cleartext

credentials and payloads are readable by anyone on path

assignment

official

registered with iana for this service — scanners fingerprint it by number

reachable over

tcp

every listening transport is another surface to filter at the edge

security overview

  • Common Vulnerabilities:

    • FTP transmits data, including usernames and passwords, unencrypted, making it susceptible to eavesdropping and Man-in-the-Middle (MitM) attacks.
    • Anonymous FTP access may expose sensitive directories inadvertently.
    • Weak authentication or outdated software versions increase the risk of brute force attacks or exploitation.
    • Open control channels can be used for command injection or session hijacking.
  • Common Mitigations:

    • Replace FTP with secure alternatives like FTPS (FTP Secure) or SFTP (SSH File Transfer Protocol).
    • Enforce strong authentication, disable anonymous access, and employ account lockout policies.
    • Use TLS encryption to protect control and data channels.
    • Implement strict firewall rules: limit access to trusted IP ranges and monitor for unusual activity.
    • Regularly update FTP server software and audit logs for intrusion attempts.

the 8 most looked-up other ports in file transfer — 114 ports carry that label.

risk mix of the 8 listed

  • caution100%

1 of 8 encrypted