Sau khi install RHEL4 lên PC, mình đã cấu hình DNS, nhưng mình vẫn kô thể nào làm cho DNS làm việc đc, mặc dù mình đã tham khảo khá nhiều tài liệu (http://www.linuxhomenetworking.com/; Step by Step Installation of a Secure Linux Web - DNS - Mail Server của camaptrang và vô số www trên internet)
Đây là nhưng thông tin trên hệ thống của mình:
**************************************
; /etc/named.conf
**************************************
//bof
options {
directory "/var/named";
forwarders {208.67.222.222;};
};
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 "abc.com.vn" {
type master;
notify no;
allow-query { any; };
file "abc.zone";
};
zone "1.168.192.in-addr.arpa" {
type master;
notify no;
file "192-168-1.zone";
};
//////////////////////////////////////
include "/etc/rndc.key";
//eof
**************************************
; /var/named/abc.zone
**************************************
//bof
$TTL 3D
@ IN SOA lin239.abc.com.vn. root.abc.com.vn. (
200211152 ; serial#
3600 ; refresh, seconds
3600 ; retry, seconds
3600 ; expire, seconds
3600 ) ; minimum, seconds
IN NS lin239.abc.com.vn.
IN MX 10 lin239.abc.com.vn.
lin239 IN A 192.168.1.239
www IN CNAME lin239.abc.com.vn.
mail IN CNAME lin239.abc.com.vn.
ftp IN CNAME lin239.abc.com.vn.
//eof
**************************************
; /var/named/192-168-1.zone
**************************************
//bof
$TTL 3D
@ IN SOA lin239.abc.com.vn. root.abc.com.vn. (
200303301 ; serial number
8H ; refresh, seconds
2H ; retry, seconds
4W ; expire, seconds
1D ) ; minimum, seconds
IN NS lin239.abc.com.vn.
100 IN PTR lin239.abc.com.vn.
//eof
**************************************
hostname -----> lin239.abc.com.vn
/etc/resolv.conf
search urc.com.vn
nameserver 192.168.1.239
********** Ket qua khi test ***************
[root@lin239 named]# nslookup lin239.abc.com.vn
Server: 192.168.1.239
Address: 192.168.1.239#53
** server can't find lin239.abc.com.vn: SERVFAIL
[root@lin239 named]# nslookup www.yahoo.com
Server: 192.168.1.239
Address: 192.168.1.239#53
Non-authoritative answer:
www.yahoo.com canonical name = www.yahoo-ht3.akadns.net.
Name: www.yahoo-ht3.akadns.net
Address: 209.131.36.158
Mong nhận đc sự giúp đỡ của mọi người để DNS có thể chạy đc.
Đây là nhưng thông tin trên hệ thống của mình:
**************************************
; /etc/named.conf
**************************************
//bof
options {
directory "/var/named";
forwarders {208.67.222.222;};
};
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 "abc.com.vn" {
type master;
notify no;
allow-query { any; };
file "abc.zone";
};
zone "1.168.192.in-addr.arpa" {
type master;
notify no;
file "192-168-1.zone";
};
//////////////////////////////////////
include "/etc/rndc.key";
//eof
**************************************
; /var/named/abc.zone
**************************************
//bof
$TTL 3D
@ IN SOA lin239.abc.com.vn. root.abc.com.vn. (
200211152 ; serial#
3600 ; refresh, seconds
3600 ; retry, seconds
3600 ; expire, seconds
3600 ) ; minimum, seconds
IN NS lin239.abc.com.vn.
IN MX 10 lin239.abc.com.vn.
lin239 IN A 192.168.1.239
www IN CNAME lin239.abc.com.vn.
mail IN CNAME lin239.abc.com.vn.
ftp IN CNAME lin239.abc.com.vn.
//eof
**************************************
; /var/named/192-168-1.zone
**************************************
//bof
$TTL 3D
@ IN SOA lin239.abc.com.vn. root.abc.com.vn. (
200303301 ; serial number
8H ; refresh, seconds
2H ; retry, seconds
4W ; expire, seconds
1D ) ; minimum, seconds
IN NS lin239.abc.com.vn.
100 IN PTR lin239.abc.com.vn.
//eof
**************************************
hostname -----> lin239.abc.com.vn
/etc/resolv.conf
search urc.com.vn
nameserver 192.168.1.239
********** Ket qua khi test ***************
[root@lin239 named]# nslookup lin239.abc.com.vn
Server: 192.168.1.239
Address: 192.168.1.239#53
** server can't find lin239.abc.com.vn: SERVFAIL
[root@lin239 named]# nslookup www.yahoo.com
Server: 192.168.1.239
Address: 192.168.1.239#53
Non-authoritative answer:
www.yahoo.com canonical name = www.yahoo-ht3.akadns.net.
Name: www.yahoo-ht3.akadns.net
Address: 209.131.36.158
Mong nhận đc sự giúp đỡ của mọi người để DNS có thể chạy đc.
Comment