How To Collect Tcpdump In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Start the tcpdump command with root privileges.
# sudo tcpdump
2. Specify a network interface to capture packets from.
# sudo tcpdump -i eth0
3. Set the capture filter.
# sudo tcpdump -i eth0 port 80
4. Specify the output file.
# sudo tcpdump -i eth0 port 80 -w capture.pcap
5. Press CTRL+C to stop the capture.
6. Analyze the capture file using Wireshark or other packet analyzer.