Annotation of src/usr.bin/whois/whois.1, Revision 1.40
1.40 ! millert 1: .\" $OpenBSD: whois.1,v 1.39 2024/03/05 16:06:32 millert Exp $
1.1 deraadt 2: .\" $NetBSD: whois.1,v 1.5 1995/08/31 21:51:32 jtc Exp $
3: .\"
4: .\" Copyright (c) 1985, 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
1.20 millert 15: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 16: .\" may be used to endorse or promote products derived from this software
17: .\" without specific prior written permission.
18: .\"
19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29: .\" SUCH DAMAGE.
30: .\"
31: .\" @(#)whois.1 8.2 (Berkeley) 6/20/94
32: .\"
1.40 ! millert 33: .Dd $Mdocdate: March 5 2024 $
1.1 deraadt 34: .Dt WHOIS 1
1.5 aaron 35: .Os
1.1 deraadt 36: .Sh NAME
37: .Nm whois
1.3 deraadt 38: .Nd Internet domain name and network number directory service
1.1 deraadt 39: .Sh SYNOPSIS
40: .Nm whois
1.40 ! millert 41: .Op Fl AadgIilmPQRrS
1.19 millert 42: .Oo
43: .Fl c Ar country-code | Fl h Ar host
44: .Oc
45: .Op Fl p Ar port
1.26 sobrado 46: .Ar name ...
1.1 deraadt 47: .Sh DESCRIPTION
1.19 millert 48: The
1.13 aaron 49: .Nm
1.19 millert 50: utility looks up records in the databases maintained by several
1.3 deraadt 51: Network Information Centers
1.21 jmc 52: .Pq Tn NICs .
1.1 deraadt 53: .Pp
54: The options are as follows:
55: .Bl -tag -width Ds
1.23 jmc 56: .It Fl A
57: Use the Asia/Pacific Network Information Center
58: .Pq Tn APNIC
59: database.
60: It contains network numbers used in East Asia, Australia,
61: New Zealand, and the Pacific islands.
1.3 deraadt 62: .It Fl a
63: Use the American Registry for Internet Numbers
64: .Pq Tn ARIN
1.13 aaron 65: database.
66: It contains network numbers used in those parts of the world
1.3 deraadt 67: covered neither by
1.27 henning 68: .Tn AfriNIC ,
69: .Tn APNIC ,
70: .Tn LACNIC ,
1.19 millert 71: nor by
1.3 deraadt 72: .Tn RIPE .
1.19 millert 73: .Pp
74: (Hint: All point of contact handles in the
75: .Tn ARIN
76: whois database end with
77: .Qq Li -ARIN . )
1.18 millert 78: .It Fl c Ar country-code
79: This is the equivalent of using the
80: .Fl h
81: option with an argument of
82: .Qq Ar country-code Ns Li .whois-servers.net .
1.3 deraadt 83: .It Fl d
1.19 millert 84: Use the US Department of Defense database.
1.13 aaron 85: It contains points of contact for subdomains of
1.21 jmc 86: .Tn \&.MIL .
1.8 millert 87: .It Fl g
88: Use the US non-military federal government database, which contains points of
89: contact for subdomains of
1.21 jmc 90: .Tn \&.GOV .
1.3 deraadt 91: .It Fl h Ar host
92: Use the specified host instead of the default NIC
1.8 millert 93: (whois.crsnic.net).
1.3 deraadt 94: Either a host name or an IP address may be specified.
1.19 millert 95: .Pp
96: By default
97: .Nm
98: constructs the name of a whois server to use from the top-level domain
99: .Pq Tn TLD
1.33 sthen 100: of the supplied (single) argument.
101: For newer generic domains (gTLDs), a lookup for whois.nic.tld is attempted.
102: For other TLDs, or if this lookup fails,
103: .Qq Li .whois-servers.net
104: is appended to the TLD.
1.19 millert 105: This effectively allows a suitable whois server to be selected
106: automatically for a large number of
107: .Tn TLDs .
108: .Pp
109: In the event that an IP
1.21 jmc 110: address is specified, the whois server will default to the American
1.19 millert 111: Registry for Internet Numbers
112: .Pq Tn ARIN .
113: If a query to
114: .Tn ARIN
115: references
116: .Tn APNIC , LACNIC ,
117: or
118: .Tn RIPE ,
119: that server will be queried also, provided that the
120: .Fl Q
121: option is not specified.
122: .Pp
123: If the query is not a domain name or IP address,
124: .Nm
125: will fall back to
126: .Pa whois.crsnic.net .
1.34 sthen 127: .It Fl I
128: Use the Internet Assigned Numbers Authority
129: .Pq whois.iana.org
130: root zone database.
131: It contains information about top-level domains.
1.8 millert 132: .It Fl i
1.39 millert 133: Use the traditional Network Information Center (InterNIC)
134: .Pq Tn whois.internic.net
1.13 aaron 135: database.
1.39 millert 136: This now contains only registrations for domain names under
1.8 millert 137: .Tn \&.COM ,
138: .Tn \&.NET ,
139: .Tn \&.ORG
140: and
1.39 millert 141: .Tn \&.EDU .
142: You can optionally specify the type of object to search for:
143: .D1 Ic whois -i ' Ns Ar type Ar name Ns Ic '
144: where
145: .Ar type
146: is one of
147: .Em domain , nameserver , registrar .
148: The
149: .Ar name
150: may also contain
151: .Li *
152: wildcards.
1.17 fgsch 153: .It Fl l
1.19 millert 154: Use the Latin American and Caribbean IP address Regional Registry
1.17 fgsch 155: .Pq Tn LACNIC
156: database.
1.19 millert 157: It contains network numbers used in much of Latin America and the
1.21 jmc 158: Caribbean.
1.6 deraadt 159: .It Fl m
160: Use the Route Arbiter Database
161: .Pq Tn RADB
1.14 aaron 162: database.
163: It contains route policy specifications for a large
1.6 deraadt 164: number of operators' networks.
1.32 sthen 165: .It Fl P
166: Use the PeeringDB database of AS numbers.
167: It contains details about presence at internet peering points
168: for many network operators.
1.19 millert 169: .It Fl p Ar port
170: Connect to the whois server on
171: .Ar port .
172: If this option is not specified,
173: .Nm
174: defaults to the
175: .Dq whois
176: port listed in
177: .Pa /etc/services
178: (port 43).
1.9 millert 179: .It Fl Q
1.13 aaron 180: Do a quick lookup.
181: This means that
1.9 millert 182: .Nm
1.24 jmc 183: will not attempt to lookup the name in the authoritative whois
1.9 millert 184: server (if one is listed) nor will it contact InterNic if a lookup
1.13 aaron 185: fails.
186: This flag has no effect when combined with any other flag.
1.8 millert 187: .It Fl R
188: Use the Russia Network Information Center
189: .Pq Tn RIPN
1.13 aaron 190: database.
191: It contains network numbers and domain contact information
1.8 millert 192: for subdomains of
1.21 jmc 193: .Tn \&.RU .
1.19 millert 194: This option is deprecated; use the
1.21 jmc 195: .Fl c
1.19 millert 196: option with an argument of
197: .Qq Li RU
198: instead.
1.23 jmc 199: .It Fl r
1.36 naddy 200: Use the Reseaux IP Europeens
1.23 jmc 201: .Pq Tn RIPE
1.18 millert 202: database.
1.23 jmc 203: It contains network numbers and domain contact information for Europe.
1.40 ! millert 204: .It Fl S
! 205: By default
! 206: .Nm
! 207: adjusts simple queries (without spaces) to produce more useful output
! 208: from certain whois servers, and it suppresses some uninformative output.
! 209: With the
! 210: .Fl S
! 211: option,
! 212: .Nm
! 213: sends the query and prints the output verbatim.
1.1 deraadt 214: .El
215: .Pp
216: The default action, unless directed otherwise with a special
217: .Ar name ,
218: is to do a very broad search, looking for matches to
219: .Ar name
220: in all types of records and most fields (name, nicknames, hostname, net
221: address, etc.) in the database.
222: For more information as to what
223: .Ar name
224: operands have special meaning, and how to guide the search, use
225: the special name
1.13 aaron 226: .Dq help .
1.19 millert 227: .Ss Special cases
228: Queries beginning with an exclamation point
1.22 jmc 229: .Ql \&!
1.19 millert 230: are assumed to be
231: .Tn NSI
232: contact handles.
233: Unless a host or domain is specified on the command line,
1.35 sthen 234: .Pq whois.networksolutions.com
1.19 millert 235: will be used as the
236: .Nm
237: database.
238: .Pp
239: Similarly, queries beginning with
240: .Dq COCO-
241: are assumed to be
242: .Tn CORE
243: contact handles.
244: Unless a host or domain is specified on the command line,
1.35 sthen 245: .Pq whois.corenic.net
1.19 millert 246: will be used as the
247: .Nm
248: database.
1.18 millert 249: .Sh EXAMPLES
250: Most types of data, such as domain names and
251: .Tn IP
252: addresses, can be used as arguments to
253: .Nm
254: without any options, and
255: .Nm
256: will choose the correct whois server to query.
257: Some exceptions, where
258: .Nm
259: will not be able to handle data correctly, are detailed below.
260: .Pp
261: To obtain contact information about an
262: administrator located in the Russian
263: .Tn TLD
264: domain
265: .Qq Li RU ,
266: use the
267: .Fl c
268: option as shown in the following example, where
269: .Ar CONTACT-ID
270: is substituted with the actual contact identifier.
271: .Pp
272: .Dl "whois -c RU CONTACT-ID"
273: .Pp
274: (Note: This example is specific to the
275: .Tn TLD
276: .Qq Li RU ,
277: but other
278: .Tn TLDs
279: can be queried by using a similar syntax.)
1.19 millert 280: .Pp
281: The following example demonstrates how to query
282: a whois server using a non-standard port, where
283: .Dq Li query-data
284: is the query to be sent to
285: .Dq Li whois.example.com
1.21 jmc 286: on port
1.19 millert 287: .Dq Li rwhois
288: (written numerically as 4321).
289: .Pp
290: .Dl "whois -h whois.example.com -p rwhois query-data"
1.31 jmc 291: .Sh STANDARDS
1.18 millert 292: .Rs
1.30 jmc 293: .%A K. Harrenstien
294: .%A M. Stahl
295: .%A E. Feinler
296: .%D October 1985
297: .%R RFC 954
1.18 millert 298: .%T NICNAME/WHOIS
1.30 jmc 299: .Re
1.31 jmc 300: .Pp
1.30 jmc 301: .Rs
302: .%A L. Daigle
303: .%D September 2004
304: .%R RFC 3912
305: .%T WHOIS Protocol Specification
1.18 millert 306: .Re
1.1 deraadt 307: .Sh HISTORY
308: The
1.13 aaron 309: .Nm
1.1 deraadt 310: command appeared in
1.38 jsg 311: .Bx 4.1c .