
VPS Ubuntu 15.04가 있고 외부 도메인 중 하나에 대해 DNS를 구성했습니다.
이것은 '/etc/bind/named.conf.local'의 구성 샘플입니다.
zone "test.com" {
type master;
file "/etc/bind/zones/test.com.db";
};
그리고 '/etc/bind/zones/test.com.db' 내부
$TTL 600
test.com. IN SOA ns1.test.com. admin.test.com. (
2006081401
28800
3600
604800
38400
)
test.com. IN NS ns1.test.com.
test.com. IN NS ns2.test.com.
test.com. IN MX 10 mta.test.com.
test.com. IN A 111.111.111.111
* IN A 111.111.111.111
ns1.test.com. IN A 111.111.111.111
ns2.test.com. IN A 111.111.111.111
www IN A 111.111.111.111
mta
이제 도메인 샘플 'test.info'를 하나 더 사용하려면 여기서 무엇을 해야 합니까?
어쩌면 다음과 같은 새로운 영역과 영역 파일을 생성할 수도 있습니다:
zone "test.info" {
type master;
file "/etc/bind/zones/test.info.db";
};
그리고 zones/test.info.db는 ??
$TTL 600
test.info. IN SOA ns1.test.info. admin.test.info. (
2006081401
28800
3600
604800
38400
)
test.info. IN NS ns1.test.info.
test.info. IN NS ns2.test.info.
test.info. IN MX 10 mta.test.info.
test.info. IN A 111.111.111.111
* IN A 111.111.111.111
ns1.test.info. IN A 111.111.111.111
ns2.test.info. IN A 111.111.111.111
www IN A 111.111.111.111
mta
아니면 다음과 같이 새 영역 레코드를 생성하면 됩니다.
zone "test.info" {
type master;
file "/etc/bind/zones/test.com.db";
};
첫 번째 도메인 'test.com.db' 파일을 가리키도록 하시겠습니까?
답변1
일반적으로 각 영역에 대해 별도의 파일이 있지만 여러 영역에 정확히 동일한 레코드 집합이 있는지 특별히 확인하려는 경우 특정 조건에서 동일한 파일에서 여러 영역을 백업할 수 있습니다.
- 영역 파일은 읽기 전용 방식으로만 액세스해야 합니다
named
(동적으로 업데이트되는 영역, 슬레이브 영역 등 없음). - 영역 파일에는 상대 소유자 이름(예:
@
overexample.com.
,foo
overfoo.example.com.
등)이 있는 레코드만 포함되어야 합니다. - 영역에는 실제로 정확히 동일한(영역 기준) 레코드 집합이 있습니다.
즉, 작업을 단순하게 유지하려면 일반적인 작업을 수행하고 별도의 파일을 생성하면 됩니다. 그러면 걱정할 특별한 제약이 없습니다.
답변2
명명된.conf.local에서 호스트 이름당 한 줄
zone "test.com" { type master; file "/etc/bind/zones/test.com.db"; };
zone "test.info" { type master; file "/etc/bind/zones/test.info.db"; };
그런 다음 해당 특정 호스트 이름에 대한 모든 DNS 레코드가 포함된 새 호스트 이름(도메인)당 하나의 .db 파일을 만듭니다.