What is TCPdump
This flexible and powerful command-line tool helps in network troubleshooting. Tcpdump is a command-line utility that enables the collection and analysis of network traffic traversing the system. It is frequently used for network troubleshooting and as a security tool. TCPdump is a robust and flexible tool with numerous settings and filters that can be used in several situations. Since it is a command-line tool, it is suitable for running on distant servers or devices that lack a graphical user interface to collect data for subsequent analysis. It can be run in the background or scheduled with cron. This essay will discuss some of TCPdump’s most prevalent features.
Read our latest article about Network Protocols and learn more about TCP/UDP protocols.
Capturing packets with TCPdump
TCPdump requires elevated rights to collect packets for troubleshooting or analysis, so most commands in the following examples are started with sudo.
Use the following command to get started for a list of interfaces that can be captured:
tcpdump --list-interfaces
or
sudo tcpdump -D