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

Hello guys :)

I'm looking for a help. I have a problem with capture filter configuration.

I want to capture just a traffic from specific tcp ports. (TCP port 23 (telnet) and tcp portrange 2066-2100)

So my syntax in "Capture options" "Capture filter" field looks like this:

tcp dst port 23 and tcp dst portrange 2066-2100

and there is no capture with this command!

If I use just "tcp dst port 23" or just "tcp dst portrange 2066-2100" as a filter, I can see the output, but I can't get these filters to work together as one. Where is a problem?

Thank you for your time and for your answers. Any helpful information is highly appreciated.

asked 26 Jun '12, 06:59

jomajo's gravatar image

jomajo
1335
accept rate: 100%


I don't know why, but this is working:

tcp dst portrange 2066-2100 or tcp dst port 23

:)

Oh thanks, I saw I have an answer too :)

permanent link

answered 26 Jun '12, 07:08

jomajo's gravatar image

jomajo
1335
accept rate: 100%

I don't know why, but this is working

see the answer of Bill Meier. OR is the key. Reason: The destination port cannot be 23 AND in the range of 2066-2100 (at the same time).

(26 Jun '12, 07:39) Kurt Knochner ♦

Use ... or ...

and means both conditions must be satisfied which is not going to happen if the conditions are exclusive ....

permanent link

answered 26 Jun '12, 07:07

Bill%20Meier's gravatar image

Bill Meier ♦♦
3.2k1850
accept rate: 17%

edited 26 Jun '12, 07:09

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:

×184
×115
×20

question asked: 26 Jun '12, 06:59

question was seen: 32,136 times

last updated: 26 Jun '12, 07:39

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