netstat

Show all TCP connections, numeric (IP), process and app name, extended

netstat -antpe

Show all UDP connections, rest as above

netstat -anupe

Show all Unix, rest as above, full extended

netstat -anxpe

Crude DDoS test

netstat -an | grep ‘tcp\|udp’ | awk ‘{print $5}’ | cut -d: -f1 | uniq -c | sort -n

List listening and non-listening connections, numerical, TCP & UDP, extract the IP column, separate from port, count the occurances and finally sort numerically.

Uncategorized