Opened 21 years ago

Last modified 17 years ago

#1989 closed Feature request

client: Override IP used in PASV connect

Reported by: puddle Owned by: Alexander Schuch
Priority: normal Component: FileZilla Client
Keywords: Cc: puddle, Alexander Schuch
Component version: Operating system type:
Operating system version:

Description

Servers behind NAT may give the wrong IP when they give
the host/port info in their response to the client PASV.

I just experimented, and I can simply substitute the
original server IP instead of using the one the server
passed in the response.

I think this would make a nice option.

I'm seeing this matter when the server's NAT gateway
can fix the outbound info in unencrypted channel (so I
have no problem there), but the server's NAT gateway
can't fix it in encrypted channel, so I can't connect
unless I hack the code in CFtpControlSocket::List to
switch IPs.

I think it would be nifty to have an Advanced option
something like

"Use original Server IP in PASV connection"

for this case, to avoid having to hack in the cpp code
myself :)

I might be able to submit a code patch for it, if I can
(a) figure out the original server IP (which shouldn't
be hard, but when I was hacking, I knew the server IP
and just put in a hardcoded one, so I didn't solve this
part), and (b) figure out the GUI stuff (probably much
the harder part).

FtpControlSocket.cpp, v1.76
circa lines 1306-1309

if (pData->bPasv)
{

pData->host = "99.99.99.99"; hack, should fetch

original server IP

if PASV create the socket & initiate outbound

data channel connection

if

(!m_pTransferSocket->Connect(pData->host,pData->port))

{

Change History (1)

comment:1 by Alexander Schuch, 17 years ago

FileZilla 3 can be configured to use the external host address of a NAT'ed server if it returns its private/local address, or FileZilla 3 can fall back to active mode.

Closing this feature request as it has been implemented already.

Note: See TracTickets for help on using tickets.