Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debian 7.11 - How to capture SMPP all arrived and sent packets by some ports

I'm using following code for capturing incoming and outgoing tcp packets by ports:

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

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

Thanks in advance.

like image 450
SBotirov Avatar asked Jul 12 '17 18:07

SBotirov


1 Answers

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 the incoming traffic --direction=out for the outgoing traffic.

More you can find on the manual page of tcpdump. http://www.tcpdump.org/tcpdump_man.html

like image 70
Uddhav P. Gautam Avatar answered Sep 29 '22 10:09

Uddhav P. Gautam