Question

DNS does not forward request to subdomain NS server.

Posted September 24, 2014 3.3k views

Please, help.

  1. I created subdomain dns.emercoin.com, and assigned two custom NS servers to it: seed1.emercoin.com seed2.emercoin.com

It is work. When I test it with dig, answer correct:
[olegh@bsd ~]$ dig dns.emercoin.com NS
;; ANSWER SECTION:
dns.emercoin.com. 1229 IN NS SEED2.emercoin.com.
dns.emercoin.com. 1229 IN NS SEED1.emercoin.com.

  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 @SEED2.emercoin.com aaa.dns.emercoin.com
;; ANSWER SECTION:
aaa.dns.emercoin.com. 4001 IN A 192.168.0.120
aaa.dns.emercoin.com. 4001 IN A 127.0.0.1

(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 aaa.dns.emercoin.com

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

;; QUESTION SECTION:
;aaa.dns.emercoin.com. IN A

;; AUTHORITY SECTION:
dns.emercoin.com. 430 IN SOA SEED1.emercoin.com. hostmaster.dns.emercoin.com. 1411503131 3600 900 1209600 1800

;; Query time: 5 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; 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.

1 answer

How it should be set up:

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

zone file should look something like this:

$TTL 500
;$ORIGIN dns.emercoin.com.
@       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       192.168.0.120
bbb   IN      A       192.168.0.121
ccc   IN      A       192.168.0.122

I hope this helps you out.

Submit an Answer