FTP PORT command binds to localhost?

G

Guest

Hi,

Does anyone know why FTP.EXE in the windows command prompt is binding to
127.0.0.1 when issuing a PORT command on a remote FTP server on the Internet?
the FTP client doesn't support passive transfers so I need active FTP to
work. I can get it to work by using "ftp -a ftp.ftpserver.com" but I'd really
want to know why I suddenly need the "-a" switch.

When using my FTP client in Total Commander I can se in the log that it's
binding to my actual IP address and everything works fine...

Example1 using FTP.EXE without the -a switch:

"D:\Downloads>ftp -d ftp.sunet.se
Connected to ftp.sunet.se.
220 Welcome to ftp.sunet.se
User (ftp.sunet.se:(none)):
---> USER
331 Any password will work
Password:
---> PASS
230 Any password will work
ftp> ls
---> PORT 127,0,0,1,5,21
200 PORT command successful
---> NLST
150 Connecting to port 16716"

....and then nothing happens!

Example 2 using the FTP.EXE with the "-a" switch:

"D:\Downloads>ftp -d -a ftp.sunet.se
Connected to ftp.sunet.se.
220 Welcome to ftp.sunet.se
User (ftp.sunet.se:(none)):
---> USER
331 Any password will work
Password:
---> PASS
230 Any password will work
ftp> ls
---> PORT 0,0,0,0,5,207
200 PORT command successful
---> NLST
150 Connecting to port 16722
bin
dev
etc
lib
ls-lR
ls-lR.gz
pub
usr
226 8 matches total
ftp: 47 bytes received in 0,00Seconds 47000,00Kbytes/sec.
ftp>"

...this one works but it seems to bind to IP 0.0.0.0 .

Example 3 using TotalCommander FTP client:

"Connect to: (2006-05-10 19:23:39)
hostname=ftp.sunet.se
username=anonymous
startdir=
ftp.sunet.se=194.71.11.70
220 Welcome to ftp.sunet.se
USER anonymous
331 Any password will work
PASS ***********
230 Any password will work
SYST
215 UNIX Type: L8
FEAT
211-Extensions supported:
EPRT
IDLE
MDTM
SIZE
REST STREAM
MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
MLSD
TVFS
ESTP
PASV
EPSV
SPSV
ESTA
211 End.
Connect ok!
PWD
257 "/" is your current location
Get directory
TYPE A
200 TYPE is now ASCII
PORT 192,168,5,160,6,13
200 PORT command successful
LIST
150 Connecting to port 16732
Download
Waiting for server...
226-Options: -l
226 8 matches total"

Binding to my correct LAN IP address.

Is there any recently released windows security patch that causes this
behaviour of the FTP.EXE client ?

Thanks in advance for any input what so ever.
 
G

Guest

The fault is a config-error on the remote server.

When it sends the PORT command it's telling your client to connect to
127.0.0.1
 
G

Guest

I posted about a problem with ftp windows client titled "Bug in the Ftp
cleint ?".
It may be related to what you describe because it seems there is something
wrong in the port command. In my case the port command contains bad Ip or
port address and as a consequence the server resets the connection.
I start to think there is really something wrong in the ftp client.

Bye
Filippo
 
G

Guest

But in all of the 3 attempts above I'm connecting to the same server so why
is the PORT command working with the TotalCommander FTP client and not the
FTP.EXE client?

/T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top