BASH - Test Connection Simple script: Difference between revisions
From IT-Arts.net
No edit summary |
m Text replacement - "Category:Wiki" to "Category:Wiki '''''[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]''''' " |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[Category: | [[Category:Wiki]] | ||
'''''[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]''''' | |||
== Test Connection Simple Script == | == Test Connection Simple Script == | ||
Latest revision as of 08:24, 17 January 2026
Test Connection Simple Script
#!/bin/bash IP_POOL="8.8.8.8 8.8.4.4 google.com" 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
