Technical Anshu
Tutorials Blog
📱 设备修复

一台设备忽略每台设备 DNS 设置的 Pi-hole 以及如何修复它们

事实证明,仪表板的屏蔽功能是有效的——除了在一部手机上,广告未受影响。具有一台反叛设备的网络范围系统几乎总是意味着该设备根本不询问 Pi-hole。本指南探寻问题的真正所在。

✍️ Technical Anshu🐧 Ubuntu / Pi-hole⏱️ 9 minute read
🎥 🎥 网络端设置视频 me pakka kar lo — ye ladai us ek device ki settings se hai

Pi-hole 只能过滤它收到的问题。如果一台设备仍然显示广告,而房子的其他部分都干净,则该设备的 DNS 请求将发送到其他地方 - 设备本身的设置会覆盖网络指令。 There is a short list of usual suspects, and they differ by device type.按此顺序检查它们,并确认 Pi-hole 查询日志中的每个修复,其中设备的问题应在覆盖被删除时开始出现。

Pi-hole Dashboard — Query Log filtered by one client
Before the fix: (no entries from phone at all - it never asks Pi-hole) After the fix: 11:03:52 phone www.example.com OK (cached) 11:03:52 phone ads.example-network Blocked (gravity)
👆 决定性测试:如果设备从未出现在日志中,则它正在询问其他人。缺席就是诊断(插图面板)
1

Prove the Device Is Bypassing — Check the Query Log

在接触任何设置之前,先获取证据。按该设备过滤仪表板的查询日志并使用它一分钟。两种结果:根本没有条目 - 设备从不询问 Pi-hole,并且本指南的其余部分适用; or entries appear but nothing is blocked — a different problem (the domains it visits are first-party, covered in the limits guide).大多数单设备谜团都是第一类。

2

在设备本身上手动设置 DNS

在某些时候(过去的故障排除会话、“加快互联网速度”提示),该设备可能已在其 Wi-Fi 或网络设置中获得了手动 DNS,例如 8.8.8.8。手动设置每次都胜过 DHCP 指令。打开家庭网络的设备网络设置,并将 DNS 设置回自动(或故意设置为 Pi-hole 地址)。如果设置无法清除,请忘记并重新加入网络。

3

Android 私有 DNS——现代常见的嫌疑人

Android 手机具有私有 DNS 功能,可通过加密连接将查询发送到其自己的提供商,完全超越 Pi-hole。 If it is set to a hostname (your own, an ad-blocking provider's, or one an app configured), Pi-hole sees nothing.根据您的家庭网络期望将专用 DNS 设置为关闭或自动 - 在大多数情况下,自动通过标准路由使用网络的 DNS。 This single setting explains a large share of 'works on my laptop, not on my phone' reports.

4

浏览器有自己的 DNS

Modern browsers can resolve names themselves using DNS over HTTPS, ignoring the system and the network entirely.如果广告出现在一种浏览器中,但设备的应用程序被过滤,请检查浏览器的隐私设置中的“安全 DNS”或“使用安全 DNS”,并将其设置为使用系统/网络解析器(或禁用它)。这同样适用于某些 VPN 和“加速器”应用程序 — 当它们运行时,它们通过自己的隧道传输所有流量(包括 DNS)。

5

IPv6——侧门

如果您的路由器提供 IPv6,设备可能会通过 IPv6 从路由器或提供商接收 DNS 指令,与您的 IPv4 Pi-hole 设置并行 - 并优先使用它们。诚实的选择:也在路由器的 IPv6 DNS 设置中配置 Pi-hole 地址(并​​为 Pi-hole 机器提供稳定的 IPv6 地址),或者,如果您不故意使用 IPv6,请在路由器中禁用 IPv6 DNS 广告/LAN IPv6。半配置的 IPv6 是阻止似乎“仅有时”起作用的一个典型原因。

🟠 不要忘记访客网络和辅助网络:加入路由器的访客网络或第二个 SSID 的设备可能会收到与主网络不同的 DNS 指令。如果反叛设备是访客的手机,它可能根本就没有损坏——它只是位于一个你从未指向 Pi-hole 的网络上。

🎥 观看完整的 Pi-hole 安装视频

Device theek karne ke baad pura network ek baar video ke setup se mila kar confirm kar lo.

▶️ Watch Full Video
❓ 常见问题(FAQ)

为什么 Pi-hole 在我的笔记本电脑上会被阻塞,而在我的手机上却不会?

The phone is almost certainly not asking Pi-hole.常见原因是手机上保存了手动 DNS、Android 的私有 DNS 功能将查找发送到其自己的提供商,或者手机使用来自路由器的 IPv6 DNS。 The query log test on this page tells you which hunt to start.

什么是 Android 私有 DNS?是否应该关闭它?

Private DNS encrypts DNS lookups and sends them to a provider you choose in Android settings. It is a legitimate privacy feature, but while it points at an outside provider, Pi-hole receives nothing from that phone and cannot filter it. Set it to Off or Automatic at home if you want Pi-hole to do the filtering.

一种浏览器会显示广告,但其他所有内容都会被过滤。为什么?

That browser is probably resolving names itself via DNS over HTTPS, bypassing both the device settings and Pi-hole. Change the browser's secure DNS setting to use the system or network resolver, and its queries will flow through Pi-hole like everything else.

本指南基于 Technical Anshu 的 Ubuntu 视频 Pi-hole • 卡在某个步骤上?在视频评论中提问——这是最快得到答案的地方🙏