

- #HOW TO USE TELNET COMMAND TO CHECK PORT STATUS HOW TO#
- #HOW TO USE TELNET COMMAND TO CHECK PORT STATUS INSTALL#
- #HOW TO USE TELNET COMMAND TO CHECK PORT STATUS WINDOWS#
Network and system administrators use it to configure and administer network devices such as servers, routers, etc.
#HOW TO USE TELNET COMMAND TO CHECK PORT STATUS HOW TO#
This article explains how to telnet to a port to check whether a port is open or closed. You could simply try disabling your firewall and performing the test again to rule this out as being part of the problem.Īs you can see there are plenty of reasons a telnet connection may or may not succeed, however being able to test this by enabling the telnet tool has allowed us to perform additional troubleshooting steps to get an idea of where potential connectivity problems may lie.Telnet is one of the simplest ways to check connectivity on certain ports. The connection may be blocked in your own network, or otherwise somewhere else along the route: Perhaps you are running a firewall in your own network which is blocking various outbound ports, the connection attempt may not even leave your local network depending on your configuration. The telnet client is a good tool for testing server security quickly if you want to see if a server is responding on a port that it shouldn’t be.
#HOW TO USE TELNET COMMAND TO CHECK PORT STATUS WINDOWS#
If you have access to the remote server confirm with ‘netstat’ that a service is listening on the port specified, then investigate any firewalls in use such as Windows firewall or iptables. The remote server may not be responding on that port: The server you’re trying to connect to might be listening on the port, however it may be running a firewall which is configured to block the connection resulting in a failure of the telnet client. If you have access to the remote server you could run a command such as ‘netstat’ to get an idea of what ports the server is listening on and accepting connections for. The remote server might not be listening on that port: The server you’re trying to connect to might not have any services listening on the port you’re trying to connect on, in this instance it will not respond and the connection will fail as it’s not expecting connections on the port. In this example I’m trying to connect to on a random port 1111, however it fails, what could be the problem? C:\>telnet 1111Ĭonnecting To not open connection to the host, on port 1111: Connect failed On the other hand if the telnet session does not succeed and fails to connect you may get output similar to the below. Even better if we get a response to our GET command as this can confirm if the web server is responding and behaving as expected.

Although this is a basic test, if the session goes blank it confirms that we can establish a TCP connection on port 80 to the web server meaning there is likely a web server running on the remote host accepting our connections. In the above example we have connected to a web server on port 80 which is typically used to serve HTTP traffic, so we can issue HTTP commands as below: GET /Īfter entering that into your blank telnet session you will not see any output until you press enter, at this point you should see a response from the web server. If this connection succeeds your command window will go blank, you can either terminate the session by pressing “control + ]” and then entering ‘quit’, or better yet from there you can issue commands to the server. For example we can enter the below command to attempt connect to on port 80: telnet 80 The command is used in the format of ‘telnet hostname/ip address port‘ and entered into either command prompt or powershell under Windows, or through the shell in Linux or Unix. Now that the telnet client is installed ( see my last post here if you have not done this yet) we can perform some basic network connectivity tests. The telnet client is simple yet extremely powerful in helping us gain a quick idea of where a problem may lie with TCP connectivity, it’s one of my first go to tools to use when testing a network connection to a server.
#HOW TO USE TELNET COMMAND TO CHECK PORT STATUS INSTALL#
This post is a follow on from my post last week regarding how to install the telnet client.
