如何在 Amazon Linux ami 中安装 mod_evasive


  1. 亚马逊是否计划在其最新的AMI中增加mov_evasive?
  2. 我需要如何在 Amazon Linux 上安装 mod_evasive?有网络上有很多教程,但我没有发现最近解决 Amazon Linux 的教程。
  3. 亚马逊对如何保护EC2有什么建议吗?实例可抵御 DDoS 攻击?如果亚马逊,我真的很感激可以提供有关如何保护 EC2 实例的某种指导通过使用开源防火墙运行Apache和WordPress,以及Apache模块,如mod_security和mod_evasive。

我尝试安装:

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

如何在亚马逊ami linux上解决此问题?

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

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

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

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

感谢您的跟进,埃尔金; 这很有帮助!

另外两个提示:

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

    第 13 行: print $SOCKET "GET /?$_ HTTP/1.0rnHost: 127.0.0.1rnrn";

相关内容

  • 没有找到相关文章

最新更新