Re: wget times out - but ftp works OK
> On Tue, Jan 04, 2005 at 02:17:44PM +0200, Necati DEMiR wrote:
> > are you connecting to internet through a proxy?
> no I'm not.
> I just tried explicitely to set passive with a normal ftp session - then
> it hangs/times out again. I guess it might be related to my router
> (D-Link DI604).
> I've set up 'virtual servers' to allow ftp and ssh to a box behind the
> router. I've opened for ftp on port 21 - is the port number changed when
> entering passive mode?
FTP is using two different TCP connections - one for the control stream
(that's where you type the commands, and it is opened by the client connecting
to the server's port 21), and one for the data stream. The data stream is
opened once you've chosen to transfer a file, and is closed afterwards, while
the control stream stays open all the time.
Now, in active mode the server establishes the data stream, i.e. it "pushes"
the data you desire. If for some reason (usually a firewall or similar)
the server is not allowed to connect to you, you may choose "passive mode":
Then the client establishes the data stream - but to a random port of the
server, which the client gets told as response to the ftp-PASV-command. So
just enabling port 21 is not sufficient if you want to use passive ftp.
But it seems that active ftp is working well, just that wget insists in using
passive... I can't find a configuration or commandline option, so I guess
there is some kind of heuristics built in, that's just failing at your site.
Hmm, hope this helps anyway.