最近服务器负载一直下不来,经常到 100%,结果发现是各大 AI 厂商的机器人爬虫,疯狂请求我的网站
qxmqh: 从上周开始,我上线了一个小网站,需要一个关键字来搜索内容,结果被 ChatGPTBot、ClaudeBot、谷歌,还有 Meta Facebook 的这些机器人疯狂提交参数,读取返回结果。我一直以为是中病毒了,结果今天一看网站日志,我去。
全是
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.7922.137 Mobile Safari/537.36 (compatible; GoogleOther)"
几乎达到了攻击级别的访问。
把我小站的流量和负载干满了。
在 nginx 里面加了一个
```nginx
if ($http_user_agent ~* "(GPTBot|ChatGPT-User|ClaudeBot|anthropic-ai|PerplexityBot|Bytespider|GoogleOther|meta-externalagent|MJ12bot)") {
return 403;
}
```
整个负载瞬间就下来了。
没人管这帮机器人吗?
---
原文链接:[点击查看](https://www.v2ex.com/t/1236386)
全是
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.7922.137 Mobile Safari/537.36 (compatible; GoogleOther)"
几乎达到了攻击级别的访问。
把我小站的流量和负载干满了。
在 nginx 里面加了一个
```nginx
if ($http_user_agent ~* "(GPTBot|ChatGPT-User|ClaudeBot|anthropic-ai|PerplexityBot|Bytespider|GoogleOther|meta-externalagent|MJ12bot)") {
return 403;
}
```
整个负载瞬间就下来了。
没人管这帮机器人吗?
---
原文链接:[点击查看](https://www.v2ex.com/t/1236386)
· 0 个赞
· 0 个赞
· 0 个赞
· 0 个赞
· 0 个赞