Trying to use powerdns for enum(voip) dns queries.
I believe I have it all setup correctly.
it appears to be correct in the mysql tables
select * from records\G
id: 3
domain_id: 3
name: 0.1.9.2.8.4.3.3.0.7.1.e164.arpa
type: NAPTR
content: 100 10 "u" "E2U+sip" "!^.*$!sip:17033482910@10.0.0.12!" .
ttl: 120
prio: NULL
change_date: NULL
select * from domains\G
id: 3
name: e164.arpa
master: 127.0.0.1
last_check: NULL
type: MASTER
notified_serial: NULL
account: NULL
and i can see the query based on pdns logs:
Jun 8 16:10:47 localhost pdns[12575]: Remote 127.0.0.1 wants '0.1.9.2.8.4.3.3.0.7.1.e164.arpa|NAPTR', do = 0, bufsize = 512: packetcache MISS
Jun 8 16:10:47 localhost pdns[12575]: Query: select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='0.1.9.2.8.4.3.3.0.7.1.e164.arpa'
Jun 8 16:10:47 localhost pdns[12575]: Query: select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='1.9.2.8.4.3.3.0.7.1.e164.arpa'
Jun 8 16:10:47 localhost pdns[12575]: Query: select content,ttl,prio,type,domain_id,name from records where type='SOA' and name='9.2.8.4.3.3.0.7.1.e164.arpa'
however my digs fail:
dig NAPTR @127.0.0.1 0.1.9.2.8.4.3.3.0.7.1.e164.arpa
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 <<>> NAPTR @127.0.0.1 0.1.9.2.8.4.3.3.0.7.1.e164.arpa
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 8911
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;0.1.9.2.8.4.3.3.0.7.1.e164.arpa. IN NAPTR
;; Query time: 4 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Jun 8 16:04:28 2015
;; MSG SIZE rcvd: 49
I see why there are no results "type=SOA" in the mysql query, but why is trying type='SOA' and not 'NAPTR'?
The answer is based on Håkan Lindqvist's suggestions:
make records table look like this:
id: 6
domain_id: 3
name: someServer.com
type: SOA
content: ns1.someDNSServer.com
ttl: 120
prio: NULL
change_date: NULL
*************************** 2. row ***************************
id: 7
domain_id: 3
name: someServer.com
type: NS
content: ns1.someDNSServer.com
ttl: 120
prio: NULL
change_date: NULL