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

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


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

permanent link

answered 09 Sep '14, 16:28

navaz's gravatar image

navaz
11336
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,620
×832
×349
×97
×4

question asked: 09 Sep '14, 13:41

question was seen: 20,823 times

last updated: 09 Sep '14, 17:31

p​o​w​e​r​e​d by O​S​Q​A