Protecting Login Page from Brute Force Login Attacks
-
https://forum.ait-pro.com/forums/topic/protect-login-page-from-brute-force-login-attacks
I have a site with 4 admin to log in… our ISP changes our IP address consantly… so for us which is the best option to secure login.php ??
Protect wp-login.php from Brute Force Login Attacks based on Server Protocol
is server protocol option fits for us ???
can I also include this code to secure login in theme’s functions.php file ???
// Simple Query String Login page protection
function example_simple_query_string_protection_for_login_page() {
$QS = ‘?mySecretString=foobar’;
$theRequest = ‘https://’ . $_SERVER[‘SERVER_NAME’] . ‘/’ . ‘wp-login.php’ . ‘?’. $_SERVER[‘QUERY_STRING’];// these are for testing
// echo $theRequest . ”;
// echo site_url(‘/wp-login.php’).$QS.”;if ( site_url(‘/wp-login.php’).$QS == $theRequest ) {
echo ‘Query string matches’;
} else {
header( ‘Location: https://’ . $_SERVER[‘SERVER_NAME’] . ‘/’ );
}
}
add_action(‘login_head’, ‘example_simple_query_string_protection_for_login_page’);thanks anik
- The topic ‘Protecting Login Page from Brute Force Login Attacks’ is closed to new replies.