#yum install-y Bind
#vi/etc/named.conf
(1) Make the following changes to the named.conf file
Listen-on Port: (any;}; #默认修改位any
Listen-on-v6 Port 53 {:: 1;}; #注释掉本行, add "//" to the beginning of the line
allow-query {any;}; #默认修改位any
Dnssec-lookaside Auto;
: Wq #保存退出
#vi Named.rfc1912.zones
(1) Make the following changes in the Named.rfc1912.zones file
Zone "Yes.com" in {
Type master;
File "Yes.com.zone";
};
Zone "94.168.192.in-addr.arpa" in {
Type master;
File "192.168.94.zone";
};
: Wq #保存退出
#cp/var/named/named.localhost/var/named/yes.com.zone
#cp/var/named/named.loopback/var/named/192.168.94.zone
#vi/var/named/yes.com.zone
(1) Make the following changes to Yes.com.zone
@ in SOA ns.yes.com admin.yes.com. (
0; Serial
1D; Refresh
1H; Retry
1W; Expire
3H); Minimum
In NS NS
In AAAA:: 1
www in A 192.168.94.128
ZS in A 192.168.94.129
: Wq #保存退出
#vi 192.168.94.zone
(1) Make the following changes to 192.168.94.zone
$TTL 1D
@ in SOA yes.com admin.yes.com. (
0; Serial
1D; Refresh
1H; Retry
1W; Expire
3H); Minimum
NS @
A 127.0.0.1
AAAA:: 1
7 in PTR www.yes.com
7 in PTR zs.yes.com
#service iptables Stop
#service named restart
#chmod 755/var/named/*
#vi/etc/resolv.conf
Change the last line to NameServer 192.168.94.128
#ping www.yes.com
#ping zs.yes.com
College intranet Access Educational system: http://192.168.100.224:8084/loginAction.do
Linux Fundamentals and Applications tutorial 0011 (DNS resolution)