NeoRouter
http://www.neorouter.com/forum/

Fail FTP
http://www.neorouter.com/forum/viewtopic.php?f=8&t=4417
Page 1 of 1

Author:  natetk [ Thu Oct 21, 2010 9:26 pm ]
Post subject:  Fail FTP

Ok using NeoRouter version 1.1.3.2260 on my Droidx.

Using AndFTP it connects to my ftp server then after:
250 CWD successful "/" is current directory.
SYST
215 UNIX emulated by FileZilla
PASV
227 Entering Passive MODE(10,0,0,1,194,107)

It then stop and after about 15 seconds it says The operation timed out.

I can use VNC to connect to my pc no problem using neorouter, but not any FTP program.

If I just use WiFi mode on phone and connect to my pc's local ip given by my router it works.

So with WiFi on, and using FTP through my lan, the connection is accepted but using ftp with neorouter it isn't.

(edit)
Looking at FileZilla Server interface it shows this:

(000052)10/21/2010 22:49:51 - natetk (10.0.0.2)> 230 Logged on
(000052)10/21/2010 22:49:51 - natetk (10.0.0.2)> PWD
(000052)10/21/2010 22:49:51 - natetk (10.0.0.2)> 257 "/" is current directory.
(000052)10/21/2010 22:49:52 - natetk (10.0.0.2)> NOOP
(000052)10/21/2010 22:49:52 - natetk (10.0.0.2)> 200 OK
(000052)10/21/2010 22:49:52 - natetk (10.0.0.2)> CWD /
(000052)10/21/2010 22:49:52 - natetk (10.0.0.2)> 250 CWD successful. "/" is current directory.
(000052)10/21/2010 22:49:52 - natetk (10.0.0.2)> SYST
(000052)10/21/2010 22:49:52 - natetk (10.0.0.2)> 215 UNIX emulated by FileZilla
(000052)10/21/2010 22:49:52 - natetk (10.0.0.2)> PASV
(000052)10/21/2010 22:49:52 - natetk (10.0.0.2)> 227 Entering Passive Mode (10,0,0,1,195,253)
(000052)10/21/2010 22:50:22 - natetk (10.0.0.2)> disconnected.

so it shows me connectected with 10.0.0.2 like it should but it disconnects me for some reason after it just sits there trying to get list

Author:  kevinz [ Fri Oct 22, 2010 9:03 am ]
Post subject:  Re: Fail FTP

Hi natetk,

You may want to add another the static port forward item to provide the data tunnel for the FTP client.

FTP uses 2 tunnels, one for command (21/tcp) and another for data (depending on the mode). In your case, you use PASSIVE mode, it mean your FTP client will connect to a port range of the FTP server. So you may want to do this:

1.Specify the port range on the FTP server. If you use the FileZilla server, you can specify the port range for the Passive mode (see the "Passive mode setting" tab >> "Use custom port range) set to 22-22, it means the FTP server will always open port 2121 as the data port.

2.In NR for Android, add a "static port forward" for port 2121. Then restart the NR for Android so that the change takes into effect.

3.Now you should be able to use ftp client over NR VLAN.

The connections looks like this:
FTP Client ---static port forward 21---> NR for Android (21) ---> FTP server (21, command port)
FTP Client ---static port forward 2121---> NR for Android (2121) ---> FTP server (2121, data port)

Btw, Active mode won't work with NR for Android.

Thanks,
KevinZ - NeoRouter team

Author:  natetk [ Fri Oct 22, 2010 10:58 am ]
Post subject:  Re: Fail FTP

Ok thanks for leading me to the right track. It still didn't work after I did what you said because the info was a little off, but it did inform me I needed a data port.

With DroidX btw it doesn't let me use localhost:21. I guess that port is in use for something with those phones. I just changed it to 2121.

If people need help what the mod said was true with the static ports those need to be edited. In FileZilla I put passive custom port range 2120-2120

Now the key thing that got it to work was in that same tab in FileZilla. I had to put Use the following ip 127.0.0.1 for external server ip because when my ftp program does the pasv command the server was sending (10.0.0.1.8.72) 8*256+72=2120(port for data) now the problem was my phone was trying to use 10.0.0.1 which doesn't exist. now if you use 127.0.0.1, Filezilla will respond with (127.0.0.1.8.72) which tells your phone to connect to that which is where NeoRouter is listening to.

Thanks again mod. I love Neorouter, and I hope we helped future people with same problem.

(edit)
Oh and one thing. Make sure you uncheck the "don't use external IP for local connections" in FileZilla.

Author:  natetk [ Fri Oct 22, 2010 11:38 am ]
Post subject:  Re: Fail FTP

Oh yea wanted to add one more thing.

I am pretty much just using ftp for my phone to connect to my computer. If you are using ftp for more than your phone, I'm not sure how to get both to work. If you had another computer connected in your vpn, it won't be able to use those setting in filezilla. It would need to connect to 10.0.0.1(in my case) and not localhost like my phone.

(edit)
I guess I could use active mode with the computers and that would probably work.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/