LoginSignup
4
0

More than 1 year has passed since last update.

Let's Encryptでレート制限に引っかかった。

Last updated at Posted at 2021-06-03

皆さん注意しましょう、というだけの話です。

結論から言うと

ちゃんと外部から80番でアクセスできるよう、ネットワーク、ファイアーウォールの設定を確かめてから、certbotを動かしましょう。
検証の失敗は1時間に5回までは許されているようです。
それを超えると1週間は申請できない模様です。

経緯

久しぶりにあるテストでLet's Encryptで証明書をもらおうとしていました。
久しぶりすぎて、作業開始の時点ではLet's Encrypyでは外部から80番へのアクセスが必要なのを忘れていた。
そもそも80番でサーバを立ち上げる予定はなかった。
公式サイトを読みながら、certbot certonly --standaloneで立ち上げてFQDNを入れた。

公式サイト

そうすると、以下エラーが出た。

Certbot failed to authenticate some domains (authenticator: standalone). The Certificate Authority reported these problems:
  Domain: hoge.example.com
  Type:   connection
  Detail: Fetching http://hoge.example.com/.well-known/acme-challenge/ごにょごにょ: Timeout during connect (likely firewall problem)

Hint: The Certificate Authority couldn't exterally verify that the standalone plugin completed the required http-01 challenges. Ensure the plugin is configured correctly and that the changes it makes are accessible from the internet.

Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

(likely firewall problem)とある。
自宅の中で試験的に立ち上げたサーバだったので、そうだ、そもそも外部から80番にアクセスできないとだめだったんだ。ルータでポート開放しないとならないですよね、と思い出す。

これもまた久しぶりだったので、静的NATとフィルターと…、などと設定し、再度certbot certonly --standaloneをやってもエラーが改善せず。
そういやルータのアウト側のフィルターもあるか、あとどこだ?などと何度かcertbot certonly --standaloneをやっていた。
何度かやってから、そもそも一度Webサーバ立ち上げて、そこで外部からページが見えるようにしておいたほうがいいなと、とりあえずApacheを入れて、ルータの設定をいじり、外部から80で見えるようにした。

これで問題ないだろうと再度certbot certonly --standaloneをやったところ、

An unexpected error occurred:
There were too many requests of a given type :: Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/rate-limits/
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

というエラーが。
嫌な予感がしながら、URLを開いてみる。

古いとは書いているけど日本語訳もありました。

日本語訳の方を見ると、

検証の失敗は、1アカウントごと、1ホスト名ごと、1時間毎に、5回までに制限されています。

あ。はい。確かに1時間に5回はやったかも…。
制限解除できるんだろうか…。
ドキュメントの下に、

レート制限に引っかかった場合、制限を一時的にリセットする方法はありません。レート制限が解消されるまで1週間後まで待つ必要があります。

との記載。ああああぁ…。1週間…。

みなさん、横着はしないでちゃんと順序どおりに作業してくださいね…。
80番を開放したルータのフィルターをそっと削除しました…。

4
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
4
0