Sunday, June 7, 2020

How to Use Telnet to Test Open Port

In this lesson we are going to talk about, how to use Telnet program to access an open port of a server system. If you want to know, what is Telnet then explore the below link:-


Before continuing with this lesson, I am going to ask you one question regarding open port. That is "What is open port"?

No problem at all, if you don't know this answer. Let me explain about it.

An open port or sometimes it's called listening port is a port, that is used by an network application to listen on the network. For instance, we all know that, a web server uses port 80 or HTTP protocol to deliver its content. If anyone on the network or on the internet, wanna get that contents, we must have gone through this port 80. Because of, the web server is listening on this port 80 to deliver its content. Now we can say that, this is the open port for that web server or web application. The web server is ready to accept any connection, that have reached to itself using that port.  

In this way, each application of the network opens a port for its own work. For example, FTP protocol opens number 21 port, SMTP server opens number 25 port, SSH server opens number 22 port etc. If these services are installed on any system, then those ports will be opened on that system, because of those services works based on that port. 

Now we will discuss, how to access those open ports using telnet application.

First of all, open your telnet client application. You can use operating system's builtin telnet application or any third party applications. In this tutorial, we are going to use windows builtin telnet client. To know, how to enable telnet client on windows, please follow the below tutorial.


Just open command prompt and type the below command:-

telnet  gmail.com  465

Here is explanation for this command. "Telnet" is for start telnet service, "gmail.com" is for server name and "465" is for port number on that server (as our example "gmail.com"). If this port open on that server, then you will get some response from that server. Something like that:- 


This test was run on a SMTP server. That's why, we get the server name. If we can't access on the server or the port is not open, then we get the below message:-


This test was run on gmail.com. Telnet client can't access to this port. We are getting failed message. In this way, we can test any server for any open port. If the port is open, then we can access it otherwise not.

No comments:

Post a Comment