Get the user's IP address.

How do I get the user of a program's IP address?
[56 byte] By [Viruma] at [2007-9-27 8:25:11]
# 1
How are they connecting?
mlw9a at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 2

Well, there are two ways I would like to do it.

A) I type in the person's e-mail address, and I am told what IP address receives form that e-mail account - I don't think this is possible.

B) I get the IP address from the machyine running the program, which doesn't require a connection, does it?

Viruma at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 3

I don't think you are going to get terribly far going down this route.

An email address tells you an account name and email server. And nothing more. The best you can get is the IP address of the email server. And is the IP address of hotmail.com going to help you?

When a client box is running it might have a dynamic and/or private IP address.

Dynamic means that the next time they login/restart/timed they can get a new IP address.

Private means that the address is never visible from the internet. It is internal to a lan. A router/gateway translates requests from that IP into a different IP to talk to the internet. There could be several translations as a single IP might go through several router/gateways. The same external IP is unlikely to be used the next time. Private also means that it is very likely that many people are using exactly the same address at the same time.

jschella at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 4
Okay, thank you jschell, saving me from wasting my time. :)
Viruma at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 5

> Okay, thank you jschell, saving me from wasting my

> time. :)

Keep in mind, going forward, that there are some business situations where the IP can be derived. For example in an internal lan, static IPs can be in use. Or as part of a contractual agreement, a company agrees that it will use a fixed IP to contact another company. This second is a common way of implementing some security or licensing agreements.

But, for the general internet community it isn't going to be useful.

jschella at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 6

It was for the general internet community. I was going to make an instant messenger type program where you communicated using IP addresses. I don't like the other instant messenger's (MSN messenger, ICQ, etc.) because any one can hop on and start chatting with you. Once on ICQ, this one guy hopped on and says f*** you and your Java.

So I wanted to make one more private, that required you know the e-mail address of the user. You would e-mail that person, ask for their IP address (whiuch the program would read) and if they wanted that person on there list, they would send them me the IP address back.That way, unless someone hyappened to know your IP address, they could not just hop on, as that one person did to me in ICQ.

Hotmail is better, but I can radomly type in people's e-mail address in the box where you can chat with someone. This one would have been more private.

But I guess it won't work. Thanks.

Virum

Viruma at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 7
ICQ can be configured to only allow people on your contact list to talk to you. All you have to do is route all traffic through the central server, and use digital signatures to make it hard for people to bypass the server.
pjt33a at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 8

>

> Hotmail is better, but I can radomly type in people's

> e-mail address in the box where you can chat with

> someone. This one would have been more private.

>

You could use email to simulate a chat client. All you do is hide the SMTP under the app. But it would depend on how fast the email server is at both ends.

jschella at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 9

> >

> > Hotmail is better, but I can radomly type in

> people's

> > e-mail address in the box where you can chat with

> > someone. This one would have been more private.

> >

>

> You could use email to simulate a chat client. All

> you do is hide the SMTP under the app. But it would

> depend on how fast the email server is at both ends.

What is SMTP?

Viruma at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 10
Simple mail transfer protocol
ConceptVBSa at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 11

> Well, there are two ways I would like to do it.

>

> A) I type in the person's e-mail address, and I am

> told what IP address receives form that e-mail account

> - I don't think this is possible.

>

You can get that person's IP address if he/she sent you an email.

thunderBolta at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...
# 12

> > Well, there are two ways I would like to do it.

> >

> > A) I type in the person's e-mail address, and I am

> > told what IP address receives form that e-mail

> account

> > - I don't think this is possible.

> >

>

> You can get that person's IP address if he/she sent

> you an email.

Again I don't believe so. The last legitimate address in the header is the originating email server. Which is not the same as the client box initiating the request. And especially for a private/dynamic IP address anything else is useless and there is no point in keeping it.

jschella at 2007-7-8 16:20:53 > top of Java-index,Archived Forums,Java Programming...