Jump to content


Photo

FXP from IIS6 to FileZilla Server


  • Please log in to reply
7 replies to this topic

#1 Joshua Lyon

Joshua Lyon
  • Members
  • 5 posts

Posted 20 December 2007 - 06:24 PM

I'm trying to use SmartFTP to accommodate a transfer from one FTP server to another. The transfers will need to be able to go both ways as I have a development server and a production server running the same software. Essentially, I want to be able to copy files from the development server to the production server whenever I am done testing changes and feel they are ready to move to production. Also, in the case that I screw something up on the development server I want to be able to transfer working files back from the production server to the development.

Development Server:
Xampp for Windows 1.6.3a
-FileZilla Server 0.9.23 beta
Windows XP SP2

Production Server:
IIS6 with FTP component
-EnablePasvConnFrom3rdIP set to 1 in registry
-EnableDataConnTo3rdIP set to 1 in registry
Windows Server 2003 SP2

The following set of logs is me trying to transfer the file g2bridge.php from the production server to the development server. Let me know if there's any other details you need.
I should also note that these boxes are on the same network and are controlled by me so I can make any changes as necessary.

Log from Production Server (Source/Sending):
[12:21:04] PWD
[12:21:04] 257 "/components/com_comprofiler/plugin" is current directory.
[12:21:04] PASV
[12:21:04] 227 Entering Passive Mode (172,21,10,19,15,205).
[12:21:04] Opening data connection to 172.21.10.19 Port: 4045
[12:21:04] LIST -aL
[12:21:04] 125 Data connection already open; Transfer starting.
[12:21:04] 195 bytes transferred. (12.6 KB/s) (15 ms)
[12:21:04] 226 Transfer complete.
[12:21:05] CWD /components/com_comprofiler/plugin/user
[12:21:05] 250 CWD command successful.
[12:21:05] PWD
[12:21:05] 257 "/components/com_comprofiler/plugin/user" is current directory.
[12:21:05] PASV
[12:21:05] 227 Entering Passive Mode (172,21,10,19,15,206).
[12:21:05] Opening data connection to 172.21.10.19 Port: 4046
[12:21:05] LIST -aL
[12:21:05] 125 Data connection already open; Transfer starting.
[12:21:05] 978 bytes transferred. (63.6 KB/s) (15 ms)
[12:21:06] 226 Transfer complete.
[12:21:12] CWD /components/com_comprofiler/plugin/user/plug_g2bridge
[12:21:12] 250 CWD command successful.
[12:21:12] PWD
[12:21:12] 257 "/components/com_comprofiler/plugin/user/plug_g2bridge" is current directory.
[12:21:12] PASV
[12:21:12] 227 Entering Passive Mode (172,21,10,19,15,207).
[12:21:12] Opening data connection to 172.21.10.19 Port: 4047
[12:21:12] LIST -aL
[12:21:12] 125 Data connection already open; Transfer starting.
[12:21:12] 264 bytes transferred. (17.1 KB/s) (15 ms)
[12:21:12] 226 Transfer complete.
[12:21:30] TYPE I
[12:21:30] 200 Type set to I.
[12:21:30] SIZE g2bridge.php
[12:21:30] 213 13636
[12:21:30] MDTM g2bridge.php
[12:21:30] 213 20071219203110
[12:21:32] PASV
[12:21:32] 227 Entering Passive Mode (172,21,10,19,15,208).
[12:21:32] RETR g2bridge.php
[12:21:32] 426 Connection closed; transfer aborted.
[12:21:32] Transfer failed. Use the Transfer Queue for automatic retries.

Log From Development Server (Destination/Receiving)
[12:21:04] PWD
[12:21:04] 257 "/community/components/com_comprofiler/plugin" is current directory.
[12:21:04] PASV
[12:21:04] 227 Entering Passive Mode (172,21,101,114,5,48)
[12:21:04] Opening data connection to 172.21.101.114 Port: 1328
[12:21:04] MLSD
[12:21:04] 150 Connection accepted
[12:21:04] 226 Transfer OK
[12:21:04] 176 bytes transferred. (5.54 KB/s) (31 ms)
[12:21:06] CWD /community/components/com_comprofiler/plugin/user
[12:21:06] 250 CWD successful. "/community/components/com_comprofiler/plugin/user" is current directory.
[12:21:06] PWD
[12:21:06] 257 "/community/components/com_comprofiler/plugin/user" is current directory.
[12:21:06] PASV
[12:21:06] 227 Entering Passive Mode (172,21,101,114,5,49)
[12:21:06] Opening data connection to 172.21.101.114 Port: 1329
[12:21:06] MLSD
[12:21:06] 150 Connection accepted
[12:21:06] 226 Transfer OK
[12:21:06] 868 bytes transferred. (27.3 KB/s) (31 ms)
[12:21:12] CWD /community/components/com_comprofiler/plugin/user/plug_g2bridge
[12:21:13] 250 CWD successful. "/community/components/com_comprofiler/plugin/user/plug_g2bridge" is current directory.
[12:21:13] PWD
[12:21:13] 257 "/community/components/com_comprofiler/plugin/user/plug_g2bridge" is current directory.
[12:21:13] PASV
[12:21:13] 227 Entering Passive Mode (172,21,101,114,5,50)
[12:21:13] Opening data connection to 172.21.101.114 Port: 1330
[12:21:13] MLSD
[12:21:13] 150 Connection accepted
[12:21:13] 226 Transfer OK
[12:21:13] 331 bytes transferred. (10.4 KB/s) (31 ms)
[12:21:30] TYPE I
[12:21:30] 200 Type set to I
[12:21:30] SIZE g2bridge.php
[12:21:30] 213 0
[12:21:30] MDTM g2bridge.php
[12:21:30] 213 20071219203110
[12:21:30] No rule matched. Default Action="Ask".
[12:21:32] PORT 172,21,10,19,15,208
[12:21:32] 200 Port command successful
[12:21:32] STOR g2bridge.php
[12:21:32] 150 Opening data channel for file transfer.
[12:21:32] 226 Transfer OK
[12:21:32] ABOR
[12:21:32] MFMT 20071219203110 g2bridge.php
[12:21:32] 226 ABOR command successful
[12:21:32] 213 modify=20071219203110; /community/components/com_comprofiler/plugin/user/plug_g2bridge/g2bridge.php
[12:21:32] Transfer failed. Use the Transfer Queue for automatic retries.

Edited by Joshua Lyon, 20 December 2007 - 06:35 PM.


#2 mb

mb

    Developer

  • Administrators
  • 11520 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 20 December 2007 - 07:24 PM

Try the same thing with a professional FTP server software which has been proven to support FXP (e.g. http://www.g6ftpserver.com/)

Regards,
Mat

#3 Joshua Lyon

Joshua Lyon
  • Members
  • 5 posts

Posted 20 December 2007 - 11:12 PM

Try the same thing with a professional FTP server software which has been proven to support FXP (e.g. <a href="http://www.g6ftpserver.com/)" target="_blank">http://www.g6ftpserver.com/)</a>

Regards,
Mat

I disabled the Filezilla FTP Server service and installed IIS6 FTP with the same registry entries noted in my first post, but I still can't get it to work via SmartFTP. However, the first issue I ran into looked like it was due to permissions and I think I got that one under my belt (crosses fingers). I really don't want to add one more item to the bill (eg. G6FTP) so I'm trying to figure it out with the components that are available to me. The new error logs follow:

Source Server:
[17:10:42] SmartFTP v2.5.1008.16
[17:10:43] Resolving host name "dalis1.company.net"
[17:10:43] Connecting to 166.21.10.19 Port: 21
[17:10:43] Connected to dalis1.company.net.
[17:10:43] 220 Microsoft FTP Service
[17:10:43] USER company\jlyon
[17:10:43] 331 Password required for company\jlyon.
[17:10:43] PASS (hidden)
[17:10:43] 230 User company\jlyon logged in.
[17:10:43] SYST
[17:10:43] 215 Windows_NT
[17:10:43] Detected Server Type: Windows NT
[17:10:43] FEAT
[17:10:44] 211-FEAT
[17:10:44] SIZE
[17:10:44] MDTM
[17:10:44] 211 END
[17:10:44] TYPE I
[17:10:44] 200 Type set to I.
[17:10:44] REST 0
[17:10:44] 350 Restarting at 0.
[17:10:44] PWD
[17:10:44] 257 "/" is current directory.
[17:10:44] TYPE A
[17:10:44] 200 Type set to A.
[17:10:44] PASV
[17:10:44] 227 Entering Passive Mode (166,21,10,19,17,143).
[17:10:44] Opening data connection to 166.21.10.19 Port: 4495
[17:10:44] LIST -aL
[17:10:44] 125 Data connection already open; Transfer starting.
[17:10:44] 1762 bytes transferred. (55.5 KB/s) (31 ms)
[17:10:44] 226 Transfer complete.
[17:11:06] CWD /components
[17:11:06] 250 CWD command successful.
[17:11:06] PWD
[17:11:06] 257 "/components" is current directory.
[17:11:06] PASV
[17:11:06] 227 Entering Passive Mode (166,21,10,19,17,144).
[17:11:06] Opening data connection to 166.21.10.19 Port: 4496
[17:11:06] LIST -aL
[17:11:06] 125 Data connection already open; Transfer starting.
[17:11:06] 1784 bytes transferred. (37.8 KB/s) (46 ms)
[17:11:06] 226 Transfer complete.
[17:11:11] CWD /components/com_comprofiler
[17:11:11] 250 CWD command successful.
[17:11:11] PWD
[17:11:11] 257 "/components/com_comprofiler" is current directory.
[17:11:11] PASV
[17:11:11] 227 Entering Passive Mode (166,21,10,19,17,145).
[17:11:11] Opening data connection to 166.21.10.19 Port: 4497
[17:11:11] LIST -aL
[17:11:11] 125 Data connection already open; Transfer starting.
[17:11:11] 305 bytes transferred. (19.8 KB/s) (15 ms)
[17:11:12] 226 Transfer complete.
[17:11:14] CWD /components/com_comprofiler/plugin
[17:11:14] 250 CWD command successful.
[17:11:14] PWD
[17:11:14] 257 "/components/com_comprofiler/plugin" is current directory.
[17:11:14] PASV
[17:11:14] 227 Entering Passive Mode (166,21,10,19,17,146).
[17:11:14] Opening data connection to 166.21.10.19 Port: 4498
[17:11:14] LIST -aL
[17:11:14] 125 Data connection already open; Transfer starting.
[17:11:14] 195 bytes transferred. (12.6 KB/s) (15 ms)
[17:11:14] 226 Transfer complete.
[17:11:15] CWD /components/com_comprofiler/plugin/user
[17:11:15] 250 CWD command successful.
[17:11:15] PWD
[17:11:15] 257 "/components/com_comprofiler/plugin/user" is current directory.
[17:11:15] PASV
[17:11:15] 227 Entering Passive Mode (166,21,10,19,17,147).
[17:11:15] Opening data connection to 166.21.10.19 Port: 4499
[17:11:15] LIST -aL
[17:11:15] 125 Data connection already open; Transfer starting.
[17:11:15] 978 bytes transferred. (63.6 KB/s) (15 ms)
[17:11:15] 226 Transfer complete.
[17:11:19] CWD /components/com_comprofiler/plugin/user/plug_g2bridge
[17:11:19] 250 CWD command successful.
[17:11:19] PWD
[17:11:19] 257 "/components/com_comprofiler/plugin/user/plug_g2bridge" is current directory.
[17:11:19] PASV
[17:11:19] 227 Entering Passive Mode (166,21,10,19,17,148).
[17:11:19] Opening data connection to 166.21.10.19 Port: 4500
[17:11:19] LIST -aL
[17:11:19] 125 Data connection already open; Transfer starting.
[17:11:19] 264 bytes transferred. (17.1 KB/s) (15 ms)
[17:11:19] 226 Transfer complete.
[17:11:26] TYPE I
[17:11:26] 200 Type set to I.
[17:11:26] SIZE g2bridge.php
[17:11:26] 213 13636
[17:11:26] MDTM g2bridge.php
[17:11:26] 213 20071219203110
[17:11:28] PASV
[17:11:28] 227 Entering Passive Mode (166,21,10,19,17,149).
[17:11:28] Transfer failed. Use the Transfer Queue for automatic retries.

Destination Server:
[17:10:58] SmartFTP v2.5.1008.16
[17:10:58] Resolving host name "kp-37kx3.company.net"
[17:10:58] Connecting to 166.21.101.114 Port: 21
[17:10:58] Connected to kp-37kx3.company.net.
[17:10:58] 220 Microsoft FTP Service
[17:10:58] USER company\jlyon
[17:10:58] 331 Password required for company\jlyon.
[17:10:58] PASS (hidden)
[17:10:58] 230 User company\jlyon logged in.
[17:10:58] SYST
[17:10:58] 215 Windows_NT
[17:10:58] Detected Server Type: Windows NT
[17:10:58] FEAT
[17:10:58] 500 'FEAT': command not understood
[17:10:58] TYPE I
[17:10:58] 200 Type set to I.
[17:10:58] REST 0
[17:10:58] 350 Restarting at 0.
[17:10:58] PWD
[17:10:58] 257 "/" is current directory.
[17:10:59] TYPE A
[17:10:59] 200 Type set to A.
[17:10:59] PASV
[17:10:59] 227 Entering Passive Mode (166,21,101,114,7,113).
[17:10:59] Opening data connection to 166.21.101.114 Port: 1905
[17:10:59] LIST -aL
[17:10:59] 125 Data connection already open; Transfer starting.
[17:10:59] 1197 bytes transferred. (77.9 KB/s) (15 ms)
[17:10:59] 226 Transfer complete.
[17:11:02] CWD /community
[17:11:02] 250 CWD command successful.
[17:11:02] PWD
[17:11:02] 257 "/community" is current directory.
[17:11:02] PASV
[17:11:02] 227 Entering Passive Mode (166,21,101,114,7,114).
[17:11:02] Opening data connection to 166.21.101.114 Port: 1906
[17:11:02] LIST -aL
[17:11:02] 125 Data connection already open; Transfer starting.
[17:11:02] 1811 bytes transferred. (57.0 KB/s) (31 ms)
[17:11:02] 226 Transfer complete.
[17:11:07] CWD /community/components
[17:11:07] 250 CWD command successful.
[17:11:07] PWD
[17:11:07] 257 "/community/components" is current directory.
[17:11:07] PASV
[17:11:07] 227 Entering Passive Mode (166,21,101,114,7,115).
[17:11:07] Opening data connection to 166.21.101.114 Port: 1907
[17:11:07] LIST -aL
[17:11:07] 125 Data connection already open; Transfer starting.
[17:11:07] 1729 bytes transferred. (54.4 KB/s) (31 ms)
[17:11:07] 226 Transfer complete.
[17:11:12] CWD /community/components/com_comprofiler
[17:11:12] 250 CWD command successful.
[17:11:12] PWD
[17:11:12] 257 "/community/components/com_comprofiler" is current directory.
[17:11:12] PASV
[17:11:12] 227 Entering Passive Mode (166,21,101,114,7,116).
[17:11:12] Opening data connection to 166.21.101.114 Port: 1908
[17:11:12] LIST -aL
[17:11:12] 125 Data connection already open; Transfer starting.
[17:11:12] 305 bytes transferred. (19.8 KB/s) (15 ms)
[17:11:12] 226 Transfer complete.
[17:11:14] CWD /community/components/com_comprofiler/plugin
[17:11:14] 250 CWD command successful.
[17:11:14] PWD
[17:11:14] 257 "/community/components/com_comprofiler/plugin" is current directory.
[17:11:14] PASV
[17:11:14] 227 Entering Passive Mode (166,21,101,114,7,117).
[17:11:14] Opening data connection to 166.21.101.114 Port: 1909
[17:11:14] LIST -aL
[17:11:14] 125 Data connection already open; Transfer starting.
[17:11:14] 195 bytes transferred. (12.6 KB/s) (15 ms)
[17:11:14] 226 Transfer complete.
[17:11:15] CWD /community/components/com_comprofiler/plugin/user
[17:11:15] 250 CWD command successful.
[17:11:15] PWD
[17:11:15] 257 "/community/components/com_comprofiler/plugin/user" is current directory.
[17:11:15] PASV
[17:11:15] 227 Entering Passive Mode (166,21,101,114,7,118).
[17:11:15] Opening data connection to 166.21.101.114 Port: 1910
[17:11:15] LIST -aL
[17:11:15] 125 Data connection already open; Transfer starting.
[17:11:15] 978 bytes transferred. (63.6 KB/s) (15 ms)
[17:11:16] 226 Transfer complete.
[17:11:19] CWD /community/components/com_comprofiler/plugin/user/plug_g2bridge
[17:11:19] 250 CWD command successful.
[17:11:20] PWD
[17:11:20] 257 "/community/components/com_comprofiler/plugin/user/plug_g2bridge" is current directory.
[17:11:20] PASV
[17:11:20] 227 Entering Passive Mode (166,21,101,114,7,119).
[17:11:20] Opening data connection to 166.21.101.114 Port: 1911
[17:11:20] LIST -aL
[17:11:20] 125 Data connection already open; Transfer starting.
[17:11:20] 322 bytes transferred. (10.1 KB/s) (31 ms)
[17:11:20] 226 Transfer complete.
[17:11:26] TYPE I
[17:11:26] 200 Type set to I.
[17:11:26] SIZE g2bridge.php
[17:11:26] 213 0
[17:11:26] MDTM g2bridge.php
[17:11:26] 213 20071219203110
[17:11:26] No rule matched. Default Action="Ask".
[17:11:28] PORT 166,21,10,19,17,149
[17:11:28] 500 Invalid PORT Command.
[17:11:28] MDTM 20071219203110 g2bridge.php
[17:11:28] 550 20071219203110 g2bridge.php: The system cannot find the file specified.
[17:11:28] Transfer failed. Use the Transfer Queue for automatic retries.


Notice now the issue is:
[17:11:26] No rule matched. Default Action="Ask".
[17:11:28] PORT 166,21,10,19,17,149
[17:11:28] 500 Invalid PORT Command.
[17:11:28] MDTM 20071219203110 g2bridge.php
[17:11:28] 550 20071219203110 g2bridge.php: The system cannot find the file specified.

Am I better off or worse off than I was before. ;)

Edited by Joshua Lyon, 21 December 2007 - 12:05 AM.


#4 Joshua Lyon

Joshua Lyon
  • Members
  • 5 posts

Posted 20 December 2007 - 11:14 PM

I should also mention that we are going to purchase SmartFTP assuming we can get this going.

#5 mb

mb

    Developer

  • Administrators
  • 11520 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 20 December 2007 - 11:49 PM

Hello ..

It seems IIS doesn't like the foreign IP in the PORT command. That's the reason you get the following message:
[17:11:28] PORT 172,21,10,19,17,149
[17:11:28] 500 Invalid PORT Command.

I really cannot recommend the IIS FTP server. Beside the known problems with FXP it only offers very basic FTP functionality. For example it does not support secured FTP connections (FTP over TLS), integrity functions (XMD5, etc) or a function to set the file time of a remote file. The two latter features are critical for reliable file transfers in my opinion.

Mat

#6 Joshua Lyon

Joshua Lyon
  • Members
  • 5 posts

Posted 20 December 2007 - 11:51 PM

I should also mention that we are going to purchase SmartFTP assuming we can get this going.

I did the 'fix' noted here, but still nothing:
<a href="http://support.microsoft.com/?scid=kb;en...p;x=11&y=15" target="_blank">http://support.microsoft.com/?scid=kb;en...p;x=11&y=15</a>

I should also clarify what I said earlier about the servers being on the same network. The boxes are both on the same intranet, but are in separate locations behind different routers in two different offices.

And Microsoft's explanation to the issue:

CAUSE
After a client initiates an FTP session, the server establishes a new back connection to the client. This connection extends from the server (outside the firewall boundaries) to a dynamically allocated port number on the client computer. Because the port number is not known in advance, old packet filters open the entire range of high-numbered ports (greater than 1023) for incoming connections. This reconnection at a higher port is done with the following FTP command:
port h1, h2, h3, h4, p1, p2
The values of h1 through h4 are octets of the client IP address. The last two values of p1, and p2 are used to determine the port. The following formula is for p1, and p2:
p1 X 256 + p2 = port

RESOLUTION
If the Firewall Network Address Translation (NAT) does not correctly change this IP address (h1 through h4), the server generates the error message (noted in the "Symptoms" section of this article) on the command.

This problem is more likely to manifest when the FTP server changes from listening on port 21 to another, higher port.


Edited by Joshua Lyon, 21 December 2007 - 12:00 AM.


#7 mb

mb

    Developer

  • Administrators
  • 11520 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 21 December 2007 - 12:17 AM

Did you enable the following two settings on both servers?
-EnablePasvConnFrom3rdIP set to 1 in registry
-EnableDataConnTo3rdIP set to 1 in registry

I would give Gene FTP Server a try. If it works you know at least that the problem is with IIS 6.

To prevent the rewriting of the IP address of the PORT/PASV command by your NAT router use a secured (FTP over SSL - Explicit) connection. This way the NAT router is unable to read the communcation and therefore cannot rewrite the IP address. IIS FTP 6.0 does not support secured connections.

Regards,
Mat

#8 Joshua Lyon

Joshua Lyon
  • Members
  • 5 posts

Posted 21 December 2007 - 04:07 PM

Did you enable the following two settings on both servers?
-EnablePasvConnFrom3rdIP set to 1 in registry
-EnableDataConnTo3rdIP set to 1 in registry

I would give Gene FTP Server a try. If it works you know at least that the problem is with IIS 6.

To prevent the rewriting of the IP address of the PORT/PASV command by your NAT router use a secured (FTP over SSL - Explicit) connection. This way the NAT router is unable to read the communcation and therefore cannot rewrite the IP address. IIS FTP 6.0 does not support secured connections.

Regards,
Mat


Yes, as noted in my posts I've added those two entries to the registry on both machines. The KB article doesn't describe what type of entry to add those as though, so I added them as REG_DWORD values.

I figured I would try G6 just to test out the SSL idea.

For the time being, I've just setup a network share to the appropriate directories on each server locked down to the proper network group.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users