<?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>wd and cc &#187; dns</title>
	<atom:link href="http://wdicc.com/tag/dns/feed/" rel="self" type="application/rss+xml" />
	<link>http://wdicc.com</link>
	<description>Happy every day...</description>
	<lastBuildDate>Mon, 06 Sep 2010 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>使用 pdnsd 来缓存 dns</title>
		<link>http://wdicc.com/use-pdnsd-cache-you-dns-record/</link>
		<comments>http://wdicc.com/use-pdnsd-cache-you-dns-record/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 03:49:09 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[pdnsd]]></category>

		<guid isPermaLink="false">http://wdicc.com/?p=594</guid>
		<description><![CDATA[如果你的网络实在很快，好像也没这个必要。当然我用他还有一个目的就是我的 dns 我做主，省的被劫持。 打开一个网页有时候 dns 查询就占了一些时间，如果想把这个时间也节省下来，那可以... ]]></description>
			<content:encoded><![CDATA[<p style="float: right;margin: 4px;"><script type="text/javascript"><!--
google_ad_client = "pub-9015557074547192";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text";
//2007-06-17: index
google_ad_channel = "2704127095";
google_color_border = "940F04";
google_color_bg = "FFFFFF";
google_color_link = "940F04";
google_color_text = "000000";
google_color_url = "0066CC";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p> <p>如果你的网络实在很快，好像也没这个必要。当然我用他还有一个目的就是我的 dns 我做主，省的被劫持。</p>
<p>打开一个网页有时候 dns 查询就占了一些时间，如果想把这个时间也节省下来，那可以试试看这个。类似的软件还有 dnsmasq，我觉得 dnsmasq 没 pdnsd 灵活一点，反正基本的缓存功能肯定是都有的。。。我这还有同事用 bind 做缓存，呵呵，选什么看各自喜好了。</p>
<p>我用的 wicd, 他会修改 /etc/resolv.conf 这个文件，就算在他的设置里面设置了全局 dns 也没用。不过还好他提供了一个 /etc/resolv.conf.head 文件。这个文件里面的东西会被放到 /etc/resolv.conf 的开头。所以我在那里面写上了 nameserver 127.0.0.1。</p>
<p>具体到 pdns 的设置，好像我也没改什么。</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">server {
	label = &quot;opendns&quot;;
	ip = 202.181.224.2, 202.181.202.140;
	#ip = 208.67.222.222, 208.67.220.220;
#	reject = 208.69.32.0/24,  # You may need to add additional address ranges
#	         208.69.34.0/24,  # here if the addresses of their search engines
#	         208.67.219.0/24; # change.
	reject_policy = fail;     # If you do not provide any alternative server
	                          # sections, like the following root-server
	                          # example, &quot;negate&quot; may be more appropriate here.
	timeout = 4;
	uptest = ping;            # Test availability using ICMP echo requests.
   ping_timeout = 100;       # ping test will time out after 10 seconds.
	interval = 15m;           # Test every 15 minutes.
	preset = off;
	policy=included;
	exclude=&quot;.abc.com&quot;;
}
&nbsp;
server {
	label = &quot;yahoo&quot;;
	ip = 10.62.163.4, 10.62.163.9;
	timeout = 4;
	uptest = ping;
	ping_timeout = 100;
	interval = 15m;
}</pre></div></div>

<p>我设置两个 server。第一个解析除了 .abc.com 之外的，第二个解析 .abc.com 。这个 abc.com 实际上是我们内网的一个地址，只能在内网 dns 解析。</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/use-pdnsd-cache-you-dns-record/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>dns劫持</title>
		<link>http://wdicc.com/hijack-dns/</link>
		<comments>http://wdicc.com/hijack-dns/#comments</comments>
		<pubDate>Wed, 13 Sep 2006 01:48:54 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[3721]]></category>
		<category><![CDATA[dns]]></category>

		<guid isPermaLink="false">http://blog.wdicc.com/wordpress/2006/09/13/245/</guid>
		<description><![CDATA[这个词不知道熟悉不熟悉。听说过劫机，劫车的，劫持dns有什么用？用处大了，呵呵。之前有浏览器劫持，就是流氓插件将你访问的网址导向他自己的网站，不管你访问什么网址，都给你导过... ]]></description>
			<content:encoded><![CDATA[<p>这个词不知道熟悉不熟悉。听说过劫机，劫车的，劫持dns有什么用？用处大了，呵呵。之前有浏览器劫持，就是流氓插件将你访问的网址导向他自己的网站，不管你访问什么网址，都给你导过去。很流氓的做法吧，现在有些dns也在做<a href="http://blog.cathayan.org/item/1440">类似的事情</a>。</p>
<p>我前几天就遇到了类似的问题，不过和这个又不像。工行的网站是 http://www.icbc.com.cn ，而 http://icbc.com.cn 是连接不上的，我输入了后面这个ip，就打开一个什么纠错的网址，然后一不小心多按了一个回车，就提示我安装好了中文上网插件，当时真想骂3721祖宗十八代。用ie也是没办法的事情，工行的网站只能用ie，用firefox访问那个网址的时候就提示访问不了，不会出现转向，所以我这个情况应该是和浏览器有关。</p>
<p>用了 <a href="http://www.opendns.com/what/">opendns</a> 之后呢，再访问不存在的网址，还是会转，不过会转到一个英文的网站，没有3721了，呵呵。</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/hijack-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
