Diagnosing Network Connections - Paiet/Tech-Journal-for-Everything GitHub Wiki
ping - Test server connectivity
dig - Perform a DNS lookup
nslookup - Perform a DNS lookup
host - Perform a DNS lookup
traceroute - Display the path to a host
tracepath - Test connectivity along the path
telnet - Unencrypted shell session
ssh - Encrypted shell session
ftp - Unencrypted file transfers
ifconfig - Display information about network interfaces
route - Display and manipulate the routing table
route -n displays routing table
- Useful for temporary changes
route add default gw 192.168.0.1
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.0.1
- netstat - Display network connections
netstat -atp (All sessions)
netstat -tp (Active sessions)
netstat --route displays routing table
netstat --program attempts to display software using ports
- Reset Networking
service network restart
systemctl restart network.service
ifup eth0 - Enable an interface
ifdown eth0 - Disable an interface
- Packet Capture
tcpdump
- Displays packets passing through an interface
tcpdump -i eth0 > data.txt
tail -f ./data.txt