voi*_*ter 5 domain-name-system vpn
所以在我的家庭网络上,我运行我自己的域控制器和 DNS 服务器。在我的客户端机器(它是该主域的成员)上,我连接到我的工作 VPN,从那时起我的 DNS 就搞砸了。
我的互联网工作正常,因为我没有选中“在远程网络上使用默认网关”,所以这不是问题。我还明确地将我的 NIC(本地连接 2)的主 DNS 后缀设置为 dailey.home.com,因为这是我的内部网络的域。理想情况下,我不想手动设置它,但我还是这样做了,因为我认为它可能会有所帮助。
在我连接到我的 VPN 之前,我的“Windows IP 配置”的 ipconfig /all 看起来像这样:
Windows IP Configuration
Host Name . . . . . . . . . . . . : Bob
Primary Dns Suffix . . . . . . . : dailey.home.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : dailey.home.com
Run Code Online (Sandbox Code Playgroud)
当我连接到我的 VPN 时,它会更改为:
Windows IP Configuration
Host Name . . . . . . . . . . . . : Bob
Primary Dns Suffix . . . . . . . : dailey.home.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : dailey.home.com
pacs.local
Run Code Online (Sandbox Code Playgroud)
我的路由器是我家庭网络上的默认网关,它的域名为“router”,指向 10.3.1.1。当我在浏览器中输入“路由器”时(在连接到我的 VPN 之前),我正确地到达了路由器的 HTTP 固件页面。
连接到 VPN 后,我无法访问固件页面。当我在“路由器”上运行 PING 时,它不再显示 10.3.1.1,而是有一个我不认识的 IP 地址 66.114.124.140。
事实上,当我尝试使用我设置的任何本地 DNS 名称时,例如计算机名称或我的打印机名称,当 VPN 连接时,它们都不起作用。它们的 IP 地址都是相同的:66.114.124.140。事实上,如果我尝试一个根本不存在的域名,我仍然会收到来自同一个 IP 地址的响应。
连接到 VPN 时,我的“路由器”的 nslookup 会返回此信息(即使是假域名!):
C:\Users\robert>nslookup router
Server: svitdc03.pacs.local
Address: 172.16.0.56
Non-authoritative answer:
Name: router.dailey.home.com
Address: 66.114.124.140
Run Code Online (Sandbox Code Playgroud)
在 VPN 断开连接的情况下,nslookup for 'router' 返回预期结果:
C:\Users\robert>nslookup router
Server: server.dailey.home.com
Address: 10.3.1.120
Name: router.dailey.home.com
Address: 10.3.1.1
Run Code Online (Sandbox Code Playgroud)
为什么会这样?我不太明白。下面是我的 IPCONFIG 结果的其余部分,包括 VPN。
Windows IP Configuration
Host Name . . . . . . . . . . . . : Bob
Primary Dns Suffix . . . . . . . : dailey.home.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : dailey.home.com
pacs.local
PPP adapter True Automation:
Connection-specific DNS Suffix . : pacs.local
Description . . . . . . . . . . . : True Automation
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 172.16.0.196(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 172.16.0.56
172.16.0.42
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . : dailey.home.com
Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller #2
Physical Address. . . . . . . . . : 00-1F-BC-01-55-34
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.3.1.31(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.128
Lease Obtained. . . . . . . . . . : Sunday, May 01, 2011 11:25:58 AM
Lease Expires . . . . . . . . . . : Monday, May 02, 2011 11:25:59 AM
Default Gateway . . . . . . . . . : 10.3.1.1
DHCP Server . . . . . . . . . . . : 10.3.1.1
DNS Servers . . . . . . . . . . . : 10.3.1.120
208.67.222.222
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
Physical Address. . . . . . . . . : 00-1F-BC-01-55-35
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.dailey.home.com:
Connection-specific DNS Suffix . : dailey.home.com
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::5efe:10.3.1.31%12(Preferred)
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 10.3.1.120
208.67.222.222
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter isatap.{4827DF55-4B5E-405B-BE43-9B40BB4D7804}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter Local Area Connection* 9:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.pacs.local:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : pacs.local
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Run Code Online (Sandbox Code Playgroud)
当您的 VPN 断开连接时,您客户端的解析器将使用您的家庭 DNS 服务器来解析名称。当您尝试访问主机名时router,它会使用搜索路径并向您的服务器询问 的地址router.dailey.home.com,一切都很好。
连接 VPN 后,您的 VPN 客户端和网络设置会将客户端的解析器指向您的工作 DNS 服务器。当您尝试访问主机名时router,您的计算机会向您的工作 DNS 服务器询问 的地址router.dailey.home.com。正如您所指出的,由于该home.com域的权威服务器返回该域名的有效答案,因此解析器将在此停止。相反,如果您将域名更改为 Internet DNS 服务器无法解析的名称,例如home.local,您的工作 DNS 服务器仍然无法解析router.home.local为 IP 地址,并且可能会返回权威的 NXDOMAIN 答案,即“此域不存在。” 此配置将解决您无法在没有完全限定名称的情况下访问 Intranet 主机的问题,因为您的客户端将继续搜索路径的下一个元素,但您仍然无法访问您的家庭计算机。
我能想到的最佳解决方案是将您的客户端设置为首选本地连接2(控制面板>网络和Internet(查看网络状态和任务)>更改适配器设置;按Alt并选择高级设置;然后修改适配器顺序),然后配置您的 DNS 服务器,将pacs.local域的责任委托给您的工作 DNS 服务器。这种安排仍然存在一个问题,即当您的 VPN 未连接时,您将无法访问任何面向互联网的计算机pacs.local,但考虑到 TLD 是.local,我希望这不会成为问题。您可能仍然会遇到 VPN 客户端的要求。