Ky0 wrote:
Xin bạn nói rõ:
- Bạn cài đặt Named bằng cách nào?
- Bạn khởi động như thế nào? Và nó báo lỗi gì?
Bạn cung cấp càng nhiều thông tin liên quan thì mọi người sẽ dễ dàng giúp đỡ bạn hơn!
- Ky0 -
mình dùng lệnh yum install bind và yum install caching-nameserver
và sau khi config xong và run nó báo thế này
Code:
[root@server1 named]# service named restart
Stopping named: [ OK ]
Starting named:
Error in named configuration:
zone localdomain/IN: loaded serial 42
zone taoditimtao.co.cc/IN: loaded serial 2010122001
dns_master_load: taoditimtao.local:18: 1.168.192.in-addr.arpa: multiple RRs of singleton type
dns_master_load: taoditimtao.local:22: unexpected end of line
dns_master_load: taoditimtao.local:21: unexpected end of input
zone 1.168.192.in-addr.arpa/IN: loading master file taoditimtao.local: multiple RRs of singleton type
localhost_resolver/1.168.192.in-addr.arpa/IN: multiple RRs of singleton type
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
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: loaded serial 1997022700
zone 255.in-addr.arpa/IN: loaded serial 42
zone 0.in-addr.arpa/IN: loaded serial 42
và đây là file named.conf : /var/named/chroot/etc/named.conf
Code:
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { localhost; };
allow-query-cache { localhost; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
Đây là file named.rfc1912.zones
Code:
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "taoditimtao.co.cc" IN {
type master;
file "taoditimtao.zone";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "taoditimtao.local";
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; };
};
file taoditimtao.zone : /var/named/taoditimtao.zone
Code:
$TTL 86400
@ IN SOA ns1.taoditimtao.co.cc. root.taoditimtao.co.cc. (
2010122001 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns1.taoditimtao.co.cc.
ns1 IN A 192.168.1.200
www IN A 192.168.1.200
file taoditimtao.local: /var/named/taoditimtao.local
Code:
$TTL 86400
@ IN SOA ns1.taoditimtao.co.cc. root.taoditimtao.co.cc. (
2010122001 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns1.taoditimtao.co.cc.
200 IN PTR ns1.taoditimtao.co.cc.
200 IN PTR www.taoditimtao.co.cc.
~
~
THANK