LoginSignup
6
8

More than 5 years have passed since last update.

DNSを切り替えた時の問題と対応

Posted at

先日、DNSを お名前.com から Route 53 へ切り替えた時の
問題と対応メモ。

DNSを切り替える

  1. AWS > Route 53 で Hosted Zone を作成する
  2. NSレコードの AWSDNS 4種 をお名前.comで設定する
  3. nslookupコマンドで、DNSの切り替わりを確認する
コマンド例
$ nslookup -type=ns hogehoge.com
Server:     192.168.11.1
Address:    192.168.11.1#53

Non-authoritative answer:
hogehoge.com    nameserver = ns.awsdns.org.
hogehoge.com    nameserver = ns.awsdns.co.uk.
hogehoge.com    nameserver = ns.awsdns.com.
hogehoge.com    nameserver = ns.awsdns.net.

Authoritative answers can be found from:
ns.awsdns.org   internet address = ○○○.○○○.○○○.○○○
ns.awsdns.org   has AAAA address ××××:××××:××××:××××::×
ns.awsdns.co.uk internet address = △△△.△△△.△△△.△△△
ns.awsdns.co.uk has AAAA address □□□□:□□□□:□□□□:□□□□::□
ns.awsdns.com   internet address = ■■■.■■■.■■■.■■■
ns.awsdns.com   has AAAA address ▲▲▲▲:▲▲▲▲:▲▲▲▲:▲▲▲▲::▲
ns.awsdns.net   internet address = ●●●.●●●.●●●.●●●
ns.awsdns.net   has AAAA address ****:****:****:****::*

サブドメインを設定する

Route 53 にて、api.hogehoge.com へのアクセスで
指定したALBへ繋がるようにAレコードを作成する

設定の翌週に確認すると

先日、nslookupコマンドでDNS切り替わりを確認できたにも関わらず、
今回は確認できず。。

コマンド例
$ nslookup -type=ns hogehoge.com
Server:         192.168.11.1
Address:        192.168.11.1#53

** server can't find hogehoge.com: NXDOMAIN

また、ブラウザで api.hogehoge.com へアクセスすると、
以下のエラーが表示されました。

ERR_NAME_NOT_RESOLVED

名前解決できていない!

対応と原因の切り分け

Route 53 の設定が間違っているのかと思い、
Hosted Zone を作り直すところからやりましたが特に変わらず。
ググったり色んな方に相談しましたが、設定は特に問題なさそうとのこと。

また、サブドメインで設定したALBのエンドポイントに対して直接アクセスすると、
アプリケーションの画面は確認できました。
(アプリケーションの問題ではない。ドメインの問題?)

お名前へ問い合わせ

ドメインの認証が完了していないとの返答をいただきました..。
ドメイン登録された先方に再度メール確認依頼して添付のURLへアクセスしていただき、
約30分程度で api.hogehoge.com へアクセスできるようになっていました。
(爆速!10分程度で返答が返ってきました!)

nslookupコマンドでも問題ないことを確認しました。

コマンド例
$ nslookup -type=ns hogehoge.com
Server:     192.168.11.1
Address:    192.168.11.1#53

Non-authoritative answer:
hogehoge.com    nameserver = ns.awsdns.net.
hogehoge.com    nameserver = ns.awsdns.org.
hogehoge.com    nameserver = ns.awsdns.co.uk.
hogehoge.com    nameserver = ns.awsdns.com.

Authoritative answers can be found from:

結論

  • DNSは切り替わっていた
  • ドメインのメール認証が完了していなかった為、ドメイン利用に制限がかかっていた
    • ドメイン登録は先方が行なっており、こちらで状況を把握できていませんでした
    • ドメイン登録含め、丸ごとこちらで請け負うべきと思いました
6
8
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
6
8