LoginSignup
0
0

More than 1 year has passed since last update.

AWS Directory Serviceでドメインにログインできない

Posted at

概要

AWS Directory Serviceのチュートリアルをやっていたら思いがけず詰まったのでメモ。ちなみに根本原因は調査中。

内容

チュートリアルのテストラボ4で、ドメインユーザーでログインしようとするとエラーとなり、ログインできない。
キャプチャは忘れたが、エラー内容は「ドメインが利用できない。端末をネットワークに接続してリトライしろ。」という内容。

チュートリアルの構成は以下の通り。
image.png

問題が発生していたのは、MGMT Instanceに対し、Directory Serviceのドメイン管理者ユーザーでRDPログインするとき。
ちなみにMGMT InstanceはWindows Server2019。ローカルアカウントでのログインは問題なし。

原因(分かった範囲で)

DHCPでDNSサーバーの値が正常に払い出されていなかったため。
本来この形になっているはずが、

cmd.exe
   DNS Servers . . . . . . . . . . . : 10.0.0.234
                                       10.0.1.78

実際はこうなっていた。

cmd.exe
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1

暫定対処

DNSサーバーの値を手動で設定して、ひとまず解決。
根本原因はDHCPの動作不良と思われるが、こちらは調査中。
DHCPオプションセットはVPCにアタッチされているし、設定も間違ってなさそうなのでよくわからん。
MGMT Instanceを作成したタイミングで、DHCPオプションセットがVPCにアタッチされてていなかったっぽいが、それが原因だったりするかもしれない。ちなみにDHCPオプションセットをVPCにアタッチ後、MGMT Instanceを再起動しても効果はなかった。

解明まで

とりあえずipconfigを叩いてみた。

cmd.exe
C:\Users\admin>ipconfig /all
Windows IP Configuration
   Host Name . . . . . . . . . . . . : EC2AMAZ-NE4HBON
   Primary Dns Suffix  . . . . . . . : corp.example.com
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : ap-northeast-1.ec2-utilities.amazonaws.com
                                       ap-northeast-1.compute.internal
                                       corp.example.com

Ethernet adapter Ethernet 2:
   Connection-specific DNS Suffix  . : corp.example.com
   Description . . . . . . . . . . . : Amazon Elastic Network Adapter
   Physical Address. . . . . . . . . : 06-40-84-38-F4-0B
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9560:dbae:d823:8fb0%7(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.0.0.50(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Saturday, October 9, 2021 5:39:50 AM
   Lease Expires . . . . . . . . . . : Saturday, October 9, 2021 6:39:50 AM
   Default Gateway . . . . . . . . . : 10.0.0.1
   DHCP Server . . . . . . . . . . . : 10.0.0.1
   DHCPv6 IAID . . . . . . . . . . . : 118097003
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-28-F2-D2-A7-06-40-84-38-F4-0B
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

DNSサーバーの値がなんかおかしい。

cmd.exe
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1

ドメインに対してのpingも通らない(DNSサーバーが応答してない)。

cmd.exe
C:\Users\admin>ping corp
Ping request could not find host corp. Please check the name and try again.

マネジメントコンソールでDirectory Serviceの内容を確認してみると、
image.png

とあるので、ここはこうなっているのが正常なはず。

cmd.exe
   DNS Servers . . . . . . . . . . . : 10.0.0.234
                                       10.0.1.78

ということで、DNSサーバーの値をコンパネから手動で設定してみた。
再度ドメインユーザーでログインしてみると、今度は正常にログインできた。

DHCP周りでなんかわかったら追記します。もしくは有識者の方、ご意見もらえると嬉しいですー。

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