<?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>gjw_apparitor 博客 &#187; Dns</title>
	<atom:link href="http://www.apparitor.info/category/service/dns/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.apparitor.info</link>
	<description>孤独是一种态度</description>
	<lastBuildDate>Wed, 16 May 2012 07:36:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>移动IP库更新</title>
		<link>http://www.apparitor.info/2011/06/08/%e7%a7%bb%e5%8a%a8ip%e5%ba%93%e6%9b%b4%e6%96%b0/</link>
		<comments>http://www.apparitor.info/2011/06/08/%e7%a7%bb%e5%8a%a8ip%e5%ba%93%e6%9b%b4%e6%96%b0/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 09:36:40 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Dns]]></category>
		<category><![CDATA[IP库]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=364</guid>
		<description><![CDATA[移动IP库更新 移动 203.91.96.0/20 移动 219.232.64.0/19 移动 211.103.0.0/17 移动 211.136.0.0/13 移动 211.142.0.0/15 移动 218.200.0.0/13 移动 218.206.0.0/15 移动 221.130.0.0/15 移动 221.176.0.0/13 移动 117.128.0.0/10 移动 120.192.0.0/10 移动 112.0.0.0/10 移动 111.0.0.0/10 移动 183.192.0.0/10 原创文章，转载请注明： 转载自gjw_apparitor 博客 本文链接地址: 移动IP库更新]]></description>
			<content:encoded><![CDATA[<p>移动IP库更新</p>
<p>移动	203.91.96.0/20<br />
移动	219.232.64.0/19<br />
移动	211.103.0.0/17<br />
移动	211.136.0.0/13<br />
移动	211.142.0.0/15<br />
移动	218.200.0.0/13<br />
移动	218.206.0.0/15<br />
移动	221.130.0.0/15<br />
移动	221.176.0.0/13<br />
移动	117.128.0.0/10<br />
移动	120.192.0.0/10<br />
移动	112.0.0.0/10<br />
移动	111.0.0.0/10<br />
移动	183.192.0.0/10	</p>
<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/06/08/%e7%a7%bb%e5%8a%a8ip%e5%ba%93%e6%9b%b4%e6%96%b0/">移动IP库更新</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/06/08/%e7%a7%bb%e5%8a%a8ip%e5%ba%93%e6%9b%b4%e6%96%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>移动IP库</title>
		<link>http://www.apparitor.info/2011/05/17/%e7%a7%bb%e5%8a%a8ip%e5%ba%93/</link>
		<comments>http://www.apparitor.info/2011/05/17/%e7%a7%bb%e5%8a%a8ip%e5%ba%93/#comments</comments>
		<pubDate>Tue, 17 May 2011 02:36:12 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Dns]]></category>
		<category><![CDATA[ip]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=348</guid>
		<description><![CDATA[最近公司和移动运营商有合作，有机会跟他们要到了移动资源的IP库，来更新我的DNS IP列表。 他们给的IP表有的是带掩码位的、有的是用结束段显示的。用了自己以前写的IP格式转换脚本将他们格式统一。 现在提供给大家。有不全或错误的还请大家指正。 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50]]></description>
			<content:encoded><![CDATA[<p>最近公司和移动运营商有合作，有机会跟他们要到了移动资源的IP库，来更新我的DNS IP列表。<br />
他们给的IP表有的是带掩码位的、有的是用结束段显示的。用了自己以前写的IP格式转换脚本将他们格式统一。<br />
现在提供给大家。有不全或错误的还请大家指正。</p>
<p><span id="more-348"></span></p>

<div class="wp_codebox"><table><tr id="p3482"><td class="line_numbers"><pre>0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
</pre></td><td class="code" id="p348code2"><pre class="text" style="font-family:monospace;">起始段	结束段	掩码
211.136.0.0	211.136.31.255	19
218.200.240.0	218.200.255.255	20
221.176.0.0	221.176.15.255	20
221.176.16.0	221.176.31.255	20
221.130.208.0	221.130.211.255	22
221.130.212.0	221.130.223.255	20
221.130.224.0	221.130.255.255	19
218.206.190.0	218.206.191.255	23
218.207.224.0	218.207.225.255	23
221.177.0.0	221.177.255.255	16
117.128.0.0	117.128.7.255	21
221.183.0.0	221.183.255.255	16
218.206.176.0	218.206.179.255	22
218.207.235.0	218.207.255.255	19
211.136.24.0	211.136.127.255	17
218.205.128.0	218.205.255.255	17
218.206.64.0	218.206.95.255	19
221.179.128.0	221.179.255.255	17
221.130.32.0	221.130.47.255	20
117.128.8.0	117.131.255.255	14
117.133.0.0	117.135.255.255	14
111.13.0.0	111.13.255.255	16
211.136.96.0	211.136.255.255	16
218.202.224.0	218.202.255.255	19
221.130.176.0	221.130.255.255	17
221.181.64.0	221.181.127.255	18
117.131.0.0	117.131.127.255	17
117.135.0.0	117.135.255.255	16
120.204.0.0	120.204.255.255	16
183.192.0.0	183.192.255.255	16
183.193.0.0	183.193.255.255	16
211.136.192.0	211.136.255.255	18
211.139.128.0	211.139.255.255	17
218.204.160.0	218.204.255.255	17
221.179.0.0	221.179.127.255	17
120.196.0.0	120.196.255.255	16
120.197.0.0	120.197.255.255	16
120.198.0.0	120.198.255.255	16
211.137.0.0	211.137.63.255	18
211.140.192.0	211.140.255.255	18
221.180.128.0	221.180.255.255	17
117.132.96.0	117.132.255.255	16
120.200.0.0	120.200.255.255	16
120.201.0.0	120.201.255.255	16
211.137.48.0	211.137.127.255	17
218.200.64.0	218.200.255.255	16
120.202.0.0	120.202.255.255	16
111.4.0.0	111.4.255.255	16
211.137.80.0	211.137.127.255	18
218.200.160.0	218.200.255.255	17
218.203.224.0	218.203.255.255	19
218.205.224.0	218.205.255.255	19
221.182.0.0	221.182.127.255	17
111.9.0.0	111.9.255.255	16
117.139.0.0	117.139.255.255	16
211.137.112.0	211.137.255.255	16
218.200.0.0	218.200.63.255	18
120.192.192.0	120.192.255.255	18
111.20.0.0	111.20.255.255	16
211.137.144.0	211.137.191.255	18
211.103.80.0	211.103.95.255	20
117.131.128.0	117.131.255.255	17
211.137.176.0	211.137.255.255	17
218.201.96.0	218.201.255.255	16
120.192.0.0	120.192.255.255	16
117.132.0.0	117.132.127.255	17
111.14.0.0	111.14.255.255	16
111.15.0.0	111.15.255.255	16
211.137.208.0	211.137.223.255	20
211.141.0.0	211.141.127.255	17
211.137.224.0	211.137.255.255	19
218.203.0.0	218.203.127.255	17
211.138.0.0	211.138.15.255	20
211.143.48.0	211.143.255.255	16
218.207.64.0	218.207.95.255	19
117.132.144.0	117.132.191.255	18
183.196.0.0	183.196.255.255	16
183.197.0.0	183.197.255.255	16
111.11.0.0	111.11.127.255	17
211.138.16.0	211.138.31.255	20
211.142.96.0	211.142.255.255	16
218.206.192.0	218.206.255.255	18
221.176.96.0	221.176.255.255	16
120.194.0.0	120.194.255.255	16
111.5.0.0	111.5.255.255	16
111.7.0.0	111.7.255.255	16
211.138.32.0	211.138.47.255	20
218.202.144.0	218.202.255.255	17
221.181.0.0	221.181.63.255	18
120.205.0.0	120.205.255.255	16
211.138.48.0	211.138.63.255	20
218.203.96.0	218.203.255.255	16
211.138.64.0	211.138.79.255	20
218.206.160.0	218.206.175.255	20
111.12.128.0	111.12.255.255	17
211.138.80.0	211.138.95.255	20
218.202.64.0	218.202.255.255	16
120.193.128.0	120.193.255.255	17
117.137.0.0	117.137.255.255	16
211.138.96.0	211.138.111.255	20
211.142.0.0	211.142.127.255	17
221.131.0.0	221.131.63.255	18
221.180.0.0	221.180.63.255	18
120.207.0.0	120.207.255.255	16
120.208.0.0	120.208.255.255	16
183.200.0.0	183.200.255.255	16
183.201.0.0	183.201.255.255	16
211.138.112.0	211.138.255.255	16
211.140.0.0	211.140.255.255	16
218.205.48.0	218.205.127.255	17
221.131.192.0	221.131.255.255	18
120.193.0.0	120.193.63.255	18
120.199.0.0	120.199.255.255	16
111.0.0.0	111.0.255.255	16
111.1.0.0	111.1.255.255	16
111.2.0.0	111.2.255.255	16
111.3.0.0	111.3.255.255	16
211.138.132.0	211.138.159.255	19
211.143.144.0	211.143.255.255	17
218.207.96.0	218.207.255.255	16
112.5.0.0	112.5.255.255	16
211.138.160.0	211.138.175.255	20
221.176.80.0	221.176.95.255	20
221.182.128.0	221.182.255.255	17
211.138.176.0	211.138.191.255	20
211.141.160.0	211.141.255.255	17
221.130.112.0	221.130.255.255	16
120.193.64.0	120.193.127.255	18
120.209.0.0	120.209.255.255	16
120.210.0.0	120.210.255.255	16
211.138.192.0	211.138.207.255	20
211.103.0.0	211.103.127.255	17
211.103.96.0	211.103.127.255	19
211.139.96.0	211.139.127.255	19
211.143.224.0	211.143.255.255	19
218.205.0.0	218.205.63.255	18
218.206.96.0	218.206.255.255	16
221.130.0.0	221.130.31.255	19
221.131.64.0	221.131.255.255	16
221.130.48.0	221.130.127.255	17
221.178.128.0	221.178.255.255	17
221.181.128.0	221.181.255.255	17
120.195.0.0	120.195.255.255	16
112.0.0.0	112.7.255.255	13
211.138.208.0	211.138.223.255	20
211.141.80.0	211.141.255.255	16
218.204.64.0	218.204.255.255	16
120.203.0.0	120.203.255.255	16
120.206.0.0	120.206.255.255	16
211.138.224.0	211.138.239.255	20
211.142.208.0	211.142.255.255	18
211.143.0.0	211.143.63.255	18
111.8.0.0	111.8.255.255	16
211.138.240.0	211.138.255.255	20
218.204.0.0	218.204.63.255	18
221.180.64.0	221.180.127.255	18
111.12.0.0	111.12.127.255	17
117.141.0.0	117.141.255.255	16
211.139.0.0	211.139.15.255	20
218.201.192.0	218.201.255.255	18
117.135.192.0	117.135.255.255	18
211.139.16.0	211.139.31.255	20
218.202.0.0	218.202.63.255	18
218.206.32.0	218.206.63.255	19
211.139.32.0	211.139.63.255	19
218.201.0.0	218.201.127.255	17
218.206.0.0	218.206.31.255	19
218.207.0.0	218.207.63.255	18
221.178.0.0	221.178.127.255	17
111.10.0.0	111.10.127.255	17
211.139.64.0	211.139.79.255	20
111.11.192.0	111.11.255.255	18
211.139.80.0	211.139.95.255	20
218.203.160.0	218.203.255.255	17
111.11.128.0	111.11.191.255	18
221.176.64.0	221.176.79.255	20</pre></td></tr></table></div>

<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/05/17/%e7%a7%bb%e5%8a%a8ip%e5%ba%93/">移动IP库</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/05/17/%e7%a7%bb%e5%8a%a8ip%e5%ba%93/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让Bind支持sqlite数据库</title>
		<link>http://www.apparitor.info/2011/04/06/%e8%ae%a9bind%e6%94%af%e6%8c%81sqlite%e6%95%b0%e6%8d%ae%e5%ba%93/</link>
		<comments>http://www.apparitor.info/2011/04/06/%e8%ae%a9bind%e6%94%af%e6%8c%81sqlite%e6%95%b0%e6%8d%ae%e5%ba%93/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 05:50:39 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Dns]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=187</guid>
		<description><![CDATA[Bind 主页： http://www.isc.org 一、安装Sqlite Sqlite 主页： http://www.sqlite.org/ # wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz # tar zxvf sqlite-autoconf-3070500.tar.gz # cd sqlite-autoconf-3070500 # ./configure # make &#38;&#38; make install 二、安装bind # wget http://ftp.isc.org/isc/bind9/9.7.3/bind-9.7.3.tar.gz # tar zxvf bind-9.7.3.tar.gz # cd bind-9.7.3 看一下sqlite的README说明现在Bind已经支持sqlite这种数据库的方式。 #cat contrib/sdb/sqlite/README.sdb_sqlite # vi bin/named/main.c 找到： /* xxdb_init(); */ 改为： sqlitedb_init(); 找到： /* xxdb_clear(); */ 改为： sqlitedb_clear(); # vi]]></description>
			<content:encoded><![CDATA[<p>Bind 主页：</p>
<p>http://www.isc.org</p>
<p>一、安装Sqlite<br />
Sqlite 主页： http://www.sqlite.org/</p>
<pre> # wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz
        # tar zxvf sqlite-autoconf-3070500.tar.gz
        # cd sqlite-autoconf-3070500
        # ./configure
        # make &amp;&amp; make install</pre>
<p><span id="more-187"></span><br />
二、安装bind</p>
<pre># wget http://ftp.isc.org/isc/bind9/9.7.3/bind-9.7.3.tar.gz
        # tar zxvf bind-9.7.3.tar.gz
        # cd bind-9.7.3
        看一下sqlite的README说明现在Bind已经支持sqlite这种数据库的方式。
        #cat contrib/sdb/sqlite/README.sdb_sqlite</pre>
<pre># vi bin/named/main.c
        找到：
               /* xxdb_init(); */
        改为：
                sqlitedb_init();
        找到：
                /* xxdb_clear(); */
        改为：
                sqlitedb_clear();</pre>
<pre># vi bin/named/Makefile.in
        找到：
                DBDRIVER_OBJS =
                DBDRIVER_SRCS =
                DBDRIVER_INCLUDES =
                DBDRIVER_LIBS =
        改为：
                DBDRIVER_OBJS = sqlitedb.o
                DBDRIVER_SRCS = sqlitedb.c
                DBDRIVER_INCLUDES =
                DBDRIVER_LIBS = -lsqlite3</pre>
<p>拷贝所需的文件到编译目录</p>
<pre># cp contrib/sdb/sqlite/sqlitedb.* bin/named/
        # cp contrib/sdb/sqlite/sqlitedb.h bin/named/
        # ./configure '--prefix=/usr/local/bind' '--enable-threads' '--disable-openssl-version-check'
        # make &amp;&amp; make install</pre>
<p>三、配置bind</p>
<pre># mkdir /var/named
        # cd /var/named
        生成根域的配置文件
        # dig -t NS. &gt; named.root
        生成rndc的配置文件
        # /usr/local/bind/sbin/rndc-confgen | tail -10 | sed 's/^#//g' &gt;&gt; /usr/local/bind/etc/named.conf</pre>
<p>生成本地zone文件。</p>
<pre># vi localhost.zone
                $TTL86400
                $ORIGIN localhost.
                @1D IN SOA@ root (
                                                2011030342; serial (d. adams)
                                                3H; refresh
                                                15M; retry
                                                1W; expiry
                                                1D ); minimum

                1D 	IN 		NS		@
                1D 	IN 		A		127.0.0.1</pre>
<p>生成本地反解文件</p>
<pre># vi  named.local
                $TTL86400
                $ORIGIN localhost.
                @1D IN SOAlocalhost. root.local. (
                                                2011030342; serial (d. adams)
                                                3H; refresh
                                                15M; retry
                                                1W; expiry
                                                1D ); minimum

                1D 	IN		NS		localhost.
                1D 	IN 		PTR	localhost.</pre>
<p>named.conf的配置文件。</p>
<pre> # vi /usr/local/bind/etc/named.conf
                logging {
                        channel "my_default_channel" {
                        file "/u01/Log/default.log" versions 3 size 20m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };
                        channel "my_general_channel" {
                        file "/u01/Log/general.log" versions 3 size 20m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };

                        channel "my_security_channel" {
                        file "/u01/Log/security.log" versions 3 size 20m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };

                        channel "my_config_channel" {
                        file "/u01/Log/config.log" versions 3 size 20m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };

                        channel "my_xfer-in_channel" {
                        file "/u01/Log/xfer-in.log" versions 3 size 20m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };

                        channel "my_xfer-out_channel" {
                        file "/u01/Log/xfer-out.log" versions 3 size 20m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };

                        channel "my_notify_channel" {
                        file "/u01/Log/notify.log" versions 3 size 20m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };

                        channel "my_client_channel" {
                        file "/u01/Log/client.log" versions 3 size 20m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };

                        channel "my_update_channel" {
                        file "/u01/Log/update.log" versions 3 size 20m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };

                        channel "my_queries_channel" {
                        file "/u01/Log/queries.log" versions 9 size 400m;
                        severity info;
                        print-time yes;
                        print-category yes;
                        };

                        category "default"{ "my_default_channel"; };
                        category "general" { "my_general_channel"; };
                        category "security" { "my_security_channel";};
                        category "config" { "my_config_channel"; };
                        category "xfer-in" { "my_xfer-in_channel"; };
                        category "xfer-out" { "my_xfer-out_channel";};
                        category "notify" { "my_notify_channel"; };
                        category "client" { "my_client_channel"; };
                        category "update" { "my_update_channel"; };
                        category "queries" { "my_queries_channel";};
                }; 

         options {
                        directory "/var/named/";
          };

          key "rndc-key" {
                         algorithm hmac-md5;
                         secret "JEix1IY/3kASL5CHmhkL1g==";
          };  

          controls {
                         inet 127.0.0.1 port 953
                         allow { 127.0.0.1; } keys { "rndc-key"; };
          };

          zone "." IN {
                         type hint;
                        file "named.root";
          };

          zone "localhost" IN {
                        type master;
                        file "localhost.zone";
          }; 

          zone "0.0.127.in-addr.arpa" IN {
                         type master;
         		 file "named.local";
           };

           zone "test1.com" IN {
                        type master;
                        database "sqlite /var/named/test1.com.zone test1";</pre>
<p>};</p>
<p>四、创建sqlites数据库。</p>
<pre> # sqlite3 test1.com.zone
          SQLite version 3.7.5
          Enter ".help" for instructions
          Enter SQL statements terminated with a ";"
          sqlite&gt; CREATE TABLE test1 (
             ...&gt; name varchar(255) default NULL,
             ...&gt; ttl int(11) default NULL,
             ...&gt; rdtype varchar(255) default NULL,
             ...&gt; rdata varchar(255) default NULL
             ...&gt; );

          sqlite&gt; INSERT INTO test1 VALUES ('test1.com', 259200, 'SOA', 'test1.com. www.test1.com. 200309181 28800 7200 86400 28800');
          sqlite&gt; INSERT INTO test1 VALUES ('test1.com', 259200, 'NS', 'ns0.test1.com.');
          sqlite&gt; INSERT INTO test1 VALUES ('ns0.test1.com', 259200, 'A', '10.101.10.35');
          sqlite&gt; INSERT INTO test1 VALUES ('test1.com', 259200, 'MX', '10 mail.test1.com.');
          sqlite&gt; INSERT INTO test1 VALUES ('w0.test1.com', 259200, 'A', '192.168.1.1');
          sqlite&gt; INSERT INTO test1 VALUES ('w1.test1.com', 259200, 'A', '192.168.1.2');
          sqlite&gt; INSERT INTO test1 VALUES ('www.test1.com', 259200, 'CNAME', 'w0.test1.com.');
          sqlite&gt; .exit</pre>
<p>五、测试<br />
看看输出的信息有无异常。</p>
<pre># /usr/local/bind/sbin/named -g</pre>
<p>用big命令测试。</p>
<pre># dig @10.101.10.35 w0.test1.com</pre>
<p>bind的日志输出<br />
02-Mar-2011 19:32:42.938 client 10.101.10.200#34066: query: w0.test1.com IN A + (10.101.10.35)</p>
<p>感谢：<br />
本文参考badb0y的文章<br />
http://blog.chinaunix.net/space.php?uid=405749&amp;do=blog&amp;id=27472
<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/04/06/%e8%ae%a9bind%e6%94%af%e6%8c%81sqlite%e6%95%b0%e6%8d%ae%e5%ba%93/">让Bind支持sqlite数据库</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/04/06/%e8%ae%a9bind%e6%94%af%e6%8c%81sqlite%e6%95%b0%e6%8d%ae%e5%ba%93/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BIND 服务安装</title>
		<link>http://www.apparitor.info/2011/04/06/bind-%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85/</link>
		<comments>http://www.apparitor.info/2011/04/06/bind-%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 01:18:07 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Dns]]></category>
		<category><![CDATA[bind]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=178</guid>
		<description><![CDATA[BIND 服务安装 一、安装 # wget ftp://ftp.isc.org/isc/9/9.6.1b1/-9.6.1b1.tar.gz # tar zxvf bind-9.6.1b1.tar.gz # cd bind-9.6.1b1.tar.gz # ./configure –desable-ipv6 # make # make install 二、配置文件 根的13台服务器 # dig -t NS. #这个是显示13台根服务器。 # Dig -t NS. &#62; /var/named/named.ca #根服务器的文件 &#62; 1.1建立named.conf主配置文件 # vi /var/named/named.ca options { directory “/var/named/”; }; zone “.” { type hint; file “named.ca”; }; 1.2生成rndc服务器配置文件。 #]]></description>
			<content:encoded><![CDATA[<p>BIND 服务安装</p>
<p>一、安装</p>
<pre># wget ftp://ftp.isc.org/isc/9/9.6.1b1/-9.6.1b1.tar.gz
# tar zxvf bind-9.6.1b1.tar.gz
# cd bind-9.6.1b1.tar.gz
# ./configure –desable-ipv6
# make
# make install</pre>
<p>二、配置文件<br />
<span id="more-178"></span>根的13台服务器</p>
<pre># dig -t NS. #这个是显示13台根服务器。
# Dig -t NS. &gt; /var/named/named.ca #根服务器的文件</pre>
<p>&gt;</p>
<p>1.1建立named.conf主配置文件</p>
<pre># vi /var/named/named.ca

options {
	directory “/var/named/”;
};
zone “.” {
	type hint;
	file “named.ca”;
};</pre>
<p>1.2生成rndc服务器配置文件。</p>
<pre># /usr/local/named/sbin/rndc-confgen | tail -10 &gt; /tmp/rndc.conf
# sed -i s/^#//g /tmp/rndc.conf &gt;&gt; /var/named/named.conf</pre>
<p>1.3现在named.conf的配置文件大概是这样。</p>
<pre># cat /etc/named.conf
options {
	directory “/var/named/”;
};
zone “.” {
	type hint;
	file “named.ca”;
};
key “rndc-key” {
	algorithm hmac-md5;
	secret “iXWJniRhmLzikv5zGt8+oQ==”;
};
controls {
	inet 127.0.0.1 port 953
	allow { 127.0.0.1; } keys { “rndc-key”; };
};</pre>
<p>1.4测试<br />
代码:</p>
<pre># /usr/local/named/sbin/named -c /var/named/named.conf
# tail -30 /var/log/messages	 #看一下日志有什么错误。
# lsof -i:53	 #看一下端口是否正常

# /usr/local/named/sbin/named -c /var/named/named.conf
# tail -30 /var/log/messages #看一下日志有什么错误。

# lsof -i:53 #看一下端口是否正常
# dig @10.10.11.121 www.google.com ＃测试一下是否能解析出来，10.10.11.121是你named的IP地址。</pre>
<pre># vi /var/named/named.conf

options {
	directory “/var/named/”;
	version “0.0.0″;
	allow-transfer { 192.168.1.6; };
	forwarders { 192.168.1.1; };
};
logging {
	channel dns_errors
		{ file “/var/log/named/err_logs” versions 3 size 10m;
		severity error;
		print-category yes;
		print-severity yes;
		print-time yes;
	};
	channel dns_queries
		{ file “/var/log/named/query_logs” versions 3 size 10m;
		severity info;
		print-category yes;
		print-severity yes;
		print-time yes;
	};
	category default { dns_errors; };
	category queries { dns_queries; };
};

zone “.” {
	type hint;
	file “named.ca”;
};

zone “localhost” {
	type master;
	file “named.local”;
};

zone “0.0.127.IN-addr.arpa” {
	type master;
	file “named.rev”;
};

zone “apparitor.com” {
	type master;
	file “apparitor.com.zone”;
};

key “rndc-key” {
	algorithm hmac-md5;
	secret “iXWJniRhmLzikv5zGt8+oQ==”;
};

controls {
	inet 127.0.0.1 port 953
	allow { 127.0.0.1; } keys { “rndc-key”; };
};</pre>
<pre># vi /var/named/named.local
@ 1D IN SOA localhost. root.localhost. (
							20070301
							1H
							15M
							1W
							1D )
		IN 		NS 		@
		IN 		A 			127.0.0.1</pre>
<pre># vi /var/named/named.rev
@ 1D IN SOA localhost. root.localhost. (
							20070301
							1H
							15M
							1W
							1D )

		IN		NS 		localhost.
1 		IN 		PTR 		localhost.</pre>
<pre># vi /var/named/apparitor.com.zone
$TTL 180
@ IN SOA ns1.apparitor.com. root.apparitor.com. (
							200810241006 ; serial (d. adams)
					3H ; refresh
					15M ; retry
					1W ; expiry
					1D ) ; minimum

@		 IN 		NS 		ns1.apparitor.com.
ns1 	 IN 		A 			10.10.11.121
cname	 IN		A 			10.10.11.128
www 	IN 		A 			10.10.11.128
www1 	IN 		CNAME 	cname</pre>
<p>1.6创建日志文件</p>
<pre># mkdir /var/log/named
# touch /var/log/named/err_logs
# touch /var/log/named/query_logs</pre>
<p>二、测试<br />
杀掉named进程</p>
<pre># kill -9 `pidof named`
# /usr/local/named/sbin/named -c /var/named/named.conf
# dig @10.10.11.121 www.apparitor.com
# dig @10.10.11.121 www1.apparitor.com</pre>
<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/04/06/bind-%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85/">BIND 服务安装</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/04/06/bind-%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BIND 压力测试软件 &#8211;queryperf</title>
		<link>http://www.apparitor.info/2011/04/02/bind-%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95%e8%bd%af%e4%bb%b6-queryperf/</link>
		<comments>http://www.apparitor.info/2011/04/02/bind-%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95%e8%bd%af%e4%bb%b6-queryperf/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 10:07:15 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Dns]]></category>
		<category><![CDATA[bind]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=174</guid>
		<description><![CDATA[BIND 压力测试软件 &#8211;queryperf bind的本身就自带压测软件，只是默认编译的时候不被编译。 Bind 主页： http://www.isc.org 1、下载bind软件， # wget http://ftp.isc.org/isc/bind9/9.7.3/bind-9.7.3.tar.gz # tar zxvf bind-9.7.3.tar.gz # cd bind-9.7.3/contrib/queryperf/ 2、安装queryperf 看一下README 说的很想详细。 # ./configure # make 编译完之后会生成queryperf 文件。 使用方法： # queryperf -d input_file -s server input_file:压力测试的时候读取的文件， 格式： www.turku.fi A www.helsinki.fi A server:要测试dns服务器的IP。 原创文章，转载请注明： 转载自gjw_apparitor 博客 本文链接地址: BIND 压力测试软件 &#8211;queryperf]]></description>
			<content:encoded><![CDATA[<p>BIND 压力测试软件 &#8211;queryperf</p>
<p>bind的本身就自带压测软件，只是默认编译的时候不被编译。<br />
Bind 主页：</p>
<p>http://www.isc.org</p>
<p>1、下载bind软件，</p>
<pre># wget http://ftp.isc.org/isc/bind9/9.7.3/bind-9.7.3.tar.gz
        # tar zxvf bind-9.7.3.tar.gz
        # cd bind-9.7.3/contrib/queryperf/</pre>
<p><span id="more-174"></span>2、安装queryperf<br />
看一下README 说的很想详细。</p>
<pre># ./configure
# make</pre>
<p>编译完之后会生成queryperf 文件。<br />
使用方法：</p>
<pre># queryperf -d input_file -s server
 input_file:压力测试的时候读取的文件，
          格式： www.turku.fi A
                 www.helsinki.fi A
 server:要测试dns服务器的IP。</pre>
<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/04/02/bind-%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95%e8%bd%af%e4%bb%b6-queryperf/">BIND 压力测试软件 &#8211;queryperf</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/04/02/bind-%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95%e8%bd%af%e4%bb%b6-queryperf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

