Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > No FTP with Firewall!

No FTP with Firewall!
Thread Tools
Mac Elite
Join Date: Jan 2004
Location: Berkeley, CA
Status: Offline
Reply With Quote
Sep 23, 2004, 09:17 PM
 
For the longest time I've been trying to connect to my friend's FTP server (where my site is hosted) from my Mac, but I haven't been able to. I've been under the impression that it was a problem with his server, but I just discovered (I would have discovered this earlier had he not assured me that my firewall could not have anyhting to do with outgoing FTP) that when I turn my firewall off, FTP works.

I Google'd my problem, and I found this:

ftp can give you trouble with a firewall if the FTP transfer is done in active mode instead of passive mode. An FTP connection is done on various ports > 49152. If the FTP server you are connectiong to is in active mode, the server will initiate the connection. With the firewall in place, this will be seen as an unauthorized incoming connection to your computer and will be rejected. On the other hand, if the FTP transfer mode is passive, your client will initiate the connection and since any outgoing connection is allowed, you will connect without a problem to the FTP server. Once the connection is established (i.e. the SYN bit of the TCP packet is set), connections are always allowed. Not every server supports it, but most do. Therefore, you might see (in your system.log) a server you know trying to connect from its port 21 to one of your ports >49152 until it times out. You must issue a passive command or configure your ftp software to do so (Interarchy , Fetch and Transmit all have an option for that: uncheck use passive; the command-line utility ftp usually defaults to active). I had some problems with Internet Explorer and I ended up changing the ftp helper application to Fetch. If you are not too paranoid, you can always just flush the firewall rules for the time of your download with the command ipfw flush. Any time you have a problem with your connection, go take a look at your system logs. If the connection is legitimate, modify the firewall rules to allow it.
This makes perfect sense, but it doesn't explain why I never had this issue with Windows. Perhaps it was because I was behind my own personal router (Berkeley has an enclosed network, but it's not like a personal router). Does that make any sense?

Anyway, I tried using passive on my friend's server, and this produced the following error:

ftp> passive
Passive mode: on; fallback to active mode: on.
ftp> ls
500 'EPSV': command not understood.
227 Entering Passive Mode (192,168,1,5,89,126)
200 PORT command successful.

421 Service not available, remote server timed out. Connection closed
For a while, I tried alternate methods, and then decided to try using passive on the Debian.org server (it hadn't worked, before...while I thought it was just my friend's server being stupid, my firewall had actually been blocking all FTP...his was just the only FTP I tried). While passive gave me an error on my friend's server, it worked on the Debian.org server!

I can try to get him to upgrade his server, but this is not worth it for many reasons. First of all, I'll probably be switching to a paid provider sometime soon. While on the subject, will I be able to access this with passive mode (something like MySiteSpace.com is what I'd be buying). Second of all, SFTP and SCP work, but I want to use FTP with a program called ImageWell, and I don't know how I would tell it to use passive mode (there's no option).

How do other people deal with this issue? It's quite frustrating. Why didn't I have this problem on my PC? Weird...

Anyway, advice would be greatly appreciated.
"Give me a lever long enough and a fulcrum on which to place it, and I shall move the world." -Archimedes
     
Mac Elite
Join Date: Jan 2004
Location: Berkeley, CA
Status: Offline
Reply With Quote
Sep 24, 2004, 06:54 PM
 
There is no way that I'm the only person with this issue...
"Give me a lever long enough and a fulcrum on which to place it, and I shall move the world." -Archimedes
     
Posting Junkie
Join Date: May 2001
Location: Portland, OR
Status: Offline
Reply With Quote
Sep 24, 2004, 07:16 PM
 
You could unblock the FTP port. Hit the "FTP access" option in Firewall. That might do it.
8 Core 2.8 ghz Mac Pro/GF8800/2 23" Cinema Displays, 3.06 ghz Macbook Pro
Once you wanted revolution, now you're the institution, how's it feel to be the man?
     
Mac Elite
Join Date: Mar 2003
Status: Offline
Reply With Quote
Sep 24, 2004, 09:24 PM
 
I'm behind a college firewall and I have the built in firewall turned on and have never had a problem with ftp.

try what goMac suggested.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:21 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2