Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[tcp] obtaining remote ip address

 [1/7] from: gchiu:compkarori at: 22-Jun-2004 9:52


Hi, Just wondering if or how I can get the remote ip address when a client connects to me. I probed the client port, and all I can see is the address of my router where it has the remote-ip address field. I'm behind NAT. Thanks, -- Graham Chiu http://www.compkarori.com/cerebrus http://www.compkarori.com/rebolml

 [2/7] from: ptretter:charter at: 21-Jun-2004 18:19


Setup port forwarding on your router to forward data to your local ip. Paul Tretter ----- Original Message ----- From: "Graham Chiu" <[gchiu--compkarori--co--nz]> To: <[rebolist--rebol--com]> Sent: Monday, June 21, 2004 4:52 PM Subject: [REBOL] [tcp] obtaining remote ip address
> Hi, > > Just wondering if or how I can get the remote ip address when a client
connects to me. I probed the client port, and all I can see is the address of my router where it has the remote-ip address field. I'm behind NAT.

 [3/7] from: gchiu:compkarori at: 22-Jun-2004 13:21


Paul Tretter wrote.. apparently on 21-Jun-2004/18:19:04-5:00
>Setup port forwarding on your router to forward data to your local ip. > >Paul Tretter
I have port forwarding to forward data to the PC running the server software on the specified port, but I'm not seeing any information about where the remote client is. Perhaps I have to do something else on the router? But looking at the router options, there's nothing I can see. So, I wonder if this data is added to the tcp packet by the router, but Rebol is not set up to read it ... -- Graham Chiu http://www.compkarori.com/cerebrus http://www.compkarori.com/rebolml

 [4/7] from: andreas:bolka:gmx at: 22-Jun-2004 23:31


Tuesday, June 22, 2004, 3:21:10 AM, Graham wrote:
> Paul Tretter wrote.. apparently on 21-Jun-2004/18:19:04-5:00 >>Setup port forwarding on your router to forward data to your local >>ip. > I have port forwarding to forward data to the PC running the server > software on the specified port, but I'm not seeing any information > about where the remote client is.
With port forwarding the router will always be the "remote client" (i.e. look like the originator of the connection). -- Best regards, Andreas

 [5/7] from: gchiu::compkarori::co::nz at: 23-Jun-2004 12:24


Andreas Bolka wrote.. apparently on 22-Jun-2004/23:31:24+2:00
>Tuesday, June 22, 2004, 3:21:10 AM, Graham wrote: >> Paul Tretter wrote.. apparently on 21-Jun-2004/18:19:04-5:00
<<quoted lines omitted: 5>>
>With port forwarding the router will always be the "remote client" >(i.e. look like the originator of the connection).
Interestingly it now works and I can get the remote client's ip address. But when I connect from inside my network, and use the non local network address to connect to the server, the server sees the router address ... but when others connect, I see their real ip addresses. Odd. Perhaps I am not really going out and coming back in again at all. -- Graham Chiu http://www.compkarori.com/cerebrus http://www.compkarori.com/rebolml

 [6/7] from: g:santilli:tiscalinet:it at: 23-Jun-2004 11:07


Hi Andreas, On Tuesday, June 22, 2004, 11:31:24 PM, you wrote: AB> With port forwarding the router will always be the "remote client" AB> (i.e. look like the originator of the connection). Hmm, not necessarily. The router just needs to rewrite the destination of the packets, not the source, as long as it is the default gateway too. At least AFAIK, and my router confirms this:
>> p: open tcp://www.rebol.com:80 >> p/remote-ip
== 216.193.197.238 Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [7/7] from: andreas:bolka:gmx at: 24-Jun-2004 1:44


Wednesday, June 23, 2004, 11:07:40 AM, Gabriele wrote:
> On Tuesday, June 22, 2004, 11:31:24 PM, you wrote:
AB>> With port forwarding the router will always be the "remote client" AB>> (i.e. look like the originator of the connection).
> Hmm, not necessarily. The router just needs to rewrite the > destination of the packets, not the source, as long as it is the > default gateway too.
Yep, sorry, got that mixed up - should not post w/o concentration ;) -- Best regards, Andreas

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted