ShareYourGroupShareYourGroupSubnet and Ports

File transfer ports: FTP 20 and 21, SFTP, FTPS and others

What the IANA registry records for these ports, and how to use them safely.

What IANA records

PortProtocolsRegistered nameIANA descriptionAssigneeReferenceNote
20tcp, udp, sctpftp-dataFile Transfer [Default Data]Jon Posteln/a
21tcp, udp, sctpftpFile Transfer Protocol [Control]Jon Postel[RFC 959]Defined TXT keys: u=<username> p=<password> path=<path>
22tcp, udp, sctpsshThe Secure Shell (SSH) Protocoln/a[RFC 4251]Defined TXT keys: u=<username> p=<password>
445tcp, udpmicrosoft-dsMicrosoft-DSPradeep Bahln/a
69tcp, udptftpTrivial File TransferDavid Clarkn/a

FTP, SFTP and FTPS are three different things

Safe habits

  1. Use SFTP rather than FTP for moving files to a server.
  2. Never expose SMB (445) to the internet. It has been used in major worm attacks. Allow it only inside your network.
  3. If a provider offers only FTP, ask for SFTP or FTPS, and use a password that you use nowhere else.
  4. Close port 21 on servers that do not need it.
  5. Use separate accounts with limited folders for file transfer.

Firewall note

Classic FTP needs extra connections that many firewalls handle with special rules. If an FTP login works but listing folders hangs, a firewall is blocking the data connection; switching to SFTP avoids the problem.

This is an independent guide. It is not connected with IANA, the IETF or any network equipment maker. Address and port data come from the IANA registries as fetched on 14 November 2026; RFC texts were read from rfc-editor.org. Check the originals for anything you rely on.