Cent OS VM 无法通过 nslookup 解析 DNS?!所有区域/conf 确定

Cent OS VM 无法通过 nslookup 解析 DNS?!所有区域/conf 确定

我在 VMWare 中的 NAT 上进行了虚拟设置,并使用 Cent 操作系统作为 DNS 服务器(192.168.102.159),我通过绑定命名运行了区域和配置测试,所有结果都正常,当我从客户端运行 nslookup 时,我得到:

nslookup
> server 192.168.102.159
Default server: 192.168.102.159
Address: 192.168.102.159#53

对于反向查找我得到:

nslookup ns1.abc.local
Server:     192.168.102.2
Address:    192.168.102.2#53
** server can't find ns1.abc.local: NXDOMAIN

配置文件 ifcfg-ens33

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=c39a3132-fecb-4688-aa6a-b83e4d8f09a3
DEVICE=ens33
HOSTNAME=ns2
IPADDR=192.168.102.159
SUBNETMASK=255.255.255.0
ADAPTER=ens33
GATEWAY=192.168.102.2
DNS1="192.168.102.2
NM_CONTROLLED=no
ONBOOT=yes

命名配置文件

acl internals { 192.168.102.0/24;  };
options {
        listen-on port 53 { 127.0.0.1; 192.168.102.159; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        recursing-file  "/var/named/data/named.recursing";
        secroots-file   "/var/named/data/named.secroots";
        allow-query     { localhost; internals; };

        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;

        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";

        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "abc.local" { type master; file "abc.db"; };

zone "102.168.192.IN-ADDR.ARPA" { type master; file "cba.db"; };

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

abc.db

$TTL 3H
$ORIGIN abc.local.

@       IN SOA ns1.abc.local. admin.abc.local. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        IN NS ns1.abc.local.

ns1     IN A 192.168.102.159

篮球协会数据库

$TTL 3H
$ORIGIN 102.168.192.IN-ADDR.ARPA.

@       IN SOA ns1.abc.local. admin.abc.local. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        IN NS ns1.abc.local.

100     IN PTR ns1.abc.local.

区域和会议检查报告

[root@localhost ~]# named-checkzone 102.168.192.in-addr.arpa /var/named/cba.db
zone 102.168.192.in-addr.arpa/IN: loaded serial 0
OK
[root@localhost ~]# named-checkzone abc.local /var/named/abc.db
zone abc.local/IN: loaded serial 0
OK
[root@localhost ~]# named-checkconf
[root@localhost ~]# 

防火墙配置为:

iptables -A INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT

答案1

谢谢托马斯先生,问题已经解决了,显然,我太投入了,以至于我什至忘记了我正在使用一台未正确配置的机器来检查 DNS,即使客户端位于 NAT 网络中,也没有发出Cent OS 服务器使用 DHCP,因此它也没有任何 DNS 配置,我通过手动添加条目来测试客户端。最后,我像以前一样通过腻子对其进行了测试,正向和反向查找都成功解析。感谢大家的指导和时间,非常感谢。

相关内容