I want to filter out Non-authoritative answer Address information if it exists so that in response I would get only "" and nothing when there is nothing returned. Here is example:

user@machine:~$ nslookup honeypotkey.
Non-authoritative answer:
Name:   ryjonpjinfae.

Regards, Edijs

  • Do you only want to see a response if it's non-authoritative? – slm Feb 4 '13 at 14:49
up vote 1 down vote accepted

If I understand your question you want only answers that are authoritative? If so this isn't directly possible with a single nslookup and/or dig command (at least not to my knowledge - unless you know which nameserver is authoritative for your queried lookup).

Given this you'll have to perform 3 look ups to get an authoritative answer.

Find out who's authoritative

% nslookup -type=soa honeypotkey.

Non-authoritative answer:
*** Can't find honeypotkey. No answer

Authoritative answers can be found from:
    origin = dnsbl.httpbl.org
    mail addr = dnsadmin.projecthoneypot.org
    serial = 1359954681
    refresh = 7200
    retry = 7200
    expire = 604800
    minimum = 3600

Find out nameserver info

% nslookup -type=ns dnsbl.httpbl.org

Non-authoritative answer:
dnsbl.httpbl.org    nameserver = ns3.httpbl.org.
dnsbl.httpbl.org    nameserver = ns2.httpbl.org.
dnsbl.httpbl.org    nameserver = ns1.httpbl.org.

Authoritative answers can be found from:
ns3.httpbl.org  internet address =
ns2.httpbl.org  internet address =
ns1.httpbl.org  internet address =

Query authority for info

% nslookup honeypotkey. ns1.httpbl.org
Server:     ns1.httpbl.org

Name:   honeypotkey.

Let me know if this is what you're after. If not I can adjust this answer if needed.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.