Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Simple answer: You can't.
More complex answer: Which IP address, the public IP address of their network or network local? In most situatuions nowadays these are different.
What I would do to find the public IP: Post a picture that only they can see which is hosted on a machine I control and check the logs for the IP address which opened it.
Of course, I have to ask why you would want to do this?
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by AvinashSam
just to know only others IP
You have been given two options that work -- ask the person for their IP address or embed an image or other resource in a web page from a server you control.
There are no other ways. You cannot generally determine another persons IP address from something like Facebook.
Perhaps if you expanded on what you are trying to achieve and why there would be a more suitable answer somebody can give.
You could run something like wireshark - a low level protocol analyzer.
Provided you have a direct person-person connection (no proxies, facebook, twitter etc) this would work.
But only to the extent of giving you their current public-facing IP address of their LAN.
This address is liable to change at the whim of their ISP.
The distant person is probably behind a NAT router, with a non-routable address.
For example, my local ip address is 192.168.1.7 - but you can't find that out.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
It did occur to me that IRC gives out the public-facing IP address of everyone as they join -- so that could be used.
Again, though, as mentioned above this is the public facing IP only and may be subject to change at any time. Though I found my ISP gave me the same IP address for over 5 years and it only changed recently when I got a new MODEM. Of course, my phone can change IP address one minute to the next in extreme circumstances.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by JeremyBoden
You could use geo-location lookup to discover the vague location of the remote person.
Indeed. I hate IRC for broadcasting my IP for that reason, amongst others. I've found, from using IRC and checking server logs, that geolocation tends to be accurate enough to give the town a person is located in as long as they're using a home ISP. Of course, at work I browse through another city and on this mobile device I tend to connect through Canada and often get served google.nl.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.