我在我的笔记本电脑和我的服务器之间使用 OpenVPN 连接。配置一直工作到今天(我只是运行apt update && apt upgrade),但从那时起,我的 DNS 设置在连接到 OpenVPN 后“错误”。
连接到 OpenVPN 服务器后,我的配置中有两个“捕获所有”DNS 域条目 ( DNS Domain: ~.) systemd-resolve。
剥离输出systemd-resolve --status:
Link 11 (tun0)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 192.168.X.Y
DNS Domain: ~.
Link 2 (enp0s25)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 10.16.X.Y
10.16.X.Y
DNS Domain: ~.
Run Code Online (Sandbox Code Playgroud)
因此,DNS 查询现在不能通过 VPN …