Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.
tcpdump is a packet sniffer — it captures the network packets (traffic) that pass through a machine, enabling you to examine and analyze the traffic afterward. It is capable of becoming very complex, but the basics
are pretty straightforward and useful for network troubleshooting.
To invoke it, you must be root. The absolute
basic command is just tcpdump, which captures every package
into or out of the system and print a line of text to standard out. This is great if you’re directly logged into a machine, but not so good if you’re using ssh because every time tcpdump prints to stdout, it sends a
packet with this information across the ssh connection, producing another
packet whose information is printed to stdout, which is then sent across ssh … and
so on. So to filter out ssh packets, try:
tcpdump not port 22
The output will start with a precise timestamp, identify the packet as IP
or as a type of TCP, and then give source and destination (both with port),
followed by some packet information. Check the man page for more detail.
12:28:02.958545 IP client.example.com.59713 > ldap.example.com.ldaps: P
170:367(197) ack 149 win 60
|
There are also options to, among other things: Turn off name resolution;
specify a particular network interface; get a sample of packets then exit;
capture output to a file; replay information from a file; and do packet match
filtering. Check the manpage for further information.
This article was first published on ServerWatch.com.
RELATED NEWS AND ANALYSIS
-
Ethics and Artificial Intelligence: Driving Greater Equality
FEATURE | By James Maguire,
December 16, 2020
-
AI vs. Machine Learning vs. Deep Learning
FEATURE | By Cynthia Harvey,
December 11, 2020
-
Huawei’s AI Update: Things Are Moving Faster Than We Think
FEATURE | By Rob Enderle,
December 04, 2020
-
Keeping Machine Learning Algorithms Honest in the ‘Ethics-First’ Era
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 18, 2020
-
Key Trends in Chatbots and RPA
FEATURE | By Guest Author,
November 10, 2020
-
Top 10 AIOps Companies
FEATURE | By Samuel Greengard,
November 05, 2020
-
What is Text Analysis?
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 02, 2020
-
How Intel’s Work With Autonomous Cars Could Redefine General Purpose AI
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 29, 2020
-
Dell Technologies World: Weaving Together Human And Machine Interaction For AI And Robotics
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 23, 2020
-
The Super Moderator, or How IBM Project Debater Could Save Social Media
FEATURE | By Rob Enderle,
October 16, 2020
-
Top 10 Chatbot Platforms
FEATURE | By Cynthia Harvey,
October 07, 2020
-
Finding a Career Path in AI
ARTIFICIAL INTELLIGENCE | By Guest Author,
October 05, 2020
-
CIOs Discuss the Promise of AI and Data Science
FEATURE | By Guest Author,
September 25, 2020
-
Microsoft Is Building An AI Product That Could Predict The Future
FEATURE | By Rob Enderle,
September 25, 2020
-
Top 10 Machine Learning Companies 2021
FEATURE | By Cynthia Harvey,
September 22, 2020
-
NVIDIA and ARM: Massively Changing The AI Landscape
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
September 18, 2020
-
Continuous Intelligence: Expert Discussion [Video and Podcast]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 14, 2020
-
Artificial Intelligence: Governance and Ethics [Video]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 13, 2020
-
IBM Watson At The US Open: Showcasing The Power Of A Mature Enterprise-Class AI
FEATURE | By Rob Enderle,
September 11, 2020
-
Artificial Intelligence: Perception vs. Reality
FEATURE | By James Maguire,
September 09, 2020