This page describes the process of getting an Authoritative answer from DNS.
Typically when you do a DNS lookup you would see something like this…
nslookup yourdomain.com Server: some-random.dns.server.com Address: xxx.xxx.xxx.xxx Non-authoritative answer: Name: yourdomain.com Address: xxx.xx.xxx.xxx
As you can see from the highlighted line that this is a non-authoritative Answer. This means exactly what it says. The answer came from a name server that is not the authoritative source. This can either be from cache or the server had to relay the query another server. Once it obtained the answer it returned it back to you as a non-authoritative answer.
To get an authoritative answer do the following:
- Get the name server responsible for your domain
- Query the name server directly.
Getting the Name Servers Responsible
nslookup -querytype=NS yourdomain.com Server: resolver Address:1.opendns.com 208.67.222.222 Non-authoritative answer: yourdomain.net nameserver = ns51.yourdomain.com yourdomain.net nameserver = ns52.yourdomain.com
Query The Name Servers Directly
Pick from one of the name servers that get returned. In my case I picked the second one.
nslookup yourdomain.net ns52.yourdomain.com
This time around you should not be getting a non-authoritative answer.
A better way would be to run the dnsq command.
dnsq mx yourdomain.net ns52.yourdomain.com
Doing a Reverse lookup
In ubuntu you can run the “host” command passing in the hostname or ip address. You can also type host -t MX to find the Mail exchanger record. The type argument value can be any recognized query type: CNAME, NS, SOA, SIG, KEY, AXFR, etc.
example:
prompt> host -t MX silverflix.com silverflix.com mail is handled by 0 mx.silverflix.com.
Setting up an MX record
In the tinydns configuration file just prefix the record with “@”.