小编Ahm*_*mad的帖子

是否可以通过cpanel配置和php脚本来防止DDos攻击?

我的网站受DDos攻击(UDP泛滥)!

我无法访问linux shell,只有cpanel可供我使用!:(

是否可以通过php脚本来防止这种攻击?

有没有办法配置cpanel来减少或重定向攻击?怎么样?

根据网络托管服务台:攻击速度在6到10 Gbit/s之间!

以下代码有用吗?

 <?PHP 

 if (!isset($_SESSION)) { session_start(); }
 // anti flood protection 
 IF($_SESSION['last_session_request'] > time() - 2){ 
 // users will be redirected to this page if it makes requests faster than 2 seconds 
  header("Location: /flood.html");
 exit; } 
 $_SESSION['last_session_request'] = time(); 


 ?>
Run Code Online (Sandbox Code Playgroud)

硬件防火墙太贵了.

php security ddos cpanel

4
推荐指数
1
解决办法
9962
查看次数

标签 统计

cpanel ×1

ddos ×1

php ×1

security ×1