Ping a great tool in monitoring a host status in real-time. It is available on all (not sure) operating systems such as Windows, Linux, Mac and even Android. I commonly use ping whenever I wanted to see whether or a host is alive or dead. However, sometimes firewalls do block generic ping packets which utilizes Internet Control Message Protocol (ICMP is a protocol in order for ping to work properly. You don’t have to dig on that but you can if you want. ;)). So now, I don’t have any tool to use to check the host status. However, one alternative is to manually check it or visit the website in order to confirm if the host is up. However, since I don’t like firing up the website and reload it every n seconds just to see if it’s up or not (because I am lazy and it doesn’t have logs), I tried to see if I can do a TCP ping. I searched google and turns out there is a too called TCP ping. However its a Windows-only tool (see here). (Too bad. Yeah. Life sucks but you shouldn’t go lose hope that easily.) Turns out if you dig further you will find this! At last the tool that we have been waiting for! But wait. Hold your horses. It’s a frigging script! How do I run it and make it terminal invokable (if that is even a term)? Well, lucky for you I have the same questions. Read below to find out the answer!
First thing is first. We have to install the dependencies:
Installing TCP Traceroute:
Since the TCP ping is script, we have to install its core dependency. To do this in Debian / Ubuntu / Linux Mint or Kali Linux (and other Debian-based distro), type in the terminal (if you have Kali Linux, you don’t have to do this part):
sudo apt-get install tcptraceroute
and wait for it to install. Next we are going to get the script itself.
Can I haz the script for TCP ping please?
Now, we have to download the script. To do this, open up terminal and type:
This will navigate our terminal to /usr/bin location (Yes. “bin” is for binaries and not scripts. But I wanted the TCP ping script in there together with other tools on Kali so please forgive me for breaking the rules). Next, we are going to download the actual script. Type this on the terminal:
sudo wget http://www.vdberg.org/~richard/tcpping
And then we change it permission so that we could execute it by typing:
sudo chmod 755 tcpping
Now we make it an executable which could be called into the terminal anytime by typing:
chmod +x tcpping
And there you go! You have just added TCP ping into your collection of tools! In addition to that, you can call it anytime in the terminal! If you have made it up to this part, congratulate yourself!! You did a good job! Enjoy!
- Install TCP ping on Linux (http://xmodulo.com/2013/01/how-to-install-tcpping-on-linux.html)