THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Command Line port filter

  • retag add tags

I have use Command Lind to start Wire Shark capture fallow this- wireshark -i LAN_B -i LAN_A -k -f "dst port 9500" -S -l -b duration:60 --ring-buffer files:10 -w D:\tmp\test03

All Function that work except Filter Function, I do"nt know why it not work where this thing wrong and how to soult this???

Ronnachit's avatar
1
Ronnachit
asked 2020-05-22 09:09:17 +0000
edit flag offensive 0 remove flag close merge delete

Comments

In what way is it not working, does it exclude traffic you want or include traffic you didn't want?

Do you have VLAN tagged traffic?

grahamb's avatar grahamb (2020-05-22 09:44:50 +0000) edit

The capture filter is not used when two interfaces are defined. I tried it and I've the same issue. Bug?

JasMan's avatar JasMan (2020-05-22 10:07:43 +0000) edit
add a comment see more comments

1 Answer

1

It depends on where you put the capture filter in the argument list. See the man page entry for the -f option:

This option can occur multiple times. If used before the first occurrence of the -i option, it sets the default capture filter expression. If used after an -i option, it sets the capture filter expression for the interface specified by the last -i option occurring before this option. If the capture filter expression is not set specifically, the default capture filter expression is used if provided.

The behaviour can be verified by omitting the -k flag and opening the Capture Options dialog and inspecting the capture filter for each interface.

grahamb's avatar
23.8k
grahamb
answered 2020-05-22 10:35:44 +0000, updated 2020-05-22 10:39:08 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer