2017-03-17 52 views

回答

0

该规则可能适用: 每秒请求数超过10个(假设你自己)是欺诈IP的信号,这可能是受控的。

的MySQL:

DROP TABLE IF EXISTS `tbl_request`; 
CREATE TABLE `tbl_request` (
    `codigo_request` bigint(11) NOT NULL AUTO_INCREMENT, 
    `ipnumber` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, 
    `date` datetime DEFAULT NULL, 
    `is_hacking` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL, 
    `milliseconds` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL, 
    `blacklisted` int(11) NOT NULL DEFAULT '0', 
    PRIMARY KEY (`codigo_request`) 
) ENGINE=InnoDB AUTO_INCREMENT=541192 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 

欺骗性IP:如果

select *, SUM(count) AS totalCount from (

select *, count(ipnumber) as count from tbl_request group by ipnumber, date HAVING count >= 10 order by count DESC 

) AS T GROUP by T.ipnumber order by totalCount DESC 

PHP:

$request = new Request(); 
$request->setIpnumber(get_client_ip()); 
$request->setDate(getDateForDatabase()); 
$request->insert(); 

$fips = $request->getFraudulentIps(); 
foreach ($fips as $k => $v) { 
    $v->blacklist(); 
} 
0

“蛮力”攻击是,如果有人试图在获得您的网站禁区的希望提交的用户名/密码。要处理这个问题,您可以设置规则,以确定IP在被阻止之前可以尝试提交不正确的登录凭据的次数。您可以在数据库中记录详细信息并使用它。对于WP,您可以使用插件来限制登录尝试。 https://www.wpoptimus.com/912/ban-ip-addresses-login-wordpress-dashboard/

另一方面,“DoS”攻击是用请求淹没服务器。这种攻击无法通过代码处理,需要在服务提供商一级完成。

此外,你会在你的cPanel黑名单ips的选项。

+0

无法登录区域,该攻击是公共博客水平下......有人发送请求到http://www.theblogattacked.com/ –

+0

你有一个cPanel?黑名单列出那些IP。或在.htaccess中阻止IP。例如:http://blamcast.net/articles/block-bots-hotlinking-ban-ip-htaccess – blokeish