Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know traffic to a specific port in linux

I am looking to find the traffic through a specific port for a time frame. For example, traffic through 3306 port for 10 seconds. Is there a way to find this information?

I see that "/sbin/ifconfig eth0 05" can be used to get information on total bytes but I am looking to find information about specific port's traffic.

Thanks in advance,

like image 246
uday kiran Avatar asked May 10 '12 14:05

uday kiran


People also ask

How do I check if port 443 is open Linux?

Open source: Must-read coverage To check for a specific port such as 443, run nmap -p 443 microsoft.com . You can check multiple ports such as 80 and 443 with nmap -p 80,443 microsoft.com .

How do I check if port 161 is open Linux?

Check If a Port is Open in Linux Using netstat The first method to check if a port is open in Linux is by running the netstat command. This command displays network connections, routing tables, and many network interface statistics.


1 Answers

tcpdump -i eth0 -s 1500 port 3306
like image 131
Rawkode Avatar answered Sep 30 '22 23:09

Rawkode