<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PRESOON.COM &#187; DDos</title>
	<atom:link href="http://presoon.com/blog/category/ddos/feed/" rel="self" type="application/rss+xml" />
	<link>http://presoon.com/blog</link>
	<description></description>
	<lastBuildDate>Sat, 20 Mar 2010 03:59:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to prevent DDos attacks</title>
		<link>http://presoon.com/blog/2008/04/22/how-to-prevent-ddos-attacks/</link>
		<comments>http://presoon.com/blog/2008/04/22/how-to-prevent-ddos-attacks/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 09:18:54 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[DDos]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[Denial of Service]]></category>
		<category><![CDATA[Distribute Denial of Service]]></category>
		<category><![CDATA[prevent DDos]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=19</guid>
		<description><![CDATA[Hello everyone&#8230;
Here I present some steps to prevent DDos attacks.
>>>>>>>>>Install/Configure APF firewall
>>>>>>>>>Install/Configure mod_evasive
>>>>>>>>>Install mod_security
>>>>>>>>>Blocking IPs maintaining more connections
>>>>>>>>>Optimizing the httpd.conf file 
Install/Configure APF firewall
===========================
cd /usr/local/src/
wget http://www.rfxnetworks.com/downloads/apf-current.tar.gz
tar -zxvf apf-current.tar.gz; cd apf-*
Step 2: Installation
Code:
sh ./install.sh
===========================
Install/Configure mod_evasive
===========================
Download the source
======================
wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz
tar -xzvf mod_evasive_1.10.1.tar.gz
cd mod_evasive
======================
Compile in the mod_evasive apache module using apxs
======================
For Apache 2
/usr/local/apache/bin/apxs -i -a -c mod_evasive20.c
For Apache 1.3
/usr/local/apache/bin/apxs [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone&#8230;<br />
Here I present some steps to prevent DDos attacks.</p>
<p>>>>>>>>>>Install/Configure APF firewall<br />
>>>>>>>>>Install/Configure mod_evasive<br />
>>>>>>>>>Install mod_security<br />
>>>>>>>>>Blocking IPs maintaining more connections<br />
>>>>>>>>>Optimizing the httpd.conf file </p>
<p><strong>Install/Configure APF firewall</strong></p>
<p>===========================<br />
cd /usr/local/src/<br />
wget http://www.rfxnetworks.com/downloads/apf-current.tar.gz<br />
tar -zxvf apf-current.tar.gz; cd apf-*</p>
<p>Step 2: Installation<br />
Code:</p>
<p>sh ./install.sh<br />
===========================</p>
<p><strong>Install/Configure mod_evasive</strong></p>
<p>===========================<br />
Download the source</p>
<p>======================<br />
wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz<br />
tar -xzvf mod_evasive_1.10.1.tar.gz<br />
cd mod_evasive<br />
======================</p>
<p>Compile in the mod_evasive apache module using apxs</p>
<p>======================<br />
For Apache 2<br />
/usr/local/apache/bin/apxs -i -a -c mod_evasive20.c</p>
<p>For Apache 1.3<br />
/usr/local/apache/bin/apxs -i -a -c mod_evasive.c<br />
======================</p>
<p>If the apxs path is not /usr/local/apache/bin/apxs replace it with the appropriate path</p>
<p>Edit your httpd.conf /usr/local/apache/conf/httpd.conf</p>
<p>Add the lines below.</p>
<p>======================<br />
DOSHashTableSize 3097<br />
DOSPageCount 2<br />
DOSSiteCount 50<br />
DOSPageInterval 1<br />
DOSSiteInterval 1<br />
DOSBlockingPeriod 10<br />
DOSEmailNotify user@yourdomain.com<br />
======================</p>
<p>/etc/init.d/httpd restart</p>
<p>You can try another values for the above and obtain the best setting.<br />
In some cases mod_evasive also blocks legitimate user IPs.<br />
===========================</p>
<p><strong>Install mod_security</strong></p>
<p>Install this module via WHM</p>
<p>      WHM >> cPanel >> Addon Modules >> Select &#8220;modsecurity &#8221; >>save</p>
<p><strong>Blocking IPs maintaining more connections</strong></p>
<p>===========================<br />
You can check out the number of http requests coming to your server and the<br />
ip&#8217;s from where it is coming by executing the command :</p>
<p>============================================<br />
netstat -plan | grep :80 | awk &#8216;{print $5}&#8217; | cut -d: -f 1 | sort | uniq -c | sort -n<br />
============================================</p>
<p>If you feel like there are inordinate amount of requests from a single ip, you<br />
can block it in your APF using this command :</p>
<p>=====<br />
apf -d IP<br />
=====</p>
<p>Using iptables, you can block the ip with :<br />
====================<br />
iptables -A INPUT -s <ip> -j DROP<br />
====================</p>
<p>You can check out the ip to which maximum number of http requests are coming<br />
with the following command :</p>
<p>==================<br />
[root@server ~]# netstat -plan|grep :80|awk {&#8216;print $4&#8242;}|cut -d: -f 1|sort|uniq -c|sort -n<br />
==================<br />
===========================</p>
<p><strong>Optimizing the httpd.conf file </strong></p>
<p>vi /usr/local/apache/conf/httpd.conf</p>
<p>Change the values as follows.</p>
<p>MaxKeepAliveRequests 50<br />
KeepAliveTimeout 60 </p>
<p>Also edit the following options.</p>
<p>Timeout<br />
KeepAliv<br />
MinSpareServers<br />
MaxSpareServers<br />
MaxClients</p>
<p>Reduce the timeout, Maxclients etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2008/04/22/how-to-prevent-ddos-attacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install mod_evasive</title>
		<link>http://presoon.com/blog/2008/04/22/how-to-install-mod_evasive/</link>
		<comments>http://presoon.com/blog/2008/04/22/how-to-install-mod_evasive/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 09:05:03 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[DDos]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Denial of Service]]></category>
		<category><![CDATA[Distribute Denial of Service]]></category>
		<category><![CDATA[mod_evasive]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=18</guid>
		<description><![CDATA[Download the source
======================
wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz
tar -xzvf mod_evasive_1.10.1.tar.gz
cd mod_evasive
======================
Compile  in the mod_evasive apache module using apxs
======================
For Apache 2
/usr/local/apache/bin/apxs -i -a -c mod_evasive20.c
For Apache 1.3
 /usr/local/apache/bin/apxs -i -a -c mod_evasive.c
======================
If the apxs path is not /usr/local/apache/bin/apxs replace it with the appropriate path
Edit your httpd.conf  /usr/local/apache/conf/httpd.conf
Add the lines below.
======================
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
DOSEmailNotify user@yourdomain.com
======================
/etc/init.d/httpd restart
You [...]]]></description>
			<content:encoded><![CDATA[<p>Download the source</p>
<p>======================<br />
wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz<br />
tar -xzvf mod_evasive_1.10.1.tar.gz<br />
cd mod_evasive<br />
======================</p>
<p>Compile  in the mod_evasive apache module using apxs</p>
<p>======================<br />
For Apache 2<br />
/usr/local/apache/bin/apxs -i -a -c mod_evasive20.c</p>
<p>For Apache 1.3<br />
 /usr/local/apache/bin/apxs -i -a -c mod_evasive.c<br />
======================</p>
<p>If the apxs path is not /usr/local/apache/bin/apxs replace it with the appropriate path</p>
<p>Edit your httpd.conf  /usr/local/apache/conf/httpd.conf</p>
<p>Add the lines below.</p>
<p>======================<br />
DOSHashTableSize 3097<br />
DOSPageCount 2<br />
DOSSiteCount 50<br />
DOSPageInterval 1<br />
DOSSiteInterval 1<br />
DOSBlockingPeriod 10<br />
DOSEmailNotify user@yourdomain.com<br />
======================</p>
<p>/etc/init.d/httpd restart</p>
<p>You can try another values for the above and obtain the best setting.<br />
In some cases mod_evasive also blocks legitimate user IPs.</p>
<p>Install and enjoy&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2008/04/22/how-to-install-mod_evasive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
