chorg has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

This is an urgent question. My sysadmin has been working with firewall rules. So last night I could access CPAN using the CPAN shell. Now I cannot. Which port is used by LWP or CPAN or whatever to get to the CPAN? I need to know this so I can have him open it up.
_______________________________________________
"Intelligence is a tool used achieve goals, however goals are not always chosen wisely..."

Replies are listed 'Best First'.
Re: Which port does CPAN use
by snax (Hermit) on Dec 14, 2000 at 20:03 UTC
    # perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.59) ReadLine support enabled cpan> o conf urllist urllist ftp://sunsite.doc.ic.ac.uk/packages/CPAN/ ftp://ftp.demon.co.uk/pub/mirrors/perl/CPAN/ ftp://ftp.leo.org/pub/comp/general/programming/languages/scrip +t/perl/CPAN/ ftp://sunsite.cnlab-switch.ch/mirror/CPAN/ Type 'o conf' to view configuration edit options
    the URLs indicate the protocol. If you choose http:// sites, you'll need port 80. For ftp, it's 21 -- no surprises here (unless said URLs indicate non-standard ports, of course).

      Incidentally, if you're using ftp, you'll also need port 20 inbound for ftp-data. It'd be easier if you switch to http =]

      -marius
Re: Which port does CPAN use
by chipmunk (Parson) on Dec 14, 2000 at 19:57 UTC
    I believe that CPAN uses either HTTP on port 80 or FTP on port 21, depending on the configuration and the modules installed on your local system. You may need to configure CPAN to use a proxy.
Re: Which port does CPAN use
by turnstep (Parson) on Dec 14, 2000 at 21:51 UTC

    In other words, it's almost certainly port 21, because if he went and blocked port 80, there would probably have been a queue of angry users at his door this morning. :)

Re: Which port does CPAN use
by Fastolfe (Vicar) on Dec 14, 2000 at 22:06 UTC
    If your firewall has things like 21 and 80 firewalled, then they almost certainly have proxies set up to permit certain people access out. Things like LWP work perfectly fine with all sorts of proxies (including authenticated ones). You may have better luck reconfiguring the core transport modules like LWP to use these proxies.