BIND 連線被拒絕的問題

BIND 連線被拒絕的問題
host -l mycity.example.com
;; Connection to 10.0.1.12#53(10.0.1.12) for mycity.example.com failed: connection refused.

這是我的named.conf.options 檔案:

acl "trusted" {
    10.0.1.0/16; 
    localhost;
    localnets;
};

options {
    directory "/var/cache/bind";

    recursion yes;
    allow-recursion { trusted; };
    allow-query { any; }
    allow-query-cache { trusted; }
    listen-on { 10.0.1.12; };
    allow-transfer {trusted; };

// 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 {    
    10.0.1.1;
    8.8.8.8;
    8.8.4.4;
};

//========================================================================
// 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 no;


auth-nxdomain no;    # conform to RFC1035
listen-on-v6 { any; };
};

僅供參考,只有內部伺服器才能存取此名稱伺服器。

我究竟做錯了什麼? :(

Bind9 狀態的更多資訊:

Apr 26 00:37:12 myserver1 named[15933]: client 10.0.1.12#38844
(myserver2.mycity.example.com): bad zone transfer request:
'myserver2.mycity.example.com/IN': non-authoritative zone (NOTAUTH)

答案1

好的,答案很簡單:當使用帶有 -l 選項的 host 命令時,不使用主機名稱作為參數。您使用完全限定的域名,然後它會傳回所有主機。一旦我輸入以下命令,一切都會按預期進行:

host -l mycity.example.com

server1.mycity.example.com
server2.mycity.example.com

相關內容