<?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>dhcp &#8211; richliu&#039;s blog</title>
	<atom:link href="https://blog.richliu.com/tag/dhcp/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Tue, 07 Jul 2020 16:53:11 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>自架 DNS 防成人內容</title>
		<link>https://blog.richliu.com/2020/07/08/4291/%e8%87%aa%e6%9e%b6dns%e9%98%b2%e6%88%90%e4%ba%ba%e5%85%a7%e5%ae%b9/</link>
					<comments>https://blog.richliu.com/2020/07/08/4291/%e8%87%aa%e6%9e%b6dns%e9%98%b2%e6%88%90%e4%ba%ba%e5%85%a7%e5%ae%b9/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Tue, 07 Jul 2020 16:50:48 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[audlt]]></category>
		<category><![CDATA[Bind]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[pron]]></category>
		<guid isPermaLink="false">https://blog.richliu.com/?p=4291</guid>

					<description><![CDATA[<p>果然還是到了這一天，雖然總是有一天他們會看到，但是多多少少還是要設一道簡單的關卡最簡單的是在路由器上設定 DN [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2020/07/08/4291/%e8%87%aa%e6%9e%b6dns%e9%98%b2%e6%88%90%e4%ba%ba%e5%85%a7%e5%ae%b9/">自架 DNS 防成人內容</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>果然還是到了這一天，雖然總是有一天他們會看到，但是多多少少還是要設一道簡單的關卡<br />最簡單的是在路由器上設定 DNS ，畢竟誰都不喜歡在自己的手機電腦裝軟體吧 </p>



<span id="more-4291"></span>



<p><a rel="noreferrer noopener" aria-label="8 Free DNS Services to Block Porn Sites without Installing Software (opens in a new tab)" href="https://www.raymond.cc/blog/how-to-block-pornographic-websites-without-spending-money-on-software/" target="_blank">8 Free DNS Services to Block Porn Sites without Installing Software</a><br />這一篇就有提一些免費的 DNS 可以防國外的成人內容，像是 OpenDNS  OpenDNS Family Shield <br />DNS 設為<br /> Preferred DNS Server: 208.67.222.123<br /> Alternate DNS Server: 208.67.220.123 <br /><br />不過呢，這樣爸爸也會被擋掉，實在不是一個好解決方案</p>



<p>不過如果你有自已架 Linux Server，這到也不是什麼難事對吧，首先我猜你應該有了 dhcp 和 bind (name server) ，好吧，我知道現在大家都沒有，所以我也是寫來自 high 用的，畢竟我不想寫怎麼架 Linux router <br /><br />但是其實步驟並不會太複雜的<br />1. 設定 bind dns 到 OpenDNS 去查資料<br />在 /etc/bind/named.conf 內的 options session 加上以下這個選項，這樣會讓 bind 強迫去用 OpenDNS 查詢網址</p>



<pre class="wp-block-code"><code>    forwarders {
        208.67.222.123;
        208.67.220.123;
    };</code></pre>



<p>2. 將 dhcp 給的 DNS Server 設到 OpenDNS 和自己架的 name server <br />修改 /etc/dhcp/dhcpd.conf，修改 DNS Server ，以下是範例</p>



<pre class="wp-block-code"><code>option domain-name-servers 192.168.0.254, 208.67.220.123;</code></pre>



<p>3. 在 dhcpd.conf 內的 subnet session ，讓老爸的電腦變固定 IP，並且 DNS 設定成正常的 DNS，以下是範例，記得填入老爸電腦的 Mac Address. </p>



<pre class="wp-block-code"><code>host father { hardware ethernet 00:11:22:33:44:55; fixed-address 192.168.0.10; option domain-name-servers 8.8.8.8,
1.1.1.1;}</code></pre>



<p>4. 重開 dhcp 和 name server ，大功告成<br />現在只有老爸能看 P**nHub 了!<br /><br /><s>這時候有沒有感覺自己架 Linux 真好呢</s></p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2020/07/08/4291/%e8%87%aa%e6%9e%b6dns%e9%98%b2%e6%88%90%e4%ba%ba%e5%85%a7%e5%ae%b9/">自架 DNS 防成人內容</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2020/07/08/4291/%e8%87%aa%e6%9e%b6dns%e9%98%b2%e6%88%90%e4%ba%ba%e5%85%a7%e5%ae%b9/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
