When requesting that firewall ports be opened, it is useful to be able to check that they really have been opened using the simplest method possible. Using a telnet client is the perfect way to do this, as it comes standard on Windows and all Unix-like systems.

Telnet will create a raw TCP connection to a port you specify. If the port does not have a service listening on it, or the port is unreachable (due to a firewall), then you will not be able to establish a connection.

On Windows, typing “telnet www.myloadtest.com 80” establishes a connection to this web server and waits for you to make an HTTP request, presenting you with a blank screen. You can now end the session by pressing CTRL+], or you can type in an HTTP request (just for fun).

host: www.myloadtest.com

This should return something like…

HTTP/1.1 200 OK
Date: Thu, 11 Dec 2008 00:11:10 GMT
Server: Apache/2.2.10 (Unix) mod_ssl/2.2.10 OpenSSL/0.9.8i DAV/2 mod_auth_passth
rough/2.1 mod_bwlimited/1.4 FrontPage/
X-Powered-By: PHP/5.2.6
X-Pingback: https://www.myloadtest.com/xmlrpc.php
Set-Cookie: PHPSESSID=688bb2de5e03458279f1bcab9cffc595; path=/
Content-Type: text/html; charset=UTF-8

Connection to host lost.


If the port is not accessible, then you will see “Connecting to {hostname} before the connection eventually times out.

C:\>telnet www.jds.net.au 81
Connecting To www.myloadtest.com...

Note that this method will not work to check that a service which uses UDP can be connected to, as telnet only uses TCP.


Published On: December 11, 2008Tags: