Let's Revisit MacOS Server's Passive FTP Problem

Mac OS X Server's built-in FTP server can't be configured to determine which ports above 1024 will be used for Passive FTP connections. More often than not, this means that clients behind NAT routers (for a variety of complicated reasons) can't discover which of the "high ports" are being used in their passive connection. Furthermore the Mac OS X administrator would have to open every port above 1024 to anticipate connections, severly weakening the security of the system.

The effect for the user is that their FTP client can connect, but can't list the contents of a directory or upload/download anything.

Here's a primer on the difference between Active and Passive FTP:
http://slacksite.com/other/ftp.html

Apple introduced a "solution" to the problem by making this addition to the Network Services manual sometime around 10.3 server:

"See if the client is using FTP passive mode, and turn it off. Passive mode causes the FTP server to open a connection on a dynamically determined port to the client, which could conflict with port filters set up in IP filter service. "

This was a tacit admission that MacOS's various FTP daemons over the years have unchangeable, precompiled configurations. The typical workaround was choppy, but workable: replace Apple's built-in FTP daemon with a fully configurable one like ProFTPd or PureFTPd, configure a narrow range of ports for your own security, and configure your firewall to match.

We're on Tiger server now and that's still in the Network Services manual. Leopard or whatever is looming. Will Apple ship an FTP server that works out-of-the-box with its own firewall this time? Any new thoughts or solutions?

G5's, G4's, G3's, Xserve, Powerbooks, iBooks, Mac OS X (10.4.7)

Posted on Aug 17, 2006 11:41 AM

Reply
2 replies

Aug 17, 2006 6:34 PM in response to Scott Burton

I think you need to do a little more research on FTP. Most of the actual problems you describe are inherent in FTP and nothing to do with any kind of Apple-inhibited FTP server.

For example, you say:

> Mac OS X Server's built-in FTP server can't be configured to determine which ports above 1024 will be used for Passive FTP connections

Not true. You can choose whatever port range you like using the portrange directive in /etc/ftpd.conf
By default this directive isn't set so the entire port range is used. Feel free to change that.

>The effect for the user is that their FTP client can connect, but can't list the contents of a directory or upload/download anything.

This is an inherent flaw in FTP, suffered by every FTP server on the market. Nothing to do with Apple.

> This was a tacit admission that MacOS's various FTP daemons over the years have unchangeable, precompiled configurations

Again, incorrect. The suggestion was a workaround for the FTP protocol restriction, not for Apple's implementation. I've been dealing with the exact same issues for years on various Sun servers I've run.

Most of the problems you describe regarding FTP and firewalls won't be solved at all in any future OS update - from any vendor. FTP was never designed with firewalls and security in mind. The only solution is to fix the underlying protocol, or use something different altogether.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Let's Revisit MacOS Server's Passive FTP Problem

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.