This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Capture ALL incoming traffic and ONLY incoming traffic.

0

Hi

I have a set up with one switch and 4 hosts. I am capturing the traffic at Host interface. I am using below command to capture the traffic.

tcpdump -w filename.pcap -i eth1

It shows all the incoming and outgoing packets. I am interested in seeing only the incoming packets. It uses multiple port numbers. How can i achieve this ?

Regards, Navaz

asked 09 Sep '14, 13:41

navaz's gravatar image

navaz
11336
accept rate: 0%

edited 09 Sep '14, 17:31

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196


One Answer:

0

After few searches i found this.

Outgoing from 192.168.0.1: tcpdump -i eth0 ip -X src host 192.168.0.1

Incoming to 192.168.0.1: tcpdump -i eth0 ip -X dst host 192.168.0.1

Thanks Navaz

answered 09 Sep '14, 16:28

navaz's gravatar image

navaz
11336
accept rate: 0%