반응형
https://help.ubuntu.com/community/BIND9ServerHowto
bind9 설치
zone 등록
zone 설정파일 작성 ( 기본 설정 파일을 복사한 후 편집 )
bind9 재시작
※ 설정을 변경하면 바로 적용이 안되고 '$TTL 604800' 갱신 주기마다 적용됨.
테스트
bind9 설치
# apt-get install bind9
zone 등록
# vi /etc/bind/named.conf.local
//
// Do any local configuration here
//
zone "nerv-team.co.kr" {
type master;
file "/etc/bind/db.nerv-team.co.kr";
};
//
// Do any local configuration here
//
zone "nerv-team.co.kr" {
type master;
file "/etc/bind/db.nerv-team.co.kr";
};
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
// organization
//include "/etc/bind/zones.rfc1918";
zone 설정파일 작성 ( 기본 설정 파일을 복사한 후 편집 )
# cp /etc/bind/db.local /etc/bind/db.nerv-team.co.kr
# vi /etc/bind/db.nerv-team.co.kr
;
; BIND data file for local loopback interface
;
; 도메인 주소 뒤에 ' . ' 주의!!
$TTL 604800
@ IN SOA ns.nerv-team.co.kr. root.nerv-team.co.kr. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.nerv-team.co.kr.
@ IN A 220.86.83.10
www IN A 220.86.83.10
mail IN A 220.86.83.10
* IN A 220.86.83.10
;
; BIND data file for local loopback interface
;
; 도메인 주소 뒤에 ' . ' 주의!!
$TTL 604800
@ IN SOA ns.nerv-team.co.kr. root.nerv-team.co.kr. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.nerv-team.co.kr.
@ IN A 220.86.83.10
www IN A 220.86.83.10
mail IN A 220.86.83.10
* IN A 220.86.83.10
bind9 재시작
# /etc/init.d/bind9 restart
※ 설정을 변경하면 바로 적용이 안되고 '$TTL 604800' 갱신 주기마다 적용됨.
테스트
# ping nerv-team.co.kr
PING nerv-team.co.kr (220.86.83.10) 56(84) bytes of data.
64 bytes from 220.86.83.10: icmp_seq=1 ttl=64 time=0.039 ms
64 bytes from 220.86.83.10: icmp_seq=2 ttl=64 time=0.036 ms
64 bytes from 220.86.83.10: icmp_seq=3 ttl=64 time=0.035 ms
64 bytes from 220.86.83.10: icmp_seq=4 ttl=64 time=0.034 ms
64 bytes from 220.86.83.10: icmp_seq=5 ttl=64 time=0.034 ms
64 bytes from 220.86.83.10: icmp_seq=6 ttl=64 time=0.036 ms
64 bytes from 220.86.83.10: icmp_seq=7 ttl=64 time=0.026 ms
64 bytes from 220.86.83.10: icmp_seq=8 ttl=64 time=0.027 ms
^C
--- nerv-team.co.kr ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7009ms
rtt min/avg/max/mdev = 0.026/0.033/0.039/0.006 ms
# named-checkzone nerv-team.co.kr /etc/bind/db.nerv-team.co.kr
zone nerv-team.co.kr/IN: NS 'ns.nerv-team.co.kr' has no address records (A or AAAA)
zone nerv-team.co.kr/IN: loaded serial 2
OK
# dig nerv-team.co.kr
PING nerv-team.co.kr (220.86.83.10) 56(84) bytes of data.
64 bytes from 220.86.83.10: icmp_seq=1 ttl=64 time=0.039 ms
64 bytes from 220.86.83.10: icmp_seq=2 ttl=64 time=0.036 ms
64 bytes from 220.86.83.10: icmp_seq=3 ttl=64 time=0.035 ms
64 bytes from 220.86.83.10: icmp_seq=4 ttl=64 time=0.034 ms
64 bytes from 220.86.83.10: icmp_seq=5 ttl=64 time=0.034 ms
64 bytes from 220.86.83.10: icmp_seq=6 ttl=64 time=0.036 ms
64 bytes from 220.86.83.10: icmp_seq=7 ttl=64 time=0.026 ms
64 bytes from 220.86.83.10: icmp_seq=8 ttl=64 time=0.027 ms
^C
--- nerv-team.co.kr ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7009ms
rtt min/avg/max/mdev = 0.026/0.033/0.039/0.006 ms
# named-checkzone nerv-team.co.kr /etc/bind/db.nerv-team.co.kr
zone nerv-team.co.kr/IN: NS 'ns.nerv-team.co.kr' has no address records (A or AAAA)
zone nerv-team.co.kr/IN: loaded serial 2
OK
# dig nerv-team.co.kr
; <<>> DiG 9.6.1-P1 <<>> nerv-team.co.kr
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49830
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49830
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;nerv-team.co.kr. IN A
;nerv-team.co.kr. IN A
;; ANSWER SECTION:
nerv-team.co.kr. 604800 IN A 220.86.83.10
nerv-team.co.kr. 604800 IN A 220.86.83.10
;; AUTHORITY SECTION:
nerv-team.co.kr. 604800 IN NS ns.nerv-team.co.kr.
nerv-team.co.kr. 604800 IN NS ns.nerv-team.co.kr.
;; Query time: 4 msec
;; SERVER: 168.126.63.1#53(168.126.63.1)
;; WHEN: Wed Nov 11 01:13:33 2009
;; MSG SIZE rcvd: 66
;; SERVER: 168.126.63.1#53(168.126.63.1)
;; WHEN: Wed Nov 11 01:13:33 2009
;; MSG SIZE rcvd: 66
반응형
'Server > Ubuntu' 카테고리의 다른 글
Openfire (0) | 2010.05.25 |
---|---|
Webmin (0) | 2009.11.18 |
Squirrelmail (0) | 2009.11.12 |
SparkWeb (0) | 2009.11.12 |
Cacti (0) | 2009.11.12 |
Apache + SSL (0) | 2009.11.12 |
Oracle Express Edition 10g (0) | 2009.11.11 |
Apache + Tomcat with Tomcat Connector (0) | 2009.11.11 |
Apache + PHP + MySQL (0) | 2009.11.11 |
Ubuntu 9.10 Desktop (0) | 2009.11.11 |