FTP’s reputation for breaking firewalls comes from one design choice. The protocol uses two connections. The first is predictable. The second is negotiated in the moment. If you remember only that, FileZilla’s stranger errors get easier to read.
SFTP is mentioned here because people punch a hole for port 21 and then wonder why SSH file transfer still fails. It fails because it never wanted port 21.
Prerequisites
You should know which protocol the host sold you. The FTP and SFTP comparison and the FTPS comparison settle the vocabulary. You do not need to open a firewall you do not administer. You do need to stop calling every number “the FTP port.”
The ports with stable jobs
Port 21 is the FTP control connection. Login, directory changes, and the commands that start a transfer happen here. Explicit FTPS also starts here, then upgrades with AUTH TLS. FileZilla’s blank port field means 21 when the protocol is FTP and you did not select implicit TLS.
A negotiated data port carries the directory listing and the file bytes. In passive mode the server picks it and tells the client where to connect. In active mode the client picks it and tells the server where to call back. The project’s formula for the numbers you see in a PORT or PASV line is p1 × 256 + p2. The line PORT 10,0,0,1,12,34 means address 10.0.0.1 and port 3106. That example is from the network configuration guide, which uses it to show why a private address on the wrong side of NAT cannot work.
Port 20 appears in old descriptions of active mode as the server’s source port. Do not write a firewall rule that assumes every modern server still uses it. Read what your server actually opens. The durable active-mode requirement is “the server can reach the client’s advertised port,” not “port 20 is magic.”
Port 990 is the usual implicit FTPS port. TLS starts immediately. The prefix is ftps://. Explicit FTPS does not move to 990.
Port 22 is SSH. SFTP rides inside it. There is no second port to calculate. A firewall rule for SFTP is a rule for the SSH port the host specified.
FileZilla Server’s administration port, which the project FAQ has listed as 14148 by default, is not a file-transfer port. You will not enter it in the client to upload a website. It is only relevant if you are administering a FileZilla Server installation. That task is outside these tutorials.
What a client firewall must allow
-
Allow FileZilla to make outbound connections. For plain FTP and explicit FTPS that includes port 21 and the high ports a passive server may choose. You usually cannot know the data port in advance, which is why the project says passive mode needs outbound access to arbitrary remote ports.
-
For implicit FTPS, allow outbound 990 as well, plus the passive data ports.
-
For SFTP, allow outbound access to the SSH port. You do not add an FTP data range for that site.
-
Add inbound rules only for active-mode FTP, and only for the range you configured. The project suggests a range of about 50 ports at or above 50000. The [connection settings guide](/guides/filezilla-connection-settings/) repeats the conditions. Most people should skip this step and use passive mode.
A server firewall is the mirror image. Passive FTP requires the server to accept connections on its passive range and to tell the client a public address. The network guide’s server section describes that, and it warns that parts of the older server write-up are outdated. If you operate a server, use the current FileZilla Server documentation rather than a copied range from a forum.
Expected result
Given a host’s one-paragraph instruction, you can name the control port and say whether a second port will appear. You can also say which side has to accept a new inbound connection. For a normal home user on passive FTP, the inbound side is the server, not the kitchen router. That single expectation prevents a lot of unnecessary port forwarding.
When a log shows ECONNREFUSED on 22 and the site is SFTP, you have a closed SSH port, not a missing port 20. Follow connection refused. When port 21 connects and the data port times out, follow directory listing failed.
Common problems
The router “FTP helper” is enabled. Some routers rewrite FTP addresses. The project argues that this silent rewriting breaks unusual and encrypted sessions. If plain FTP works and FTPS listings do not, the helper is a suspect. The clean design is a passive server with a correct public address, not a router that edits the protocol.
You forwarded port 21 to your laptop. That does nothing for a client connecting outward, and it exposes a port if a server is running. Undo the forward unless you intended to host files.
A cloud security group allows 21 and not the passive range. Logins succeed from the internet and listings do not. Add the range the FTP server is configured to use, and make sure the PASV address is the public one.
A non-standard port was typed into the wrong field. Port 22 in the FTP port box does not create SFTP. The protocol field and the port have to tell the same story.
Security considerations
Open the smallest surface that matches the protocol you use. A laptop in active mode with a wide inbound range is a larger exposure than a laptop that only makes outbound passive connections. Close the range when the unusual server no longer needs it.
Do not publish your passive range and your hostname together with a username in a screenshot. The range is not a secret by itself, but a tutorial post does not need your real server.
Prefer SFTP or explicit FTPS so the predictable control port does not carry a cleartext password. Knowing which port is which does not make plain FTP appropriate for a customer database. Use the security guide when you are ready to choose.
Frequently asked questions
Is port 21 enough to allow in a firewall?
For the FTP control connection, yes. For a directory listing, no. Passive mode needs outbound access to the data port the server chooses. Active mode needs an inbound callback to the client.
Does SFTP use ports 20 and 21?
No. SFTP uses the SSH port, 22 by default, and keeps files inside that session.
Our host uses port 2121. Is that still FTP?
It can be. The numbers 21, 22, and 990 are defaults, not laws. A non-standard port still needs the matching protocol in FileZilla. Put the number in the Port field.
Related tutorials
Sources checked for this guide
Labels in FileZilla can move between releases. If a menu name in your copy differs, follow the message log and the closest matching command rather than forcing an older click path.