xref: /freebsd/usr.bin/whois/whois.1 (revision 5f4c09dd85bff675e0ca63c55ea3c517e0fddfcc)
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.\" 3. 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.\"
30.Dd August 1, 2019
31.Dt WHOIS 1
32.Os
33.Sh NAME
34.Nm whois
35.Nd "Internet domain name and network number directory service"
36.Sh SYNOPSIS
37.Nm
38.Op Fl aAbfgiIklmPQrRS
39.Op Fl c Ar TLD | Fl h Ar host
40.Op Fl p Ar port
41.Op Fl -
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
52starts by querying the Internet Assigned Numbers Authority (IANA) whois server,
53and follows referrals to whois servers
54that have more specific details about the query
55.Ar name .
56The IANA whois server knows about
57IP address and AS numbers
58as well as domain names.
59.Pp
60There are a few special cases where referrals do not work, so
61.Nm
62goes directly to the appropriate server.
63These include point-of-contact handles for ARIN,
64.Pa nic.at ,
65NORID, and RIPE,
66and domain names under
67.Pa ac.uk .
68.Pp
69The options are as follows:
70.Bl -tag -width indent
71.It Fl a
72Use the American Registry for Internet Numbers
73.Pq Tn ARIN
74database.
75It contains network numbers used in those parts of the world covered neither by
76.Tn APNIC , AfriNIC , LACNIC ,
77nor by
78.Tn RIPE .
79The query syntax is documented at
80.Pa https://www.arin.net/resources/whoisrws/whois_api.html#nicname
81.It Fl A
82Use the Asia/Pacific Network Information Center
83.Pq Tn APNIC
84database.
85It contains network numbers used in East Asia, Australia,
86New Zealand, and the Pacific islands.
87Get query syntax documentation using
88.Ic whois -A help
89.It Fl b
90Use the Network Abuse Clearinghouse database.
91It contains addresses to which network abuse should be reported,
92indexed by domain name.
93.It Fl c Ar TLD
94This is the equivalent of using the
95.Fl h
96option with an argument of
97.Qq Ar TLD Ns Li .whois-servers.net .
98This can be helpful for locating country-class TLD whois servers.
99.It Fl f
100Use the African Network Information Centre
101.Pq Tn AfriNIC
102database.
103It contains network numbers used in Africa and the islands of the
104western Indian Ocean.
105Get query syntax documentation using
106.Ic whois -f help
107.It Fl g
108Use the US non-military federal government database, which contains points of
109contact for subdomains of
110.Pa .GOV .
111.It Fl h Ar host
112Use the specified host instead of the default.
113Either a host name or an IP address may be specified.
114.It Fl i
115Use the traditional Network Information Center (InterNIC)
116.Pq Pa whois.internic.net
117database.
118This now contains only registrations for domain names under
119.Pa .COM ,
120.Pa .NET ,
121.Pa .EDU .
122You can specify the type of object to search for like
123.Ic whois -i ' Ns Ar type Ar name Ns Ic '
124where
125.Ar type
126can be
127.Nm domain , nameserver , registrar .
128The
129.Ar name
130can contain
131.Li *
132wildcards.
133.It Fl I
134Use the Internet Assigned Numbers Authority
135.Pq Tn IANA
136database.
137.It Fl k
138Use the National Internet Development Agency of Korea's
139.Pq Tn KRNIC
140database.
141It contains network numbers and domain contact information
142for Korea.
143.It Fl l
144Use the Latin American and Caribbean IP address Regional Registry
145.Pq Tn LACNIC
146database.
147It contains network numbers used in much of Latin America and the
148Caribbean.
149.It Fl m
150Use the Route Arbiter Database
151.Pq Tn RADB
152database.
153It contains route policy specifications for a large
154number of operators' networks.
155.It Fl p Ar port
156Connect to the whois server on
157.Ar port .
158If this option is not specified,
159.Nm
160defaults to port 43.
161.It Fl P
162Use the PeeringDB database of AS numbers.
163It contains details about presence at internet peering points
164for many network operators.
165.It Fl Q
166Do a quick lookup;
167.Nm
168will not attempt to follow referrals to other whois servers.
169This is the default if a server is explicitly specified
170using one of the other options or in an environment variable.
171See also the
172.Fl R
173option.
174.It Fl r
175Use the R\(aaeseaux IP Europ\(aaeens
176.Pq Tn RIPE
177database.
178It contains network numbers and domain contact information
179for Europe.
180Get query syntax documentation using
181.Ic whois -r help
182.It Fl R
183Do a recursive lookup;
184.Nm
185will attempt to follow referrals to other whois servers.
186This is the default if no server is explicitly specified.
187See also the
188.Fl Q
189option.
190.It Fl S
191By default
192.Nm
193adjusts simple queries (without spaces) to produce more useful output
194from certain whois servers,
195and it suppresses some uninformative output.
196With the
197.Fl S
198option,
199.Nm
200sends the query and prints the output verbatim.
201.El
202.Pp
203The operands specified to
204.Nm
205are treated independently and may be used
206as queries on different whois servers.
207.Sh ENVIRONMENT
208.Bl -tag -width WHOIS_SERVER
209.It Ev WHOIS_SERVER
210The primary default whois server.
211If this is unset,
212.Nm
213uses the
214.Ev RA_SERVER
215environment variable.
216.It Ev RA_SERVER
217The secondary default whois server.
218If this is unset,
219.Nm
220will use
221.Pa whois.iana.org .
222.El
223.Sh EXIT STATUS
224.Ex -std
225.Sh EXAMPLES
226To obtain contact information about an
227administrator located in the Russian
228.Tn TLD
229domain
230.Qq Li RU ,
231use the
232.Fl c
233option as shown in the following example, where
234.Ar CONTACT-ID
235is substituted with the actual contact identifier.
236.Pp
237.Dl Ic whois -c RU CONTACT-ID
238.Pp
239(Note: This example is specific to the
240.Tn TLD
241.Qq Li RU ,
242but other
243.Tn TLDs
244can be queried by using a similar syntax.)
245.Pp
246The following example demonstrates how to query
247a whois server using a non-standard port, where
248.Dq Li query-data
249is the query to be sent to
250.Dq Li whois.example.com
251on port
252.Dq Li rwhois
253(written numerically as 4321).
254.Pp
255.Dl Ic whois -h whois.example.com -p rwhois query-data
256.Pp
257Some whois servers support complex queries
258with dash-letter options.
259You can use the
260.Fl -
261option to separate
262.Nm
263command options from whois server query options.
264A query containing spaces must be quoted as one
265argument to the
266.Nm
267command.
268The following example asks the RIPE whois server
269to return a brief description of its
270.Dq Li domain
271object type:
272.Pp
273.Dl Ic whois -r -- '-t domain'
274.Sh STANDARDS
275.Rs
276.%A K. Harrenstien
277.%A M. Stahl
278.%A E. Feinler
279.%D October 1985
280.%R RFC 954
281.%T NICNAME/WHOIS
282.Re
283.Pp
284.Rs
285.%A L. Daigle
286.%D September 2004
287.%R RFC 3912
288.%T WHOIS Protocol Specification
289.Re
290.Sh HISTORY
291The
292.Nm
293command appeared in
294.Bx 4.3 .
295