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