xref: /openbsd/usr.bin/whois/whois.1 (revision 898184e3)
1.\"	$OpenBSD: whois.1,v 1.32 2013/03/05 16:09:10 sthen Exp $
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.
15.\" 3. Neither the name of the University nor the names of its contributors
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.\"
33.Dd $Mdocdate: March 5 2013 $
34.Dt WHOIS 1
35.Os
36.Sh NAME
37.Nm whois
38.Nd Internet domain name and network number directory service
39.Sh SYNOPSIS
40.Nm whois
41.Op Fl AadgilmPQRr
42.Oo
43.Fl c Ar country-code | Fl h Ar host
44.Oc
45.Op Fl p Ar port
46.Ar name ...
47.Sh DESCRIPTION
48The
49.Nm
50utility looks up records in the databases maintained by several
51Network Information Centers
52.Pq Tn NICs .
53.Pp
54The options are as follows:
55.Bl -tag -width Ds
56.It Fl A
57Use the Asia/Pacific Network Information Center
58.Pq Tn APNIC
59database.
60It contains network numbers used in East Asia, Australia,
61New Zealand, and the Pacific islands.
62.It Fl a
63Use the American Registry for Internet Numbers
64.Pq Tn ARIN
65database.
66It contains network numbers used in those parts of the world
67covered neither by
68.Tn AfriNIC ,
69.Tn APNIC ,
70.Tn LACNIC ,
71nor by
72.Tn RIPE .
73.Pp
74(Hint: All point of contact handles in the
75.Tn ARIN
76whois database end with
77.Qq Li -ARIN . )
78.It Fl c Ar country-code
79This is the equivalent of using the
80.Fl h
81option with an argument of
82.Qq Ar country-code Ns Li .whois-servers.net .
83.It Fl d
84Use the US Department of Defense database.
85It contains points of contact for subdomains of
86.Tn \&.MIL .
87.It Fl g
88Use the US non-military federal government database, which contains points of
89contact for subdomains of
90.Tn \&.GOV .
91.It Fl h Ar host
92Use the specified host instead of the default NIC
93(whois.crsnic.net).
94Either a host name or an IP address may be specified.
95.Pp
96By default
97.Nm
98constructs the name of a whois server to use from the top-level domain
99.Pq Tn TLD
100of the supplied (single) argument, and appending
101.Qq Li .whois-servers.net .
102This effectively allows a suitable whois server to be selected
103automatically for a large number of
104.Tn TLDs .
105.Pp
106In the event that an IP
107address is specified, the whois server will default to the American
108Registry for Internet Numbers
109.Pq Tn ARIN .
110If a query to
111.Tn ARIN
112references
113.Tn APNIC , LACNIC ,
114or
115.Tn RIPE ,
116that server will be queried also, provided that the
117.Fl Q
118option is not specified.
119.Pp
120If the query is not a domain name or IP address,
121.Nm
122will fall back to
123.Pa whois.crsnic.net .
124.It Fl i
125Use the Network Solutions Registry for Internet Numbers
126.Pq Tn whois.networksolutions.com
127database.
128Historically, it contained network numbers and domain contact information
129for most of
130.Tn \&.COM ,
131.Tn \&.NET ,
132.Tn \&.ORG
133and
134.Tn \&.EDU
135domains.
136However, the registration of these domains is now done by a number of
137independent and competing registrars and this database holds no information
138on the domains registered by organizations other than Network Solutions, Inc.
139Also, note that the
140.Tn InterNIC
141database
142.Pq Pa whois.internic.net
143is no longer handled by Network Solutions, Inc.
144For details, see
145.Lk http://www.internic.net/ .
146.Pp
147(Hint: Contact information, identified by the term
148.Em handle ,
149can be looked up by prefixing
150.Qq Li \&!
151or
152.Qq Li handle\ \&
153to the
154.Tn NIC
155handle in the query.)
156.It Fl l
157Use the Latin American and Caribbean IP address Regional Registry
158.Pq Tn LACNIC
159database.
160It contains network numbers used in much of Latin America and the
161Caribbean.
162.It Fl m
163Use the Route Arbiter Database
164.Pq Tn RADB
165database.
166It contains route policy specifications for a large
167number of operators' networks.
168.It Fl P
169Use the PeeringDB database of AS numbers.
170It contains details about presence at internet peering points
171for many network operators.
172.It Fl p Ar port
173Connect to the whois server on
174.Ar port .
175If this option is not specified,
176.Nm
177defaults to the
178.Dq whois
179port listed in
180.Pa /etc/services
181(port 43).
182.It Fl Q
183Do a quick lookup.
184This means that
185.Nm
186will not attempt to lookup the name in the authoritative whois
187server (if one is listed) nor will it contact InterNic if a lookup
188fails.
189This flag has no effect when combined with any other flag.
190.It Fl R
191Use the Russia Network Information Center
192.Pq Tn RIPN
193database.
194It contains network numbers and domain contact information
195for subdomains of
196.Tn \&.RU .
197This option is deprecated; use the
198.Fl c
199option with an argument of
200.Qq Li RU
201instead.
202.It Fl r
203Use the R\(aaeseaux IP Europ\(aaeens
204.Pq Tn RIPE
205database.
206It contains network numbers and domain contact information for Europe.
207.El
208.Pp
209The default action, unless directed otherwise with a special
210.Ar name ,
211is to do a very broad search, looking for matches to
212.Ar name
213in all types of records and most fields (name, nicknames, hostname, net
214address, etc.) in the database.
215For more information as to what
216.Ar name
217operands have special meaning, and how to guide the search, use
218the special name
219.Dq help .
220.Ss Special cases
221Queries beginning with an exclamation point
222.Ql \&!
223are assumed to be
224.Tn NSI
225contact handles.
226Unless a host or domain is specified on the command line,
227.Pq Tn whois.networksolutions.com
228will be used as the
229.Nm
230database.
231.Pp
232Similarly, queries beginning with
233.Dq COCO-
234are assumed to be
235.Tn CORE
236contact handles.
237Unless a host or domain is specified on the command line,
238.Pq Tn whois.corenic.net
239will be used as the
240.Nm
241database.
242.Sh EXAMPLES
243Most types of data, such as domain names and
244.Tn IP
245addresses, can be used as arguments to
246.Nm
247without any options, and
248.Nm
249will choose the correct whois server to query.
250Some exceptions, where
251.Nm
252will not be able to handle data correctly, are detailed below.
253.Pp
254To obtain contact information about an
255administrator located in the Russian
256.Tn TLD
257domain
258.Qq Li RU ,
259use the
260.Fl c
261option as shown in the following example, where
262.Ar CONTACT-ID
263is substituted with the actual contact identifier.
264.Pp
265.Dl "whois -c RU CONTACT-ID"
266.Pp
267(Note: This example is specific to the
268.Tn TLD
269.Qq Li RU ,
270but other
271.Tn TLDs
272can be queried by using a similar syntax.)
273.Pp
274The following example demonstrates how to query
275a whois server using a non-standard port, where
276.Dq Li query-data
277is the query to be sent to
278.Dq Li whois.example.com
279on port
280.Dq Li rwhois
281(written numerically as 4321).
282.Pp
283.Dl "whois -h whois.example.com -p rwhois query-data"
284.Sh STANDARDS
285.Rs
286.%A K. Harrenstien
287.%A M. Stahl
288.%A E. Feinler
289.%D October 1985
290.%R RFC 954
291.%T NICNAME/WHOIS
292.Re
293.Pp
294.Rs
295.%A L. Daigle
296.%D September 2004
297.%R RFC 3912
298.%T WHOIS Protocol Specification
299.Re
300.Sh HISTORY
301The
302.Nm
303command appeared in
304.Bx 4.3 .
305