Skip to content

Instantly share code, notes, and snippets.

@gwillem
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwillem/6bbcf43545de6c25cf0e to your computer and use it in GitHub Desktop.
Save gwillem/6bbcf43545de6c25cf0e to your computer and use it in GitHub Desktop.
PowerDNS changed behaviour between 2.9 and 3.3.1

Database entries

domain_id	name	type	content
55392	domain.nl	SOA     nsa.byte.nl. hostmaster.byte.nl. 2003030410
55392	domain.nl	NS      nsa.byte.nl
55392	domain.nl	NS      nsb.byte.nl
55392	domain.nl	NS      nsc.byte.nl

55392	domain.nl      A       46.21.227.210
55392	*.domain.nl    A       46.21.227.210
55392	sub.domain.nl  A       46.21.227.210

To be clear, for sub.domain.nl there is a record, for bla.domain.nl not.

PowerDNS 2.9

;; ANSWER SECTION:
bla.domain.nl.		600	IN	A	46.21.227.210
;; ANSWER SECTION:
www.bla.domain.nl.	600	IN	A	46.21.227.210
;; ANSWER SECTION:
sub.domain.nl.		600	IN	A	46.21.227.210
;; ANSWER SECTION:
www.sub.domain.nl.	600	IN	A	46.21.227.210

PowerDNS 3.3.1

;; ANSWER SECTION:
bla.domain.nl.		600	IN	A	46.21.227.210
;; ANSWER SECTION:
www.bla.domain.nl.	600	IN	A	46.21.227.210
;; ANSWER SECTION:
sub.domain.nl.		600	IN	A	46.21.227.210
;; ANSWER SECTION:
www.sub.domain.nl.	600	IN	A

Corresponding DB queries for 3.3.1:

select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='domain.nl'
select content,ttl,prio,type,domain_id,name from records where type='NS' and name='www.sub.domain.nl' and domain_id=55392
select content,ttl,prio,type,domain_id,name from records where type='NS' and name='sub.domain.nl' and domain_id=55392
select content,ttl,prio,type,domain_id,name from records where name='www.sub.domain.nl' and domain_id=55392
select content,ttl,prio,type,domain_id,name from records where name='*.sub.domain.nl' and domain_id=55392
select content,ttl,prio,type,domain_id,name from records where name='sub.domain.nl' and domain_id=55392


select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='www.bla.domain.nl'
select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='bla.domain.nl'
select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='domain.nl'
select content,ttl,prio,type,domain_id,name from records where type='NS' and name='www.bla.domain.nl' and domain_id=55392
select content,ttl,prio,type,domain_id,name from records where type='NS' and name='bla.domain.nl' and domain_id=55392
select content,ttl,prio,type,domain_id,name from records where name='www.bla.domain.nl' and domain_id=55392
select content,ttl,prio,type,domain_id,name from records where name='*.bla.domain.nl' and domain_id=55392
select content,ttl,prio,type,domain_id,name from records where name='bla.domain.nl' and domain_id=55392
select content,ttl,prio,type,domain_id,name from records where name='*.domain.nl' and domain_id=55392

Possibly related: http://mailman.powerdns.com/pipermail/pdns-users/2012-December/009513.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment