修改配置文件
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33
重启网卡,查看
[root@localhost ~]# systemctl restart network
[root@localhost ~]# ifconfig
安装bind bind-chroot
[root@localhost ~]# yum -y install bind bind-chroot
更改配置文件
[root@localhost ~]# vim /etc/named.conf
[root@localhost ~]# vim /etc/named.rfc1912.zones
[root@localhost ~]# cd /var/named/
[root@localhost named]# cp -p named.localhost zx.com.zone
[root@localhost named]# cp -p named.localhost 192.168.2.zone
[root@localhost named]# vim zx.com.zone
[root@localhost named]# vim 192.168.2.zone
检测
[root@localhost named]# named-checkzone zx.com.zone 192.168.2.zone
关闭防火墙,降低沙盒等级,启动服务
[root@localhost named]# systemctl restart named
[root@localhost named]# systemctl stop firewalld
[root@localhost named]# setenforce 0
安装bind-utils
[root@localhost named]# yum -y install bind-utils
测试正反向解析
[root@localhost named]# nslookup www.zx.com
[root@localhost named]# nslookup 192.168.2.33