xref: /freebsd/usr.bin/whois/whois.1 (revision 39ee7a7a6bdd1557b1c3532abf60d139798ac88b)
1.\" Copyright (c) 1985, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 4. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\"     From: @(#)whois.1	8.1 (Berkeley) 6/6/93
29.\" $FreeBSD$
30.\"
31.Dd May 14, 2015
32.Dt WHOIS 1
33.Os
34.Sh NAME
35.Nm whois
36.Nd "Internet domain name and network number directory service"
37.Sh SYNOPSIS
38.Nm
39.Op Fl aAbfgiIklmPQr
40.Op Fl c Ar country-code | Fl h Ar host
41.Op Fl p Ar port
42.Ar name ...
43.Sh DESCRIPTION
44The
45.Nm
46utility looks up records in the databases maintained by several
47Network Information Centers
48.Pq Tn NICs .
49.Pp
50By default
51.Nm
52automatically discovers the name of a whois server to use
53from the top-level domain
54.Pq Tn TLD
55of the supplied (single) argument.
56It tries
57.Qq Va TLD Ns Li .whois-servers.net
58and
59.Qq Li whois.nic. Ns Va TLD
60and if neither host exists it falls back to its default server.
61.Pp
62If an IP address is specified, the whois server will default to
63the American Registry for Internet Numbers
64.Pq Tn ARIN .
65If a query to
66.Tn ARIN
67references
68.Tn APNIC , AfriNIC , LACNIC ,
69or
70.Tn RIPE ,
71that server will be queried also, provided that the
72.Fl Q
73option is not specified.
74.Pp
75If
76.Nm
77cannot automatically discover a server,
78it will fall back to
79the host specified in the
80.Ev WHOIS_SERVER
81or
82.Ev RA_SERVER
83environment variables, or if those are not set, it will use
84.Pa whois.crsnic.net .
85.Pp
86The options are as follows:
87.Bl -tag -width indent
88.It Fl a
89Use the American Registry for Internet Numbers
90.Pq Tn ARIN
91database.
92It contains network numbers used in those parts of the world covered neither by
93.Tn APNIC , AfriNIC , LACNIC ,
94nor by
95.Tn RIPE .
96.Pp
97(Hint: All point of contact handles in the
98.Tn ARIN
99whois database end with
100.Qq Li -ARIN . )
101.It Fl A
102Use the Asia/Pacific Network Information Center
103.Pq Tn APNIC
104database.
105It contains network numbers used in East Asia, Australia,
106New Zealand, and the Pacific islands.
107.It Fl b
108Use the Network Abuse Clearinghouse database.
109It contains addresses to which network abuse should be reported,
110indexed by domain name.
111.It Fl c Ar country-code
112This is the equivalent of using the
113.Fl h
114option with an argument of
115.Qq Ar country-code Ns Li .whois-servers.net .
116.It Fl f
117Use the African Network Information Centre
118.Pq Tn AfriNIC
119database.
120It contains network numbers used in Africa and the islands of the
121western Indian Ocean.
122.It Fl g
123Use the US non-military federal government database, which contains points of
124contact for subdomains of
125.Pa .GOV .
126.It Fl h Ar host
127Use the specified host instead of the default.
128Either a host name or an IP address may be specified.
129.It Fl i
130Use the obsolete Network Solutions Registry for Internet Numbers
131.Pq Pa whois.networksolutions.com
132database.
133.It Fl I
134Use the Internet Assigned Numbers Authority
135.Pq Tn IANA
136database.
137It contains network information for top-level domains.
138.It Fl k
139Use the National Internet Development Agency of Korea's
140.Pq Tn KRNIC
141database.
142It contains network numbers and domain contact information
143for Korea.
144.It Fl l
145Use the Latin American and Caribbean IP address Regional Registry
146.Pq Tn LACNIC
147database.
148It contains network numbers used in much of Latin America and the
149Caribbean.
150.It Fl m
151Use the Route Arbiter Database
152.Pq Tn RADB
153database.
154It contains route policy specifications for a large
155number of operators' networks.
156.It Fl p Ar port
157Connect to the whois server on
158.Ar port .
159If this option is not specified,
160.Nm
161defaults to port 43.
162.It Fl P
163Use the PeeringDB database of AS numbers.
164It contains details about presence at internet peering points
165for many network operators.
166.It Fl Q
167Do a quick lookup.
168This means that
169.Nm
170will not attempt to lookup the name in the authoritative whois
171server (if one is listed).
172This option has no effect when combined with any other options.
173.It Fl r
174Use the R\(aaeseaux IP Europ\(aaeens
175.Pq Tn RIPE
176database.
177It contains network numbers and domain contact information
178for Europe.
179.El
180.Pp
181The operands specified to
182.Nm
183are treated independently and may be used
184as queries on different whois servers.
185.Sh ENVIRONMENT
186.Bl -tag
187.It Ev WHOIS_SERVER
188The primary default whois server.
189If this is unset,
190.Nm
191uses the
192.Ev RA_SERVER
193environment variable.
194.It Ev RA_SERVER
195The secondary default whois server.
196If this is unset,
197.Nm
198will use
199.Pa whois.crsnic.net .
200.El
201.Sh EXIT STATUS
202.Ex -std
203.Sh EXAMPLES
204Most types of data, such as domain names and
205.Tn IP
206addresses, can be used as arguments to
207.Nm
208without any options, and
209.Nm
210will choose the correct whois server to query.
211Some exceptions, where
212.Nm
213will not be able to handle data correctly, are detailed below.
214.Pp
215To obtain contact information about an
216administrator located in the Russian
217.Tn TLD
218domain
219.Qq Li RU ,
220use the
221.Fl c
222option as shown in the following example, where
223.Ar CONTACT-ID
224is substituted with the actual contact identifier.
225.Pp
226.Dl "whois -c RU CONTACT-ID"
227.Pp
228(Note: This example is specific to the
229.Tn TLD
230.Qq Li RU ,
231but other
232.Tn TLDs
233can be queried by using a similar syntax.)
234.Pp
235The following example demonstrates how to query
236a whois server using a non-standard port, where
237.Dq Li query-data
238is the query to be sent to
239.Dq Li whois.example.com
240on port
241.Dq Li rwhois
242(written numerically as 4321).
243.Pp
244.Dl "whois -h whois.example.com -p rwhois query-data"
245.Sh SEE ALSO
246.Rs
247.%A Ken Harrenstien
248.%A Vic White
249.%T NICNAME/WHOIS
250.%D 1 March 1982
251.%O RFC 812
252.Re
253.Sh HISTORY
254The
255.Nm
256command appeared in
257.Bx 4.3 .
258