Problem with establishing FTP connection

English support forum

Moderators: Hacker, petermad, Stefan2, white

Anita
Junior Member
Junior Member
Posts: 11
Joined: 2004-02-25, 16:36 UTC
Location: Poland

Problem with establishing FTP connection

Post by *Anita »

I'm trying to connect with my server, but no matter weather I use the passive or active mode I cannot connect an receive a message:

"Port cmd failed"
"500 Illegal port cmd"

What is even more wierd about this:
I'm connected via a tv cable, what is qiute popular in my city. I have asked many of my friends to try to connect to my FTP (they have the same cable operator, same os) and they did not come across any problems.

What is wrong?
Regards...
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

In modem ?

Post by *Clo »

:) Hello, welcome!

• Just an idea: maybe something is wrong in your cable-modem configuration?

• You might check this, and compare with your friend's one, where that works...

:mrgreen:  Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Anita
Junior Member
Junior Member
Posts: 11
Joined: 2004-02-25, 16:36 UTC
Location: Poland

Post by *Anita »

Rather impossible - the configuration is settled once you buy an internet connection - a guy from the company does this and its the same for everyone in this cable network...

I thought they could be blocking some ports (like mine) but they said they don't block any.
Regards...
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

2Anita
well, as far as i know, the state code 500 is sent from the server... so TC could establish a connection that far.
Did you try another ftp program? with success? Is the message you posted in the ftp connection window of TC or is it a messagebox? It could be useful to give us as much information as possible ;)

So far.
CoolWater
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Log-file---

Post by *Clo »

2Anita
• Like CoolWater told, more infos are needed... A suggestion: please, go to Configuration >>> Options >>> FTP, and tick the box "Create a log-file". You have to fill the field about such a file name and location.

• Then, try again to connect via FTP. Copy the result in the log-file, and please give it to us here (rather as "code"); hide the private infos as "xxxx", for instance.

• Other : maybe there is a firewall coming with your cable-modem ???
If there is one, you might take care of it in your TC-FTP connection configuration.
¤ To continue…
:mrgreen: Glad to hear more, kind regards,
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50505
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Anita
You are probably behind a provider proxy server. Try using passive mode for FTP:

You can set it via Ctrl+F - Edit connection.
Author of Total Commander
https://www.ghisler.com
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

2Ghisler
well, if i got her right, she already tried that :oops:

CoolWater
Anita
Junior Member
Junior Member
Posts: 11
Joined: 2004-02-25, 16:36 UTC
Location: Poland

Post by *Anita »

2 @ll :)

Yup...tried passive mode several times :)

Also tried other programs (coffeeFTP) with identical result :(((

Here's the what the log says (long one):

Connect to: (2004-02-26 21:34:48)
hostname=ftp.twojepc.pl
username=anitka
startdir=
ftp.twojepc.pl=213.77.7.6
220 ProFTPD 1.2.9 Server (Twojepc.pl) [twojepc.pl]
USER anitka
331 Password required for anitka.
PASS ***********
230 User anitka logged in.
SYST
215 UNIX Type: L8
FEAT
211-Features:
211-MDTM
211-REST STREAM
211-SIZE
211 End
Connect ok!
PWD
257 "/home/users/anitka" is current directory.
Pobierz katalog
TYPE A
200 Type set to A
PASV
227 Entering Passive Mode (213,77,7,6,223,17).
PORT 10,72,8,191,13,140
500 Illegal PORT command
QUIT
221 Goodbye.

hope I got the thing you wanted :-)
Regards...
Anita
Junior Member
Junior Member
Posts: 11
Joined: 2004-02-25, 16:36 UTC
Location: Poland

Post by *Anita »

2 Clo

I have one idea what might be the problem... I've got a private IP number and my internet provider attaches some additional firewalls to such numbers (they said so). Do you think switching into a public IP will do the thing?
Regards...
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Please, try---

Post by *Clo »

:D  Hello Anita,

• Just to compare, please watch below what is sent at home for a FTP connection:

Code: Select all

PASV
227 Entering Passive Mode (213,186,33,11,6,229)
LIST
150 Data connection accepted from xx.xxx.xxx.xxx:1052; transfer starting.
• Could you try to check the configuration of this connection, and change in order to get the LIST command in first like above ?

• In anyway, there is an error - maybe from the guy who installed the system-, nobody is infallible "Errare humanum est..." :wink:
- You might ask for a control to your provider's support...

To be continued…
:mrgreen:  Kind regards,
Claude
Clo
[/b]
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50505
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Anita wrote:PASV
227 Entering Passive Mode (213,77,7,6,223,17).
PORT 10,72,8,191,13,140
500 Illegal PORT command
Hmm, why is the FTP client sending both PASV and PORT? This isn't normal at all, it means that it thinks that the passive mode failed. I guess that the ftp client tried to connect to the passive port, but this failed. Is the IP address shown (213.77.7.6) the same as the address of the FTP server?
Author of Total Commander
https://www.ghisler.com
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

LIST -la ?

Post by *Clo »

2ghisler(Author)
Good morning,
• Both addresses match :

ftp.twojepc.pl=213.77.7.6
......
227 Entering Passive Mode (213,77,7,6,223,17).

• Maybe the last numbers (as bold) in "Passive Mode" are wrong ?
• Also, what about enable "Show hidden files" in the Net menu, to get the LIST -la command ? (it's just an idea, maybe stupid... ) ?

:mrgreen: Best regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
IGL
Member
Member
Posts: 179
Joined: 2004-02-26, 10:47 UTC
Location: Poland

Deeper look into this FTP connection

Post by *IGL »

Anita wrote:PASV
227 Entering Passive Mode (213,77,7,6,223,17).
PORT 10,72,8,191,13,140
500 Illegal PORT command
2All those who want to take a deeper loog - I have performed some testing.

Dear Mr Ghisler, I am honoured to help in this topic that has brought your attention. (I am a newcomer joining the TC forum :) )

I have connected to that FTP server as anonymous, I have both
PASV and PORT command and it works correctly. I am able to receive files.

RFC in this matter says:
" Negotiating Non-Default Data Ports: The User-PI may specify a
non-default user side data port with the PORT command. The
User-PI may request the server side to identify a non-default
server side data port with the PASV command. Since a connection
is defined by the pair of addresses, either of these actions is
enough to get a different data connection, still it is permitted
to do both commands to use new ports on both ends of the data
connection. "

Here is the crucial part of FTP logs:
PASV
227 Entering Passive Mode (213,77,7,6,235,2).
PORT 192,168,1,20,13,105
200 PORT command successful
LIST
150 Opening ASCII mode data connection for file list
Download
Waiting for server...
226 Transfer complete.

> 227 Entering Passive Mode (213,77,7,6,235,2).
213.77.7.6 is FTP server IP. 235,2 define port (253*256+2)
I am investigating this further using a corporate firewall.
> PORT 192,168,1,20,13,105
My computer's IP is 192.168.1.20 and 13*256+105 is port on my computer:

Furthermore, I have tried to: telnet 213.77.7.6 21
and I have typed all commands manually and after PASV, I typed
PORT 10,72,8,191,13,140
And it was accepted! 200 PORT command successful

Therefore server seems to work fine.
To sum up - target FTP server seems to work fine.
Maybe Anita should try to connect to other FTP servers to see if any FTP works or try to log-in as anonymous?

-- detailed log of my successful connection (for those who want to read it):
//If my mail is too long, tell me not to put such things.

[face=courier]
ftp.twojepc.pl=213.77.7.6
220 ProFTPD 1.2.9 Server (Twojepc.pl) [twojepc.pl]
USER anonymous
331 Anonymous login ok, send your complete email address as your password.
PASS ***********
230-Welcome, archive user anonymous@x.x.x !
230-
230-The local time is: Fri Feb 27 10:47:09 2004
230-
230-This is an experimental FTP server. If have any unusual problems,
230-please report them via e-mail to <root@twojepc.twojepc.pl>.
230-
230 Anonymous access granted, restrictions apply.
SYST
215 UNIX Type: L8
FEAT
211-Features:
211-MDTM
211-REST STREAM
211-SIZE
211 End
Connect ok!
PWD
257 "/" is current directory.
Get directory
TYPE A
200 Type set to A
PASV
227 Entering Passive Mode (213,77,7,6,235,2).
PORT 192,168,1,20,13,105
200 PORT command successful
LIST
150 Opening ASCII mode data connection for file list
Download
Waiting for server...
226 Transfer complete.
TYPE I
200 Type set to I
PORT 192,168,1,20,13,106
200 PORT command successful
RETR welcome.msg
150 Opening BINARY mode data connection for welcome.msg (166 bytes)
Download
Waiting for server...
226 Transfer complete.
Copied (2004-02-27 10:48:23): ftp://ftp.twojepc.pl//welcome.msg -> C:\DOCUME~1\Temp\_tc\welcome.msg 166 bytes, 2.0 kbytes/s
[/face]
:-)
IGL
Member
Member
Posts: 179
Joined: 2004-02-26, 10:47 UTC
Location: Poland

Suggestions for Anita

Post by *IGL »

2Anita
Anita, try to connect to other FTP servers (using non-passive and passive mode) to see if any FTP works or try to log-in as anonymous to your FTP:
ftp.twojepc.pl.
Anonymous login is restricted to up to 10 users so it may not always work, but you will receive information that there are too many users (NOT the message 500 Port command failed.)

Additionally - do you have any Personal Firewall? Try to disable it temporarily.
:-)
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Test @ home---

Post by *Clo »

>>> Anita
>>> IGL

:)  Hello again,
I tested a connection to that server from my home as "anonymous", it works ! Below, the full logs:

Code: Select all

Connect to: (27/02/2004 12:55:40)
hostname=ftp.twojepc.pl
username=anonymous
startdir=
ftp.twojepc.pl=213.77.7.6
220 ProFTPD 1.2.9 Server (Twojepc.pl) [twojepc.pl]
USER anonymous
331 Anonymous login ok, send your complete email address as your password.
PASS ***********
230-Welcome, archive user anonymous@ABordeaux-204-1-5-243.w81-51.abo.wanadoo.fr !
230-
230-The local time is: Fri Feb 27 12:57:27 2004
230-
230-This is an experimental FTP server.  If have any unusual problems,
230-please report them via e-mail to <root@twojepc.twojepc.pl>.
230-
230 Anonymous access granted, restrictions apply.
SYST
215 UNIX Type: L8
FEAT
211-Features:
211-MDTM
211-REST STREAM
211-SIZE
211 End
Connect ok!
PWD
257 "/" is current directory.
Lire le répertoire (read the directory)
TYPE A
200 Type set to A
PASV
227 Entering Passive Mode (213,77,7,6,238,35).
PORT 81,51,221,243,16,96
200 PORT command successful
LIST
150 Opening ASCII mode data connection for file list
Téléchargé(s) (Downloaded)
En attente du serveur... (Waiting for the server...)
226 Transfer complete.
TYPE I
200 Type set to I
PORT 81,51,221,243,16,97
200 PORT command successful
RETR welcome.msg
150 Opening BINARY mode data connection for welcome.msg (166 bytes)
Téléchargé(s)
En attente du serveur...
226 Transfer complete.
Copied (27/02/2004 12:57:08): ftp://ftp.twojepc.pl//welcome.msg -> C:\A6\welcome.msg 166 bytes, 1.0 kbytes/s
HELP
214-The following commands are recognized (* =>'s unimplemented).
214-USER    PASS    ACCT*   CWD     XCWD    CDUP    XCUP    SMNT*   
214-QUIT    REIN*   PORT    PASV    EPRT    EPSV    TYPE    STRU    
214-MODE    RETR    STOR    STOU    APPE    ALLO*   REST    RNFR    
214-RNTO    ABOR    DELE    MDTM    RMD     XRMD    MKD     XMKD    
214-PWD     XPWD    SIZE    LIST    NLST    SITE    SYST    STAT    
214-HELP    NOOP    FEAT    OPTS    ADAT*   AUTH*   CCC*    CONF*   
214-ENC*    MIC*    PBSZ*   PROT*   
214 Direct comments to root@twojepc.twojepc.pl.
NOOP
200 NOOP command successful
QUIT
221 Goodbye.
• I typed "HELP" by hand, to get the allowed commands...
• TC sends both passive mode and PORT ...

• Hoping this'll help,
:mrgreen: Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Post Reply