• Hi there,

    I’ve been having trouble for a number of months with brute force attacks on my website, which I’m currently monitoring with the Limit Login Attempts plugin.

    Initially I was manually blocking IP addresses in the htaccess file, but this was becoming tedious with IP addresses being locked out daily.

    I’ve taken the decision to block ALL IP addresses apart from my own from the wp-login.php page using the following code in the htaccess file:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
    RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
    RewriteCond %{REMOTE_ADDR} !^XXX\.XXX\.XXX\.XX$
    ErrorDocument 403 /blocked.php
    RewriteRule ^(.*)$ - [R=403,L]
    </IfModule>

    However, I am still getting lockouts daily!
    Are there any suggestions for stopping IP addresses from trying to access my website through the wp-login page?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Blocking IP addresses isn’t the best solution really. There are a couple of security plugins you can get though which are great at stopping brute force attempts. I’ll let you choose the one that’s right for you but the higher rated, more popular ones are the best (of course).

    The best thing to do in the scenario is to block after X failed attempts. Even perhaps try hiding wp-admin and other sensitive areas as well.

    The main problem with IP blocking is you could prevent genuine people going on the site. Hope that helps anyway.

    ??

    There are a number of ways to impede brute force attacks. IMHO best to use several for a layered defense. One approach that I like to include is CloudFlare page rules – blocks the bad bots at the DNS layer, before they hit my server or site. Downside – uses up two of my three page rules on the free plan.

    For both *mysite.ext/wp-login* and *mysite.ext/wp-admin*
    Browser Integrity Check: On
    Security Level: I’m Under Attack
    Cache Level: Bypass

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stopping brute force attacks’ is closed to new replies.