同时捕获两个不同端口上的网络流量 [英] capture network traffic on two different ports simultaneously
问题描述
我想同时在两个不同的港口捕获tcpdump的流量。
I wish to capture tcpdump traffic on two different ports simultaneouly .
我试过这个..
$ tcpdump port 21 ; tcpdump port 22
Althoug它的工作,但问题是,它将等待端口21上的流量,那么它将等待端口22。
Althoug it worked but problem is first it will wait for traffic on port 21 and when interrupted then it will wait for port 22.
另一个问题是它不会捕获端口22上的流量,直到端口21上的流量被捕获。
Also another problem is it will not capture the traffic on port 22 untill traffic on port 21 will be captured.
我想要一个免费订单解决方案意味着无论订单包到达如果他们是端口21或22他们应该被捕获。
I want an order free solution means in whatever order packet arrives if they are for port 21 or 22 they should be captured .
请帮助我。
编辑:
没有指定它之前的实际命令我试图运行是这个..
Sorry I did not specified it before the actual command I am trying to run is this ..
$ tcpdump -X -s0 protochain 50
和
$ tcpdump -X -s0 protochain 51
现在我需要同时使用50和51。 。
Now I need to use 50 and 51 both simultaneously ..
推荐答案
问题解决它其实很简单我应该在之前尝试过。
Problem solved it was actually very simple I should have tried it before ..
但感谢我通过看你的答案我的想法。
but thanks I got my idea just by looking at your answers.
我认为这是stackoverflow的美丽,如果我们可以找到一个确切的答案,我们可以通过讨论发明它。 ..
I think it is the beauty of stackoverflow if we could find an exact answer , we can invent it through the discussion. ..
$ tcpdump -X -s0 protochain 50 or 51
这篇关于同时捕获两个不同端口上的网络流量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!