Operating System - HP-UX
1819684 Members
3616 Online
109605 Solutions
New Discussion юеВ

How to check where a server is located.

 
Mannoj
Occasional Advisor

How to check where a server is located.

Hi Guru's,

How to check where a UNIX server is located. Im using putty to my database server which is HP-ux and linux but I wanted to know where it is located. Atleast country is fine. I remember while installing any unix box it will ask location+timezone. How can we get that detail after the box is up.

Regards,
Mannoj
13 REPLIES 13
Kapil Jha
Honored Contributor

Re: How to check where a server is located.

I suppose you would be loggin in a alien server, you should not have rights :)

Well not exactly but if its real production box u can only get some help with timezone and the current time in server.
#date

Not all but you can get some help from login banner as well.

a little with server complete server name
#nslookup server_name

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Patrick Wallek
Honored Contributor

Re: How to check where a server is located.

It will show the time zone when you run the 'date' command.

I am not sure where, or even if, the location specified during the OS installation is stored on the system.
Mannoj
Occasional Advisor

Re: How to check where a server is located.

Thanks Kapil - when I do nslookup server_name this is what I get.

[root@winpacl ~]# nslookup server_name
Server: 2.54.477.488
Address: 2.54.477.488#74

*** Can't find server_name: No answer

[root@winpacl ~]#


I'm a root user here :)
Michael Steele_2
Honored Contributor

Re: How to check where a server is located.

Hi

I've had this problem, run a traceroute and work backwards id'ing all the other ip addresses. Might get you in the data center.
Support Fatherhood - Stop Family Law
Mannoj
Occasional Advisor

Re: How to check where a server is located.

Though this is gona fetch info from /etc/resolv.conf only.

[root@winpacl ~]# cat /etc/resolv.conf
search trualit.jm.com
nameserver 2.54.477.488
nameserver 2.149.41.112
[root@winpacl ~]#

This is what it shows. Nothing reg the location.
Michael Steele_2
Honored Contributor

Re: How to check where a server is located.

Can you get hold of a network topology?
Support Fatherhood - Stop Family Law
johnsonpk
Honored Contributor

Re: How to check where a server is located.

Hi Manoj,

your nslookup reports non existant server as you have not given your servername


in your case

nslookup winpacl

How ever your DNS server search string gives some hints

a trace for the root domain jm.com on network-tools.com site gives the below result.

United States(US) in region North America



Michael Steele_2
Honored Contributor

Re: How to check where a server is located.

nameserver 2.54.477.488
nameserver 2.149.41.112

For this ip address = 2.149.41.112

OrgName: RIPE Network Coordination Centre
OrgID: RIPE
Address: P.O. Box 10096
City: Amsterdam
StateProv:
PostalCode: 1001EB
Country: NL

ReferralServer: whois://whois.ripe.net:43

NetRange: 2.0.0.0 - 2.255.255.255
CIDR: 2.0.0.0/8
NetName: 2-RIPE
NetHandle: NET-2-0-0-0-1
Parent:
NetType: Allocated to RIPE NCC
NameServer: NS-PRI.RIPE.NET
NameServer: TINNIE.ARIN.NET
NameServer: SEC3.APNIC.NET
NameServer: NS2.LACNIC.NET
NameServer: NS3.NIC.FR
NameServer: SUNIC.SUNET.SE
Comment: These addresses have been further assigned to users in
Comment: the RIPE NCC region. Contact information can be found in
Comment: the RIPE database at http://www.ripe.net/whois
RegDate: 2009-09-29
Updated: 2009-09-30

# ARIN WHOIS database, last updated 2010-03-01 20:00
# Enter ? for additional hints on searching ARIN's WHOIS database.
#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at https://www.arin.net/whois_tou.html

##########################
##########################

http://www.db.ripe.net/whois
2.149.41.112

4 objects found for '2.149.41.112'

http://www.db.ripe.net/whois?form_type=simple&full_query_string=&searchtext=2.149.41.112&do_search=Search

############################
############################

And this may all be just nonesense from the INTERNIC WHOIS database
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: How to check where a server is located.

> it will ask location+timezone.

Actually, the setup script asks what major timezone you are in. It does not care what city or country you are in. The contents of /etc/TIMEZONE are created when you answer the question. For instance, a server setup in Chicago, Dallas or New Orleans (central timezone in the US) would look like this:

TZ=CST6CDT
export TZ

The IP address might be of some use if the server is directly connected to the Internet but if you connect through a VPN or other secure connection, the server's IP address is probably on a private subnet such as 192.168... or 10.... or 172.... and the address is meaningless as to the city or country. To manage such systems, each /etc/motd file should be customized with the physical location (city, country, etc).


Bill Hassell, sysadmin
Tingli
Esteemed Contributor

Re: How to check where a server is located.

Nowadays, even the time zone might not be the actual system locations as very often the time zone will fit the users instead of the real locations.

The only accurate way is put it into an Excel list.
Torsten.
Acclaimed Contributor

Re: How to check where a server is located.

IMHO an admin must always know where his servers are ...

Due to private networks/IP addresses some tools (traceroute, nslookup, etc). may not really help. Turn on the locator LED and ask your onsite folks ... ;-))

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Patrick Wallek
Honored Contributor

Re: How to check where a server is located.

Naming standards are also useful in situations like this.

All of the servers at the company I work for have a 2 character location code as the first 2 characters of the server name.

PXUAS01 - Phoenix Unix Application Server 01

SELDB05 - Seattle Linux Database server 05
Kapil Jha
Honored Contributor

Re: How to check where a server is located.

>>root@winpacl ~]# nslookup server_name

Manoj you should put the server name instead of server_name

#nslookup winpacl

It would tell you its FQDN (fully Qualified Domain Name) which may help.
What is the timezone and current time in ther server.

@Patrick:Yes Patrick I worked with a comp where server names used to tell a lot about sever eg location-application-clustered etc ;), not the case seems here :(

BR
Kapil+
I am in this small bowl, I wane see the real world......