Interview Prep/Linux/Networking, SSH & Scheduling

How do you capture network traffic on a server?

IntermediateConceptNetworking, SSH & Scheduling
Answer
sudo tcpdump -i eth0 -nn port 443
sudo tcpdump -i any -nn host 10.0.3.7 and port 5432 -c 100
sudo tcpdump -i eth0 -w /tmp/cap.pcap -s0 'tcp port 8080'   # analyze in Wireshark
sudo tcpdump -nn 'tcp[tcpflags] & tcp-rst != 0'           # resets only

Always filter and limit (-c, -G/-W) on busy hosts.

All Linux questions Roadmap: Linux

More on Networking, SSH & Scheduling