Normally, most PCs have just one network card and one address (private
network address). If the PC connects through a router (e.g. a PC at a work
places or a PC in a home network), to a system outside of your internal
network, the peer on the other end sees your router's external/public
address (this is the static/dynamic address given by your Internet Service
Provider). I'm not sure if it is same as "public IP of the client".

PS: you should be able to go to www.whatismyipaddress.com to find the IP
address seen by systems on the Internet.

Sai Pullabhotla
Phone: (402) 408-5753
Fax: (402) 408-6861
www.jMethods.com



On Tue, Feb 17, 2009 at 6:18 AM, Ashish <[email protected]> wrote:

> On Tue, Feb 17, 2009 at 5:39 PM, Sai Pullabhotla
> <[email protected]> wrote:
> > The getClientAddress returns the IP Address of the client that
> > connected/logged into the server. If the client used a Router to connect
> to
> > the server over the Interner, the router's IP address is what the server
> > will see as the connected client.
>
> I hope, you mean, the public IP used by the client?
>
> >
> > I'm not sure on your second question as I do not see a getHostAddress()
> > method in the FTPSession. Please clarify further.
> >
> > Thanks.
> >
> > Sai Pullabhotla
> > Phone: (402) 408-5753
> > Fax: (402) 408-6861
> > www.jMethods.com
> >
> >
> >
> > On Mon, Feb 16, 2009 at 7:13 PM, Koichi Tsunoda <[email protected]
> >wrote:
> >
> >> Hey all,
> >>
> >> It seems like if I do ftpSession.getClientAddress().toString() in an
> Ftplet
> >> methods (onLogin, etc.), it won't get the actual user's address for me.
> I'm
> >> wondering if that is because of NATs/Firewalls/etc., or if it's a bug?
> It
> >> seems to get the last address the "hop" came from, rather than the
> original
> >> origin.
> >>
> >> On the side note, if I do ftpSessoin.getHostAddress().toString(), it'll
> get
> >> the internal IP, rather than the external IP address that the user used
> to
> >> ftp to that machine. Is that also behaving the way it's supposed to
> work?
> >>
> >> Thanks!
> >> Koichi
> >>
> >>
> >>
> >>
> >
>
>
>
> --
> thanks
> ashish
>
> Blog: http://www.ashishpaliwal.com/blog
>
> My Photo Galleries: http://www.pbase.com/ashishpaliwal
>

Reply via email to