> Basic Network Diagnostics
Command | Description | Example |
---|---|---|
ping |
Test network connectivity | ping -c 4 google.com |
traceroute |
Trace path to destination (Linux) | traceroute google.com |
tracert |
Trace path to destination (Windows) | tracert google.com |
> Port & Connection Analysis
Command | Description | Example |
---|---|---|
netstat |
Network statistics and connections | netstat -tulnp (Linux)netstat -ano (Windows) |
ss |
Socket statistics (Linux) | ss -tulnp |
lsof |
List open files and ports | lsof -i :80 |
> Network Scanning
Command | Description | Example |
---|---|---|
nmap |
Network discovery and security auditing | nmap -sV -A 192.168.1.1 |
hping3 |
Packet crafting and analysis | hping3 -S -p 80 -c 5 google.com |
netdiscover |
Active/passive ARP reconnaissance | netdiscover -i eth0 |
> Packet Analysis
Command | Description | Example |
---|---|---|
tcpdump |
Command-line packet analyzer | tcpdump -i eth0 port 80 |
tshark |
CLI version of Wireshark | tshark -i eth0 -f "tcp port 443" |
ngrep |
Network grep - filter network traffic | ngrep -q -W byline "password" port 80 |
> DNS & Web Tools
Command | Description | Example |
---|---|---|
dig |
DNS lookup utility | dig example.com ANY |
host |
DNS lookup utility | host -t mx example.com |
curl |
Transfer data from URLs | curl -v -X POST https://example.com |
> Firewall & Routing
Command | Description | Example |
---|---|---|
iptables |
Linux firewall configuration | iptables -A INPUT -p tcp --dport 22 -j ACCEPT |
ufw |
Uncomplicated Firewall (Linux) | ufw allow 22/tcp |
route |
Show/manipulate routing table | route -n |