2 <h2>Useful Linux Commands</h2>
4 1. Who's listening on port 80?
8 2. Who's talking to a remote port 11300?
10 netstat -pal | grep 11300
12 3. Incoming web requests
15 ngrep -q "POST|GET" | egrep "(POST|GET) /"
17 4. Incoming and outgoing web traffic
19 tcpdump "port 80" -X -s 1024
21 5. Who's blocking port access?
24 /sbin/iptables -F # flush iptables
26 6. Who's the main www process?
30 7. Start gdb by process name
32 gdb --pid=`ps -eo pid,comm | grep www | cut -d' ' -f1`