How to get IP address using terminal
I am inside an internal network. Internal network users uses internet through some gateway. When I surf the website like "ipaddressworld
So what is the command to know Gateway's External IP address.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu dhcp3 Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Deapesh
- Solved:
- Last query:
- Last reply:
Revision history for this message
![]() |
#1 |
I think "ifconfig" gives a lot of info, does it include what you are looking for?
Revision history for this message
![]() |
#2 |
No, It does not give.
It gives the information related to my PC.
Can we read a website from Terminal. If yes how?
If it is possible then I will read "www.ipaddressw
I can't install any software package to gateway so I can't use terminal-browser like lynx(http://
Revision history for this message
![]() |
#3 |
Its easy
use whois command
Ex: bhavani@hardy:~$ whois google.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://
for detailed information.
Server Name: GOOGLE.
IP Address: 69.41.185.195
Registrar: TUCOWS INC.
Whois Server: whois.tucows.com
Referral URL: http://
Server Name: GOOGLE.
IP Address: 64.28.187.63
Registrar: DIRECTI INTERNET SOLUTIONS PVT. LTD. D/B/A PUBLICDOMAINREG
Whois Server: whois.PublicDom
Referral URL: http://
Server Name: GOOGLE.
IP Address: 217.107.217.167
Registrar: ONLINENIC, INC.
Whois Server: whois.onlinenic.com
Referral URL: http://
Server Name: GOOGLE.
IP Address: 72.52.190.30
Registrar: GODADDY.COM, INC.
Whois Server: whois.godaddy.com
Referral URL: http://
Server Name: GOOGLE.
IP Address: 62.41.27.144
Registrar: KEY-SYSTEMS GMBH
Whois Server: whois.rrpproxy.net
Referral URL: http://
Server Name: GOOGLE.COM.VN
Registrar: ONLINENIC, INC.
Whois Server: whois.onlinenic.com
Referral URL: http://
Server Name: GOOGLE.COM.UY
Registrar: DIRECTI INTERNET SOLUTIONS PVT. LTD. D/B/A PUBLICDOMAINREG
Whois Server: whois.PublicDom
Referral URL: http://
Server Name: GOOGLE.COM.UA
Registrar: DIRECTI INTERNET SOLUTIONS PVT. LTD. D/B/A PUBLICDOMAINREG
Whois Server: whois.PublicDom
Referral URL: http://
Server Name: GOOGLE.COM.TW
Registrar: WEB COMMERCE COMMUNICATIONS LIMITED DBA WEBNIC.CC
Whois Server: whois.webnic.cc
Referral URL: http://
Server Name: GOOGLE.COM.TR
Registrar: DIRECTI INTERNET SOLUTIONS PVT. LTD. D/B/A PUBLICDOMAINREG
Whois Server: whois.PublicDom
Referral URL: http://
Server Name: GOOGLE.
IP Address: 80.190.192.24
Registrar: EPAG DOMAINSERVICES GMBH
Whois Server: whois.enterpric
Referral URL: http://
Server Name: GOOGLE.
Registrar: MELBOURNE IT, LTD. D/B/A INTERNET NAMES WORLDWIDE
Whois Server: whois.melbourne
Referral URL: http://
Server Name: GOOGLE.
IP Address: 84.255.209.69
Registrar: GODADDY.COM, INC.
Whois Server: whois.godaddy.com
Referral URL: http://
Server Name: GOOGLE.COM.SA
Registrar: OMNIS NETWORK, LLC
Whois Server: whois.omnis.com
Referral URL: http://
Server Name: GOOGLE.
IP Address: 213.251.184.30
Registrar: OVH
Whois Server: whois.ovh.com
Referral URL: http://
Server Name: GOOGLE.COM.MX
Registrar: DIRECTI INTERNET SOLUTIONS PVT. LTD. D/B/A PUBLICDOMAINREG
Whois Server: whois.PublicDom
Referral URL: http://
Server Name: GOOGLE.
IP Address: 217.148.161.5
Registrar: ENOM, INC.
Whois Server: whois.enom.com
Referral URL: http://
Server Name: GOOGLE.
IP Address: 66.49.213.213
Registrar: NAME.COM LLC
Whois Server: whois.name.com
Referral URL: http://
Server Name: GOOGLE.
IP Address: 213.228.0.43
Registrar: GANDI SAS
Whois Server: whois.gandi.net
Referral URL: http://
Server Name: GOOGLE.
IP Address: 209.187.114.130
Registrar: TUCOWS INC.
Whois Server: whois.tucows.com
Referral URL: http://
Server Name: GOOGLE.COM.DO
Registrar: GODADDY.COM, INC.
Whois Server: whois.godaddy.com
Referral URL: http://
Server Name: GOOGLE.
IP Address: 72.14.207.99
IP Address: 64.233.187.99
IP Address: 64.233.167.99
Registrar: GODADDY.COM, INC.
Whois Server: whois.godaddy.com
Referral URL: http://
Server Name: GOOGLE.COM.CO
Registrar: NAMESECURE.COM
Whois Server: whois.namesecur
Referral URL: http://
Server Name: GOOGLE.COM.BR
Registrar: ENOM, INC.
Whois Server: whois.enom.com
Referral URL: http://
Server Name: GOOGLE.
IP Address: 203.36.226.2
Registrar: TUCOWS INC.
Whois Server: whois.tucows.com
Referral URL: http://
Server Name: GOOGLE.COM.AU
Registrar: PLANETDOMAIN PTY LTD.
Whois Server: whois.planetdom
Referral URL: http://
Server Name: GOOGLE.
IP Address: 85.190.27.2
Registrar: ENOM, INC.
Whois Server: whois.enom.com
Referral URL: http://
Domain Name: GOOGLE.COM
Registrar: MARKMONITOR INC.
Whois Server: whois.markmonit
Referral URL: http://
Name Server: NS1.GOOGLE.COM
Name Server: NS2.GOOGLE.COM
Name Server: NS3.GOOGLE.COM
Name Server: NS4.GOOGLE.COM
Status: clientDeletePro
Status: clientTransferP
Status: clientUpdatePro
Status: serverDeletePro
Status: serverTransferP
Status: serverUpdatePro
Updated Date: 18-nov-2008
Creation Date: 15-sep-1997
Expiration Date: 14-sep-2011
>>> Last update of whois database: Sat, 21 Feb 2009 06:40:13 EST <<<
NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar. Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.
TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability. VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.
The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.
-------
MarkMonitor, the Global Leader in Enterprise Brand Protection
Domain Management
Online Trademark Protection
Online Channel Protection
AntiPhishing Solutions
-------
The Data in MarkMonitor.com's WHOIS database is provided by MarkMonitor.com
for information purposes, and to assist persons in obtaining information
about or related to a domain name registration record. MarkMonitor.com
does not guarantee its accuracy. By submitting a WHOIS query, you agree
that you will use this Data only for lawful purposes and that, under no
circumstances will you use this Data to: (1) allow, enable, or otherwise
support the transmission of mass unsolicited, commercial advertising or
solicitations via e-mail (spam); or (2) enable high volume, automated,
electronic processes that apply to MarkMonitor.com (or its systems).
MarkMonitor.com reserves the right to modify these terms at any time.
By submitting this query, you agree to abide by this policy.
Registrant:
Dns Admin
Google Inc.
Please contact <email address hidden> 1600 Amphitheatre Parkway
Mountain View CA 94043
US
<email address hidden> +1.6502530000 Fax: +1.6506188571
Domain Name: google.com
Registrar Name: Markmonitor.com
Registrar Whois: whois.markmonit
Registrar Homepage: http://
Administrative Contact:
DNS Admin
Google Inc.
1600 Amphitheatre Parkway
Mountain View CA 94043
US
<email address hidden> +1.6506234000 Fax: +1.6506188571
Technical Contact, Zone Contact:
DNS Admin
Google Inc.
2400 E. Bayshore Pkwy
Mountain View CA 94043
US
<email address hidden> +1.6503300100 Fax: +1.6506181499
Created on..............: 1997-09-15.
Expires on..............: 2011-09-13.
Record last updated on..: 2008-06-08.
Domain servers in listed order:
ns1.google.com
ns3.google.com
ns4.google.com
ns2.google.com
-------
MarkMonitor, the Global Leader in Enterprise Brand Protection
Domain Management
Online Trademark Protection
Online Channel Protection
AntiPhishing Solutions
-------
--
bhavani@hardy:~$
Revision history for this message
![]() |
#5 |
Really Brilliant answer Bhavani :)
I checked several options but this was remain.
Currently I am out of my office so I can't check this solution and tomorrow is Sunday. So I will check it on monday.
But I am still not sure for this; because
For Using "whois" I require a domain/website name that is registered to somewhere. My GatewayServer is somewhere registered that I know. But I don't know it's DNS name so how to fire whois command. Because for internet we use DHCP settings; so every thing is assigned automatically. I can find out the Gateways External IP by surfing webs that tells IP address; but still the problem is how to find it through Terminal.
Lets Make it more simple and clear; if I can access my Gateway's Terminal for firing commands then is it possible? I don't have any other access except the Gateway's terminal.
I also tried with "Netstat" command on Gateway's Terminal. It shows all the hosts(Internal & External) connected to the server. Shows IP of all other HOSTs but does not show it's own External IP.
I also didn't check "who am I" so I am going to try both "whois" and "who am I" on monday.
Any other solution ????
Yes! I have the access for Gateway's terminal. I know Gateway with some 192.168.xx.xx; nothing else.
Revision history for this message
![]() |
#6 |
have you tried: wget -U "" http://
Revision history for this message
![]() |
#7 |
Thanks Deapesh, that solved my question.
Revision history for this message
![]() |
#8 |
Use the following command to get your external ip address :
wget http://
OR
wget http://