<?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>LinuxByte &#187; 域名劫持</title>
	<atom:link href="http://www.linuxbyte.org/tag/%e5%9f%9f%e5%90%8d%e5%8a%ab%e6%8c%81/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxbyte.org</link>
	<description>一个Linux Blog</description>
	<lastBuildDate>Tue, 22 Jun 2010 15:10:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>用pdnsd 做局域网域名劫持</title>
		<link>http://www.linuxbyte.org/pdnsd-rr-section.html</link>
		<comments>http://www.linuxbyte.org/pdnsd-rr-section.html#comments</comments>
		<pubDate>Tue, 07 Oct 2008 16:32:47 +0000</pubDate>
		<dc:creator>xiao H</dc:creator>
				<category><![CDATA[服务器应用]]></category>
		<category><![CDATA[pdnsd]]></category>
		<category><![CDATA[域名劫持]]></category>

		<guid isPermaLink="false">http://www.linuxbyte.org/?p=264</guid>
		<description><![CDATA[在之前的文章里提到过网吧里用了pdnsd 做了域名代理，其实pdnsd 除了做代理加快解析之外，还可以劫持域名，今天研究了一下劫持的方法。
a.最简单办法直接用pdnsd-ctl 插入一条 A 记录,举例：
pd... ]]></description>
			<content:encoded><![CDATA[<p>在<a href="http://www.linuxbyte.org/linux-iptables-nat-squid-pdnsd/" target="_blank">之前的文章</a>里提到过网吧里用了pdnsd 做了域名代理，其实pdnsd 除了做代理加快解析之外，还可以劫持域名，今天研究了一下劫持的方法。</p>
<p>a.最简单办法直接用pdnsd-ctl 插入一条 A 记录,举例：<br />
<span style="font-family: Courier New;">pdnsd-ctl add a 127.0.0.1 <a href="http://www.linuxbyte.org">www.linuxbyte.org</a>. 900 （900 为TTL 值）</span><br />
<a href="http://www.linuxbyte.org/uploads/2008/10/1.jpg" rel="lightbox[264]"><img class="alignnone size-medium wp-image-265" title="1" src="http://www.linuxbyte.org/uploads/2008/10/1-320x122.jpg" alt="" width="320" height="122" /></a><br />
<span id="more-264"></span></p>
<p>同样你可以用pdnsd-ctl add 插入其他的mx，ns，cname 记录等</p>
<p>b.第一方法适合临时做一些修改，要想真正的劫持一个域名可以在 pdnsd.conf 中加入 rr section。举例：<br />
rr {<br />
name = linuxbyte.org;<br />
ns = localhost;<br />
soa = localhost, root.localhost, 42, 86400, 900, 86400, 86400;<br />
}<br />
这个是劫持了ns 记录，把域名解析交给你指定的dns 服务器来做。</p>
<p>rr {<br />
name = *.linuxbyte.org;<br />
cname = <a href="http://www.linuxsky.org">www.linuxsky.org</a>;<br />
}</p>
<p>这里把所有linuxbyte.org 的二级域名都做了cname到了 <a href="http://www.linuxsky.org">www.linuxsky.org</a></p>
<p><a href="http://www.linuxbyte.org/uploads/2008/10/3.jpg" rel="lightbox[264]"><img class="alignnone size-medium wp-image-268" title="3" src="http://www.linuxbyte.org/uploads/2008/10/3-320x90.jpg" alt="" width="320" height="90" /></a></p>
<p>rr {<br />
name = <a href="http://www.linuxbyte.org">www.linuxbyte.org</a>;<br />
a = 192.168.0.123<br />
}</p>
<p>直接插入一条A 记录。</p>
<h3  class="related_post_title">与本文关系暧昧的文字</h3><ul class="related_post"><li><a href="http://www.linuxbyte.org/linux-iptables-nat-squid-pdnsd.html" title="网吧Linux 网关设置记录">网吧Linux 网关设置记录</a></li><li><a href="http://www.linuxbyte.org/install-pdnsd-under-magiclinux-for-dns-cache.html" title="在magic linux 下安装pdnsd加快域名解析">在magic linux 下安装pdnsd加快域名解析</a></li></ul><hr />
<p><small>© xiao H for <a href="http://www.linuxbyte.org">LinuxByte</a>, 2008<br />
Source: <a href="http://www.linuxbyte.org/pdnsd-rr-section.html">用pdnsd 做局域网域名劫持</a><br />
<a href="http://www.linuxbyte.org/pdnsd-rr-section.html#comments">No comment</a><br />
Post tags: <a href="http://www.linuxbyte.org/tag/pdnsd" rel="tag">pdnsd</a>, <a href="http://www.linuxbyte.org/tag/%e5%9f%9f%e5%90%8d%e5%8a%ab%e6%8c%81" rel="tag">域名劫持</a><br/>
</small></p>
	标签：<a href="http://www.linuxbyte.org/tag/pdnsd" title="pdnsd" rel="tag">pdnsd</a>, <a href="http://www.linuxbyte.org/tag/%e5%9f%9f%e5%90%8d%e5%8a%ab%e6%8c%81" title="域名劫持" rel="tag">域名劫持</a><br />

	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.linuxbyte.org/linux-iptables-nat-squid-pdnsd.html" title="网吧Linux 网关设置记录 (2008-05-27)">网吧Linux 网关设置记录</a> (0)</li>
	<li><a href="http://www.linuxbyte.org/install-pdnsd-under-magiclinux-for-dns-cache.html" title="在magic linux 下安装pdnsd加快域名解析 (2008-02-14)">在magic linux 下安装pdnsd加快域名解析</a> (1)</li>
</ul>


<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxbyte.org/pdnsd-rr-section.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
