Forrest logo
back to the tcpdump tool

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 machine

The command "tcpdump -i ${eth0} src ${192-168-1-1} and dst ${192-168-1-2} and dst port ${80}" is a TCP/IP packet capturing command using the tcpdump tool. It captures network traffic on a specific network interface (denoted by ${eth0}) and filters packets based on the following criteria:

  1. source address (src): ${192-168-1-1} - This filter captures packets where the source IP address is 192.168.1.1.

  2. destination address (dst): ${192-168-1-2} - This filter captures packets where the destination IP address is 192.168.1.2.

  3. destination port (dst port): ${80} - This filter captures packets where the destination port is 80, which is typically used for HTTP web traffic.

So, when you run this command, tcpdump will monitor network traffic on the specified interface and only display packets that match all the given conditions: source IP is 192.168.1.1, destination IP is 192.168.1.2, and destination port is 80.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the tcpdump tool