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