logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: Mod_evasive with some extra features, need help
Author
chokchai



Joined: 04 Jul 2016
Posts: 3

PostPosted: Tue 05 Jul '16 4:50    Post subject: Mod_evasive with some extra features, need help Reply with quote

Can anybody help me to compile mod_evasive?

I find the source code, but not have experience and tools for compile it.

Source code here: https://github.com/skonb/evasive
Need compile for: Apache 2.4.20 VC14 Win64

Thanks!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 06 Jul '16 15:16    Post subject: Reply with quote

You can use the apxs script. Very simple.

Code:
apxs -i -a -c mod_evasive20.c trex.c
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 06 Jul '16 18:02    Post subject: Reply with quote

But

unfortunately, in VC14 we don't have these headers.

#include <sys/socket.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <syslog.h>

This module is not compatible with Apache 2.4.
This module pipes messages to a mailer (qmail/sendmail/etc) which we do not have in Windoze.
We do not have 'syslog' in Windoze either.

Because of this, this module requires quite a bit of modification to get working on Windows.
Back to top
chokchai



Joined: 04 Jul 2016
Posts: 3

PostPosted: Thu 07 Jul '16 4:59    Post subject: Reply with quote

glsmith, thank you for explain.

I tried to cut code which Windows uncompatible
and use apxs -i -a -c mod_evasive20.c trex.c (thank you, James Blond),
but get errors like

Quote:
C:\Apache24\bin>apxs -i -a -c mod_evasive20.c trex.c
Use of assignment to $[ is deprecated at C:\Apache24\bin\apxs.BAT line 120.
Use of uninitialized value $apr_ldflags in concatenation (.) or string at C:\Apache24\bin\apxs.BAT line 484.
c:\perl\site\bin\gcc.exe /nologo /MD /W3 /O2 /D WIN32 /D _WINDOWS /D NDEBUG -I"C:\apache24\include" /c /Fomod_evasive20.lo mod_evasive20.c
gcc.exe: /nologo: No such file or directory
gcc.exe: /MD: No such file or directory
.....


I think my system config (PATH, etc) is wrong.

Ok, I will use another solution for my project (use simple and fast socket client/server for count requests to run script that generated site content).

Thank you.
Back to top
chokchai



Joined: 04 Jul 2016
Posts: 3

PostPosted: Fri 08 Jul '16 4:12    Post subject: Reply with quote

But... monitoring single script is not a good idea, because Apache can be flooded through images and direct request to files, not to script.

My problem:
1. Apache 2.4.20 server place behind proxy, and mod_evasive get proxy IP, not client IP. If mod_evasive detect flood, proxy IP is blocked and all clients denided.
2. If I use mod_remoteip, I can get client IP only in logs (%a), but mod_evasive dont't understand this and continue to use proxy IP.
3. I try to find mod_rpaf module for tests, but can not find this module for Apache 2.4.20.
4. If I use Apache lower version (VC9, for example), I have mod_rpaf in package, but not have mod_evasive.

Can anybody help me, how I can resolve my problem?

Thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 22 Jul '16 0:30    Post subject: Reply with quote

gcc.exe on Windows?

The command line codes are for VisualStudio Command line tools.

Did you try cygwin? Or not the correct apxs file for windows?
Back to top


Reply to topic   Topic: Mod_evasive with some extra features, need help View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads