|
本人是在局域网环境下做解析的,域名为www.IT.com mail.IT.com IP地址同为192.168.0.2,系统为Redhat AS 4.0
/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;
};
//
// 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.168.192.in-addr.arpa" IN {
type master;
file "named.192.168.0.2";
allow-update { none; };
};
zone "IT.com" IN {
type master;
file "/var/named/named.IT";
allow-update { none; };
};
include "/etc/rndc.key";
/var/named/named.192.168.0.2(内容):
$TTL 86400
@ IN SOA IT.com. root.IT.com. (
83 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS www.IT.com
IN MX 10 mail.IT.com
2 IN PTR www.IT.com
2 IN PTR mail.IT.com
/var/named/named.IT(内容):
$TTL 86400
@ IN SOA IT.com. root.IT.com. (
83 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS www.IT.com
IN MX 10 mail.IT.com
www IN A 192.168.0.2
mail IN A 192.168.0.2
tail -20 /var/log/messages:
Aug 7 15:01:59 IT named[3924]: no longer listening on 192.168.0.1#53
Aug 7 15:01:59 IT named[3924]: exiting
Aug 7 15:01:59 IT named: succeeded
Aug 7 15:02:01 IT named[3953]: starting BIND 9.2.4 -u named -t /var/named/chroot
Aug 7 15:02:01 IT named[3953]: using 1 CPU
Aug 7 15:02:01 IT named: named 启动 succeeded
Aug 7 15:02:01 IT named[3953]: loading configuration from '/etc/named.conf'
Aug 7 15:02:01 IT named[3953]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 7 15:02:01 IT named[3953]: listening on IPv4 interface eth0, 192.168.0.1#53
Aug 7 15:02:01 IT named[3953]: command channel listening on 127.0.0.1#953
Aug 7 15:02:01 IT named[3953]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Aug 7 15:02:01 IT named[3953]: dns_master_load: named.192.168.0.2:2: unexpected end of line
Aug 7 15:02:01 IT named[3953]: dns_master_load: named.192.168.0.2:1: unexpected end of input
Aug 7 15:02:01 IT named[3953]: zone 0.168.192.in-addr.arpa/IN: loading master file named.192.168.0.2: unexpected end of input
Aug 7 15:02:01 IT named[3953]: dns_master_load: /var/named/named.IT:2: unexpected end of line
Aug 7 15:02:01 IT named[3953]: dns_master_load: /var/named/named.IT:1: unexpected end of input
Aug 7 15:02:01 IT named[3953]: zone IT.com/IN: loading master file /var/named/named.IT: unexpected end of input
Aug 7 15:02:01 IT named[3953]: zone localdomain/IN: loaded serial 42
Aug 7 15:02:01 IT named[3953]: zone localhost/IN: loaded serial 42
Aug 7 15:02:01 IT named[3953]: running |
|