Or, to summarize, Passive is solves security problems for the client but creates them for the server.
The bottom line is that FTP was one of the first IP based user-level applications, and it's more than showing its age.
Aside from scp/sftp, you might also consider HTTP or HTTP/S. Yes, you can use HTTP to upload files. There are some good Perl scripts floating around for automating this if you search for them.
Main Topics
Browse All Topics





by: jleviePosted on 2003-09-12 at 20:30:19ID: 9350582
For passive mode to work to a server behind a firewall ports 21/TCP & 1024-63553/TCP must be open for inbound connections. There's a complete discussion of how ACTIVE & PASSIVE modes work at http://slacksite.com/other /ftp.html. And yes, having all or even a subset of the ephemeral port range open does consitute something of a security risk. That and the security risks inherit in an insecure protocol like FTP (usernames & passwords are sent in plain text and thus subject to capture via a sniffer) would suggest that a more secure file transfer method like scp or sftp be used.
If using a secure protocol isn't an option, my recommendation is that the FTP server only alow anonymous read-only access or that it be configured with FTP only accounts whose usernames & passwords don't correspond to Linux accounts. And all of those FTP sessions must be chrooted into FTP only directories. I'd further recommend that an FTP server be especially hardened, that it run a very restrictive local host based IPtables firewall, and that it have a properly configured copy of Tripwire running.