TrickAndTweak

Linux Tricks Tcpdump

ping -c 500 <server_to_ping>

netcat -w3 -zv <destination>

tcpdump -w tcpdumprdeluh0001050_$(date +m-%d).pcap -i eth0 tcp and port 2049

-w : Write to file
tcp : Add protocol after interface

If .pcap file is needed:

	tcpdump -w - | tee somefile.pcap | tcpdump -r -
	What it does:
		○ -w - tells tcpdump to write binary data to stdout
		○ tee writes that binary data to a file AND to its own stdout
		○ -r - tells the second tcpdump to get its data from its stdin

If .txt file is enough:

tcpdump -i eth0 tcp and port 2049 | tee tcpdumpTEST.txt

tcpdump -i eth0 host 141.6.28.96 -w - | tee /tmp/tcpdumpLogs_$(date +m-%d).log | tcpdump -r -

Trick and tweaks

Other

Certification materials

edit SideBar

Blix theme adapted by David Gilbert, powered by PmWiki