1. Home
  2. Hosting & Servers
  3. Windows Hosting
  4. How to verify DDOS attack with netstat command on Linux Terminal
  1. Home
  2. Hosting & Servers
  3. Web Hosting
  4. How to verify DDOS attack with netstat command on Linux Terminal
  1. Home
  2. Hosting & Servers
  3. Windows Hosting
  4. How to verify DDOS attack with netstat command on Linux Terminal
  1. Home
  2. Hosting & Servers
  3. Web Hosting
  4. How to verify DDOS attack with netstat command on Linux Terminal

How to verify DDOS attack with netstat command on Linux Terminal

Display all active Internet connections to the server.

>>netstat -na

Show only active Internet connections to the server on port 80,

>>netstat -an | grep :80 | sort

 Find out how many active SYNC_REC are occurring on the server.

>>netstat -n -p|grep SYN_REC | wc -l

List out the all IP addresses involved instead of just count.

>>netstat -n -p | grep SYN_REC | sort -u

List all the unique IP addresses of the node that are sending SYN_REC connection status.

>>netstat -anp |grep ‘tcp|udp’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n

Use netstat command to calculate and count the number of connections each IP address to makes the server.

>>netstat -anp |grep ‘tcp|udp’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n

List count of number of connections the IPs are connected to the server using TCP or UDP protocol.

>>netstat -ntu | grep ESTAB | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -nr

Check on ESTABLISHED connections instead of all connections, and displays the connections count for each IP.

>>netstat -plan|grep :80|awk {‘print $5’}|cut -d: -f 1|sort|uniq -c|sort -nk 1

 

Updated on April 21, 2020

Was this article helpful?