[Pdns-users] Remote Backend SOA Response

Chris Jones cpjones44 at gmail.com
Sat Feb 23 04:49:28 UTC 2019


Hi there,

I am in the process of writing a custom backend with PowerDNS 4.1.5 and I
have a question on the expected response for SOA records.

As an example, when I dig a random subdomain at google.com I get the
following result:

root at linux:~$ dig SOA asd.dsa.www.www.google.com @ns1.google.com

; <<>> DiG 9.10.3-P4-Ubuntu <<>> SOA asd.dsa.www.www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 9217
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;asd.dsa.www.www.google.com.    IN      SOA

;; AUTHORITY SECTION:
*google.com <http://google.com>.             59      IN      SOA
ns1.google.com <http://ns1.google.com>. dns-admin.google.com
<http://dns-admin.google.com>. 235282735 900 900 1800 60*

;; Query time: 197 msec
;; SERVER: 216.239.32.10#53(216.239.32.10)
;; WHEN: Sat Feb 23 15:32:17 DST 2019
;; MSG SIZE  rcvd: 105

The result returns the root of the zone being google.com and not the random
subdomain that I have queried. I have written my backend to return the root
of the zone similar to above, however in my dig results, the SOA record is
returning the queried record in full. See below:

JSON request that my backend processes:

{"method": "lookup", "parameters": {"local": "0.0.0.0", "qname": "
sdfsdf.sdf.kjhkjh.domain.net.", "qtype": "SOA", "real-remote": "0.0.0.0/0",
"remote": "0.0.0.0", "zone-id": -1}}

JSON response that my backend returns:

{"result":[{"qtype":"SOA","qname":"domain.net.","content":"dns1.domain.net.
dnsadmin.domain.net. 2019021901 10 10 10 10","ttl":10}]}

dig results for a zone within my custom backend:

root at linux:~$ dig SOA @(ns IP address) sdfsdf.sdf.kjhkjh.domain.net.

; <<>> DiG 9.10.3-P4-Ubuntu <<>> SOA @ns1.domain.net
sdfsdf.sdf.kjhkjh.cpjonestest.net.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 984
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1680
;; QUESTION SECTION:
;sdfsdf.sdf.kjhkjh.domain.net. IN  SOA

;; ANSWER SECTION:
*sdfsdf.sdf.kjhkjh.domain.net <http://sdfsdf.sdf.kjhkjh.domain.net>. 10 IN
SOA    dns1.domain.net <http://dns1.domain.net>. dnsadmin.domain.net
<http://dnsadmin.domain.net>. 2019021901 10 10 10 10*

;; Query time: 63 msec
;; SERVER: (ip address)#53(ip address)
;; WHEN: Sat Feb 23 15:45:20 DST 2019
;; MSG SIZE  rcvd: 132

Given the JSON response only has the root of the zone name returned, I
would have expected the dig result to be the root of the zone. Is this
something that is expected and/or valid?

Regards,
Chris.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20190223/cbe2bd8c/attachment.html>


More information about the Pdns-users mailing list