TCPWell-Known PortFirewall: Usually Closed
20

FTP Data Transfer

What is Port 20?

Port 20 is the data channel for the File Transfer Protocol (FTP). While port 21 handles the control connection — managing commands and responses — port 20 carries the actual file data being transferred between client and server. FTP was originally defined in RFC 959 in 1985 and remains one of the oldest protocols still in use today. In active mode FTP, the server initiates the data connection from port 20 back to the client, which can cause issues with firewalls and NAT devices. This is why passive mode FTP was later developed. Despite its age, FTP is still used for bulk file transfers, web server management, and legacy system integration. System administrators, web developers, and organizations that manage large volumes of files continue to rely on FTP for its simplicity and widespread support.

Common Uses

  • Transferring files between client and server in active FTP mode
  • Web hosting file management and deployment
  • Automated batch file transfers between systems
  • Legacy system file exchange in enterprise environments

Technical Details

Port Number20
ProtocolTCP
CategoryWell-Known
Service NameFTP Data Transfer
Default FirewallUsually Closed
Port Test Commands

Copy-paste commands to check port 20 (FTP Data Transfer) from your terminal

Test connectivity

Netcat (nc)Check if TCP port is reachable
nc -zv example.com 20
curl (HTTP)Test HTTP response on this port
curl -v --max-time 5 http://example.com:20/
TelnetBasic TCP port connectivity check
telnet example.com 20
nmapScan port 20 with service detection
nmap -p 20 -sV example.com
Bash /dev/tcpPure bash TCP check (no extra tools needed)
(echo > /dev/tcp/example.com/20) 2>/dev/null && echo "open" || echo "closed"

Open port in firewall

UFW (Ubuntu / Debian)
sudo ufw allow 20/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 20 -j ACCEPT
firewalld (RHEL / CentOS)
sudo firewall-cmd --permanent --add-port=20/tcp && sudo firewall-cmd --reload

Security Considerations

!

FTP transmits data including credentials in plaintext, making it vulnerable to packet sniffing and man-in-the-middle attacks. Port 20 should not be exposed to the internet without encryption. Use SFTP (port 22) or FTPS (port 990) for secure file transfers. If FTP must be used, restrict access via IP whitelisting and strong credentials.

Popular Ports Reference

The most commonly used and referenced network ports

Related Ports