TCP · Port 20IANA Registered

Port 20 — FTP (Data)

File Transfer Protocol data channel, used alongside port 21 for transferring actual file payloads in active FTP mode.

⚡ Primary Use Cases & Environments

  • ✓Legacy active mode FTP file data transfers
  • ✓Legacy automated backup systems

🛡️ Security & Vulnerability Analysis

FTP transmits credentials and data in cleartext. Replace with SFTP (port 22) or FTPS (FTP over TLS) for all modern workflows.

🔧 Network Diagnostics & Inspection

1. Check Active Listening Sockets (Local Host)
Terminal Command
$ sudo ss -tuln | grep :20
Inspects whether any local process daemon is bound to port 20.
2. Remote Port & Service Scan (Nmap)
Terminal Command
$ nmap -p 20 -sV <target-ip>
Probes target IP to determine whether port 20 is open, closed, or filtered.
3. Wireshark Capture / Display Filter
tcp.port == 20Wireshark Filter

🔥 Firewall Configuration Rules (UFW & iptables)

UFW (Uncomplicated Firewall)
Terminal Command
$ sudo ufw allow 20/tcp
Applies a persistent Linux UFW firewall rule for port 20.
iptables Command
Terminal Command
$ sudo iptables -A INPUT -p tcp --dport 20 -j ACCEPT
Appends a direct netfilter kernel rule to the INPUT chain for port 20.

❓ Frequently Asked Questions (FAQ)

Why does FTP use both port 20 and port 21?

FTP separates control commands (authentication, navigation, commands on port 21) from the actual binary or text file payload transfer (channel on port 20 in active mode).

Should port 20 be open on modern servers?

Generally no. Passive mode FTP uses high ephemeral ports instead of port 20, and modern environments use SFTP (port 22) which needs only a single encrypted TCP connection.

Related Networking Tools & Guides