我的笔记本使用 wireguard 正常连接家里内网 ip,却没有办法使用家里的 dns。

165 天前
 jqbbbbb123

我在家里的内网部署了 dns (开源项目 blocky),在内网使用是正常的。

我在公司上班笔记本都是开着三个 vpn 软件:工作的 vpn ,wireguard (访问家里),clash-verge (用的 meta 核心)。

因为工作时要连接公司的 vpn ,所以在 clash-verge 配置文件里 .dns.nameserver-policy 我指定了工作使用的域名走工作的 dns ,工作上我使用起来是正常的。

dns:
  enable: true
  ipv6: false
  enhanced-mode: redir-host
  fake-ip-range: 198.18.0.1/16
  proxy-server-nameserver:
    - 8.8.8.8
  default-nameserver:
    - 8.8.8.8
  nameserver:
    - 8.8.8.8
    - 10.30.1.29  #工作 dns
    - 192.168.20.74   #家里 dns
  nameserver-policy:
    '+.xxx.com.cn': '10.30.1.29'  #工作域名
    '+.xxx.com': '192.168.20.74'  #家里域名
tun:
  enable: true
  stack: system 
  dns-hijack: 
    - any:53
  auto-route: true
  auto-detect-interface: true 
  inet4_route_address:

我使用 wireguard 连接内网,同样在配置文件里 .dns.nameserver-policy 设置内网域名走家里内网 dns ,但是没有效果。

在 powershell 中使用 nslookup 指定家里域名和家里 dns 提示:DNS request timed out.

我在部署家里内网 dns 前一直都是使用 wireguard 直连的,ip 都能正常访问。

( clash-verge 一直都是使用 tun 模式)

我关闭了工作 vpn 和 clash-verge ,并配置 wireguard dns 为内网 dns

[Interface]
PrivateKey = 
Address = 10.66.99.21/32
DNS = 192.168.20.74

[Peer]
PublicKey = 
PresharedKey = 
AllowedIPs = 192.168.20.0/24, 192.168.3.0/24, 192.168.100.0/24, 10.66.99.0/24
Endpoint = 

此时使用 nslookup 指定家里域名和家里 dns 还是提示:DNS request timed out.

519 次点击
所在节点   WireGuard
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1007249

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX