Port 20 — FTP-Data (TCP)
What is Port 20?
File Transfer Protocol (Dados)
This is a well-known port (0–1023) commonly used by core services like FTP-Data. · RFC 959
When do you need Port 20 open?
Open only if you host an FTP server in active mode. Passive mode FTP (preferred for modern firewalls) does not use port 20 for data transfer. Keep closed if you use SFTP (port 22) or FTPS instead.
Common uses and software
- vsftpd (active mode)
- Pure-FTPd
- ProFTPD
- Apache FTP Server
Segurança
FTP-Data transmits file content in plain text with no encryption. Avoid active-mode FTP in favour of SFTP (port 22) or FTPS (port 990). If FTP must be used, restrict allowed IP ranges in your firewall to minimise exposure.
Is Port 20 safe?
An open port increases your attack surface. Safety depends on how FTP-Data is configured.
Keep FTP-Data up to date with security patches. Require strong authentication and restrict access to the minimum necessary IP addresses.
Test connectivity for Port 20 on any host.
How to Open Port 20
To allow incoming connections to Port 20 (FTP-Data) from outside your network, configure your firewall and add a port forwarding rule on your router pointing to your device's local IP address.
Open Windows Defender Firewall → Advanced Settings → Inbound Rules → New Rule → Port → TCP → Specific local ports: 20 → Allow the connection → Name and save the rule.
netsh advfirewall firewall add rule name="Open Port 20" dir=in action=allow protocol=tcp localport=20sudo ufw allow 20/tcpsudo iptables -A INPUT -p tcp --dport 20 -j ACCEPTLog into your router (192.168.1.1 or 192.168.0.1) → Port Forwarding → Add a new rule: Protocol TCP, External port 20, Internal IP: your device's local IP, Internal port 20 → Save.
How to close Port 20
If you do not need FTP-Data, block this port in your firewall or router.
To block port 20 on Windows, run the following command in PowerShell or Command Prompt (as Administrator):
netsh advfirewall firewall add rule name="Block Port 20" dir=in action=block protocol=tcp localport=20sudo ufw deny 20/tcpsudo iptables -A INPUT -p tcp --dport 20 -j DROPRemove or disable any port forwarding rule for Port 20.
Frequently Asked Questions
What is Port 20 used for?▾
Port 20 is the default TCP port for FTP-Data. It is used by servers and applications that need to accept incoming connections for this service. Whether you need it open depends on whether you are actively running a FTP-Data server — if not, it should remain closed to reduce your attack surface.
Is Port 20 safe to keep open?▾
An open Port 20 increases your attack surface. If you are not actively running FTP-Data, close this port in your firewall and remove any port forwarding rules. If FTP-Data must be accessible, restrict access to known IP ranges, keep the service software updated with security patches, and use strong authentication.