Domain-Name-System
VPS 上的 DNS (BIND)
我剛買了一個新的 VPS,除了一個小細節:DNS,一切都執行良好。坦率地說,我在使用 BIND(或一般的 DNS)方面的經驗非常有限(根本不存在),並且在很長一段時間後,我現在失去了生存的意願。
我的域名是
bartplatak.net
和 VPS 居民在212.1.209.239
. 我已將我的域的 DNS 記錄指向我的 DNS 伺服器(似乎工作正常),配置並啟動了我的named
. 但是,DNS 查詢顯示連接被“拒絕”。DNS Crawler只輸出:Querying a.root-servers.net (198.41.0.4)... delegated Querying k.gtld-servers.net (192.52.178.30)... delegated Querying ns2.bartplatak.net (212.1.209.239)... refused Querying ns1.bartplatak.net (212.1.209.239)... refused Unable to find: bartplatak.net
我的
/etc/named.conf
:options { //listen-on port 53 { 127.0.0.1; }; //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"; allow-query { localhost; }; recursion yes; version "Nope."; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic"; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; zone "." IN { type hint; file "named.ca"; }; zone "bartplatak.net" IN{ type master; file "bartplatak.net"; }; include "/etc/named.rfc1912.zones"; include "/etc/named.root.key";
和
/var/named/bartplatak.net
$TTL 86400; @ IN SOA ns2.bartplatak.net. admin.bartplatak.net. ( 2010062801 ; Serial 10800 ; Refresh 3600 ; Retry 6040800 ; Expire 86400 ; Minimum ) bartplatak.net. IN NS ns1.bartplatak.net. bartplatak.net. IN NS ns2.bartplatak.net. bartplatak.net. IN A 212.1.209.239 ns1.bartplatak.net. IN A 212.1.209.239 ns2.bartplatak.net. IN A 212.1.209.239 test.bartplatak.net. IN A 212.1.209.239
知道發生了什麼嗎?
好吧,您將查詢限制為本地主機:
allow-query { localhost; };
還要重新考慮
recursive yes;
您的伺服器是否真的需要。