Telnet is a network protocol used on the internet or local area networks to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. The term “telnet” also refers to the software implementing the protocol on the client or user side.

Telnet allows users to establish a connection to a remote computer or server and interact with it as if they were physically present at that machine. It enables the user to log in and execute commands on the remote system.

Port is Blocked with Telnet:-

The Telnet command line tool tests port connections with your local network router, servers, and websites. For example, Telnet can help you see why the email is being rejected. Telnet is pre-installed on many Windows, macOS, and Unix OSs.

Port is Blocked with Telnet

Check if a Port is Blocked with Telnet

Syntax: The basic syntax for using Telnet is:

telnet [options] [hostname or IP address] [port]

[options]: Telnet offers various options for configuring the connection behavior, such as toggling character mode, debugging, and setting terminal type.
[hostname or IP address]: Specifies the address of the remote host to connect to.
[port]: Specifies the port on the remote host to connect to. If not specified, Telnet will default to port 23, the standard Telnet port.

You can replace the above command with actual domain name and port.

telnet yourdomain.com 21

If the port is blocked, you’ll see similar results to the following:

Trying 1.2.3.4...
telnet: Unable to connect to remote host: Connection refused

If the port is open, you’ll see results similar to the following:

Trying 1.2.3.4...
Connected to yourdomain.com.
Escape character is '^]'.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 100 allowed.
220-Local time is now 13:00. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Connected to yourdomain.com.
Escape character is '^]'.

Type Ctrl + ] to continue to the prompt. Then type quit, then Enter to close the Telnet connection.

You can also use your server hostname (part of your temporary URL) or server IP.

Check if port 22 (default SSH port) is blocked by your local network or server firewall:

telnet server.hostname.com 22

If the port is open, you’ll see results similar to the following:

Trying 1.2.3.5...
Connected to your-domain.com.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.3

By the way above article will clearly explained How to Check if a Port is Blocked with Telnet.