Hello arunkw,
You have open “allow-wp-admin-access.php” this file and find “awa_ip” this function and replace to below code.
public function awa_client_ip_env() {
$ipaddress = ”;
if (getenv(‘HTTP_CLIENT_IP’))
$ipaddress = getenv(‘HTTP_CLIENT_IP’);
else if(getenv(‘HTTP_X_FORWARDED_FOR’))
$ipaddress = getenv(‘HTTP_X_FORWARDED_FOR’);
else if(getenv(‘HTTP_X_FORWARDED’))
$ipaddress = getenv(‘HTTP_X_FORWARDED’);
else if(getenv(‘HTTP_FORWARDED_FOR’))
$ipaddress = getenv(‘HTTP_FORWARDED_FOR’);
else if(getenv(‘HTTP_FORWARDED’))
$ipaddress = getenv(‘HTTP_FORWARDED’);
else if(getenv(‘REMOTE_ADDR’))
$ipaddress = getenv(‘REMOTE_ADDR’);
else if(getenv(‘HTTP_CF_CONNECTING_IP’))
$ipaddress = getenv(‘HTTP_CF_CONNECTING_IP’);
else
$ipaddress = ‘UNKNOWN’;
return $ipaddress;
}
//Blocks access to admin users unless from certain IPs. Regular users may be from anywhere.
public function awa_ip($user, $name, $pass) {
$disableip = get_option(‘awa-ip-field’);
$req_uri = $_SERVER[‘REQUEST_URI’];
$allow_ips = explode(“,”,$disableip);
if ($disableip !=”){
if (!in_array($this->awa_client_ip_env(), $allow_ips) && ( preg_match(‘#wp-admin#’, $req_uri))) {
echo ‘Access Forbidden’, __(‘ERROR: Access Forbidden.’);
die;
}
}
}
please check your on “what is my ip” in google and that ip put in a “Allow wp-admin access setting”