Вы не зашли.
Главная » Компьютеры/Софт » Блокируем ботов и всякую непотребность с помощью cloudflare.com
#1. WapStyle Off (3)
Участник
2023.11.14 18:06
Естественно если у вас домен на cloudflare.com
Идём Security - WAF
Создаём первое правило
Код:
(http.user_agent contains "YandexBot") or (http.user_agent contains "YandexImages") or (http.user_agent contains "YandexImageResizer") or (http.user_agent contains "YandexMobileBot") or (http.user_agent contains "Googlebot") or (http.user_agent contains "Googlebot-Image") or (http.user_agent contains "YandexMetrika") or (http.user_agent contains "YandexRenderResourcesBot")
Их пропускаем.

Второе правило, отрубит всех ботов кроме выше указанных
Код:
(http.user_agent contains "Bot") or (http.user_agent contains "bot")
им ставим или блок или JS проверку

Третье правило, я по логам создал
Код:
(http.user_agent contains "BackupLand") or (http.user_agent contains "curl") or (http.user_agent contains "python-requests") or (http.request.uri contains "/wp-") or (http.request.uri contains "/.") or (ip.geoip.country eq "IR") or (http.request.uri contains "/payment/") or (ip.geoip.country eq "ID")
тут тоже сами решаем, или блок или JS проверку

выуля, логи сервера чисты, нагрузка сильно упала от ненужных запросов

на скрине всё показано, как робит, прошло 2 дня. Первое правило всегда будет 0, боты что разрешены бегают по сайту без проблем
Вложения
Screenshot_1.png 21kb {1051x235} [загрузок: 52]
Отредактировано WapStyle (2023.11.14 18:06)
Страниц: 1
Главная
WEB
PunBB Mod v0.6.2
0.012 s