21 Oct 2011 05:12
About dlz for bind-view
z <alfred.z.song <at> gmail.com>
2011-10-21 03:12:35 GMT
2011-10-21 03:12:35 GMT
Hi, guys
I am not sure if dlz has supported the $view$ index for a zone record
selecting.
For example:
view "Me" {
match-clients { 127.0.0.1; };
recursion no;
dlz "Mysql zone" {
database "mysql
{host=127.0.0.1 dbname=dns ssl=false port=3306 user=root pass= }
{select name from zones where name = '$zone$' limit 1}
{select ttl, type, priority , case when
lower(type)='txt' then concat('\"', data, '\"') when lower(type)='soa'
then concat_ws(' ', data, contact, serial, refresh, retry, expire,
minimum) else data end from records where zone_name='$zone$' and host
= '$record$' and view='Me'}
{}
{select ttl, type, host, priority , case when
lower(type)='txt' then concat('\"',data,'\"') else data end , contact
, serial, refresh, retry, expire, minimum from records where zone_name
= '$zone$' and view='Me'}
{}";
};
};
(Continue reading)
RSS Feed