|
|
大家好!请教大家一个问题!我的DNS不能启动,请帮我找找错误!
首先强调一下,我已经重新启动了named服务了。我的IP地址如下:
eth0 Link encap:Ethernet HWaddr 00:E0:4C:4E 8:B3
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1969 errors:0 dropped:0 overruns:0 frame:0
TX packets:2375 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:727471 (710.4 Kb) TX bytes:226267 (220.9 Kb)
Interrupt:11 Base address:0xe000
lo Link encap ocal Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3830 errors:0 dropped:0 overruns:0 frame:0
TX packets:3830 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1912984 (1.8 Mb) TX bytes:1912984 (1.8 Mb
证明我的IP没有问题。
我的/etc/resolv.conf如下:
; generated by /sbin/dhclient-script
nameserver 192.168.0.1
我已经配置了主DNS。
下面是我的named.conf(关键了!请大家帮帮我找找阿 !)
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* 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 "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 "cjjj.com" IN {
type master;
file "cjjj.com.zone";
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "cjjj.com.local";
allow-update { none; };
};
//include "/etc/rndc.key";
这个是我的named.conf应该也没有问题我是按照上面的东西抄的肯定不能有错字。下面是我的cjjj.com.zone
$TTL 86400
$ORIGIN cjjj.com.
@ IN SOA w1.cjjj.com. root.w1.cjjj.com. (
200407029
28800
14400
3600000
86400 )
NS w1.cjjj.com.
w1 IN A 192.168.0.1
mail IN A 192.168.0.1
ftp IN A 192.168.0.1
www IN A 192.168.0.1
web CNAME www
由于我是单机测试,我打算让我的个机器同时可以进行mail,web,ftp服务故将IP写的都是一样的(就是我删掉了别的就只留下www也不好使)
下面是我的cjjj.com.local
$TTL 86400
@ IN SOA w1.cjjj.com. root.w1.cjjj.com. (
20040729
28800
14400
3600000
86400 )
NS w1.cjjj.com.
1 IN PTR w1.cjjj.com.
1 IN PTR www.cjjj.com.
1 IN PTR mail.cjjj.com.
1 IN PTR ftp.cjjj.com.
结果不好用!请大家帮忙找找毛病! |
|