Skip to content

Instantly share code, notes, and snippets.

@vanokg
Created April 17, 2018 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanokg/d20eda8669d0223a511ef0cb6725b725 to your computer and use it in GitHub Desktop.
Save vanokg/d20eda8669d0223a511ef0cb6725b725 to your computer and use it in GitHub Desktop.
DROP_BOT
for i in `egrep -i "semrushbot|mj12bot|ahrefsbot" /var/log/nginx/*access.log |awk '{print $1}' |sort |uniq|awk -F':' '{print $2}'` ; do iptables -A INPUT -s $i -j DROP ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment