Debian 7.11 - How to capture SMPP all incoming and outgoing packages by some ports

I use the following code to capture tcp inbound and outbound packets on ports:

tcpdump -i any -s 0 -vvv -A port 3727 or port 5016 or port 3724 -w /home/admin/dump1.cap

But tcpdump only captures incoming packets, I need incoming and outgoing packets at the same time. Does anyone know where my mistake is?

Thanks in advance.

+6
source share
1 answer
tcpdump -i any -s 0 -vvv -A port 3727 or port 5016 or port 3724 --direction=in --direction=out -w /home/admin/dump1.cap

- direction = in for inbound traffic --direction = out for outbound traffic.

You can find more details on the tcpdump man page. http://www.tcpdump.org/tcpdump_man.html

+6
source

All Articles