Domain-Name-System

無法將 Google Cloud VM 加入 Azure AD 域服務

  • October 16, 2020

我有一個使用 Azure VM 和 Google Cloud VM 的多雲設置,它們通過站點到站點 VPN(來自 Azure)連接。VPN 連接一切正常,但是我現在正嘗試將所有(Azure 和 Google)VM 加入到 Azure (AADDS) 中託管的同一個域。Azure VM 在對等 Vnet 並調整 DNS 伺服器以指向 AADDS 內部 IP 後成功加入,但我被困在 google VM 上。

我有:

  • 驗證了從Google虛擬機到 AADDS 內部 ip 的 VPN 連接,我在兩個 ip 上都得到了成功的 ping 回复。
  • 使用 DIG 查看 Azure VM 正在使用的 DNS 配置,並嘗試將其複製到 Google DNS 區域(私有)。
  • 驗證我可以從我的Google虛擬機 ping 域名(名稱)。

考慮到 ping 工作正常,我覺得這是一個 DNS 問題。最初我得到了 SVR 記錄失去錯誤,所以我添加了一個特定的 SVR 記錄 _ldap._tcp.dc._msdcs svr 並嘗試了萬用字元 SVR。但是我在嘗試加入時最終出現以下錯誤:

Note: This information is intended for a network administrator.  If you are not your network's administrator, notify the administrator that you received this information, which has been recorded in the file C:\Windows\debug\dcdiag.txt.

DNS was successfully queried for the service location (SRV) resource record used to locate a domain controller for domain "mydomain.com":

The query was for the SRV record for _ldap._tcp.dc._msdcs.mydomain.com

The following domain controllers were identified by the query:
mydomain.com


However no domain controllers could be contacted.

Common causes of this error include:

- Host (A) or (AAAA) records that map the names of the domain controllers to their IP addresses are missing or contain incorrect addresses.

- Domain controllers registered in DNS are not connected to the network or are not running.

所以我最終想通了。我嘗試使用Google云 DNS 提供的 DNS 轉發,手動更改虛擬機上的 DNS 設置,但沒有幫助。最終起作用的是在自定義 Google Cloud DNS 區域上正確(通過反複試驗)組合 NS、SVR 和 A 記錄。A en SVR 記錄本質上同時具有裸域和萬用字元+域記錄。這些記錄基於我從登錄 AAD DS 服務(在已加入的 VM 上)上的 DNS 伺服器獲得的資訊。

我建議查看 Google VM 上的Netsetup.log 文件,了解可能導致額外故障排除步驟的錯誤。您還可以執行PortQryUI(Active Directory 測試)來確認您的 Azure VM 和 Google Cloud VM 具有相同的結果。DNS 只是所需的一項服務。

引用自:https://serverfault.com/questions/1036755