BASH - Test Connection Simple script

From Wiki.IT-Arts.net
Revision as of 14:26, 21 October 2024 by Admin (talk | contribs) (Created page with "Category:Post-It == Test Connection Simple Script == <nowiki> #!/bin/bash IP_POOL="8.8.8.8 google.com 91.224.148.1 80.67.169.12" HITS=2 echo "#############################" echo "##### Ping" echo "#############################" for a in $IP_POOL; do ping $a -c $HITS done echo "#############################" echo "Internet IP Address"; echo "#############################"; echo "# Wget chekip.dyndns.org Method:"; wget -q -O - checkip.dyndns.org|sed -e 's...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Test Connection Simple Script

#!/bin/bash


IP_POOL="8.8.8.8 google.com 91.224.148.1 80.67.169.12"
HITS=2

echo "#############################"
echo "#####    Ping"
echo "#############################"
for a in $IP_POOL; do

	ping $a -c $HITS

done


echo "#############################"
echo "Internet IP Address";
echo "#############################";
echo "# Wget chekip.dyndns.org Method:";
wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//';
echo "############"
echo "# Curl ifconfig.me Method:";
curl ifconfig.me;
echo ""

echo "##############################"
echo "##### Traceroute 8.8.8.8"
traceroute 8.8.8.8

echo "#############################"
echo "#####    /etc/resolv.conf"
echo "#############################"
cat /etc/resolv.conf


echo "#############################"
echo "#####    route -n"
echo "#############################"
route -n


exit 0