我在網域控制器上遇到了一個非常奇怪的問題。環境是:
- Windows 2008R2 標準伺服器 + 所有更新
- 一個 DC + 一些加入該 AD 的 Windows 用戶端
該 DC 上安裝了 Symantec Endpoint Protection 12.1.x。有人卸載了它,導致網卡丟失了 IP 配置(閱讀:ipconfig /all
顯示不介面不再存在,但在控制面板中我可以看到並配置它們)。感謝賽門鐵克的 CleanWipe 工具,我能夠刪除 SEP 的一些殘留(我猜這是他們的網路保護驅動程式)並重新獲得 IP 連線。
不幸的是,這殺死了我的 DNS 和 AD 服務。
當我打開 DNS 加載項時,出現與以下相同的錯誤: Microsoft DNS - 存取被拒絕。事件日誌:DNS 伺服器無法開啟 Active Directory
我檢查了主機檔案並重新新增了 localhost 條目。但這並沒有達到目的。
然後我檢查了名稱解析:
ping localhost -> not found
ipconfig /flushdns && ipconfig /displaydns
-> 本機在快取中!
其他測試 - 我已將新主機(8.8.8.8 www.google.com)新增至「hosts」檔案:
ipconfig /flushdns && ipconfig /displaydns
-> 我在快取中看到 google.com 和 8.8.8.8
ping www.google.com -> host not found
看起來hosts檔案已正確載入到DNS快取中但未使用?這幾乎阻止了所有配置 DNS 的嘗試,因為我無法打開 DNS 插件。
更新#1:
NIC 配置是靜態的,
- IP = 10.45.0.1
- 網路遮罩 = 255.255.255.0
- GW = 10.45.0.254
- DNS = 10.45.0.1
沒有配置靜態路由。請注意,在 Symantec Cleanup 之後,我已經清理了整個 Windows 網路配置:
netsh winsock reset
netsh int ip reset
歡迎任何建議!
答案1
從裝置管理員中卸載網卡並讓它重新安裝乾淨。 (刪除並重新掃描)確保 DNS 設定為偵聽所有接口,而不僅僅是靜態 IP,如果您沒有 AD 恢復密碼,請小心重新啟動,您可能會在沒有 DNS 的情況下陷入困境並因此無法登入。
答案2
從 Hosts 檔案中刪除除預設條目之外的所有內容。
在 NIC 上新增 127.0.0.1 作為輔助 DNS。
在 NIC 上重新啟用 IPv6
重啟。
等待。
檢查 DS 和 DNS 事件日誌。
在完成前面的步驟之前,請停止進行其他變更。
您的 Hosts 檔案可能如下所示:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
答案3
新建一個乾淨的主機文件
解除安裝並重新安裝網卡
使用正確的 IP 配置您的 NIC,並停用 IPv6(如果不使用)
在 NIC IP 配置上新增 127.0.0.1 作為 DNS。不要在那裡添加像 8.8.8.8 這樣的東西,如果需要的話,這些東西會去另一個地方
重啟
開啟cmd並運行:
ipconfig /flushdns
網路停止 DNS && 網路啟動 DNS
網路停止網路登入&&網路啟動網路登入
ipconfig /註冊DNS
dcdiag /修復
網路停止網路登入&&網路啟動網路登入
網路診斷/修復
然後使用 NSLookup 和 dcdiag /test:dns 確保一切正常。