From: Frederick Cheung Date: 2008-08-01T22:53:57+09:00 Subject: Re: My simple downloader doesn't work On 1 Aug 2008, at 14:46, Gregory Brown wrote: > On Thu, Jul 31, 2008 at 3:29 AM, WujcioL wrote: >> It still don't work: >> >>> require 'open-uri' >>> puts open("anonymous:anonymous@sunsite.icm.edu.pl/pub/Linux/ >>> slackware/slackware-12.0/CHECKSUMS.md5.asc").read >> Net:FTPPermError: 500 Illegal PORT Command >> >> I thinking about some bug in open-uri and net/ftp. Code is simple and >> it runs so that's not mine error. Of course i succesfully downloaded >> 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 > seltzer:~ sandal$ ruby -v > ruby 1.8.6 (2008-06-20 patchlevel 230) [i686-darwin8.11.1] > > > > -- > Killer Ruby PDF Generation named after a magnificent sea creature: > http://github.com/sandal/prawn | Non-tech stuff at: > http://metametta.blogspot.com >