How to check if My Server is Under DDOS Attack

 First of all, before diving into how to detect the DDOS attack step, lets us first know what a DDOS attack is and how it affects your server system. 

Brief Explanation About DDOS Attack 

DDOS Stands for distributed denial of service attack. In a DDOS attack, the attacker sends a large amount of traffic to the targeted host to prevent it from running smoothly and effectively. The malicious attackers tend to induce bots into the system. These bots are controlled by malicious attackers and are specially designed to perform specific tasks. 


Their task is to flood the server with a large amount of garbage data, which results in going down of your website server, sometimes of might face a website timeout error, database connection error, Email sending and receiving failure, or sometimes RAM/CPU overload. 


Well, In this article, we will discuss how to detect DDOS attacks on Windows and Linux systems. First, have a look at

How to Detect DDOS Attack on Windows System 

1. First of all, log in to your server Via RDP 


2. Then go to the start option and open run and type cmd and hit enter. A command prompt will open in front of you.

3. Then enter/type netstat-noa to view all the network connections of your system 


Let me give you a brief explanation of the netstat-n, netstat-o, and netstat-a command means.  


  • Netstat-n - This command shows all the active TCP connections of your system, which includes the IP Address and port no details 

  • Netstat-o - This command shows all active TCP connections, including the process ID of all connections to your system. 

  • Netstat-a - This command shows all active TCP connections, including the TCP/UPD ports on which the system is been running. 


Now as you got to know about how we can detect DDOS attack on Windows system, let us have a look on how to check DDOS attack on Linux system.

How to detect DDOS attack on Linux system

1. Log in to the Linux server using SSH. 


2. Then Run the command given below to find out the IP address connected to the Linux server. 


# netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c


3. After that, run the below command to find out the source IP address and the number of connections of the same IP address to your Linux system. 


# netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n


4. Then run the command given below to check the active TCP connection on port 80. 


# netstat -n | grep :80 |wc -l


5. In between, if you see an IP address with too many connections, it can be an attacker's IP address. You can also block using the below command 


# route add IP address reject


If you want to block you can also block it by using the IP tables on a Linux machine. 

Conclusion 

Well, we hope you have got some idea of how to find and safeguard your server from DDOS attack. Well we hope now you are completely ready like a shield to safeguard your website from DDOS attacks. 


Comments

Popular posts from this blog

How to Fix the 504 Bad Gateway Timeout Error?

What are the types of Domains - Detailed Guide

Why domain privacy is important?