LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-30-2013, 07:55 AM   #1
deeek
LQ Newbie
 
Registered: Jan 2013
Posts: 7

Rep: Reputation: Disabled
Bash commands to show IP/DNS data?


Hi all! I'm trying to figure out an easy way to find all the information about domain names for any website I decide to look up. I know of "whois" and "host". Does anyone know the commands to get the information below? Thanks for looking

Code:
+--------------------------
	|REPORT FOR ip = 208.80.152.201
	|	 A hostname associated with 208.80.152.201 is wikipedia-lb.pmtpa.wikimedia.org.
	|	 Whois data for ip 208.80.152.201:
	|		[Querying whois.arin.net]
	|		[whois.arin.net]
	|		#
	|		# Query terms are ambiguous.  The query is assumed to be:
	|		#     "n 208.80.152.201"
	|		#
	|		# Use "?" to get help.
	|		#
	|		
	|		#
	|		# The following results may also be obtained via:
	|		# http://whois.arin.net/rest/nets;q=208.80.152.201?showDetails=true&showARIN=false&ext=netref2
	|		#
	|		
	|		NetRange:       208.80.152.0 - 208.80.155.255
	|		CIDR:           208.80.152.0/22
	|		OriginAS:       AS14907
	|		NetName:        WIKIMEDIA
	|		NetHandle:      NET-208-80-152-0-1
	|		Parent:         NET-208-0-0-0-0
	|		NetType:        Direct Assignment
	|		Comment:        http://www.wikimediafoundation.org
	|		RegDate:        2007-07-23
	|		Updated:        2007-07-23
	|		Ref:            http://whois.arin.net/rest/net/NET-208-80-152-0-1
	|		
	|		OrgName:        Wikimedia Foundation Inc.
	|		OrgId:          WIKIM
	|		Address:        149 New Montgomery Street
	|		Address:        3rd Floor
	|		City:           San Francisco
	|		StateProv:      CA
	|		PostalCode:     94105
	|		Country:        US
	|		RegDate:        2006-05-30
	|		Updated:        2011-09-24
	|		Ref:            http://whois.arin.net/rest/org/WIKIM
	|		
	|		OrgAbuseHandle: RTA40-ARIN
	|		OrgAbuseName:   Tarnell, River 
	|		OrgAbusePhone:  +1-415-839-6885 
	|		OrgAbuseEmail:  river@wikimedia.org
	|		OrgAbuseRef:    http://whois.arin.net/rest/poc/RTA40-ARIN
	|		
	|		OrgAbuseHandle: MBE96-ARIN
	|		OrgAbuseName:   Bergsma, Mark 
	|		OrgAbusePhone:  +1-415-839-6885 
	|		OrgAbuseEmail:  mark@wikimedia.org
	|		OrgAbuseRef:    http://whois.arin.net/rest/poc/MBE96-ARIN
	|		
	|		OrgTechHandle: RTA40-ARIN
	|		OrgTechName:   Tarnell, River 
	|		OrgTechPhone:  +1-415-839-6885 
	|		OrgTechEmail:  river@wikimedia.org
	|		OrgTechRef:    http://whois.arin.net/rest/poc/RTA40-ARIN
	|		
	|		OrgTechHandle: MBE96-ARIN
	|		OrgTechName:   Bergsma, Mark 
	|		OrgTechPhone:  +1-415-839-6885 
	|		OrgTechEmail:  mark@wikimedia.org
	|		OrgTechRef:    http://whois.arin.net/rest/poc/MBE96-ARIN
	|		
	|		RNOCHandle: MBE96-ARIN
	|		RNOCName:   Bergsma, Mark 
	|		RNOCPhone:  +1-415-839-6885 
	|		RNOCEmail:  mark@wikimedia.org
	|		RNOCRef:    http://whois.arin.net/rest/poc/MBE96-ARIN
	|		
	|		RTechHandle: MBE96-ARIN
	|		RTechName:   Bergsma, Mark 
	|		RTechPhone:  +1-415-839-6885 
	|		RTechEmail:  mark@wikimedia.org
	|		RTechRef:    http://whois.arin.net/rest/poc/MBE96-ARIN
	|		
	|		RAbuseHandle: MBE96-ARIN
	|		RAbuseName:   Bergsma, Mark 
	|		RAbusePhone:  +1-415-839-6885 
	|		RAbuseEmail:  mark@wikimedia.org
	|		RAbuseRef:    http://whois.arin.net/rest/poc/MBE96-ARIN
	|		
	|		#
	|		# ARIN WHOIS data and services are subject to the Terms of Use
	|		# available at: https://www.arin.net/whois_tou.html
	|		#
	|		
	|
	|	 Whois data for domain wikimedia.org:
	|		[Querying whois.publicinterestregistry.net]
	|		[whois.publicinterestregistry.net]
	|		Access to .ORG WHOIS information is provided to assist persons in 
	|		determining the contents of a domain name registration record in the 
	|		Public Interest Registry registry database. The data in this record is provided by 
	|		Public Interest Registry for informational purposes only, and Public Interest Registry does not 
	|		guarantee its accuracy.  This service is intended only for query-based 
	|		access. You agree that you will use this data only for lawful purposes 
	|		and that, under no circumstances will you use this data to: (a) allow, 
	|		enable, or otherwise support the transmission by e-mail, telephone, or 
	|		facsimile of mass unsolicited, commercial advertising or solicitations 
	|		to entities other than the data recipient's own existing customers; or 
	|		(b) enable high volume, automated, electronic processes that send 
	|		queries or data to the systems of Registry Operator, a Registrar, or 
	|		Afilias except as reasonably necessary to register domain names or 
	|		modify existing registrations. All rights reserved. Public Interest Registry reserves 
	|		the right to modify these terms at any time. By submitting this query, 
	|		you agree to abide by this policy. 
	|		
	|		Domain ID:D95346862-LROR
	|		Domain Name:WIKIMEDIA.ORG
	|		Created On:16-Mar-2003 08:22:47 UTC
	|		Last Updated On:13-Jan-2012 21:02:42 UTC
	|		Expiration Date:16-Mar-2014 08:22:47 UTC
	|		Sponsoring Registrar:GoDaddy.com, Inc. (R91-LROR)
	|		Status:CLIENT DELETE PROHIBITED
	|		Status:CLIENT RENEW PROHIBITED
	|		Status:CLIENT TRANSFER PROHIBITED
	|		Status:CLIENT UPDATE PROHIBITED
	|		Registrant ID:CR37346910
	|		Registrant Name:DNS Admin
	|		Registrant Organization:Wikimedia Foundation, Inc.
	|		Registrant Street1:149 New Montgomery Street
	|		Registrant Street2:Third Floor
	|		Registrant Street3:
	|		Registrant City:San Francisco
	|		Registrant State/Province:California
	|		Registrant Postal Code:94105
	|		Registrant Country:US
	|		Registrant Phone:+1.4158396885
	|		Registrant Phone Ext.:
	|		Registrant FAX:+1.4158820495
	|		Registrant FAX Ext.:
	|		Registrant Email:dns-admin@wikimedia.org
	|		Admin ID:CR37346912
	|		Admin Name:DNS Admin
	|		Admin Organization:Wikimedia Foundation, Inc.
	|		Admin Street1:149 New Montgomery Street
	|		Admin Street2:Third Floor
	|		Admin Street3:
	|		Admin City:San Francisco
	|		Admin State/Province:California
	|		Admin Postal Code:94105
	|		Admin Country:US
	|		Admin Phone:+1.4158396885
	|		Admin Phone Ext.:
	|		Admin FAX:+1.4158820495
	|		Admin FAX Ext.:
	|		Admin Email:dns-admin@wikimedia.org
	|		Tech ID:CR37346911
	|		Tech Name:DNS Admin
	|		Tech Organization:Wikimedia Foundation, Inc.
	|		Tech Street1:149 New Montgomery Street
	|		Tech Street2:Third Floor
	|		Tech Street3:
	|		Tech City:San Francisco
	|		Tech State/Province:California
	|		Tech Postal Code:94105
	|		Tech Country:US
	|		Tech Phone:+1.4158396885
	|		Tech Phone Ext.:
	|		Tech FAX:+1.4158820495
	|		Tech FAX Ext.:
	|		Tech Email:dns-admin@wikimedia.org
	|		Name Server:NS0.WIKIMEDIA.ORG
	|		Name Server:NS1.WIKIMEDIA.ORG
	|		Name Server:NS2.WIKIMEDIA.ORG
	|		Name Server: 
	|		Name Server: 
	|		Name Server: 
	|		Name Server: 
	|		Name Server: 
	|		Name Server: 
	|		Name Server: 
	|		Name Server: 
	|		Name Server: 
	|		Name Server: 
	|		DNSSEC:Unsigned
	|		
	|		
	|
	|END REPORT FOR ip = 208.80.152.201
 
Old 01-30-2013, 08:05 AM   #2
dmx
LQ Newbie
 
Registered: Jan 2013
Posts: 3

Rep: Reputation: Disabled
dig

dig command may be used for DNS Lookup.

usage : dig <domain name>
 
Old 01-30-2013, 09:52 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
easy way to find all the information about domain names for any website I decide to look up
All what information exactly? You are showing us whois information and asking about IP Details for "domain names for any website"?
ARIN lookups don't use domain names.
Whois doesn't show IPs (unless you whois <IP>)

You want IP address whois info for "domain names for any website"?

Quit using ARIN info for DNS details? http://goo.gl/Rims
If "Comment: http://www.wikimediafoundation.org" didn't get filled in, you still wouldn't have the information I think you want.

Quote:
Does anyone know the commands to get the information below? Thanks for looking
ARIN output.

Code:
+--------------------------
  ...
    |        # The following results may also be obtained via:
    |        # http://whois.arin.net/rest/nets;q=208.80.152.201?showDetails=true&showARIN=false&ext=netref2
  ...
Code:
curl "http://whois.arin.net/rest/nets;q=208.80.152.201?showDetails=true&showARIN=false&ext=netref2"
with and without the quotes both give you the info you are asking about.

Formatting the output is a Programming Issue and beyond the scope of this reply.

Good Luck.

Last edited by Habitual; 01-30-2013 at 10:07 AM.
 
Old 01-30-2013, 09:53 PM   #4
deeek
LQ Newbie
 
Registered: Jan 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
I appreciate the replies! Silly me, I clearly overlooked the obvious. I will probably focus on the formatting as mentioned above.
 
Old 01-31-2013, 12:18 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Glad to be of help.

But now you know there's a difference between IP address (ARIN) and a host's DNS (whois) details, right?
 
Old 01-31-2013, 01:10 PM   #6
deeek
LQ Newbie
 
Registered: Jan 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Glad to be of help.

But now you know there's a difference between IP address (ARIN) and a host's DNS (whois) details, right?
Yes! haha
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are BASH commands stored? Not scripts but what bash exe uses. theKbStockpiler Programming 11 02-23-2011 03:06 PM
Running bash but common bash commands not working michellepace Linux - Newbie 11 07-17-2010 09:19 AM
Using the PS and TOP commands to show the PRI column. CoffeeKing!!! Linux - Newbie 1 09-16-2008 02:20 AM
top and ps commands show incorrect pids joepgjm Linux - Newbie 3 04-25-2007 11:23 AM
show all terminal typed commands joulupukki Linux - Newbie 6 05-10-2004 04:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration