[root@centos8 ~]# host www.google.com
www.google.com has address 216.58.220.100
www.google.com has IPv6 address 2404:6800:4004:813::2004
「host」コマンドでIPアドレスからホストのドメイン名を確認
次にIPアドレスからドメイン名を確認したコマンドの例となります。
[root@centos8 ~]# host 216.58.220.100
100.220.58.216.in-addr.arpa domain name pointer nrt12s30-in-f4.1e100.net.
100.220.58.216.in-addr.arpa domain name pointer syd10s01-in-f100.1e100.net.
「host」コマンドオプション
hostコマンドのオプションは以下の通りとなります。
[root@centos8 ~]# host -h
host: illegal option -- h
Usage: host [-aCdilrTvVw] [-c class] [-N ndots] [-t type] [-W time]
[-R number] [-m flag] hostname [server]
-a is equivalent to -v -t ANY
-c specifies query class for non-IN data
-C compares SOA records on authoritative nameservers
-d is equivalent to -v
-i IP6.INT reverse lookups
-l lists all hosts in a domain, using AXFR
-m set memory debugging flag (trace|record|usage)
-N changes the number of dots allowed before root lookup is done
-p specifies the port on the server to query
-r disables recursive processing
-R specifies number of retries for UDP packets
-s a SERVFAIL response should stop query
-t specifies the query type
-T enables TCP/IP mode
-U enables UDP mode
-v enables verbose output
-V print version number and exit
-w specifies to wait forever for a reply
-W specifies how long to wait for a reply
-4 use IPv4 query transport only
-6 use IPv6 query transport only
コメント