V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
jqbbbbb123
V2EX  ?  WireGuard

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

  •  1
     
  •   jqbbbbb123 · 110 天前 · 359 次点击
    这是一个创建于 110 天前的主题,其中的信息可能已经有所发展或是发生改变。

    腾讯云最新优惠活动来了:云产品限时1折,云服务器低至88元/年 ,点击这里立即抢购:9i0i.cn/qcloud,更有2860元代金券免费领取,付款直接抵现金用,点击这里立即领取:9i0i.cn/qcloudquan

    (福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

    我在家里的内网部署了 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.

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   958 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:28 · PVG 04:28 · LAX 13:28 · JFK 16:28
    Developed with CodeLauncher
    ? Do have faith in what you're doing.


    http://www.vxiaotou.com