【问题标题】:Accessing the PiHole DNS Service over the Wireguard Tunnel not possible?无法通过 Wireguard 隧道访问 PiHole DNS 服务?
【发布时间】:2021-01-09 00:22:10
【问题描述】:

我已经开始通过 WireGuard 设置我自己的 VPN 服务,它可以很好地配合以下...

配置 (工作中)

Client

[Interface]
PrivateKey = *hidden*
Address = 10.6.0.2/24
DNS = 1.1.1.1

[Peer]
PublicKey = *hidden*
PresharedKey = *hidden*
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = vpn.myserver.net:51820

我已将 AllowedIPs (IPv4) 设置为 0.0.0.0/0 允许客户端路由 他通过服务器的 DNS 请求,同时防止 DNS 泄漏。


我的PiHole 服务 使用eth0 接口,而Wireguard 使用它自己的称为wg0
Pihole (DNS)的私有IPv4为10.0.0.5服务器网关10.0.0.1

配置 (目前不工作)

Client

[Interface]
PrivateKey = *hidden*
Address = 10.6.0.2/24
DNS = 10.0.0.5

[Peer]
PublicKey = *hidden*
PresharedKey = *hidden*
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = vpn.myserver.net:51820

感谢在此问题下发布的任何想法和提示,很高兴 评论:)

【问题讨论】:

    标签: installation dns routes vpn wireguard


    【解决方案1】:

    对于所有在未来阅读本文的人......

    我已经找到问题并解决了。


    但首先,我做了什么?

    • 我仔细检查了孔洞 通过询问 Google 的 DNS IP 来运行和工作

      nslookup google.com 10.0.0.5

    这给了我输出

    Server:     10.0.0.5
    Address:    10.0.0.5#53
    
    Non-authoritative answer:
    Name:   google.de
    Address: 216.58.212.163
    

    在这里,我看到了我的 DNS 地址 10.0.0.5#53,特别注意到了 端口 53,这显然是标准 DNS 端口

    • 所以我问自己是否允许在我的 ufw(防火墙)中使用此端口并运行以下命令

      sudo ufw status verbose

    这给了我输出

    To                         Action      From
    --                         ------      ----
    51820/udp                  ALLOW IN    Anywhere
    22                         ALLOW IN    Anywhere
    51820/udp (v6)             ALLOW IN    Anywhere (v6)
    22 (v6)                    ALLOW IN    Anywhere (v6)
    
    Anywhere on eth0           ALLOW FWD   10.6.0.0/24 on wg0
    

    在这里我终于看到,端口 53 不允许从网络外部访问

    ... 哈哈 ...

    所以我启动了命令sudo ufw allow 53,然后我的 WireGuard PiHole DNS 开始工作了 :)


    我希望这对解决相同问题的任何人都有帮助。 ~干杯

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-11
      • 1970-01-01
      • 2014-12-15
      • 2010-11-17
      • 1970-01-01
      相关资源
      最近更新 更多