On this page you find all important commands for the CLI tool tcpdump. If the
command you are looking for is missing please ask our AI.
tcpdump
Tcpdump is a popular command line tool used for network packet analysis and troubleshooting. It allows users to capture and examine network traffic in real-time. Here are some key points about tcpdump:
- Tcpdump is available on various operating systems, including Linux, macOS, and Windows.
- It operates by capturing packets from a network interface or reading packets from a previously saved capture file.
- Tcpdump uses the libpcap library to capture and process network packets.
- It supports a wide range of protocols, including TCP, UDP, ICMP, IP, HTTP, FTP, SSH, DNS, and many more.
- Tcpdump provides detailed information about captured packets, including source and destination IP addresses, port numbers, packet lengths, protocol flags, and payload data.
- It allows users to apply filters to capture specific types of traffic based on various criteria, such as source/destination IP addresses, port numbers, protocols, packet sizes, and more.
- Tcpdump can be run with numerous options, allowing users to control the level of packet detail, output format, and other functionalities.
- The captured packets can be displayed on the terminal or saved to a file for later analysis.
- Tcpdump also supports packet visualization using Wireshark, a popular GUI-based packet analysis tool.
- It is widely used by network administrators, security professionals, and system troubleshooters to diagnose network-related issues, monitor network activity, analyze security incidents, and perform traffic analysis.
List of commands for tcpdump:
-
tcpdump:tldr:3594a tcpdump: Read from a given dump file.$ tcpdump -r ${dumpfile-pcap}try on your machineexplain this command
-
tcpdump:tldr:52c23 tcpdump: Capture all traffic except traffic over port 22 and save to a dump file.$ tcpdump -w ${dumpfile-pcap} port not ${22}try on your machineexplain this command
-
tcpdump:tldr:571f3 tcpdump: Capture the traffic of a specific interface.$ tcpdump -i ${eth0}try on your machineexplain this command
-
tcpdump:tldr:72d9b tcpdump: Capture the traffic from a specific interface, source, destination and destination port.$ tcpdump -i ${eth0} src ${192-168-1-1} and dst ${192-168-1-2} and dst port ${80}try on your machineexplain this command
-
tcpdump:tldr:85192 tcpdump: Capture the traffic from or to a host.$ tcpdump host ${www-example-com}try on your machineexplain this command
-
tcpdump:tldr:98770 tcpdump: List available network interfaces.$ tcpdump -Dtry on your machineexplain this command
-
tcpdump:tldr:b9a9f tcpdump: Capture the traffic of a network.$ tcpdump net ${192-168-1-0-24}try on your machineexplain this command
-
tcpdump:tldr:dfe6a tcpdump: Capture all TCP traffic showing contents (ASCII) in console.$ tcpdump -A tcptry on your machineexplain this command