<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Dns on NetUtil</title>
    <link>https://www.netutil.app/zh-hans/tags/dns/</link>
    <description>Recent content in Dns on NetUtil</description>
    <generator>Hugo</generator>
    <language>zh-Hans</language>
    <lastBuildDate>Sat, 16 May 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.netutil.app/zh-hans/tags/dns/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Mac上的nslookup：DNS查询命令及各自的适用场景</title>
      <link>https://www.netutil.app/zh-hans/blog/dns-lookup-mac/</link>
      <pubDate>Sat, 16 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.netutil.app/zh-hans/blog/dns-lookup-mac/</guid>
      <description>&lt;p&gt;您需要检查DNS记录。可能您刚换了托管服务商，想确认域名是否指向了新服务器；可能您的邮件退件了，怀疑是MX记录的问题；或者一个网站加载了错误的内容，您想弄清楚是DNS问题还是其他原因。&lt;/p&gt;&#xA;&lt;p&gt;macOS内置了三个用于DNS查询的终端命令：&lt;code&gt;nslookup&lt;/code&gt;、&lt;code&gt;dig&lt;/code&gt;和&lt;code&gt;host&lt;/code&gt;。它们都查询DNS，但各自以不同的方式呈现结果，适用于不同的场景。&lt;/p&gt;&#xA;&lt;h2 id=&#34;dns查询实际上做了什么&#34;&gt;DNS查询实际上做了什么&lt;/h2&gt;&#xA;&lt;p&gt;当您在浏览器中输入域名时，Mac会询问DNS解析器（通常是您ISP的服务器或公共解析器如1.1.1.1）将该名称转换为IP地址。解析器查找答案，然后您的计算机连接到该IP地址。&lt;/p&gt;&#xA;&lt;p&gt;DNS查询让您可以自己运行这个转换过程并检查结果。您可以看到域名解析到哪个IP地址，哪些邮件服务器处理其邮件，哪些名称服务器对其具有权威性。这涵盖了日常调试的大多数情况。&lt;/p&gt;&#xA;&lt;p&gt;常见的记录类型：&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt;：IPv4地址（最常查询的类型）&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;AAAA&lt;/strong&gt;：IPv6地址&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;MX&lt;/strong&gt;：邮件服务器，含优先级&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;CNAME&lt;/strong&gt;：指向另一个域名的别名&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;TXT&lt;/strong&gt;：文本记录，用于SPF、DKIM、域名验证&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;NS&lt;/strong&gt;：对该域名具有权威性的名称服务器&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;mac上的nslookup熟悉的起点&#34;&gt;Mac上的nslookup：熟悉的起点&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;nslookup&lt;/code&gt;是大多数人首先想到的命令。它存在于每个操作系统上，所以如果您在其他地方做过DNS查询，语法会感觉很熟悉。&lt;/p&gt;&#xA;&lt;h3 id=&#34;基本a记录查询&#34;&gt;基本A记录查询&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:2;-o-tab-size:2;tab-size:2;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nslookup google.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;输出显示回答了查询的DNS服务器以及IP地址。&amp;ldquo;Non-authoritative answer&amp;quot;这一行只是意味着结果来自缓存，而不是域名本身的名称服务器。这是正常的。&lt;/p&gt;&#xA;&lt;h3 id=&#34;查询特定记录类型&#34;&gt;查询特定记录类型&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:2;-o-tab-size:2;tab-size:2;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nslookup -type&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;MX google.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;将&lt;code&gt;MX&lt;/code&gt;替换为任何记录类型：&lt;code&gt;A&lt;/code&gt;、&lt;code&gt;AAAA&lt;/code&gt;、&lt;code&gt;CNAME&lt;/code&gt;、&lt;code&gt;TXT&lt;/code&gt;、&lt;code&gt;NS&lt;/code&gt;、&lt;code&gt;SOA&lt;/code&gt;。例如，检查用于邮件故障排查的SPF和DKIM：&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:2;-o-tab-size:2;tab-size:2;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nslookup -type&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;TXT google.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;查询特定dns服务器&#34;&gt;查询特定DNS服务器&lt;/h3&gt;&#xA;&lt;p&gt;这是&lt;code&gt;nslookup&lt;/code&gt;真正有用的地方。不必向默认解析器提问（它可能有缓存的旧数据），您可以直接向特定服务器查询：&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:2;-o-tab-size:2;tab-size:2;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nslookup google.com 8.8.8.8&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:2;-o-tab-size:2;tab-size:2;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nslookup google.com 1.1.1.1&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;查询多个服务器可以让您看到DNS更改是否已经传播。如果8.8.8.8显示您的新IP但1.1.1.1仍显示旧IP，说明传播仍在进行中。&lt;/p&gt;&#xA;&lt;h3 id=&#34;nslookup交互模式&#34;&gt;nslookup交互模式&lt;/h3&gt;&#xA;&lt;p&gt;不带参数输入&lt;code&gt;nslookup&lt;/code&gt;，您会看到一个提示符。从那里您可以运行多个查询，而无需每次都重新输入命令：&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;gt; set type=MX&#xA;&amp;gt; google.com&#xA;&amp;gt; set type=A&#xA;&amp;gt; example.com&#xA;&amp;gt; exit&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;nslookup&lt;/code&gt;的主要缺点是其输出将信息性消息和实际结果混合在一起。不同记录类型的格式不一致，使其难以一眼看懂。&lt;/p&gt;&#xA;&lt;h2 id=&#34;digmac上dns查询的强力工具&#34;&gt;dig：Mac上DNS查询的强力工具&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;dig&lt;/code&gt;（Domain Information Groper）是经常进行DNS故障排查的系统管理员和开发者的首选工具。其输出结构化且一致，控制选项比&lt;code&gt;nslookup&lt;/code&gt;丰富得多。&lt;/p&gt;&#xA;&lt;h3 id=&#34;基本查询&#34;&gt;基本查询&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:2;-o-tab-size:2;tab-size:2;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dig google.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;输出默认非常详细：您的问题、答案部分、时间以及响应的服务器。在调试时，这些额外信息很有用，因为您可以看到确切返回了什么以及花了多长时间。&lt;/p&gt;&#xA;&lt;h3 id=&#34;使用short获取简洁答案&#34;&gt;使用+short获取简洁答案&lt;/h3&gt;&#xA;&lt;p&gt;当您想要快速得到答案而不需要周围的详细信息时：&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:2;-o-tab-size:2;tab-size:2;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dig google.com +short&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;这只输出IP地址。适合编写脚本或当您只想知道结果时：&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:2;-o-tab-size:2;tab-size:2;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dig google.com MX +short&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;返回带优先级的MX记录，每行一条。&lt;/p&gt;</description>
    </item>
    <item>
      <title>如何在macOS上刷新DNS缓存（Sequoia、Sonoma、Ventura）</title>
      <link>https://www.netutil.app/zh-hans/blog/flush-dns-cache-mac/</link>
      <pubDate>Sat, 16 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.netutil.app/zh-hans/blog/flush-dns-cache-mac/</guid>
      <description>&lt;p&gt;DNS缓存问题很容易被误诊。您更新了域名记录，等待传播完成，然后打开浏览器，旧网站仍然加载。或者曾经能正常访问的网站突然拒绝连接。服务器没问题，您的网络没问题，问题是您的Mac缓存了一个过时的DNS答案，并且仍然在使用它。&lt;/p&gt;&#xA;&lt;p&gt;刷新DNS缓存会告诉macOS忘记那些存储的答案，重新从头开始查询。只需一条命令，大约五秒钟。&lt;/p&gt;&#xA;&lt;h2 id=&#34;为什么mac要缓存dns记录&#34;&gt;为什么Mac要缓存DNS记录&lt;/h2&gt;&#xA;&lt;p&gt;每次您访问网站时，Mac都需要将域名（如&lt;code&gt;example.com&lt;/code&gt;）转换为IP地址。这个转换过程是这样的：Mac首先检查本地DNS缓存，然后询问DNS解析器（通常是您ISP的服务器或公共解析器如1.1.1.1），如果两者都没有答案，解析器会联系该域名的权威名称服务器。&lt;/p&gt;&#xA;&lt;figure class=&#34;blog-svg&#34; role=&#34;img&#34; aria-labelledby=&#34;dns-flow-title dns-flow-desc&#34;&gt;&#xA;  &lt;svg viewBox=&#34;0 0 720 180&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&#xA;       style=&#34;max-width: 100%; height: auto;&#34;&gt;&#xA;    &lt;title id=&#34;dns-flow-title&#34;&gt;DNS resolution flow on macOS&lt;/title&gt;&#xA;    &lt;desc id=&#34;dns-flow-desc&#34;&gt;A four-step diagram showing DNS resolution: Mac checks local cache, then queries DNS resolver, then resolver contacts authoritative server, then IP address is returned to the Mac.&lt;/desc&gt;&#xA;    &lt;style&gt;&#xA;      .dns-label { font-family: -apple-system, system-ui, sans-serif; font-size: 13px; fill: #1d1d1f; text-anchor: middle; }&#xA;      .dns-sublabel { font-family: -apple-system, system-ui, sans-serif; font-size: 11px; fill: #6e6e73; text-anchor: middle; }&#xA;      .dns-box { fill: #F5F5F7; stroke: #D2D2D7; stroke-width: 1.5; }&#xA;      .dns-box-highlight { fill: #E8F4FF; stroke: #007AFF; stroke-width: 1.5; }&#xA;      .dns-arrow { stroke: #8E8E93; stroke-width: 2; fill: none; marker-end: url(#dns-arrow-head); }&#xA;      .dns-return { stroke: #34C759; stroke-width: 1.5; fill: none; stroke-dasharray: 5,3; marker-end: url(#dns-arrow-green); }&#xA;      @media (prefers-color-scheme: dark) {&#xA;        .dns-label { fill: #F5F5F7; }&#xA;        .dns-sublabel { fill: #98989D; }&#xA;        .dns-box { fill: #2C2C2E; stroke: #48484A; }&#xA;        .dns-box-highlight { fill: #1C3A5E; stroke: #0A84FF; }&#xA;      }&#xA;      @media (prefers-reduced-motion: reduce) {&#xA;        .dns-animated { animation: none !important; }&#xA;      }&#xA;      @keyframes fadeIn {&#xA;        from { opacity: 0; transform: translateY(4px); }&#xA;        to { opacity: 1; transform: translateY(0); }&#xA;      }&#xA;      .dns-step1 { animation: fadeIn 0.4s ease-out 0.1s both; }&#xA;      .dns-step2 { animation: fadeIn 0.4s ease-out 0.5s both; }&#xA;      .dns-step3 { animation: fadeIn 0.4s ease-out 0.9s both; }&#xA;      .dns-step4 { animation: fadeIn 0.4s ease-out 1.3s both; }&#xA;      .dns-return-line { animation: fadeIn 0.4s ease-out 1.7s both; }&#xA;    &lt;/style&gt;&#xA;    &lt;defs&gt;&#xA;      &lt;marker id=&#34;dns-arrow-head&#34; markerWidth=&#34;9&#34; markerHeight=&#34;7&#34; refX=&#34;9&#34; refY=&#34;3.5&#34; orient=&#34;auto&#34;&gt;&#xA;        &lt;polygon points=&#34;0 0, 9 3.5, 0 7&#34; fill=&#34;#8E8E93&#34; /&gt;&#xA;      &lt;/marker&gt;&#xA;      &lt;marker id=&#34;dns-arrow-green&#34; markerWidth=&#34;9&#34; markerHeight=&#34;7&#34; refX=&#34;9&#34; refY=&#34;3.5&#34; orient=&#34;auto&#34;&gt;&#xA;        &lt;polygon points=&#34;0 0, 9 3.5, 0 7&#34; fill=&#34;#34C759&#34; /&gt;&#xA;      &lt;/marker&gt;&#xA;    &lt;/defs&gt;&#xA;    &lt;!-- Box 1: Mac --&gt;&#xA;    &lt;g class=&#34;dns-step1&#34;&gt;&#xA;      &lt;rect x=&#34;20&#34; y=&#34;50&#34; width=&#34;120&#34; height=&#34;70&#34; rx=&#34;10&#34; class=&#34;dns-box-highlight&#34; /&gt;&#xA;      &lt;text x=&#34;80&#34; y=&#34;82&#34; class=&#34;dns-label&#34; font-weight=&#34;600&#34;&gt;Your Mac&lt;/text&gt;&#xA;      &lt;text x=&#34;80&#34; y=&#34;99&#34; class=&#34;dns-sublabel&#34;&gt;local DNS cache&lt;/text&gt;&#xA;    &lt;/g&gt;&#xA;    &lt;!-- Arrow 1→2 --&gt;&#xA;    &lt;g class=&#34;dns-step2&#34;&gt;&#xA;      &lt;line x1=&#34;141&#34; y1=&#34;85&#34; x2=&#34;189&#34; y2=&#34;85&#34; class=&#34;dns-arrow&#34; /&gt;&#xA;    &lt;/g&gt;&#xA;    &lt;!-- Box 2: DNS Resolver --&gt;&#xA;    &lt;g class=&#34;dns-step2&#34;&gt;&#xA;      &lt;rect x=&#34;190&#34; y=&#34;50&#34; width=&#34;140&#34; height=&#34;70&#34; rx=&#34;10&#34; class=&#34;dns-box&#34; /&gt;&#xA;      &lt;text x=&#34;260&#34; y=&#34;82&#34; class=&#34;dns-label&#34; font-weight=&#34;600&#34;&gt;DNS Resolver&lt;/text&gt;&#xA;      &lt;text x=&#34;260&#34; y=&#34;99&#34; class=&#34;dns-sublabel&#34;&gt;1.1.1.1 or ISP&lt;/text&gt;&#xA;    &lt;/g&gt;&#xA;    &lt;!-- Arrow 2→3 --&gt;&#xA;    &lt;g class=&#34;dns-step3&#34;&gt;&#xA;      &lt;line x1=&#34;331&#34; y1=&#34;85&#34; x2=&#34;379&#34; y2=&#34;85&#34; class=&#34;dns-arrow&#34; /&gt;&#xA;    &lt;/g&gt;&#xA;    &lt;!-- Box 3: Authoritative NS --&gt;&#xA;    &lt;g class=&#34;dns-step3&#34;&gt;&#xA;      &lt;rect x=&#34;380&#34; y=&#34;50&#34; width=&#34;150&#34; height=&#34;70&#34; rx=&#34;10&#34; class=&#34;dns-box&#34; /&gt;&#xA;      &lt;text x=&#34;455&#34; y=&#34;82&#34; class=&#34;dns-label&#34; font-weight=&#34;600&#34;&gt;Authoritative NS&lt;/text&gt;&#xA;      &lt;text x=&#34;455&#34; y=&#34;99&#34; class=&#34;dns-sublabel&#34;&gt;holds real records&lt;/text&gt;&#xA;    &lt;/g&gt;&#xA;    &lt;!-- Arrow 3→4 (IP back) --&gt;&#xA;    &lt;g class=&#34;dns-step4&#34;&gt;&#xA;      &lt;line x1=&#34;531&#34; y1=&#34;85&#34; x2=&#34;579&#34; y2=&#34;85&#34; class=&#34;dns-arrow&#34; /&gt;&#xA;    &lt;/g&gt;&#xA;    &lt;!-- Box 4: IP result --&gt;&#xA;    &lt;g class=&#34;dns-step4&#34;&gt;&#xA;      &lt;rect x=&#34;580&#34; y=&#34;50&#34; width=&#34;120&#34; height=&#34;70&#34; rx=&#34;10&#34; class=&#34;dns-box&#34; /&gt;&#xA;      &lt;text x=&#34;640&#34; y=&#34;82&#34; class=&#34;dns-label&#34; font-weight=&#34;600&#34;&gt;IP Address&lt;/text&gt;&#xA;      &lt;text x=&#34;640&#34; y=&#34;99&#34; class=&#34;dns-sublabel&#34;&gt;returned to Mac&lt;/text&gt;&#xA;    &lt;/g&gt;&#xA;    &lt;!-- Return path (dashed green) --&gt;&#xA;    &lt;g class=&#34;dns-return-line&#34;&gt;&#xA;      &lt;path d=&#34;M 640 120 Q 640 155 360 155 Q 80 155 80 121&#34; class=&#34;dns-return&#34; /&gt;&#xA;      &lt;text x=&#34;360&#34; y=&#34;170&#34; class=&#34;dns-sublabel&#34; fill=&#34;#34C759&#34;&gt;cached for future lookups&lt;/text&gt;&#xA;    &lt;/g&gt;&#xA;  &lt;/svg&gt;&#xA;  &lt;figcaption&gt;macOS在本地缓存DNS答案，以便在重复访问时跳过整个查询链。当记录更改时，缓存可能会提供过时的数据。&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;缓存通常是好事。它能加快浏览速度，因为您的Mac可以跳过最近访问过的网站的整个查询链。问题出现在DNS记录更改时，Mac缓存的答案仍然指向旧目的地。DNS记录上的TTL（存活时间）告诉解析器缓存多长时间，但macOS并不总是精确遵守它。&lt;/p&gt;</description>
    </item>
    <item>
      <title>如何在Mac上更改DNS设置</title>
      <link>https://www.netutil.app/zh-hans/blog/change-dns-mac/</link>
      <pubDate>Sat, 16 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.netutil.app/zh-hans/blog/change-dns-mac/</guid>
      <description>&lt;p&gt;您的网络连接默认使用ISP的DNS服务器。您从未选择过它们，可能也不知道它们的地址，而且它们的速度、隐私性或安全性可能不如其他替代方案。在Mac上更改DNS大约只需两分钟，而且能带来明显的改善。&lt;/p&gt;&#xA;&lt;h2 id=&#34;为什么要更换dns服务器&#34;&gt;为什么要更换DNS服务器&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;速度。&lt;/strong&gt; ISP的DNS服务器通常未经过优化。Cloudflare和Google专门为低延迟而大规模运营DNS基础设施。在许多地区，切换到公共DNS解析器可以加快页面加载速度，因为连接网站时的DNS解析步骤会更快完成。&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;隐私。&lt;/strong&gt; 您的DNS提供商可以看到您访问的每个域名。您ISP的DNS日志可以由其保留或出售，这取决于其隐私政策和当地法规。Cloudflare的1.1.1.1明确声明不记录查询IP地址，且该承诺经过第三方审计。&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;安全性。&lt;/strong&gt; Quad9（9.9.9.9）会将DNS查询与威胁情报数据库进行交叉核对。如果您尝试访问已知的恶意软件或钓鱼网站，Quad9会在您的浏览器建立连接之前就阻止该查询。&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;家长控制。&lt;/strong&gt; Cloudflare的1.1.1.3在DNS层面屏蔽成人内容。Google也提供类似的过滤选项。这不是完美的保护措施，但无需在设备上安装任何软件即可生效。&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;地理限制内容。&lt;/strong&gt; 某些DNS提供商通往内容分发网络的路径更快。少数专业DNS服务（如NextDNS）还提供管理访问的功能。单纯更改DNS无法像VPN那样突破访问限制，但在某些情况下可以改善路由。&lt;/p&gt;&#xA;&lt;h2 id=&#34;dns的实际工作原理&#34;&gt;DNS的实际工作原理&lt;/h2&gt;&#xA;&lt;p&gt;当您在浏览器中输入域名时，Mac会询问DNS服务器该域名对应的IP地址。通常这个请求会发送到您ISP的服务器。如果您更改了DNS设置，请求就会发送到您选择的服务器。&lt;/p&gt;&#xA;&lt;figure class=&#34;blog-svg&#34; role=&#34;img&#34; aria-labelledby=&#34;dns-svg-title dns-svg-desc&#34;&gt;&#xA;  &lt;svg viewBox=&#34;0 0 700 260&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34; style=&#34;max-width: 100%; height: auto;&#34;&gt;&#xA;    &lt;title id=&#34;dns-svg-title&#34;&gt;Custom DNS vs ISP DNS routing&lt;/title&gt;&#xA;    &lt;desc id=&#34;dns-svg-desc&#34;&gt;Two paths showing DNS resolution. The top path shows your Mac going through ISP DNS to the internet. The bottom path shows your Mac going through a custom DNS resolver to the internet. The custom path is highlighted in blue.&lt;/desc&gt;&#xA;    &lt;style&gt;&#xA;      .svg-label { font-family: -apple-system, system-ui, sans-serif; font-size: 13px; fill: #1d1d1f; }&#xA;      .svg-sublabel { font-family: -apple-system, system-ui, sans-serif; font-size: 11px; fill: #6e6e73; }&#xA;      .svg-path-label { font-family: -apple-system, system-ui, sans-serif; font-size: 12px; font-weight: 600; }&#xA;      .box-default { fill: #F5F5F7; stroke: #D2D2D7; stroke-width: 1.5; }&#xA;      .box-highlight { fill: #E8F0FF; stroke: #007AFF; stroke-width: 1.5; }&#xA;      .box-isp { fill: #FFF3F3; stroke: #FF3B30; stroke-width: 1.5; }&#xA;      .box-inet { fill: #F5F5F7; stroke: #D2D2D7; stroke-width: 1.5; }&#xA;      .arrow-default { stroke: #8E8E93; stroke-width: 2; fill: none; }&#xA;      .arrow-highlight { stroke: #007AFF; stroke-width: 2; fill: none; }&#xA;      .arrow-isp { stroke: #FF3B30; stroke-width: 2; fill: none; stroke-dasharray: 6 3; }&#xA;      .divider { stroke: #D2D2D7; stroke-width: 1; stroke-dasharray: 4 4; }&#xA;      @media (prefers-color-scheme: dark) {&#xA;        .svg-label { fill: #F5F5F7; }&#xA;        .svg-sublabel { fill: #8E8E93; }&#xA;        .box-default { fill: #2C2C2E; stroke: #48484A; }&#xA;        .box-highlight { fill: #1C2E4A; stroke: #0A84FF; }&#xA;        .box-isp { fill: #3A1C1C; stroke: #FF453A; }&#xA;      }&#xA;      @media (prefers-reduced-motion: reduce) {&#xA;        .fade-in { animation: none !important; opacity: 1 !important; }&#xA;      }&#xA;      .fade-in-1 { animation: fadeIn 0.4s ease-out 0.2s both; }&#xA;      .fade-in-2 { animation: fadeIn 0.4s ease-out 0.6s both; }&#xA;      .fade-in-3 { animation: fadeIn 0.4s ease-out 1.0s both; }&#xA;      .fade-in-4 { animation: fadeIn 0.4s ease-out 1.4s both; }&#xA;      @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }&#xA;    &lt;/style&gt;&#xA;    &lt;defs&gt;&#xA;      &lt;marker id=&#34;arrow-gray&#34; markerWidth=&#34;8&#34; markerHeight=&#34;6&#34; refX=&#34;8&#34; refY=&#34;3&#34; orient=&#34;auto&#34;&gt;&#xA;        &lt;polygon points=&#34;0 0, 8 3, 0 6&#34; fill=&#34;#8E8E93&#34;/&gt;&#xA;      &lt;/marker&gt;&#xA;      &lt;marker id=&#34;arrow-blue&#34; markerWidth=&#34;8&#34; markerHeight=&#34;6&#34; refX=&#34;8&#34; refY=&#34;3&#34; orient=&#34;auto&#34;&gt;&#xA;        &lt;polygon points=&#34;0 0, 8 3, 0 6&#34; fill=&#34;#007AFF&#34;/&gt;&#xA;      &lt;/marker&gt;&#xA;      &lt;marker id=&#34;arrow-red&#34; markerWidth=&#34;8&#34; markerHeight=&#34;6&#34; refX=&#34;8&#34; refY=&#34;3&#34; orient=&#34;auto&#34;&gt;&#xA;        &lt;polygon points=&#34;0 0, 8 3, 0 6&#34; fill=&#34;#FF3B30&#34;/&gt;&#xA;      &lt;/marker&gt;&#xA;    &lt;/defs&gt;&#xA;    &lt;!-- Row labels --&gt;&#xA;    &lt;text x=&#34;16&#34; y=&#34;80&#34; class=&#34;svg-path-label&#34; style=&#34;fill: #8E8E93;&#34;&gt;默认&lt;/text&gt;&#xA;    &lt;text x=&#34;16&#34; y=&#34;185&#34; class=&#34;svg-path-label&#34; style=&#34;fill: #007AFF;&#34;&gt;自定义DNS&lt;/text&gt;&#xA;    &lt;!-- Divider --&gt;&#xA;    &lt;line x1=&#34;10&#34; y1=&#34;130&#34; x2=&#34;690&#34; y2=&#34;130&#34; class=&#34;divider&#34;/&gt;&#xA;    &lt;!-- ===== TOP ROW: Default / ISP DNS ===== --&gt;&#xA;    &lt;!-- Mac box --&gt;&#xA;    &lt;rect x=&#34;100&#34; y=&#34;52&#34; width=&#34;90&#34; height=&#34;50&#34; rx=&#34;8&#34; class=&#34;box-default fade-in-1&#34;/&gt;&#xA;    &lt;text x=&#34;145&#34; y=&#34;74&#34; text-anchor=&#34;middle&#34; class=&#34;svg-label fade-in-1&#34;&gt;Your Mac&lt;/text&gt;&#xA;    &lt;!-- Arrow: Mac -&gt; ISP DNS --&gt;&#xA;    &lt;line x1=&#34;190&#34; y1=&#34;77&#34; x2=&#34;278&#34; y2=&#34;77&#34; class=&#34;arrow-isp fade-in-1&#34; marker-end=&#34;url(#arrow-red)&#34;/&gt;&#xA;    &lt;!-- ISP DNS box --&gt;&#xA;    &lt;rect x=&#34;280&#34; y=&#34;52&#34; width=&#34;110&#34; height=&#34;50&#34; rx=&#34;8&#34; class=&#34;box-isp fade-in-2&#34;/&gt;&#xA;    &lt;text x=&#34;335&#34; y=&#34;72&#34; text-anchor=&#34;middle&#34; class=&#34;svg-label fade-in-2&#34;&gt;ISP DNS&lt;/text&gt;&#xA;    &lt;text x=&#34;335&#34; y=&#34;90&#34; text-anchor=&#34;middle&#34; class=&#34;svg-sublabel fade-in-2&#34;&gt;logs your queries&lt;/text&gt;&#xA;    &lt;!-- Arrow: ISP DNS -&gt; Internet --&gt;&#xA;    &lt;line x1=&#34;390&#34; y1=&#34;77&#34; x2=&#34;478&#34; y2=&#34;77&#34; class=&#34;arrow-isp fade-in-2&#34; marker-end=&#34;url(#arrow-red)&#34;/&gt;&#xA;    &lt;!-- Internet box --&gt;&#xA;    &lt;rect x=&#34;480&#34; y=&#34;52&#34; width=&#34;90&#34; height=&#34;50&#34; rx=&#34;8&#34; class=&#34;box-inet fade-in-3&#34;/&gt;&#xA;    &lt;text x=&#34;525&#34; y=&#34;81&#34; text-anchor=&#34;middle&#34; class=&#34;svg-label fade-in-3&#34;&gt;Internet&lt;/text&gt;&#xA;    &lt;!-- ===== BOTTOM ROW: Custom DNS ===== --&gt;&#xA;    &lt;!-- Mac box --&gt;&#xA;    &lt;rect x=&#34;100&#34; y=&#34;158&#34; width=&#34;90&#34; height=&#34;50&#34; rx=&#34;8&#34; class=&#34;box-highlight fade-in-1&#34;/&gt;&#xA;    &lt;text x=&#34;145&#34; y=&#34;180&#34; text-anchor=&#34;middle&#34; class=&#34;svg-label fade-in-1&#34;&gt;Your Mac&lt;/text&gt;&#xA;    &lt;!-- Arrow: Mac -&gt; Custom DNS --&gt;&#xA;    &lt;line x1=&#34;190&#34; y1=&#34;183&#34; x2=&#34;278&#34; y2=&#34;183&#34; class=&#34;arrow-highlight fade-in-1&#34; marker-end=&#34;url(#arrow-blue)&#34;/&gt;&#xA;    &lt;!-- Custom DNS box --&gt;&#xA;    &lt;rect x=&#34;280&#34; y=&#34;158&#34; width=&#34;110&#34; height=&#34;50&#34; rx=&#34;8&#34; class=&#34;box-highlight fade-in-2&#34;/&gt;&#xA;    &lt;text x=&#34;335&#34; y=&#34;178&#34; text-anchor=&#34;middle&#34; class=&#34;svg-label fade-in-2&#34;&gt;Custom DNS&lt;/text&gt;&#xA;    &lt;text x=&#34;335&#34; y=&#34;196&#34; text-anchor=&#34;middle&#34; class=&#34;svg-sublabel fade-in-2&#34;&gt;1.1.1.1 / 8.8.8.8 / 9.9.9.9&lt;/text&gt;&#xA;    &lt;!-- Arrow: Custom DNS -&gt; Internet --&gt;&#xA;    &lt;line x1=&#34;390&#34; y1=&#34;183&#34; x2=&#34;478&#34; y2=&#34;183&#34; class=&#34;arrow-highlight fade-in-3&#34; marker-end=&#34;url(#arrow-blue)&#34;/&gt;&#xA;    &lt;!-- Internet box --&gt;&#xA;    &lt;rect x=&#34;480&#34; y=&#34;158&#34; width=&#34;90&#34; height=&#34;50&#34; rx=&#34;8&#34; class=&#34;box-inet fade-in-3&#34;/&gt;&#xA;    &lt;text x=&#34;525&#34; y=&#34;187&#34; text-anchor=&#34;middle&#34; class=&#34;svg-label fade-in-3&#34;&gt;Internet&lt;/text&gt;&#xA;  &lt;/svg&gt;&#xA;  &lt;figcaption&gt;使用自定义DNS后，您的查询会发送到您选择的解析器，而不是ISP的默认服务器。&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;默认情况下，此更改会影响全系统，包括所有应用和浏览器。DNS配置位于&amp;quot;网络&amp;quot;设置中，而不在任何浏览器内部。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
