我在家里使用 WG 隧道从我的 Arch Linux 安装连接到我的管理网络,假设它称为 mgmt.local,而我的家庭网络称为 home.local
如果我 ping vcenter.home.local,它有效;如果我 ping vcenter.mgmt.local,它无效
ping: vcenter.mgmt.local: Temporary failure in name resolution
nslookup:
nslookup vcenter.home.local
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: vcenter.khome.lo
密码地址:10.xx.xx.10
我的 MS AD 控制器中有两个正向查找区域,并且在运行 Windows 时一切正常。
所以我想我必须以某种方式为 WG 界面设置搜索域?奇怪的是,昨天一切都正常,从那时起我所做的就是安装 kvm/qemu 并升级系统
/etc/nsswitch.conf
asswd: files systemd
group: files [SUCCESS=merge] systemd
shadow: files systemd
gshadow: files systemd
publickey: files
#hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
hosts: mymachines resolve files myhostname dns
networks: files
protocols: files
services: files
ethers: files
rpc: files
netgroup: files
/etc/resolv.conf
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
search home.local
答案1
我通过编辑 /etc/systemd/resolved.conf 解决了这个问题并进行了更改:
DNS=mydnsserver
Domains=local