diff --git a/HowtoHaproxy.md b/HowtoHaproxy.md index 19416873..2b56edab 100644 --- a/HowtoHaproxy.md +++ b/HowtoHaproxy.md @@ -1048,4 +1048,29 @@ Dans le cas de l'utilisation spécifique de `HTTP 100 CONTINUE`, cf [HowtoHTTP#h Solution pour contourner : passer en version supérieure (par exemple HAProxy 2.4) +### Go away bad bots + +Ajout d'une règle : + +~~~ +# goaway bad bots +acl goaway-badbots hdr_sub(user-agent) -i -f /etc/haproxy/blacklist-useragent.txt +http-request deny if goaway-badbots +~~~ + +avec `/etc/haproxy/blacklist-useragent.txt` contenant : + +~~~ +thesis-research-bot +Amazonbot +Bytespider +SeekportBot +PetalBot +DotBot +YandexBot +SEOkicks +serpstatbot +AhrefsBot +MJ12bot +~~~