作业:配置dns主从服务器解析qq.com域下的所有主机名例如:www.qq.com aaa.qq.com bbb.qq.com …】
服务端
1.安装服务包
yum install bind -y
2.更改配置自定解析域(qq.com)
listen-on port 53{ 192.168.243.129 };
directory “/var/named";
allow-query{any;}
};
zone"qq.com"IN{
type master;
file"named.qq.com";
};
3.cp /var/named.localhost /var/named/named.baidu.com
vim /var/named/named.baidu.com
$TTL 1D
@ IN SOA @ rname.invalid.(
0
1D
1H
1W
3H)
NS dns.qq.com
dns IN A 192.168.243.129
www IN A 192.168.243.100
aaa IN A 192.168.243.10
bbb IN A 192.168.243.12
3.重启服务
systemctl restart named
systemctl status named -l
客户端主机
1.nmcli connection modify ens160 ipv4.dns 自定义服务器ip
nmcli connection up ens160
2.vim /etc/resolv.conf
3.nameserver 自定义服务器ip
rhce第五次作业
最新推荐文章于 2023-11-30 20:28:16 发布