|
|
各位热心的朋友:
我在VM下跑着rhel 5,配置DNS后能正常启动,解析像www.sohu.com这样的域名都 ... 域www.xyz.edu.cn
我的RHEL 5是用host only方式连接到我机器的上实现与外网连接的
我的named.conf中关于我自己定义的哪个域的部分如下:
#key ddns_key
#{
# algorithm hmac-md5;
# secret "use /usr/sbin/dns-keygen to generate TSIG keys";
#};
view "external"
{
/* This view will contain zones you want to serve only to "external" clients
* that have addresses that are not on your directly attached LAN interface subnets:
*/
match-clients { any; };
match-destinations { any; };
recursion no;
// you'd probably want to deny recursion to external clients, so you don't
// end up providing free DNS service to all takers
// all views must contain the root hints zone:
include "/etc/named.root.hints";
// These are your "authoritative" external zones, and would probably
// contain entries for just your web and mail servers:
zone "my.external.zone" {
type master;
file "my.external.zone.db";
};
zone "cl.edu.cn" {
type master;
file "cl.edu.cn.zone.db";
};
因为DNS启动报
Mar 28 08:32:52 redhat named[2145]: /etc/named.conf:101: configuring key 'ddns_key': bad base64 encoding
Mar 28 08:32:53 redhat named[2145]: loading configuration: bad base64 encoding
Mar 28 08:32:53 redhat named[2145]: exiting (due to fatal error)
启动不了,所以我把关于keygen的那几行注释了
我的区文件如下:
$TTL 86400
@ IN SOA dns.cl.edu.cn. root.dns.cl.edu.cn (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
cl.edu.cn. IN NS dns.cl.edu.cn.
dns.cl.edu.cn. IN A 192.168.0.100
www IN A 192.168.0.100
mail IN A 192.168.0.100
named.conf的位置在:
/var/named/chroot/etc下
cl.edu.cn.zone.db在:
/var/named/chroot/var/named下
熟悉rhel 5下DNS的朋友指点一下吧,我已经折腾好久了,也发帖问了很多,还是没解决。
先谢了!!! |
|