Exercise: Capturing UDP Packets

We'll now look at a command-line tool that allows us to capture UDP packets.

Let’s get into viewing real packets.

What is tcpdump?

tcpdump is a command-line tool that can be used to view packets being sent and received on a computer. The simplest way to run it is to simply type the following command into a terminal and hit enter. You can try this on the terminal provided at the end of this lesson!

tcpdump

Packets will start getting printed rapidly to give a comprehensive view of the traffic.

Sample Output

However, some might not find it to be very helpful because it does not allow for a more zoomed-in and fine-grained dissection of the packets, which is the main purpose of tcpdump (it’s technically a packet analyzer). So you might want to consider using some flags to filter relevant packets out.

Get hands-on with 1200+ tech skills courses.