The following are some network command bash scripts I put together to be able to run on a given endpoint or host. Running multiple network commands automatically when troubleshooting network connectivity, gathering pertinent details, analyzing active connections, troubleshooting DNS issues, and tracing a connection path.
This script gathers basic network information with the hostname, ifconfig, ip a, arp -a, route and ip route network commands in Linux.
There are different scenarios where running any one or multiple of these commands becomes beneficial. There are cases when gathering all of this information at once can speed up the process given the circumstance. With that in mind, this script gathers a plethora of details to help in troubleshooting network connectivity, gathering ip configuration details, duplicate IP addresses, and retrieving routing information.
This script runs the commands ss -tuln and netstat -an commands together to list active network connections in two different formats.-
Useful for analyzing suspicious or questionable connections on a host, verifying connections to certain IPs, or if you're curious on what active connections there are.
This script refreshes the network connection of a given host. Useful when troubleshooting connectivity issues or in circumstances of renewing a lease with a DHCP server.