Browse Source

Re-Gen Test
- updates to include files with correct regex formatting

Mitchell Krog 8 years ago
parent
commit
a9077e0090
3 changed files with 68 additions and 9 deletions
  1. 23 4
      bad-referrer-words.conf
  2. 33 3
      blacklist-user-agents.conf
  3. 12 2
      whitelist-domains.conf

+ 23 - 4
bad-referrer-words.conf

@@ -1,16 +1,35 @@
 # EDIT THIS FILE AS YOU LIKE TO ADD OR REMOVE ANY BAD WORDS YOU WANT TO SCAN FOR ###
 
-# This is merely an example and gets auto included as since Version 2.2017.05 introduced on 2017-04-19
-# This file must exist on your system or Apache will fail a reload due to a missing file
+# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
+# This file must exist on your system or Nginx will fail a reload due to a missing file
 # For all intensive purpose you can delete everything inside this file and leave it
-# completely blank if you do not want your Apache Blocker to include scanning for bad words within urls or referrer string
+# completely blank if you do not want your Nginx Blocker to include scanning for bad words within urls or referrer string
+# Only add one entry per line
 
+# *******************************
+# !!! WARNING WARNING WARNING !!!
+# *******************************
+
+# ***************************************
+# PLEASE BE VERY CAREFUL HOW YOU USE THIS
+# ***************************************
+# Here is an example of how one supposed bad word can cause your whole site to go down.
+# An issue was logged where the users own domain name was specialisteparquet.com
+# Because this list contained the word "cialis" it was detected within his domain name causing 
+# his entire site to go down and not server any assets.
+# That one entry would even cause any site containing a word like "specialist" anywhere in any
+# of their sites pages to cause them to be blocked and whitelisting your own domain name in the
+# whitelist-domains.conf file will not even bypass this, SO BE CAREFUL PLEASE
+
+SetEnvIfNoCase Referer ~*adultgalls spam_ref
+SetEnvIfNoCase Referer ~*bigblackbooty spam_ref
 SetEnvIfNoCase Referer ~*cookie-law-enforcement spam_ref
 SetEnvIfNoCase Referer ~*free-share-buttons spam_ref
 SetEnvIfNoCase Referer ~*free-social-buttons spam_ref
 SetEnvIfNoCase Referer ~*fuck-paid-share-buttons spam_ref
 SetEnvIfNoCase Referer ~*law-enforcement-bot spam_ref
 SetEnvIfNoCase Referer ~*law-enforcement-check spam_ref
-SetEnvIfNoCase Referer ~*share-buttons spam_ref
 SetEnvIfNoCase Referer ~*share-buttons-for-free spam_ref
 SetEnvIfNoCase Referer ~*social-buttons- spam_ref
+SetEnvIfNoCase Referer ~*vvakhrin-ws1 spam_ref
+SetEnvIfNoCase Referer ~*xxxrus spam_ref

+ 33 - 3
blacklist-user-agents.conf

@@ -1,7 +1,37 @@
-# Add One Entry Per Line - List all the extra bad User-Agents you want to permanently block
+# EDIT THIS FILE AS YOU LIKE TO BLACKLIST OR WHITELIST ANY BAD USER-AGENT STRINGS YOU WANT TO SCAN FOR
+# ****************************************************************************************************
+
+# Add One Entry Per Line - List all the extra bad User-Agents you want to permanently block or whitelist.
+
 # This is for User-Agents that are not included in the main list of the bot blocker
+# This file must exist on your system or Apache will fail a reload due to a missing file
 # This allows you finer control of keeping certain bots blocked and automatic updates will
 # Never be able to remove this custom list of yours 
 
-BrowserMatchNoCase "^MyVeryBadUserAgent" bad_bot
-BrowserMatchNoCase "^AnotherVeryBadUserAgent" bad_bot
+# Please note this include file loads first before any of the already whitelisted User-Agents
+# in the bad bot blocker. By loading first in line it over-rides anything below it so for instance
+# if you want to block Baidu, Google or Bing for any reason you add them to this file which loads
+# first and takes precedence over anything below it. This now allows even finer control over the 
+# bad bot blocker. Enjoy !!!
+
+# Even though this file is called blacklist-user-agents, as mentioned it can also be used to whitelist user agents
+# By adding them below and setting the word bad_bot to good_bot this will permanently whitelist the User-Agent.
+
+# Make sure any words that contain special characters are escaped and include word boundaries as per the Regex examples below.
+
+# Example the User-Agent name "someverybaduseragentname1" is entered as "\bsomeverybaduseragentname1\b"
+# Example the User-Agent name "some-very-bad-useragentname2" is entered as "\bsome\-very\-bad\-useragentname1\b" 
+# the "\b" are word boundaries which prevents partial matching and false positives.
+# Follow the regex formatting examples below.
+
+# ************************
+# BLACKLIST ADDITONAL BOTS
+# ************************
+BrowserMatchNoCase "^(.*?)(\bMyVeryBadUserAgentName\b)(.*)$" bad_bot
+BrowserMatchNoCase "^(.*?)(\bMy\ Bad\ User\ Agent\b)(.*)$" bad_bot
+
+# ************************
+# WHITELIST ADDITONAL BOTS
+# ************************
+BrowserMatchNoCase "^(.*?)(\bMyVeryGoodUserAgentName\b)(.*)$" good_bot
+BrowserMatchNoCase "^(.*?)(\bMy\ Bad\ User\ Agent\b)(.*)$" good_bot

+ 12 - 2
whitelist-domains.conf

@@ -1,3 +1,13 @@
+# EDIT THIS FILE AS YOU LIKE TO WHITELIST YOUR OWN DOMAIN NAMES AND SPARE THEM FROM ANY REFERRER CHECKING ###
+
+# Add One Entry Per Line - List all your own domains of the sites you host on the server
+# This file must exist on your system or Nginx will fail a reload due to a missing file
+# Automatic updates will never be able to remove this custom list of yours 
 # Add One Entry Per Line
-SetEnvIfNoCase Referer "~*yourowndomain1.com" good_ref
-SetEnvIfNoCase Referer "~*yourowndomain2.com" good_ref
+
+# Make sure any domains have dots and special characters escaped as per the Regex examples below.
+# For example myfirstowndomainname.com should be entered as myfirstowndomainname\.com
+# and my-second-owndomainname.com should be entered as my\-second\-owndomainname\.com
+
+SetEnvIfNoCase Referer "~*yourdomain\.com" good_ref
+SetEnvIfNoCase Referer "~*your\-domain\.com" good_ref