Package apache2-mod_evasive: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | # Spec file for mod_evasive module for Apache 2.0 server %define real_name mod_evasive %define module_name mod_evasive %define version 1.10.1 %define release alt1 Name: apache2-%module_name Version: %version Release: alt2 Summary: Apache 2.x evasive module to minimize HTTP DoS or brute force attacks License: %gpl2only Group: System/Servers URL: http://www.zdziarski.com/projects/mod_evasive/ Packager: Nikolay A. Fetisov <naf@altlinux.ru> Source0: %real_name.tar Source1: evasive.load Source2: evasive.conf BuildRequires(pre): apache2-devel >= 2.2.5 BuildRequires(pre): rpm-build-licenses Requires(pre): apache2 >= %apache2_version-%apache2_release # Automatically added by buildreq on Fri Dec 12 2008 BuildRequires: apache2-httpd-prefork %description mod_evasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack. It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, and etcetera. mod_evasive presently reports abuses via email and syslog facilities. Detection is performed by creating an internal dynamic hash table of IP Addresses and URIs, and denying any single IP address from any of the following: - Requesting the same page more than a few times per second - Making more than few concurrent requests on the same child per second - Making any requests while temporarily blacklisted (on a blocking list) mod_evasive could be easly integrated with firewalls and routers for maximum protection. %prep %setup -q -n %real_name mv -f -- LICENSE LICENSE.orig ln -s -- $(relative %_licensedir/GPL-2 %_docdir/%name/LICENSE) LICENSE %build %apache2_apxs -a -c mod_evasive24.c %install /bin/install -pDm644 .libs/mod_evasive24.so %buildroot%apache2_libexecdir/mod_evasive24.so /bin/install -pDm644 %SOURCE1 %buildroot%apache2_mods_available/evasive.load /bin/install -pDm644 %SOURCE2 %buildroot%apache2_mods_available/evasive.conf /bin/mkdir -p %buildroot%apache2_spooldir/%module_name %post # Reconfigure Apache2: %apache2_sbindir/a2chkconfig ||: if [ -e %apache2_mods_enabled/%module_name.load ]; then CONF_OK=0 %apache2_sbindir/apachectl2 configtest && CONF_OK=1 ||: if [ "$CONF_OK" = "1" ]; then service %apache2_dname condrestart ||: else echo "Some errors detected in Apache2 configuration!" echo "To use %real_name check configuration and start %apache2_dname service." echo fi else echo "Apache2 %real_name module had been installed, but does't enabled." echo "Check %apache2_mods_start directory for files with '%module_name=no' lines." echo fi %preun if [ "$1" = "0" ] ; then # last uninstall [ -e %apache2_mods_enabled/%module_name.load ] && %apache2_sbindir/a2dismod %module_name 2>&1 >/dev/null ||: fi %postun # Reconfigure Apache2: %apache2_sbindir/a2chkconfig ||: if [ "$1" = "0" ] ; then # last uninstall CONF_OK=0 %apache2_sbindir/apachectl2 configtest && CONF_OK=1 ||: if [ "$CONF_OK" = "1" ]; then service %apache2_dname condrestart ||: else echo "Some errors detected in Apache2 configuration!" echo "To complete %real_name uninstalling check configuration and restart %apache2_dname service." echo fi fi %files %doc README CHANGELOG %doc --no-dereference LICENSE %apache2_libexecdir/mod_evasive24.so %apache2_mods_available/evasive.load %config(noreplace) %apache2_mods_available/evasive.conf %dir %apache2_spooldir/%module_name %changelog * Wed Apr 27 2016 Sergey Alembekov <rt@altlinux.ru> 1.10.1-alt2 - mod_evasive24.c adopted to apache-2.4 API - rebuild with apache-2.4 * Wed Apr 17 2013 Dmitry V. Levin (QA) <qa_ldv@altlinux.org> 1.10.1-alt1.qa1 - NMU: rebuilt for debuginfo. * Fri Dec 12 2008 Nikolay A. Fetisov <naf@altlinux.ru> 1.10.1-alt1 - Initial build for ALT Linux Sisyphus * Fri Dec 12 2008 Nikolay A. Fetisov <naf@altlinux.ru> 1.10.1-alt0.1 - Initial build |