Koozali.org: home of the SME Server

FTP Not working from outside my network

Tengu

FTP Not working from outside my network
« on: August 10, 2002, 09:25:27 AM »
Hey everyone,

I have something I have been trying to get working for a bit, and still am not able to. I think it may have something to do with my very limited knowledge of Linux.  Which is why I love my E-smith server.  

Okay to explain a little bit about my network, I have the SME server, running in server only mode.  I also have a Linksys Router/Firewall, which I use as my main gateway. My network is all static ip's. I have forwarded ports 21,22, and 69, to my SME server.  I am able to connect via FTP if I use the internal ip number and come from inside of my firewall.

I should also say that I have enabled Public FTP access, and also normal usage under FTP access limits in the Remote access panel.  

If I try to access it via my WAN IP address, or by using an outside computer. I connect and it ask's for a user ID and Password. which I input, then it stays for quite some time saying "Connecting Data Socket"  Now here's where my stupididy for Linux comes in, as I am not to up on it. Would you think this is  a problem with my server or my router?  My router works fine for everything else, except for this situation .  I have pasted exactly what happens in CuteFTP below.  Any help or idea you have would be great, I'm tired of hitting myself in the head over this one :)

230 User admin logged in.
STATUS:>   Login successful
COMMAND:>   TYPE I
   200 Type set to I.
COMMAND:>   pwd
   257 "/" is current directory.
COMMAND:>   TYPE A
   200 Type set to A.
STATUS:>   Retrieving directory listing...
COMMAND:>   PASV
   227 Entering Passive Mode (10,1,1,110,4,30).
COMMAND:>   LIST
STATUS:>   Connecting data socket...
ERROR:>   Timeout

Chris

Re: FTP Not working from outside my network
« Reply #1 on: August 10, 2002, 01:37:49 PM »
I am not sure, but

You may also need to forward port 20 to the ftp server from the router as I believe port 20 is used also for data flow....

Tengu-Shawn Fenerty

Re: FTP Not working from outside my network
« Reply #2 on: August 10, 2002, 03:40:30 PM »
Thanks very much for that information, sadly it didn't solve the problem,  Any other idea's?

Charlie Brady

Re: FTP Not working from outside my network
« Reply #3 on: August 10, 2002, 09:08:08 PM »
Tengu wrote:

> If I try to access it via my WAN IP address, or by using an
> outside computer. I connect and it ask's for a user ID and
> Password. which I input, then it stays for quite some time
> saying "Connecting Data Socket"

The FTP protocol requires two connections, one control connection, and one data connection, usually in the opposite direction. It's a difficult protocol to forward through a NAT firewall.  What you need to do in this case is turn off passive mode in CuteFTP, which will reverse the direction of the data connection.

The best solution for you, in my personal opinion, if to replace the LinkSys router with a simple ADSL modem, and operate the server in server/gateway mode.

Charlie

Tengu-Shawn Fenerty

Re: FTP Not working from outside my network
« Reply #4 on: August 11, 2002, 03:01:33 AM »
Charlie,

Turning off Pasv mode worked like a charm, thanks so very much for the information. It has taken me months to try and figure that one out :)