Diagnose a DoS/DDoS attack on a Plesk server with the experts at Bobcares by your side.
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.
Let’s take a look at how our Support Team is ready to help customers diagnose a DoS/DDoS attack on a Plesk server.
How to diagnose a DoS/DDoS attack on a Plesk server
Finding websites under attack and diagnosing Dos/DDoS attacks on Plesk has become an easy job with this handy guide by our skilled Support Engineers. We need to have strategies in place for a real-time attack as well as for an attack that is over. Fortunately, our Support Team has these approaches ready for Linux and Windows.
On Linux: How to diagnose a DoS/DDoS attack on a Plesk server
For real-time attack
First, we have to connect to the server with the help of SSH.
Next, we will determine the source IP addresses as well as the number of connections with the following command:
# ss -tan state established | grep ":80|:443" | awk '{print $4}'| cut -d':' -f1 | sort -n | uniq -c | sort -nr
Then, we will find which domains are currently under attack with this command:
# for log in /var/www/vhosts/system/*/logs/*access*log; do echo -n "$log "; tail -n10000 "$log" | grep -c 203.0.113.2; done | sort -n -k2
After that, we have to check the number of connections currently in the SYN_RECV state by executing this command:
# ss -tan state syn-recv | wc -l
In case there are multiple IP addresses in Plesk, we can also use the following command to determine the target IP address currently under attack:
In some scenarios. There may not be many established connections to the web servers. Instead, Nginx may be serving a lot of requests and even transferring them to Apache resulting in Apache being under attack. If so, we can track down the request with these steps courtesy of our Support Team:
First, we will navigate to the /var/www/vhosts/system directory.
Then, we have to generate file requests in order to fetch the number of requests made in the previous hour with the following command:
# for i in *;do echo -n "$i "; grep '24/Jan/2022:20' $i/logs/access_ssl_log | awk '{print $1}' | wc -l;done > ~/requests
Finally, we can check the generated file as seen below:
Our Support Engineers would like to point out that a large number of connections(in hundreds or thousands) on the same port is a clear indication of the server being under a DDoS attack.