{"id":1231,"date":"2026-03-17T02:15:16","date_gmt":"2026-03-17T02:15:16","guid":{"rendered":"https:\/\/shawngraham.io\/?p=1231"},"modified":"2026-03-17T02:15:17","modified_gmt":"2026-03-17T02:15:17","slug":"tcpdump-intro","status":"publish","type":"post","link":"https:\/\/shawngraham.io\/?p=1231","title":{"rendered":"Tcpdump Intro"},"content":{"rendered":"\n<p>So\u2026 what is tcpdump?<\/p>\n\n\n\n<p>Tcpdump is a command-line utility that captures network traffic from network interfaces. Also, it can read from network captures. This blog will cover syntax, options, and ways to use the tool for someone unfamiliar. This blog is also the first in a new series I am writing about the tools I use at work or for research. \u00a0So, feedback will be appreciated. I may also reference researchers I enjoy reading, the business tips I have learned, and the programming projects I create and their purposes.<\/p>\n\n\n\n<p>First thing. Tcpdump is available on a ton of different Linux distributions, but here is a simple Ubuntu Linux version that I have it opened in with the following:<\/p>\n\n\n\n<p>man(ual) tcpdump<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-2-1024x538.png\" alt=\"\" class=\"wp-image-1234\" srcset=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-2-1024x538.png 1024w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-2-300x158.png 300w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-2-768x403.png 768w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-2-1536x806.png 1536w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-2-850x446.png 850w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-2.png 1558w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You can also get a shorter or cleaner list by running tcpdump \u2013help.<\/p>\n\n\n\n<p>Rather than type out what each parameter is, I offer you another screenshot for you to view:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"175\" src=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1-1024x175.png\" alt=\"\" class=\"wp-image-1233\" srcset=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1-1024x175.png 1024w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1-300x51.png 300w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1-768x131.png 768w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1-1536x262.png 1536w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1-850x145.png 850w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1.png 1559w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now, this is not every parameter, and it doesn\u2019t include the ones I use most often, but it does include some highly valuable ones above.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"121\" src=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1024x121.png\" alt=\"\" class=\"wp-image-1232\" srcset=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1024x121.png 1024w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-300x35.png 300w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-768x91.png 768w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-1536x181.png 1536w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-850x100.png 850w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image.png 1558w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In the screenshot above (notice I switched operating systems due to privilege issues), I started collecting a network capture and then quit with Ctrl-C.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"447\" src=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-6-1024x447.png\" alt=\"\" class=\"wp-image-1238\" srcset=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-6-1024x447.png 1024w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-6-300x131.png 300w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-6-768x335.png 768w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-6-1536x670.png 1536w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-6-850x371.png 850w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-6.png 1561w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here you can see some of the traffic that was collected.<\/p>\n\n\n\n<p>But let\u2019s test out some of the optionality the tool provides. Below, I ran tcpdump with the <strong>-n<\/strong> (don\u2019t resolve hostnames\/ ports to services) and <strong>-r<\/strong> (read from file) parameters from our captured traffic (.pcap file) and asked it to display the first 30 packets.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"434\" src=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-5-1024x434.png\" alt=\"\" class=\"wp-image-1237\" srcset=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-5-1024x434.png 1024w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-5-300x127.png 300w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-5-768x325.png 768w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-5-1536x651.png 1536w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-5-850x360.png 850w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-5.png 1560w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now let\u2019s look more specifically at a bidirectional conversation. Here I am reading from the same capture file but limited with the filters <strong>\u2018tcp and (host 146.75.37.91 and host 192.168.36.135)\u2019<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"365\" src=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-3-1024x365.png\" alt=\"\" class=\"wp-image-1235\" srcset=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-3-1024x365.png 1024w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-3-300x107.png 300w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-3-768x274.png 768w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-3-1536x547.png 1536w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-3-850x303.png 850w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-3.png 1560w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now that is great and all, but what does it mean? I mean, I see some IP addresses and maybe some flags, whatever those are, but is there anything more that this tool can show me?<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"554\" src=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-4-1024x554.png\" alt=\"\" class=\"wp-image-1236\" srcset=\"https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-4-1024x554.png 1024w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-4-300x162.png 300w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-4-768x415.png 768w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-4-1536x831.png 1536w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-4-850x460.png 850w, https:\/\/shawngraham.io\/wp-content\/uploads\/2026\/03\/image-4.png 1559w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Yes, we can. Here we can see that we are now viewing hexdump information with verbose output for the first five packets\u2019 contents.<\/p>\n\n\n\n<p>Again, this may not be everything, but it is enough to get someone started.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So\u2026 what is tcpdump? Tcpdump is a command-line utility that captures network traffic from network interfaces. Also, it can read from network captures. This blog will cover syntax, options, and ways to use the tool for someone unfamiliar. This blog is also the first in a new series I am writing about the tools I&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1231","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/shawngraham.io\/index.php?rest_route=\/wp\/v2\/posts\/1231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shawngraham.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shawngraham.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shawngraham.io\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shawngraham.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1231"}],"version-history":[{"count":0,"href":"https:\/\/shawngraham.io\/index.php?rest_route=\/wp\/v2\/posts\/1231\/revisions"}],"wp:attachment":[{"href":"https:\/\/shawngraham.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shawngraham.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shawngraham.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}