Site icon Host Appraiser

Use telnet to test ports

Telnet is the easiest way to test if a network port is opened or closed on a remote computer. You can even test sending an email with telnet, but we won’t get into that here. For now, we will stick to testing ports. Open ports with no reason to be open are a security risk opening a path into the system for an exploit, malicious programs, and viruses. However, if software communicates through a certain port, having that port closed will make the program fail to communicate as it should, causing errors.

What is Telnet?

Telnet command-line utility “telnet,” available for Windows OS and Unix-ish systems, including Mac and Linux. For this post, “Telnet” is used in the context of the telnet client software. Telnet may not be enabled out of the box in modern operating systems since it is an insecure protocol. It passes traffic in cleartext.

If you use telnet without enabling it first on a windows system, you’ll receive a message like:

‘telnet’ is not recognized as an internal or external command, operable program or C:\>

Enabling telnet on Windows

The easiest way to enable telnet on a Windows system is to do so via the command line. Using the following command.

Dism /Online /Enable-feature /FeatureName:TelnetClient

To use the GUI on Windows 7, 8. 10, follow the steps below.

Open Windows Start menu > Type “Control Panel” > Press Enter > “Programs” > “Programs and Features” > Turn Windows features on or off > Select “Telnet Client” > Press “OK”

Windows Server 2008:

Open “Server Manager” > Features > click “Add Features” > enable “Telnet Client” checkbox > click “Next” > click “Install” > when the feature installation finishes, click “Close”

Windows Server 2012, 2016:

Open “Server Manager” > “Add roles and features” > click “Next” until reaching the “Features” step > tick “Telnet Client” > click “Install” > when the feature installation finishes, click “Close”.

Use Telnet to Test Ports

One of the best things about Telnet is with an easy command; you can test whether a port is open. Issuing the Telnet command telnet [domainname or ip] [port] will allow you to test connectivity to a remote host on the given port. 

Issue the following command in the Command Prompt:

telnet hostappraiser.com 25
telnet 54.225.134.1 25

Using Telnet on a Mac

Apple removed the telnet client from macOS 10.13 High Sierra. There is no official way to reinstall it. I believe the simplest option is for Mac users to install Telnet through Homebrew. If you have homebrew follow the steps below.

brew install telnet

To open telnet, click “Go” > “Utilities” > “Terminal,” then run the following command.

telnet hostappraiser.com 25
telnet 54.225.134.1 25

bonus

An alternative to telnet for checking ports is Network Utility. To check ports on a Mac, follow the steps below:

Open “Network Utility” > Click “Port Scan” > Indicate the hostname and ports to scan the remote host, e.g., hostappraiser.com, from 20 to 80, then check the output. 

Exit mobile version