- 论坛徽章:
- 0
|
我在SOLAIS 9上安装了BIND 9.2.2 安装配置后发现了下列的现象。
# ./named -g
Apr 03 17:33:30.220 starting BIND 9.2.2 -g
Apr 03 17:33:30.245 using 1 CPU
Apr 03 17:33:30.716 loading configuration from '/etc/named.conf'
Apr 03 17:33:30.794 listening on IPv4 interface lo0, 127.0.0.1#53
Apr 03 17:33:30.832 listening on IPv4 interface pcn0, 192.168.1.197#53
Apr 03 17:33:31.112 command channel listening on 127.0.0.1#953
Apr 03 17:33:31.144 ignoring config file logging statement due to -g option
Apr 03 17:33:31.223 dns_rdata_fromtext: localhost.rev:2: near eol: unexpected end of input
Apr 03 17:33:31.255 zone 0.0.127.in-addr.arpa/IN: loading master file localhost.rev: unexpected end of input
Apr 03 17:33:31.305 zone 1.168.192.in-addr.arpa/IN: loaded serial 1999112002
Apr 03 17:33:31.314 dns_rdata_fromtext: bind.com.zone:2: near eol: unexpected end of input
Apr 03 17:33:31.317 zone bind.com/IN: loading master file bind.com.zone: unexpected end of input
Apr 03 17:33:31.317 running
在其它机器上,运行nslookup后显示如下:
C:\>;nslookup
Default Server: sun.bind.com
Address: 192.168.1.197
>;
但是输入域名后出现下列现象:
C:\>;nslookup
Default Server: sun.bind.com
Address: 192.168.1.197
>; sun.bind.com
Server: sun.bind.com
Address: 192.168.1.197
*** sun.bind.com can't find sun.bind.com: Server failed
>; sun.bind.com
Server: sun.bind.com
Address: 192.168.1.197
*** sun.bind.com can't find sun.bind.com: Server failed
>; www.bind.com
Server: sun.bind.com
Address: 192.168.1.197
*** sun.bind.com can't find www.bind.com: Server failed
>;
配置文件如下:
/etc/named.conf
# more /etc/named.conf
options {
directory "/var/name.db";
pid-file "named.pid";
};
zone "." {
type hint;
file "named.root";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "localhost.rev";
notify no;
};
zone "1.168.192.in-addr.arpa" in {
type master;
file "db.192.168.1";
notify no;
};
zone "bind.com" in {
type master;
file "bind.com.zone";
notify no;
};
# Use with the following in named.conf, adjusting the allow list as needed:
key "rndc-key" {
algorithm hmac-md5;
secret "1FYxtMVR2SU/MY7zuEhsIA==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf
# more bind.com.zone
$TTL 3D
@ IN SOA sun.bind.com. hostmaster.bind.com.
(
1999112002
3600
900
3600000
3600
)
@ IN NS sun
@ IN NS sun.bind.com.
@ IN A 127.0.0.1
@ IN A 192.168.1.197
localhost IN A 127.0.0.1
sun IN A 192.168.1.197
www IN CNAME sun
# more db.192.168.1
$TTL 3D
@ IN SOA sun.bind.com. hostmaster.bind.com. (
1999112002
43200
3600
604800
86400
);
IN NS sun.bind.com.
197 IN PTR sun.bind.com.
#
more localhost.rev
$TTL 3D
@ IN SOA sun.bind.com. hostmaster.bind.com.
(
1999112002 ;
3600 ;
900 ;
3600000 ;
3600 );
NS sun.bind.com.
1 PTR localhost.
; End of file
# |
|