Author |
Message |
#1 / 8
|
 Retrieving real Internet IP address for computers connected through a network
Hi Does anybody know how it is possible to get the Internet IP of a machine which is connected over a network via a router? Common methods to retrieve IP addresses using the Winsock control return the network IP address of the current machine. Thanks Barrie
|
Fri, 31 Dec 2004 02:37:16 GMT |
|
 |
David Whitma #2 / 8
|
 Retrieving real Internet IP address for computers connected through a network
Quote:
>Does anybody know how it is possible to get the Internet IP of a >machine which is connected over a network via a router? Common methods >to retrieve IP addresses using the Winsock control return the network >IP address of the current machine. >Thanks
Address translation is probably taking place at the router, so the local machine probably doesn't know that it's being accessed by another address. You would need to deal directly with the NAT router, if that's possible. David ----
Catalyst Development Corporation | application with ActivePatch. Download http://www.catalyst.com/ | the SDK from www.activepatch.com
|
Sat, 01 Jan 2005 02:20:14 GMT |
|
 |
#3 / 8
|
 Retrieving real Internet IP address for computers connected through a network
Quote:
>>Does anybody know how it is possible to get the Internet IP of a >>machine which is connected over a network via a router? Common methods >>to retrieve IP addresses using the Winsock control return the network >>IP address of the current machine. >>Thanks >Address translation is probably taking place at the router, so the >local machine probably doesn't know that it's being accessed by >another address. You would need to deal directly with the NAT router, >if that's possible.
Yes, you are unfortunetly right. I'm writing a peer to peer messaging client, and one of the required features is to autodetect the IP of the local client. That is impossible with NAT addressing. An option is to create a webserver which will give an IP for the current Internet connection but that would require an permanent Internet server. I just wondered if there's a way of pinging yourself through a remote server and be able to extract the IP or anything like that. Barrie Quote: >David >----
>Catalyst Development Corporation | application with ActivePatch. Download >http://www.catalyst.com/ | the SDK from www.activepatch.com
|
Sat, 01 Jan 2005 04:00:01 GMT |
|
 |
Dale Atki #4 / 8
|
 Retrieving real Internet IP address for computers connected through a network
I would think the only way to do this would for you to somehow cause your outgoing router to connect back to you somehow, or alternatively cause the machine to connect to a webserver that you control and log the IP address, or perhaps connect to an MTA that reports the IP address that you are connecting from as part of the information exchange. Then read that information back from within your program. The basic problem is that at least thinking about my computer, it has no way of knowing what IP address I am connecting/surfing on, as on the local network the router is known only by the private 192.168.10.1 address, the public address is on a seperate NIC altogther. Hope this helps a bit. Dale
Quote: > Hi > Does anybody know how it is possible to get the Internet IP of a > machine which is connected over a network via a router? Common methods > to retrieve IP addresses using the Winsock control return the network > IP address of the current machine. > Thanks > Barrie
|
Sat, 01 Jan 2005 00:46:36 GMT |
|
 |
#5 / 8
|
 Retrieving real Internet IP address for computers connected through a network
Hi On NAT addressing, the only way to allow connections of this type would be to use forward the required ports directly to the required machine anyway. If this was not done, the router would block the connection. So the final problem you mentioned is really taken care of that. At least I hope so. If it was possible to get some kind of loop as you suggested, getting the IP address could be done. But I'm not sure how it is possible Thanks Barrie On Mon, 15 Jul 2002 10:46:36 -0600, "Dale Atkin" Quote:
>I would think the only way to do this would for you to somehow cause your >outgoing router to connect back to you somehow, or alternatively cause the >machine to connect to a webserver that you control and log the IP address, >or perhaps connect to an MTA that reports the IP address that you are >connecting from as part of the information exchange. Then read that >information back from within your program. The basic problem is that at >least thinking about my computer, it has no way of knowing what IP address I >am connecting/surfing on, as on the local network the router is known only >by the private 192.168.10.1 address, the public address is on a seperate NIC >altogther. >Hope this helps a bit. >Dale
>> Hi >> Does anybody know how it is possible to get the Internet IP of a >> machine which is connected over a network via a router? Common methods >> to retrieve IP addresses using the Winsock control return the network >> IP address of the current machine. >> Thanks >> Barrie
|
Mon, 03 Jan 2005 03:44:54 GMT |
|
 |
Dale Atki #6 / 8
|
 Retrieving real Internet IP address for computers connected through a network
I really think the easiest (and most general way) would be to find or write a script that would return the requester's IP address when queried. You could then put this script online somewhere, and connect to it. Are you able to set up a port forwarding on your router (so that say port 12343 points to the machine you are trying to determine the IP address from) I would think that this would be unique to your setup. Dale
Quote: > Hi > On NAT addressing, the only way to allow connections of this type > would be to use forward the required ports directly to the required > machine anyway. If this was not done, the router would block the > connection. So the final problem you mentioned is really taken care of > that. At least I hope so. > If it was possible to get some kind of loop as you suggested, getting > the IP address could be done. But I'm not sure how it is possible > Thanks > Barrie > On Mon, 15 Jul 2002 10:46:36 -0600, "Dale Atkin"
> >I would think the only way to do this would for you to somehow cause your > >outgoing router to connect back to you somehow, or alternatively cause the > >machine to connect to a webserver that you control and log the IP address, > >or perhaps connect to an MTA that reports the IP address that you are > >connecting from as part of the information exchange. Then read that > >information back from within your program. The basic problem is that at > >least thinking about my computer, it has no way of knowing what IP address I > >am connecting/surfing on, as on the local network the router is known only > >by the private 192.168.10.1 address, the public address is on a seperate NIC > >altogther. > >Hope this helps a bit. > >Dale
> >> Hi > >> Does anybody know how it is possible to get the Internet IP of a > >> machine which is connected over a network via a router? Common methods > >> to retrieve IP addresses using the Winsock control return the network > >> IP address of the current machine. > >> Thanks > >> Barrie
|
Mon, 03 Jan 2005 22:11:36 GMT |
|
 |
David Whitma #7 / 8
|
 Retrieving real Internet IP address for computers connected through a network
You'd probably have to implement a service running on a remote machine in order to accomplish this. We don't know of anything ready-to-go to meet this need. David
Quote:
>>>Does anybody know how it is possible to get the Internet IP of a >>>machine which is connected over a network via a router? Common methods >>>to retrieve IP addresses using the Winsock control return the network >>>IP address of the current machine. >>>Thanks >>Address translation is probably taking place at the router, so the >>local machine probably doesn't know that it's being accessed by >>another address. You would need to deal directly with the NAT router, >>if that's possible. >Yes, you are unfortunetly right. I'm writing a peer to peer messaging >client, and one of the required features is to autodetect the IP of >the local client. That is impossible with NAT addressing. An option is >to create a webserver which will give an IP for the current Internet >connection but that would require an permanent Internet server. >I just wondered if there's a way of pinging yourself through a remote >server and be able to extract the IP or anything like that. >Barrie >>David >>----
>>Catalyst Development Corporation | application with ActivePatch. Download >>http://www.catalyst.com/ | the SDK from www.activepatch.com
----
Catalyst Development Corporation | application with ActivePatch. Download http://www.catalyst.com/ | the SDK from www.activepatch.com
|
Tue, 11 Jan 2005 04:16:56 GMT |
|
 |
Joe #8 / 8
|
 Retrieving real Internet IP address for computers connected through a network
Quote:
> Yes, you are unfortunetly right. I'm writing a peer to peer messaging > client, and one of the required features is to autodetect the IP of > the local client. That is impossible with NAT addressing. An option is > to create a webserver which will give an IP for the current Internet > connection but that would require an permanent Internet server.
You're most likely boned. If you think you might be behind a NAT firewall that won't forward incoming connections to your app, you might be able to connect to a peer that is reachable and have it accept messages on your behalf and forward them to you. Adding public-key crypto to the message protocol might be a good idea... -- Joe Foster <mailto:jlfoster%40znet.com> Space Cooties! <http://www.xenu.net/> WARNING: I cannot be held responsible for the above They're coming to because my cats have apparently learned to type. take me away, ha ha!
|
Wed, 12 Jan 2005 05:58:39 GMT |
|
|