Host how to

Walter Dnes waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org
Fri May 26 20:40:06 UTC 2006


On Fri, May 26, 2006 at 09:21:44AM +0300, Kihara Muriithi wrote
> Hi,
> There is this tool called host that is supposed to resolve a host
> names to an IP. I am having issues on how to use it, i.e the syntax
> and switch use to make it helpful. Man page is a little unfriendly
> and google threw way too way too many useless pages due to the
> heavy usage of the word "host" in other context. Would someone be
> kind enough to type a few oxamples of how to use this tool, i.e one
> extracting a name from IP address and the other doing reverse?

  It's a general tool that can do *A LOT* of different things.  It also
deals with DNS information, which is a complex area.  That's why it's
not simple.  Some of the more common uses are...


1) Looking up IP addresses for specific machines.  It will also list
mail handlers (MX)...

[m3000][waltdnes][~] host tlug.ss.org
tlug.ss.org has address 192.234.254.38
tlug.ss.org mail is handled by 1 dsl.ss.org.

[m3000][waltdnes][~] host waltdnes.org
waltdnes.org has address 216.40.33.117
waltdnes.org mail is handled by 10 manson.clss.net.


2) Converting IP addresses to machine names... if the machine has an
rDNS entry in the first place

[m3000][root][~] host 192.234.254.38
Host 38.254.234.192.in-addr.arpa not found: 3(NXDOMAIN)

[m3000][waltdnes][~] host 216.40.33.117
117.33.40.216.in-addr.arpa domain name pointer ddwww.tucows.com.


3) Listing specific DNS records (MX, CNAME, etc)

[m3000][root][~] host -t CNAME www.waltdnes.org
www.waltdnes.org is an alias for www.clss.net.

[m3000][waltdnes][~] host -t MX waltdnes.org
waltdnes.org mail is handled by 10 manson.clss.net.


-- 
Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org> In linux /sbin/init is Job #1
My musings on technology and security at http://tech_sec.blog.ca
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list