Skip to content

Instantly share code, notes, and snippets.

@vvdaal
Last active August 20, 2018 11:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvdaal/6008105 to your computer and use it in GitHub Desktop.
Save vvdaal/6008105 to your computer and use it in GitHub Desktop.
Performs a ping, traceroute, nslookup and telnet (port 80 and 21) Usage: ./multicheck.sh www.site_to_check.com 2>&1 | tee multicheck.log
#!/bin/bash
echo "********************************************************"
echo "BEGINNING PING TO $1"
echo "********************************************************"
echo "Command: ping -c 10 $1"
ping -c 10 $1
wait
echo "********************************************************"
echo "BEGINNING NSLOOKUP TO $1"
echo "********************************************************"
echo "Command: nslookup $1"
nslookup $1
wait
echo "********************************************************"
echo "BEGINNING TELNET TO $1 AT PORT 80"
echo "********************************************************"
echo "Command: (echo 'GET / HTTP/1.1'; echo 'Host: $1';echo;echo; sleep 2 ) | telnet $1 80"
(echo 'GET / HTTP/1.1'; echo 'Host: $1';echo;echo; sleep 2 ) | telnet $1 80
wait
echo "********************************************************"
echo "BEGINNING TELNET TO $1 AT PORT 21"
echo "********************************************************"
echo "Command: (echo;echo; sleep 2 ) | telnet $1 21"
(echo;echo; sleep 2 ) | telnet $1 21
wait
echo "********************************************************"
echo "BEGINNING TRACEROUTE TO $1"
echo "********************************************************"
echo "Command: traceroute -m 25 $1"
traceroute -m 25 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment