VnLamp

Go Back   VnLamp > Khu vực Training > LPI > DNS

Trả lời
 
LinkBack Ðiều Chỉnh Xếp Bài
Truy Vấn DNS
Old
  (#1 (permalink))
 
Status: Offline
Posts: 139
Tham gia: Aug 2008
Học viên VNLAMP
 
thanhtung's Avatar
Default Truy Vấn DNS - 11-08-2008, 22:11 11-08-2008

Em làm một DNS primary và một DNS slave.Cả hai start rất tốt.
Em đứng từ máy khác chỉ DNS về DNS primary thi phân giải rất tốt.Nhưng em chỉ DNS về DNS slave thì không phân giải được.Xin giúp em về vấn đề này!
   
Trả Lời Với Trích Dẫn
Old
  (#2 (permalink))
 
Status: Offline
Posts: 459
Tham gia: Dec 2007
Administrator
 
patrick's Avatar
Default 12-08-2008, 08:12 12-08-2008

Chào Bạn,

Bạn có thể post 2 files config named.conf của Master và Slave lên trên đây để mình xem giúp bạn được không?


Kinh nghiệm của chúng tôi là kiến thức của bạn
  Send a message via Yahoo to patrick  
Trả Lời Với Trích Dẫn
Old
  (#3 (permalink))
 
Status: Offline
Posts: 139
Tham gia: Aug 2008
Học viên VNLAMP
 
thanhtung's Avatar
Default 12-08-2008, 10:12 12-08-2008

ĐÂY LÀ FILE CẤU HÌNH named.conf cua master

//
// named.conf for Red Hat caching-nameserver
//
acl mynet {
192.168.2.0/24;
127.0.0.1;
};

options {
directory "/var/named";
forwarders{208.67.222.222;208.67.220.220;};
forward only;
notify no;
auth-nxdomain yes;
// multiple-cnames yes;
listen-on {
mynet;
};
};
// 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;



//
// 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 "localhost.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; };
};

#include "/etc/rndc.key";


zone "tung.com" {
type master;
file "tung.com";
allow-query {
mynet;
};
allow-transfer {
mynet;
};
allow-update {
mynet;
};
};
zone "abc.com" {
type master;
file "abc.com";
allow-query {
mynet;
};
allow-transfer {
mynet;
};
allow-update {
mynet;
};
};
zone "2.168.192.in-addr.arpa" {
type master;
file "2.168.192.in-addr.arpa.zone";
allow-query {
mynet;
};
allow-transfer {
mynet;
};
allow-update {
mynet;
};
};
ĐÂY LÀ fiel cấu hình named.conf cua slave
//
// named.conf for Red Hat caching-nameserver
//
acl mynet {
192.168.2.0/24;
127.0.0.1;
};

options {
directory "/var/named";
allow-transfer{none;};
notify no;
auth-nxdomain yes;
multiple-cnames yes;
listen-on {
mynet;
};
};
// 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;



//
// 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 "localhost.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; };
};

include "/etc/rndc.key";


zone "tung.com" {
type slave;
file "tung.com";
masters{192.168.1.100;};
allow-query {
mynet;
};
allow-transfer {
mynet;
};
allow-update {
mynet;
};
};
zone "abc.com" {
type slave;
file "abc.com";
masters{192.168.1.100;};
allow-query {
mynet;
};
allow-transfer {
mynet;
};
allow-update {
mynet;
};
};
zone "2.168.192.in-addr.arpa" {
type slave;
file "2.168.192.in-addr.arpa.zone";
masters{192.168.1.100;};
allow-query {
mynet;
};
allow-transfer {
mynet;
};
allow-update {
mynet;
};
};
Giúp em với!
   
Trả Lời Với Trích Dẫn
Old
  (#4 (permalink))
 
Status: Offline
Posts: 459
Tham gia: Dec 2007
Administrator
 
patrick's Avatar
Default 12-08-2008, 10:12 12-08-2008

Chào bạn,

Bạn dùng ACL như vậy thì sao bạn query được

Bạn ACL cho 192.168.2.0/24, mà DNS của bạn lại chạy ở 1 network khác là 192.168.1.100

Bạn xem lại phần ACL nhé.


Kinh nghiệm của chúng tôi là kiến thức của bạn
  Send a message via Yahoo to patrick  
Trả Lời Với Trích Dẫn
Old
  (#5 (permalink))
 
Status: Offline
Posts: 24
Tham gia: Oct 2008
Junior Member
 
noob2008's Avatar
Default 25-10-2008, 01:25 25-10-2008

cam ơn thầy em test y chan va doi cai ACL như thầy nói là running liền


It's better to be first than it is to be better
   
Trả Lời Với Trích Dẫn
Trả lời


Ðiều Chỉnh
Xếp Bài

Quyền Sử Dụng Ở Diễn Ðàn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Smilies đang Mở
[IMG] đang Tắt
HTML đang Tắt
Trackbacks are Mở
Pingbacks are Mở
Refbacks are Mở


Múi giờ GMT. Hiện tại là 03:21 21-05-2012.