RedHat dns bind configuration details

Source: Internet
Author: User
Tags domain name server
ArticleDirectory
    • I. Software Packages
I. Software Packages

1. bind-9.5.0b2.tar.gz

2. openssl-0.9.8o.tar.tar

Ii. Installation Steps

1. Tar zxvf openssl-0.9.8o.tar.tar

2. CD openssl-0.9.8o

3../config-Prefix =/usr/local/OpenSSL

4. Make

5. Make install

6. Tar zxvf bind-9.5.0b2.tar.gz

7. CD bind-9.5.0b2

8 ../configure-Prefix =/usr/local/named-with-OpenSSL =/usr/local/OpenSSL-enable-threads

9. Make

10. make install

11. CD/usr/local/named

12. sbin/rndc-confgen> ETC/rndc. conf

13. Tail-10 ETC/rndc. conf | head-9 | sed S/# \ // G> etc/named. conf

14. CD etc

15. VI named. conf

16. Enter the following content

17. Key "rndc-key "{

18. algorithm hmac-md5;

19. Secret "le6alaappjaybiqsaqqqhq = ";

20 .};

21.

22. Controls {

23. Inet 127.0.0.1 port 953

24. Allow {127.0.0.1;} Keys {"rndc-key ";};

25 .};

26.

27. Options {

28. directory "/var/named"; // absolute path for storing domain name files

29. PID-file "named. PID"; // If BIND is started, a named. PID file is automatically generated in the/var/named directory. The opened file is the ID of the named process.

30 .};

31.

32. Zone "." In {

33. Type hint; // Root Domain Name Server

34. File "named. Root"; // stored in the/var/named directory. The file name is named. Root.

35 .};

36.

37. Zone "localhost" in {

38. Type master; // type-Based Domain Name Server

39. File "localhost. Zone"; // locally parsed File

40. Allow-update {none ;};

41 .};

42.

43. Zone "0.0.127.in-ADDR. Arpa" in {

44. Type master; // type-Based Domain Name Server

45. File "named. Local"; // file for reverse resolution

46. Allow-update {none ;};

47 .};

48.

49. Zone "test.com" in {// create the test.com domain

50. Type master;

51. File "test. Zone"; // test.com domain ing IP address can be written in this file

52. Allow-update {none ;};

53 .};

54.

55.

56. Zone "1.168.192.in-ADDR. Arpa" in {// reverse resolution

57. Type master;

58. File "test. Local"; // stores reverse resolution files.

59. Allow-update {none ;};

60 .};

61.

62. Zone "witer666.com" in {// create the test.com domain

63. Type master;

64. File "witer666.zone"; // test.com domain ing IP address can be written in this file

65. Allow-update {none ;};

66 .};

67.

68.

69. Zone "Limit 192.in-ADDR. Arpa" in {// reverse resolution

70. Type master;

71. File "witer666.local"; // stores reverse resolution files.

72. Allow-update {none ;};

73 .};

74. mkdir/var/named

75. CD/var/named

76. VI localhost. Zone

77. Enter the following content

78. $ TTL 86400

79. $ origin localhost.

80. @ 1D in SOA @ root (

81. 42; Serial (D. Adams)

82. 3 h; refresh

83. 15 m; retry

84. 1 W; expiry

85. 1D); Minimum

86.

87. 1D in NS @

88. 1D in a 127.0.0.1

89. VI named. Local

90. Enter the following content

91. $ TTL 86400

92. @ in SOA localhost. Root. localhost .(

93. 1997022700; Serial

94. 28800; refresh

95. 14400; retry

96. 3600000; expire

97. 86400); Minimum

98. In NS localhost.

99. 1 In PTR localhost.

100. VI named. Root

101. ftp://rs.internic.net/domain/download the latest named.rootfile content

102. VI test. Zone

103. Enter and save the following content

104. $ TTL 1d

105. @ in SOA test.com. root.test.com .(

106. 1053891162

107. 3 H

108. 15 m

109.

110. 1D)

111. In NS test.com.

112. In MX 5 test.com.

113. WWW in a 192.168.1.100

114. WWW in a 192.168.1.102

115. News in a 192.168.1.101

116. China in a 198.182.196.56

117. VI test. Local

118. Enter the following content to save

119. $ TTL 86400

120. @ in SOA test.com. root.test.com .(

121. 20031001;

122. 7200;

123. 3600;

124. 43200;

125. 86400 );

126. @ in NS test.com.

127. 100 in PTR www.test.com.

128. VI witer666.local

129. Enter and save the following content

130. $ TTL 86400

131. @ in SOA witer666.com. root.witer666.com .(

132. 20031001;

133. 7200;

134. 3600;

135. 43200;

136. 86400 );

137. @ in NS witer666.com.

138. 100 in PTR www.witer666.com.

139. VI witer666.zone

140. Enter and save the following content

141. $ TTL 1d

142. @ in SOA test.com. root.witer666.com .(

143. 1053891166

144. 3 H

145. 15 m

146.

147. 1D)

148. In NS witer666.com.

149. In MX 5 witer666.com.

150. WWW in a 192.168.2.100

151. WWW in a 192.168.2.102

152. News in a 192.168.2.101

153. China in a 192.168.2.58

154. Echo "nameserver 211.71.191.26">/etc/resolv. conf // configure the local machine DNS server as the local machine IP Address

155. Start named

156./usr/local/named/sbin/named &

157. Check for any error message

158. Tail/var/log/message

159. Jun 25 14:28:48 localhost named [18506]: zone created 192.in-ADDR. Arpa/In: loaded serial 20031001

160. Jun 25 14:28:48 localhost named [18506]: Zone test.com/in: NS 'test. com' has no address records (A or AAAA)

161. Jun 25 14:28:48 localhost named [18506]: Zone test.com/in: test.com/mx 'test. com' has no address records (A or AAAA)

162. Jun 25 14:28:48 localhost named [18506]: Zone test.com/in: loaded serial 1053891162

163. Jun 25 14:28:48 localhost named [18506]: Zone witer666.com/in: NS 'witer666. com 'has no address records (A or AAAA)

164. Jun 25 14:28:48 localhost named [18506]: Zone witer666.com/in: witer666.com/mx 'witer666. com' has no address records (A or AAAA)

165. Jun 25 14:28:48 localhost named [18506]: Zone witer666.com/in: loaded serial 1053891166

166. Jun 25 14:28:48 localhost named [18506]: Zone localhost/In: loaded serial 42

167. Jun 25 14:28:48 localhost named [18506]: Running [normal startup]

168. Jun 25 14:28:48 localhost named [18506]: Zone witer666.com/in: sending notifies (Serial 1053891166)

169. Host www.witer666.com check whether forward resolution is normal

170. The displayed content is as follows:

171. www.witer666.com has address 192.168.2.100

172. www.witer666.com has address 192.168.2.102

173. Check whether reverse resolution is normal for dig-x 192.168.2.100

174. The displayed content is as follows:

175.

176.; <> dig 9.7.1 <>-x 192.168.2.100

177.; Global Options: + cmd

178.; got answer:

179.;-> header <-opcode: Query, status: noerror, ID: 63485

180.; flags: qr aa rd ra; query: 1, answer: 1, authority: 1, Additional: 0

181.

182.; question Section:

183.; 100.20.192.in-ADDR. ARPA. In PTR

184.

185.; answer section:

186. 100.20.192.in-ADDR. ARPA. 86400 in PTR www.witer666.com.

187.

188.; Authority section:

189. ipv192.in-ADDR. ARPA. 86400 in NS witer666.com.

190.

191.; query time: 0 msec

192.; server: 211.71.191.26 #53 (211.71.191.26)

193 ..; When: Fri Jun 25 14:31:13 2010

194.; MSG size rcvd: 88

195. DNS server configuration is OK, everything is normal

Iii. Related commands

1./usr/local/named/sbin/named &

2. Host www.test.com

3. NSLookup www.test.com

4. Dig-x 192.168.2.100

5./usr/local/named/sbin/rndc reload

6. Ping 192.168.2.100

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.