DNS does not forward request to subdomain NS server.

Posted September 24, 2014 4.7k views

Please, help.

  1. I created subdomain, and assigned two custom NS servers to it:

It is work. When I test it with dig, answer correct:
[olegh@bsd ~]$ dig NS

  1. I run on both servers a prototype of my specialized DNS. This is custom program, works with UDP only, and support DNS from my own DB.

If I ask for DNS-record directly from that server, it works, too:

[olegh@bsd ~]$ dig
;; ANSWER SECTION: 4001 IN A 4001 IN A

(answer IPs aren’t correct, this is for test only)

Thus, my custom DNS server works.

  1. When I request same record from my local DNS, request is not reached my custom NS servers, and I receive an empty answer:

[olegh@bsd ~]$ dig

; <<>> DiG 9.8.3-P4 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 50374
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

; IN A

;; AUTHORITY SECTION: 430 IN SOA 1411503131 3600 900 1209600 1800

;; Query time: 5 msec
;; WHEN: Tue Sep 23 18:55:56 2014
;; MSG SIZE rcvd: 91

Can you help me to understand, why DNS requests are not reached my name servers?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

How it should be set up:

  • Create NS record for in the zone file that handles
  • Remove any and all sub-domains/A/MX records at said DNS provider that handles for and *
  • create zone file (assuming BIND) for
  • add zone in /etc/bind/named.conf.local . It will look something like this:
zone "" {
        type master;
        file "/etc/bind/";

zone file should look something like this:

$TTL 500
@       SOA     localhost.      root.localhost. (
                300100000 ; serial
                21600      ; refresh after 6 hours
                3600       ; retry after 1 hour
                604800     ; expire after 1 week
                86400 )    ; minimum TTL of 1 day
@               IN NS   localhost.
aaa   IN      A
bbb   IN      A
ccc   IN      A

I hope this helps you out.