[Pdns-users] gmysql + pipe backed question?
Pavel Ciocan
pciocan at gmail.com
Thu Mar 27 12:53:41 UTC 2008
Hello all,
I am just a beginner with PowerDNS and i am trying to do something that
i assumed it would work. I want to have a gmysql backedn and a pipe
backed (launch= gmysql,pipe). My pipe backend should answer queries that
gmysql cannot answer and it should give some default records.
For example say i have an A record www.mydomain.com in the mysql
database and i do: dig @192.168.1.1 www.mydomain.com it should answer
with the ip from database and not call the pipe script and this looks to
be working fine.
My problem is that i want to also allow wildcards like *.mydomain.com
and in this situation it doesn't look to be working as i was expecting
because if i only have a soa record and some NS records for the domain
and i also have an A record like *.mydomain.com and i do "dig
@192.168.1.1 www.mydomain.com" i get the default records from my pipe
script. I enabled mysql query logging and tried this scenario again to
see what is happening in bioth cases with and without the pipe backed so
here are the results:
In database i have a SOA record for domain mydomain.com, 3 NS records
for this domain and an A record: *.mydomain.com -> 192.168.1.1
I do "dig @192.168.1.1 www.mytest.com":
1. only using gmysql backed (launch= gmysql)
In mysql log file i see:
62 Query select content,ttl,prio,type,domain_id,name
from records where name='www.mytest.com'
62 Query select content,ttl,prio,type,domain_id,name
from records where type='SOA' and name='www.mytest.com'
62 Query select content,ttl,prio,type,domain_id,name
from records where type='SOA' and name='mytest.com'
62 Query select content,ttl,prio,type,domain_id,name
from records where name='*.mytest.com'
So there are 4 queries and the result is ok (meaning i get the IP
192.168.1.1 as i was expecting).
2. i enable both gmysql and pipe with my script which returns some
default values (launch= gmysql,pipe):
In mysql log file i see:
54 Query select content,ttl,prio,type,domain_id,name from
records where name='www.mytest.com'
So there is a single query and i get as a result of the dig command the
default ip from my script.
What am i doing wrong? Can somebody help me get a solution for my problem?
Thank you, in advance, for your help.
Best regards,
Pavel
More information about the Pdns-users
mailing list