Introduction
As an administrator, have you ever faced challenges while transferring files using FTP? If your answer is ‘Yes,’ then one simple issue that causes this problem is whether port 21 is available or blocked.
Port 21 is a standard FTP port that is responsible for smooth communication between your client and the server. If this port is blocked, your request won’t go through, making it impossible to connect, log in, or transfer files effectively.
In this guide, we will discuss simple steps to check if FTP port 21 is open or blocked on your network. Let’s dive in and get your FTP connections up and running.
Also Read: How to Create an FTP Account in WordPress?
What is FTP Port 21?
FTP (File Transfer Protocol) is a simple yet highly versatile network protocol. This protocol helps to seamlessly transfer computer files between a client and a server over a computer network. This protocol is also important because it allows data to be exchanged for large file transfers and bulk data movement.
Port 21 is the usual port used for FTP connections. When a client starts an FTP session, it connects to the server through port 21. This connection manages commands and controls for transferring files, including logging in, browsing folders, and asking to transfer files.
Network admins and system engineers must understand Port 21. FTP file transfers use Port 21 as the primary point of contact for FTP control connections. You can use Port 21 to troubleshoot network issues, configure firewalls, and check the functioning of FTP services.
What makes port 21 so important?
The availability of port 21 can influence your firewall settings, network configurations, and the FTP server you’re trying to connect to. Suppose you face issues with the availability of port 21.
In that case, you must consult your network administrator or ISP or check the FTP server documentation for further troubleshooting.
Also Read: How To Get FTP Password From FileZilla
How to Check If FTP Port 21 Is Not Blocked?
➢ On Windows
To confirm if FTP port 21 is available or blocked on your Windows system, you must follow these steps:
➔ Open Command Prompt: Press ‘Windows + R’ to open the ‘Run’ dialog.

➔ Type ‘cmd’ and press ‘Enter.’

Use Telnet: Enter the following command. Please replace ‘mycompany.com’ with the actual domain name or IP address of the FTP server to which you wish to connect.
telnet mycompany.com 21 |
Let’s understand the results:
If you receive a message stating the below message, this means the port is open and available.
220 FTP server ready |
If you receive an error message stating the below message, This means the port is blocked or there is an issue with establishing the connection.
Could not open a connection to the host, on port 21: connect failed
Note: Telnet is a legacy protocol and may not be enabled by default on newer Windows versions. You might need to enable it in the Windows Features settings.
To do this, follow the following steps:
➔ Press ‘Windows + R’, type ‘control panel’, and press ‘Enter’

➔ Click on ‘Programs’

➔ In that ‘Turn Windows features on or off’ under ‘Programs and Features.’

➔ In the Windows Features window, scroll down and check the box next to ‘Telnet Client.’

➔ Click ‘OK’ to install Telnet.

After these steps, Telnet should be available for remote network management or troubleshooting purposes.
Also Read: How to Connect to FTP Using FileZilla on Windows?
➢ On Linux
To check if FTP port 21 is available or blocked on your Linux system, follow these steps:
➔ Open Terminal: Use the terminal emulator (e.g., xterm, gnome-terminal) to access the command line.
➔ Use Telnet: Enter the following command. Please replace ‘mycompany.com’ with the actual domain name or IP address of the FTP server to which you wish to connect.
telnet mycompany.com 21 |
Let’s understand the results:
➔ If you receive a message stating the below message, this means the port is open and available.
220 FTP server ready |
➔ If you receive an error message stating the below message, This means the port is blocked or there is an issue with establishing the connection.
Could not open a connection to the host, on port 21: connect failed |
Note: Telnet is a legacy protocol and may not be installed by default on some Linux distributions. You might need to install it using your package manager (e.g., apt, yum, dnf).
For example, on Ubuntu, you can install telnet using:
Sudo apt install telnet |
If you encounter issues with telnet, you can also use tools like nc (netcat) or nmap to check port availability:
Using nc:
nc mycompany.com 21 |
Using nmap:
nmap -p 21 mycompany.com |
These tools will provide information about the port’s status without requiring a full FTP connection.
Also Read: How to Fix Can’t Connect to Filezilla Server Error
➢ On Apple Mac
To check if the FTP port 21 is available or blocked on your macOS system, you must use the built-in Terminal application:
1. Open Terminal: Go to ‘Applications > Utilities’ and launch ‘Terminal.’
2. Use Telnet: Enter the following command. Please replace ‘mycompany.com’ with the actual domain name or IP address of the FTP server to which you wish to connect.
- The command is ‘telnet mycompany.com 21’
Let’s understand the results:
a. If you receive a message like ‘220 FTP server ready,’ the port is open and accessible.
b. If you get an error message like ‘Could not open a connection to the host, on port 21: connect failed,’ it indicates that the port is blocked or there’s an issue with the connection.
Note: Telnet may not be installed by default on macOS. You can install it using Homebrew:
3. Install Homebrew: If you haven’t already, install Homebrew by following the instructions on their website: https://docs.brew.sh/Installation
4. Install Telnet: Once Homebrew is installed, use the following command to install Telnet:
The command is
Brew install Telnet |
If you encounter issues with Telnet, you can also use tools like nc (netcat) or nmap to check port availability:
Using nc:
nc mycompany.com 21 |
Using nmap:
nmap -p 21 mycompany.com |
These tools will provide information about the port’s status without requiring a full FTP connection.
Also Read: What is the Difference Between HTTP and FTP?
Conclusion
The process of transferring files between the client and server using the FTP protocol works great only if Port 21 is available and accessible. Hence, an administrator needs to check the availability of FTP port 21 for a smooth and uninterrupted file transfer process.
In this guide, we have discussed the important steps to help you determine whether port 21 is open or blocked on your Windows, Linux, or MacOS systems.
Now that you have understood the significance of FTP port 21 and are aware of the ways to its availability, it will be simpler for you to diagnose network problems, configure firewalls appropriately, and optimize your file transfer processes.