Preface:If you are lucky to be seen by a friend and find something wrong in this article, you may want to criticize and correct it. If you have any questions, we hope you can discuss them together.
Because I have not registered a valid domain name, I only need to configure the DNS server in my LAN.
DNS Environment Planning
Vm ip Address: 10.170.2.10 master DNS Server
Software required to build a DNS server: bind
Set the master configuration file/etc/named. conf
# Vim/etc/named. conf
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/44/B4/wKiom1PiRHiTCq_-AAHaX6gACdc114.jpg "Title =" Figure 1 "alt =" wKiom1PiRHiTCq_-AAHaX6gACdc114.jpg "/>
Configuration area configuration file/etc/named. rfc1912.zones
# Vim/etc/named. rfc1912.zones
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/44/88/wKiom1Ph45yRw5AjAAC6Nazgg6s873.jpg "Title =" Figure 2 "alt =" wkiom1ph45yrw5ajaac6nazgg6s873.jpg "/>
Configure the forward solution database file/var/named/muluhe.com. Zone
# Vim/var/named/muluhe.com. Zone
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/44/B4/wKiom1PiQ8zDukkrAAFAIXWvTRE952.jpg "Title =" Figure 3 "alt =" wkiom1piq8zdukkraafaixwvtre952.jpg "/>
Configure the reverse database file/var/named/10.170.2.zone
# Vim/var/named/10.170.2.zone
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/44/B4/wKiom1PiRASzShMVAAFE7nbiVBA365.jpg "Title =" Figure 4 "alt =" wkiom1piraszshmvaafe7nbivba365.jpg "/>
DNS startup and Testing
It's really easy to start the DNS service. You can do it with one command:
# Service named restart
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/44/8C/wKioL1Ph6wSy93TXAABppIcBVs4897.jpg "Title =" Figure 5 "alt =" wkiol1ph6wsy93txaabppicbvs4897.jpg "/>
To enable Automatic startup next time, run the command: # chkconfig named on
Next, we will test the above important positive and reverse information.
Positive Test
# Dig-t a www.muluhe.com @ 10.170.2.10
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/44/8B/wKiom1Ph6giAhEgOAANoHx_NYdg980.jpg "Title =" Figure 6 "alt =" wkiom1ph6giahegoaanohx_nydg980.jpg "/>
# Dig-T axfr muluhe.com @ 10.170.2.10
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/44/8C/wKioL1Ph61_TyHPAAARDYvivQW8435.jpg "Title =" Figure 7 "alt =" wkiol1ph61_tyhpa1_dyvivqw8435.jpg "/>
Reverse Test
# Dig-x 10.170.2.150 @ 10.170.2.10
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/44/8C/wKioL1Ph65OA08G3AAM3ZhRXoUU137.jpg "Title =" Fig 8 "alt =" wkiol1ph65oa08g3aam3zhrxouu137.jpg "/>
# Dig-T axfr 2.170.10.in-ADDR. Arpa @ 10.170.2.10
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/44/8D/wKioL1Ph66ux-iw2AARFbYc2sEs569.jpg "Title =" Fig 9 "alt =" wKioL1Ph66ux-iw2AARFbYc2sEs569.jpg "/>
Conclusion: This is only the basic configuration of the DNS server, and does not consider security issues.