나는 지난 며칠 동안 이것 때문에 어려움을 겪었습니다. 내 항목 중 일부에는 외부 및 내부 IP가 있습니다. 내 내부 네트워크는 10.0.0.0/8입니다.
nslookup pc1.clase.net
내가 내부에 있을 때는 10.0.0.0 주소를 반환하지만, nslookup pc1.clase.net
외부에 있으면 여전히 10.0.0.0 주소를 제공합니다.
저는 Debian Wheezy를 사용하고 있습니다.
명명된 구성 파일
include "/etc/bind/named.conf.options";
view "internal" {
match-clients { 10.0.0.0/8;};
zone "clase.net"{
type master;
file "/etc/bind/internals/db.forward.net";
allow-transfer { 10.0.0.11/8; }
};
};
include "/etc/bind/named.conf.default-zones";
zone "10.in-addr.arpa" {
type master;
file "/etc/bind/internals/db.reverse.net";
allow-transfer { 10.0.0.11/8;
};
};
};
view "external" {
match-clients { any; };
zone "clase.net" {
type master;
file "/etc/bind/externals/db.forward.net";
allow-transfer { 10.0.0.11/18;
};
};
};
내부/db.forward.net
$TTL 604800
@ IN SOA ns.clase.net. root.clase.net. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800); Negative Cache TTL
;
@ IN NS ns.clase.net.
ns IN A 10.0.0.10
pc1 IN A 10.0.0.12
외부/db.forward.net
$TTL 604800
@ IN SOA ns.clase.net. root.clase.net. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800); Negative Cache TTL
;
@ IN NS ns
IN A 150.210.0.1
ns IN A 150.210.0.1
pc1 IN A 150.210.0.22
답변1
답변2
이것이 귀하의 문제인지 확실하지 않지만 구성 파일을 살펴보면 일부 오타가 있는 것 같습니다.
예
블록에 닫는 중괄호( )가 너무 많은 것 같습니다 };
.
zone "10.in-addr.arpa" {
type master;
file "/etc/bind/internals/db.reverse.net";
allow-transfer { 10.0.0.11/8;
};
};
};
이거여야지, 그렇지?
zone "10.in-addr.arpa" {
type master;
file "/etc/bind/internals/db.reverse.net";
allow-transfer { 10.0.0.11/8; }
};
파일의 정리된 버전입니다 named.conf
.
include "/etc/bind/named.conf.options";
view "internal" {
match-clients { 10.0.0.10/24;};
zone "clase.net" {
type master;
file "/etc/bind/internals/db.forward.net";
allow-transfer { 10.0.0.11/8; };
};
};
include "/etc/bind/named.conf.default-zones";
zone "10.in-addr.arpa" {
type master;
file "/etc/bind/internals/db.reverse.net";
allow-transfer { 10.0.0.11/8; };
};
view "external" {
match-clients { any; };
zone "clase.net" {
type master;
file "/etc/bind/externals/db.forward.net";
allow-transfer { 10.0.0.11/18; };
};
};
클라이언트 네트워크 오류인가요?
다음 줄은 나에게 적합하지 않은 것 같습니다.
view "internal" {
match-clients { 10.0.0.0/8;};
zone "clase.net"{
type master;
file "/etc/bind/internals/db.forward.net";
allow-transfer { 10.0.0.11/8; }
};
};
이거여야지, 그렇지?
view "internal" {
match-clients { 10.0.0.0/8;};
zone "clase.net"{
type master;
file "/etc/bind/internals/db.forward.net";
allow-transfer { 10.0.0.0/8; }
};
};
인용하다
답변3
- 와서 봐!
명명된 구성 파일
// 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";
include "/etc/bind/t-sig.key";
명명된.conf.옵션
acl internals {
127.0.0.0/8;
10.0.0.0/8;
};
options {
directory "/var/cache/bind";
allow-recursion { internals; };
allow-query-cache { internals; };
allow-query { internals; };
dnssec-enable yes;
dnssec-validation yes;
forwarders {
// -Google - JUST FOR SAMPLE!!!
8.8.4.4;
8.8.8.8;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
이름 .conf.local
include "/etc/bind/zones.rfc1918";
acl internals {
127.0.0.0/8;
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
};
명명된.conf.defaultzone
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "sample.net" {
type master;
file "/etc/bind/db.sample.net";
allow-query { internals; };
allow-transfer { key t-sig.key; };
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
allow-query { 127.0.0.0/8; };
allow-transfer { key t-sig.key; };
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/127.in-addr.arpa";
allow-query { 127.0.0.0/8; };
allow-transfer { key t-sig.key; };
};
zone "10.in-addr.arpa" {
type master;
file "/etc/bind/0.0.10.in-addr.arpa";
allow-query { internals; };
allow-transfer { key t-sig.key; };
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/0.in-addr.arpa";
allow-query { internals; };
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/255.in-addr.arpa";
allow-query { internals; };
};