I think a similar post on leveraging Wireshark would be neat. The deepest I tend to need to go is searching packets for a known substring and then following the TCP stream to see where something unexpected happened. Add to this the analyzing of the frames on this stream and you can diagnose tricky timeout issues, bad protocol usage, and much more.
Yeah, my workflow is generally to use tshark (wireshark's command-line tool) for server-side capture, then scp file to local and use wireshark gui to poke around. I find tshark's interface to be simpler than tcpdump. tcpdump feels like bringing a gun to a knife fight when all you want to do is look at application layer payloads/streams (http/etc). But it's good to know more about tcpdump than I did before, because wh…
Tcpdump Examples
11–20 of 41 posts
Re: Tcpdump Examples
#12Earlier quoted context omitted.
Reading through a long man page in terminal to get to el' result and then find and use cmd extensions. vs 2s google "how to inurl: tcpdump http packet"
You are doing it wrong if you are "reading through a long man page".
Re: Tcpdump Examples
#13Packet stream is dumped into some perl which keeps across the sequence number looking for out of sequence packets, summarise output every second into an elastic stack. Also have it comparing multiple streams for dual streaming and comparing skew.
Ironically I rarely use tcpdump to look at tcp packets - about the only interesting thing to me there is the SYN packets to see if the packet is getting through the firewall!
Re: Tcpdump Examples
#14Re: Tcpdump Examples
#15Earlier quoted context omitted.
Yeah, my workflow is generally to use tshark (wireshark's command-line tool) for server-side capture, then scp file to local and use wireshark gui to poke around. I find tshark's interface to be simpler than tcpdump. tcpdump feels like bringing a gun to a knife fight when all you want to do is look at application layer payloads/streams (http/etc). But it's good to know more about tcpdump than I did before, because wh…
You can also pipe tshark capture to the Wireshark GUI on your machine through ssh in realtime, e.g. `ssh host.example.com 'tshark -i eth0 -w - -F pcapng -f "not tcp port 22"' | wireshark -k -i -`
Re: Tcpdump Examples
#161. Use `-i any` -- just in case the traffic you want to look at is not on the interface you think it is. Also doesn't put the interface(s) into promiscuous mode, which can be preferable.
2. Read the `pcap-filter` man page.
Re: Tcpdump Examples
#17Earlier quoted context omitted.
You are doing it wrong if you are "reading through a long man page".
What is the „correct“ way? (real question, I am curious)
Re: Tcpdump Examples
#18Additionally, it's always better to always use "-p" if you don't want to accidentally attract additional traffic to the host (additional VLAN on a 802.1q interface, or additional multicast traffic).
Re: Tcpdump Examples
#19The "-nn" explanation seems wrong. Neither libpcap's tcpdump nor BSD's need more than one "-n" to not translate port. Even in their examples, we can spot that using a single "-n" do not translate port names. Additionally, it's always better to always use "-p" if you don't want to accidentally attract additional traffic to the host (additional VLAN on a 802.1q interface, or additional multicast traffic).
Re: Tcpdump Examples
#20The "-nn" explanation seems wrong. Neither libpcap's tcpdump nor BSD's need more than one "-n" to not translate port. Even in their examples, we can spot that using a single "-n" do not translate port names. Additionally, it's always better to always use "-p" if you don't want to accidentally attract additional traffic to the host (additional VLAN on a 802.1q interface, or additional multicast traffic).
I have always had to use -nn to not translate ports. If what you say is true, it must be recent.