FileZilla FTP server

March 23, 2010 at 22:59 (Server) (, , , , )

Next step in the Zombieee project was to install something on it that could actually be used. FTP servers are basic and nice. FileZilla seems to be the server of choice, at least on the Windows platform. Lifehacker has a great guide on how to actually install it.

You’re probably behind a router, as I am, so we need to do some port forwarding. There are guides for most routers over at portforward.com, they also have a nice tool that can determine if the port was actually forwarded correctly. Now is also good time to read up on the theory behind this. Once everything seems in order, you can let some web tools (ftptest.net or g6ftpserver.com) test the connection. Since were dealing with port forwarding, testing inside the local network itself aren’t of much use.

I hope you read the theory because now its time for the fun part of this ftp adventure! Turns out that some routers think they are smarter than you and “improves” (read: destroys) data going through it. I spent quite a few hours trying to figure out why I couldn’t connect in PASV mode. EPSV mode worked, as can be tested on the g6ftpserver site.

When the client sends PASV to the server, the server sends the port back it should connect on. It looked like this in the FileZilla server interface when it failed:

...
...
> PASS *********
> 230 Logged on
> SYST
> 215 UNIX emulated by FileZilla
> PWD
> 257 "/" is current directory.
> TYPE I
> 200 Type set to I
> PASV
> 227 Entering Passive Mode (xx,xxx,xxx,xxx,23,144)
> disconnected.

The last two numbers in the 227 response indicates the port that should be used for transmitting data according to the formula 23*256+144 = 6032. I use 6000-6100 for passive mode (can be configured through the FileZilla server interface) so as far as the actual port forwarding goes, I should be fine. I made a thread about it on the FileZilla forums but managed to solve it before I got any responses.

The solution? Simply change the listening port for the server. Default is 21, after changing it to 2121 everything runs smoothly. Seems like the router only does its hazardous “optimizing” on the default ftp port.

On the other hand, I haven’t ruled out the option that my ISP doesn’t like the idea of me running an FTP server. So I’ll skip writing a long and angry rant about my routers manufacturer.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.