我已经配置了一个windows作为我的DNS服务器,并配置了我所有的ubuntu来使用它。
来自我的ubuntu的netplan
$ cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens160:
addresses:
- 172.0.1.51/24
nameservers:
addresses:
- 172.0.1.34
search: []
routes:
- to: default
via: 172.0.1.29
version: 2名称解析/DNS查找可以很好地用于外部互联网连接。
$ ping google.com
PING google.com 56(84) bytes of data.
64 bytes from seu35a21-eu-g67.2e345.net: icmp_seq=1 ttl=107 time=27.4 ms
64 bytes from seu35a21-eu-g67.2e345.net: icmp_seq=2 ttl=107 time=26.6 ms
64 bytes from seu35a21-eu-g67.2e345.net: icmp_seq=3 ttl=107 time=26.7 ms不过,我从我的windows中在配置区域(home.local) 172.0.1.45 nginx.home.local中的windows DNS服务器中添加了一个手动DNS记录,对本地D3的ping操作很好。
C:\Users\JCGHDX>ping nginx.home.local
Pinging nginx.home.local [172.0.1.45] with 32 bytes of data:
Reply from 172.0.1.45: bytes=32 time<1ms TTL=128
Reply from 172.0.1.45: bytes=32 time<1ms TTL=128
Reply from 172.0.1.45: bytes=32 time<1ms TTL=128然而,在我的ubuntu上
$ ping nginx.home.local
ping: nginx.home.local: Temporary failure in name resolution$ resolvectl status
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 2 (ens160)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 172.0.1.34
DNS Servers: 172.0.1.34任何指针为什么DNS查找失败的本地域?
发布于 2023-03-19 08:16:02
对于任何需要详细解释的人:Ubuntu18.04 .local域dns查找不工作
/etc/resolv.conf将名称服务器指向127.0.0.1#53,后者拒绝.local域的DNS查找。答案中提供了Fix。但是,它需要在我所有的ubuntu中更改配置。
简单的替代方法是在我的windows DNS中配置一个新区域,而不以.local结尾,并将手动A记录添加到该区域。然后最后使用从该区域获得的FQDN进行工作!
https://askubuntu.com/questions/1459914
复制相似问题