regex fail2ban rules


I am setting up Fail2ban on my server, recently got a lots bad bots is crawling my site cause my SQL server down

From my Apache2 logs - - [10/Dec/2017:12:03:19 +0800] "GET /crew/nm0935095-gary-winick HTTP/1.0" 200 17985 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.2; +" - - [10/Dec/2017:12:03:31 +0800] "GET /movie/tt0498567-summer-time-machine-blues HTTP/1.0" 200 17658 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.2; +" - - [10/Dec/2017:12:03:36 +0800] "GET /movie/tt1705064-genji-monogatari:-sennen-no-nazo/ HTTP/1.0" 200 17344 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.2; +"

how to create a failregex for “” ?

Many Thanks


You don’t want fail2ban, you want Apache rules to deny referrers. A simple google for Apache deny referrer will surface plenty of resources on the topic.
Thank you, this is working temporary, but I checked the log, the bot is still working after few 500 error, it still crawling my site 🙁
– Roy 2019
10 hours ago