Chinaunix

标题: 请教BIND的dlz方面NS子域授权问题 [打印本页]

作者: njhc223    时间: 2014-06-09 20:06
标题: 请教BIND的dlz方面NS子域授权问题
目前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$'}";


作者: woxizishen    时间: 2014-06-11 07:53
DLS真心沒用過,無法幫到你。如果你只是要BIND,到是可以給你子域授權。
作者: yocper    时间: 2014-06-15 20:59
添加记录  主域 IN  NS  子域  ,然后给子域添加A记录。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2