
나는 내부 네트워크용 서버를 설정하는 작업을 해왔습니다. 지금까지 chrooted BIND9(동일한 컴퓨터에서)을 업그레이드할 수 있는 작동하는 isc-dhcp-server가 있습니다. DNS에 몇 가지 정적 항목을 추가해야 하므로 사용자는 DMZ에 상주하는 웹사이트를 확인할 수 있습니다.
내가 시도한 것은 /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";
key DHCP_UPDATER {
algorithm HMAC-MD5.SIG-ALG.REG.INT;
secret "MySuperSecretHash"; (this is not the real value BTW)
};
zone "quality.internal" IN {
type master;
file "/var/lib/bind/quality.internal.db";
allow-update { key DHCP_UPDATER; };
};
zone "0.10.10.in-addr.arpa" {
type master;
file "/var/lib/bind/rev.10.10.0.in-addr.arpa";
allow-update { key DHCP_UPDATER; };
};
logging {
channel query.log {
file "/var/log/named/query.log";
severity debug 3;
};
category queries { query.log; };
};
그런 다음 이 2개의 항목을 추가했습니다.
zone "ourserver.internal" IN {
type master;
file "/var/lib/bind/ourserver.internal.db";
};
zone "0.16.172.in-addr.arpa" {
type master;
file "/var/lib/bind/rev.172.16.0.in-addr.arpa";
};
그래서 .. ourserver.internal.db 및 rev.172.16.0.in-addr.arpa 파일을 생성하여 둘 다 /var/lib/bind/에 배치하고 바인드 사용자가 액세스할 수 있도록 권한을 변경하고 서비스를 다시 지정했습니다. ... NSLOOKUP www.ourserver.internal을 수행하면 다음과 같은 결과가 나타납니다.
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find www.ourserver.internal: NXDOMAIN
BUT when i do a reverse lookup....
Server: 127.0.0.1
Address: 127.0.0.1#53
5.0.16.172.in-addr.arpa name = www.ourserver.internal
나는 무엇이 잘못되었는지 이해하지 못합니다. 이에 대한 도움을 받으면 내부 사이트 이름을 호스팅하기 위해 DMZ에 새 DNS 서버를 설치하지 않아도 됩니다.
미리 타이
참고: 제가 사용 중인 서버에는 Ubuntu Server 11.10이 완전히 패치되었습니다.
답변1
좋아요.. 결국 /var/lib/bind/ourserver.internal.db 파일에 문제가 있었던 것 같습니다. 처음부터 시작해 이제는 오류 없이 빠르게 해결되고 있습니다! :) 실제로 저는 다른 웹사이트에서 가져온 예를 여기에 남겨두겠습니다.
;
;BIND data file for example.com
;
$TTL 604800
@ IN SOA ns1.example.com. info.example.com. (
2007011501 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
604800) ; Default TTL
;
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
example.com. IN MX 10 mail.example.com.
example.com. IN A 192.168.254.1
ns1 IN A 192.168.254.1
ns2 IN A 192.168.254.2
www IN CNAME example.com.
mail IN A 192.168.254.1
ftp IN CNAME example.com.
example.com. IN TXT "v=spf1 ip4:192.168.254.1 a mx ~all"
mail IN TXT "v=spf1 a -all"