PDA

View Full Version : setting up ftp access to my computer


27 houdini's
05-22-2004, 08:25 AM
I want to set up ftp access to my computer. I am on a airport network and the ip adress is assigned using dhcp, so the number is something like ftp://10.0.1.2/, methinks a local ip adress that i cannot use to allow ftp acces from someone outside my network, like japan or something.

In the airport configuration window is see that my public (wan) IP adress is something like 212.218.xxx.xxx.
I guess i have to link the ip adress of the airport base station to the computer that i want to make accesible. So how do i do that?
Maybe is shouldn't use dhcp but assign a static ip adress to the computer?

Or should i use the port mapping option in the airport admin utility to do... what?

giskard22
05-23-2004, 01:28 AM
Port mapping is the correct feature to use. Most routers, including Apple's as far as I know, will keep assigning the same internal IP to a particular device even though they're using DHCP. So you don't have to worry about that changing unless you reconfigure the router/network.

You need to forward ports 20 and 21 (both TCP and UDP, if it bothers to ask) to the internal IP for your computer. Then, of course, turn on FTP sharing. If someone wants to connect, they should use the Base Station's WAN address.

You can test the configuration by using an FTP client on your own computer to connect to the Base Station's WAN address. If you get looped back to your computer, everything is working.

Please note that those ports are for "active" FTP transfers. Some firewalls/routers prevent people from downloading in "active" mode, but I don't think you can turn on "passive" mode just using Apple's GUI tools. The difference is that in active mode, I think the client computer actually opens a port for the server to connect to and "upload" the file that you request. Obviously, if someone is behind a router or firewall, that might not work because the server won't be able to contact their computer. In passive mode, the server opens up a 1-time port for that particular client to download the file from. (BTW, I'd be happy for a more experienced person to give correct info if I got any of that wrong.)

27 houdini's
05-23-2004, 06:25 AM
i found this great site :
http://homepage.mac.com/car1son/static_port_fwd_intro.html

I have got AFP (personal file sharing port 548) working but ftp access (port 21) will not work. Also, i would like to assign ONE specific folder a visitor sees. With system preferences/accounts I cannot specify one specific folder that is read and write for the visitor, but the visitor gets the whole basic folder-set of documents, library, desktop, music etc.

So: how to set up ftp access
how to make a ftp account (visitor)
how to assign a login and password for the visitor
how make only one specific folder RnW for the visitor

acme.mail.order
05-23-2004, 08:42 AM
The visitor is seeing one folder, it just happens to contain a bunch of other folders called "Documents", "Music", "Desktop" etc. There's no reason you have to keep the standard Apple user folder set. Delete/rename to your heart's content, but expect the Aqua login to be unhappy if you ditch the Library. You do want to make sure the 'chroot' option is set, so they can't go up the directory tree to other areas.

If by 'Visitor' you mean anonymous ftp, that is commonly done. Check the setup manual on how to enable it. If you want the visitor to be able to read and write just chmod the folder to allow read/write by all. Be prepared to empty it out on a regular basis. The more common practice is a drop box which you then manually move to a public folder. The "Public" folder is set up this way, but you should change "Drop Box" to a friendlier name, common ftp names are `pub` and `inc`.