Using a telnet client as a port scanner

If you ever need to check if a TCP port is open or reachable, one easy way to do it is using a telnet client.

A telnet client actually comes with Windows, but for some annoying reason it is not installed by default. To install the windows telnet client you need to add it using the “Turn Windows features on and off” like so:

image

Because Telnet is essentially just characters sent over a TCP connection, you can use the telnet client as a poor man’s TCP port scanner. To manually check if TCP port 80 is open or reachable on a server you can type telnet myserver.com 80.

As an example lets see if Google.com has port 80 (HTTP) open … 😉

image

image

If you get a blank screen with a blinking cursor you have successfully connected to that TCP port.

In this example, if you are feeling particularly sadistic you can now engage in a HTTP conversation. Type GET index.html HTTP/1.0 and press enter and you will see Google’s home page being sent to you. Same idea would apply if you connected to most other TCP-based protocols; POP mail server etc.

image

On the other hand if the TCP port is not open or not reachable you will see this:

image

Troubleshooting ports and firewalls can be a pain. This is the simplest and quickest way I know for checking connectivity.

3 thoughts on “Using a telnet client as a port scanner

  1. M

    Jack: Great example of using telnet for basic troubleshooting. The screenshots are very helpful as well. Regarding your comment about the telnet client not being installed by default, it is installed with Windows XP. You must be using Vista/7, based on what I see in the screenshots.

  2. Pingback: | Sys Admin Extraordinaire | - IT Systems Administration Notes and Reviews

Leave a Reply

Your email address will not be published. Required fields are marked *