在 Raspberry 上的 PowerDNS 上,我有一个指向 Google(8.8.8.8)的递归器和只有一个区域文件,它包含:
$ORIGIN abc.co.uk.
$TTL 1h
@ IN SOA ns.abc.co.uk. hostmaster.abc.co.uk. (
1; serial
1d; refresh
2h; retry
4w; expire
1h; minimum time-to-live
)
IN NS ns
IN A 1.2.3.4
www IN CNAME def.com.
ns IN A 192.168.9.100
查询有效abc.co.uk
,但未www.abc.co.uk
返回 CNAME def.com
。错误的原因可能是什么?nslookup 输出如下(带注释):
> set type=any
> abc.co.uk
Server: 192.168.9.100
Address: 192.168.9.100#53
abc.co.uk nameserver = ns.abc.co.uk.
abc.co.uk
origin = ns.abc.co.uk
mail addr = hostmaster.abc.co.uk
serial = 1
refresh = 86400
retry = 7200
expire = 2419200
minimum = 3600
Name: abc.co.uk
Address: 1.2.3.4 // looks ok?
> www.abc.co.uk
Server: 192.168.9.100
Address: 192.168.9.100#53
Non-authoritative answer:
www.abc.co.uk canonical name = abc.co.uk. //!! result from Google?
Authoritative answers can be found from:
def.com
如果我省略区域文件中 CNAME 行后面的句点,则查询将返回:
> www.abc.co.uk
Server: 192.168.9.100
Address: 192.168.9.100#53
www.abc.co.uk canonical name = def.com.abc.co.uk.
答案1
我删除并清除了pdns-server
,重新安装,并且它按预期工作。