options {
listen-on port 53 { 192.168.203.128;};
directory "/var/named";
allow-query { any; };
};
zone "qq.com" IN {
type master;
file “named.qq.com";
};
cd /var/named
cp named.localhost named.qq.com
vim named.qq.com
$TTL1D
@ IN SQA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimumm
NS dns.qq.com
WWW IN A 127.24.8.100
dns IN A 172.24.8.100
systemctl restart named
cd /var/named
chmod o+r named.qq.com
systemctl restart named
nslookup
vim /etc/named.conf
options {
listen-on port 53 { 192.168.203.128;};
directory "/var/named";
allow-query { any; };
};
acl"china"{ 192.168.24.128; }
acl"america"{ 192.168.24.128; }
view"china"
{ match-clients{"china;"};
zone "qq.com" IN {
type master;
file “named.qq.com";
notify yes;
};
};
view"america"
{ match-clients{"america;"};
zone "qq.com" IN {
type master;
file “named.qq.com";
notify yes;
};
};