How to Check if a Port is Blocked with Telnet

We recommend using Netcat / Ncat, or Nmap for multiple ports instead, as Telnet is NOT encrypted and therefore insecure.

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.

You may need to enable Telnet on Windows Vista or 7.

Below we cover how to check if a port is open on your server or local network from your terminal with Telnet.

Check if a Port is Blocked with Telnet

Check if port 21 (FTP) is blocked by your local or server firewall:

telnet your-domain.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 your-domain.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 09: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 your-domain.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

If you’re still having connection issues, consider completing a traceroute/tracepath or mtr to better understand the issue. Feel free to contact Live Support for further assistance troubleshooting performance issues.

Ask us how we can support your next web application project with our Cloud Server Hosting.

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+