我正在为托管设置一个专用服务器。并尝试设置私人DNS和名称服务器。从一天开始尝试,我无法弄清楚这个问题。
我在Windows 8中使用BIND9 DNS服务器。
所以,我在设置正确的DNS方面遇到了问题。我有两个域,每个域指向其中一个服务器。名称服务器已正确注册到域名注册商,并且名称服务器IP也正确输入。我已经在注册商处与技术支持人员进行了交谈,他们确认所有内容都已设置在他们的最后。我不太了解DNS,我搜索了名称服务器和DNS,直到我几乎失明,花了几个小时搞乱配置。
命名运行很好,但没有解决。当我“挖掘任何example.com”时,我收到了一封SERVFAIL消息。
的named.conf
options {
directory "C:\BIND\etc";
version "not currently available";
pid-file "run\named.pid";
allow-transfer { none; };
recursion no;
};
logging{
channel my_log{
file "log\named.log" versions 3 size 250k;
severity info;
};
category default{
my_log;
};
};
zone "example.com" IN {
type master;
file "zones\db.example.com.txt";
allow-transfer { any; };
};
key "rndc-key" {
algorithm hmac-md5;
secret "B5jGB5sU7e35WzXoam/EcA==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
db.example.com
$TTL 6h
@ IN SOA ns1.example.com.
hostmaster.example.com. (
2015062801
10800
3600
604800
86400 )
@ NS ns1.example.com.
@ NS ns2.example.com.
ns1 IN A 1.2.3.4
ns2 IN A 1.2.3.4
www IN A 1.2.3.4
named.log
dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running client 1.2.3.4#51108: query (cache) './NS/IN' denied shutting down: flushing changes stopping command channel on 127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running invalid command from 127.0.0.1#50166: bad auth shutting down: flushing changes stopping command channel on 127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 exiting dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on 127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 exiting dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running client 134.147.203.115#28207: query (cache) 'psge.53dca67a.wc.syssec.rub.de/A/IN' denied
这里1.2.3.4是指我的公共静态IP。我是新来的dns。任何帮助都会很棒。
所以,总结一下: •具有IP的名称服务器已正确注册到域名注册商 •named已配置并正在运行...且不得配置 •正确,因为没有解决。
任何帮助都会很棒。我将文件中的域名和IP更改为泛型,但是如果您需要知道相关域名,请告诉我。
答案 0 :(得分:1)
您的日志显示错误:
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 exiting dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on 127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 exiting dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
它似乎不喜欢你的SOA。您可以尝试将主机记录移动到与ORIGIN相同的行和NX TTL之后的最后一个parens
编辑:
@ IN SOA ns1.example.com. hostmaster.example.com. (
2015062801
10800
3600
604800
86400
)