Welcome to Lieben Knowledgebase!

Setting up FTP server behind router

Question/Problem:

Summary:

I'm trying to set up an FTP server. However, when I connect, it fails when it attempts the "List" command. I can't see the directory listing, and can't download/upload files.

Background information:

1. I've forwarded port 21 to the internal LAN IP address, 192.168.0.1
3. I've set up a FTP server (Cerberus FTP server) on port 21 of this Toshiba laptop.
4. If I FTP into the Toshiba laptop here at work, via the LAN, connects and gets a directory listing (success!).
4a. If I go home, and try to connect via the WAN(external) IP, it connects, but can't get a directory listing (no success). Attempts with both PASV and non-PASV connections from the outside both fail at the list command


The answer/solution:

Hi,

Ftp servers use a different port for their data connections. the port you configured will only be used for commands.

I don't know my way around your program, but in bulletproof for example, you could specify which ports the ftp server uses for data, so you have to forward those ports as well, and this is only possible in passive mode! Forward at least 2 ports for 2 concurrent data streams, and more if you'll have more users.

Directory listing and downloading/uploading of files should work now if your client is set to passive mode.

Some firewalls are capable of allowing ftp servers to map their outgoing FTP ports, in this case you won't have to do it yourself, check it's documentation for that.


added by Jos on: 26-04-2007



keywords: FTP server, routing, PASV,


©2009 by Lieben.nu