FTP

How to Check if FTP Port 21 is Not Blocked

How to Check if FTP Port 21 is Not Blocked

Introduction

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:

Windows

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.

Windows Run Window

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:

  1. Open Windows Start menu by clicking icon on the bottom left corner or pressing Windows logo key.
  2. Enter Turn Windows features on and off and hit ENTER.
  3. On a new Window search for Telnet Client, enable it and press OK button.
    Enable Telnet on Windows

Linux

In order to call out your computer’s terminal window in Linux, press the following keys simultaneously:

CTRL + ALT + T

Linux Terminal

If similar black terminal window shows up, proceed to the Step 2.

MacOS

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.

Mac Launchpad

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.

Telnet example

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.

Conclusion

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.

About the author

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.

2 Comments

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

[href]
[href]