in reply to FTP behind a gateway

When you are typing "PASSIVE" in your command-line client, you are probably turning passive ON, not OFF. Passive generally works with firewalls. So try your code with Passive => 1.

Besides that, there is an easier way. There is already code in Net::FTP to handle proxies. You need to add some code to your libnet.cfg file (typically in the Net/ directory, but there are ways of making user-local copies). See perldoc Net::Config. My Net/libnet.cfg looks like this:

{ ftp_firewall => 'corpgate03', ftp_firewall_type => 1, ftp_ext_passive => 1, local_netmask => [ "162.134.0.0/16", "172.24.0.0/16", "192.168.0.0/16", ], }

Replies are listed 'Best First'.
Re: Re: FTP behind a gateway
by qadwjoh (Scribe) on Nov 04, 2002 at 11:11 UTC
    I've worked out the problem, in case anyone's interested - instead of...
    $ftp->quot("user destination_username destination_password")
    ...do this...
    $ftp->login("destination_username", "destination_password")
    This will then allow you to ftp through a type 3 firewall (see perldoc Net::Config for definition of a type 3 firewall).

    I suppose this was a bit obvious though...

    Andrew