Sunday 16 October 2016

NSLookUp And GeoIP Command

To see the IP associated with a particular domain, nslookup command can be used. For instance, to find the ip address of blogger.com, type in the command

nslookup www.blogger.com

output

Server: 192.168.1.254
Address: 192.168.1.254#53

Non-authoritative answer:
www.blogger.com canonical name = blogger.l.google.com.
Name: blogger.l.google.com

Address: 74.125.68.191

To get the location of the ip address, type in the following:

curl ipinfo.io/74.125.68.191

output

{
  "ip": "74.125.68.191",
  "hostname": "sc-in-f191.1e100.net",
  "city": "Mountain View",
  "region": "California",
  "country": "US",
  "loc": "37.4192,-122.0574",
  "org": "AS15169 Google Inc.",
  "postal": "94043"

}