Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.04 KB

24is.md

File metadata and controls

43 lines (30 loc) · 1.04 KB

cli.host

Look up domain name servers

Synopsis

host [<flags>] name [<dns-server>]

Overview

You can use this to perform simple DNS lookups. This most usefull when wanting to convert names to IP addresses and vice versa

  • name: Is the domain name to be look up
    • It can also be an IPv4 or IPv6 (colon delimited) addres in which case it will perform a reverse lookup
  • dns-server: Can be either be the name ofr IP adress of the dns server that it should query instead of the server or servers listed in /etc/resolv.conf

It serves as a simple alternative to the much feature rich command dig

Cookbook

Get the mx records of a dns name

You can use the -t flag specified with the mx field to get the associated mx records of a dns name

If there is more than one they will come with a number that tells their priority, a lower number indicates a higher priority

host -t mx <name>

# <name> mail is handled by 10 <record-name>
# <name> mail is handled by 20 <record-name>