Secure the WordPress Login Page by Limiting Access to Certain Country

dailydose

#1

Using Cloudflare Firewall, you can limit access to WordPress login page for your whitelisted country.

  • This would be heplful to prevent brute force attack from the outside country.

Steps

  1. Login to Cloudflare (Select account > domain )

  2. Go to Crypto Menu and create a new Firewall rule

  3. Rule name: Allow Login page only for India

  4. Country > Doesn’t equal to > India

  5. URI Path > contains > wp-login.php

  6. Block

Result

  • Only whitelisted country can access login page, and non-other.

Edit: Made some corrections.

Thanks & Regards,
Gulshan


Someone is trying really hard to sneak into my admin dashboard
How to Setup Free Cloudflare CDN for Wordpress (Tutorial)?
#2

:heart_eyes::heart_eyes::heart_eyes::heart_eyes: Great trick.


#3

@GulshanKumar Sorry but it is not working.


#4

Before it was working fine, but now at Nginx it won’t work.


#5

Hi,

Demo: https://gulshankumar.net/wp-login.php
(Check over VPN, it will work only for India)

Please try now it should work.

Cc: @abhishek

Thanks & Regards,
Gulshan


#6

Ohh, you have updated the tutorial. Let me check now.


#7

I have updated above guide. Please check if you missed in case. It should work.

Or can you paste screenshot how is the rule created by you in your Cloudflare dashboard?


#8

It is working, thanks :grinning:


#9

You’re welcome!


#10

Update: It worked now.