xref: /freebsd/usr.bin/whois/whois.1 (revision bdcbfde31e8e9b343f113a1956384bdf30d1ed62)
19b50d902SRodney W. Grimes.\" Copyright (c) 1985, 1990, 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
69b50d902SRodney W. Grimes.\" are met:
79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
89b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
109b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
119b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
139b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
149b50d902SRodney W. Grimes.\"    without specific prior written permission.
159b50d902SRodney W. Grimes.\"
169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
269b50d902SRodney W. Grimes.\" SUCH DAMAGE.
279b50d902SRodney W. Grimes.\"
28*ced9ddb2SMark Johnston.Dd August 1, 2019
299b50d902SRodney W. Grimes.Dt WHOIS 1
3003773b9aSRuslan Ermilov.Os
319b50d902SRodney W. Grimes.Sh NAME
329b50d902SRodney W. Grimes.Nm whois
3303773b9aSRuslan Ermilov.Nd "Internet domain name and network number directory service"
349b50d902SRodney W. Grimes.Sh SYNOPSIS
358fe908efSRuslan Ermilov.Nm
36de80c945STony Finch.Op Fl aAbfgiIklmPQrRS
37c37dc1fbSTony Finch.Op Fl c Ar TLD | Fl h Ar host
38eade81c9SMike Barcroft.Op Fl p Ar port
39c37dc1fbSTony Finch.Op Fl -
409b50d902SRodney W. Grimes.Ar name ...
419b50d902SRodney W. Grimes.Sh DESCRIPTION
42e8937ba0SPhilippe CharnierThe
4303773b9aSRuslan Ermilov.Nm
44e8937ba0SPhilippe Charnierutility looks up records in the databases maintained by several
45a00fe97dSGarrett WollmanNetwork Information Centers
46a00fe97dSGarrett Wollman.Pq Tn NICs .
479b50d902SRodney W. Grimes.Pp
488b6444e7STony FinchBy default
498b6444e7STony Finch.Nm
506f4d88dfSTony Finchstarts by querying the Internet Assigned Numbers Authority (IANA) whois server,
516f4d88dfSTony Finchand follows referrals to whois servers
526f4d88dfSTony Finchthat have more specific details about the query
536f4d88dfSTony Finch.Ar name .
546f4d88dfSTony FinchThe IANA whois server knows about
556f4d88dfSTony FinchIP address and AS numbers
566f4d88dfSTony Finchas well as domain names.
578b6444e7STony Finch.Pp
586f4d88dfSTony FinchThere are a few special cases where referrals do not work, so
598b6444e7STony Finch.Nm
606f4d88dfSTony Finchgoes directly to the appropriate server.
616f4d88dfSTony FinchThese include point-of-contact handles for ARIN,
626f4d88dfSTony Finch.Pa nic.at ,
636f4d88dfSTony FinchNORID, and RIPE,
646f4d88dfSTony Finchand domain names under
656f4d88dfSTony Finch.Pa ac.uk .
668b6444e7STony Finch.Pp
679b50d902SRodney W. GrimesThe options are as follows:
6803773b9aSRuslan Ermilov.Bl -tag -width indent
69a00fe97dSGarrett Wollman.It Fl a
70a00fe97dSGarrett WollmanUse the American Registry for Internet Numbers
71a00fe97dSGarrett Wollman.Pq Tn ARIN
7203773b9aSRuslan Ermilovdatabase.
7303773b9aSRuslan ErmilovIt contains network numbers used in those parts of the world covered neither by
7423639a23SJohn Hay.Tn APNIC , AfriNIC , LACNIC ,
7503773b9aSRuslan Ermilovnor by
76a00fe97dSGarrett Wollman.Tn RIPE .
776f4d88dfSTony FinchThe query syntax is documented at
786f4d88dfSTony Finch.Pa https://www.arin.net/resources/whoisrws/whois_api.html#nicname
79eade81c9SMike Barcroft.It Fl A
80eade81c9SMike BarcroftUse the Asia/Pacific Network Information Center
81eade81c9SMike Barcroft.Pq Tn APNIC
82eade81c9SMike Barcroftdatabase.
83eade81c9SMike BarcroftIt contains network numbers used in East Asia, Australia,
84eade81c9SMike BarcroftNew Zealand, and the Pacific islands.
856f4d88dfSTony FinchGet query syntax documentation using
866f4d88dfSTony Finch.Ic whois -A help
87fb6dad91SBruce M Simpson.It Fl b
88fb6dad91SBruce M SimpsonUse the Network Abuse Clearinghouse database.
89fb6dad91SBruce M SimpsonIt contains addresses to which network abuse should be reported,
90fb6dad91SBruce M Simpsonindexed by domain name.
91c37dc1fbSTony Finch.It Fl c Ar TLD
92eade81c9SMike BarcroftThis is the equivalent of using the
93eade81c9SMike Barcroft.Fl h
94eade81c9SMike Barcroftoption with an argument of
95c37dc1fbSTony Finch.Qq Ar TLD Ns Li .whois-servers.net .
96c37dc1fbSTony FinchThis can be helpful for locating country-class TLD whois servers.
9723639a23SJohn Hay.It Fl f
9823639a23SJohn HayUse the African Network Information Centre
9923639a23SJohn Hay.Pq Tn AfriNIC
100cb29445aSRuslan Ermilovdatabase.
101cb29445aSRuslan ErmilovIt contains network numbers used in Africa and the islands of the
10223639a23SJohn Haywestern Indian Ocean.
1036f4d88dfSTony FinchGet query syntax documentation using
1046f4d88dfSTony Finch.Ic whois -f help
1052712c396SGarrett Wollman.It Fl g
1062712c396SGarrett WollmanUse the US non-military federal government database, which contains points of
1072712c396SGarrett Wollmancontact for subdomains of
10803773b9aSRuslan Ermilov.Pa .GOV .
109a00fe97dSGarrett Wollman.It Fl h Ar host
1101326bf51STony FinchUse the specified host instead of the default.
111a00fe97dSGarrett WollmanEither a host name or an IP address may be specified.
112036cc89fSAndrey A. Chernov.It Fl i
1136f4d88dfSTony FinchUse the traditional Network Information Center (InterNIC)
1146f4d88dfSTony Finch.Pq Pa whois.internic.net
11503773b9aSRuslan Ermilovdatabase.
1166f4d88dfSTony FinchThis now contains only registrations for domain names under
1176f4d88dfSTony Finch.Pa .COM ,
1186f4d88dfSTony Finch.Pa .NET ,
1196f4d88dfSTony Finch.Pa .EDU .
1206f4d88dfSTony FinchYou can specify the type of object to search for like
1216f4d88dfSTony Finch.Ic whois -i ' Ns Ar type Ar name Ns Ic '
1226f4d88dfSTony Finchwhere
1236f4d88dfSTony Finch.Ar type
1246f4d88dfSTony Finchcan be
1256f4d88dfSTony Finch.Nm domain , nameserver , registrar .
1266f4d88dfSTony FinchThe
1276f4d88dfSTony Finch.Ar name
1286f4d88dfSTony Finchcan contain
1296f4d88dfSTony Finch.Li *
1306f4d88dfSTony Finchwildcards.
1317138e3feSBruce M Simpson.It Fl I
1327138e3feSBruce M SimpsonUse the Internet Assigned Numbers Authority
1337138e3feSBruce M Simpson.Pq Tn IANA
1347138e3feSBruce M Simpsondatabase.
135876b0a88SCeri Davies.It Fl k
136876b0a88SCeri DaviesUse the National Internet Development Agency of Korea's
137876b0a88SCeri Davies.Pq Tn KRNIC
138876b0a88SCeri Daviesdatabase.
139876b0a88SCeri DaviesIt contains network numbers and domain contact information
140876b0a88SCeri Daviesfor Korea.
141a5d96e6dSMike Barcroft.It Fl l
142a5d96e6dSMike BarcroftUse the Latin American and Caribbean IP address Regional Registry
143a5d96e6dSMike Barcroft.Pq Tn LACNIC
144a5d96e6dSMike Barcroftdatabase.
145a5d96e6dSMike BarcroftIt contains network numbers used in much of Latin America and the
146a5d96e6dSMike BarcroftCaribbean.
1472053e9a3SAndrey A. Chernov.It Fl m
1482053e9a3SAndrey A. ChernovUse the Route Arbiter Database
1492053e9a3SAndrey A. Chernov.Pq Tn RADB
15087faa07bSSheldon Hearndatabase.
15187faa07bSSheldon HearnIt contains route policy specifications for a large
1522053e9a3SAndrey A. Chernovnumber of operators' networks.
153eade81c9SMike Barcroft.It Fl p Ar port
154eade81c9SMike BarcroftConnect to the whois server on
155eade81c9SMike Barcroft.Ar port .
156eade81c9SMike BarcroftIf this option is not specified,
157eade81c9SMike Barcroft.Nm
158eade81c9SMike Barcroftdefaults to port 43.
15960214b7fSTony Finch.It Fl P
16060214b7fSTony FinchUse the PeeringDB database of AS numbers.
16160214b7fSTony FinchIt contains details about presence at internet peering points
16260214b7fSTony Finchfor many network operators.
1632053e9a3SAndrey A. Chernov.It Fl Q
16452517c0aSTony FinchDo a quick lookup;
1652053e9a3SAndrey A. Chernov.Nm
16652517c0aSTony Finchwill not attempt to follow referrals to other whois servers.
16752517c0aSTony FinchThis is the default if a server is explicitly specified
1686f4d88dfSTony Finchusing one of the other options or in an environment variable.
16952517c0aSTony FinchSee also the
17052517c0aSTony Finch.Fl R
17152517c0aSTony Finchoption.
172a00fe97dSGarrett Wollman.It Fl r
173a00fe97dSGarrett WollmanUse the R\(aaeseaux IP Europ\(aaeens
174a00fe97dSGarrett Wollman.Pq Tn RIPE
17503773b9aSRuslan Ermilovdatabase.
17603773b9aSRuslan ErmilovIt contains network numbers and domain contact information
177a00fe97dSGarrett Wollmanfor Europe.
1786f4d88dfSTony FinchGet query syntax documentation using
1796f4d88dfSTony Finch.Ic whois -r help
18052517c0aSTony Finch.It Fl R
18152517c0aSTony FinchDo a recursive lookup;
18252517c0aSTony Finch.Nm
18352517c0aSTony Finchwill attempt to follow referrals to other whois servers.
18452517c0aSTony FinchThis is the default if no server is explicitly specified.
18552517c0aSTony FinchSee also the
18652517c0aSTony Finch.Fl Q
18752517c0aSTony Finchoption.
18852517c0aSTony Finch.It Fl S
1896f4d88dfSTony FinchBy default
19052517c0aSTony Finch.Nm
1916f4d88dfSTony Finchadjusts simple queries (without spaces) to produce more useful output
1926f4d88dfSTony Finchfrom certain whois servers,
1936f4d88dfSTony Finchand it suppresses some uninformative output.
1946f4d88dfSTony FinchWith the
19552517c0aSTony Finch.Fl S
1966f4d88dfSTony Finchoption,
1976f4d88dfSTony Finch.Nm
1986f4d88dfSTony Finchsends the query and prints the output verbatim.
1992fccbf04SGlen Barber.El
2009b50d902SRodney W. Grimes.Pp
2019b50d902SRodney W. GrimesThe operands specified to
202741d304eSPhilippe Charnier.Nm
20342e82026SMike Barcroftare treated independently and may be used
20442e82026SMike Barcroftas queries on different whois servers.
2058b6444e7STony Finch.Sh ENVIRONMENT
206d10807ecSBaptiste Daroussin.Bl -tag -width WHOIS_SERVER
2070279f129STony Finch.It Ev WHOIS_SERVER
2080279f129STony FinchThe primary default whois server.
2090279f129STony FinchIf this is unset,
2100279f129STony Finch.Nm
2110279f129STony Finchuses the
2120279f129STony Finch.Ev RA_SERVER
2130279f129STony Finchenvironment variable.
2148b6444e7STony Finch.It Ev RA_SERVER
2150279f129STony FinchThe secondary default whois server.
2168b6444e7STony FinchIf this is unset,
2178b6444e7STony Finch.Nm
2188b6444e7STony Finchwill use
2196f4d88dfSTony Finch.Pa whois.iana.org .
2208b6444e7STony Finch.El
22185f67d69SDoug Barton.Sh EXIT STATUS
22285f67d69SDoug Barton.Ex -std
2233b91552dSMike Barcroft.Sh EXAMPLES
2243b91552dSMike BarcroftTo obtain contact information about an
2253b91552dSMike Barcroftadministrator located in the Russian
2263b91552dSMike Barcroft.Tn TLD
2273b91552dSMike Barcroftdomain
2283b91552dSMike Barcroft.Qq Li RU ,
2293b91552dSMike Barcroftuse the
2303b91552dSMike Barcroft.Fl c
2313b91552dSMike Barcroftoption as shown in the following example, where
2323b91552dSMike Barcroft.Ar CONTACT-ID
2333b91552dSMike Barcroftis substituted with the actual contact identifier.
2343b91552dSMike Barcroft.Pp
235c37dc1fbSTony Finch.Dl Ic whois -c RU CONTACT-ID
2363b91552dSMike Barcroft.Pp
2373b91552dSMike Barcroft(Note: This example is specific to the
2383b91552dSMike Barcroft.Tn TLD
2393b91552dSMike Barcroft.Qq Li RU ,
2403b91552dSMike Barcroftbut other
2413b91552dSMike Barcroft.Tn TLDs
2423b91552dSMike Barcroftcan be queried by using a similar syntax.)
2433b91552dSMike Barcroft.Pp
2443b91552dSMike BarcroftThe following example demonstrates how to query
2453b91552dSMike Barcrofta whois server using a non-standard port, where
2463b91552dSMike Barcroft.Dq Li query-data
2473b91552dSMike Barcroftis the query to be sent to
2482032bbdcSMike Barcroft.Dq Li whois.example.com
2493b91552dSMike Barcrofton port
2503b91552dSMike Barcroft.Dq Li rwhois
2513b91552dSMike Barcroft(written numerically as 4321).
2523b91552dSMike Barcroft.Pp
253c37dc1fbSTony Finch.Dl Ic whois -h whois.example.com -p rwhois query-data
254c37dc1fbSTony Finch.Pp
255c37dc1fbSTony FinchSome whois servers support complex queries
256c37dc1fbSTony Finchwith dash-letter options.
257c37dc1fbSTony FinchYou can use the
258c37dc1fbSTony Finch.Fl -
259c37dc1fbSTony Finchoption to separate
260c37dc1fbSTony Finch.Nm
261c37dc1fbSTony Finchcommand options from whois server query options.
262c37dc1fbSTony FinchA query containing spaces must be quoted as one
263c37dc1fbSTony Finchargument to the
264c37dc1fbSTony Finch.Nm
265c37dc1fbSTony Finchcommand.
266c37dc1fbSTony FinchThe following example asks the RIPE whois server
267c37dc1fbSTony Finchto return a brief description of its
268c37dc1fbSTony Finch.Dq Li domain
269c37dc1fbSTony Finchobject type:
270c37dc1fbSTony Finch.Pp
271c37dc1fbSTony Finch.Dl Ic whois -r -- '-t domain'
272*ced9ddb2SMark Johnston.Sh STANDARDS
2732712c396SGarrett Wollman.Rs
274*ced9ddb2SMark Johnston.%A K. Harrenstien
275*ced9ddb2SMark Johnston.%A M. Stahl
276*ced9ddb2SMark Johnston.%A E. Feinler
277*ced9ddb2SMark Johnston.%D October 1985
278*ced9ddb2SMark Johnston.%R RFC 954
2792712c396SGarrett Wollman.%T NICNAME/WHOIS
280*ced9ddb2SMark Johnston.Re
281*ced9ddb2SMark Johnston.Pp
282*ced9ddb2SMark Johnston.Rs
283*ced9ddb2SMark Johnston.%A L. Daigle
284*ced9ddb2SMark Johnston.%D September 2004
285*ced9ddb2SMark Johnston.%R RFC 3912
286*ced9ddb2SMark Johnston.%T WHOIS Protocol Specification
2872712c396SGarrett Wollman.Re
2889b50d902SRodney W. Grimes.Sh HISTORY
2899b50d902SRodney W. GrimesThe
290741d304eSPhilippe Charnier.Nm
2919b50d902SRodney W. Grimescommand appeared in
2929b50d902SRodney W. Grimes.Bx 4.3 .
293