FTP Server how-to

I have run into a brick wall trying to get a little FTP server up and running.

Here’s the ultimate purpose: I want to have a small FTP folder where I can put file that I can access from a remote computer. I would also like my girlfriend to acces them. After a vacation, we also intend to share the photos online with friends.

Sounded like a great idea huh? Well, I can’t get it to work.

Ok I have two potential PC’s that can be used to host the files.

Desktop1 (tenderly called Black): Running Windows XP Home
Desktop2 (tenderly called Tan): Running Mandrake Linux (stil trying to learn about that OS)

Both are connected via a Netgear RP614 DSL router and my ISP is Earthlink. I have a dynamic IP address.
I originally tried Serv-U but I could not connect from a remote computer. In the router config page, I configured port forwarding for ports 20 through 21 and ports 2000 through 2010. (I can’t under stand why the ServU help files ask for several ports open. )Help file

So I couldn’t get that to work. Several months later (presently) I am toying around with Linux and I know that it too can host FTP sites.

I got help from LinuxQuestions.org and got Secure FTP running on the Linux box but I stall can’t connect to it remotely.
Does anyone know of a good place to learn how to set this up? I can’t be this hard to do!
Does anyone have experience with running an FTP site behind this particular router. It got great reviews when I bought it, but there’s not much info on it out there…

Well, here are some tips that may or may not help:

Pick one system to setup your FTP on - Linux or Windows and stick with it. Windows 2000/XP Pro has a built in FTP server (IIS) and so does Mandrake.

Your router should be fine for FTP - and you can test it by running (from teh XP box) telnet xxx.xxx.xxx.xxx 21 where xxx.xxx.xxx.xxx is the outside IP address of your router. You should get a response from your computer. Or you could port scan the outside IP address to verify what ports your router has open.

You can set this up with a dynamic IP address, but the outside IP address is going to change too often to make it functional.

Make sure you have the port forwarding pointing to the correct computer.

Other than that, I would need the specific error - does it time out? does it connect? does it ask for logon and not accept the password?

I’ve set up FTP sites with Mandrake and Windows 2000/XP/2003 - usually it’s very simple (a little too simple - Windows 2000 Server came with it turned on :wink: ) Sorry you are having a bad time.

  1. Good news regarding dynamic IPs: You can use a dynamic dns service such as
    http://www.dyndns.org/services/dyndns/

  2. Bad news: Many ISPs forbid users from running their own home servers. (Great for idiots, bad for non-idiots.) Your ISP may be blocking standard server ports such as FTP. (You can use a non-standard port though, until the ISP notices it and blocks that.)

I second doing the telnet test from the outside, you can see what, if anything, is happening.

Assuming for a moment that the software is working fine you can try:

  1. ensure that you are using the correct ip, go to this page to find your global ip (rather than the local one).

  2. Earthlink may be blocking ports and you will have to change the ports that the FTP program is listening to

  3. check to make sure the router is allowing the packets through (ie attempt access to router from a computer outside your home network)

Do you have any firewalls running? XP likes to firewall connections and I was thinking that you may have the Windows firewall running and not be aware of it. It’s kind of a dumb thing, but it has tripped me up before.

If what you want to do is share pictures, and you’re already running a linux server, you might want to check out an opensource gallery like gallery or yappa-ng? It’ll look very sophisticated and it’s not much more effort than setting up linux.

This won’t be of any use to you, but just in case someone spots or searches on the thread title to find out how to do it on a Mac —

a) MacOS X = go to Sharing PrefsPane. Turn on FTP file sharing. Clients using non-admin usernames and passwords will have access only to their own “Users” folder, whereas clients provided with admin usernames and passwords will have access to the entire machine.

b) MacOS 9 (and 8, 7, 6…). = download the free app NCSA Telnet. Launch it and in the Edit menu set up which directory you want to share via FTP, and set up usernames, then activate server.

Actually, can’t they also access ~username/Public as well?

Oh yeah :o

I’m in contact with ServU tech support and he can’t connect to my PC either. He says he can connect to my FTP port but not the passive ports 2000 through 2010 .

He says something may be blocking those ports and that I can disable passive port range (PASV)

  1. What is PASV?
  2. How can I find out what is blocking those ports?

A good explanation of active vs. passive ftp:

http://slacksite.com/other/ftp.html

FTP is an unusual service in that there are 2 ports involved, a command port which the server listens on (21, by default), and a negotiated data port for the transfer. The “active” vs. “passive” concerns who initiates the data connection - traditional “active” ftp involves the server end initiating the data connection after the client tells it what port it has started listening on for the data. One problem with this is that client end firewalls are likely to block the request, seeing it coming from the outside to connect to a program on the client machine. For “passive” mode ftp, the client side initiates the data connection after the server tells it what port it is prepared to send the data out on.

Well, let’s start at the beginning, debugging-wise. Somewhere, there’s a blockage. Let’s find out where.

I’m going to assume you’re using the Windows machine as your ftp server and your linux box we’ll use as a test client. (I would use the linux box as the server, but that’s just me).

step 1) on the windows server, open a dos box and type “ftp localhost”. If you can’t ftp to yourself, something’s likely busted in the ftp configuration.

step 2) test if you can ftp from your linux box to your windows server on your local lan. If you can’t, the problem is in a firewall or a misconfiguration on your server. (Or it’s in a firewall or setting on the linux box, but that’s less likely seeing as default firewall settings rarely deny outbound ftp traffic.)

step 3) Note the IP address on the WAN side of your router. disconnect your router from the internet. Temporarily connect your linux box on the WAN side of the router, and assign it a static address in the same subnet as your router’s WAN IP address. (if any of the above is greek, let us know and someone can clarify confusing parts). See if you can ftp to your server. If you can’t, most likely there’s a configuration problem somewhere; triple check to see if all your settings are correct. If you still can’t ftp, the problem is in your router configuration.

step 4) if the last three worked, try connecting across the internet (hey we already did that and know it doesn’t work). If it doesn’t, we know your ISP is filtering things. Call and complain.

By the way, you really should check out the gallary links I posted earlier. Not only will it be a much cooler solution for what you want, but the odds are high you’ll bypass this current nonsense.