:DNS实验

Yum install bind-y 
systemctl stop firewalld	
setenforce 0
vim /etc/named.conf
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;
};
};
systemctl	restart	named
上一篇:Anaconda安装的python环境中“No module named pip” 和 “ ‘pip‘ is a package and cannot be directly executed”问题


下一篇:DNS正向解析与反向解析