This trusty troubleshooting tool can track processes along with network traffic
Detective Work

© Lead Image © rudall30, 123RF.com
The legacy Tcpdump is a tool no admin would want to do without, but it is a bit long in the tooth. The eBPF-based Ptcpdump aims to counter this worry. The rewrite offers extensive CLI compatibility and can even display process information.
Tcpdump [1] is a popular tool for capturing network traffic. Most admins are aware that they can use Tcpdump to save a record of network traffic in the Pcap format [2], then analyze and visualize the traffic using a protocol analysis tool such as Wireshark. In-depth troubleshooting with Tcpdump is often the last resort when you have exhausted all other options and you still can't open a network connection (Figure 1).
On the downside, many users are annoyed by the fact that Tcpdump can't map network traffic to specific processes. In other words, Tcpdump cannot tell you which program the logged packets belong to. As a workaround, programs can sometimes be identified on the basis of IP addresses and their in- and outbound ports.
The reason why Tcpdump can't assign network traffic to individual programs is because it first switches network interfaces into promiscuous mode in order to see all incoming packets. By doing this, it works around some of the security functions that the Linux kernel actually dictates before you can sniff network connections; however, at the network level, Linux itself does not offer a way to correlate programs and traffic. Also, Tcpdump does not offer the option to group and output the information on the system; you cannot simply tell the program to read packets from certain programs and ignore the rest.
[...]
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

News
-
CachyOS Now Lets Users Choose Their Shell
Imagine getting the opportunity to select which shell you want during the installation of your favorite Linux distribution. That's now a thing.
-
Wayland 1.24 Released with Fixes and New Features
Wayland continues to move forward, while X11 slowly vanishes into the shadows, and the latest release includes plenty of improvements.
-
Bugs Found in sudo
Two critical flaws allow users to gain access to root privileges.
-
Fedora Continues 32-Bit Support
In a move that should come as a relief to some portions of the Linux community, Fedora will continue supporting 32-bit architecture.
-
Linux Kernel 6.17 Drops bcachefs
After a clash over some late fixes and disagreements between bcachefs's lead developer and Linus Torvalds, bachefs is out.
-
ONLYOFFICE v9 Embraces AI
Like nearly all office suites on the market (except LibreOffice), ONLYOFFICE has decided to go the AI route.
-
Two Local Privilege Escalation Flaws Discovered in Linux
Qualys researchers have discovered two local privilege escalation vulnerabilities that allow hackers to gain root privileges on major Linux distributions.
-
New TUXEDO InfinityBook Pro Powered by AMD Ryzen AI 300
The TUXEDO InfinityBook Pro 14 Gen10 offers serious power that is ready for your business, development, or entertainment needs.
-
LibreOffice Tested as Possible Office 365 Alternative
Another major organization has decided to test the possibility of migrating from Microsoft's Office 365 to LibreOffice.
-
Linux Mint 20 Reaches EOL
With Linux Mint 20 at its end of life, the time has arrived to upgrade to Linux Mint 22.