免费注册 查看新帖 |

Chinaunix

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

[DNS] 请教BIND的dlz方面NS子域授权问题 [复制链接]

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

参考了 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$'}";

论坛徽章:
24
天蝎座
日期:2014-05-13 18:05:59IT运维版块每日发帖之星
日期:2015-11-26 06:20:00操作系统版块每月发帖之星
日期:2015-12-02 14:57:54IT运维版块每月发帖之星
日期:2016-01-07 23:01:56IT运维版块每周发帖之星
日期:2016-01-07 23:04:2615-16赛季CBA联赛之青岛
日期:2016-01-23 07:58:272016猴年福章徽章
日期:2016-02-18 15:30:3415-16赛季CBA联赛之北控
日期:2016-03-23 14:20:06IT运维版块每日发帖之星
日期:2016-04-01 06:20:0015-16赛季CBA联赛之吉林
日期:2016-06-28 13:51:54IT运维版块每日发帖之星
日期:2016-07-01 06:20:00IT运维版块每日发帖之星
日期:2015-11-23 06:20:00
2 [报告]
发表于 2014-06-11 07:53 |只看该作者
DLS真心沒用過,無法幫到你。如果你只是要BIND,到是可以給你子域授權。

论坛徽章:
0
3 [报告]
发表于 2014-06-15 20:59 |只看该作者
添加记录  主域 IN  NS  子域  ,然后给子域添加A记录。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP