[Pdns-users] Wildcard A RR

Mark Constable markc at renta.net
Fri May 28 12:11:45 UTC 2004


On Wed, 26 May 2004 10:19 pm, Derrik Pates wrote:
> Mark Constable wrote:
> > I'm just starting to test pdns but am not in an ideal test
> > environment. It's not clear to me from any docs I've read
> > so far whether a wildcard entry works with pdns. Will...
> >
> >  *  IN  A  12.34.56.78
> >
> > work with pdns the same as it does with bind ?
>
> In fact, you can use wildcard records in PowerDNS. Unless you specify
> 'wildcards=off' in the config file anyway. You do have to specify the
> name part as '*.domain.tld', of course (following convention with the
> rest of PowerDNS), but we have several customers who take advantage of
> the wildcard feature, and it works fine.

Thanks for your help Derrik.

I'm interested in the SQLite backend on a Debian (testing) system 
using pdns v2.9.16 and the pdns-backend-sqlite addon package.

 zone2sql --zone=example.com --gmysql | sqlite pdns.db

Where example.com zone file is...

$TTL 6H
@       IN      SOA     example.com. admin.example.com. (
        2003061811 30M 15M 6H 30M )
        IN      NS      ns2.main.com.
        IN      NS      ns1.main.com.
        IN      A       12.34.56.78
        IN      MX      0 mail.main.com.
*       IN      A       12.34.56.78

Which gives...

INSERT INTO records VALUES(151,1,'','SOA','example.com admin.example.com 
2003061811 72576000 36288000 21600 72576000',86400,0,NULL);
INSERT INTO records VALUES(152,1,'','NS','ns2.main.com',86400,0,NULL);
INSERT INTO records VALUES(153,1,'','NS','ns1.main.com',86400,0,NULL);
INSERT INTO records VALUES(154,1,'','A','12.34.56.78',86400,0,NULL);
INSERT INTO records VALUES(155,1,'','MX','mail.main.com',86400,0,NULL);
INSERT INTO records VALUES(156,1,'*','A','12.34.56.78',86400,0,NULL);

I get this when dumping from sqlite...

151|1||SOA|example.com admin.example.com 2003061811 72576000 36288000 21600 
72576000|86400|0|
152|1||NS|ns2.main.com|86400|0|
153|1||NS|ns1.main.com|86400|0|
154|1||A|12.34.56.78|86400|0|
155|1||MX|mail.main.com|86400|0|
156|1|*|A|12.34.56.78|86400|0|

but I got a whole bunch of these when using the zone2sql command...

Second SOA in zone, raised domain_id
Parsed 6 records
insert into domains (name,type) values ('','NATIVE');
SQL error: column name is not unique
Second SOA in zone, raised domain_id
Parsed 5 records
insert into domains (name,type) values ('','NATIVE');
SQL error: column name is not unique

etc, and doing lookups just gets an error

; <<>> DiG 9.2.4rc2 <<>> dig example.com. @ns1.main.com.
;; global options:  printcmd
;; connection timed out; no servers could be reached

with a /etc/powerdns/pdns.conf of...

launch=gsqlite
gsqlite-database=/path/to/pdns.db
#recursor=

webserver=yes
webserver-address=78.56.34.12
webserver-password=xxxxxx
webserver-port=8081

log-dns-details=yes
log-failed-updates=yes
logfile=/var/log/pdns.log
# logging-facility=
loglevel=4

I *can* surf to 78.56.34.12:8081 and it shows some activity.

. can anyone suggest anything obvious I am missing ?

. what else do I have to have for logging to /var/log/pdns.log ?

. how do I best create a zone file suitable for wildcard A records ?

--markc


More information about the Pdns-users mailing list