Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Finding number of connection in a port  (Read 2112 times)

0 Members and 1 Guest are viewing this topic.

nirmal

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
Finding number of connection in a port
« on: November 24, 2013, 10:56:50 pm »
Hi all,

How to find number of connections to running in a port.


1. To find out the largest number of established connections with port number.

    #netstat -na | grep ‘ESTABLISHED’ | awk ‘{print $4}’ | uniq -c | sort -rn


2. To find out the number of connections to port 80 [http] from each IP.

    #netstat -plan|grep :80|awk {’print $5′}|cut -d: -f 1|sort|uniq -c|sort -n


Similarly, you can find out the number of connections to port 25 from each IP as.

    #netstat -plan|grep :25|awk {’print $5′}|cut -d: -f 1|sort|uniq -c|sort -n


NETSTAT is the most useful tool to detect and determine whether a server is under DoS or DDoS attack (Distributed Denial of Service).

Thank you for checking
Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!