FTP site-to-site transfer - Please help.

Moderator: Project members

Post Reply
Message
Author
Preets
500 Command not understood
Posts: 4
Joined: 2005-12-17 09:11

FTP site-to-site transfer - Please help.

#1 Post by Preets » 2005-12-22 06:33

Hi Everyone,

I m having a problem related to remote site-to-site FTP transfer.

Following is the set of commands which is giving problem and i have been unable to trace out the solution for.

Set of FTP commands for FTP Site-to-Site Transfer
--------------------------------------------------

This problem is related to establishing two simultaneous FTP server connections from the user(or client) m/c and then performing direct file transfer between the two remote FTP servers without performing any transfers to the local m/c.
Refer »www.ietf.org/rfc/rfc959.txt (Figure 3)

1. Open 2 command line interfaces - 1 and 2.

In 1, at prompt give-
C:\ftp

In 2, at prompt give-
C:\ftp

2. For Command line window 1
-------------------------------

In 1, at ftp prompt, give-

ftp> open x1.x2.x3.x3

you get the following response-
connected to x1.x2.x3.x3
220 Welcome

then you are asked for id and password, which you should provide-
User (x1.x2.x3.x3: (none)): user1
331 Please specify the password.
Password: password1
230 Login successful.

then at ftp prompt give,
ftp> literal
you get the response as-
Command line to send
here give-

Command line to send pasv
it gives the response as-
227 Entering Passive Mode (x1,x2,x3,x4,p1,p2)
ftp>

2. For Command Line window 2
------------------------------

In 2, at ftp prompt, give-

ftp> open y1.y2.y3.y4

you get the following response-
connected to y1.y2.y3.y4
220 Welcome

then you are asked for id and password, which you should provide-
User (y1.y2.y3.y4: (none)): user2
331 Please specify the password.
Password: password2
230 Login successful.

then at ftp prompt give,
ftp> literal
you get the response as-
Command line to send
here give-

Command line to send port x1,x2,x3,x4,p1,p2

The problem is that it does not execute this command. It always says-
500 Invalid PORT command

This inspite that according to RFC 959 ("http://www.ietf.org/rfc/rfc959.txt"), it should execute this command. Earlier i executed this set of commands on 2 remote servers and it gave "500 Invalid PORT command". I searched on the internet and found that the problem might be because of the firewalls which are blocking it.
www.adminlife.com/247reference/m···479.aspx
»www.cert.org/advisories/CA-1997-27.html)

Then i tested this set of commands on LAN FTP servers which would not have any firewalls between them. Still, on execution it gave the same problem, "500 Invalid PORT command".

I need to know why this command is failing to execute.

Can someone help ??

Thanks in advance.

-Me.


------------------------------------------------------------------------
------------------------------------------------------------------------

Here is the debug log.
Hope this gives an idea about the problem.

Command Line 1
--------------------------

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\>ftp -d
ftp> open y1.y2.230.218
Connected to y1.y2.230.218.
220 ABCD Server Microsoft FTP Service (Version 5.0).
User (y1.y2.230.218: (none)): user1
---> USER user1
331 Password required for user1.
Password:
---> PASS pwd1
230-This FTP Site for authorized use only. If you do not have expressed written
consent from ABCD Server to use this site, then exit the site now.
All unauthorized use of this site will be prosecuted to the fullest extent of t
he law.
230 User user1 logged in.
ftp> literal
Command line to send pasv
---> pasv
227 Entering Passive Mode (y1,y2,230,218,15,168)
ftp>

Command Line 2
--------------------------

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\>ftp -d
ftp> open x1.x2.193.199
Connected to x1.x2.193.199.
220 Welcome to PQRST FTP service. Transfers are logged. Authorized use only.
User (x1.x2.193.199: (none)): user2
---> USER user2
331 Please specify the password.
Password:
---> PASS pwd2
230 Login successful. Have fun.
ftp> quote
Command line to send port y1,y2,230,218,15,168
---> port y1,y2,230,218,15,168
500 Invalid PORT command.
ftp>

----------------------------------------------

At this point it gets stuck.
Looking forward to some help n suggestions from u people.

User avatar
botg
Site Admin
Posts: 35547
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

#2 Post by botg » 2005-12-22 07:55

Some servers block PORT requests if the provided IP address does not match with the IP address of the connected client to block server-to-server transfers and bounce attacks.

Post Reply