3
  1. 亚马逊是否计划将 mov_evasive 添加到其最新的 AMI 中?
  2. 我需要如何在 Amazon Linux 上安装 mod_evasive?网上有很多可用的教程,但我没有发现最近的关于 Amazon Linux 的教程。
  3. Amazon 有没有关于如何保护 EC2 实例免受 DDoS 攻击的建议?如果 Amazon 能够提供某种指导,说明如何使用开源防火墙和 Apache 模块(如 mod_security 和 mod_evasive)来保护运行 Apache 和 WordPress 的 EC2 实例,我将不胜感激。

我尝试安装:

sudo yum --enablerepo=epel install mod_evasive

Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main                                                | 2.1 kB     00:00     
amzn-updates                                             | 2.5 kB     00:00     
1034 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package mod_evasive.x86_64 0:1.10.1-10.el6 will be installed
--> Processing Dependency: httpd-mmn = 20051115 for package: mod_evasive-1.10.1-10.el6.x86_64
--> Running transaction check
---> Package httpd.x86_64 0:2.2.34-1.16.amzn1 will be installed
--> Processing Dependency: httpd-tools = 2.2.34-1.16.amzn1 for package: httpd-2.2.34-1.16.amzn1.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.34-1.16.amzn1.x86_64
--> Running transaction check
---> Package apr-util-ldap.x86_64 0:1.5.4-6.18.amzn1 will be installed
---> Package httpd-tools.x86_64 0:2.2.34-1.16.amzn1 will be installed
--> Processing Conflict: httpd24-2.4.27-3.75.amzn1.x86_64 conflicts httpd < 2.4.27
--> Processing Conflict: httpd24-tools-2.4.27-3.75.amzn1.x86_64 conflicts httpd-tools < 2.4.27
--> Finished Dependency Resolution
Error: httpd24-tools conflicts with httpd-tools-2.2.34-1.16.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.34-1.16.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

rpm -qa 'httpd*'
httpd24-tools-2.4.27-3.75.amzn1.x86_64
httpd24-2.4.27-3.75.amzn1.x86_64

如何在 Amazon ami linux 上解决这个问题?

4

3 回答 3

3

如果您正在运行 Apache 2.4,请尝试 yum install mod24_ssl.x86_64

于 2018-04-01T11:17:57.657 回答
0

我从这个网址https://github.com/shivaas/mod_evasive解决了这个问题

  1. 将此文件 https://raw.githubusercontent.com/shivaas/mod_evasive/master/mod_evasive24.c下载 到您的服务器
  2. 运行 $APACHE_ROOT/bin/apxs -i -a -c mod_evasive24.c
  3. 该模块将被构建并安装到 $APACHE_ROOT/modules 中,并加载到您的 httpd.conf
  4. 重启阿帕奇

也许在安装 mod_evasive24 之前需要安装一些软件:httpd24-dev、libtool、python-devel

于 2018-04-07T06:41:39.357 回答
0

感谢您的跟进,Erkin;这很有帮助!

两个额外的提示:

  1. 要使用apxs,您需要按照https://stackoverflow.com/a/37528944/1776044httpd24-devel中的说明进行安装。
  2. 这个有用的评论mod_evasive建议对( )的测试脚本进行修改test.pl,以防它返回所有 HTTP 400:

    第 13 行: print $SOCKET "GET /?$_ HTTP/1.0\r\nHost: 127.0.0.1\r\n\r\n";

于 2018-04-18T22:30:16.223 回答