我遇到了一个很奇怪的问题,我无法弄清楚。在我的服务器上,我托管了两个具有不同域名的应用程序:1. onlinelogistics.eu 2. resursecrestine.org
我还托管了一个 DNS 服务器(fedora 服务器),我配置它来解析这两个域名。问题是只有第一个域名解析,另一个域名不解析。
'onlinelogistics.eu' 的区域文件是:
onlinelogistics.eu. IN SOA ns1.onlinelogistics.eu. root.onlinelogistics.eu. (
1194130303
10800
3600
604800
38400 )
@ IN NS onlinelogistics.eu.
onlinelogistics.eu. IN NS ns1.onlinelogistics.eu.
onlinelogistics.eu. IN NS ns2.onlinelogistics.eu.
ns1.onlinelogistics.eu. IN A 85.25.124.83
ns2.onlinelogistics.eu. IN A 85.25.124.83
onlinelogistics.eu. IN A 85.25.124.83
www.onlinelogistics.eu. IN A 85.25.124.83
ftp.onlinelogistics.eu. IN A 85.25.124.83
m.onlinelogistics.eu. IN A 85.25.124.83
*.onlinelogistics.eu. IN A 85.25.124.83
IN A 85.25.124.83
onlinelogistics.eu. IN MX 10 ASPMX.L.GOOGLE.COM.
onlinelogistics.eu. IN MX 20 ALT1.ASPMX.L.GOOGLE.COM.
onlinelogistics.eu. IN MX 20 ALT2.ASPMX.L.GOOGLE.COM.
onlinelogistics.eu. IN MX 30 ASPMX2.GOOGLEMAIL.COM.
onlinelogistics.eu. IN MX 30 ASPMX3.GOOGLEMAIL.COM.
onlinelogistics.eu. IN MX 30 ASPMX4.GOOGLEMAIL.COM.
onlinelogistics.eu. IN MX 30 ASPMX5.GOOGLEMAIL.COM.
onlinelogistics.eu. IN TXT "v=spf1 a mx a:onlinelogistics.eu ip4:85.25.124.83 ?all"onlinelogistics:~
现在,对于其他域名,我进行了复制/粘贴并将 onlinelogistics.eu 替换为“resursecrestine.org”,但仍然找不到该域名。
命令“whois resursecrestine.org”找到了名称服务器(ns1.resursecrestine.org),所以我确信问题出在 DNS 服务器无法找到地址。
非常感谢您的任何想法!
谢谢你!
答案1
您是否在 named.conf 文件中创建了区域?即:
zone "resursecrestine.org" {
type master;
file "resursecrestine.org";
};
根据 dig +trace,它确实解决了...并且通过浏览器检查,它加载了。那么这个问题解决了吗?
; <<>> DiG 9.2.4 <<>> +trace resursecrestine.org
;; global options: printcmd
. 306040 IN NS A.ROOT-SERVERS.NET.
. 306040 IN NS B.ROOT-SERVERS.NET.
. 306040 IN NS C.ROOT-SERVERS.NET.
. 306040 IN NS D.ROOT-SERVERS.NET.
. 306040 IN NS E.ROOT-SERVERS.NET.
. 306040 IN NS F.ROOT-SERVERS.NET.
. 306040 IN NS G.ROOT-SERVERS.NET.
. 306040 IN NS H.ROOT-SERVERS.NET.
. 306040 IN NS I.ROOT-SERVERS.NET.
. 306040 IN NS J.ROOT-SERVERS.NET.
. 306040 IN NS K.ROOT-SERVERS.NET.
. 306040 IN NS L.ROOT-SERVERS.NET.
. 306040 IN NS M.ROOT-SERVERS.NET.
;; Received 316 bytes from 172.18.251.240#53(172.18.251.240) in 1 ms
org. 172800 IN NS B0.ORG.AFILIAS-NST.org.
org. 172800 IN NS B2.ORG.AFILIAS-NST.org.
org. 172800 IN NS A0.ORG.AFILIAS-NST.INFO.
org. 172800 IN NS D0.ORG.AFILIAS-NST.org.
org. 172800 IN NS C0.ORG.AFILIAS-NST.INFO.
org. 172800 IN NS A2.ORG.AFILIAS-NST.INFO.
;; Received 439 bytes from 198.41.0.4#53(A.ROOT-SERVERS.NET) in 61 ms
resursecrestine.org. 86400 IN NS ns4.afraid.org.
resursecrestine.org. 86400 IN NS ns3.afraid.org.
resursecrestine.org. 86400 IN NS ns1.afraid.org.
resursecrestine.org. 86400 IN NS ns2.afraid.org.
;; Received 180 bytes from 199.19.54.1#53(B0.ORG.AFILIAS-NST.org) in 42 ms
resursecrestine.org. 3600 IN A 85.25.124.83
resursecrestine.org. 86400 IN NS ns1.afraid.org.
resursecrestine.org. 86400 IN NS ns4.afraid.org.
resursecrestine.org. 86400 IN NS ns3.afraid.org.
resursecrestine.org. 86400 IN NS ns2.afraid.org.
;; Received 196 bytes from 208.43.71.243#53(ns4.afraid.org) in 29 ms
答案2
不,与你所说的不同,resursecrestine.org
它有效,但它onlinelogistics.eu
失败了:
% check_soa onlinelogistics.eu
There was no response from ns2.onlinelogistics.eu
There was no response from ns1.onlinelogistics.eu
% check_soa resursecrestine.org
ns4.afraid.org has serial number 1001120004
ns1.afraid.org has serial number 1001120004
ns2.afraid.org has serial number 1001120004
ns3.afraid.org has serial number 1001120004
对于在 Unix 上运行的每个守护进程,首先要做的是:检查日志文件!例如,BIND 提供了有关其加载或加载失败的区域的全面信息。这将解决 greeblesnort 的建议。
此外,“未解决”还不够准确。请测试dig @your-name-server
并报告实际结果。
最后,您的区域文件将更易于阅读和管理相对名称。
答案3
您是否获得了正确的名称服务器 IP 地址? checkdns.net 报告名称服务器 (85.25.124.83) 没有响应。 如果此 IP 地址正确,则可能是由于您的区域文件或 named.conf.local 中有错误,所以 Bind 无法启动。 使用 named-checkconf 和 named-checkzone 检查这两者。