使用 Debian Jessie。
我尝试配置我的绑定区域,但当我使用 检查时出现错误named-checkzone
。一个错误是“没有当前所有者名称”。
root@host:/etc# named-checkzone test /etc/bind/db.test.domain
/etc/bind/db.test.domain:2: no current owner name
/etc/bind/db.test.domain:4: no TTL specified; zone rejected
/etc/bind/db.test.domain:6: no TTL specified; zone rejected
/etc/bind/db.test.domain:7: no TTL specified; zone rejected
/etc/bind/db.test.domain:9: no TTL specified; zone rejected
/etc/bind/db.test.domain:10: no TTL specified; zone rejected
/etc/bind/db.test.domain:13: no TTL specified; zone rejected
/etc/bind/db.test.domain:14: no TTL specified; zone rejected
/etc/bind/db.test.domain:15: no TTL specified; zone rejected
/etc/bind/db.test.domain:16: no TTL specified; zone rejected
zone test/IN: loading from master file /etc/bind/db.test.domain failed: no owner
zone test/IN: not loaded due to errors.
这是 /etc/bind/db.test.domain 文件:
IN NS ns
_spf TXT "v=spf1 ip4:111.222.133.0/22 mx exists:%{1}.%{i}._spf ?all"
@ MX 50 mail.domain.com.
@ TXT "v=spf1 redirect=_spf.sub.domain.com"
mail.domain.com A 111.222.133.144
mail.domain.com AAAA 2000:888:8888:11::199
@ A 111.222.133.155
@ AAAA 2000:777:7777:11::199
www A 111.222.133.155
www AAAA 2000:777:7777:11::199
我该如何修复它?
答案1
在区域文件中添加第一行。
$TTL 3600
添加 SOA 记录
@ IN SOA master.example.com. hostmaster.example.com. (
2017030300 ; serial
3600 ; refresh
1800 ; retry
604800 ; expire
600 ) ; ttl