Search code examples
postgresqlpowerdns

Cannot get NS records


I currently have a PostgreSQL backed PowerDNS setup. The records table for a domain is currently set up somewhat like this:

 id | domain_id |        name         | type  |                             content                              | ttl | prio | change_date | disabled | ordername | auth
----+-----------+---------------------+-------+------------------------------------------------------------------+-----+------+-------------+----------+-----------+------
 16 |         2 | server1.abcd.me     | A     | 1.2.3.4                                                          | 300 |      |  1458164023 | f        |           | f
 17 |         2 | abcd.me             | CNAME | server1.abcd.me                                                  | 300 |      |  1458164023 | f        |           | f
 13 |         2 | abcd.me             | NS    | e.ns.buddyns.com                                                 | 300 |      |  1458165277 | f        |           | f
 15 |         2 | abcd.me             | NS    | ns3.abcd.me                                                      | 300 |      |  1458165277 | f        |           | f
 14 |         2 | abcd.me             | NS    | ns2.abcd.me                                                      | 300 |      |  1458165277 | f        |           | f
 12 |         2 | abcd.me             | SOA   | server1.abcd.me [email protected] 0 3600 3600 36000 300     | 300 |      |  1458165447 | f        |           | f
 18 |         2 | www.abcd.me         | CNAME | server1.abcd.me                                                  | 300 |      |  1458165629 | f        |           | f

However, for a dig @localhost abcd.me NS comes up with:

; <<>> DiG 9.9.5-11ubuntu1.3-Ubuntu <<>> @localhost abcd.me NS
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50639
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1680
;; QUESTION SECTION:
;abcd.me.                     IN      NS

;; ANSWER SECTION:
abcd.me.              300     IN      CNAME   server1.abcd.me.

;; AUTHORITY SECTION:
abcd.me.              300     IN      SOA     server1.abcd.me. abcdef\.ghijk.gmail.com. 1458165629 3600 3600 36000 300

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Mar 16 23:01:02 CET 2016
;; MSG SIZE  rcvd: 120

I cannot seem to understand why the NS record do not show up, and any help would be very appreciated.

Thanks!


Solution

  • I just figured out why that hasn't been working.

    As per RFC 1912 (correct me if I'm wrong), any record with a CNAME cannot have another type of record attached to the same name. Replacing the abcd.me CNAME with abcd.me A record solved it for me.