I have this setup where I'm using a droplet to resolve some DNS requests so it acts as a nameserver for a subdomain: check.farm.test.com
The server works ok and receives traffic so, somehow, the NS
record seems to be effective. The problem is that I cannot query it in dig
or any other tool.
Here's my setup:
test.com. NS ns-312.awsdns-43.com.
check.test.com. NS ns.test.com
ns.test.com. A 123.132.231.312
My custom DNS server is sitting at 123.132.231.312
and receives traffic when anything.check.test.com
is accessed but dig check.test.com NS
shows nothing. With +trace
I get connection timed out; no servers could be reached
. The G-suite toolbox dig tool shows:
opcode QUERY
rcode SERVFAIL
flags QR RD RA
;QUESTION
check.dnsleak.dnsadblock.com. IN NS
;ANSWER
;AUTHORITY
;ADDITIONAL```
The delegation
NS
and glueA
records look to be ok:Your custom DNS server (no small undertaking!), however, is not responding to queries properly.
Do not expect it to work in any reliable fashion until it responds in a standards compliant manner, and at least serves the minimal data that must exist in any zone (in addition to whatever data you actually want).
Bare minimum zone:
SOA
+NS
at the zone apex.Look at this response for example:
Some things are immediately apparent:
This server does not actually serve responses that are relevant to the questions it receives. Instead, it seems to always respond with an
A
record for the name the client sent!? This misbehavior both leads to very strange situations where the answer is entirely irrelevant, and also causes side-effects like complete failure when looking up things that must exist likecheck.dnsleak.dnsadblock.com NS
.You have delegated the
check.dnsleak.dnsadblock.com
zone to this server, so it ought to be authoritative. But for whatever reason it doesn't set theaa
flag as expected.I would guess that there are many more issues remaining to be found, these are just the glaring issues that I noticed looking at the response to my first queries.
Overall, do consider the amount of work it will take to actually construct a working nameserver, also whether you could instead build your service on top of an already proven implementation.