From: Frederick Cheung Date: 2008-08-01T23:44:58+09:00 Subject: Re: My simple downloader doesn't work On 1 Aug 2008, at 15:20, Mateusz Tybura wrote: > Frederick Cheung wrote: >> On 1 Aug 2008, at 14:46, Gregory Brown wrote: >> >>>> this file using Firefox3 and TotalCommander. >>>> Code was tested on winXP and Kubuntu8.04. >>> >>> The code I showed worked on my machine. Tested on OS X (10.4), >>> without any firewall issues. >>> Ruby version: >>> >> Beyond firewalls, active ftp won't work behind a NAT device. >> Ftp servers sometimes say illegal port command if you tell them that >> your address is a private ip address like 192.168.x (your address on >> the network behind the nat device) >> >> Fred > > It can be it cause i'm connecting from small LAN. Got any idea how to > make it works even that host is beheind nat device? You need to be using passive ftp. According to the docs you just need to say ftp.passive = true (assuming ftp is an instance of Net::FTP) Fred