2009. 9. 29. 18:24

linux에서 dns서버(named, bind) 설정하기 - FC5, FC9


< 참고 한 곳>
- http://oops.org/?t=lecture&s=bind9
- http://wiki.kldp.org/wiki.php/LinuxdocSgml/DNS-HOWTO#bigger
- http://user.chol.com/~unixsun/SOLARIS/SYSTEMADMIN/system_adm025.htm

< 설정 방법 >
0. 설치
 - yum install -y named

1. /etc/named.conf에 아래부분 추가
   *  BIND 8.1(FC5)
       query-source port 53;
   * BIND 8(FC9.sparc)
       listen-on port 53 { any; };
       allow-query { any; };

2. /etc/named.conf에 아래부분 추가

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

  };


3. /var/named 또는 /var/named/chroot//var/named/slow.com.zone 파일 만들기
;
; Zone file for slow.com
;
; The full zone file
;
$TTL 86400
@ IN SOA ns.slow.com. test.slow.com. (
199802151 ; serial, todays date + todays serial #
8H ; refresh, seconds
2H ; retry, seconds
1W ; expire, seconds
1D ) ; minimum, seconds
; Name Server
IN NS ns.slow.com. ; Inet Address of name server
IN MX 10 gw.slow.com. ; Primary Mail Exchanger
IN A xxx.xxx.xxx.xxx ; 요부분이 뭘 의미하는지는 잘 모르겠다.
;
; Host name & Infomations
;
localhost A 127.0.0.1
ns IN A 221.41.221.223
slow-farm IN A 221.221.133.230

4. 방화벽이 open되어 있으면 죽여라
: system-config-securitylevel-tui(FC5), system-config-firewall-tui(FC8), system-config-selinux

5. named 데몬 활성화 (chkconfig, service )
- /sbin/chkconfig named on
- /sbin/service named restart