djrud
Hi,
I'm setting up an FXP transfer. I set up the source server as follows in VB.NET:
Setup:
objFTP.Host = "ftp.test.com
objFTP.Port = "4000"
objFTP.Protocol = enumProtocol.ftpProtocolNormal
objFTP.Username = "test"
objFTP.Password = "test"
objFTP.MLST = False
objFTP.Passive = False
objFTP.LogFile = "c:testFTPSource.log"
Connection:
objFTP.Connect()
objFTP.ChangeDirectory("/TEST")
objFTP.ReadDirectory()
So, I can connect to the server and change directory without any problem, but when I try to read the directory, the log shows the following error message:
[20050413 02:01:28] PORT 10,0,0,150,10,136
[20050413 02:01:28] 501- ==YOU'RE BEHIND A NAT ROUTER==
[20050413 02:01:28] 501- Configure the firewall settings of your FTP client
[20050413 02:01:28] 501- to use your real IP: x.x.x.x (My real IP here)
[20050413 02:01:28] 501- And set up port forwarding in your router.
[20050413 02:01:28] 501- Or you can just use a PRET capable client
I'm indeed behind a NAT router. So I added the following lines to my code:
objFTP.PortMode = enumPortMode.ftpPortModeManual
objFTP.PortIP = "x.x.x.x" (My real IP here)
Still I can connect and change the directory, but when trying to read the directory, this error message:
[20050413 02:04:19] PORT x,x,x,x,10,138 (My real IP here)
[20050413 02:04:20] 200 Command okay
[20050413 02:04:20] LIST
[20050413 02:04:20] 150 File status okay; about to open data connection.
[20050413 02:04:50] Transfer Timeout. Closing data connection.
[20050413 02:05:20] Timeout (30s).
[20050413 02:05:20] Client closed the connection.
In most FTP clients (GUI), I just enable 'PRET Support' and everything works fine. Those logs show something like this:
[2] 250 Directory changed to /TEST
[2] PWD
[2] 257 "/TEST" is current directory
[2] PRET LIST
[2] 200 OK, will use master for upcoming transfer
[2] PASV
[2] 227 Entering Passive Mode (x,x,x,x,239,47). (Servers IP here)
[2] Opening data connection IP: x.x.x.x PORT: 4000
[2] LIST
[2] 150 File status okay; about to open data connection.
[2] 226 Closing data connection
[2] List Complete: 350 bytes in 0,31 seconds (1,12KB/s)
I tried all kind of settings but I can't get directory reading working with the smartFTP FTP Library dll on my PC behind NAT. I even tried to send the RAW command 'PRET LIST' to the server just before trying to read the directory, but still I got error messages.
Anybody can help or direct me to a solution?
Thx,
djrud
I'm setting up an FXP transfer. I set up the source server as follows in VB.NET:
Setup:
objFTP.Host = "ftp.test.com
objFTP.Port = "4000"
objFTP.Protocol = enumProtocol.ftpProtocolNormal
objFTP.Username = "test"
objFTP.Password = "test"
objFTP.MLST = False
objFTP.Passive = False
objFTP.LogFile = "c:testFTPSource.log"
Connection:
objFTP.Connect()
objFTP.ChangeDirectory("/TEST")
objFTP.ReadDirectory()
So, I can connect to the server and change directory without any problem, but when I try to read the directory, the log shows the following error message:
[20050413 02:01:28] PORT 10,0,0,150,10,136
[20050413 02:01:28] 501- ==YOU'RE BEHIND A NAT ROUTER==
[20050413 02:01:28] 501- Configure the firewall settings of your FTP client
[20050413 02:01:28] 501- to use your real IP: x.x.x.x (My real IP here)
[20050413 02:01:28] 501- And set up port forwarding in your router.
[20050413 02:01:28] 501- Or you can just use a PRET capable client
I'm indeed behind a NAT router. So I added the following lines to my code:
objFTP.PortMode = enumPortMode.ftpPortModeManual
objFTP.PortIP = "x.x.x.x" (My real IP here)
Still I can connect and change the directory, but when trying to read the directory, this error message:
[20050413 02:04:19] PORT x,x,x,x,10,138 (My real IP here)
[20050413 02:04:20] 200 Command okay
[20050413 02:04:20] LIST
[20050413 02:04:20] 150 File status okay; about to open data connection.
[20050413 02:04:50] Transfer Timeout. Closing data connection.
[20050413 02:05:20] Timeout (30s).
[20050413 02:05:20] Client closed the connection.
In most FTP clients (GUI), I just enable 'PRET Support' and everything works fine. Those logs show something like this:
[2] 250 Directory changed to /TEST
[2] PWD
[2] 257 "/TEST" is current directory
[2] PRET LIST
[2] 200 OK, will use master for upcoming transfer
[2] PASV
[2] 227 Entering Passive Mode (x,x,x,x,239,47). (Servers IP here)
[2] Opening data connection IP: x.x.x.x PORT: 4000
[2] LIST
[2] 150 File status okay; about to open data connection.
[2] 226 Closing data connection
[2] List Complete: 350 bytes in 0,31 seconds (1,12KB/s)
I tried all kind of settings but I can't get directory reading working with the smartFTP FTP Library dll on my PC behind NAT. I even tried to send the RAW command 'PRET LIST' to the server just before trying to read the directory, but still I got error messages.
Anybody can help or direct me to a solution?
Thx,
djrud