Self-Improvement
Linux DNS (2) 본문
*DNS Master, Slave
1.선수작업
: VMware을 통한 Clone DNS 생성
: Clone DNS IP 변경 (hosts, IP변경툴)
: 호스트이름 변경
2.Master DNS
#vi /etc/named.rfc1912.zones
----------------------------named.rfc1912.zones---------------------------
zone "localhost.com" IN {
type master;
file "localhost60.zone";
also-notify { 172.30.1.1XX; 172.30.1.35; }; <----- 라인 추가
};
zone "1.30.172.in-addr.arpa" IN {
type master;
file "localhost60.rev";
also-notify { 172.30.1.1XX; 172.30.1.35; }; <----- 라인 추가
};
----------------------------------------------------------------------------------
실시간으로 자신의 Slave DNS서버에게 변경 사항을 알려주는 설정
#vi /var/named/chroot/var/named/localhost60.zone
---------------localhost60.zone--------------------
IN NS ns1
IN NS ns2 <----- 새로운 라인 추가
ns1 IN A 172.30.1.35
ns2 IN A 172.30.1.1XX <----- 새로운 라인 추가
----------------------------------------------------------
#vi localhost60.rev
----------------example211.rev--------------------
IN NS ns1.localhost.com.
IN NS ns2.localhost.com. <----- 새로운 라인 추가
35 IN PTR ns1.localhost.com.
1XX IN PTR ns2.localhost.com. <----- 새로운 라인 추가
--------------------------------------------------
#service named restart
#nslookup -q=NS localhost.com
3.Slave DNS (Clone DNS)
#vi /etc/named.rfc1912.zones
-----------------named.rfc1912.zones----------------
zone "localhost.com" IN {
type slave;
masters { 172.30.1.35; };
file "slaves/localhost60.zone";
};
zone "1.30.172.in-addr.arpa" IN {
type slave;
masters { 172.30.1.35; };
file "slaves/localhost60.rev";
};
-----------------------------------------------------
#service network restart
#ls -l /var/named/chroot/var/named/slaves
*Master, Slave DNS 존 업데이트
SOA(Start Of Authority)
? Serial Number (권장: 2010031100)
? Refresh Time (권장: 12H, 1D)
? Retry Time (권장: 15M ~ 1H)
? Expire Date (권장: 1W)
? TTL, Time To Live (권장: 1D)
(Master DNS)
#vi /var/named/chroot/var/named/localhost60.zone
------------localhost60.zone-------------
test IN A 172.30.1.35
----------------------------------------
#service named restart
(Slave DNS)
#cat /var/named/chroot/var/named/slaves/localhost60.zone
test가 업데이트가 안되어 짐
※이유 : 존 업데이트시 Serial Num을 비교하여 업데이트 하기 때문
(Master DNS)
#vi /var/named/chroot/var/named/localhost60.zone
Serial Number의 숫자↑
#service named restart
(Slave DNS)
#cat /var/named/chroot/var/named/slaves/localhost60.zone
확인
'리눅스 > 서비스' 카테고리의 다른 글
Linux Web (2) (0) | 2018.10.21 |
---|---|
Linux Web (1) (0) | 2018.10.21 |
Linux DNS (1) (0) | 2018.10.21 |
Linux 이더채널 본딩 (0) | 2018.10.21 |
Linux 네트워크 설정 파일, 툴 (0) | 2018.10.21 |