---
title: "How to Check if a Port is Blocked with Telnet"
description: "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..."
url: https://www.inmotionhosting.com/support/server/ssh/check-if-port-blocked-telnet/
date: 2020-05-14
modified: 2021-08-16
author: "InMotion Hosting Contributor"
categories: ["SSH and Root Access"]
type: post
lang: en
---

# How to Check if a Port is Blocked with Telnet

We recommend using [Netcat / Ncat](https://www.inmotionhosting.com/support/security/check-if-port-blocked-netcat-ncat/), or [Nmap](https://www.inmotionhosting.com/support/server/ssh/port-scan-with-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](https://www.inmotionhosting.com/support/email/communicating-email-server-telnet/). Telnet is pre-installed on many Windows, macOS, and Unix OSs.

You may need to [enable Telnet on Windows Vista or 7](https://www.inmotionhosting.com/support/website/enable-telnet/).

Below we cover how to check if a port is open on your server or [local network](https://www.inmotionhosting.com/support/server/ssh/how-to-find-your-local-router-ip-address-in-the-terminal/) from your terminal with [Telnet](#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 ----------
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](https://www.inmotionhosting.com/support/edu/cpanel/find-server-name/) (part of your [temporary URL](https://www.inmotionhosting.com/support/website/using-your-temporary-url/)) or [server IP](https://www.inmotionhosting.com/support/edu/cpanel/how-to-find-your-shared-ip-address-of-your-server-in-cpanel/).

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](https://www.inmotionhosting.com/support/website/why-is-my-server-slow-how-do-i-run-a-ping-and-tracert-test/) or [mtr](https://www.inmotionhosting.com/support/server/ssh/what-is-mtr-and-how-to-test-network-performance/) to better understand the issue. Feel free to [contact Live Support](https://www.inmotionhosting.com/support/amp/how-to-get-great-technical-support/) for further assistance troubleshooting performance issues.

Ask us how we can support your next web application project with our [Cloud Server Hosting](https://www.inmotionhosting.com/cloud-vps).
