Port 21 is universaly designated for FTP (File Transfer Protocol) connections, so if you are having issues connecting to your FTP account, it’s a great idea to check whether your ISP is blocking port 21.
What you’ll need
Before you begin this guide you’ll need the following:
- Access to command shell (Windows), console terminal (Linux) or MacOS terminal
Step 1 — Opening up your computer’s console
This process is different, depending on the operating system your computer is using:
On your keyboard try to find Windows logo key (usually it is located between left CTRL and ALT keys). Now press it together with R key.
New window Run will show up.
In this new window type
cmd and click OK just the way it is shown in the picture above.
Now you should see a black command shell window.
In order to check if port 21 is open on Windows telnet must be enabled. If it is not enabled, you will get the following error message:
'telnet' is not recognized as an internal or external command, operable program or batch file.
Do not worry, if you get the error message listed above, telnet can be easily enabled by following these steps:
- Open Windows Start menu by clicking icon on the bottom left corner or pressing Windows logo key.
Turn Windows features on and offand hit ENTER.
- On a new Window search for Telnet Client, enable it and press OK button.
In order to call out your computer’s terminal window in Linux, press the following keys simultaneously:
CTRL + ALT + T
If similar black terminal window shows up, proceed to the Step 2.
Firstly, you will need to open MacOS Launchpad. This can be done by simply clicking on F4 key.
In Launchpad’s search field enter
terminal and push ENTER.
The needed terminal window will show up.
Step 2 — Using telnet to check if port 21 is open
Now, once you have your terminal window open, write down the following line:
telnet yourdomain.com 21 where
yourdomain.com is your domain name.
If the connection goes through, you will see a Hello message like this:
220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 220-You are user number 8 of 100 allowed. 220-Local time is now 19:55. Server port: 21. 220-This is a private system - No anonymous login 220-IPv6 connections are also welcome on this server. 220 You will be disconnected after 3 minutes of inactivity.
If the Hello message does not show up, the port is, in fact, blocked.
In this tutorial we have learned how we could use telnet to check if default FTP port 21 is open. If the results showed you that the port is closed, it would be best to contact your ISP and ask them to open it. Otherwise you will not be able to use your host’s FTP from the current network.