不过在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%'}";
};
};
数据文件好像变化不大,,,今天试试,不能能搞定了,
阅读(1109) | 评论(0) | 转发(0) |