
Bind9을 사용하여 DNS 서버를 만들려고 하는데 nslookup을 사용하거나 이름을 확인하려고 하면 servfail 오류가 발생합니다.
구성 파일은 다음과 같습니다.
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
smx@smx:~$ cat /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "thiefhunter.local"{
type master;
file "/etc/bind/zones/db.thiefhunter.local";
};
zone "1.168.192.in-addr.arpa"{
type master;
file "/etc/bind/zones/db.192.168.1";
};
내 역방향 영역 구성은 다음과 같습니다.
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns1.thiefhunter.local root.thiefhunter.local. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS ns1.thiefhunter.local.
ns1 IN A 192.168.1.37
server IN CNAME ns1.thiefhunter.local.
pc01 IN A 192.168.1.36
gw IN A 192.168.1.1
내가 언급하고 싶은 점: 192.168.1.36에 있는 pc01이 무엇을 의미하는지 모르겠습니다. 내 네트워크에 이 IP를 가진 PC가 없습니다. 그러나 튜토리얼을 따랐더니 그런 것이 나타났습니다. 죄송합니다.
내 역방향 영역 구성은 다음과 같습니다.
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns1.thiefhunter.local root.thiefhunter.local. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns1.thiefhunter.local.
10 IN PTR ns1.thiefhunter.local.
1 IN PTR gw.thiefhunter.local.
나는 그것이 필요하다고 생각하지 않았기 때문에 /etc/bind/named.conf를 편집하지 않았습니다.
또한 클라이언트(내 바인드9 서버 IP를 DNS로 사용하도록 구성한 클라이언트)에서 nslookup을 사용하려고 할 때 발생하는 오류는 다음과 같습니다.
paco@paco-virtualbox:~$ nslookup
> thiefhunter.local
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find thiefhunter.local: SERVFAIL
> 192.168.1.37
** server can't find 37.1.168.192.in-addr.arpa: NXDOMAIN
> 192.168.1
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find 192.168.1: NXDOMAIN
시간 내주셔서 감사하고 읽어주셔서 감사합니다
답변1
당신은 약간 혼란스럽거나 잘못된 튜토리얼을 보고 있는 것 같습니다.
첫 번째 영역 파일은 역방향 DNS에 사용되지 않습니다. 이는 "thiefhunter.local"로 끝나는 도메인을 IP 주소로 변환하는 정방향 조회입니다. 레코드를 추가하고 싶을 것입니다.
server 192.168.1.37
역방향 조회를 수행하는 두 번째 영역 파일입니다. IP를 도메인으로 변환하려면 여기에 적절한 항목을 추가해야 합니다.
왼쪽은 IP 주소의 마지막 숫자입니다(귀하의 경우 37). 오른쪽은 확인할 도메인 이름입니다(예: mymachine.thiefhunter.local).
37 server.thiefhunter.local.
"pc01 IN A 192.168.1.36"은 pc01.thiefhunter.local을 IP 주소 192.168.1.36으로 변환하는 항목이며 therr이 해당 IP에 시스템이 없으면 likrlt를 삭제할 수 있습니다.