【问题标题】:Server can't find: SERVFAIL or REFUSE DNS服务器找不到:SERVFAIL 或 REFUSE DNS
【发布时间】:2015-09-24 16:05:26
【问题描述】:

我正在尝试使用 Debian 设置 DNS 服务器,但是当我执行 SERVFAIL 或 REFUSED 等 nslookup 时,我不断收到错误消息。 我想使用 3 个虚拟机(VM1、VM2 和 VM3)并通过 DNS 服务器中的这些名称调用它们,我使用的是 VMWare Workstation 11。

这是我的配置:

named.conf.options

options {
directory "/var/cache/bind";
additional-from-auth no;
additional-from-cache no;

// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

// If your ISP provided one or more IP addresses for stable 
// nameservers, you probably want to use them as forwarders.  
// Uncomment the following block, and insert the addresses replacing 
// the all-0's placeholder.

 forwarders {
    192.168.207.2;
    192.168.207.133;
};

//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys.  See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation yes;
allow-recursion{127.0.0.1;};
auth-nxdomain no;    # conform to RFC1035
listen-on-v6 { any; };
};

named.conf.local

    zone "linux.local"{
    type master;
    file "etc/bind/db.linux.local";
};

zone "207.168.192-in-addr.arpa"{
    type master;
    file "etc/bind/db.207.168.192";
};

db.linux.local

;
; SOA 
; 
$TTL 1h 
@   IN SOA vm1.linux.local. root.linux.local. ( 
        1 ; Serial number (YYYYMMDDnn) 
        1h ; Slave refresh 
        15m ; Slave retry 
        2w ; Slave expire 
        1h ; Cache TTL
     ) 
; 
; NS RECORDS 
; 
@   IN   NS  vm1.linux.local.  
; 
; A RECORDS 
;

linux.local.    IN A 192.168.207.133 
@       IN A 192.168.207.133 
vm1         IN A 192.168.207.133 
vm3         IN A 192.168.207.135
vm2     IN A 192.168.207.130 
vmware      iN A 192.168.207.2

db.207.168.192

$TTL 1h 
@ IN SOA vm1.linux.local. root.linux.local. (
    1;
    1h;
    15m;
    2w;
    1h;
) 

    IN  NS  vm1.linux.local. 
133 IN  PTR     linux.local. 
133     IN  PTR     vm1.linux.local. 
135     IN  PTR     vm2.linux.local.
130 IN  PTR     vm3.linux.local. 
2   IN  PTR     vmware.linux.local.

这是 VM1 和 linux.local 的 nslookup:

root@debian:/etc/bind# nslookup vm1
Server:     192.168.207.133
Address:    192.168.207.133#53

** server can't find vm1: REFUSED

root@debian:/etc/bind# nslookup linux.local
Server:     192.168.207.133
Address:    192.168.207.133#53

** server can't find linux.local.linux.local: SERVFAIL

【问题讨论】:

  • 也许是个愚蠢的问题,但是您是否启动了该服务?被绑定或命名运行和监听:netstat -taupn | grep :53
  • 我启动了服务,但是服务器的IP是192.168.207.132,我复制错了,这就是问题所在。我已经解决了,但还是感谢您的帮助。

标签: linux dns debian bind


【解决方案1】:

可能访问受限。尝试编辑文件named.conf,更改或添加选项allow-query { any;};

【讨论】:

    【解决方案2】:

    运行

    rndc-confgen >> /etc/named.conf
    

    这应该可以解决问题。

    【讨论】:

    • 服务器的 IP 是 192.168.207.132 而不是 192.168.207.133。出于某种愚蠢的原因,我把它复制错了,但还是感谢您的帮助。
    猜你喜欢
    • 2014-07-23
    • 1970-01-01
    • 2022-01-05
    • 1970-01-01
    • 1970-01-01
    • 2010-09-09
    • 2010-09-08
    • 2016-06-24
    • 1970-01-01
    相关资源
    最近更新 更多