配置网卡
[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33
重启网卡并查看
[[email protected] ~]# sysrtemctl restart network
[[email protected] ~]# ifconfig ens33
安装bind bind-chroot
[[email protected] ~]# yum -y install bind bind-chroot
修改配置
[[email protected] ~]# vim /etc/named.conf
[[email protected] ~]# vim /etc/named.rfc1912.zones
移动到named下 做备份
[[email protected] ~]# cd /var/named/
[[email protected] ~]# cp -p named.localhost abc.com.zone
[[email protected] ~]# cp -p named.localhost 192.168.1.zone
[[email protected] ~]# vim abc.com.zone
[[email protected] ~]# vim 192.168.1.zone
检验
[[email protected] named]# named-checkzone abc.com.zone 192.168.1.zone
zone abc.com.zone/IN: loaded serial 0
OK
关闭防火墙,降低沙盒 并启动
[[email protected] named]# systemctl restart named
[[email protected] named]# systemctl stop firewalld
[[email protected] named]# setenforce 0
安装bind-utils
[[email protected] named]# yum -y install bind-utils
测试正反向解析
[[email protected] named]# nslookup www.abc.com
[[email protected] named]# nslookup 192.168.1.143
相关文章: