Code Monkey home page Code Monkey logo

evasive's Introduction

mod_evasive_x

Added some features to evasive_module.

Currently only 2.x version is implemented.

Original mod_evasive is here.

Used regex library TRex.

Additions

DOSXForwardedForAsRemoteIP 0 or 1. Use X-Forwarded-For as remoteIP when 1. Defaults to 0.

DOSTargetedURL Regular expression of target URL, e.g. example.com:80/some.path Multiple entries requires multiple lines.

DOSUnTargetedURL Regular expression of untargeted URL, e.g. example.com:80/some.path Multiple entries requires multiple lines.

DOSLogOnly 0 or 1. Do not return 403 if 1. Defaults to 0.

Remember

You must include the Trex library when compiling the Apache2 module:

apxs2 -i -a -c mod_evasive20.c trex.c

If you cannot seem to get any log output, take a look at /var/log/syslog ;)

evasive's People

Contributors

jorgeuriarte avatar shukob avatar

Stargazers

 avatar  avatar  avatar Chris Miles avatar  avatar Deepak Deore avatar Patrick Tully avatar  avatar Fabio Cigliano avatar  avatar

Watchers

Patrick Tully avatar James Cloos avatar  avatar Chris Barbara avatar

evasive's Issues

Issues with multiple ips in x-forwarded-for and logging change

It doesn't block the ip if there are multiple ip addresses in x-forwarded-for header.

Also can the logging be changed to log x-forwarded-for ip instead of load balancer's ip if DOSXForwardedForAsRemoteIP is set to 1 ?

Eg. In below log client ip is being printed as load balancer's ip, where if i have then it should print ip address of x-forwarded-for because i have "DOSXForwardedForAsRemoteIP 1"

[Tue Sep 29 01:01:04 2015] [error] [client 10.2.0.130] client denied by server configuration: proxy:http://localhost:8080/some/file.js

Forwarded For

Hi there,

disclaimer: it's the first time I try to hack on C code to please forgive me for my lack of knowledge.

I have a question about this code:

apr_table_get(r->headers_in, "X-Forwarded-For")

I know the X-Forwarded-For header can have a list of IPs (comma separted). As far as I can tell, you set the X-Forwarded-For to the 'remote_ip' variable. The remote_ip is supposed to be a single IP, right?
So, as long as the X-Forwarded-For header is a single IP it works, correct?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.