본문 바로가기

리눅스

whois 명령어

반응형

whois 명령어

whois 명령어는 도메인 등록 정보 검색 및 WHOIS 데이터베이스를 쿼리하는 데 사용되는 명령어입니다.
주로 도메인 이름의 소유자, 등록자 연락처, 네임서버 정보 등을 확인하는 데 사용됩니다.

whois 패키지 설치

대부분의 리눅스 배포판에는 whois 패키지가 기본으로 설치되어 있습니다.

yum install -y whois

whois 버전 확인

whois --version
$ whois --version
Version 5.1.1.

Report bugs to <[email protected]>.

whois 주요 옵션

  • -h 또는 --host: 특정 WHOIS 서버에 질의합니다. 예를 들어, .com 도메인을 조회하려면 -h whois.verisign-grs.com을 사용할 수 있습니다.
  • -p 또는 --port: 특정 포트 번호를 사용하여 WHOIS 서버에 연결합니다.
  • -r 또는 --raw: RAW 형식으로 출력합니다. 추가 형식 변환을 수행하지 않고, 데이터를 원본 형태로 출력합니다.
  • -s 또는 --short: 간결한 요약 정보만 출력합니다.
  • -T 또는 --template: 지정된 출력 템플릿을 사용하여 결과를 서식화합니다.
  • -i 또는 --display-hierarchy: WHOIS 계층 구조를 출력합니다.
  • -c 또는 --client: 클라이언트 ID를 지정합니다.
  • -l 또는 --limit: 최대 조회 결과 수를 제한합니다.
  • -w 또는 --wait: 서버 응답을 기다리는 시간(초)을 설정합니다.
  • -a 또는 --ignore-refer: 참조 정보를 무시하고 바로 검색 결과를 출력합니다.
  • -n 또는 --no-redirect: 리다이렉트를 수행하지 않고 직접 검색 결과를 출력합니다.

whois 명령어 사용 예시

  • 도메인 정보 조회
whois example.com
  • IP 주소 정보 조회
whois 8.8.8.8
  • 특정 도메인 레지스트리의 서버를 사용하여 정보 조회 (예: 한국 도메인 레지스트리 - krnic.net)
whois -h whois.krnic.net example.kr
  • 자세한 정보를 조회하려면 -v 또는 --verbose 옵션을 사용
whois -v example.com
  • 다른 출력 형식을 선택하려면 -T 또는 --text 옵션을 사용(JSON, XML, 등)
whois -T json example.com

whois 사용 옵션

더보기
$ whois --help
Usage: whois [OPTION]... OBJECT...

-h HOST, --host HOST   connect to server HOST
-p PORT, --port PORT   connect to PORT
-H                     hide legal disclaimers
      --verbose        explain what is being done
      --help           display this help and exit
      --version        output version information and exit

These flags are supported by whois.ripe.net and some RIPE-like servers:
-l                     find the one level less specific match
-L                     find all levels less specific matches
-m                     find all one level more specific matches
-M                     find all levels of more specific matches
-c                     find the smallest match containing a mnt-irt attribute
-x                     exact match
-b                     return brief IP address ranges with abuse contact
-B                     turn off object filtering (show email addresses)
-G                     turn off grouping of associated objects
-d                     return DNS reverse delegation objects too
-i ATTR[,ATTR]...      do an inverse look-up for specified ATTRibutes
-T TYPE[,TYPE]...      only look for objects of TYPE
-K                     only primary keys are returned
-r                     turn off recursive look-ups for contact information
-R                     force to show local copy of the domain object even
                       if it contains referral
-a                     also search all the mirrored databases
-s SOURCE[,SOURCE]...  search the database mirrored from SOURCE
-g SOURCE:FIRST-LAST   find updates from SOURCE from serial FIRST to LAST
-t TYPE                request template for object of TYPE
-v TYPE                request verbose template for object of TYPE
-q [version|sources|types]  query specified server info
728x90

일반적인 사용 예시

  • 도메인 정보 조회
whois example.com

위 명령어에서 example.com은 조회하고자 하는 도메인 이름으로 바꾸세요. 해당 도메인의 등록 정보, 소유자 정보, 네임서버 정보 등이 출력됩니다.

  • IP 주소 정보 조회
whois 192.168.0.1

위 명령어에서 192.168.0.1은 조회하고자 하는 IP 주소로 바꾸세요. 해당 IP 주소의 할당 정보, 소유자 정보 등이 출력됩니다.

  • 도메인 정보 조회
whois google.com
$ whois google.com
[Querying whois.verisign-grs.com]
[Redirected to whois.markmonitor.com]
[Querying whois.markmonitor.com]
[whois.markmonitor.com]
Domain Name: google.com
Registry Domain ID: 2138514_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.markmonitor.com
Registrar URL: http://www.markmonitor.com
Updated Date: 2019-09-09T15:39:04+0000
Creation Date: 1997-09-15T07:00:00+0000
Registrar Registration Expiration Date: 2028-09-13T07:00:00+0000
Registrar: MarkMonitor, Inc.
Registrar IANA ID: 292
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +1.2083895770
...
whois draw.io -h whois.nic.io
$ whois draw.io -h whois.nic.io
[Querying whois.nic.io]
[whois.nic.io]
Domain Name: draw.io
Registry Domain ID: 9189657a52c748b29d77bf61c654f082-DONUTS
Registrar WHOIS Server: http://whois.cloudflare.com
Registrar URL: http://cloudflare.com
Updated Date: 2021-12-06T16:26:08Z
Creation Date: 2012-07-12T22:12:43Z
Registry Expiry Date: 2031-07-12T22:12:43Z
Registrar: Cloudflare, Inc
Registrar IANA ID: 1910
Registrar Abuse Contact Email:
Registrar Abuse Contact Phone:
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Registry Registrant ID: REDACTED FOR PRIVACY
  • whois 유틸을 이용한 ASN 정보조회
dig google.co.kr
$ dig google.co.kr

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.amzn2.5 <<>> google.co.kr
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39683
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.co.kr.                  IN      A

;; ANSWER SECTION:
google.co.kr.           300     IN      A       142.251.33.195

;; Query time: 9 msec
;; SERVER: 172.31.0.2#53(172.31.0.2)
;; WHEN: Tue Dec 07 14:19:58 KST 2021
;; MSG SIZE  rcvd: 57
whois -h whois.cymru.com " -v 74.125.129.94"
$ whois -h whois.cymru.com "-v 74.125.129.94"
AS      | IP               | BGP Prefix          | CC | Registry | Allocated  | AS Name
15169   | 74.125.129.94    | 74.125.129.0/24     | US | arin     | 2007-03-13 | GOOGLE, US

 

whois 명령어는 도메인 또는 IP 주소의 소유자 정보, 등록 정보, 네임서버 정보 등을 제공합니다. 결과는 대개 해당 정보를 관리하는 도메인 레지스트리에 따라 다릅니다.

 

728x90
반응형