Thursday, October 02nd, 2008 | Author: Angelo

Hello,

Below is command to find out number of connections to each port using netstat, cut, awk ,uniq.

netstat -na | grep 'tcp\|udp' | awk '{print $4}' | cut -d: -f2 | sort | uniq -c | awk '{print $2}'

Here, is description for this command so many times you may face trouble because of dos attack in such case you need to find port number (service) on which dos attack is going on above command will help you to search number of connections to each port which is in use.

Category: Linux Commands
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply