Bind9
		
		
		
		
		
		
		둘러보기로 가기
		검색하러 가기
		
		
		
		
		
		
		
	
Debian에 bind9_9.2.4-1_i386.deb 을 설치해 셋팅하는 과정을 정리해 본다.
bind9 설치
#apt-get install bind9
bind9 설치 및 설정 디렉토리
/etc/default
/etc/default/bind9에 named 시작 옵션을 지정할 수 있다. 아래는 named의 사용자를 bind로 지정한 예제이다.
# cat /etc/default/bind9 OPTIONS="-u bind"
chroot'ed를 사용한다면 다음과 같은 설정을 사용 할 수 있겠다.
# cat /etc/default/bind9 OPTIONS="-t /var/cached/chroot -u bind"
/etc/bind
ls -l /etc/bind -rw-r--r-- 1 root root 237 Sep 24 2004 db.0 -rw-r--r-- 1 root root 271 Sep 24 2004 db.127 -rw-r--r-- 1 root root 237 Sep 24 2004 db.255 -rw-r--r-- 1 root root 353 Sep 24 2004 db.empty -rw-r--r-- 1 root root 256 Sep 24 2004 db.local -rw-r--r-- 1 root root 1507 Sep 24 2004 db.root -rw-r--r-- 1 root root 1611 Sep 24 2004 named.conf -rw-r--r-- 1 root root 594 Jul 6 02:03 named.conf.local -rw-r--r-- 1 root root 705 Jul 6 02:02 named.conf.options -rw-r----- 1 bind bind 77 Jun 30 08:08 rndc.key -rw-r--r-- 1 root root 1317 Sep 24 2004 zones.rfc1918
Zone data files for the root servers, the forward and reverse localhost zones
named.conf.local과 named.conf.options에 사용자가 필요한 zone과 옵션을 지정해서 사용한다.
/var/cache/bind
named.conf에 지정된 bind9의 작업디렉토리. Debian bind9 배포본은 /var/cache/bind 디렉토리가 워킹 디렉토리이다. 즉 사용자 zone파일을 이곳에 작성해서 관리한다. name가 사용하는 작업 디렉토리, 사용자의 zone이나 secondary zone이 위치할 수 있다.
bind9 zone 설정
/etc/bind/named.conf.options
forwarders 등의 옵션을 지정한다.
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
// 
options {
        directory "/var/cache/bind";
        // 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 and later use an unprivileged
        // port by default.
        // query-source address * port 53;
 
        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.
        forwarders {
            168.126.63.1;
        };
        auth-nxdomain no;    # conform to RFC1035
 
};
/etc/bind/named.conf.local
사용자 zone을 지정한다.
//
// abc.com, my.com  모두 named.zone에 지정된 /var/cache/bind 설정에 따릅니다.
//
 
zone "abc.com" {
      type master;
      file "ourzone.zone";
}; 
zone "my.com" {
      type master;
      file "ourzone.zone";
};
ourzone.zone 파일
;
; BIND data file for local loopback interface
;
$TTL	604800
@	IN	SOA	@  root. (
                              1		; Serial
                          604800		; Refresh
                           86400		; Retry
                         2419200		; Expire
                          604800 )	; Negative Cache TTL
;
        IN	A	192.168.1.1
        IN	NS	ns
        IN	MX  10	mail
;base
ns	IN	A	192.168.1.1
mail	IN	A	192.168.1.2
ftp	IN	A	192.168.1.3
www	IN	CNAME	@
bind9 시작/재시작/종료
서버 재시작
#/etc/init.d/bind9 restart
참고
- /usr/share/doc/bind9/READM.Debian.gz 를 참고할 것.
 - Server#s-2
 
작성자 및 의견
2005/07/06 gtko 처음으로 데비안 사용하며 작성해 봅니다