V2.2017.05 - Major Version Update

- PLEASE READ UPDATED CONFIGURATION INSTRUCTIONS
- PLEASE READ CHANGELOG
- New Custom Include File (/etc/nginx/bots.d/blacklist-user-agents.conf ) for Blacklisting your own User-Agents which will not get wiped out with updates
- New include file (/etc/nginx/conf.d/botblocker-nginx-settings.conf) for having the important nging settings automatically included into your nginx.conf for you.
- New Bash Installer Script for Easy Installation and Copying Files Directly from the Repo
- Important to note changes in this Version Update as you will get EMERG errors if you are missing any of the new include files
This commit is contained in:
Mitchell Krog 2017-03-02 12:41:31 +02:00
parent 4a97891513
commit f19f327dcb
12 changed files with 202 additions and 62 deletions

View file

@ -0,0 +1,6 @@
# Add One Entry Per Line - List all the extra bad User-Agents you want to permanently block
# This is for User-Agents that are not included in the main list of the bot blocker
# This allows you finer control of keeping certain bots blocked and automatic updates will
# Never be able to remove this custom list of yours
"~*mybaduseragentname" 3;

View file

@ -0,0 +1,4 @@
server_names_hash_bucket_size 64;
server_names_hash_max_size 4096;
limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;
limit_conn_zone $binary_remote_addr zone=addr:50m;

View file

@ -44,6 +44,8 @@ tpl "$DIR/ddos.tpl.conf" "$DIR/nginx/ddos.conf"
tpl "$DIR/blockbots.tpl.conf" "$DIR/nginx/blockbots.conf"
tpl "$DIR/whitelist-ips.tpl.conf" "$DIR/nginx/bots.d/whitelist-ips.conf"
tpl "$DIR/whitelist-domains.tpl.conf" "$DIR/nginx/bots.d/whitelist-domains.conf"
tpl "$DIR/blacklist-user-agents.tpl.conf" "$DIR/nginx/bots.d/blacklist-user-agents.conf"
tpl "$DIR/botblocker-nginx-settings.tpl.conf" "$DIR/nginx/botblocker-nginx-settings.conf"
tpl "$DIR/globalblacklist.tpl.conf" "$DIR/nginx/globalblacklist.conf"
tpl "$DIR/default-site.tpl.conf" "$DIR/nginx/sites-enabled/default-site.conf"

View file

@ -24,8 +24,8 @@ http {
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_names_hash_bucket_size 64;
server_names_hash_max_size 4096;
#server_names_hash_bucket_size 64;
#server_names_hash_max_size 4096;
# Our request limiter zone for wp-login attacks
limit_req_zone $binary_remote_addr zone=wp-login:10m rate=1r/s;
@ -34,9 +34,9 @@ http {
# ***************
# https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus/
# Limiting the Rate of Requests
limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;
#limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;
# Limiting the Number of Connections
limit_conn_zone $binary_remote_addr zone=addr:50m;
#limit_conn_zone $binary_remote_addr zone=addr:50m;
include /etc/nginx/mime.types;
default_type application/octet-stream;
@ -58,6 +58,7 @@ http {
##
include {DIR}/nginx/conf.d/*.conf;
include {DIR}/nginx/sites-enabled/*;
include {DIR}/nginx/botblocker-nginx-settings.conf;
include {DIR}/nginx/globalblacklist.conf;
upstream php {