LinuxSir.cn,穿越时空的Linuxsir!

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

昨天修改了zone文件,域名myblue.ws解析就出问题了

[复制链接]
发表于 2006-9-9 10:46:24 | 显示全部楼层 |阅读模式
1.我的zone文件:


  1. $TTL 86400
  2. @ IN SOA ns1.gentoolinux.biz. root.myblue.ws. (
  3. 46 ; serial
  4. 28800 ; refresh
  5. 14400 ; retry
  6. 3600000 ; expire
  7. 86400 ; ttl
  8. )

  9. myblue.ws. 14400 IN NS ns1.gentoolinux.biz.
  10. myblue.ws. 14400 IN NS ns2.gentoolinux.biz.
  11. #ns1 14400 IN 38.99.2.86
  12. #ns2 14400 IN 69.61.72.107
  13. www 14400 IN A 69.61.72.107
  14. ftp 14400 IN A 69.61.72.107
  15. mail 14400 IN A 69.61.72.107
  16. myblue.ws. IN A 69.61.72.107
复制代码

会不会是注销的两行出了问题?

2.我的master named.conf文件:

  1. //
  2. // named.conf for Red Hat caching-nameserver
  3. //

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

  17. //
  18. // a caching only nameserver config
  19. //
  20. controls {
  21.         inet 127.0.0.1 allow { localhost; } keys { rndckey; };
  22. };

  23. zone "." IN {
  24.         type hint;
  25.         file "named.ca";
  26. };

  27. zone "localdomain" IN {
  28.         type master;
  29.         file "localdomain.zone";
  30.         allow-update { none; };
  31. };

  32. zone "localhost" IN {
  33.         type master;
  34.         file "localhost.zone";
  35.         allow-update { none; };
  36. };

  37. zone "0.0.127.in-addr.arpa" IN {
  38.         type master;
  39.         file "named.local";
  40.         allow-update { none; };
  41. };

  42. zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
  43.         type master;
  44.         file "named.ip6.local";
  45.         allow-update { none; };
  46. };

  47. zone "255.in-addr.arpa" IN {
  48.         type master;
  49.         file "named.broadcast";
  50.         allow-update { none; };
  51. };

  52. zone "0.in-addr.arpa" IN {
  53.         type master;
  54.         file "named.zero";
  55.         allow-update { none; };
  56. };

  57. zone "gentoolinux.biz" IN {
  58. type master;
  59. file "/var/named/gentoolinux.biz.zone";
  60. allow-update { none; };
  61. };

  62. zone "myblue.ws" IN {
  63. type master;
  64. file "/var/named/myblue.ws.zone";
  65. allow-update { none; };
  66. };

  67. zone "imissu.info" IN {
  68. type master;
  69. file "/var/named/imissu.info.zone";
  70. allow-update { none; };
  71. };
  72. include "/etc/rndc.key";
复制代码


3.我的salve named.conf文件:

  1. options {
  2.         directory "/var/bind";

  3.         // uncomment the following lines to turn on DNS forwarding,
  4.         // and change the forwarding ip address(es) :
  5.         //forward first;
  6.         //forwarders {
  7.         //        123.123.123.123;
  8.         //        123.123.123.123;
  9.         //};

  10.         listen-on-v6 { none; };
  11.         listen-on { 127.0.0.1; };

  12.         // to allow only specific hosts to use the DNS server:
  13.         //allow-query {
  14.         //        127.0.0.1;
  15.         //};

  16.         // if you have problems and are behind a firewall:
  17.         //query-source address * port 53;
  18.         pid-file "/var/run/named/named.pid";
  19. };

  20. // Briefly, a zone which has been declared delegation-only will be effectively
  21. // limited to containing NS RRs for subdomains, but no actual data beyond its
  22. // own apex (for example, its SOA RR and apex NS RRset). This can be used to
  23. // filter out "wildcard" or "synthesized" data from NAT boxes or from
  24. // authoritative name servers whose undelegated (in-zone) data is of no
  25. // interest.
  26. // See http://www.isc.org/products/BIND/delegation-only.html for more info

  27. //zone "COM" { type delegation-only; };
  28. //zone "NET" { type delegation-only; };

  29. zone "." IN {
  30.         type hint;
  31.         file "named.ca";
  32. };

  33. zone "localhost" IN {
  34.         type master;
  35.         file "pri/localhost.zone";
  36.         allow-update { none; };
  37.         notify no;
  38. };

  39. zone "127.in-addr.arpa" IN {
  40.         type master;
  41.         file "pri/127.zone";
  42.         allow-update { none; };
  43.         notify no;
  44. };

  45. zone "gentoolinux.biz" IN {
  46. type slave;
  47. masters { 38.99.2.86; };
  48. file "/var/named/gentoolinux.biz.zone";
  49. };

  50. zone "myblue.ws" IN {
  51. type slave;
  52. masters { 38.99.2.86; };
  53. file "/var/named/myblue.ws.zone";
  54. };

  55. zone "imissu.info" IN {
  56. type slave;
  57. masters { 38.99.2.86; };
  58. file "/var/named/imissu.info.zone";
  59. };

  60. include "/etc/bind/rndc.key";
复制代码


master用的CENTOS 4.3的VPS,slave用的Gentoo Linux 2006.0

4.dig我的域名出现这样的输出:

  1. miyu@imissu /var/named $ dig www.myblue.ws

  2. ; <<>> DiG 9.3.2 <<>> www.myblue.ws
  3. ;; global options:  printcmd
  4. ;; Got answer:
  5. ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 37203
  6. ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

  7. ;; QUESTION SECTION:
  8. ;www.myblue.ws.                 IN      A

  9. ;; Query time: 228 msec
  10. ;; SERVER: 38.99.2.86#53(38.99.2.86)
  11. ;; WHEN: Sat Sep  9 10:35:29 2006
  12. ;; MSG SIZE  rcvd: 31
复制代码


大家帮我看看什么问题好吗?
发表于 2006-9-9 11:25:34 | 显示全部楼层
最好看看 log 里边写的是什么。。。光贴配置看起来麻烦。:)。
回复 支持 反对

使用道具 举报

发表于 2006-9-9 12:03:16 | 显示全部楼层
  1. myblue.ws. 14400 IN NS ns1.gentoolinux.biz.
  2. myblue.ws. 14400 IN NS ns2.gentoolinux.biz.
  3. #ns1 14400 IN 38.99.2.86
  4. #ns2 14400 IN 69.61.72.107
复制代码


当你有NS纪录时,就得有NS纪录的A纪录。
另外
应该写成
ns1 14400 IN  A  38.99.2.86
ns2 14400 IN  A  69.61.72.107
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-9 12:34:40 | 显示全部楼层
Post by orphen
  1. myblue.ws. 14400 IN NS ns1.gentoolinux.biz.
  2. myblue.ws. 14400 IN NS ns2.gentoolinux.biz.
  3. #ns1 14400 IN 38.99.2.86
  4. #ns2 14400 IN 69.61.72.107
复制代码


当你有NS纪录时,就得有NS纪录的A纪录。
另外
应该写成
ns1 14400 IN  A  38.99.2.86
ns2 14400 IN  A  69.61.72.107

每个zone文件里都要写吗?
回复 支持 反对

使用道具 举报

发表于 2006-9-10 03:40:11 | 显示全部楼层
简单的可以这样写
  1. $TTL 86400
  2. @ IN SOA ns1.gentoolinux.biz. root.myblue.ws. (
  3. 46 ; serial
  4. 28800 ; refresh
  5. 14400 ; retry
  6. 3600000 ; expire
  7. 86400 ; ttl
  8. )

  9. @       14400 IN NS ns1.gentoolinux.biz.
  10.          14400 IN NS ns2.gentoolinux.biz.
  11.                   IN A 69.61.72.107
  12. ns1 14400 IN 38.99.2.86
  13. ns2 14400 IN 69.61.72.107
  14. www 14400 IN A 69.61.72.107
  15. ftp 14400 IN A 69.61.72.107
  16. mail 14400 IN A 69.61.72.107
复制代码

第一项为@代表了这个“域”,第一项为“空白”代表与上一条记录相同。

如果不写NS纪录的话,就代表使用本机作为NS,下面的NS的A纪录也就不用写了。
如果要是写了NS纪录的话,就必须写上相应的NS纪录的A纪录。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-10 17:11:39 | 显示全部楼层
Post by orphen
简单的可以这样写
  1. $TTL 86400
  2. @ IN SOA ns1.gentoolinux.biz. root.myblue.ws. (
  3. 46 ; serial
  4. 28800 ; refresh
  5. 14400 ; retry
  6. 3600000 ; expire
  7. 86400 ; ttl
  8. )

  9. @       14400 IN NS ns1.gentoolinux.biz.
  10.          14400 IN NS ns2.gentoolinux.biz.
  11.                   IN A 69.61.72.107
  12. ns1 14400 IN 38.99.2.86
  13. ns2 14400 IN 69.61.72.107
  14. www 14400 IN A 69.61.72.107
  15. ftp 14400 IN A 69.61.72.107
  16. mail 14400 IN A 69.61.72.107
复制代码

第一项为@代表了这个“域”,第一项为“空白”代表与上一条记录相同。

如果不写NS纪录的话,就代表使用本机作为NS,下面的NS的A纪录也就不用写了。
如果要是写了NS纪录的话,就必须写上相应的NS纪录的A纪录。

好的,我去试试看。那么MX记录是不是可以这样写?


  1. mx 10 mail.myblue.ws.
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-9-11 00:47:24 | 显示全部楼层
IN MX 10 mail.myblue.ws.
回复 支持 反对

使用道具 举报

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

本版积分规则

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