Windows 에서 BIND 설치
- download 및 설치
- <BIND_path>\bin> rndc-confgen -a
- rndc-confgen > ..\etc\rndc.conf
- named.conf
- ..\bin> named-checkconf.exe ..\etc\named.conf
- ftp://ftp.rs.internic.net/domain 에서 named.root download 하기
- named.root 의 이름을 named.ca 로 변경
- localhost.zone 파일 생성
- <BIND_path>\bin>named-checkzone.exe localhost ..\etc\localhost.zone
- named.local 파일 생성
- named-checkzone.exe named.local ..\etc\named.local
- example.com.zone 파일 생성
- <BIND_path>\bin>named-checkzone.exe example.com example.com.zone
원래는 rndc-confgen > ..\etc\rndc.conf 를 해서 conf 를 만들고, 여기서 key 부분만 copy 해서 rndc.key 를 만들면 된다.
여기선 key format 을 좀 더 명확히 보여주기 위해서 이런 방법을 택한 듯 하다.
여하튼 결과적으로 .conf 와 .key 의 key 값이 일치하면 된다.
named.conf
options {
directory "c:\Program Files (x86)\ISC BIND 9\etc"; // NS Zone file path
};
controls{
inet 127.0.0.1 allow{localhost;}keys{rndc-key;};
}; // "named" deamon is controlled at the localhost with rndc-key
// required zone for recursive queries
zone "." {
type hint;
file "named.ca";
}; // root domain '.' is in the named.ca file, the path in options.directory is used
// required local host domain
zone "localhost" in{
type master;
file "localhost.zone";
allow-update{none;};
};
// localhost reverse map
zone "0.0.127.in-addr.arpa" in{
type master;
file "named.local";
allow-update{none;};
};
include "c:\Program Files (x86)\ISC BIND 9\etc\rndc.key";
zone "example.com" in{
type master;
file "example.com.zone";
allow-update{key "rndc-key";};
};
localhost.zone
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN A 127.0.0.1
example.com.zone
$TTL 43200
@ IN SOA ns.example.com. root.example.com. (
2007042710 ; 시리얼 값 (년월일시간)으로 대부분 셋팅
3H ; 2차 네임서버가 1차 네임서버에 접속하는 시간
15M ; 접속 실패 시 다시 시도할 시간 간격
1W ; 1차 네임서버에서 데이터가 없다면 1주 이후에 지워진다.
1D ) ; 위에서 설정한 TTL 값과 같은 의미
;
; Name Server
IN NS ns.example.com. ; 도메인을 소유한 DNS의 도메인
IN MX 10 mail.example.com. ; 메일을 보낼 도메인 또는 주소
IN A 211.207.71.151 ; 도메인이 찾아갈 IP 주소
;
; Host name
ns IN A 211.207.71.151 ;
;
; Virtual Host
www IN A 211.207.71.151 ; www.도메인이 찾아갈 IP주소
mail IN A 211.207.71.151 ; 메일서버 아이피
ftp IN A 211.207.71.151 ; FTP서버 아이피
* IN A 211.207.71.151 ; 모든 서브 도메인이 찾아갈 서버 ip 주소
댓글 없음:
댓글 쓰기