From: Mateusz Tybura Date: 2008-08-02T02:53:50+09:00 Subject: Re: My simple downloader doesn't work Frederick Cheung wrote: > On 1 Aug 2008, at 15:20, Mateusz Tybura wrote: > >>> 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 With ftp.passive my first code works but version using open-uri was smaller. So I'm asking about how to set passive mode using open-uri? -- Posted via http://www.ruby-forum.com/.