• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Blocking bad bots

tkalfaoglu

Silver Pleskian
The server seems to be mainly servicing https bots while its running, and it annoyed me.
So I wrote some nginx code to stop it (inserted via the PLESK interface into the nginx configurations box):

if ($http_user_agent ~ (MJ12bot|LieBaoFast|UCBrowser|MQQBrowser|Mb2345Browser|gumgum-bot|postmanruntime|ag_dm_spider|scrapy|chimebot|trendkite-akashic-crawler|ZoominfoBot|Sogou|ALittle|Keybot|Buck|curl|webprosbot|RestSharp|Snap|SemrushBot|AhrefsBot|DataForSeoBot)) {
return 403;
}


It appears to work, but how can I enable this for ALL sites.. I tried it in nginx.conf , but it complained that "if" cannot be put there..
Thanks! -t
 
You could also add this inside your ModSecurity.
That way if 1 site gets "attacked", it's blocked all across your server.
 
Thanks - in the past I had problems with modsecurity - blocking things it should not have, so I'm a bit shy about using it
 
Back
Top