hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Hosting Security and Technology Tutorials : Install mod_evasive
Reply

Hosting Security and Technology Tutorials Tutorials related to server security or the like.
Forum Jump

Install mod_evasive

Reply Post New Thread In Hosting Security and Technology Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 01-26-2006, 03:01 PM
Scott.Mc Scott.Mc is offline
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,379

Install mod_evasive


Oringal Guide: http://www.hostgeekz.com/guides/Secu...od_evasive.htm


Please use the above link for any updated versions.

Installing mod_evasive (formally known as mod_dosevasive)

Login too your server and execute

cd /usr/local/src
wget http://www.nuclearelephant.com/proje..._1.10.1.tar.gz
tar -zxvf mod_evasive_1.10.1.tar.gz
cd mod_evasive


For apache 2.0.x

/usr/sbin/apxs -cia mod_evasive20.c

Then add add this too httpd.conf

<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 6
DOSSiteCount 100
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 600
</IfModule>




For apache 1.3.x

/usr/local/apache/bin/apxs -cia mod_evasive.c

Then add this too httpd.conf

<IfModule mod_evasive.c>
DOSHashTableSize 3097
DOSPageCount 6
DOSSiteCount 100
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 600
</IfModule>



Now just restart apache and the installation is complete.

/etc/init.d/httpd restart

Reply With Quote


Sponsored Links
  #2  
Old 01-27-2006, 06:51 PM
jwagdy jwagdy is offline
New Member
 
Join Date: Jan 2006
Posts: 3
I have a AMD 2.8GHz box with 1GB RAM and running RH LE3 with Plesk 7.5.4 when I tried to install that module, it failed and gave me the below error

[root@xxxxx mod_evasive]# /usr/local/psa/admin/bin/apxs -cia mod_evasive20.c
gcc-3.4 -DHARD_SERVER_LIMIT=512 -DDEFAULT_PATH="/usr/local/psa/admin/bin:/bin:/usr/bin" -DLINUX=2
2 -DTARGET="httpsd" -DHAVE_SET_DUMPABLE -I/usr/include/gdbm -DMOD_SSL=208122 -DEAPI -O -pipe -I/
home/builder/pb_work_dir/psa_aiconfig_7.5.4/psa/release/openssl/include -W -Wall -I/home/builder/
pb_work_dir/psa_aiconfig_7.5.4/psa/lib/dist/usr/include -DPLESK_Linux -I/home/builder/pb_work_dir
/psa_aiconfig_7.5.4/psa/plesk-utils/include -DBSG_CR -DBSG_MSG -I/home/builder/pb_work_dir/psa_ai
config_7.5.4/psa/release/openssl/include -DHAS_RPM -O3 -fexpensive-optimizations -I/usr/kerberos/
include -fstrength-reduce -pipe -I/home/builder/pb_work_dir/psa_aiconfig_7.5.4/psa/lib/dist/usr/i
nclude -I/usr/include/libxml2 -Wno-unused-parameter -fpic -DSHARED_MODULE -I/usr/local/psa/admin/
include -c mod_evasive20.c
sh: line 1: gcc-3.4: command not found
apxs:Break: Command failed with rc=127
[root@xxxxx mod_evasive]#

any help?

Reply With Quote
  #3  
Old 01-29-2006, 10:08 PM
lexis2004 lexis2004 is offline
Junior Guru
 
Join Date: Feb 2004
Posts: 206
BRoke something

I installed this and now when I try to restart I get this:

/etc/init.d/httpd restart: configuration broken, ignoring restart
/etc/init.d/httpd restart: (run 'apachectl configtest' for details)


Any Ideas?

Reply With Quote
Sponsored Links
  #4  
Old 01-30-2006, 03:15 AM
Scott.Mc Scott.Mc is offline
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,379
Quote:
Originally Posted by jwagdy
I have a AMD 2.8GHz box with 1GB RAM and running RH LE3 with Plesk 7.5.4 when I tried to install that module, it failed and gave me the below error

[root@xxxxx mod_evasive]# /usr/local/psa/admin/bin/apxs -cia mod_evasive20.c
gcc-3.4 -DHARD_SERVER_LIMIT=512 -DDEFAULT_PATH="/usr/local/psa/admin/bin:/bin:/usr/bin" -DLINUX=2
2 -DTARGET="httpsd" -DHAVE_SET_DUMPABLE -I/usr/include/gdbm -DMOD_SSL=208122 -DEAPI -O -pipe -I/
home/builder/pb_work_dir/psa_aiconfig_7.5.4/psa/release/openssl/include -W -Wall -I/home/builder/
pb_work_dir/psa_aiconfig_7.5.4/psa/lib/dist/usr/include -DPLESK_Linux -I/home/builder/pb_work_dir
/psa_aiconfig_7.5.4/psa/plesk-utils/include -DBSG_CR -DBSG_MSG -I/home/builder/pb_work_dir/psa_ai
config_7.5.4/psa/release/openssl/include -DHAS_RPM -O3 -fexpensive-optimizations -I/usr/kerberos/
include -fstrength-reduce -pipe -I/home/builder/pb_work_dir/psa_aiconfig_7.5.4/psa/lib/dist/usr/i
nclude -I/usr/include/libxml2 -Wno-unused-parameter -fpic -DSHARED_MODULE -I/usr/local/psa/admin/
include -c mod_evasive20.c
sh: line 1: gcc-3.4: command not found
apxs:Break: Command failed with rc=127
[root@xxxxx mod_evasive]#

any help?

What goes gcc -v return?

Quote:
Originally Posted by lexis2004
I installed this and now when I try to restart I get this:

/etc/init.d/httpd restart: configuration broken, ignoring restart
/etc/init.d/httpd restart: (run 'apachectl configtest' for details)


Any Ideas?
Can you paste the output from configtest.

-Scott

Reply With Quote
  #5  
Old 01-30-2006, 08:43 AM
jwagdy jwagdy is offline
New Member
 
Join Date: Jan 2006
Posts: 3
I have the official RedHat version 2.96

Reply With Quote
  #6  
Old 01-30-2006, 11:48 AM
Scott.Mc Scott.Mc is offline
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,379
Quote:
Originally Posted by jwagdy
I have the official RedHat version 2.96
Use

export CC=/path/to/gcc-x.x

Reply With Quote
  #7  
Old 02-01-2006, 07:00 PM
jwagdy jwagdy is offline
New Member
 
Join Date: Jan 2006
Posts: 3
this is what I get when I used gcc -v

[root@xxxxxxxx data_admin]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --e
nable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit -
-host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-53)
[root@xxxxxxxx data_admin]#

Reply With Quote
  #8  
Old 02-04-2006, 08:19 AM
lexis2004 lexis2004 is offline
Junior Guru
 
Join Date: Feb 2004
Posts: 206
I found it, a copy and paste type.

Thanks anyhow.

Reply With Quote
  #9  
Old 02-06-2006, 01:22 PM
jwagdy jwagdy is offline
New Member
 
Join Date: Jan 2006
Posts: 3
help!!!!!!!!
I really need to have this mod installed. can any one help?

I have RH EL 3 running Plesk 7.5.4

gcc version
[root@xxxxxx mod_evasive]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/u
sr/share/info --enable-shared --enable-threads=posix --disable-checking --with-s
ystem-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-53)

httpd version
[root@xxxxxx mod_evasive]# httpd -v
Server version: Apache/2.0.46
Server built: Dec 15 2005 04:19:10

Can any one help?

Reply With Quote
  #10  
Old 02-06-2006, 01:26 PM
Scott.Mc Scott.Mc is offline
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,379
export CC=/usr/bin/gcc-3.2.3

and compile, if that doesn't work paste the output of

ls -al /usr/bin | grep -i gcc

Reply With Quote
  #11  
Old 02-06-2006, 01:55 PM
jwagdy jwagdy is offline
New Member
 
Join Date: Jan 2006
Posts: 3
I did but I got the same error again

[root@xxxxxx mod_evasive]# export CC=/usr/bin/gcc-3.2.3
[root@xxxxxx mod_evasive]# /usr/local/psa/admin/bin/apxs -cia mod_evasive20.c
gcc-3.4 -DHARD_SERVER_LIMIT=512 -DDEFAULT_PATH="/usr/local/psa/admin/bin:/bin:/usr/bin" -DLINUX=2
2 -DTARGET="httpsd" -DHAVE_SET_DUMPABLE -I/usr/include/gdbm -DMOD_SSL=208122 -DEAPI -O -pipe -I/
home/builder/pb_work_dir/psa_aiconfig_7.5.4/psa/release/openssl/include -W -Wall -I/home/builder/
pb_work_dir/psa_aiconfig_7.5.4/psa/lib/dist/usr/include -DPLESK_Linux -I/home/builder/pb_work_dir
/psa_aiconfig_7.5.4/psa/plesk-utils/include -DBSG_CR -DBSG_MSG -I/home/builder/pb_work_dir/psa_ai
config_7.5.4/psa/release/openssl/include -DHAS_RPM -O3 -fexpensive-optimizations -I/usr/kerberos/
include -fstrength-reduce -pipe -I/home/builder/pb_work_dir/psa_aiconfig_7.5.4/psa/lib/dist/usr/i
nclude -I/usr/include/libxml2 -Wno-unused-parameter -fpic -DSHARED_MODULE -I/usr/local/psa/admin/
include -c mod_evasive20.c
sh: line 1: gcc-3.4: command not found
apxs:Break: Command failed with rc=127


What can I do?

Reply With Quote
  #12  
Old 02-06-2006, 01:58 PM
jwagdy jwagdy is offline
New Member
 
Join Date: Jan 2006
Posts: 3
when I run gcc -v I get the following

[root@xxxxxx mod_evasive]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/u
sr/share/info --enable-shared --enable-threads=posix --disable-checking --with-s
ystem-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-53)

so I think I might have gcc installed in different location other than /usr/bin/gcc-3.2.3 am i right?

Reply With Quote
  #13  
Old 02-06-2006, 08:20 PM
Scott.Mc Scott.Mc is offline
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,379
Like I said above

ls -al /usr/bin | grep -i gcc
whereis gcc

Reply With Quote
  #14  
Old 03-06-2006, 01:05 AM
Jcink Jcink is offline
WHT Addict
 
Join Date: Sep 2005
Posts: 143
hmm

Hmm thanks for the tutorial, I really want to install this mod, but I am using windows is there a mod_evasive ported to windows someplace?

Reply With Quote
  #15  
Old 03-06-2006, 08:32 PM
TonyB TonyB is offline
Corporate Member
 
Join Date: Aug 2004
Location: Canada
Posts: 3,182
I've used this in the passed and it had got all messed up when I had clients with sites that generated images via php. So say a site with a ton of images that are .php then grab the images in order to prevent hotlinking.

So anyone who uses it now have you had any issues like this?

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host A2 Hosting Launches Customizable VPS Hosting Plans Web Hosting News 2012-06-07 15:11:57
Web Host Cyber Host Pro Launches New VPS Packages Web Hosting News 2011-09-16 18:15:55
Web Host A2 Hosting Launches QuickInstaller Tool for VPS Plans Web Hosting News 2011-08-19 20:00:53
Web Host HostingZoom Adds Softaculous Auto-Installer to Hosting Plans Web Hosting News 2011-08-17 17:52:34
Attracta Offers Single-Click Web App Installation to Customers Web Hosting News 2011-08-11 16:57:09


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?