hosted by liquidweb


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

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
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,534

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

__________________
Server Management - AdminGeekZ.com
Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com



Sponsored Links
  #2  
Old
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?

  #3  
Old
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?

__________________
Thanks, Kevin

Sponsored Links
  #4  
Old
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,534
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

__________________
Server Management - AdminGeekZ.com
Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com

  #5  
Old
New Member
 
Join Date: Jan 2006
Posts: 3
I have the official RedHat version 2.96

  #6  
Old
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,534
Quote:
Originally Posted by jwagdy
I have the official RedHat version 2.96
Use

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

__________________
Server Management - AdminGeekZ.com
Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com

  #7  
Old
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]#

  #8  
Old
Junior Guru
 
Join Date: Feb 2004
Posts: 206
I found it, a copy and paste type.

Thanks anyhow.

__________________
Thanks, Kevin

  #9  
Old
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?

  #10  
Old
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,534
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

__________________
Server Management - AdminGeekZ.com
Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com

  #11  
Old
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?

  #12  
Old
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?

  #13  
Old
Engineer
 
Join Date: Jan 2005
Location: Scotland, UK
Posts: 2,534
Like I said above

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

__________________
Server Management - AdminGeekZ.com
Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com

  #14  
Old
WHT Addict
 
Join Date: Sep 2005
Posts: 169
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?

  #15  
Old
Corporate Member
 
Join Date: Aug 2004
Location: Canada
Posts: 3,414
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?

__________________
Tony B. - Chief Executive Officer
Hawk Host Inc. Proudly serving websites since 2004
Quality Shared and VPS Hosting
PHP 5.3.x & PHP 5.4.x & PHP 5.5.X Support!

Reply

Related posts from TheWhir.com
Title Type Date Posted
Tweet that Claims the US Government Wants to Ban Bitcoin Actually Spreading Malware Web Hosting News 2014-05-23 13:57:57
Veterans Website, IE 10 Users Targeted in Possible Attempt to Steal Military Secrets Web Hosting News 2014-02-14 13:36:54
Arvixe Partners with SiteApps for SMB App Marketplace Web Hosting News 2014-05-01 08:22:20
Web Hosting Sales and Promos Roundup - November 8, 2013 Web Hosting News 2014-05-23 15:42:41
Verio Europe Replaces FreeBSD Hosting Solution with Linux Shared Hosting Web Hosting News 2013-08-22 08:34:35


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 Off
HTML code is Off

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



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

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?