Mod_dosevasive

Procomp

Verified User
Joined
Mar 12, 2004
Messages
10
Does any one have a how-to for the mod_dosevasive....that will work with directadmin and the custom apache...the how to I have keeps refering to /usr/local/apache........which doesnt exist...on my server
 
I just google'd it and was reading about it since I never heard about it. It seems that its stright foward you would just need to change the path to where we keep the apache.conf file.

/etc/httpd/conf/httpd.conf

I read somewhere about FrontPage not wroking after its install. That could be old information?
 
Maybe its me then....

ok so I have uploaded the file to my server in the following location...../usr/local/directadmin/customapache/apache_1.3.29/src/modules....is this the correct location to place it then run the ./configure --add-module=src/modules/dosevasive/mod_dosevasive.c in the apache_1.3.29 directory.......then if im understanding it right just run make install....am i doing somethin wrong here...because when i do it does an install of apache in usr/local/apache....im kinda lost somewhere.....:rolleyes:
 
Read the manual about. You are going to have to configure it so that it knows where your httpd.conf file is.
 
Help

I am still learning some of the syntax used in linux shell........ heres what ive done
1. Uploaded the dosevasive directory to /usr/local/directadmin/customapache/apache_1.3.29/src/modules
2. ran the ./configure --add-module=src/modules/dosevasive/mod_dosevasive.c command
3. ran make install

Then apache does its thing and tells me to start apache by running /usr/local/apache/apachectl or somethin like that

What am I doing wrong?
It seems like it would be an easy install if the apache was located in the classic layout.
 
Hello,

1) cd /usr/local/directadmin/customapache
2) vi configure.apache_ssl (or any editor)
3) add --add-module=/path/to/mod_dosevasive.c (note the \ on each line.. only the last line doesn't have one)..save, quit.
4) ./build apache_mod_ssl

John
 
Ok did that but now

here is what happens now.....what do i need to do to fix it.....
./build apache_mod_ssl
Backing up certificate and key, and turning off httpd for DirectAdmins's check.
Found /usr/local/directadmin/customapache/apache_1.3.29.tar.gz
Extracting /usr/local/directadmin/customapache/apache_1.3.29.tar.gz...
Done. Applying patches...
patching file ./mod_frontpage.c
patching file ./src/include/httpd.h
Hunk #1 succeeded at 801 (offset -5 lines).
patching file ./src/main/http_request.c
Hunk #2 succeeded at 584 (offset 6 lines).
patching file ./src/main/util.c
patching file ./src/main/util_script.c
Hunk #1 succeeded at 1174 (offset -21 lines).
Increasing hard limit to 32768...
Setting up mod_ssl...
Found /usr/local/directadmin/customapache/mod_ssl-2.8.16-1.3.29.tar.gz
Extracting /usr/local/directadmin/customapache/mod_ssl-2.8.16-1.3.29.tar.gz...
Configuring mod_ssl-2.8.16-1.3.29...
: bad interpreter: No such file or directory/configure.apache_ssl: /bin/sh

*** There was an error while trying to configure apache+mod_ssl. Check the configure.apache_ssl file
:confused:

[note] configure.apache_ssl contains...
#!/bin/sh
OPTIM="-DHARD_SERVER_LIMIT=32768 -DFD_SETSIZE=32768 " \
EAPI_MM="SYSTEM" \
SSL_BASE="/usr" \
PORTOBJFORMAT=elf \
./configure \
--with-apache=../apache_1.3.29 \
--with-ssl=/usr \
--prefix=/etc/httpd \
--exec-prefix=/etc/httpd \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc/httpd/conf \
--enable-module=all \
--enable-module=ssl \
--enable-shared=max \
--enable-suexec \
--suexec-docroot=/ \
--suexec-caller=apache \
--suexec-userdir=public_html \
--includedir=/usr/include/apache \
--libexecdir=/usr/lib/apache \
--datadir=/var/www \
--iconsdir=/var/www/icons \
--htdocsdir=/var/www/html \
--manualdir=/var/www/html/manual \
--cgidir=/var/www/cgi-bin \
--localstatedir=/var \
--runtimedir=/var/run \
--logfiledir=/var/log/httpd \
--proxycachedir=/var/cache/httpd \
--with-perl=/usr/bin/perl \
--add-module=mod_frontpage.c \
--add-module=/usr/local/directadmin/customapache/apache_1.3.29/src/modules/dosevasive/mod_dosevasive.c \
--disable-module=auth_db --disable-module=auth_dbm
 
Last edited:
Hmm.. I'm a bit confused. It's saying you don't have sh? .. but the build script uses sh. That's actually an older confgure.apache_ssl ... you can probably delete it, and a "./build update" to get a new version, then just add the same thing again. Not quite sure why it's complaining about a bad interpreter... what does this return:

ls -l /bin/sh

John
 
Not sure then. Last thing to try is:

rm -f configure.apache_ssl
./build update
#add your line again
./build apache_mod_ssl

John
 
Making Progress...

Ok now thers no /bin/sh errors....but....Ive got somethin else happpening...heres the error code I get..
-------
modules.c:13: warning: data definition has no type or storage class
modules.c:26: parse error before ';' token
modules.c:42: parse error before ';' token
make[2]: *** [modules.o] Error 1
make[2]: Leaving directory `/usr/local/directadmin/customapache/apache_1.3.29/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/local/directadmin/customapache/apache_1.3.29'
make: *** [build] Error 2


------contenst of modules.c
/*
* modules.c --- automatically generated by Apache
* configuration script. DO NOT HAND EDIT!!!!!
*/

#include "httpd.h"
#include "http_config.h"

extern module core_module;
extern module so_module;
extern module frontpage_module;
extern module dosevasive;
_module;

/*
* Modules which implicitly form the
* list of activated modules on startup,
* i.e. these are the modules which are
* initially linked into the Apache processing
* [extendable under run-time via AddModule]
*/
module *ap_prelinked_modules[] = {
&core_module,
&so_module,
&frontpage_module,
&dosevasive;
_module,
NULL
};

/*
* Modules which initially form the
* list of available modules on startup,
* i.e. these are the modules which are
* initially loaded into the Apache process
* [extendable under run-time via LoadModule]
*/
module *ap_preloaded_modules[] = {
&core_module,
&so_module,
&frontpage_module,
&dosevasive;
_module,
NULL
};

:confused: Any Suggestions........Oh and by the way Thank you for all the help........Ive never seen better customer service than this....
 
_module;

doesn't look right. Maybe try making it look like:

module *_module;

(line 13) as the ap_prelinked_modules array uses it, and it's an array of module pointers.

I've never even heard of mod_dosevasive, so I'm not sure what else to offer :)

John
 
No go.....:((

Well it seems that when you modify it (modules.c) it reverts when the ./build script is used....guess Ill have to find another way to prevent dos attacks.......Thanks for your support......maybe someone else will have the problem......and rewrite it...dunno it could happen...lol
:)

If your interested you can check it out @
http://www.nuclearelephant.com/projects/dosevasive/
maybe that will give you some insight into the problems..Thank you again...
 
Back
Top