Inspect network traffic from a simple linux cli application

I am running a small application on the command line and I am trying to see the network traffic (http) that it creates.

Is there any kind of shell program (for example, "time" or "watch") that can display all network traffic in and out of my application? (Or at least make a copy of it in a file)

+3
source share
1 answer

Use tcpdumpon the command line or wiresharkon the desktop.

For example, to capture web traffic.
tcpdump -s0 -i any -wfile.pcap port 80
To view it directly, delete-wfile.pcap

To read a previously saved file
tcpdump -r file.pcap

-, HTTP, tcpflow -C port 80

+14

Source: https://habr.com/ru/post/1723371/


All Articles