4/15/2024 0 Comments Testing internet connectionIf 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? On the other hand if the telnet session does not succeed and fails to connect you may get output similar to the below.Ĭonnecting To not open connection to the host, on port 1111: Connect failed 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:Ī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: 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. This post is a follow on from my post last week regarding how to install the telnet client.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |