daddyv03
By:
daddyv03

Help make sense of what I see in iftop

August 21, 2016 981 views
Apache Networking Logging Security Ubuntu

My site went down today, I'm pretty sure it was a DOS attack but what's weird is that it came back up on its own four hours later. When I look at the CPU usage on my droplet it ran at 700+% for hours then back to normal.

When I got to a terminal the site was back to normal and CPU usage back to normal as well. I ran IFTOP to check for network traffic and here's what I'm seeing:

mqqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqqqqqqq
10.20.0.6 => 82.193.127.15.cl.ipnet.ua 2.05kb 27.2kb 23.8kb
<= 160b 1.72kb 1.88kb
loadtest.b1000test53 => 24.114.75.207 1.41kb 1.51kb 1.56kb
<= 160b 160b 160b
loadtest.b1000test53 => google-public-dns-a.google.com 876b 175b 252b
<= 876b 175b 384b
loadtest.b1000test53 => google-public-dns-b.google.com 876b 175b 44b
<= 584b 117b 29b
10.20.0.6 => 155.133.82.141 208b 42b 10b
<= 368b 74b 18b
loadtest.b1000test53 => sellingeverywhere.com 0b 0b 127b
<= 0b 0b 81b
10.20.0.6 => 10.20.0.2 0b 0b 81b
<= 0b 0b 127b
loadtest.b1000test53 => 162-144-140-49.unifiedlayer.com 0b 0b 0b
<= 0b 0b 9b

What is the loadtest? Some sort of an attack I'm assuming. How do I stop it?

2 Answers

Pretty much all of my Wordpress sites have to be locked down or I deal with constant barrages of different types of attacks. Generally the attacks crash Mysql rather than Apache.

Here are the steps I take. Others might have alternative advice:

Use the Wordpress plugin called LoginLockdown -this prevents multiple incorrect logins from the same IP address..it can be annoying if you forget your password or your caps-lock is on and you try to login and then get locked out, but it is worth the extra security.

Change the Wordpress Login URL. There are several ways to do that, just Google a few. It takes about half and hour, but is worth the time. Here is one approach: https://managewp.com/change-your-wordpress-login-url.

Add PerishablePress 6G Firewall to your .htaccess: https://perishablepress.com/6g/

Also, add these lines to your .htaccess:



    #prevents access to wp-config
    <Files wp-config.php>
    order allow,deny
    deny from all
    </Files>




#prevents directory browsing
    Options All -Indexes

       # Protect the .htaccess
    <files .htaccess="">
    order allow,deny
    deny from all
    </files>


# protect xmlrpc
<Files xmlrpc.php>
    Order Deny,Allow
    Deny from all
    ##if you need to allow someone access for pingbacks
    ##Allow from 123.456.789 ##yourserver
    ##Allow from 321.654.987 ##yourotherserver
</Files>

Try those things, reboot your server and see if that does not dramatically reduce attacks on your site.

Have another answer? Share your knowledge.