Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7390607
  • 博文数量: 1755
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16227
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1755)

文章存档

2024年(1)

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2008-03-05 13:59:24

不过在CU上还是找到一点有用的配置,,没有数据库文件
named.conf
====================================================================
options {
        listen-on port 53 { 127.0.0.1;192.168.0.8; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        //recursion no;
        allow-query-cache { none; };
        allow-recursion { none; };
        datasize 2098;
        //auth-nxdomain no;
};

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
                print-time yes;
                print-category yes;
        };
        category queries {
                default_debug;
        };
        category queries {
                default_debug;
        };
        category config {
                default_debug;
        };
        category database {
                default_debug;
        };
};
include "/etc/cnc.ip";
include "/etc/view.conf";
include "/etc/rndc.key";
=======================================================================
 
view.conf
=======================================================================
view "cnc_view" {
        match-clients{ CNC; };
        //recursion no;
        allow-query-cache { none; };
        allow-recursion { none; };
        zone "." IN {
                type hint;
                file "named.ca";
        };
        include "/etc/named.rfc1912.zones";
        dlz "cnc_view" {
                database "mysql
                {host=127.0.0.1 port=3306 dbname=dns user=dns pass=****}
                {SELECT zone FROM chinacnc_records WHERE zone = '%zone%'}
                {SELECT ttl, type, mx_priority, CASE WHEN lower(type)='txt' THEN '\"' || data || '\"' ELSE data END FROM chinacnc_re
cords WHERE zone = '%zone%' AND host = '%record%' AND NOT (type = 'SOA' OR type = 'NS')}
                {SELECT ttl, type, mx_priority, data, contact, serial, refresh, retry, expire, minimum FROM chinacnc_records WHERE z
one = '%zone%' and (type = 'SOA' or type='NS')}
                {SELECT ttl, type, host, mx_priority, data, contact, serial, refresh, retry, expire, minimum FROM chinacnc_records W
HERE zone = '%zone%'}
                {select zone from chinacnc_xfr_table where zone = '%zone%' and client = '%client%'}
                {update chinacnc_count set count = count + 1 where zone ='%zone%'}";
        };
};
//
//chinanet and other view
//
view "chinanet_other_view" {
        match-clients{ any; };
        //recursion no;
        allow-query-cache { none; };
        allow-recursion { none; };
       
        zone "." IN {
                type hint;
                file "named.ca";
        };
        include "/etc/named.rfc1912.zones";
        dlz "chinanet_other_view" {
                database "mysql
                {host=127.0.0.1 port=3306 dbname=dns user=dns pass=*****}
                {SELECT zone FROM chinanet_records WHERE zone = '%zone%'}
                {SELECT ttl, type, mx_priority, CASE WHEN lower(type)='txt' THEN '\"' || data || '\"' ELSE data END FROM chinanet_re
cords WHERE zone = '%zone%' AND host = '%record%' AND NOT (type = 'SOA' OR type = 'NS')}
                {SELECT ttl, type, mx_priority, data, contact, serial, refresh, retry, expire, minimum FROM chinanet_records WHERE z
one = '%zone%' and (type = 'SOA' or type='NS')}
                {SELECT ttl, type, host, mx_priority, data, contact, serial, refresh, retry, expire, minimum FROM chinanet_records W
HERE zone = '%zone%'}
                {select zone from chinanet_xfr_table where zone = '%zone%' and client = '%client%'}
                {update chinanet_count set count = count + 1 where zone ='%zone%'}";
        };
};
 
数据文件好像变化不大,,,今天试试,不能能搞定了,
 
阅读(1066) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~