WebServer

How to find IP Address that Launch DDOS Attack

If your VPS or server load suddenly increases much higher than normal, it could be a DDOS attack.

To find out which IPs did that do the following,

Option 1 :- If you know which domain is attacked. SSH to your server & issue the following command. Make sure you replace “DOMAIN” with your domain name. If you are using cPanel/WHM and the domain is not the primary domain, normally it will be the sub domain of the primary domain.

less /usr/local/apache/domlogs/DOMAIN | awk '{print $1}' | sort | uniq -c | sort -n

Option 2 :- If you don’t know which domain is attacked. SSH to your server & issue the following command. Option 1 if preferable especially if your server is very busy has many domain. It will take quite sometimes to process the log file. You can check by issuing “top -c” command to find out which domain consume the most resources.

less /usr/local/apache/logs/access_log | awk '{print $1}' | sort | uniq -c | sort -n

Both of the option will give the ip and number of connections in the descending order. For example:

.....
.....
.....
.....
17843 56.51.155.156
19234 66.156.66.266
234578 156.56.16.76

In the above case we can see too many connections from those ips and it is abnormal. You can block these ips in the firewall such as ConfigServer Firewall (“csf”).


Get Huge Cloud Storage with StorageMadeEasy (SME)

While searching for the perfect cloud storage to backup my Webserver, I encounter a solution by StorageMadeEasy (SME). They have both FREE and PAID Plan. However, most of the wanted feature of SME only available in Paid plan. Luckily, the cost is rather reasonable at $59.99 lifetime for personal plan. You will get 5GB Cloud Storage at Amazon S3 for both FREE and PAID plan.

SME has many nice features but the features that I really like the most  are,

  1. Integrate 40+ cloud storage providers into a single interface. Some of the supported free storage provider includes Copy (15+ GB), Dropbox (2+ GB), Dump Truck (5+ GB), Sugar Sync (5+ GB), Ubuntu One (5+ GB) and many more..
  2. FTP and SFTP access to all cloud storage that link to SME. This is great for Webserver backup.
  3. Automatically split large files. This is a great feature because of the file size limit imposed by cloud provider.
  4. Application with Virtual Drive feature. All cloud storage integrated into a single drive. Only install one application.
  5. Sync between cloud storage and between your computer & cloud storage.
  6. Web base file manager which integrates all linked cloud storage.