Page 1 of 1

blocking bad bots

Posted: Fri Feb 22, 2019 12:14 pm
by Stevyn
1. check webserver logs to see what bots are scanning your site.
2. run

Code: Select all

netstat -t
to see who is on now.
3. check https://botcrawl.com to learn about the bot.

block AhrefsBot

block with webserver or use ubuntu firewall:

Code: Select all

sudo ufw insert 1 deny from 195.154.127.0/24 comment 'Block ahrefs bot'
AhrefsBot:
173.199.64.0/18
54.36.148.0/24
54.36.149.0/24
54.36.150.0/24
195.154.122.0/24
195.154.123.0/24
195.154.126.0/24
195.154.127.0/24

reload :

Code: Select all

sudo ufw reload