配置DNS服务正反向解析
关闭防火墙和selinux
[root@localhost ~]# systemctl stop firewalld
[root@localhost~]# setenforce 0
通过yum管理安装named软件包
重启服务
[root@localhost ~]# systemctl start named
[root@localhost ~]# systemctl is-active named
active
配置文件
[root@localhost~]# vim /etc/named.conf
options {
listen-on port 53 { 192.168.136.100; };
directory "/var/named";
allow-query { any; };
include "/etc/crypto-policies/back-ends/bind.config";};
zone "qq.com" IN {
type master;
file "named.qq.com";
};
zone "136.168.192.in-addr.arpa" IN {
type master;
file "named.qq.com";
};
include "/etc/named.rfc1912.zones";
重启服务
[root@localhost ~]# systemctl restart named
正向解析
反向解析
[root@localhost ~]# nslookup
> 192.168.136.100