NetAdminTools.com
 
SignalQ Sites:
NetAdminTools - Coprolite - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Ruby | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | ERP | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | GNU/Linux Reference OS Build | MCJ How-to | MCJ Presentation Config | Keywords | RSS



Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Ruby
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·ERP
·REALbasic
·All Categories


Setting Passive Mode for Perl/CPAN
Topic:Perl   Date: 2003-06-08
Printer Friendly: Print

spacerspacer
<<  <   >  >>

Subject

One problem with the default install of the CPAN shell is that if you need passive FTP to get through your firewall, the CPAN shell won't work. Here is the behavior:

.
.
.
Invalid PORT.
Retrying.
--12:26:05--  ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
(try: 8) => `-'
Connecting to ftp.perl.org[192.35.244.50]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/CPAN/authors ... done.
==> PORT ... 
Invalid PORT.
Retrying.

Locate libnet.cfg. For us, it is here:

/usr/lib/perl5/site_perl/5.8.0/Net/libnet.cfg

Edit the file so that the ftp_int_passiveline is:

{
'ftp_int_passive' => 1,
'snpp_hosts' => [],
'inet_domain' => undef,
'test_exist' => 1,
'ftp_testhost' => undef,
'daytime_hosts' => [],
'ph_hosts' => [],
'time_hosts' => [],
'smtp_hosts' => [],
'test_hosts' => 1,
'nntp_hosts' => [],
'pop3_hosts' => [],
}

For good measure, we also changed our environment:

root@srv-1 root # export FTP_PASSIVE=1
root@srv-1 root # set | grep FTP_PA
FTP_PASSIVE=1

Might as well add that to /etc/profile. Now:

root@srv-1 root # perl -MCPAN -e shell
.
.
.
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
LWP not available
Fetching with Net::FTP:
ftp://archive.progeny.com/CPAN/modules/02packages.details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Sun, 08 Jun 2003 09:14:27 GMT
HTTP::Date not available
There's a new CPAN.pm version (v1.70) available!
[Current version is v1.61]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...

Well, that is better.


People:
Places:
Things:
Times:





Please read our Terms of Use and our Privacy Policy
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2010 NetAdminTools.com