免费注册 查看新帖 |

Chinaunix

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

[服务应用] 请教BIND的dlz方面ns跳转问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-06-09 19:24 |只看该作者 |倒序浏览
目前BIND+DLZ的NS记录可以dig,但是无法授权到子域中,请教下各位高手有没有遇到过。

参考了 http://www.cnblogs.com/tony-law/archive/2013/01/10/2855290.html ,在named.conf中的options里面增加了  allow-recursion   {any;}和  forwarders{}这两部分,前者是允许递归查询,后者是设置子域服务器,没有配置会找不到子域服务器;
options {
  directory "/usr/local/named/etc";
  pid-file "named.pid";
  allow-query { any; };
  listen-on {192.168.8.90;};
  listen-on {127.0.0.1;};
  allow-recursion   {any;};
  forwarders {

                192.168.8.110;

         };
但还是没查到。



linux-SuSE:/usr/local/named/etc # cat named.conf
key "rndc-key" {
        algorithm hmac-md5;
        secret "asdfasdfasdfasdf";
};

controls {
        inet 127.0.0.1 port 953
                allow { 127.0.0.1; } keys { "rndc-key"; };
};

logging {
  channel query_log {
  file "/var/log/named.log" versions 3 size 20m;
    severity info;
    print-time yes;
    print-category yes;
    print-severity yes;
};
  category queries {
  query_log;
  };
};
options {
  directory "/usr/local/named/etc";
  pid-file "named.pid";
  allow-query { any; };
  listen-on {192.0.0.1;};
  listen-on {127.0.0.1;};
};


dlz "Mysql zone" {
   database "mysql
   {host=192.1.0.1 dbname=ddns ssl=true port=3306 user=ddns pass=ddns}
   {select zone from dns_records where zone = '$zone$'}
   {select ttl, type, case when lower(type)='txt' then concat('\"', data, '\"')
        else data end from dns_records where zone = '$zone$' and host = '$record$'
        and not (type = 'SOA' or type = 'NS')}
   {select ttl, type, data ,case when type = 'SOA' then resp_person end,case when type = 'SOA' then  serial end,case when type = 'SOA' then  refresh end,case when type = 'SOA' then  retry end, case when type = 'SOA' then expire end,case when type = 'SOA' then  minimum end
        from dns_records where zone = '$zone$' and (type = 'SOA' or type = 'NS')}
   {select ttl, type, host, data, resp_person, serial, refresh, retry, expire,
        minimum from dns_records where zone = '$zone$' and not (type = 'SOA' or type = 'NS')}
   {select zone from xfr_table where zone = '$zone$' and client = '$client$'}
   {update dns_records set data_count = data_count + 1 where zone ='$zone$'}";
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP