0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GPTBotのお行儀が悪すぎたのでブロックした

0
Last updated at Posted at 2026-02-15

2026/02/12 Googleアナリティクスを確認すると突如アクセスが膨大に跳ね上がった
サーバーログを見てみると、OpenAIのGPTBotがまぁDDos攻撃か?ってくらいアクセス連打してきていた模様

image.png

ログ確認

apacheのログからアクセス元のIPアドレスで出てきた回数を抽出
4桁以上は見た限り全部Botであり、回数ブチ抜いてるGPTBotは約15万/日のアクセスもしてきていた

Xで検索するとサーバーが不調になった原因だったという人も居たので
立派なDDoS攻撃と言っても差し支えないだろう

ubuntu@tk2-117-59341:/var/log/apache2$ sudo awk '{print $1}' /var/log/apache2/access.log.6 | sort | uniq -c | sort -nr | head -n 10
  87195 74.7.241.42
  54500 74.7.227.157
   8333 144.76.32.236
   2113 127.0.0.1
    588 xxx.xxx.xxx.xxx
    546 xxx.xxx.xxx.xxx
    541 xxx.xxx.xxx.xxx
    466 xxx.xxx.xxx.xxx
    402 xxx.xxx.xxx.xxx
    399 xxx.xxx.xxx.xxx
ubuntu@tk2-117-59341:/var/log/apache2$ sudo awk '{print $1}' /var/log/apache2/access.log.5 | sort | uniq -c | sort -nr | head -n 10
  75330 74.7.241.15
  16498 74.7.241.42
  12143 144.76.32.236
  11269 74.7.243.239
   3023 127.0.0.1
   2663 74.7.227.38
   2571 74.7.227.133
   2520 74.7.241.21
   2499 74.7.242.26
   1516 74.7.243.195
ubuntu@tk2-117-59341:/var/log/apache2$ sudo awk '{print $1}' /var/log/apache2/access.log.4 | sort | uniq -c | sort -nr | head -n 10
 151783 74.7.241.15
   7904 144.76.32.236
   2786 127.0.0.1
    992 xxx.xxx.xxx.xxx
    700 xxx.xxx.xxx.xxx
    668 xxx.xxx.xxx.xxx
    574 xxx.xxx.xxx.xxx
    573 xxx.xxx.xxx.xxx
    555 xxx.xxx.xxx.xxx
    513 xxx.xxx.xxx.xxx

ブロック設定

とりあえずrobots.txtに禁止する設定を入れておく
直近のログから確認できた行儀悪いBot達を拒否

新規作成する場合は ファイル名の間違い に注意しよう
私は最初 sが抜けたrobot.txtを作成するという
何の意味も無かった恥ずかしいミスをやらかしていました

robots.txt
User-agent: GPTBot
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: SERankingBacklinksBot
Disallow: /

他にもBotは色々あるので、全量ブロックするならここら辺の記事も参考にできそう

【解説】ChatGPTのクローラーBotを拒否する方法
【2025年版】ChatGPTなどの生成AIのクローラーBotを拒否する方法

これまでクローラーとか特に気にしてなくお好きにどうぞというスタンスだったが
支障が出るレベルのやらかしされると流石に対処せざるを得ない

02/17追記

robots.txtを設定してもなおBotが止まらずアナリティクスが汚れまくっているので
アクセス元のIPアドレスを横着せずに調べ直した

すると、ClaudeBotの他にClaude-SearchBotが居たのと
MJ12botという何年も前から有名らしい害悪BOTがいたことが判明
とりあえず追記して様子見

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?