,

Linux / UNIX Command To Find Out Who Owns a Domain Name

 How do I find out who owns a Internet domain name and its ip address?


The WHOIS system is used by domains and ip address on the Internet. It is used by system administrators to obtain contact information for IP address assignments or domain name administrators. Use whois command as follows:
$ whois domain-name
$ whois -h whois.example.com domain.com
$ whois google.com

Sample outputs:

Registrant:
        Dns Admin
        Google Inc.
        Please contact contact-admin@google.com 1600 Amphitheatre Parkway
         Mountain View CA 94043
        US
        dns-admin@google.com +1.6502530000 Fax: +1.6506188571

    Domain Name: google.com

        Registrar Name: Markmonitor.com
        Registrar Whois: whois.markmonitor.com
        Registrar Homepage: http://www.markmonitor.com

    Administrative Contact:
        DNS Admin
        Google Inc.
        1600 Amphitheatre Parkway
         Mountain View CA 94043
        US
        dns-admin@google.com +1.6506234000 Fax: +1.6506188571
    Technical Contact, Zone Contact:
        DNS Admin
        Google Inc.
        2400 E. Bayshore Pkwy
         Mountain View CA 94043
        US
        dns-admin@google.com +1.6503300100 Fax: +1.6506181499

    Created on..............: 1997-09-15.
    Expires on..............: 2011-09-13.
    Record last updated on..: 2010-03-30.

Find out IP address and its owner:
$ host -t a google.com
Sample outputs:
google.com has address 209.85.231.104
Now, get ip address information:
$ whois 209.85.231.104
Sample outputs:

NetRange:       209.85.128.0 – 209.85.255.255
CIDR: 209.85.128.0/17
OriginAS:
NetName: GOOGLE
NetHandle: NET-209-85-128-0-1
Parent: NET-209-0-0-0-0
NetType: Direct Allocation
NameServer: NS2.GOOGLE.COM
NameServer: NS3.GOOGLE.COM
NameServer: NS4.GOOGLE.COM
NameServer: NS1.GOOGLE.COM
RegDate: 2006-01-13
Updated: 2006-06-01
Ref: http://whois.arin.net/rest/net/NET-209-85-128-0-1

OrgName: Google Inc.
OrgId: GOGL
Address: 1600 Amphitheatre Parkway
City: Mountain View
StateProv: CA
PostalCode: 94043
Country: US
RegDate: 2000-03-30
Updated: 2009-08-07
Ref: http://whois.arin.net/rest/org/GOGL

OrgTechHandle: ZG39-ARIN
OrgTechName: Google Inc
OrgTechPhone: +1-650-253-0000
OrgTechEmail: arin-contact@google.com
OrgTechRef: http://whois.arin.net/rest/poc/ZG39-ARIN

#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#

Continue reading Linux / UNIX Command To Find Out Who Owns a Domain Name
,

Redhat / CentOS Install whois client

 How do I install whois client to see whois information about domain and ip address using command line options under Fedora / RHEL / Redhat / CentOS / Scientific Linux?


The whois command searches for an object in a RFC 3912 database. Red Hat/CentOS/RHEL/Fedora Linux comes with client for the whois directory service called whois or jwhois. The jwhois is a whois client that accepts both traditional and finger-style queries under RHEL. You can install the same using the yum command.

Redhat / CentOS Install whois client command

Login as root and type the following yum command to install the jwhois client:
# yum install jwhois
OR
# yum install whois
Sample outputs:

Loaded plugins: priorities, rhnplugin
70 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package jwhois.x86_64 0:4.0-18.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package      Arch         Version             Repository                  Size
================================================================================
Installing:
 jwhois       x86_64       4.0-18.el6          rhel-x86_64-server-6       104 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 104 k
Installed size: 0  
Downloading Packages:
jwhois-4.0-18.el6.x86_64.rpm                             | 104 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : jwhois-4.0-18.el6.x86_64                                 1/1 

Installed:
  jwhois.x86_64 0:4.0-18.el6                                                    

Complete!

How do I use whois command?

The syntax is:
whois domain
whois public-ip-address
whois [options] public-ip-address

This version of the whois client tries to guess the right server to ask for the specified object. If no guess can be made it will connect to whois.networksolutions.com for NIC handles or whois.arin.net for IPv4 addresses and network names. You can use the whois command as follows:
$ whois cyberciti.biz
$ whois 75.126.153.206

Sample outputs:

[Querying whois.arin.net]
[Redirected to rwhois.softlayer.com:4321]
[Querying rwhois.softlayer.com]
[rwhois.softlayer.com]
%rwhois V-1.5:003fff:00 rwhois.softlayer.com (by Network Solutions, Inc. V-1.5.9.5)
network:Class-Name:network
network:ID:NETBLK-SOFTLAYER.75.126.128.0/19
network:Auth-Area:75.126.128.0/19
network:Network-Name:SOFTLAYER-75.126.128.0
network:IP-Network:75.126.153.200/29
network:IP-Network-Block:75.126.153.200-75.126.153.207
network:Organization;I:SoftLayer Technologies, Inc.
network:Street-Address:1950 Stemmons Freeway Suite 2043
network:City:Dallas
network:State:TX
network:Postal-Code:75207
network:Country-Code:US
network:Tech-Contact;I:sysadmins@softlayer.com
network:Abuse-Contact;I:abuse@softlayer.com
network:Admin-Contact;I:IPADM258-ARIN
network:Created:20070218
network:Updated:20091220
network:Updated-By:ipadmin@softlayer.com
 
%referral rwhois://root.rwhois.net:4321/auth-area=.
%ok

Lookup for domain names

Simply run:
whois cyberciti.biz
Redhat CentOS Install whois client on RHEL

Getting help about whois command

Type the following command:
$ man whois
OR
$ whois --help

Usage: whois [OPTION]... OBJECT...
 
-h HOST, --host HOST   connect to server HOST
-p PORT, --port PORT   connect to PORT
-H                     hide legal disclaimers
      --verbose        explain what is being done
      --help           display this help and exit
      --version        output version information and exit
 
These flags are supported by whois.ripe.net and some RIPE-like servers:
-l                     find the one level less specific match
-L                     find all levels less specific matches
-m                     find all one level more specific matches
-M                     find all levels of more specific matches
-c                     find the smallest match containing a mnt-irt attribute
-x                     exact match
-b                     return brief IP address ranges with abuse contact
-B                     turn off object filtering (show email addresses)
-G                     turn off grouping of associated objects
-d                     return DNS reverse delegation objects too
-i ATTR[,ATTR]...      do an inverse look-up for specified ATTRibutes
-T TYPE[,TYPE]...      only look for objects of TYPE
-K                     only primary keys are returned
-r                     turn off recursive look-ups for contact information
-R                     force to show local copy of the domain object even
                       if it contains referral
-a                     also search all the mirrored databases
-s SOURCE[,SOURCE]...  search the database mirrored from SOURCE
-g SOURCE:FIRST-LAST   find updates from SOURCE from serial FIRST to LAST
-t TYPE                request template for object of TYPE
-v TYPE                request verbose template for object of TYPE
-q [version|sources|types]  query specified server info

Conclusion

WHOIS is a query and response protocol used for querying databases that store the registered users or assignees of an Internet resource, such as a domain name, an IP address block. This page explained how to install whois client on Redhat (RHEL)/CentOS using yum command. See whois server list for top level domains here.

Continue reading Redhat / CentOS Install whois client