免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6822 | 回复: 7
打印 上一主题 下一主题

[DNS] [求助]CentOS5.2+Bind9.5.0P2+DLZ安装完成后客户端nslookup出现错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-08-18 18:29 |只看该作者 |倒序浏览
当前的named.conf和view.conf的内容见5楼

安装和配置过程都没有问题,数据库中的数据如下图所示:


客户端出错信息如下:
C:\Documents and Settings\Administrator>nslookup www.elites.cn
*** Can't find server name for address 218.194.147.108: Query refused
Server:  UnKnown
Address:  218.194.147.108

*** UnKnown can't find www.elites.cn: Server failed

服务器出错信息如下:
15-Aug-2008 17:53:40.059 client 202.202.144.201#1040: view CERNET: query: 108.147.194.218.in-addr.arpa IN PTR +
15-Aug-2008 17:53:40.060
Query String: select zone from dns_records where zone = '108.147.194.218.in-addr.arpa'

15-Aug-2008 17:53:40.063
Query String: select zone from dns_records where zone = '147.194.218.in-addr.arpa'

15-Aug-2008 17:53:40.067
Query String: select zone from dns_records where zone = '194.218.in-addr.arpa'

15-Aug-2008 17:53:40.071
Query String: select zone from dns_records where zone = '218.in-addr.arpa'

15-Aug-2008 17:53:40.075
Query String: select zone from dns_records where zone = 'in-addr.arpa'

15-Aug-2008 17:53:40.078
Query String: select zone from dns_records where zone = 'arpa'

15-Aug-2008 17:53:40.082 client 202.202.144.201#1040: view CERNET: query (cache) '108.147.194.218.in-addr.arpa/PTR/IN' denied
15-Aug-2008 17:53:40.130 client 202.202.144.201#1041: view CERNET: query: www.elites.cn IN A +
15-Aug-2008 17:53:40.131
Query String: select zone from dns_records where zone = 'www.elites.cn'

15-Aug-2008 17:53:40.143
Query String: select zone from dns_records where zone = 'elites.cn'

15-Aug-2008 17:53:40.155
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"')
        else data end from dns_records where zone = 'elites.cn' and host = 'www'
        and not (type = 'SOA' or type = 'NS')

15-Aug-2008 17:53:40.165 buffer-0xbfe13e54:1: "10" is not a decimal dotted quad
15-Aug-2008 17:53:40.166 dns_rdata_fromtext: buffer-0xbfe13e54:1: near '192.168.93.128': extra input text
15-Aug-2008 17:53:40.166 dns_sdlz_putrr returned error. Error code was: extra input text
15-Aug-2008 17:53:40.166
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"')
        else data end from dns_records where zone = 'elites.cn' and host = '*'
        and not (type = 'SOA' or type = 'NS')

15-Aug-2008 17:53:40.174 buffer-0xbfe13e54:1: "10" is not a decimal dotted quad
15-Aug-2008 17:53:40.175 dns_rdata_fromtext: buffer-0xbfe13e54:1: near '192.168.93.128': extra input text
15-Aug-2008 17:53:40.176 dns_sdlz_putrr returned error. Error code was: extra input text
15-Aug-2008 17:53:40.176
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"')
        else data end from dns_records where zone = 'elites.cn' and host = '@'
        and not (type = 'SOA' or type = 'NS')

15-Aug-2008 17:53:40.179 buffer-0xbfe13c04:1: "10" is not a decimal dotted quad
15-Aug-2008 17:53:40.181 dns_rdata_fromtext: buffer-0xbfe13c04:1: near '192.168.93.128': extra input text
15-Aug-2008 17:53:40.181 dns_sdlz_putrr returned error. Error code was: extra input text
15-Aug-2008 17:53:40.181
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"')
        else data end from dns_records where zone = 'elites.cn' and host = '*'
        and not (type = 'SOA' or type = 'NS')

15-Aug-2008 17:53:40.187 buffer-0xbfe13c04:1: "10" is not a decimal dotted quad
15-Aug-2008 17:53:40.188 dns_rdata_fromtext: buffer-0xbfe13c04:1: near '192.168.93.128': extra input text
15-Aug-2008 17:53:40.188 dns_sdlz_putrr returned error. Error code was: extra input text
15-Aug-2008 17:53:40.196 client 202.202.144.201#1042: view CERNET: query: www.elites.cn IN A +
15-Aug-2008 17:53:40.197
Query String: select zone from dns_records where zone = 'www.elites.cn'

15-Aug-2008 17:53:40.200
Query String: select zone from dns_records where zone = 'elites.cn'

15-Aug-2008 17:53:40.205
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"')
        else data end from dns_records where zone = 'elites.cn' and host = 'www'
        and not (type = 'SOA' or type = 'NS')

15-Aug-2008 17:53:40.210 buffer-0xbfe13e54:1: "10" is not a decimal dotted quad
15-Aug-2008 17:53:40.210 dns_rdata_fromtext: buffer-0xbfe13e54:1: near '192.168.93.128': extra input text
15-Aug-2008 17:53:40.210 dns_sdlz_putrr returned error. Error code was: extra input text
15-Aug-2008 17:53:40.211
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"')
        else data end from dns_records where zone = 'elites.cn' and host = '*'
        and not (type = 'SOA' or type = 'NS')

15-Aug-2008 17:53:40.216 buffer-0xbfe13e54:1: "10" is not a decimal dotted quad
15-Aug-2008 17:53:40.217 dns_rdata_fromtext: buffer-0xbfe13e54:1: near '192.168.93.128': extra input text
15-Aug-2008 17:53:40.217 dns_sdlz_putrr returned error. Error code was: extra input text
15-Aug-2008 17:53:40.218
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"')
        else data end from dns_records where zone = 'elites.cn' and host = '@'
        and not (type = 'SOA' or type = 'NS')

15-Aug-2008 17:53:40.224 buffer-0xbfe13c04:1: "10" is not a decimal dotted quad
15-Aug-2008 17:53:40.224 dns_rdata_fromtext: buffer-0xbfe13c04:1: near '192.168.93.128': extra input text
15-Aug-2008 17:53:40.224 dns_sdlz_putrr returned error. Error code was: extra input text
15-Aug-2008 17:53:40.224
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"')
        else data end from dns_records where zone = 'elites.cn' and host = '*'
        and not (type = 'SOA' or type = 'NS')

15-Aug-2008 17:53:40.236 buffer-0xbfe13c04:1: "10" is not a decimal dotted quad
15-Aug-2008 17:53:40.250 dns_rdata_fromtext: buffer-0xbfe13c04:1: near '192.168.93.128': extra input text
15-Aug-2008 17:53:40.250 dns_sdlz_putrr returned error. Error code was: extra input text


请有经验的朋友、高手们帮忙看看问题出在哪里了

[ 本帖最后由 gregry 于 2008-8-21 17:49 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-08-19 12:57 |只看该作者
54次浏览都木有兄弟帮忙看看吗,还是这个问题真的很难啊

论坛徽章:
0
3 [报告]
发表于 2008-08-20 16:54 |只看该作者
贴出named.conf文件看看,别人才好帮你..

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
4 [报告]
发表于 2008-08-21 10:18 |只看该作者
我的到是没问题,不知道是是否做了VIEW,,我的namd.conf

论坛徽章:
0
5 [报告]
发表于 2008-08-21 17:47 |只看该作者

回复 #4 badb0y 的帖子

你没做View吧。。。
下边是我现在用的named.conf

  1. key "rndc-key" {
  2.         algorithm hmac-md5;
  3.         secret "/pXpZG2+C42eySyPZ5uh6A==";
  4. };

  5. controls {
  6.         inet 127.0.0.1 port 953
  7.                 allow { 127.0.0.1; } keys { "rndc-key"; };
  8. };

  9. options {
  10.         directory "/usr/local/named/etc";
  11.         pid-file "/usr/local/named/var/run/named.pid";
  12.         listen-on port 53 { 127.0.0.1;192.168.93.128; };
  13.         allow-query     { any; };
  14.         recursion no;
  15.         allow-query-cache { none; };
  16.         allow-recursion { none; };
  17. };
  18. include "acl.conf";
  19. include "view.conf";
复制代码

acl.conf没什么特殊的,就是定义了一些IP地址段,下边是我在用的view.conf

  1. view "CERNET" {
  2.         match-clients{ CERNET; };
  3.         //recursion no;
  4.         allow-query-cache { none; };
  5.         allow-recursion { none; };
  6.         zone "." {
  7.         type hint;
  8.         file "named.root";
  9.         };
  10.         zone "localhost" {
  11.             type master;
  12.             file "localhost.zone";
  13.             allow-update { none; };
  14.         };
  15.         zone "0.0.127.IN-ADDR.ARPA" {
  16.         type master;
  17.         file "localhost.rev";
  18.         notify no;
  19.         };
  20. dlz "CERNET_zone" {
  21.    database "mysql
  22.    {host=**** dbname=**** user=**** pass=****}
  23.    {select zone from dns_records where zone = '%zone%'}
  24.    {select ttl, type, mx_priority, case when lower(type)='txt' then concat('\"', data, '\"')
  25.         when lower(type) = 'soa' then concat_ws(' ', data, resp_person, serial, refresh, retry, expire, minimum)
  26.         else data end from dns_records where zone = '%zone%' and host = '%record%'}";
  27.         };
  28. };


  29. view "ANY_view" {
  30.         match-clients{ any; };
  31.         #recursion no;
  32.         allow-query-cache { none; };
  33.         allow-recursion { none; };
  34.         
  35.         zone "." {
  36.         type hint;
  37.         file "named.root";
  38.         };
  39.         zone "localhost" {
  40.             type master;
  41.             file "localhost.zone";
  42.             allow-update { none; };
  43.         };
  44.         zone "0.0.127.IN-ADDR.ARPA" {
  45.         type master;
  46.         file "localhost.rev";
  47.         notify no;
  48.         };
  49. dlz "chinanet_zone" {
  50.    database "mysql
  51.    {host=**** dbname=**** user=**** pass=****}
  52.    {select zone from dns_records where zone = '%zone%'}
  53.    {select ttl, type, mx_priority, case when lower(type)='txt' then concat('\"', data, '\"')
  54.         else data end from dns_records where zone = '%zone%' and host = '%record%'
  55.         and not (type = 'SOA' or type = 'NS')}
  56.    {select ttl, type, mx_priority, data, resp_person, serial, refresh, retry, expire, minimum
  57.         from dns_records where zone = '%zone%' and (type = 'SOA' or type='NS')}
  58.    {select ttl, type, host, mx_priority, data, resp_person, serial, refresh, retry, expire,
  59.         minimum from dns_records where zone = '%zone%' and not (type = 'SOA' or type = 'NS')}
  60.    {select zone from xfr_table where zone = '%zone%' and client = '%client%'}
  61.    {update data_count set count = count + 1 where zone ='%zone%'}";
  62.         };
  63. };
复制代码

论坛徽章:
0
6 [报告]
发表于 2008-08-22 16:41 |只看该作者
不是悬赏贴就没人帮忙了啊?我记得CU不是这个风气吧。。。

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
7 [报告]
发表于 2008-08-25 08:38 |只看该作者

回复 #6 gregry 的帖子

不好意思,,在搞VIEW的时候,出现很多问题,所以没搞成,

论坛徽章:
0
8 [报告]
发表于 2012-08-07 13:38 |只看该作者
回复 2# gregry


    因为你的数据有错误,mx_priority应该设置为 DEFAULT NULL  ,而不是0
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP