<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DNS &#8211; Eternal Center</title>
	<atom:link href="https://eternalcenter-sep-2022.github.io/category/service/other-service/dns/feed/" rel="self" type="application/rss+xml" />
	<link>https://eternalcenter-sep-2022.github.io/</link>
	<description></description>
	<lastBuildDate>Wed, 10 Aug 2022 15:08:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>[内容] /etc/resolv.conf 配置文件的 search 选项</title>
		<link>https://eternalcenter-sep-2022.github.io/etc-resolv-conf-search/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 10 Aug 2022 15:07:19 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Setting (系统设置)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=27527</guid>

					<description><![CDATA[内容一：测试 search 选项的配置 内容二：测试 search 选项 2.1 查询 zhumingyu （补充：当查询 zhumingyu 时，也就是中间没有点 “.”，则默认会被视为查询主机名，会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询，最后才查询 zhumingyu） 2.2 zhumingyu.com （补充：当查询 zhumingyu.com 时，也就是中间有 1 个点 “.”，则默认会被视为查询域名，会先查询 mingyuzhu.com，如果查询失败，则会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询） 2.3 查询 zhumingyu.com. （补充：当查询 zhumingyu.com. 时，也就是末尾有 1 个点 “.”，默认会被视为查询域名，且只会查询这个域名。不会查询 search 里的每 1 项）]]></description>
										<content:encoded><![CDATA[
<h3>内容一：测试 search 选项的配置</h3>



<pre class="wp-block-code"><code># cat /etc/resolv.conf
search eternalcenter.com local new
nameserver 8.8.8.8</code></pre>



<h3>内容二：测试 search 选项</h3>



<h4>2.1 查询 zhumingyu</h4>



<pre class="wp-block-code"><code># host -a zhumingyu
Trying "zhumingyu.eternalcenter.com"
Trying "zhumingyu.local"
Trying "zhumingyu.new"
Trying "zhumingyu"
Host zhumingyu not found: 3(NXDOMAIN)
Received 102 bytes from 8.8.8.8#53 in 62 ms</code></pre>



<p>（补充：当查询 zhumingyu 时，也就是中间没有点 “.”，则默认会被视为查询主机名，会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询，最后才查询 zhumingyu）</p>



<h4>2.2 zhumingyu.com</h4>



<pre class="wp-block-code"><code># host -a zhumingyu.com
Trying "zhumingyu.com"
Received 31 bytes from 1.1.1.1#53 in 217 ms
Trying "zhumingyu.com.eternalcenter.com"
Trying "zhumingyu.com.local"
Trying "zhumingyu.com.new"
Host zhumingyu.com.new not found: 4(NOTIMP)
Received 35 bytes from 1.1.1.1#53 in 218 ms</code></pre>



<p>（补充：当查询 zhumingyu.com 时，也就是中间有 1 个点 “.”，则默认会被视为查询域名，会先查询 mingyuzhu.com，如果查询失败，则会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询）</p>



<h4>2.3 查询 zhumingyu.com.</h4>



<pre class="wp-block-code"><code># host -a zhumingyu.com.
Trying "zhumingyu.com"
Host zhumingyu.com not found: 4(NOTIMP)
Received 31 bytes from 1.1.1.1#53 in 204 ms
Received 31 bytes from 1.1.1.1#53 in 204 ms</code></pre>



<p>（补充：当查询 zhumingyu.com. 时，也就是末尾有 1 个点 “.”，默认会被视为查询域名，且只会查询这个域名。不会查询 search 里的每 1 项）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 dig （从 DNS 服务器获取主机信息）</title>
		<link>https://eternalcenter-sep-2022.github.io/dig/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 29 Jul 2022 08:22:42 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=27453</guid>

					<description><![CDATA[内容一：dig 命令简介 dig 即 domain information groper，主要功能是从 DNS 服务器获取主机信息 内容二：dig 命令的使用案例 2.1 案例一：显示互联网上所有 DNS 根服务器的信息 2.2 案例二：直接通过域名获取主机信息 （补充：这里以通过 eternalcenter.com 域名获取主机信息为例） 2.3 案例三：直接通过域名获取主机信息，但只显示最基础的内容 （补充：这里以通过 eternalcenter.com 域名获取主机信息为例） 2.4 案例四：直接通过域名获取主机信息，并指定显示的内容 （补充：这里以通过 eternalcenter.com 域名获取主机信息，并显示 noall 和 answer 部分的内容为例） 2.5 案例五：从指定的 DNS 服务器和端口号通过域名获取主机信息 （补充：这里以通过 eternalcenter.com 域名从 IP 地址是 8.8.8.8 端口是 53 的 DNS 服务器获取主机信息为例） 2.6 案例六：通过 IP 地址获取主机信息 （补充：这里以通过 IP &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/dig/" class="more-link">Continue reading<span class="screen-reader-text"> "[命令] Linux 命令 dig （从 DNS 服务器获取主机信息）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>内容一：dig 命令简介</h3>



<p>dig 即 domain information groper，主要功能是从 DNS 服务器获取主机信息</p>



<h3>内容二：dig 命令的使用案例</h3>



<h4>2.1 案例一：显示互联网上所有 DNS 根服务器的信息</h4>



<pre class="wp-block-code"><code># dig</code></pre>



<h4>2.2 案例二：直接通过域名获取主机信息</h4>



<pre class="wp-block-code"><code># dig eternalcenter.com</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名获取主机信息为例）</p>



<h4>2.3 案例三：直接通过域名获取主机信息，但只显示最基础的内容</h4>



<pre class="wp-block-code"><code># dig eternalcenter.com +short</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名获取主机信息为例）</p>



<h4>2.4 案例四：直接通过域名获取主机信息，并指定显示的内容</h4>



<pre class="wp-block-code"><code># dig eternalcenter.com +noall +answer</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名获取主机信息，并显示 noall 和 answer 部分的内容为例）</p>



<h4>2.5 案例五：从指定的 DNS 服务器和端口号通过域名获取主机信息</h4>



<pre class="wp-block-code"><code># dig @8.8.8.8 -p 53 eternalcenter.com</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名从 IP 地址是 8.8.8.8 端口是 53 的 DNS 服务器获取主机信息为例）</p>



<h4>2.6 案例六：通过 IP 地址获取主机信息</h4>



<pre class="wp-block-code"><code># dig -x 8.8.8.8</code></pre>



<p>（补充：这里以通过 IP 地址 8.8.8.8 获取主机信息为例）</p>



<h4>2.7 案例七：通过 IP 地址获得主机信息，但只显示最基础的内容</h4>



<pre class="wp-block-code"><code># dig -x 8.8.8.8  +short</code></pre>



<p>（补充：这里以通过 IP 地址 8.8.8.8 获取主机信息为例）</p>



<h4>2.8 案例八：直接通过域名获取主机信息，同时显示获取的过程</h4>



<pre class="wp-block-code"><code># dig eternalcenter.com +trace</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名获取主机信息为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] 全球公共免费 DNS</title>
		<link>https://eternalcenter-sep-2022.github.io/free-dns/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 14 Apr 2022 15:24:23 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Setting (系统设置)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23164</guid>

					<description><![CDATA[AdGuard Cloudflare COMODO DNS Watch Dyn Level 3 Neustar FreeDNS Google OpenDNS SAFEDNS Symantec]]></description>
										<content:encoded><![CDATA[
<h3>AdGuard</h3>



<pre class="wp-block-code"><code>94.140.14.14
94.140.14.15
94.140.15.15
94.140.15.16</code></pre>



<h3>Cloudflare</h3>



<pre class="wp-block-code"><code>1.0.0.1
1.0.0.2
1.0.0.3
1.1.1.1
1.1.1.2
1.1.1.3</code></pre>



<h3>COMODO</h3>



<pre class="wp-block-code"><code>8.20.247.20
8.26.56.26</code></pre>



<h3>DNS Watch</h3>



<pre class="wp-block-code"><code>84.200.69.80
84.200.70.40</code></pre>



<h3>Dyn</h3>



<pre class="wp-block-code"><code>216.146.35.35
216.146.36.36</code></pre>



<h3>Level 3</h3>



<pre class="wp-block-code"><code>209.244.0.3
209.244.0.4</code></pre>



<h3>Neustar</h3>



<pre class="wp-block-code"><code>156.154.70.1
156.154.71.1</code></pre>



<h3>FreeDNS</h3>



<pre class="wp-block-code"><code>37.235.1.174
37.235.1.177</code></pre>



<h3>Google</h3>



<pre class="wp-block-code"><code>8.8.4.4
8.8.8.8</code></pre>



<h3>OpenDNS</h3>



<pre class="wp-block-code"><code>208.67.220.220
208.67.222.222</code></pre>



<h3>SAFEDNS</h3>



<pre class="wp-block-code"><code>195.46.39.39
195.46.39.40</code></pre>



<h3>Symantec</h3>



<pre class="wp-block-code"><code>199.85.126.10
199.85.137.10</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] DNS 客户端的设置 （Linux 版）</title>
		<link>https://eternalcenter-sep-2022.github.io/dns-client/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 16 Jul 2020 12:14:07 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=10066</guid>

					<description><![CDATA[内容一：设置 DNS 客户端 1.1 直接在本地指定域名 1.1.1 直接在本地指定域名的方法 添加以下内容： （注意：/etc/hosts 里记录的 DNS 优先级要比 /etc/resolv.conf 里的高） 1.1.2 直接在本地指定域名的案例 添加以下内容： （补充：这里以将 192.154.240.64 解析为 eternalcenter.com 为例） （注意：/etc/hosts 里记录的 DNS 优先级要比 /etc/resolv.conf 里的高） 1.2 使用远程的 DNS 服务器解析域名 1.2.1 使用远程的 DNS 服务器解析域名 1.2.1.1 使用远程的 DNS 服务器解析域名的方法 1.2.1.1.1 直接修改 /etc/resolv.conf 文件 添加以下内容： （注意：/etc/hosts 里记录的 DNS 优先级要比 /etc/resolv.conf 里的高） 1.2.1.1.2 使用 nmcli 命令 &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/dns-client/" class="more-link">Continue reading<span class="screen-reader-text"> "[内容] DNS 客户端的设置 （Linux 版）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3 id="内容一-设置-dns-客户端1-1-直接在本地指定域名1-1-1-直接在本地指定域名的方法">内容一：设置 DNS 客户端</h3>



<h4 id="内容一-设置-dns-客户端1-1-直接在本地指定域名1-1-1-直接在本地指定域名的方法">1.1 直接在本地指定域名</h4>



<h5 id="内容一-设置-dns-客户端1-1-直接在本地指定域名1-1-1-直接在本地指定域名的方法">1.1.1 直接在本地指定域名的方法</h5>



<pre class="wp-block-code"><code># vim /etc/hosts</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
&lt;IP address&gt; &lt;domain name&gt;</code></pre>



<p>（注意：/etc/hosts 里记录的 DNS 优先级要比 /etc/resolv.conf 里的高）</p>



<h5 id="1-1-2-直接在本地指定域名的案例">1.1.2 直接在本地指定域名的案例</h5>



<pre class="wp-block-code"><code># vim /etc/hosts</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
192.154.240.64 eternalcenter.com</code></pre>



<p>（补充：这里以将 192.154.240.64 解析为 eternalcenter.com 为例）</p>



<p>（注意：/etc/hosts 里记录的 DNS 优先级要比 /etc/resolv.conf 里的高）</p>



<h4 id="1-2-使用远程的-dns-服务器解析域名1-2-1-使用远程的-dns-服务器解析域名1-2-1-1-使用远程的-dns-服务器解析域名的方法1-2-1-1-1-直接修改-etc-resolv-conf-文件">1.2 使用远程的 DNS 服务器解析域名</h4>



<h5 id="1-2-使用远程的-dns-服务器解析域名1-2-1-使用远程的-dns-服务器解析域名1-2-1-1-使用远程的-dns-服务器解析域名的方法1-2-1-1-1-直接修改-etc-resolv-conf-文件">1.2.1 使用远程的 DNS 服务器解析域名</h5>



<h5 id="1-2-使用远程的-dns-服务器解析域名1-2-1-使用远程的-dns-服务器解析域名1-2-1-1-使用远程的-dns-服务器解析域名的方法1-2-1-1-1-直接修改-etc-resolv-conf-文件">1.2.1.1 使用远程的 DNS 服务器解析域名的方法</h5>



<h5 id="1-2-使用远程的-dns-服务器解析域名1-2-1-使用远程的-dns-服务器解析域名1-2-1-1-使用远程的-dns-服务器解析域名的方法1-2-1-1-1-直接修改-etc-resolv-conf-文件">1.2.1.1.1 直接修改 /etc/resolv.conf 文件</h5>



<pre class="wp-block-code"><code># vim /etc/resolv.conf</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
nameserver &lt;IP address of DNS server&gt;</code></pre>



<p>（注意：/etc/hosts 里记录的 DNS 优先级要比 /etc/resolv.conf 里的高）</p>



<h5 id="1-2-1-1-2-使用-nmcli-命令1-2-1-1-2-1-使用-nmcli-命令配置一个-dns-服务器的-ip-地址">1.2.1.1.2 使用 nmcli 命令</h5>



<h5 id="1-2-1-1-2-使用-nmcli-命令1-2-1-1-2-1-使用-nmcli-命令配置一个-dns-服务器的-ip-地址">1.2.1.1.2.1 使用 nmcli 命令配置一个 DNS 服务器的 IP 地址</h5>



<pre class="wp-block-code"><code># nmcli connection modify &lt;network card name&gt; ipv4.dns &lt;IP address of DNS server&gt;</code></pre>



<p>（补充：不将 /etc/NetworkManager/NetworkManager.conf 里的 [main] dns=none 参数修改为 none 的话，此参数会覆盖 /etc/resolv.conf 里的设置）</p>



<p>（<br>注意：<br>1) 此方法只对 CentOS8&amp;RHEL8 适用<br>2) /etc/hosts 里记录的 DNS 优先级要比使用 nmcli 命令的高<br>）</p>



<h5 id="1-2-1-1-2-2-使用-nmcli-命令配置多个-dns-服务器的-ip-地址">1.2.1.1.2.2 使用 nmcli 命令配置多个 DNS 服务器的 IP 地址</h5>



<pre class="wp-block-code"><code># nmcli connection modify &lt;network card name&gt; ipv4.dns "&lt;first IP address of DNS server&gt;,&lt;second IP address of DNS server&gt;,&lt;third IP address of DNS server&gt;......"</code></pre>



<p>（补充：不将 /etc/NetworkManager/NetworkManager.conf 里的 [main] dns=none 参数修改为 none 的话，此参数会覆盖 /etc/resolv.conf 里的设置）</p>



<p>（<br>注意：<br>1) 此方法只对 CentOS8&amp;RHEL8 适用<br>2) /etc/hosts 里记录的 DNS 优先级要比使用 nmcli 命令的高<br>）</p>



<h5 id="1-2-1-2-使用远程的-dns-服务器解析域名的案例1-2-1-2-1-直接修改-etc-resolv-conf-文件">1.2.1.2 使用远程的 DNS 服务器解析域名的案例</h5>



<h5 id="1-2-1-2-使用远程的-dns-服务器解析域名的案例1-2-1-2-1-直接修改-etc-resolv-conf-文件">1.2.1.2.1 直接修改 /etc/resolv.conf 文件</h5>



<pre class="wp-block-code"><code># vim /etc/resolv.conf</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
nameserver 8.8.8.8</code></pre>



<p>（补充：这里以使用 8.8.8.8 DNS 服务器为例）</p>



<p>（注意：/etc/hosts 里记录的 DNS 优先级要比 /etc/resolv.conf 里的高）</p>



<h5 id="1-2-1-2-2-使用-nmcli-命令">1.2.1.2.2 使用 nmcli 命令</h5>



<pre class="wp-block-code"><code># nmcli connection modify eth0 ipv4.dns 8.8.8.8</code></pre>



<p>（<br>补充：<br>1) 这里以给 eth0 网卡添加 8.8.8.8 DNS 服务器为例<br>2) 不将 /etc/NetworkManager/NetworkManager.conf 里的 [main] dns=none 参数修改为 none 的话，此参数会覆盖 /etc/resolv.conf 里的设置<br>）</p>



<p>（注意：/etc/hosts 里记录的 DNS 优先级要比使用 nmcli 命令的高）</p>



<h5 id="1-2-2-显示正在使用远程的-dns-服务器解析的域名">1.2.2 显示正在使用远程的 DNS 服务器解析的域名</h5>



<pre class="wp-block-code"><code># nmcli connection show | grep -i ipv4.dns</code></pre>



<h3 id="内容二-检查-dns-域名解析2-1-使用-ping-命令解析域名2-1-1-使用-ping-命令解析域名的格式">内容二：检查 DNS 域名解析</h3>



<h4 id="内容二-检查-dns-域名解析2-1-使用-ping-命令解析域名2-1-1-使用-ping-命令解析域名的格式">2.1 使用 ping 命令解析域名</h4>



<h5 id="内容二-检查-dns-域名解析2-1-使用-ping-命令解析域名2-1-1-使用-ping-命令解析域名的格式">2.1.1 使用 ping 命令解析域名的格式</h5>



<pre class="wp-block-code"><code># ping &lt;domain name&gt;</code></pre>



<h5 id="2-1-2-使用-ping-命令解析域名的案例">2.1.2 使用 ping 命令解析域名的案例</h5>



<pre class="wp-block-code"><code># ping eternalcenter.com
PING eternalcenter.com (192.154.240.64) 56(84) bytes of data.
64 bytes from v144-48-142.ap-east.sugarhosts.net (192.154.240.64): icmp_seq=1 ttl=50 time=144 ms
64 bytes from v144-48-142.ap-east.sugarhosts.net (192.154.240.64): icmp_seq=3 ttl=50 time=70.8 ms
64 bytes from v144-48-142.ap-east.sugarhosts.net (192.154.240.64): icmp_seq=4 ttl=50 time=81.3 ms
64 bytes from v144-48-142.ap-east.sugarhosts.net (192.154.240.64): icmp_seq=5 ttl=50 time=103 ms
......</code></pre>



<h4 id="2-2-使用-host-命令解析域名2-2-1-使用-host-命令解析域名的格式">2.2 使用 host 命令解析域名</h4>



<h5 id="2-2-使用-host-命令解析域名2-2-1-使用-host-命令解析域名的格式">2.2.1 使用 host 命令解析域名的格式</h5>



<pre class="wp-block-code"><code># host &lt;domain name&gt;</code></pre>



<h5 id="2-2-2-使用-host-命令解析域名的案例">2.2.2 使用 host 命令解析域名的案例</h5>



<pre class="wp-block-code"><code># host eternalcenter.com
eternalcenter.com has address 192.154.240.64</code></pre>



<p>（补充：这里以解析 etenalcenter.com 域名为例）</p>



<h4 id="2-3-使用-nslookup-命令解析域名2-3-1-使用-nslookup-命令解析域名的格式">2.3 使用 nslookup 命令解析域名</h4>



<h5 id="2-3-使用-nslookup-命令解析域名2-3-1-使用-nslookup-命令解析域名的格式">2.3.1 使用 nslookup 命令解析域名的格式</h5>



<pre class="wp-block-code"><code># nslookup &lt;domain name&gt;</code></pre>



<h5 id="2-3-2-使用-nslookup-命令解析域名的案例">2.3.2 使用 nslookup 命令解析域名的案例</h5>



<pre class="wp-block-code"><code># nslookup eternalcenter.com
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
Name:	eternalcenter.com
Address: 192.154.240.64</code></pre>



<p>（补充：这里以解析 etenalcenter.com 域名为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[工具] Shell 批量检测域名的 DNS 解析是否正确</title>
		<link>https://eternalcenter-sep-2022.github.io/shell-dns-check/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sun, 11 Aug 2019 04:03:58 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Language (语言)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Shell Monitor (监控)]]></category>
		<category><![CDATA[Shell Tools (工具)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=5112</guid>

					<description><![CDATA[介绍 基本信息 作者：朱明宇名称：批量检测域名的 DNS 解析是否正确作用：批量检测域名的 DNS 解析是否正确 使用方法 1. 在此脚本的分割线内写入相应的内容2. 给此脚本添加执行权限3. 执行此脚本 脚本分割线里的变量 1. main_domain=eternalcenter.com #此处填写网站的“主域名”，网站一般会有几个域名，其中“主域名”直接指向 ip 地址，其他的域名都指向主域名2. ip=192.154.240.64 #域名指向的 ip 地址3. nginx=1.16.0 #web 程序的对应版本的版本4. content1=&#8221;eteranlcenter&#8221; # 随即填写一个具有代表性的网站首页的内容5. content2=&#8221;Mingyu&#8221; # 随即填写一个具有代表性的网站首页的内容，但是要和前面的 content1 在同一行6. domain=&#8221;eternalcenter.com eternalcentre.com zhumingyu.com mingyuzhu.com eternalcenter.org eternalcentre.org&#8221; #需要检测的域名 脚本]]></description>
										<content:encoded><![CDATA[
<h2>介绍</h2>



<h3>基本信息</h3>



<p>作者：朱明宇<br>名称：批量检测域名的 DNS 解析是否正确<br>作用：批量检测域名的 DNS 解析是否正确</p>



<h3>使用方法</h3>



<p>1. 在此脚本的分割线内写入相应的内容<br>2. 给此脚本添加执行权限<br>3. 执行此脚本</p>



<h3>脚本分割线里的变量</h3>



<p>1. main_domain=eternalcenter.com #此处填写网站的“主域名”，网站一般会有几个域名，其中“主域名”直接指向 ip 地址，其他的域名都指向主域名<br>2. ip=192.154.240.64 #域名指向的 ip 地址<br>3. nginx=1.16.0 #web 程序的对应版本的版本<br>4. content1=&#8221;eteranlcenter&#8221; # 随即填写一个具有代表性的网站首页的内容<br>5. content2=&#8221;Mingyu&#8221; # 随即填写一个具有代表性的网站首页的内容，但是要和前面的 content1 在同一行<br>6. domain=&#8221;eternalcenter.com eternalcentre.com zhumingyu.com mingyuzhu.com eternalcenter.org eternalcentre.org&#8221; #需要检测的域名</p>



<h2>脚本</h2>



<pre class="wp-block-code"><code>#!/bin/bash

####################### Separator ########################

main_domain=eternalcenter.com
ip=144.48.142.148
nginx=1.16.0
content1="eternalcenter"
content2="Mingyu"
domain="eternalcenter.com eternalcentre.com zhumingyu.com mingyuzhu.com eternalcenter.org eternalcentre.org"

####################### Separator ########################

check_domain_name(){
if &#91; $1 == $main_domain ];then
	
	ping -c4 -i0.4 $1 | grep $ip &amp;&gt; /dev/null
	if &#91; $? -ne 0 ];then
		echo -e "\033&#91;31m $1 is error !!!!! ip is error !!!!! \033&#91;0m"
	else
		curl $1 | grep $nginx &amp;&gt; /dev/null
		if &#91; $? -ne 0 ];then
			echo -e "\033&#91;31m $1 is error !!!!! software is error !!!!! \033&#91;0m"
		else	
			elinks $1 | grep "$content1" | grep "$content2" &amp;&gt; /dev/null
			if &#91; $? -ne 0 ];then
				echo -e "\033&#91;31m $1 is error !!!!! web is error !!!!! \033&#91;0m"
			else
				echo -e "\033&#91;32m $1 is ok \033&#91;0m"
			fi
		fi
		
	fi
else
	elinks $1 | grep "$content1" | grep "$content2" &amp;&gt; /dev/null
	if &#91; $? -ne 0 ];then
		echo -e "\033&#91;31m $1 is error !!!!! web is error !!!!! \033&#91;0m"
	else
		echo -e "\033&#91;32m $1 is ok \033&#91;0m"
	fi


fi
}

for i in $domain
do
	check_domain_name $i
done</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
