Find IP location
Hi,
I am a linuxuser I want to find my IP location,so I tried this(ipaddress or ifconfig) in command prompt .These returned [ eth0 Link encap:Ethernet HWaddr 5c:26:0a:69:2b:e2 inet addr:192.168.29.5 Bcast:192.168.31.255 Mask:255.255.252.0 inet6 addr: fe80::5e26:aff:fe69:2be2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1299245 errors:0 dropped:0 overruns:0 frame:0 TX packets:150147 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:438541699 (438.5 MB) TX bytes:26697520 (26.6 MB) Interrupt:20 Memory:e6700000-e6720000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:65620 errors:0 dropped:0 overruns:0 frame:0 TX packets:65620 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:23871063 (23.8 MB) TX bytes:23871063 (23.8 MB) ] I think inet addr:192.168.29.5 is IP address. After I give IP address to http://www.ipligence.com/geolocation But It returns "Invalid address or IP not found". why?IP address is correct or not?and what is inet addr:127.0.0.1? |
192.168.29.5 is a private IP address, there will be literally thousands and thousands of instances of that address in private networks globally. It can't have a location. Maybe you want to go to http://whatismyip.com to see what your public facing IP is..?
127.0.0.1 is the loopback interface. http://en.wikipedia.org/wiki/Loopback |
Code:
curl icanhazip.com |
As said, there are actually two ip addresses you could be interested in, the one for your internal network, and the external one that lets other computers find you.
The first is what you get from ifconfig, etc. and most commonly begins with "192.168.". The external address cannot be determined locally; you need to query an external server such as icanhazip.com, as mentioned above. I wrote a simple script a while back that queries random servers for your external address. It's a simple procedure to add or remove server entries, but make sure they give mostly plain text output first. Code:
#!/bin/bash |
127.0.0.1 is localhost
192.168.29.5 is a class C private IP (IP range from 192.168.0.0 - 192.168.255.255), meaning it's not routable to the internet. So you will not get any results on that geolocation. Maybe can elaborate more why you need to know your IP location? |
Hi freelinuxtutorials It's only for my reference and my manager asked to me.That's why I am asking this.
|
As per Post#2 http://whatismyip.com sounds like what you want if want to be able to geo-locate yourself.
|
Quote:
http://www.ipaddresslocation.org/ip-address-locator.php |
ifconfig shows the (private)IPs assigned to your PC. You can also use below commands to find out your public IP(which is given by ISP).
Code:
lynx -dump http://whatismyip.com | grep "Your IP Address Is:" find your public IP location from this link |
Quote:
It's a little smoke-and-mirrors but it's more-or-less kind of accurate. You know how data 'goes'. :) |
if your LAN is in NAT, then if you want to know your public IP. you can try ping.eu. It will show you your public IP and proxy address if your ISP uses cache mechanism
|
All times are GMT -5. The time now is 12:40 AM. |