Last active
April 27, 2018 16:16
-
-
Save pepoviola/41b4cb1f0dca0fd4d489 to your computer and use it in GitHub Desktop.
Revisions
-
pepoviola revised this gist
Aug 25, 2014 . 1 changed file with 26 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ # # based on: http://knowledgevoid.com/blog/2012/01/13/logging-the-correct-ip-address-using-apache-2-2-x-and-amazons-elastic-load-balancer/ # mod_evasive based on # https://www.linode.com/docs/websites/apache-tips-and-tricks/modevasive-on-apache # update cloudflare download link # make sure you're root @@ -15,4 +19,25 @@ CloudFlareRemoteIPHeader X-Forwarded-For CloudFlareRemoteIPTrustedProxy 10.0.0.0/8 EOF a2enmod cloudflare service apache2 reload # mod_evasive apt-get install apache2-utils cd /usr/src wget http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz tar xzf mod_evasive_1.10.1.tar.gz cd mod_evasive apxs2 -cia mod_evasive20.c # add config <IfModule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 2 DOSSiteCount 50 DOSPageInterval 1 DOSSiteInterval 1 DOSBlockingPeriod 60 DOSEmailNotify <[email protected]> </IfModule> /etc/init.d/apache2 restart -
pepoviola renamed this gist
Aug 25, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
pepoviola created this gist
Aug 25, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # # based on: http://knowledgevoid.com/blog/2012/01/13/logging-the-correct-ip-address-using-apache-2-2-x-and-amazons-elastic-load-balancer/ # update cloudflare download link # make sure you're root sudo -i wget https://raw.github.com/cloudflare/mod_cloudflare/master/mod_cloudflare.c apt-get install apache2-prefork-dev # or apache2-threaded-dev apxs2 -ci mod_cloudflare.c tee /etc/apache2/mods-available/cloudflare.load <<EOF LoadModule cloudflare_module /usr/lib/apache2/modules/mod_cloudflare.so EOF tee /etc/apache2/mods-available/cloudflare.conf <<EOF CloudFlareRemoteIPHeader X-Forwarded-For CloudFlareRemoteIPTrustedProxy 10.0.0.0/8 EOF a2enmod cloudflare service apache2 reload