Friday, January 16, 2009

FTP setup

You can click on the Picture to see the high resolution version


First you need to download Guildftpd from www.guildftpd.com . It is free .

You should install on a machine which has Internet access and also has
access to those files which you allow user to download. you can map the drive from window explorer .

The diagram above is a sample home network.

BTW , the diagram assume you install the FTPd on a separate machine. You can install the FTPd on the file server then you don't need to share the drive to the file server.

You should finish installing the FTPd and the screen will look like this :

Don't worry about the user "kcchiu" I will show you how to create the user later .
Click on the "system" then you will see the drop down...you should see one user "anonymous" in a new installation .

Go "right click" the Group then you should see "add user" . Click it and you will see this screen

Now , If I want to create a user " HonMan " and the password then the screen will look this


You need to remember the password what you type because the user will need it.

The main screen will look like this after you click OK


Now you should find there is new user "HonMan". you need to click the "Path" tab which I circle in next photo :

this tab show which folder or directory is available to the user , so the information may different depends on which you select or highlight .

The next step is to set the path for "HonMan" . So, go ahead to highlight "HonMan" and click the Path tab. Then right click within the path window and select "Add Path" . You should see the following window :

in Local Path: click Browse then you should see the following screen :

You should see the drive which you mapped from your Fileserver . In above example : I mapped my Y: drive to my Fileserver . You can either select the entire drive or you select a folder under that drive . Like the following screen :

I select the Folder "KC" under my Y: drive . After you click OK :
Now you see the " Y:\KC " in my Local Path then I type "HDfile" in the Virtual Path . So, when the user login to the FTP server . He/she can just type in " CD HDfile " to change directory .

So , Click OK and you should see the following main screen .


That is it .. now you just finish configuration on the FTP Server . Don't close the screen otherwise the FTP daemon will stop but you can minimize it .


Next you need to config your Router accept FTP connection from Internet . The following screen assuming you have DD-WRT firmware on your router but if you don't the concept are the same.

What you want is to have "Port forwarding" on your router ?
Here is how FTP protocol work The User connect to the FTP server via TCP port 21 for control and the Server send Data transfer via TCP 20 when the User request download or upload.

Now , most of the ISPs will block incoming TCP 21 to their client which is your home Because TCP 21 is the well known port for FTP server . There is multiple reason they block it but this is not our discussion here .

So, on your router there is something call " Port Forwarding " . It can Listen on specific Port number (different than 21) and forward the call to the in-house FTP server TCP21.

The following screen I make my router listen on TCP 2121 and my FTP Server 192.168.1.110 listen on TCP21 and I also make my router listen on TCP2020 and my FTP Server 192.168.1.110 listen on TCP20 .