nsupdate 설정 방법
아래와 같이 DNS 서버를 구축하여 nsupdate를 이용하여 DNS 의 주소를 update하고하 합니다.
환경은 아래와 같습니다.
OS : Linux ns1.examp.co.kr 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686
i386 GNU/Linux
BIND : bind-9.2.4-16.EL4 사용중입니다.
아래는 /var/named/test.co.kr.zone 파일의 내용입니다.
=================================================
@ IN SOA ns1.test.co.kr. DNSAdmin.test.co.kr. (
2004091501 ; Serial
3600 ; Refresh
900 ; Retry
604800 ; Expire
86400 ; Minimum
)
IN MX 10 mail.test.co.kr
IN NS ns1.test.co.kr
ns1 IN A 192.168.1.80
ns1 IN AAAA 3ffe:302:11:2:250:daff:fe28:b970
www IN A 192.168.1.80
www IN AAAA 3ffe:302:11:2:250:daff:fe28:b970
=================================================
아래는 /etc/named.conf 파일의 내용입니다.
=================================================
/
// named.conf for Red Hat caching-nameserver
//
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* 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 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
pid-file "/var/run/named/named.pid";
listen-on-v6 { any; };
match-mapped-addresses yes;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
zone "examp.co.kr" IN {
type master;
file "examp.co.kr.zone";
allow-update { 192.168.1.55; };
};
zone "test.co.kr" IN {
type master;
file "test.co.kr.zone";
allow-update { 192.168.1.80; };
};
zone "cryptotelecom.net" IN {
type master;
file "cryptotelecom.net.zone";
allow-update { 192.168.1.80; };
};
include "/etc/rndc.key";
=================================================
* 여기서 test.co.kr의 zone 파일에 있는 IP주소 "192.168.1.80"을 "192.168.1.99"로
nsupdate를 이용하여 update하고자 하는데 결과가 아래와 같이 SERVER Fail 이라는
메시지와 함께 IP update가 정상적으로 되질 않는군요.
무엇이 문제인지 알수가 없어서 글 남깁니다.
****************************************************************
ns1.examp.co.kr{named}209: nsupdate -d
> prereq yxdomain www.test.co.kr
> update delete www.test.co.kr A
> update add www.test.co.kr 86400 A 192.168.1.99
>
Reply from SOA query:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31583
;; flags: qr aa rd ra ; QUESTION: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;www.test.co.kr. IN SOA
;; AUTHORITY SECTION:
test.co.kr. 1800 IN SOA ns1.test.co.kr. DNSAdmin.test.co.kr. 2004091501 3600 900 604800 86400
Found zone name: test.co.kr
The master is: ns1.test.co.kr
before getaddrinfo()
Reply from update query:
;; ->>HEADER<<- opcode: UPDATE, status: SERVFAIL, id: 48673
;; flags: qr ra ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
>
> ns1.examp.co.kr{named}210:
****************************************************************
댓글 달기