Operating System - HP-UX
1829034 Members
2542 Online
109986 Solutions
New Discussion

How to reverse DNS lookup for all related domain name and alias?

 
yyghp
Super Advisor

How to reverse DNS lookup for all related domain name and alias?

I am looking for a Unix/Linux command or a script to reverse DNS lookup for all related domain name and its alias for an IP address.

For example, domain name: "www.hp.com" points to IP: 10.10.100.100, and "www" has several alias pointing to the same IP address, like "aaa.hp.com", "bbb.hp.com" and even "ccc.hhpp.com".
If all these alias are in one DNS database, how can I find out ALL these domain names from the single IP address.
That is, from "10.10.100.100" to all:
www.hp.com
aaa.hp.com
bbb.hp.com
ccc.hhpp.com

Can "dig" do this?

Thanks a lot!
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: How to reverse DNS lookup for all related domain name and alias?

Shalom,

dig can do most of what you ask, but you're going to have to look at the man page and experiement.

To get dig on your system install BIND 9.2 from http://software.hp.com

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
yyghp
Super Advisor

Re: How to reverse DNS lookup for all related domain name and alias?

I did try "dig", but couldn't find any parameter for getting the complete list for CNAME/Alias, please help!
Thanks!
Geoff Wild
Honored Contributor

Re: How to reverse DNS lookup for all related domain name and alias?

You would have to have authority to do a transfer to do the following:

host -l domain.com

or

dig domain.com -t cname

To get domain.com you have to first reverse lookup:

dig -x 10.10.100.100


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: How to reverse DNS lookup for all related domain name and alias?

Sorry, the host command should be:

host -l -t cname domain.com

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.