How to check if FTP port 21 is blocked or not?

Harry P

Well-known member
Registered
Joined
Feb 3, 2015
Messages
447
Points
28
Hey everyone,

Can you tell me how to check if FTP port 21 is blocked or not? on a new hosting, I am not enable to connect to FTP, I am doubting that FTP port 21 is blocked on my server, i would like to check this port.
 

Maxoq

Well-known member
Registered
Joined
Feb 25, 2015
Messages
520
Points
28
Best answer
How to check if FTP port 21 is blocked or not
Before you start, first access the admin interface using the command line. In Windows, you open the console by pressing Windows key + R. If using Mac or Linux, you use F4 key for Mac or Ctrl+Alt+T for Linux machine.

Then follow these steps to check if the FTP port is blocked:

Open the system console, and enter the following command. Make sure you have entered the correct domain name. This command can be used on any Operating System:
Code:
telnet yourdomain.com 21
If port 21 is not blocked, a 220 response will be displayed. The message may be slightly different depending on the version:
Code:
220 FTP Server ready.
If 220 does not appear, port 21 is blocked. If that is the problem, we recommend that you contact your ISP to open this port.

How to install Telnet
Since you are using the Telnet command, you need to make sure that the operating system you are using already has the Telnet Client.

Telnet is a client-server protocol for remote management of computers. In this case, it will help you to check whether the FTP Port is open or not.

Here is how to install Telnet Client on Windows machine:

Press Window+R, then type control to open the Control Panel.
Go to Programs -> Programs and Features. On the left sidebar, select Turn Windows features on or off.

How-to-check-if-FTP-port-21-is-blocked-or-not.png

Tick the Telnet Client box in the image above and then click OK.
 

S4 Hosting

Well-known member
Moderator
Hosting Provider
Joined
Mar 5, 2021
Messages
177
Points
16
^ This is the quickest easiest way to do it.
 

harry_v

Well-known member
Registered
Hosting Provider
Joined
Dec 20, 2017
Messages
110
Points
18
Hi
You can try the below method:

a) For For Windows:
To check if port 21 is blocked, click on the “Start Menu”
- In the search field, type “cmd”
- In the newly opened command prompt, enter the following command followed by the “Enter” button:
telnet YourDomain.com 21
b) For Linux
To check if port 21 is blocked, open your favorite shell/terminal and type the following command followed by the “Enter” button:
telnet YourDomain.com 21
c) For Apple/Mac
To check if port 21 is blocked, navigate to Mac HD -> “Applications” directory -> Utilities sub-directory. Once the terminal is opened, type the following command followed by “Enter”:
telnet YourDomain.com 21
If you get the following result, that means that port 21 is not blocked from your internet service provider or your Firewall:
 

sam@12

Member
Registered
Joined
Jun 8, 2021
Messages
62
Points
6
Hello Every one,

Their are multiple ways to check and enable the FTP port in linux

Checking via linux terminal

telnet localhost 21
nmap -p 21 server ip

enabling port in firewalld and ufw firewalls

firewall-cmd --permanent --add-port=21/tcp
after adding the rule run the reload command firewall-cmd --reload

ufw add port 21/tcp
service ufw restart
 
Recommended Threads
Replies
4
Views
1,533
Replies
3
Views
1,932
Replies
3
Views
2,566
Replies
1
Views
1,087

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top