[JDEV] getting IP address of connection in a component

tom_waters at mac.com tom_waters at mac.com
Sun Feb 10 10:58:21 CST 2002

i want the external ip... outside of NAT.

in many cases, the client will have been port forwarded through their 
nat router, so it will indeed work.  and once the routers have uPnP 
installed on them, this will be the case all the time.

and yes, i understand that i could use a third party fileserver, but i 
want this to be peer to peer.

and it's not an issue that my client will only work with a server with 
this mod installed, because my client will ONLY ever talk to my server.

so, my original question remains... does anyone have a way to get the ip 
address of the client from inside of a server component.

On Sunday, February 10, 2002, at 01:58 AM, Matthias Wimmer wrote:

> Hi!
> On Sat, Feb 09, 2002 at 08:25:54PM -0800, tom_waters at mac.com wrote:
>> I would like to write a server component that lets a client query
>> it's external IP address...
>> (this is in support of using jabber:iq:oob to do c2c stuff)
> But your client could also use the getsockname() function!? Or do you
> want to get the external IP for a client behind a NAT router? - But
> behind a NAT you also have not much use of the external IP because the
> other client is then connecting to the NAT router instead of to your
> client.
> Also your extended client will have the problem, that it can do this
> stuff only if your server administrator installs the module. I'd suggest
> a solution that don't need changes on the server: Use a relaying
> server where you put your data and the other site can get the data. E.g.
> for file transfers just a webserver. You can put the data with WebDAV
> and get it with normal http.

More information about the JDev mailing list