![VPS 上的 DNS (BIND)](https://linux22.com/image/606342/VPS%20%E4%B8%8A%E7%9A%84%20DNS%20(BIND).png)
我刚刚买了一个新的 VPS,除了一个小细节之外,一切都运行良好:DNS。坦白说,我对 BIND(或一般的 DNS)的经验非常有限(根本没有),而且经过很长一段时间,我现在失去了生活的意志。
我的域名是bartplatak.net
并且 VPS 驻留在 上212.1.209.239
。我已将我的域名的 DNS 记录指向我的 DNS 服务器(似乎工作正常),配置并启动了我的named
。但是,DNS 查找显示连接被“拒绝”。DNS 爬虫仅输出:
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
知道发生什么事了吗?
答案1
那么,你将查询限制到本地主机:
allow-query { localhost; };
还请重新考虑recursive yes;
您的服务器是否真的有必要。