Useful shortcuts for vi editor

Thursday, 7 April 2016

tcpdump examples

tcpdump -D
-> Display all available interfaces for tcpdump

$ tcpdump -i 1 | more
-> Listen (interface 1) with more command

$ tcpdump -i any
-> Listen all actived interfaces

$ tcpdump -i eth1
-> Listen eth1 interface

$ tcpdump -i eth0 port 22
-> Listen eth0 interface on port 22

$ tcpdump -i eth2 port 23 -w example.pcap
-> Listen eth2 interface on port 23 and save as desired file name