This content originally appeared on DEV Community and was authored by Minima Desk
How to Check If Port 21 Is Open?
Having issues connecting to your FTP account? If that’s the case, it’s worth checking whether port 21 is the culprit behind the connection failure. In this guide, we’ll show you how to check if your FTP port 21 is open.
Start your website with Hostinger – get fast, secure hosting here
Step-by-Step Guide
Open the system console, then enter the following line. Make sure to change the domain name accordingly. This same command applies to all operating systems.
telnet yourdomain.com 21
If the FTP port 21 is not blocked, the
220 response
will appear. Please note that this message may vary:
220 FTP Server ready.
If the
220 response
doesn’t appear, that means the FTP port 21 is blocked. If that’s the case, we recommend you to contact your ISP to open the port.
Enabling Telnet Client
Since we’re be using a Telnet command to check the connection, you need to ensure that your operating system has Telnet Client enabled. Telnet is a client-server protocol that enables remote control over computers. In this case, it will help us test the connectivity to FTP port 21. In this example, we’ll be showing how to enable Telnet Client on Windows:
Press the
Window+R
keys together, then enter
control
to open up your Control Panel.
Navigate to Programs → Programs and Features. On the left panel, select Turn Windows features on or off.
In the new dialog box, check the Telnet Client box and click OK.
What Is FTP Port 21?
FTP is an internet protocol that allows computers within the network to exchange files in bulk. In order to work correctly, FTP must use two ports — port 21 for command and control, and port 20 for data transport. An FTP client cannot perform the protocol if it fails to connect to the FTP ports. Unfortunately, some routers and firewalls block this port because hackers often target FTP servers via port 21. If you happen to have an FTP connection issue, it’s essential to verify whether or not there’s a blockage in port 21.
Conclusion
Some routers and firewalls block FTP port 21 due to security reasons, so it’s essential to check the port’s connection before performing the File Transfer Protocol. You might also want to check out our articles on solving FTP issues like solving error 421 – too many connections and ECONNREFUSED.
We hope you found this tutorial helpful. If you have any more questions, don’t hesitate to leave a comment down below.
Edgaras G.
Edgaras is a veteran server administrator at Hostinger. He makes sure that every server runs at full throttle and has all the latest technological advancements. When he’s not working, Edgaras enjoys skiing and exploring the world.
Start your website with Hostinger – get fast, secure hosting here
Read more from MinimaDesk:
- How Many WordPress Plugins Are Too Many? Best Practices for Performance Optimization
- How to Fix Broken Permalinks in WordPress: A Step-by-Step Guide
- How to Install WordPress with Nginx: A Step-by-Step Guide
- The Best WordPress Theme Frameworks for 2025
Download free premium WordPress tools from our
Starter Tools page
.
Download your Free WordPress Starter Pack
Originally published at MinimaDesk
This content originally appeared on DEV Community and was authored by Minima Desk