|
options { directory "/usr/local/bind/";
version "bind-9.9.9";
listen-on port 53 { any; };
allow-query-cache { any; };
listen-on-v6 port 53 { ::1; };
allow-query { any; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
};
key "rndc-key" {
algorithm hmac-md5;
secret "C4Fg6OGjJipHKfgUWcAh+g==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
view "ours_domain" {
match-clients {any; };
allow-query-cache {any; };
allow-recursion {any; };
allow-transfer {any; };
dlz "Mysql zone" {
database "mysql
{host=127.0.0.1 dbname=named ssl=false port=3306 user=root pass=123456}
{select zone from dns_records where zone='$zone$'}
{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 from dns_records where zone = '$zone$' and host = '$record$'}";
};
zone "." IN {
type hint;
file "/usr/local/bind/etc/named.ca";
};
};
|
|
|