질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

DNS설정 오류

작성자 정보

  • 임성현 작성
  • 작성일

컨텐츠 정보

본문

안녕하세요!

혼자서 해결해볼라고 이래저래 하다가 결국 이렇게 질문 드립니다

OS : Redhat 9 (Shrike) , kernel 2.4.20-8 On an i686

bind-9.2.1-16, bind-utils-9.2.1-16, redhat-config-bind-1.9.0-13

위 사양에 bind 를 설치하여 DNS서버를 구동하려고 시도했습니다.

일단 / etc/hosts 파일을 셋팅했습니다

/////////////////////////////////////////////////////////////

vi /etc/hosts

127.0.0.1 localhost.localdomain localhost
xxx.xxx.xxx.xxx ns.prolance.co.kr ns
xxx.xxx.xxx.xxx prolance.co.kr www

/////////////////////////////////////////////////////////////

그런다음 /etc/resolv.conf 파일을 설정 했습니다.

vi /etc/resolv.conf

/////////////////////////////////////////////////////////////

domain prolance.co.kr
search prolance.co.kr
nameserver xxx.xxx.xxx.xxx
nameserver 168.126.63.1
nameserver 168.126.63.2

////////////////////////////////////////////////////////////

물론 /etc/host.conf 파일도 설정 하구요

vi /etc/host.conf

////////////////////////////////////////////////////////////

order hosts,bind
multi on
nospoof on

/////////////////////////////////////////////////////////////

아! /etc/rndc.conf 파일도 만들어 줬습니다

/usr/sbin/rndc-confgen > /etc/rndc.conf

//////////////////////////////////////////////////////////////

# Start of rndc.conf
key "rndc-key" {
 algorithm hmac-md5;
 secret "6lVedfPjEUQzDFrBIMsU+g==";
};

options {
 default-key "rndc-key";
 default-server 127.0.0.1;
 default-port 953;
};
# End of rndc.conf

algorithm hmac-md5;

//////////////////////////////////////////////////////////////

위에 설정을 마친뒤 named.conf  파일을 설정했습니다

///////////////////////////////////////////////////////////////

// generated by named-bootconf.pl

options {
 directory "/var/named";
 /*
  * If there is a firewall between you and nameservers you want
  * to talk to, you might need to uncomment the query-source
  * directive below.  Previous versions of BIND always asked
  * questions using port 53, but BIND 8.1 uses an unprivileged
  * port by default.
  */
 // query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
 inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "." IN {
 type hint;
 file "named.ca";
};

zone "localhost" IN {
 type master;
 file "localhost.zone";
 allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
 type master;
 file "named.local";
 allow-update { none; };
};

zone "prolance.co.kr" IN {
 type master;
 file "prolance.co.kr.zone";
 allow-update { none; };
};

zone "xxx.xxx.xxx.in-addr.arpa" IN {
 type master;
 file "prolance.co.kr.rev";
 allow-update { none; };
};

include "/etc/rndc.key";

/////////////////////////////////////////////////////////

그런다음 zone 파일을 설정했는데요

prolance.co.kr.zone

///////////////////////////////////////////////////////////

$TTL 86400
@       IN      SOA ns.prolance.co.kr. root.prolance.co.kr.  (
                                      2007021405; Serial
                                      10800      ; Refresh
                                      3600      ; Retry
                                      3600000    ; Expire
                                      43200 )    ; Minimum
 IN      NS ns.prolance.co.kr.
 IN A xxx.xxx.xxx.xxx
 IN HINFO "Intel Pentium" "RedHat"

ns  IN A xxx.xxx.xxx.xxx
www IN A xxx.xxx.xxx.xxx

///////////////////////////////////////////////////////////

prolance.co.kr.rev

///////////////////////////////////////////////////////////

$TTL 86400
@       IN      SOA     ns.prolance.co.kr. root.prolance.co.kr.  (
                                      2007021404 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
 IN      NS ns.prolance.co.kr. 

37 IN      PTR     ns.prolance.co.kr.
37 IN PTR www.prolance.co.kr.
37 IN PTR prolance.co.kr.

///////////////////////////////////////////////////////////

이렇게하고 nslookup으로 테스르틀 해봤는데요 ns.prolance.co.kr은 잘되는데

prolance.co.kr이나 www.prolance.co.kr

;connection timed out; no servers could be reached 라는 메세지가 뜹니다

도메인 신청도 정상적으로 이뤄졌고 네임서버 설정도 이상이 없는거 같은데 답답합니다.

웹 브라우져에 ns.prolance.co.kr 이라고 치면 지정한 페이지가 뜨는데 www.prolance.co.kr을 치면 페이지를 못찾습니다

/usr/sbin/rndc reload 도 해보고 iptables stop 해서 방화벽도 죽여 봤는데 같은 현상이 일어납니다

부디 고수님들의 한말씀 부탁드리겠습니다

 

 

관련자료

댓글 1

김상복님의 댓글

  • 김상복
  • 작성일
네임서버 설정이 넘 복잡하네요.. 그냥 간단하게 하세요

/etc/named.conf 설정
zone 파일 설정

named reload

nslookup 에서 서버를 네임서버 아이피로 지정해서 테스트

이상있으면 설정 재확인
이상없다면 nslookup에서 케이티 같은 외부 dns 서버로 질의

이상있으면 도메인 신청이나, 방화벽 확인
이상없으면 아파치 설정 끝....

공지사항


뉴스광장


  • 현재 회원수 :  60,133 명
  • 현재 강좌수 :  36,170 개
  • 현재 접속자 :  415 명