Installing mod antiloris on x86 and x86_64 bit
CentOS 4 and 5 to protect from the recent slowloris DoS attack
I had to install mod antiloris in order to be sure the Apache is
secure against the slowloris Denial of Service attack that emerged
in the summer of 2008.
Luckily David Hrbac has already prepared an rpm packages for CentOS
so the installation is really simple.
The installation of the module of course is dependant on the exact
Linux architecture you're installing it on.
David has done a great work preparing the rpm packages for both x86
and x86_64 CentOS.
Even better he has prepared packages for both CentOS 4 and 5
releases.
Here is what the uname command returns on the CentOS server where I
install the module.
Linux centos 2.6.18-128.7.1.el5 #1 SMP Mon Aug 24 08:21:56
EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Here is how I did the install in a really simple and quick way on a
CentOS 5 runing an x86_64 CentOS release:
1.
Download the
prepackaged rpm of mod_antiloris in rpm for CentOS from this
link
1. Install it using the command
[root@centos-server~ ]# rpm -ivh
mod_antiloris-0.3-2.el5.hrb.x86_64.rpm
2. Check the configuration syntax is fine
[root@centos-server~ ]# /etc/init.d/httpd
configtest
3.Restart the Apache webserver [root@centos-server~ ]#
/etc/init.d/httpd restart
Test it using the slowloris script issuing the
command:
[root@centos-server~ ]# perl slowloris.pl -dns
yourdomainname.com -port 80 -timeout 1 -num 300
-cache
On my installation it worked like a charm you don't need to do any
configuration settings or anything for slowloris to take affect
just the Apache restart as marked above is all necessary to load
the anti slowloris module on your CentOS Linux.
In case need to install the mod antiloris to another architecture
than the one described in this article, just download the
appropriate rpm centos version from the list below:
Download links to rpm packages of mod antiloris for x86 and
x86_64 for Centos 5.
Download mod_antiloris rpm
CentOS5 x86
Download mod_antiloris rpm
CentOS5 x86_64
Download mod_antilrois rpm
CentOS4 x86
Download mod_antiloris rpm
CentOS4 x86_64
Of course this is just one of they ways you can do it. You can
always use mod_qos or something similar as well as I've mentioned
in one of my previous posts.
Here is also an article on
How
to defend from slowloris Denial of service using mod_qos on
CentOS