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