
Tcpdump: verbose output suppressed, use -v or -vv for full protocol decode The first simple command to use is tcpdump -n $ sudo tcpdump -n -i enp1s0 Next we can use the interface number or name with the -i switch to sniff the particular interface. However when using the "any" interface, tcpdump will not be able to set promiscuous mode. Here its enp1s0.Īlso note that there is a pseudo device named "any" which can be used to capture on all interfaces. Usually the main network interface of the system is listed at the first position. $ tcpdump -Dģ.any (Pseudo-device that captures on all interfaces) Ĥ.nflog (Linux netfilter log (NFLOG) interface) ĥ.nfqueue (Linux netfilter queue (NFQUEUE) interface)

The "-D" option or "-list-interfaces" option can be used to list all the interfaces that are available. It is compatible with tcpdump (in terms of usage and options). It is documented here.įor windows use the alternative called windump.

Tcpdump depends on libpcap library for sniffing packets. On ubunut for example it can be installed by typing the following in terminal Install Tcpdump $ sudo apt-get install tcpdump In this tutorial we are going to learn to use tcpdump and how it can be used for network analysis.

As a commandline tool tcpdump is quite powerful for network analysis as filter expressions can be passed in and tcpdump would pick up only the matching packets and dump them.
