LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 895|回复: 4

DNS子域授权问题

[复制链接]
发表于 2006-12-1 17:06:56 | 显示全部楼层 |阅读模式
1。首先配置了一个域fush.com,现在想配置一个子域domain.fush.com;
fush.com域的区域文件为:

  1. [root@testing24 root]# cat /var/named/fush.com.zone
  2. $TTL    86400
  3. @                       1D IN SOA       @ root (
  4.                                         42              ; serial (d. adams)
  5.                                         3H              ; refresh
  6.                                         15M             ; retry
  7.                                         1W              ; expiry
  8.                                         1D )            ; minimum

  9.                         1D IN NS        @
  10.                         1D IN MX 10     mails.fush.com.
  11.                         1D IN A         127.0.0.1
  12. www                        IN A 172.16.1.135
  13. mails                      IN A 172.16.1.24
  14. news                       IN A 192.168.10.35
  15. trul                       IN A 172.16.1.11
  16. online                     IN A 172.16.1.27
  17. www1                       IN CNAME www
  18. domain.fush.com.           IN NS h7.domain.fush.com.
  19. h7.domain.fush.com.        IN A 172.16.1.7
复制代码
*注:h7为172.16.1.7的主机名


2。测试,fush.com域的DNSZ设置为nameserver 127.0.0.1 ;
该域(fush.com)运行正常,如:

  1. [root@testing24 root]# host [url]www.fush.com[/url]
  2. [url]www.fush.com[/url] has address 172.16.1.135
复制代码


3。登陆到子域服务器h7,且测试该DNS情况,host www.domain.fush.com运行正常。

  1. [root@testing24 root]# ssh 172.16.1.7
  2. The authenticity of host '172.16.1.7 (172.16.1.7)' can't be established.
  3. RSA key fingerprint is dc:a6:e3:99:05:10:2a:62:18:ba:6e:99:68:1f:14:f4.
  4. Are you sure you want to continue connecting (yes/no)? yes
  5. Warning: Permanently added '172.16.1.7' (RSA) to the list of known hosts.
  6. root@172.16.1.7's password:
  7. Last login: Fri Dec  1 16:13:51 2006 from 172.16.1.135
  8. [root@h7 root]# cat /etc/resolv.conf
  9. #nameserver 61.139.2.69
  10. nameserver 127.0.0.1
  11. [root@h7 root]# host [url]www.domain.fush.com[/url]
  12. [url]www.domain.fush.com[/url] has address 172.16.1.237
  13. [root@h7 root]# exit
  14. logout
  15. Connection to 172.16.1.7 closed.
复制代码


4.但是回到fush.com域去查找它的子域www.domain.fush.com时却不成功:

  1. [root@testing24 root]# host [url]www.domain.fush.com[/url]
  2. ;; connection timed out; no servers could be reached
  3. [root@testing24 root]#
复制代码


麻烦你们帮我看看怎么回事哈,整了一天都没搞懂。谢谢拉
发表于 2006-12-2 16:02:23 | 显示全部楼层
h7上的named.conf贴上看看?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-3 16:01:32 | 显示全部楼层
Post by 52violin
h7上的named.conf贴上看看?

  1. [root@h7 root]# cat /etc/named.conf
  2. // generated by named-bootconf.pl

  3. options {
  4.         directory "/var/named";
  5.         /*
  6.          * If there is a firewall between you and nameservers you want
  7.          * to talk to, you might need to uncomment the query-source
  8.          * directive below.  Previous versions of BIND always asked
  9.          * questions using port 53, but BIND 8.1 uses an unprivileged
  10.          * port by default.
  11.          */
  12.         // query-source address * port 53;
  13. };

  14. //
  15. // a caching only nameserver config
  16. //
  17. controls {
  18.         inet 127.0.0.1 allow { localhost; } keys { rndckey; };
  19. };
  20. zone "." IN {
  21.         type hint;
  22.         file "named.ca";
  23. };

  24. zone "localhost" IN {
  25.         type master;
  26.         file "localhost.zone";
  27.         allow-update { none; };
  28. };

  29. zone "0.0.127.in-addr.arpa" IN {
  30.         type master;
  31.         file "named.local";
  32.         allow-update { none; };
  33. };
  34. zone "domain.fush.com" {
  35.         type master;
  36.         file "domain.fush.com.zone";
  37. };
  38. include "/etc/rndc.key";
复制代码


可h7上DNS运行应该是正常的啊。

  1. [root@h7 root]# host www.domain.fush.com
  2. www.domain.fush.com has address 172.16.1.237
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-12-4 10:49:47 | 显示全部楼层
h7也是主dns?
觉得设为辅dns比较好,
类似
zone "somedomain" {
        type slave;
        file "db.somedomain";
        master { your master dns ip; };
}
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-4 10:53:57 | 显示全部楼层
Post by 52violin
h7也是主dns?
觉得设为辅dns比较好,
类似
zone "somedomain" {
        type slave;
        file "db.somedomain";
        master { your master dns ip; };
}


我主要是想设置子域哈
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表