How to check hostname reachability?

Once you have made sure the DNS resolution is successful, you can move on to the next step to verify if the hostname is reachable on the required port.

If you are using a proxy, you should run this from that proxy system.

To verify this, you can try running the telnet or alternative command from the terminal based on your OS and terminal. If it is not reachable, you can try running the tracert or traceroute or alternative command from the terminal based on your OS or terminal. For more information, refer to the guide on how to check hostname reachability.

If you have multiple ISPs, then we recommend you to test this on each of those ISPs. Very rarely, the problem may not be in your firewall, but may be in the ISP.

If, for whatever reasons, the hostname is not reachable on the port 443, raise a support ticket with your infrastructure and network service provider to check the configuration in your Proxy and/or Firewall as applicable.

Note: The hostname reachability has to be consistent and successful at any point of time from all the instances from where the API request might be made in future.

Next: If this step is successful, it only means that your system is now able to reach our hostname on port 443. It still does not confirm that the hostname is trusted by your system.

Hostname reachability guide

List of various commands and the terminals in which it will work.

CommandsCommand PromptGitBashUbuntu

telnet

YES

YES

YES

tracert

YES

YES

NO

mtr

NO

NO

YES

* Some commands may require you to enable the feature or install the tool in the OS before using.

Command - telnet

Steps to run telnet in Command Prompt

The telnet command is used to establish a connection to a remote host over a network using the Telnet protocol.

It allows a user to connect to a server and perform various operations, such as sending data and receiving responses.

Here is an example of a "telnet" command to connect to the "api-sandbox.clear.in" server on port 443 (which is the default port for HTTPS).

For running this command, make sure that the telnet client is installed.

Go to command prompt and type the below command

Sandbox:

telnet api-sandbox.clear.in 443

If you get a blank screen with a blinking cursor that means the hostname is reachable until you terminate with Ctrl+C

For error scenarios you will get a message as below.

Repeat the same with the below hostname as well.

telnet storage.clear.in 443

Production:

telnet api.clear.in 443

Repeat the same with the below hostname as well.

telnet storage.clear.in 443

Steps to run telnet in Ubuntu (Linux)

Make sure that the telnet client is installed before running the below command.

Open Ubuntu terminal and type the below command.

Sandbox:

telnet api-sandbox.clear.in 443

This output shows that the telnet connection was successful and that the server "api-sandbox.clear.in" is reachable on port 443.

The message "Escape character is '^]'." indicates that the telnet session is now active and ready to receive commands.

Repeat the same with the below hostname as well.

telnet storage.clear.in 443

Production:

telnet api.clear.in 443

This output shows that the telnet connection was successful and that the server "api.clear.in" is reachable on port 443.

The message "Escape character is '^]'." indicates that the telnet session is now active and ready to receive commands.

Repeat the same with the below hostname as well.

telnet storage.clear.in 443

Steps to run telnet in GitBash

We cannot directly run telnet from GitBash, we will need to use winpty along with telnet to check the hostname reachability as below.

Sandbox:

winpty telnet api-sandbox.clear.in 443

Repeat the same with the below hostname as well.

winpty telnet storage.clear.in 443

Production:

The winpty command is used on Windows systems to enable a Windows command prompt to interact with command-line applications that use a Unix-style terminal interface.

The telnet command, on the other hand, is used to establish a connection to a remote host over a network using the Telnet protocol.

Assuming that you have a valid hostname for the "api.clear.in" server and that it is reachable on port 443, you can use the following command to establish a Telnet connection on a Windows system using the "winpty" command:

winpty telnet api.clear.in 443

If for whatever reasons, the hostname is not reachable on the port 443, then your Network team needs to review the route all the way from your terminal to the Clear server using the tracert or traceroute command.

Repeat the same with the below hostname as well.

winpty telnet storage.clear.in 443

Command - traceroute

Steps to run traceroute (tracert) in Command Prompt

Traceroute is a command you use to 'trace' the route that a packet takes when traveling to its destination

Go to Command prompt and run the tracert command for both sandbox and production as below.

Sandbox:

tracert api-sandbox.clear.in

Note, the number of hops may vary in your system, which is okay. The key thing here is to verify the source IP (which should be your local IP) and the destination IP in the last (which is our AWS global accelerator IP - one of the 2 mentioned above).

This output shows the route that the packets took to reach the "api-sandbox.clear.in" server.

The output displays each hop between the source and destination, along with the IP address of the router or device at each hop, and the time it took for the packet to travel from one hop to the next. The last hop indicates the destination server's IP address, which is 75.2.104.91 in this case.

Repeat the same with the below hostname as well.

tracert storage.clear.in

Production:

tracert api.clear.in

Repeat the same with the below hostname as well.

tracert storage.clear.in

Steps to run traceroute (tracert) in GitBash

Go to GitBash and run the tracert command for both sandbox and production hostname as below.

Sandbox:

tracert api-sandbox.clear.in

Repeat the same with the below hostname as well.

tracert storage.clear.in

Production:

tracert api.clear.in

Repeat the same with the below hostname as well.

tracert storage.clear.in

Last updated