Created
June 13, 2016 09:20
-
-
Save kanibaspinar/090a63674929dcea8c88787b19693c17 to your computer and use it in GitHub Desktop.
Prevention of new types of attacks at Layer 7 with nginx
This file contains 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 characters
# Back up the old files before editing # | |
if ($http_user_agent ~* (Trident*) ) { | |
return 444; | |
} | |
if ($http_user_agent ~* (-) ) { | |
return 444; | |
} | |
if ($http_user_agent ~* (Java) ) { | |
return 444; | |
} | |
if ($request_method !~ ^(GET|HEAD|POST)$ ) { | |
return 444; | |
} | |
if ($http_user_agent ~* (python-requests/2.9.1) ) { | |
return 444; | |
} | |
if ($http_user_agent ~* (Python-urllib/2.6) ) { | |
return 444; | |
} | |
# Comment the following 2 lines to make the Apache status page public | |
if ($http_user_agent ~* (WordPress*) ) { | |
return 444; | |
} | |
if ($http_user_agent ~* (-) ) { | |
return 444; | |
} | |
#Have A Nice Days , $Kbsp# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment