in reply to New FTP firewall type for Net::Config

FWIW, There aren't really any "standard" connection formats for ftp. Different versions of ftp are free to implement their own types of connection. That being said, most implementations seem to recognize those 7 formats. They have become defacto standards by convention. If you need a different format, it looks like you need to set up a custom .netrc file in your home directory. See man ftp and man netrc.

But that doesn't have anything to do with perl particularly....

Poking around in the guts of Net::Config, it looks like it will try to use a file called .libnetrc in your home directory to load custom settings.

Update: Actually, it looks like Net::FTP will load settings from .netrc if it exists. Check the perl docs for Net::Netrc.

  • Comment on Re: New FTP firewall type for Net::Config

Replies are listed 'Best First'.
Re^2: New FTP firewall type for Net::Config
by Cuhulain (Beadle) on Jan 11, 2010 at 16:51 UTC
    Thank-you, thundergnat, for the remarks on Net::Netrc.

    I e-mailed Graham Barr directly, and he kindly gave a fast response, saying I should connect thru a firewall like this:

    my $ftp = Net::FTP->new( $firewall_host, Firewall => undef ); $ftp->login( "$ftp_user\@$ftp_host $proxy_user", $ftp_password, $proxy_password );

    I tried this and it works just fine.

    I copied Graham's solution to this thread in case it helps other seekers of wisdom.

    I'll watch Net::Config in case Graham enhances it to handle this new firewall type. But in the meantime, his quick solution is just the ticket.