我已经在 UbuntuServer 22.04.3 上安装并设置了 bind9 DNS 服务器。
然后我检查了我的主机。我得到了一个错误:
host host1
Host host1 not found: 2(SERVFAIL)
但反向操作却没有任何问题。
host 192.168.0.16
16.0.168.192.in-addr.arpa domain name pointer host1.
我的前锋区域是:
;
$TTL 604800
@ IN SOA ns.obfuscated.com. root.ns.obfuscated.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
; name servers - NS records
@ IN NS ns.obfuscated.com.
; name servers - A records
ns IN A 192.168.0.101
; 192.168.0.0/24 - A records
host3 IN A 192.168.0.201 ;
host2 IN A 192.168.0.250 ;
host1 IN A 192.168.0.16 ;
区域文件是:
zone "obfuscated.com" {
type master;
file "/var/lib/bind/forward.bind";
check-names ignore;
};
zone "0.168.192.in-addr.arpa" {
type master;
file "/var/lib/bind/reverse.bind";
check-names ignore;
};
Netplan 配置:
network:
ethernets:
ens33:
addresses:
- 192.168.0.101/24
nameservers:
addresses: [192.168.0.101, 192.168.0.1]
search: [ obfuscated.com ]
routes:
- to: default
via: 192.168.0.1
我确信 forward.bind 文件存在错误,但找不到它们。该named-checkzone
命令没有错误。