Windows

讓 DNS 伺服器知道它的 ADDC 伺服器

  • March 20, 2015

我有一個問題,在Google上找不到答案,所以現在我問你

我有 2 台伺服器:

Server A, ubuntu 14.04, running DNS/DHCP through bind9 and isc-dhcp-server

Server B, ubuntu 14.04, running ldap/samba and is an ADDC
I used these guides to set it up: http://www.unixmen.com/openldap-installation-configuration-ubuntu-12-1013-0413-10-debian-67-2/ and http://www.unixmen.com/setup-samba-domain-controller-with-openldap-backend-in-ubuntu-13-04/

我也有一個windows伺服器

WinServer A

我想讓 WinServer A 連接到 Server B 提供的域,但是 WinServer A 使用 Server A 作為 DNS,所以找不到 DOMAIN 的 ADDC,因為 DNS 在一台伺服器上,而 ADDC 在另一台伺服器上

我的問題是如何讓Server A知道Server B是域的ADDC,這樣WinServer A才能通過Server A找到它。

真的很感謝一個答案

更新

在我的區域我寫過

_ldap._tcp SRV 0 0 389 ServerB FQDN

但是當我重新啟動 bind9 並嘗試執行這些命令時:

nslookup
> set type=SRV
> _ldap._tcp

它返回

Server:     127.0.0.1
Address:    127.0.0.1#53

** server can't find _ldap._tcp: NXDOMAIN

所以我試著從網上找一個例子(如果有錯請糾正我):#nano /var/lib/bind/mosek.intranet.zone

_ldap._tcp      SRV     0       0       389     ServerB.
_kerberos._tcp  SRV     0       0       88      ServerB.
_ldap._tcp.dc._msdcs    SRV     0       0       389     ServerB.
_kerberos._tcp.dc._msdcs        SRV     0       0       88      ServerB.
ServerB                   A       xxxx.xxxx.xxxx.xxxx

但是當我嘗試通過 nslookup 命令驗證它時,它仍然給了我錯誤。

我去 WinServer A 嘗試以 ADDC 的身份連接到 ServerB,我注意到了進展:

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

the query was for the SRV record for _ldap._tcp.dc.msdcs.mosek.intranet

the following domain controllers were identified by the query:
ServerB.mosek.intranet

However no domain controllers could be contacted

Common causes of this error include:

- Host (a) or (aaa) records that map the name of the domain controllers to their IP addresses are missing or contains incorrect addresses

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

我發現這個錯誤消息很奇怪,因為我有一個 ServerB 的 A 記錄,我試圖將它移動到 SRV 記錄之前,以防它按順序讀取區域文件,但仍然是同樣的錯誤。

所有 Windows 機器都使用 DNS 中的 SRV 記錄來定位域控制器。如果您希望 Windows 電腦能夠定位域控制器,這些 SRV 記錄必須存在於您的 Windows 電腦正在查看的 DNS 伺服器上。在傳統的 Active Directory 環境中,域控制器自己註冊和維護自己的 SRV 記錄。但從技術上講,如果您需要使用非 Microsoft DNS 伺服器,您可以自己手動創建 SRV 記錄。

https://technet.microsoft.com/en-us/library/cc961719.aspx

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