- 论坛徽章:
- 0
|
本帖最后由 e66478 于 2012-11-16 17:21 编辑
这个是缓存数据一点都没有,请问下哪些配置会导致没有缓存
DNS是用来做授权的不是转发和缓存DNS
key "rndc-key" {
algorithm hmac-md5;
secret "k92dIgVN0LtEc+bOCEo6qw==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
logging {
channel query_log {
file "/var/log/bind/named.log" versions 3 size 20m;
severity info;
print-time yes;
print-category yes;
print-severity yes;
};
category queries {
query_log;
};
};
options{
#--------------an quan--------
directory "/usr/local/bind/etc";
dump-file "/usr/local/bind/etc/dns.db";
pid-file "named.pid";
max-cache-ttl 10;
};
acl "dns-ip-list"{
192.168.1.100;
192.168.1.101;
};
view "any_view" {
match-clients { key dns-ip-list;any; };
allow-query-cache { any; };
allow-recursion { none; };
allow-transfer { none; };
recursion no;
dlz "Mysql_any_zone" {
database "mysql
{host=127.0.0.1 dbname=sq_dns ssl=false port=3306 user=sq_dns pass=123654 }
{select zone from dns_records where zone = '$zone$' and view='ANY' limit 1}
{select ttl, type, mx_priority, case when lower(type)='txt' then concat('\"', data, '\"') when lower(type) = 'soa' then concat_ws(' ', data, resp_person, serial, refresh, retry, expire, minimum) else data end as mydata from dns_records where zone = '$zone$' and host = '$record$' and view='ANY' limit 1}
{}
{select ttl, type, host, mx_priority, case when lower(type)='txt' then concat('\"', data, '\"') else data end as mydata, resp_person, serial, refresh, retry, expire, minimum from dns_records where zone = '$zone$' and view='ANY' limit 1}
{select zone from xfr_table where zone = '$zone$' and client = '$client$' and view='ANY' }
{update data_count set count = count + 1 where zone ='$zone$' and view='ANY' limit 1}";
};
};
|
|