mitchellkrogza / nginx-ultimate-bad-bot-blocker

Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders
Other
3.81k stars 472 forks source link

[INSTALLATION] globalblacklist.conf instructions vs blacklist-user-agents.conf instructions #502

Open pdobrien3 opened 1 year ago

pdobrien3 commented 1 year ago

Did you look through existing ISSUES ?

Yes Make sure you have searched through existing issues to check that your problem has not been experienced before by another user?

Describe the problem you are experiencing

The instructions for globalblaclist.conf state:

# -----------------------------------------------------------------------
# You can over-ride these in /usr/local/nginx/bots.d/blacklist-user-agents.conf
# by adding the same UA line there and chaning its value of 1
# If you think GoogleBot is bad you would simply add them to 
# blacklist-user-agents.conf with a value of 1
# -----------------------------------------------------------------------

Yet, blacklist-user-agents.conf suggests that things need to be escaped. I am just looking for assistance with creating a proper blacklist for user agents. Are these correct for blacklist-user-agents.conf?

spaces are substituted with underscores? "~*(?:\b)5.0 zgrab(?:\b)" becomes "~*(?:\b)5\.0_zgrab(?:\b)" hyphens are escaped with \? "~*(?:\b)AdsBot-Google(?:\b)" becomes "~*(?:\b)AdsBot\-Google(?:\b)" periods are escaped with \ (see example 1)

Error Messages

Post any error messages (if applicable): N/A


Paste any log / error messages here (paste in between the ```     ``` markers)

N/A

Copy of nginx.conf

If applicable please paste your nginx.conf file here (paste in between the markers)


Paste nginx.conf here

N/A

Copy of vhost / website / host .conf file

If applicable please paste your site/vhost configuration file in between the code ticks (paste in between the markers)


Paste site config here

N/A

Screenshots

If applicable, add screenshots to help explain your problem. N/A

Server (please complete the following information):


Linux rocketchat 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

nginx version: nginx/1.20.2

Paste any log / error messages here (paste in between the ```     ``` markers)

N/A

Additional information

Add any other context about the problem here. N/A