• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

dns host lookup using dig or host

hi experts,
I have a newbie question concerning DNS. i have a dns server on my network. we'll just call it's host name dns. i need to do a lookup of all the hostnames it has in its tables using either the dig or host command. i can do a single lookup like this

host hostname.com dns

where hostname is the hostname i want to lookup and dns is the dns host name. this command assumes u know what host names the server already has in its tables though.

am i going about this the right way by using either dig or host to obtain all the host names it has in its tables on the dns? if this is not the right course what could i do to obtain this information? thanks experts. oh and i read the man pages, but i could not figure it out if they had some flag u could set.
1 Solution
Dont think you can list all entrys but you can list all entrys under a specific domain like this
dig any hostname.com @(ip of the dns)
this will give you the *.hostname.com entries.

you can dicriminated too. example

when da99rmd put any you can change

ns   .... Name Servers
mx ... Mail server

I think that these days you would use

host -l mydomain.tld

to list the hosts at a domain. Not all DNS servers will oblige, however.
PAQed with no points refunded (of 250)

Community Support Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now